What is the best solution for Local Notifications in IOS for react native? - react-native

As the React Native website informs us PushNotificationsIOS is now deprecated. What is recommended is using https://github.com/react-native-community/react-native-push-notification-ios. However, this project does not seem to be maintained or commonly utilized. Frustratingly, it lacks Typescript support.
I am having problems using a Notification Content Extention for some nice custom iOS notifications. I suspect this has something to do with react-native-push-notification-ios's use of now deprecated UILocalNotification. Like many projects in the elephant graveyard that is the RN ecosystem, it seems painfully out of date. I'm reluctant to further troubleshoot my issues because it seems like a lonely, time consuming and potentially fruitless effort. Additionally, I'm trying to avoid writing a lot of native code.
Is there a solution I am missing here? Or am I asking for too much native support from React Native?

I always use firebase for my notifications. It works really well in my opinion. https://rnfirebase.io/docs/v5.x.x/notifications/introduction

Related

react native vs flutter ,should i move from react-native to flutter

i am react native developer , and my question is more generic than code
i am getting really frustrated with react native and the amount of bugs it has
and the extremely low performance on android devices specially the old ones
almost all of the important api are third party developed on github and they not maintained anymore with alot of bugs.
some codes doesn't work sometimes,
what i noticed with highly used(10k+ users) application in react native
on some android devices fetch request is repeated 4 times.
on some android devices async-storage is working probably .
on await and async are getting ignored
React.usestate is buggy and it is ignored sometimes
does flutter offer a better environment with less bugs
Speaking from personal experience, flutter is better than react native for several reasons, but I'll list the few best ones here:-
More interactice community :- Flutter has way more answered question in the past 2 years on stackoverflow than react
Better docs - The flutter docs cover everything, I mean everything\
Nativeness - Flutter does a great job at making the app look as native to the platform as possible
Wide range of packages - Like it says, there is a package for everything, You can also use platform views just in case there is something on the native side you want to add so there are no limits
The editors - OMg I cannot say how much easier it is with good descriptions of all the commands within the code. I mean you can hover on a function and if made by the flutter team or a proper package team, you'll see the full implementation
Rid of any form of html or css - The designing, is much much much much much * infinity easier because everything makes just more sense from a programmer's poin t of view
Great debugging - With flutter, you can debug on different scales, even on the release scale just in case there is a problem with release mode instead of debug mode and ofcourse the community is always there to help
Regular awesome updates - While react is slowly dying down on new features, flutter is booming. With the recent update to flutter 2.0 introducing null safety, the chance of bugs have gone down even more
So yes, I recommend you try to shift to flutter. There is even a full tutorial in the flutter docs for react-native decs to learn flutter.

How to create a real life-like 3D avatar with react-native?

This question can sound a bit off-topic or more of tech capacity or capability. Let's say I am pretty new to this whole thing. I recently came across with https://avatarsdk.com and http://tada-time.com and really got curious how they are doing it. Let's say I want to use a real life-like 3D avatar in a react native app, any ideas where to start with? How do I create an avatar in React Native app?
I am well aware of there are API we can pay and use it.
Any help would be appreciated.
I guess what your requirement is to create 3D objects for Augmented reality, if I am correct. Currently Apple and Android provides their own framework for that. IOS's AR kit and android's AR Core is a bit different in terms of code structure(I mean how they approach problems, their functionality etc). I'll consider them a bit advance topic better done on native platforms. Answering your question, I haven't come across any such library in react native and I don't think we'll see any soon as react native is still maturing and still has a lot to do to become stable.
I've seen projects in react native having AR elements, but that was done entirely in native and bridged to react native (hybrid)

What actions you have taken after you hear about React Native Architecture Changing and Airbnb, Udacity abandon it?

This is not a technical question.
It just this is my first programming language which I am fluent and I don't want to abandon it. But I feel frustrated, I need to know about this framework, but should I learn something that will change in just a couple more weeks.
News:
https://adtmag.com/articles/2018/07/10/abandon-react-native.aspx
https://www.theregister.co.uk/2018/07/26/node_native_developers/
Few things from my perspective: Airbnb was supporting React Native since 2016, and recently they announced sunsetting React Native and reinvesting all of their efforts back into native because they weren’t able to achieve their specific goals. The reason why AirBnB is moving away from React Native is very specific to Airbnb. They already have a huge number of IOS & Android Developers and feel their application needs are pretty unconventional. They end up developing for 3 platforms instead of 2. Which means their entire application is not in React Native, only a few features are in React Native.
Read these articles: https://medium.com/braus-blog/airbnb-is-dropping-react-js-should-you-too-dcbff36def5c and Here goes what worked well and what didn’t : https://medium.com/airbnb-engineering/react-native-at-airbnb-the-technology-dafd0b43838 . And one head's up from the RN team after the .56 version release is "
We're working on a large-scale rearchitecture of React Native to make
the framework more flexible and integrate better with native
infrastructure in hybrid JavaScript/native apps. With this project,
we'll apply what we've learned over the last 5 years and incrementally
bring our architecture to a more modern one. We're rewriting many of
React Native's internals, but most of the changes are under the hood:
existing React Native apps will continue to work with few or no
changes."
Facebook has not stopped supporting React, and there are still a lot of contributors supporting and using React Native in the community. Moving away from technology depends on what are the other alternatives you have.

Is Expo adequate for a middle or big size app?

I've been using React Native for more than a year, but I never tried Expo deeply. I only made some test 3 months before. In that time I found that you were not allowed to write and integrate Java / Swift commponents if you needed to use them.
Also I found a bit difficult to reload the app depending on the wifi signal.
In some days, I will start a new middle size app. So I wonder if is it a good aproach to start it using Expo ?
Your question is mostly opinion based and it is likely to be closed. It would be best to ask if or how you can solve an enterprise issue with Expo.
To me, while Expo is promising and interesting, is only good for either small apps or prototypes.
Pretty much you answered the question yourself. Native intengration is not possiblr and sooner or later you are going to need it in your app, otherwise you will be very limited.
Also, it adds another layer of dependency into your project. Let's say Expo updates something that breaks your app, you might need to re write everything.
Big companies or big projects cannot be stopped by this. So, to me, Expo is not a very good approach for mid size apps and above, but of course, it depends on your objective.
Maybe this big app of yours is a one time app, that needs no native integration whatsover and that you don't mind if you need to re write in the future, then yes, you could use Expo since it could help you speed up delivery.

React Native vs Swift/Objective-C/Java Native

I'm working on a new project for a Fintech company and I have been tasked with looking into whether we should go with React Native or native Swift/Objective-C/Java for our mobile app development technology and strategy going forward.
I have done loads of research into this and have read many of the case studies relating to React Native, but I still don't feel I have enough to make an informed decision at this point.
The broad app functionality will include things like:
Data related functions such as Account Balances and Statements (pretty simple)
Image capture of identity documents and selfies of the users
Capture of biometric data
Push notifications
Some of this is pretty standard and simple, but some of it will require the app to use low level device functions and/or use 3rd party Android and iOS SDKs.
So, in terms of working towards the decision of a mobile development strategy, can I ask you for your input, based on your recent experience, on reasons to consider React Native over native Swift/Objective-C/Java development in the light of the planned functionality listed above (including reasons why it may be far better to stick with the native languages/platforms).
From own experience I can tell that React Native is a good choice for most of the apps when you need to develop and iterate fast. It usually means it would be cheaper to develop for a customer.
Looking at the list of features I can not see anything that can not be done in RN. Sooner or later you'll have to dive into native code, usually to bridge native modules with JS. I've done this multiple times, it's not that hard and documentation on RN website helps a lot.
Be aware that you'll most certainly run into stupid bugs and you'll have to find workaround. At least this happened to me multiple times when I was building RN app half a year ago, maybe now it's more stable.
Also I believe it really depends on what are the devices of potential app users. I've never developed for Android, but heard from fellow developers, that on mid-level Android devices RN runs much slower, this should be tested from the very beginning.
React Native has a really nice and tempting idea behind sounds like "unified and almost fully shareable codebase for different platforms including Web". But from my experience (not so extensive but still) the reality is a little bit different – at some point you will face some issues with native code for sure, and it would be really good if you have experienced Swift/Objective-C/Java developers in your team to deal with it. Don't trust the promises "all you need is just a React Front-End Developer". The React Native platform itself seemed to me more like a magical blackbox which I ran with a single command having no any idea what's inside and how it actually works. You have to know at least something about Xcode and Android Emulator even if Facebook is trying to hide this aspect it from you as much as they can.
TL;DR In my opinion if you really want to try React Native for something more complex than TodoMVC then you need to have at least 3 developers: Web (JavaScript/React), iOS (Swift/Objective-C) and Android (Java). Or just one Superhero.