My app doesn't update whenever I push to codepush even though it looks like my setup is correct. I can verify that it's not working because I have opened and exited the app a bunch of times.
โโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ Name โ Deployment Key โ Update Metadata โ Install Metrics โ
โโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโค
โ Production โ abc123-ER1Zk1llw5Apk3gI8HN37NyRzl4z0Z โ Label: v17 โ No installs recorded โ
โ โ โ App Version: 1.0 โ โ
โ โ โ Mandatory: No โ โ
โ โ โ Release Time: 4 hours ago โ โ
โ โ โ Released By: [email protected] โ โ
โโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโค
โ Staging โ abc123xGp-l0eMKT0xH10_QxVQCkNyRzl4z0Z โ Label: v21 โ No installs recorded โ
โ โ โ App Version: 1.0 โ โ
โ โ โ Mandatory: No โ โ
โ โ โ Release Time: 5 hours ago โ โ
โ โ โ Released By: [email protected] โ โ
โโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโ
React Native component:
import codePush from "react-native-code-push";
class MyApp extends Component {
render() {
if (this.state.isStoreLoading) {
return (
<View>
<StatusBar hidden={true} />
</View>
);
} else {
return (
<Provider store={store}>
<View style={styles.container}>
<StatusBar hidden={true} />
<PlatformMain />
<IntroMain />
</View>
</Provider>
);
}
}
}
export default codePush(MyApp);
AppRegistry.registerComponent('MyApp', () => MyApp);
AppDelegate.m:
#ifdef DEBUG
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
#else
jsCodeLocation = [CodePush bundleURL];
#endif
Info.plist

@EdmundMai thanks for filing an issue. Some others will look at this shortly, but in the meantime, what is the CFBundleShortVersionString in your Info.plist? That needs to match the App Version semver range expression that is marked on your update (currently 1.0 from your example)
Hi @silhouettes , it is:
<key>CFBundleShortVersionString</key>
<string>1.0</string>
Hi @EdmundMai, could you please try to slightly change your code when you codepushify your app.
Instead of this one:
export default codePush(MyApp);
try to use this:
export default MyApp = codePush(MyApp).
Please let me know if it helps.
@max-mironov I think that worked!! When I look at the Xcode log, this is what shows up
Before change:
2017-03-03 19:22:33.815 [info][tid:com.facebook.react.JavaScript] Running application "MyApp" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
After change:
2017-03-03 19:21:59.255 [info][tid:com.facebook.react.JavaScript] Running application "MyApp" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
2017-03-03 19:21:59.333 [info][tid:com.facebook.react.JavaScript] [CodePush] Checking for update.
2017-03-03 19:21:59.337 [info][tid:com.facebook.react.JavaScript] [CodePush] Reporting CodePush update success (v17)
2017-03-03 19:22:00.526 [info][tid:com.facebook.react.JavaScript] [CodePush] App is up to date
Thanks so much for the help!!!
Most helpful comment
@max-mironov I think that worked!! When I look at the Xcode log, this is what shows up
Before change:
After change:
Thanks so much for the help!!!