Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 0467922

Browse files
author
Will Anderson
committed
Merge pull request #7 from Microsoft/code-push-config-updates
Code push config updates
2 parents 6b7b311 + c72f4ff commit 0467922

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

CodePushConfig.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ + (void)initialize
1313
NSString *deploymentKey = [infoDictionary objectForKey:@"CodePushDeploymentKey"];
1414
NSString *serverUrl = [infoDictionary objectForKey:@"CodePushServerUrl"];
1515
if (!serverUrl) {
16-
serverUrl = @"http://localhost:3000/";
16+
serverUrl = @"https://codepush.azurewebsites.net/";
1717
}
1818
NSString *rootComponent = [infoDictionary objectForKey:@"CFBundleName"];
1919

@@ -82,4 +82,4 @@ + (NSDictionary *) getConfiguration
8282
return configuration;
8383
}
8484

85-
@end
85+
@end

Examples/CodePushDemoApp/iOS/Info.plist

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
<string>1</string>
2323
<key>LSRequiresIPhoneOS</key>
2424
<true/>
25+
<key>NSAppTransportSecurity</key>
26+
<dict>
27+
<key>NSAllowsArbitraryLoads</key>
28+
<true/>
29+
</dict>
2530
<key>UILaunchStoryboardName</key>
2631
<string>LaunchScreen</string>
2732
<key>UIRequiredDeviceCapabilities</key>
@@ -40,7 +45,5 @@
4045
<string></string>
4146
<key>CodePushDeploymentKey</key>
4247
<string>deployment-key-here</string>
43-
<key>CodePushServerUrl</key>
44-
<string>server-url-here</string>
4548
</dict>
4649
</plist>

Examples/CodePushDemoApp/index.ios.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ var Button = require("react-native-button");
1818
var CodePush = require('react-native-code-push');
1919

2020
var CodePushDemoApp = React.createClass({
21+
22+
getInitialState: function() {
23+
return {};
24+
},
2125
componentDidMount: function() {
2226
this.checkUpdate();
2327
},
@@ -32,9 +36,10 @@ var CodePushDemoApp = React.createClass({
3236
},
3337
handlePress: function() {
3438
this.state.update.download().done((localPackage) => {
35-
localPackage.apply(1000).done();
39+
localPackage.apply().done();
3640
});
3741
},
42+
3843
render: function() {
3944
var updateView;
4045
if (this.state.update) {
@@ -50,14 +55,7 @@ var CodePushDemoApp = React.createClass({
5055
return (
5156
<View style={styles.container}>
5257
<Text style={styles.welcome}>
53-
Welcome to React Native!
54-
</Text>
55-
<Text style={styles.instructions}>
56-
To get started, edit index.ios.js
57-
</Text>
58-
<Text style={styles.instructions}>
59-
Press Cmd+R to reload,{'\n'}
60-
Cmd+D or shake for dev menu
58+
Welcome to Code Push!
6159
</Text>
6260
{updateView}
6361
</View>

0 commit comments

Comments
 (0)