diff options
author | jan Iversen <jani@libreoffice.org> | 2018-05-10 17:55:09 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-05-10 20:40:45 -0700 |
commit | ff15d48f69cd7caf2c0fe635d4614b7758c0b64d (patch) | |
tree | 00bf1b6778cd4fc3488779f67e6cbb2314e6c9b2 | |
parent | a1e9cce50a0017ee6c3389a971c2bb9188935861 (diff) | |
download | subsurface-ff15d48f69cd7caf2c0fe635d4614b7758c0b64d.tar.gz |
iOS: Allow change of bundle identifier
This patch allows users to set a bundle identifier,
without opening Xcode (set as env. variable).
If the env. variable is not set (like e.g. on Travis) it defaults
to org....
Signed-off-by: Jan Iversen <jani@apache.org>
-rw-r--r-- | packaging/ios/README | 7 | ||||
-rwxr-xr-x | packaging/ios/build.sh | 17 |
2 files changed, 14 insertions, 10 deletions
diff --git a/packaging/ios/README b/packaging/ios/README index d12729d37..63a042e11 100644 --- a/packaging/ios/README +++ b/packaging/ios/README @@ -13,7 +13,8 @@ Follow the instruction in: and then continue here: 1) cd <repo>/packaging/ios -2) ./build.sh +2) export IOS_BUNDLE_PRODUCT_IDENTIFIER="<your apple id>.subsurface-divelog.subsurface-mobile" +3) ./build.sh note: this builds all dependencies and is only needed first time it currently build for armv7 arm64 and x86_64 (simulator) @@ -42,3 +43,7 @@ the hood) gets updated. Otherwise you will continue to see the old version number, even though the sources have been recompiled which can be very confusing. +Do a simply version update by running: +build.sh version +and then rebuilding in Qt Creator + diff --git a/packaging/ios/build.sh b/packaging/ios/build.sh index bab459fcd..bef6904a2 100755 --- a/packaging/ios/build.sh +++ b/packaging/ios/build.sh @@ -4,7 +4,7 @@ set -x set -e -PRODUCT_BUNDLE_IDENTIFIER="\$(PRODUCT_BUNDLE_IDENTIFIER)" +doVersion=$1 DEBUGRELEASE="Release" DRCONFIG="release" ARCHS="armv7 arm64 x86_64" @@ -14,12 +14,6 @@ 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" @@ -86,10 +80,15 @@ echo "#define GIT_VERSION_STRING \"$GITVERSION\"" > subsurface-mobile/ssrf-versi echo "#define CANONICAL_VERSION_STRING \"$CANONICALVERSION\"" >> subsurface-mobile/ssrf-version.h echo "#define MOBILE_VERSION_STRING \"$MOBILEVERSION\"" >> subsurface-mobile/ssrf-version.h +BUNDLE=org.subsurface-divelog.subsurface-mobile +if [ "${IOS_BUNDLE_PRODUCT_IDENTIFIER}" != "" ] ; then + BUNDLE=${IOS_BUNDLE_PRODUCT_IDENTIFIER} +fi + # create Info.plist with the correct versions -cat Info.plist.in | sed "s/@MOBILE_VERSION@/$MOBILEVERSION/;s/@CANONICAL_VERSION@/$CANONICALVERSION/;s/@PRODUCT_BUNDLE_IDENTIFIER@/$PRODUCT_BUNDLE_IDENTIFIER/" > Info.plist +cat Info.plist.in | sed "s/@MOBILE_VERSION@/$MOBILEVERSION/;s/@CANONICAL_VERSION@/$CANONICALVERSION/;s/@PRODUCT_BUNDLE_IDENTIFIER@/$BUNDLE/" > Info.plist -if [ "$1" = "version" ] ; then +if [ "$doVersion" = "version" ] ; then exit 0 fi |