Шаг
- запустите 'npx response-native init RN0710RC3 -- версия 0.71.0-rc.3» для создания проекта RN
- создайте «AppDelegate.swift» «Bridging-Header.h» и удалите «AppDelegate.mm» «AppDelegate.h» 'main.m'
#import "AppDelegate.h"
#import
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.moduleName = @"RN0710RC3";
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}
- (BOOL)concurrentRootEnabled
{
return true;
}
@end
AppDelegate.swift
import Foundation
import UIKit
@UIApplicationMain
class AppDelegate: RCTAppDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
CommonTheme.currentTheme.primaryColor = .red;
self.moduleName = "RN0710RC3";
return self.application(application, didFinishLaunchingWithOptions: launchOptions);
}
override func sourceURL(for bridge: RCTBridge!) -> URL! {
#if DEBUG
return RCTBundleURLProvider.sharedSettings()?.jsBundleURL(forBundleRoot: "index", fallbackResource: nil)
#else
return Bundle.main.url(forResource: "main", withExtension: "jsBundle")
#endif
}
func concurrentRootEnabled() -> Bool {
return true;
}
}
Bridging-Header.h
#import
#import
Подробнее здесь: https://stackoverflow.com/questions/747 ... ative-0-71