From b15578ac6076f852a613c437bae8096aa8f9f1b3 Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Mon, 13 Jan 2014 15:22:11 +0100 Subject: [PATCH] iOS keyfile means provisioning profile --- pkgs/development/mobile/titaniumenv/build-app.nix | 12 ++++++------ .../titaniumenv/examples/kitchensink/default.nix | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/development/mobile/titaniumenv/build-app.nix b/pkgs/development/mobile/titaniumenv/build-app.nix index 4dbf6c5e82ef..5dd114546610 100644 --- a/pkgs/development/mobile/titaniumenv/build-app.nix +++ b/pkgs/development/mobile/titaniumenv/build-app.nix @@ -1,11 +1,11 @@ {stdenv, androidsdk, titaniumsdk, xcodewrapper}: { appId, name, appName ? null, src, target, androidPlatformVersions ? [ "8" ], androidAbiVersions ? [ "armeabi" "armeabi-v7a" ] , release ? false, androidKeyStore ? null, androidKeyAlias ? null, androidKeyStorePassword ? null -, iosKeyFile ? null, iosCertificateName ? null, iosCertificate ? null, iosCertificatePassword ? null, iosDistribute ? false +, iosMobileProvisioningProfile ? null, iosCertificateName ? null, iosCertificate ? null, iosCertificatePassword ? null, iosDistribute ? false }: assert (release && target == "android") -> androidKeyStore != null && androidKeyAlias != null && androidKeyStorePassword != null; -assert (release && target == "iphone") -> iosKeyFile != null && iosCertificateName != null && iosCertificate != null && iosCertificatePassword != null; +assert (release && target == "iphone") -> iosMobileProvisioningProfile != null && iosCertificateName != null && iosCertificate != null && iosCertificatePassword != null; let androidsdkComposition = androidsdk { @@ -46,14 +46,14 @@ stdenv.mkDerivation { security unlock-keychain -p "" $keychainName security import ${iosCertificate} -k $keychainName -P "${iosCertificatePassword}" -A - provisioningId=$(grep UUID -A1 -a ${iosKeyFile} | grep -o "[-A-Z0-9]\{36\}") + provisioningId=$(grep UUID -A1 -a ${iosMobileProvisioningProfile} | grep -o "[-A-Z0-9]\{36\}") # Ensure that the requested provisioning profile can be found if [ ! -f "$HOME/Library/MobileDevice/Provisioning Profiles/$provisioningId.mobileprovision" ] then mkdir -p "$HOME/Library/MobileDevice/Provisioning Profiles" - cp ${iosKeyFile} "$HOME/Library/MobileDevice/Provisioning Profiles/$provisioningId.mobileprovision" + cp ${iosMobileProvisioningProfile} "$HOME/Library/MobileDevice/Provisioning Profiles/$provisioningId.mobileprovision" fi ${titaniumsdk}/mobilesdk/*/*/iphone/builder.py distribute 6.0 $(pwd) ${appId} "${_appName}" "$provisioningId" "${iosCertificateName}" $out universal "$HOME/Library/Keychains/$keychainName" @@ -74,14 +74,14 @@ stdenv.mkDerivation { security unlock-keychain -p "" $keychainName security import ${iosCertificate} -k $keychainName -P "${iosCertificatePassword}" -A - provisioningId=$(grep UUID -A1 -a ${iosKeyFile} | grep -o "[-A-Z0-9]\{36\}") + provisioningId=$(grep UUID -A1 -a ${iosMobileProvisioningProfile} | grep -o "[-A-Z0-9]\{36\}") # Ensure that the requested provisioning profile can be found if [ ! -f "$HOME/Library/MobileDevice/Provisioning Profiles/$provisioningId.mobileprovision" ] then mkdir -p "$HOME/Library/MobileDevice/Provisioning Profiles" - cp ${iosKeyFile} "$HOME/Library/MobileDevice/Provisioning Profiles/$provisioningId.mobileprovision" + cp ${iosMobileProvisioningProfile} "$HOME/Library/MobileDevice/Provisioning Profiles/$provisioningId.mobileprovision" fi ${titaniumsdk}/mobilesdk/*/*/iphone/builder.py adhoc 6.0 $(pwd) ${appId} "${_appName}" "$provisioningId" "${iosCertificateName}" universal "$HOME/Library/Keychains/$keychainName" diff --git a/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix b/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix index 4ddfce968a89..17834c7fe585 100644 --- a/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix +++ b/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix @@ -18,7 +18,7 @@ titaniumenv.buildApp { androidKeyStorePassword = "foobar";*/ /*release = true; - iosKeyFile = /Users/sander/Downloads/profile.mobileprovision; + iosMobileProvisioningProfile = /Users/sander/Downloads/profile.mobileprovision; iosCertificateName = "My Company"; iosCertificate = /Users/sander/Downloads/c.p12; iosCertificatePassword = "";*/