diff options
author | Murillo Bernardes <mfbernardes@gmail.com> | 2018-05-07 20:46:36 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-05-10 08:19:33 -0700 |
commit | 7d6a48b59fc4271bd7293b867f32fe36e876cb56 (patch) | |
tree | 8c0870984cc7e95cad7ea4ab8c4536d0349a2061 /packaging | |
parent | 161e5e94fceb8bf70ecc2861ca1e9e92b1bacf68 (diff) | |
download | subsurface-7d6a48b59fc4271bd7293b867f32fe36e876cb56.tar.gz |
iOS: use recommended variable for bundle ID
We used to hard-code the bundle ID which meant that developers always had to
manually override the bundle ID in order to be able to sign the iOS app for
local testing. With this change, the official builds will continue to work
without manually opening the project in Xcode, yet other developers will use
the Apple-recommended format in order to set their own bundle ID.
This is based on a suggestion by Murillo Bernardes.
See #1246
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging')
-rw-r--r-- | packaging/ios/Info.plist.in | 2 | ||||
-rwxr-xr-x | packaging/ios/build.sh | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/packaging/ios/Info.plist.in b/packaging/ios/Info.plist.in index 8f1afc1c8..dabb85dfb 100644 --- a/packaging/ios/Info.plist.in +++ b/packaging/ios/Info.plist.in @@ -11,7 +11,7 @@ <key>CFBundleIconName</key> <string>AppIcon</string> <key>CFBundleIdentifier</key> - <string>org.subsurface-divelog.subsurface-mobile</string> + <string>@PRODUCT_BUNDLE_IDENTIFIER@</string> <key>CFBundleName</key> <string>Subsurface-mobile</string> <key>CFBundlePackageType</key> diff --git a/packaging/ios/build.sh b/packaging/ios/build.sh index 97dc02889..bab459fcd 100755 --- a/packaging/ios/build.sh +++ b/packaging/ios/build.sh @@ -4,6 +4,7 @@ set -x set -e +PRODUCT_BUNDLE_IDENTIFIER="\$(PRODUCT_BUNDLE_IDENTIFIER)" DEBUGRELEASE="Release" DRCONFIG="release" ARCHS="armv7 arm64 x86_64" @@ -13,6 +14,12 @@ TARGET2="Device" while [[ $# -gt 0 ]] ; do arg="$1" case $arg in + -official) + # build an app identified as org.subsurface-divelog.subsurface-mobile + # without having to set this explicitly in Xcode (this way this works, + # e.g., in Travis) + PRODUCT_BUNDLE_IDENTIFIER="org.subsurface-divelog.subsurface-mobile" + ;; -debug) # build for debugging DEBUGRELEASE="Debug" @@ -80,7 +87,7 @@ echo "#define CANONICAL_VERSION_STRING \"$CANONICALVERSION\"" >> subsurface-mobi echo "#define MOBILE_VERSION_STRING \"$MOBILEVERSION\"" >> subsurface-mobile/ssrf-version.h # create Info.plist with the correct versions -cat Info.plist.in | sed "s/@MOBILE_VERSION@/$MOBILEVERSION/;s/@CANONICAL_VERSION@/$CANONICALVERSION/" > Info.plist +cat Info.plist.in | sed "s/@MOBILE_VERSION@/$MOBILEVERSION/;s/@CANONICAL_VERSION@/$CANONICALVERSION/;s/@PRODUCT_BUNDLE_IDENTIFIER@/$PRODUCT_BUNDLE_IDENTIFIER/" > Info.plist if [ "$1" = "version" ] ; then exit 0 |