Ju Yang Active Member Licensed User Longtime User Jun 22, 2016 #1 It seems that the #version project attribute will set both CFBundleShortVersionString and CFBundleVersion, i.e. if we add below line in the project header, Code: Copy #version 1.0.0 usually we will see "1.0.0(Build 1.0.0)" when the ipa files will be parsed by some 3rd party application. I would think it is because b4i will set both CFBundleShortVersionString and CFBundleVersion to "1.0.0", but actually sometimes we want to use some other numbers such as 1234 for the build number(say CFBundleVersion). For example, we want it to be displayed as "1.0.0(Build 1234)". Is there any way to set it in b4i and then the CFBundleVersion could be customized (instead of being the same as CFBundleShortVersionString)?
It seems that the #version project attribute will set both CFBundleShortVersionString and CFBundleVersion, i.e. if we add below line in the project header, Code: Copy #version 1.0.0 usually we will see "1.0.0(Build 1.0.0)" when the ipa files will be parsed by some 3rd party application. I would think it is because b4i will set both CFBundleShortVersionString and CFBundleVersion to "1.0.0", but actually sometimes we want to use some other numbers such as 1234 for the build number(say CFBundleVersion). For example, we want it to be displayed as "1.0.0(Build 1234)". Is there any way to set it in b4i and then the CFBundleVersion could be customized (instead of being the same as CFBundleShortVersionString)?
JanPRO Well-Known Member Licensed User Longtime User Jun 22, 2016 #2 https://www.b4x.com/android/forum/threads/confusion-between-version-and-build.64534/#post-408910 Upvote 0
Ju Yang Active Member Licensed User Longtime User Jun 22, 2016 #3 JanPRO said: https://www.b4x.com/android/forum/threads/confusion-between-version-and-build.64534/#post-408910 Click to expand... Thanks! I will try this. BTW, do you know how to get the CFBundleVersion by code? Upvote 0
JanPRO said: https://www.b4x.com/android/forum/threads/confusion-between-version-and-build.64534/#post-408910 Click to expand... Thanks! I will try this. BTW, do you know how to get the CFBundleVersion by code?
JanPRO Well-Known Member Licensed User Longtime User Jun 22, 2016 #4 Code: Copy Sub GetBundleVersion As String Dim NaObj As NativeObject Return NaObj.Initialize("NSBundle").RunMethod("mainBundle",Null).RunMethod("infoDictionary",Null).RunMethod("objectForKey:",Array("CFBundleVersion")).AsString End Sub Upvote 0
Code: Copy Sub GetBundleVersion As String Dim NaObj As NativeObject Return NaObj.Initialize("NSBundle").RunMethod("mainBundle",Null).RunMethod("infoDictionary",Null).RunMethod("objectForKey:",Array("CFBundleVersion")).AsString End Sub