Failed attempt to integrate ViroReact with CocoaPods

This commit is contained in:
John Lyon-Smith
2018-03-17 09:53:08 -07:00
parent c91fbaa98a
commit 77d92f3b7b
16 changed files with 1536 additions and 721 deletions

View File

@@ -9,6 +9,7 @@
#import "AppDelegate.h"
#import <ViroReact/VRTBundleURLProvider.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
@@ -21,7 +22,12 @@
{
NSURL *jsCodeLocation;
#ifdef DEBUG
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
VRTBundleURLProvider *bundleProvider = [[VRTBundleURLProvider alloc] init];
jsCodeLocation = [bundleProvider jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
if (jsCodeLocation == nil) {
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
}
#else
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
@@ -31,7 +37,7 @@
[[RCCManager sharedInstance] initBridgeWithBundleURL:jsCodeLocation launchOptions:launchOptions];
[GMSServices provideAPIKey:@"AIzaSyDN4E_vzO4cKjKHkMg_49hX1GBnU34kx4U"];
/*
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"DeightonAR"
@@ -45,7 +51,7 @@
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
*/
return YES;
}