Skip to content

Commit 1d32315

Browse files
author
alvaromb
committed
Updated example
1 parent 7042f4a commit 1d32315

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

Example/button/iOS/button/AppDelegate.m

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ @implementation AppDelegate
1616
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
1717
{
1818
NSURL *jsCodeLocation;
19-
19+
2020
/**
2121
* Loading JavaScript code - uncomment the one you want.
2222
*
@@ -30,9 +30,9 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
3030
* `inet` value under `en0:`) and make sure your computer and iOS device are
3131
* on the same Wi-Fi network.
3232
*/
33-
34-
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"];
35-
33+
34+
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
35+
3636
/**
3737
* OPTION 2
3838
* Load from pre-bundled file on disk. To re-generate the static bundle
@@ -42,13 +42,14 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
4242
*
4343
* see http://facebook.github.io/react-native/docs/runningondevice.html
4444
*/
45-
46-
// jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
47-
45+
46+
// jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
47+
4848
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
4949
moduleName:@"button"
50+
initialProperties:nil
5051
launchOptions:launchOptions];
51-
52+
5253
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
5354
UIViewController *rootViewController = [[UIViewController alloc] init];
5455
rootViewController.view = rootView;

Example/button/iOS/buttonTests/buttonTests.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ - (void)testRendersWelcomeScreen {
4747
[[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
4848
[[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
4949

50-
redboxError = [[RCTRedBox sharedInstance] currentErrorMessage];
51-
5250
foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
5351
if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
5452
return YES;

Example/button/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"start": "node_modules/react-native/packager/packager.sh"
77
},
88
"dependencies": {
9-
"apsl-react-native-button": "^2.0.0",
10-
"react-native": "^0.10.1"
9+
"apsl-react-native-button": "^2.1.0",
10+
"react-native": "^0.12.0"
1111
}
1212
}

0 commit comments

Comments
 (0)