Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ios MARKETING_VERSION build setting #186

Open
archansel opened this issue Jun 13, 2020 · 6 comments
Open

Add support for ios MARKETING_VERSION build setting #186

archansel opened this issue Jun 13, 2020 · 6 comments

Comments

@archansel
Copy link

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";
			};
@archansel
Copy link
Author

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

@macdonaldr93
Copy link

+1 I had the same issue. Is there a PR or a fork to allow this?

@ChaossAdept7
Copy link

+1 here, also having the same

1 similar comment
@coldSeattle
Copy link

+1 here, also having the same

@charneykaye
Copy link

+1

@krmao
Copy link

krmao commented Nov 24, 2023

+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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants