Hey!
I'm unable to use code-push with Xcode 11.
Becasuse Info.plist contains
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
And I receive error
Detecting ios app version:
Error: Command 'codepush release-react -a name/app_name -d Staging' failed with exception "The "CFBundleShortVersionString" key in the "ios/app_name/Info.plist" file needs to specify a valid semver string, containing both a major and minor version (e.g. 1.3.2, 1.1)."
Build & upload
Fails
(The more info the faster we will be able to address it!)
You can work around it by manually adding -t [your target version] to the end of the react-release command.
+1
Any news on this ?
You can work around it by manually adding
-t [your target version]to the end of the react-release command.
thanks.
After build in Xcode change the $(MARKETING_VERSION) in info.plist file to your version number (ex: 1.7).
I tried today and it works for me.
I uploaded my version to App Store. I download my app from "Test Flight" app. And I use code-push release with new version number and without using -t option.
If anybody is struggling with -t command, the build number from the xcode should be passed in double quotes - -t "4.6.2" something like this.
pfff....
@kadirakkaya 's solution works great. Edit your version number in Xcode, then just do a search for MARKETING_VERSION and replace it with your version number. Annoying extra step when making a new build version but easy enough and it works around the issue.
Hi @kesha-antonov ,
Thank you for reporting!
I hope @kadirakkaya and @AndrewMorsillo answers were helped you, so I'll close the issue for now, but if you still have any questions, feel free to reopen it.
Thanks guys!
@andreidubov Will full Xcode 11 support (i.e. support for $(MARKETING_VERSION)) be provided in a future release? The latest release ([email protected]) still requires this workaround; it'd be a cleaner developer experience if we didn't need to have this extra step.
Hi @sunweiyang, We know about this problem and now investigate it. I will keep you updated.
Thank you for your question.
What we've done is to put the release-react command as a npm script and instead of hardwritting the -t [version], used jq to pick it from package.json:
``json
scripts: {
"codepush": "appcenter codepush release-react ... -tcat package.json | jq -r .version`"
}
Hi guys,
We released a fix for Xcode 11. Now it should works well. We will update the documentation a bit later.
If you have any suggestions or comments, you can add it here or open a new issue.
PR link: https://github.com/microsoft/appcenter-cli/pull/751
I'm still having this issue on "react-native-code-push": "6.2.0"
Was thee fix merged with this version?
Still broken on 6.3.0 for me. Have to supply -t manually for it to work. I am using xcconfig (set via pod install) to set the MARKETING_VERSION if that affects anything.
@dihan @CyberMew this has nothing to do with react-native-code-push as fix was done for appcenter-cli. I had to remove appcenter-cli entirely and reinstall it again. Please check if you have it installed globally with -g flag as it said in the appcenter-cli manual.
@dihan @CyberMew this has nothing to do with react-native-code-push as fix was done for appcenter-cli. I had to remove appcenter-cli entirely and reinstall it again. Please check if you have it installed globally with -g flag as it said in the appcenter-cli manual.
app center or code push is already the latest and global for me. In fact I just installed it for the first time a couple days ago, which by the time this issue is supposedly fixed.
Most helpful comment
You can work around it by manually adding
-t [your target version]to the end of the react-release command.