Я только что сделал несколько конфигов в Xcode и appdelegate.m для RNFirebase, RNFBSDK и Google Sign-In.После выполнения всех этих шагов у меня возникает ошибка при запуске симулятора ios с реактивным запуском ios.
Я попытался настроить AppDelegate.m, удалил папки сборки и перекомпилировал
Мой файл AppDelegate.m выглядит следующим образом
#import "AppDelegate.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <ReactNativeNavigation/ReactNativeNavigation.h>
#import <RNGoogleSignin/RNGoogleSignin.h>
#import <Firebase.h>
#import <FBSDKCoreKit/FBSDKCoreKit.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Firebase configurations
[FIRApp configure];
// Facebook SDK
[[FBSDKApplicationDelegate sharedInstance] application:application
didFinishLaunchingWithOptions:launchOptions];
NSURL *jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
[ReactNativeNavigation bootstrap:jsCodeLocation launchOptions:launchOptions];
return YES;
}
// RNGoogleSignin.h -> https://github.com/react-native-community/react-native-google-signin/blob/master/docs/ios-guide.md#modify-your-app-to-respond-to-the-url-scheme-optional
- (BOOL)application:(UIApplication *)application openURL:(nonnull NSURL *)url options:(nonnull NSDictionary<NSString *,id> *)options {
return [RNGoogleSignin application:application
openURL:url
sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]
annotation:options[UIApplicationOpenURLOptionsAnnotationKey]];
}
// FACEBOOK SDK
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
BOOL handled = [[FBSDKApplicationDelegate sharedInstance] application:application
openURL:url
sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]
annotation:options[UIApplicationOpenURLOptionsAnnotationKey]
];
// Add any custom logic here.
return handled;
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
[FBSDKAppEvents activateApp];
}
- (BOOL)application:(UIApplication *)app
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
if ([[FBSDKApplicationDelegate sharedInstance] application:app openURL:url options:options]) {
return YES;
}
if ([RCTLinkingManager application:app openURL:url options:options]) {
return YES;
}
return NO;
}
@end
. Это полная ошибка, появляющаяся на экране симулятора вместо запуска приложения:
Exception '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]' was thrown while invoking getImageForFont on target RNVectorIconsManager with params (
Entypo,
"\Uf241",
30,
4278190080,
35
)
callstack: (
0 CoreFoundation 0x0000000111f926fb __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000011097eac5 objc_exception_throw + 48
2 CoreFoundation 0x0000000111ee0ddc _CFThrowFormattedException + 194
3 CoreFoundation 0x0000000111ffec31 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 321
4 CoreFoundation 0x0000000111f8e3db +[NSDictionary dictionaryWithObjects:forKeys:count:] + 59
5 madilist_app 0x000000010d8339bf -[RNVectorIconsManager createAndSaveGlyphImage:withFont:withFilePath:withColor:] + 415
6 madilist_app 0x000000010d833d68 -[RNVectorIconsManager getImageForFont:withGlyph:withFontSize:withColor:callback:] + 360
7 CoreFoundation 0x0000000111f994cc __invoking___ + 140
8 CoreFoundation 0x0000000111f96a45 -[NSInvocation invoke] + 325
9 CoreFoundation 0x0000000111f96e96 -[NSInvocation invokeWithTarget:] + 54
10 madilist_app 0x000000010d528fba -[RCTModuleMethod invokeWithBridge:module:arguments:] + 2810
11 madilist_app 0x000000010d5db096 _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicE + 790
12 madilist_app 0x000000010d5daba3 _ZZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEiENK3$_0clEv + 131
13 madilist_app 0x000000010d5dab19 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 25
14 libdispatch.dylib 0x000000011497accf _dispatch_call_block_and_release + 12
15 libdispatch.dylib 0x000000011497bd02 _dispatch_client_callout + 8
16 libdispatch.dylib 0x0000000114982720 _dispatch_lane_serial_drain + 705
17 libdispatch.dylib 0x0000000114983261 _dispatch_lane_invoke + 398
18 libdispatch.dylib 0x000000011498bfcb _dispatch_workloop_worker_thread + 645
19 libsystem_pthread.dylib 0x0000000114d5d611 _pthread_wqthread + 421
20 libsystem_pthread.dylib 0x0000000114d5d3fd start_wqthread + 13
)
RCTFatal
facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&)
facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)::$_0::operator()() const
invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_lane_serial_drain
_dispatch_lane_invoke
_dispatch_workloop_worker_thread
_pthread_wqthread
start_wqthread