App crashes when using Salesforce React Native SDK and Xcode 8 - react-native

I was trying to compile a sample app with Salesforce React Native SDK 4.3 and Xcode 8. The app would build successfully, but when loading on the simulator, it would crash at the splash screen and at the following line of code:
int retVal = UIApplicationMain(argc, argv, #"SFApplication", #"AppDelegate");
I got the following errors in the output:
ibc++abi.dylib: terminating with uncaught exception of type NSException
and further up
Terminating app due to uncaught exception 'com.salesforce.security.keychainException', reason: 'writeToKeychain: Error adding keychain item: Unknown status code (-34018).'

It seems that enabling Keychain Sharing under "Capabilities" will fix the problem. I believe this issue should be fixed with SDK 5.

Related

React Native: Android - Google mlkit FaceDetection causing app crash with FATAL EXCEPTION

After configuring the Firebase dashboard and integrating everything into my React Native app, when launching the Android Emulator the app crashes and I get the following error:
FATAL EXCEPTION: create_react_context
Process: com.appName, PID: XXXX
java.lang.VerifyError: Verifier rejected class com.google.mlkit.vision.face.FaceDetection: com.google.mlkit.vision.face.FaceDetector com.google.mlkit.vision.face.FaceDetection.getClient() failed to verify: com.google.mlkit.vision.face.FaceDetector com.google.mlkit.vision.face.FaceDetection.getClient(): [0x10] can't resolve returned type 'Unresolved Reference: com.google.mlkit.vision.face.FaceDetector' or 'Unresolved Reference: com.google.mlkit.vision.face.internal.FaceDetectorImpl'
The iOS Simulator runs fine and I'm able to use MLKit tools seamlessly, so this leads me to believe I have configured the Android app incorrectly. Any ideas?

Error while running Expo-ReactNative app in Iphone Simulator

I have an expo-React native project. The Project is getting build correctly and i am able to generate .apk and .ipa files for it.
But when I try to run the app in the iPhone simulator. I am getting the below error:-
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSBundle must contain the expected assets'
I was also having this issue and turned out to be my own fault due to changes I'd made in AppDelegate.m.
These caused [self initializeReactNativeApp]; to not be called when building for DEBUG.
Make sure initializeReactNativeApp is being called correctly in application:(UIApplication *)application didFinishLaunchingWithOptions in your app delegate.

Native module cannot be null, but the app works fine

react-native run-ios successfully builds the project and the app is started at simulator, however, I got the error below, I tried to get more details in the Xcode log, I only got this:
[fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: Native module cannot be null.
How can I debug this error? is it just a warning? I can see fatal in Xcode log.
If I press on Dismiss in simulator, the error below gone and the app seems to work fine..
Any idea?

UNNotificationCenter issue crash the app

When I run my App on ios10 or later, the app works fine but the problem is that when I run the app on ios9 it crashes. I put deployment target 9.0 or later ,I could not find why it is not working on ios 9 and the warning shows like this :
Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '+[NSString
localizedUserNotificationStringForKey:arguments:]: unrecognized
selector sent to class 0x10d042b00'
The problem is with method: localizedUserNotificationStringForKey:arguments.
Please note that this method is only available from iOS 10+.
This method you are using comes in UserNotifications framework. This framework introduced in iOS 10. That's why it's not supporting iOS9 devices.
Please refer this document : Apple Doc on UserNotifications Framework
The method you are using localizedUserNotificationstringForKey is available for iOS 10 or later , it’s not for ios9

Exception while running xamarin ios app on devices only. The App runs on simulator perfectly

I am using native ios framework in xamarin ios application. However i am getting an error while runtime. It throws below exception on device at runtime but it works smoothly on simulators.
Name: NSInvalidArgumentException Reason:NSDate consoleOutputTimestamp.
The reason might be, I was using a third-party NSDate category in my naive iOS framework. When I removed the whole NSDate third-party library.
I was able to build it, however it throws a different exception this time. The exception is as below :
Name:NSInvalidArgumentException Reason:UIViewController setIsFullScreen:
Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[UIViewController setIsFullScreen:]: unrecognized selector sent to instance 0x145b3fd0
Means every time I am making changes in native framework, after building it at runtime it throws an exception on devices only.
However the native iOS framework runs on devices in native iOS app smoothly.
However I am getting exception when I build it in Xamarin and runs it in Xamarin App. I have made changes related to architecture in Xamarin while building and in sample app as well but that didn't help. Do i need to make any changes in Xamarin project ?
I am using latest version of visual studio. The app stops at launch time and throws exception.
Please share if you have any idea about this. Thanks in advance.