搞清楚cfbundleexecutableVersion和cfbundleexecutableShortVersionString的区别

Mobile App Development
Web Content & Customer Journey
Software Quality
UI Components
App Development
JavaScript Hybrid Mobile
JavaScript Native Mobile
Reporting and QA
Reporting & Data
Testing & productivity
Member since:
Posted 22 Aug 2014
Apple have introduced a new requirement in the bundle approval process when uploading your app to iTunes Connect. Info.plist must contain the following key:&CFBundleShortVersionString. Currently, AppBuilder does not automatically set this key and you need to set it manually to be able to publish your app in the App Store.
1.&Open Info.plist for&editing. Follow the instructions in&&to complete this task.
2.&Set your CFBundleShortVersionString key code&after the CFBundleVersion key, so that you have a block similar to that:
&key&CFBundleVersion&/key&
&string&$BundleVersion$&/string&
&key&CFBundleShortVersionString&/key&
&string&X.X&/string&
Where X.X is the actual value that you have set in the Version field in your Project Properties and for version in iTunes Connect.
3. Save changes, build your app, and submit it.
The AppBuilder team is working on providing a fix for this in the shortest term possible.&Thank you for your patience and understanding.
Member since:
Posted 11 Sep 2014
This issue is now resolved in the Telerik AppBuilder 2.5 release.
For more information, check the&. Please, note that if you have modified your CFBundleShortVersionString key, you might need to update your Info.plist again.
Get Products
Recognition
USA: +1 888 365 2779
UK: +44 20
India: +91 124 4300987
Germany: +49 89
Bulgaria: +359 2 8099850
Australia: +61 3
Copyright & 2017, Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See
or appropriate markings.
Powered by114网址导航CFBundleVersion与CFBundleShortVersionString的区别_IOS_第七城市
CFBundleVersion与CFBundleShortVersionString的区别
& & & &CFBundleVersion:标识(发布或未发布)的内部版本号。这是一个单调增加的字符串,包括一个或多个时期分隔的整数。  CFBundleShortVersionString标识应用程序的发布版本号。该版本的版本号是三个时期分隔的整数组成的字符串。第一个整数代表重大修改的版本,如实现新的功能或重大变化的修订。第二个整数表示的修订,实现较突出的特点。第三个整数代表维护版本。该键的值不同于“CFBundleVersion”标识。  版本号的管理是一个谨慎的事情,希望各位开发者了解其中的意义。  比较小白,更新应用的时候遇到版本号CFBundleShortVersionString命名的错误,导致无法更新,后来看了文档研究下发现是这样,希望给不了解的人以启示;    CFBundleVersion与CFBundleShortVersionString  图片里的 Version 对应的就是CFBundleShortVersionString(发布版本号 如当前上架版本为1.1.0 之后你更新的时候可以改为1.1.1)  Build 对应的是 CFBundleVersion(内部标示,用以记录开发版本的,每次更新的时候都需要比上一次高 如:当前版本是11 下一次就要大于11 比如 12,13 ….10000)
最新教程周点击榜
微信扫一扫ios - Use same CFBundleVersion and CFBundleShortVersionString in all targets - Stack Overflow
to customize your list.
Join the Stack Overflow Community
Stack Overflow is a community of 6.6 million programmers, just like you, helping each other.
J it only takes a minute:
I received the following email from Apple when I submit an app update:
We have discovered one or more issues with your recent delivery for
"Project". Your delivery was successful, but you may
wish to correct the following issues in your next delivery:
CFBundleVersion Mismatch - The CFBundleVersion value '1' of extension
'Project.app/PlugIns/ProjectTodayExtension.appex' does not
match the CFBundleVersion value '985' of its containing iOS
application 'Project.app'.
CFBundleShortVersionString Mismatch - The CFBundleShortVersionString
value '1.0' of extension 'Project.app/PlugIns/ProjectTodayExtension.appex' does not
match the CFBundleShortVersionString value '2.1.6' of its containing
iOS application 'Project.app'.
After you’ve corrected the issues, you can use Xcode or Application
Loader to upload a new binary to iTunes Connect.
Is there any way of use the same CFBundleVersion and CFBundleShortVersionString in all targets to prevent this?
2,02261732
My solution is:
For CFBundleShortVersionString:
Add a user-defined constant in your project settings
Name it $(CF_BUNDLE_SHORT_VERSION_STRING) and set it to your desired value
Set your version in your targets to $(CF_BUNDLE_SHORT_VERSION_STRING)
Repeat for all targets. Done!
CFBundleVersion: you could do the same for CFBundleVersion, but somehow I wanted this value to be computed from my GIT repo commit count. I?ve done it like this:
Add a Pre-action to your main target. You access the shown dialog via Product > Scheme > Edit Scheme
Add a Post-action to your main target.
Add a new Command Line Tool target named BundleVersionUpdate and one named BundleVersionRevert
Navigate to your new BundleVersionUpdate target and add a new Run Script Build Phase
Paste the following
\#!/bin/sh
INFOPLIST="${SRCROOT}/MyApp/MyApp-Info.plist"
INFOPLIST_WKAPP="${SRCROOT}/MyApp-WKApp/Info.plist"
INFOPLIST_WKEXT="${SRCROOT}/MyApp-WKExt/Info.plist"
PLISTCMD="Set :CFBundleVersion $(git rev-list --all|wc -l)"
echo -n "$INFOPLIST"
| xargs -0 /usr/libexec/PlistBuddy -c "$PLISTCMD"
echo -n "$INFOPLIST_WKAPP"
| xargs -0 /usr/libexec/PlistBuddy -c "$PLISTCMD"
echo -n "$INFOPLIST_WKEXT"
| xargs -0 /usr/libexec/PlistBuddy -c "$PLISTCMD"
Navigate to your new BundleVersionRevert target and add a new Run Script Build Phase and paste this:
\#!/bin/sh
INFOPLIST="${SRCROOT}/MyApp/MyApp-Info.plist"
INFOPLIST_WKAPP="${SRCROOT}/MyApp-WKApp/Info.plist"
INFOPLIST_WKEXT="${SRCROOT}/MyApp-WKExt/Info.plist"
PLISTCMD="Set :CFBundleVersion SCRIPTED"
echo -n "$INFOPLIST"
| xargs -0 /usr/libexec/PlistBuddy -c "$PLISTCMD"
echo -n "$INFOPLIST_WKAPP"
| xargs -0 /usr/libexec/PlistBuddy -c "$PLISTCMD"
echo -n "$INFOPLIST_WKEXT"
| xargs -0 /usr/libexec/PlistBuddy -c "$PLISTCMD"
2,08762046
The version of your ProjectTodayExtension.appex have to be the same as your app. example:
Target> General:
Version: 1.0 &- change here
Biuld: 1.0
If the version of your app to get on itunes connect is 2.3, then you must change the version of your TodayExtension to the same version 2.3.
The scheme actions aren't in source control so it's better to add a build phase into your app's target. Syncing the versions across all targets can be solved with a simple script that can be modified for every target you want synced:
Add "New Run Script Phase" in "Build Phases" for your app's target
Rename the script to something like "Sync Versions" and drag it above "Compile Sources" (NOTE: Xcode has a bug that may prevent the drag-drop to work. If so, you'll need to manually edit the .pbxproj file so the build phase goes in the right spot
Paste the following script into the shell:
INFOPLIST_MYAPP="${SRCROOT}/MyApp/MyApp-Info.plist"
myAppVersion=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "$INFOPLIST_MYAPP")
myAppBuild=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_MYAPP")
INFOPLIST_SHAREEXT="${SRCROOT}/ShareExtension/Info.plist"
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $myAppVersion" "$INFOPLIST_SHAREEXT"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $myAppBuild" "$INFOPLIST_SHAREEXT"
Build your project as you normally and your share extension's version & build will stay in sync with your main target.
2,68722040
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
rev .24712
Stack Overflow works best with JavaScript enabled

我要回帖

更多关于 cfbundleversion 修改 的文章

 

随机推荐