无法在iOS上原生找到RNFirebase核心模块

时间:2018-09-09 17:46:14

标签: ios react-native react-native-ios react-native-firebase

AppDelegate.m

#import "Firebase.h"
#import "AppDelegate.h"

#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  [FIRApp configure];
  NSURL *jsCodeLocation;

  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];

  RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
                                                      moduleName:@"kakashi"
                                               initialProperties:nil
                                                   launchOptions:launchOptions];
  rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];

  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  UIViewController *rootViewController = [UIViewController new];
  rootViewController.view = rootView;
  self.window.rootViewController = rootViewController;
  [self.window makeKeyAndVisible];
  return YES;
}

@end

Podfile:

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

target 'my_app' do
  pod 'Firebase/Core'

end

确认Build phase/Link Binary with Libraries具有libRNFirebase.a

我还验证了$(inherited)是否存在框架搜索路径。

RNFirebase core module was not found natively on iOSexpo start仍然出现错误npm start

能否请您推荐如何解决此问题?还是非常感谢您提供有关验证/确保其正常工作的帮助。

0 个答案:

没有答案