mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-06-14 09:59:12 +08:00
final test
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
* on the same Wi-Fi network.
|
||||
*/
|
||||
|
||||
//jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"];
|
||||
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"];
|
||||
|
||||
/**
|
||||
* OPTION 2
|
||||
@@ -45,7 +45,7 @@
|
||||
* see http://facebook.github.io/react-native/docs/runningondevice.html
|
||||
*/
|
||||
|
||||
jsCodeLocation = [HybridMobileDeploy getBundleUrl];
|
||||
//jsCodeLocation = [HybridMobileDeploy getBundleUrl];
|
||||
|
||||
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
|
||||
moduleName:@"HybridMobileDeployCompanion"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"start": "node_modules/react-native/packager/packager.sh --root ../../"
|
||||
},
|
||||
"dependencies": {
|
||||
"react-native": "^0.8.0-rc",
|
||||
"react-native": "^0.8.0",
|
||||
"react-native-button": "^1.2.0",
|
||||
"react-native-hybrid-mobile-deploy": "file:../../"
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,6 @@
|
||||
#import "HybridMobileDeploy.h"
|
||||
|
||||
#import "RCTBridgeModule.h"
|
||||
#import "RCTRootView.h"
|
||||
#import "RCTUtils.h"
|
||||
|
||||
@@ -7,6 +8,10 @@
|
||||
|
||||
RCT_EXPORT_MODULE()
|
||||
|
||||
RCTBridge * _bridge;
|
||||
|
||||
@synthesize bridge = _bridge;
|
||||
|
||||
+ (NSString *) getBundleFolderPath
|
||||
{
|
||||
NSString* home = NSHomeDirectory();
|
||||
@@ -59,7 +64,7 @@ RCT_EXPORT_MODULE()
|
||||
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:[self getBundleUrl]
|
||||
moduleName:rootComponent
|
||||
launchOptions:nil];
|
||||
|
||||
|
||||
UIViewController *rootViewController = [[UIViewController alloc] init];
|
||||
rootViewController.view = rootView;
|
||||
[UIApplication sharedApplication].delegate.window.rootViewController = rootViewController;
|
||||
@@ -101,7 +106,6 @@ RCT_EXPORT_METHOD(installUpdate:(NSDictionary*)updatePackage
|
||||
// TODO send file path
|
||||
callback(@[RCTMakeError(@"Error saving file", err, [[NSDictionary alloc] initWithObjectsAndKeys:[HybridMobileDeploy getBundlePath],@"bundlePath", nil])]);
|
||||
} else {
|
||||
|
||||
// save the package info too
|
||||
NSString *packageFolderPath = [HybridMobileDeploy getPackageFolderPath];
|
||||
if (![[NSFileManager defaultManager] fileExistsAtPath:packageFolderPath]) {
|
||||
|
||||
@@ -8,6 +8,6 @@
|
||||
"semver": "^4.3.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"react-native": "^0.8.0-rc"
|
||||
"react-native": "^0.8.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user