final test

This commit is contained in:
kg422
2015-08-13 14:16:48 -07:00
5 changed files with 11 additions and 7 deletions

View File

@@ -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"

View File

@@ -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:../../"
}

View File

@@ -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]) {

View File

@@ -8,6 +8,6 @@
"semver": "^4.3.6"
},
"devDependencies": {
"react-native": "^0.8.0-rc"
"react-native": "^0.8.0"
}
}