react-native-version
react-native-version copied to clipboard
Add support for ios MARKETING_VERSION build setting
Since XCode 11, CFBundleShortVersionString
is managed using $(MARKETING_VERSION)
from build setting, not a static value anymore
In react-native-version:4.0.0
it replace the value using static one
before
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
after
<key>CFBundleShortVersionString</key>
<string>0.1.0</string>
It will be better if it can handle build setting and change it accordingly in build setting file MyApp.xcodeproj > project.pbxproj
both in debug and release
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = NO;
INFOPLIST_FILE = BSQMobile/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.0.0; // CHANGE THIS INSTEAD
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = binus.itdivision.mobilebsq;
PRODUCT_NAME = BSQMobile;
VERSIONING_SYSTEM = "apple-generic";
};
Turns out that it use CURRENT_PROJECT_VERSION
for build version too
Maybe you could use this approach https://stackoverflow.com/questions/58585239/how-to-change-build-setting-versioning-in-xcode-11-using-script
+1 I had the same issue. Is there a PR or a fork to allow this?
+1 here, also having the same
+1 here, also having the same
+1
+1
MARKETING_VERSION not change after npx react-native-version --never-amend --skip-tag --set-build 22
xcode version: Version 15.0.1 (15A507) "react-native-version": "^4.0.0", "react-native": "0.72.4",
macos : 14.0 (23A344)