React-native-code-push: iOS app not updating

Created on 2 Mar 2017  ยท  4Comments  ยท  Source: microsoft/react-native-code-push

Description

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] โ”‚                      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Reproduction

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

info_plist

Additional Information

  • react-native-code-push version: 1.16.1-beta
  • react-native version: 0.39.2
  • iOS/Android/Windows version:
  • Does this reproduce on a debug build or release build? Both staging and release
  • Does this reproduce on a simulator, or only on a physical device? Physical device, possibly on a simulator too

Most helpful comment

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

All 4 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

diegocouto picture diegocouto  ยท  4Comments

cgerikj picture cgerikj  ยท  3Comments

panarasi picture panarasi  ยท  4Comments

quanzaiyu picture quanzaiyu  ยท  3Comments

fanzhiri picture fanzhiri  ยท  3Comments