iphone 7 +上的React-Native Build +

时间:2017-04-09 19:51:52

标签: iphone react-native

我是初学者,刚开始学习它。我从github下载了一些示例应用程序,并在我的学习过程中使用它们。 我是一个真正的初学者..

我已经设置了我的mac pro with react native,在这种情况下我已经下载了一个名为movieapp的应用程序。我安装了它,当我在模拟器中运行它时它完美无缺。

注意:我有一个付费开发人员帐户,其中包含Apple for Xcode,我正在运行版本8.3.1(8E1000a)

我已为我的签名信息更改了应用。

当我从Xcode运行构建此应用程序到我的iPhone 7+时,我得到了这个屏幕

iPhone 7+ screen shot

以下是在Xcode中构建时弹出的终端窗口的屏幕截图。

[Mac终端屏幕] [2]

有人可以指出我正确的方向来解决这个问题吗?

#import "AppDelegate.h"
#import "RCCManager.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import "ReactNativeConfig.h"

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  NSURL *jsCodeLocation;

  // rn-config
  NSDictionary *config = [ReactNativeConfig env];

  #ifdef DEBUG
    jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
  #else
    jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
  #endif

  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  self.window.backgroundColor = [UIColor whiteColor];
  [[RCCManager sharedInstance] initBridgeWithBundleURL:jsCodeLocation];

  // RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
  //                                                     moduleName:@"movieapp"
  //                                              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

0 个答案:

没有答案