cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject [17/50] ios commit: CB-7729 - Support ios-sim 3.0 (Xcode 6) and new targets (iPhone 6/6+) (closes #107)
Date Fri, 31 Oct 2014 23:43:37 GMT
CB-7729 - Support ios-sim 3.0 (Xcode 6) and new targets (iPhone 6/6+) (closes #107)

Signed-off-by: Shazron Abdullah <shazron@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/307a00b3
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/307a00b3
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/307a00b3

Branch: refs/heads/wkwebview
Commit: 307a00b310955c3a7e5147b50c336b9389348b40
Parents: d72a48a
Author: aharbick@aharbick.com <aharbick@aharbick.com>
Authored: Thu Sep 25 15:09:22 2014 -0400
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Fri Oct 17 15:25:03 2014 -0700

----------------------------------------------------------------------
 bin/templates/scripts/cordova/emulate           |  4 +-
 .../scripts/cordova/lib/install-emulator        | 50 +++++--------------
 bin/templates/scripts/cordova/run               | 52 ++++++--------------
 3 files changed, 30 insertions(+), 76 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/307a00b3/bin/templates/scripts/cordova/emulate
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/emulate b/bin/templates/scripts/cordova/emulate
index 241cbb6..638e650 100755
--- a/bin/templates/scripts/cordova/emulate
+++ b/bin/templates/scripts/cordova/emulate
@@ -29,7 +29,7 @@ source "$CORDOVA_PATH/check_reqs"
 
 APP_PATH=${1:-$PROJECT_PATH/build/emulator/$(xcodebuild -project "$PROJECT_PATH/$PROJECT_NAME.xcodeproj"
-arch i386 -target "$PROJECT_NAME" -configuration Debug -sdk $SDK -showBuildSettings | grep
FULL_PRODUCT_NAME | awk -F ' = ' '{print $2}')}
 
-DEVICE_FAMILY=${2:-${DEVICE_FAMILY:-iphone}}
+TARGET=${2:-${TARGET:-iPhone-6}}
 
 IOS_SIM_MIN_VERSION="1.7"
 IOS_SIM_LOCATION=$(which ios-sim)
@@ -56,4 +56,4 @@ if [ ! -d "$APP_PATH" ]; then
 fi
 
 # launch using ios-sim
-ios-sim launch "$APP_PATH" --family "$DEVICE_FAMILY" --stderr "$CORDOVA_PATH/console.log"
--stdout "$CORDOVA_PATH/console.log" --exit
+ios-sim launch "$APP_PATH" --devicetypeid "com.apple.CoreSimulator.SimDeviceType.$TARGET"
--stderr "$CORDOVA_PATH/console.log" --stdout "$CORDOVA_PATH/console.log" --exit

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/307a00b3/bin/templates/scripts/cordova/lib/install-emulator
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/lib/install-emulator b/bin/templates/scripts/cordova/lib/install-emulator
index ae2c47a..e916660 100755
--- a/bin/templates/scripts/cordova/lib/install-emulator
+++ b/bin/templates/scripts/cordova/lib/install-emulator
@@ -17,16 +17,20 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-# Valid values for "--target" (case insensitive):
-#     "iPhone (Retina 3.5-inch)" (default)
-#     "iPhone (Retina 4-inch)"
-#     "iPhone"
-#     "iPad"
-#     "iPad (Retina)"
+# Valid values for "--target" (case sensitive):
+#   iPhone-4s
+#   iPhone-5
+#   iPhone-5s
+#   iPhone-6-Plus
+#   iPhone-6
+#   iPad-2
+#   iPad-Retina
+#   iPad-Air
+#   Resizable-iPhone
+#   Resizable-iPad
 
 OPTION_RESULT=()
-TARGET="iPhone (Retina 3.5-inch)"
-TARGET_FLAG='--family iphone --retina'
+TARGET="iPhone-6"
 
 # separates "key=value", sets an array with 0th index as key, 1st index as value
 _parseOption() 
@@ -60,32 +64,6 @@ _parseArgs()
 
 _parseArgs "$@"
 
-# lowercase the target string
-TARGET_LC=`echo $TARGET | tr '[:upper:]' '[:lower:]'` 
-
-# remember the comparison is lowercase
-case "$TARGET_LC" in
-  	"iphone (retina 3.5-inch)")
-    TARGET_FLAG="--family iphone --retina"
-    ;;
-    "iphone (retina 4-inch)")
-    TARGET_FLAG="--family iphone --retina --tall"
-    ;;
-    # --64bit not supportted by ios-sim yet
-    #"iphone retina (4-inch 64-bit)")
-    #TARGET_FLAG="--family iphone --retina --tall --64bit"
-    #;;
-    "iphone")
-    TARGET_FLAG="--family iphone"
-    ;;
-    "ipad")
-    TARGET_FLAG="--family ipad"
-    ;;
-    "ipad (retina)")
-    TARGET_FLAG="--family ipad --retina"
-    ;;
-esac
-
 LIB_PATH=$( cd "$( dirname "$0" )" && pwd -P)
 CORDOVA_PATH="$(dirname "$LIB_PATH")"
 PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
@@ -121,6 +99,4 @@ if [[ "$IOS_SIM_VERSION" < "$IOS_SIM_MIN_VERSION" ]]; then
 fi
 
 # launch using ios-sim
-ios-sim launch "$SIMULATOR_APP_PATH" --stderr "$CORDOVA_PATH/console.log" --stdout "$CORDOVA_PATH/console.log"
$TARGET_FLAG --exit
-
-
+ios-sim launch "$SIMULATOR_APP_PATH" --stderr "$CORDOVA_PATH/console.log" --stdout "$CORDOVA_PATH/console.log"
--devicetypeid $TARGET --exit

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/307a00b3/bin/templates/scripts/cordova/run
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/run b/bin/templates/scripts/cordova/run
index e497aac..b4d45d0 100755
--- a/bin/templates/scripts/cordova/run
+++ b/bin/templates/scripts/cordova/run
@@ -17,16 +17,22 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-# Valid values for "--target" (case insensitive):
-#     "iPhone (Retina 3.5-inch)" (default)
-#     "iPhone (Retina 4-inch)"
-#     "iPhone"
-#     "iPad"
-#     "iPad (Retina)"
+# Valid values for "--target" (case sensitive):
+#   iPhone-4s
+#   iPhone-5
+#   iPhone-5s
+#   iPhone-6-Plus
+#   iPhone-6
+#   iPad-2
+#   iPad-Retina
+#   iPad-Air
+#   Resizable-iPhone
+#   Resizable-iPad
+
 
 OPTION_RESULT=()
-TARGET="iPhone (Retina 3.5-inch)"
-TARGET_FLAG='--family iphone --retina'
+TARGET="iPhone-6"
+
 # multi-device flow default
 USE_DEVICE=true
 USE_SIMULATOR=false
@@ -71,34 +77,6 @@ _parseArgs()
 
 _parseArgs "$@"
 
-# "iPhone (Retina 3.5-inch)" -> --family iphone --retina
-# "iPhone (Retina 4-inch)" -> --family iphone --retina --tall
-# "iPhone" -> --family iphone
-# "iPad" -> --family ipad
-# "iPad (Retina)" -> --family ipad --retina
-
-# lowercase the target string
-TARGET_LC=`echo $TARGET | tr '[:upper:]' '[:lower:]'`
-
-# remember the comparison is lowercase
-case "$TARGET_LC" in
-  "iphone (retina 3.5-inch)")
-    TARGET_FLAG="--family iphone --retina"
-    ;;
-    "iphone (retina 4-inch)")
-    TARGET_FLAG="--family iphone --retina --tall"
-    ;;
-    "iphone")
-    TARGET_FLAG="--family iphone"
-    ;;
-    "ipad")
-    TARGET_FLAG="--family ipad"
-    ;;
-    "ipad (retina)")
-    TARGET_FLAG="--family ipad --retina"
-    ;;
-esac
-
 CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P)
 PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
 XCODEPROJ=$( ls "$PROJECT_PATH" | grep .xcodeproj  )
@@ -154,6 +132,6 @@ if "$USE_SIMULATOR"; then
     
     # launch using ios-sim
     "$CORDOVA_PATH/build" --emulator || exit $?
-    ios-sim launch "$SIMULATOR_APP_PATH" --stderr "$CORDOVA_PATH/console.log" --stdout "$CORDOVA_PATH/console.log"
$TARGET_FLAG --exit
+    ios-sim launch "$SIMULATOR_APP_PATH" --stderr "$CORDOVA_PATH/console.log" --stdout "$CORDOVA_PATH/console.log"
--devicetypeid com.apple.CoreSimulator.SimDeviceType.$TARGET --exit
 fi
 


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


Mime
View raw message