You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2014/11/01 00:43:47 UTC

[27/50] ios commit: CB-7818 - CLI builds ignore Distribution certificates (closes #114)

CB-7818 - CLI builds ignore Distribution certificates (closes #114)

Fixed build / xcconfig defaults for CI environments. "cordova build -…
…-device --release" now builds using the "iPhone Distribution"-type profile, as opposed to the default "cordova build --device", using the default "iPhone Developer"-type profile.

Re-added build.xcconfig as shared .xcconfig for legacy compatibility. Implemented Configuration-level .xcconfig selection via inheritance. Added ASF comment section, short documentation.

Signed-off-by: Shazron Abdullah <sh...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/c0db6382
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/c0db6382
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/c0db6382

Branch: refs/heads/wkwebview
Commit: c0db6382af2e2570be139d584f553ca5c046a941
Parents: 7cd2e2b
Author: Sidney Bofah <si...@googlemail.com>
Authored: Sat Oct 18 03:38:49 2014 +0200
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Mon Oct 20 12:32:45 2014 -0700

----------------------------------------------------------------------
 bin/templates/scripts/cordova/build             |  2 +-
 .../scripts/cordova/build-debug.xcconfig        | 24 +++++++++++++++
 .../scripts/cordova/build-release.xcconfig      | 27 +++++++++++++++++
 bin/templates/scripts/cordova/build.xcconfig    | 32 +++++++++++++++++---
 4 files changed, 80 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/c0db6382/bin/templates/scripts/cordova/build
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/build b/bin/templates/scripts/cordova/build
index 124ce81..9df2be0 100755
--- a/bin/templates/scripts/cordova/build
+++ b/bin/templates/scripts/cordova/build
@@ -51,6 +51,6 @@ done
 if (( $EMULATOR )); then
     exec xcodebuild -project "$PROJECT_NAME.xcodeproj" -arch i386 -target "$PROJECT_NAME" -configuration $CONFIGURATION -sdk iphonesimulator build VALID_ARCHS="i386" CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build/emulator" SHARED_PRECOMPS_DIR="$PROJECT_PATH/build/sharedpch"
 else
-    exec xcodebuild -xcconfig "$CORDOVA_PATH/build.xcconfig" -project "$PROJECT_NAME.xcodeproj" ARCHS="armv7 armv7s arm64" -target "$PROJECT_NAME" -configuration $CONFIGURATION -sdk iphoneos build VALID_ARCHS="armv7 armv7s arm64" CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build/device" SHARED_PRECOMPS_DIR="$PROJECT_PATH/build/sharedpch"
+    exec xcodebuild -xcconfig "$CORDOVA_PATH/build$(echo -$CONFIGURATION | tr '[:upper:]' '[:lower:]').xcconfig" -project "$PROJECT_NAME.xcodeproj" ARCHS="armv7 armv7s arm64" -target "$PROJECT_NAME" -configuration $CONFIGURATION -sdk iphoneos build VALID_ARCHS="armv7 armv7s arm64" CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build/device" SHARED_PRECOMPS_DIR="$PROJECT_PATH/build/sharedpch"
 fi
 

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/c0db6382/bin/templates/scripts/cordova/build-debug.xcconfig
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/build-debug.xcconfig b/bin/templates/scripts/cordova/build-debug.xcconfig
new file mode 100644
index 0000000..85748ea
--- /dev/null
+++ b/bin/templates/scripts/cordova/build-debug.xcconfig
@@ -0,0 +1,24 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+//  KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+//
+// XCode Build settings for "Debug" Build Configuration.
+//
+
+#include "build.xcconfig"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/c0db6382/bin/templates/scripts/cordova/build-release.xcconfig
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/build-release.xcconfig b/bin/templates/scripts/cordova/build-release.xcconfig
new file mode 100644
index 0000000..6169afd
--- /dev/null
+++ b/bin/templates/scripts/cordova/build-release.xcconfig
@@ -0,0 +1,27 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+//  KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+//
+// XCode Build settings for "Release" Build Configuration.
+//
+
+#include "build.xcconfig"
+
+CODE_SIGN_IDENTITY = iPhone Distribution
+CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Distribution
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/c0db6382/bin/templates/scripts/cordova/build.xcconfig
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/build.xcconfig b/bin/templates/scripts/cordova/build.xcconfig
index b2febfe..99231ea 100644
--- a/bin/templates/scripts/cordova/build.xcconfig
+++ b/bin/templates/scripts/cordova/build.xcconfig
@@ -1,5 +1,29 @@
-// to list all installed iOS identities, run:
-//     security find-identity |  sed -n 's/.*\("[^"]*"\).*/\1/p' | grep 'iPhone'
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+//  KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
 
-// generic 'iPhone Developer' (no quotes) will match the right Identity with the right Provisioning Profile plus Certificate, based on the app bundle id
-CODE_SIGN_IDENTITY = iPhone Developer
\ No newline at end of file
+//
+// XCode build settings shared by all Build Configurations.
+// Settings are overridden by configuration-level .xcconfig file (build-release/build-debug).
+//
+
+
+// Type of signing identity used for codesigning, resolves to first match of given type.
+// "iPhone Developer": Development builds (default, local only; iOS Development certificate) or "iPhone Distribution": Distribution builds (Adhoc/In-House/AppStore; iOS Distribution certificate)
+CODE_SIGN_IDENTITY = iPhone Developer
+CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org