[TIMOB-7931] Custom Info.plist files without CFBundleShortVersionString throw an exception #1623
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Code change grabs the exception generated in TiApp.py if CFBundleShortVersionString is missing from a custom Info.plist and hands the user a friendly reminder via a console [WARN] that their custom Info.plist file needs to be updated.
While the original [TIMOB-7931] specifically addressed KitchenSink build problems, this code will help move users with projects built against older TiMobile sdks towards the current Apple submission requirements.
To test, use the current kitchen sink project.
Build using current code base and an exception is thrown in tiapp.py because the CFBundleShortVersion key does not exist in the custom Info.plist file from the {project} directory.
Add the key as listed in [TIMOB-7931] to the Info.plist and the build completes as expected.
Note: By grabbing and handling the exception, this code allows the build to continue. We could force the key to be added to the generated Info.plist but I feel that the user needs to update their original Info.plist without the build tools interference.