Let's say you need to build 50 iOS apps that are the same except for the name. Can the name (bundle display name) and bundleid be changed after the app is built so that you can prebuild them ahead of time without knowing the name at build time?
-
What name do want to change? The name shown under the icon on the user's home screen? The name shown in the App Store/iTunes Connect? Some other name? – rmaddy Feb 07 '16 at 22:26
-
1Built apps are signed. If you need to change the name, you need to do so before the signing phase. This includes the localized springboard name you can provide in the `info.plist` – SwiftArchitect Feb 07 '16 at 22:26
-
The name under the icon. The apps wouldn't have been submitted to the App Store at this point. – Mr. Flibble Feb 07 '16 at 22:27
-
@SwiftArchitect awesome. So I can build the app and make any changes I like to the plists and then sign after, which is a relatively fast operation. – Mr. Flibble Feb 07 '16 at 22:29
3 Answers
Change the bundle ID (in the info.plist file) and it's going to be recognized as a different app by iOS and the App Store.
And change the display name to change the displayed name of the app.
You can read more about the bundle ID here: https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/ConfiguringYourApp/ConfiguringYourApp.html
Though if the app has special entitlements that use the bundle ID (such as iCloud or push notifications), you could run into issues.

- 1,058
- 1
- 11
- 25
-
*it's going to be recognized as a different app by iOS and the App Store*: you can only push one app with a given App ID – SwiftArchitect Feb 07 '16 at 23:04
During: yes. After: no.
Add a build phase of type New Run Script Phase to your target.
You can easily insert values into the XML file (you need to insert this entry before the last </dict></plist>
:
<key>CFBundleDisplayName</key>
<string>SO-35259889</string>
or, using PlistBuddy:
DISPLAY_NAME="SO-35259889"
/usr/libexec/PlistBuddy -c "Set :CFBundleDisplayName $DISPLAY_NAME" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
The question then becomes "Can I change the info.plist values during build phase?", to which the answers can be found here.

- 1
- 1

- 47,376
- 28
- 140
- 179
So, in theory, you could change the display name and have 50 of the same app on different git branches with different display names.
Here is how that would be done: https://stackoverflow.com/a/239006
That said, Apple would reject duplicate submissions to the App Store. Additionally, your device wouldn't consider them as different apps.

- 1
- 1

- 13
- 2
-
-
-
I'd need to change the bundle ID also. The apps could look and behave completely differently based on some config pulled down at runtime. – Mr. Flibble Feb 07 '16 at 22:37