mirror of
https://github.com/appium/appium.git
synced 2026-01-24 19:28:59 -06:00
make 7.0 the default ios version
and add docs on how to work with multiple versions
This commit is contained in:
@@ -2,6 +2,8 @@ assets/
|
||||
submodules/
|
||||
publish.sh
|
||||
reset.sh
|
||||
reset.bat
|
||||
test.sh
|
||||
sample-code/
|
||||
test/
|
||||
android/bootstrap/bin/
|
||||
|
||||
@@ -128,7 +128,7 @@ you can pass in):
|
||||
Hacking with Appium (iOS)
|
||||
--------------
|
||||
|
||||
(First, have a look at [setting up your system for Appium iOS support](docs/running-on-osx.md#ios).)
|
||||
(First, have a look at [setting up your system for Appium iOS support](docs/running-on-osx.md#ios). Pay particular attention to the [section on running multiple versions of Xcode](docs/running-on-osx.md#ios_multiple), as Appium tests require this.)
|
||||
|
||||
To avoid a security dialog that may appear when launching your iOS apps you'll
|
||||
have to modify your `/etc/authorization` file in one of two ways:
|
||||
|
||||
@@ -359,7 +359,7 @@ Appium.prototype.configureDownloadedApp = function(appPath, origin, cb) {
|
||||
|
||||
Appium.prototype.configureSafari = function(desiredCaps, cb) {
|
||||
this.desiredCapabilities.safari = true;
|
||||
var safariVer = "6.0";
|
||||
var safariVer = "6.1";
|
||||
var usingDefaultVer = true;
|
||||
if (typeof desiredCaps.version !== "undefined") {
|
||||
safariVer = desiredCaps.version;
|
||||
|
||||
@@ -137,11 +137,11 @@ exports.checkBuiltInApp = function(appName, version, cb) {
|
||||
var appPath = path.resolve(appDir, appName + ".app");
|
||||
fs.stat(appPath, function(err, s) {
|
||||
if (err) {
|
||||
cb(err, appPath);
|
||||
cb(err);
|
||||
} else if (!s.isDirectory()) {
|
||||
cb("App package was not a directory", appPath);
|
||||
} else {
|
||||
logger.info("Got app, trying to copy to tmp dir");
|
||||
logger.info("Got app, trying to copy " + appPath + " to tmp dir");
|
||||
exports.copyBuiltInApp(appPath, appName, cb);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -7,14 +7,42 @@ Appium on OS X supports iOS and Android testing.
|
||||
--------
|
||||
|
||||
* Appium requires Mac OS X 10.7, but 10.8 is recommended.
|
||||
* Make sure you have XCode and the iOS SDK(s) installed.
|
||||
* You might also want to install additional versions of the iOS SDKs if you
|
||||
want to test on older or multiple versions.
|
||||
* Make sure you have XCode and the iOS SDK(s) installed. (Appium currently
|
||||
supports Xcode 4.6.3 for iOS up to 6.1 and Xcode 5 for iOS 7.0. Note that
|
||||
testing against iOS versions below 7.0 using Xcode 5 is not recommended. See
|
||||
the next section for more information.)
|
||||
* You need to authorize use of the iOS Simulator. If you are running Appium
|
||||
from NPM, you'll do this by running `sudo authorize_ios` (`authorize_ios` is
|
||||
a binary made available by the Appium npm package). If you're running Appium
|
||||
from source, simply run `sudo grunt authorize` to do the same thing.
|
||||
|
||||
<a name="ios_multiple"></a>Testing against multiple iOS SDKs
|
||||
-----------
|
||||
|
||||
Apple's `instruments` binary, which Appium uses to launch the iOS simulator, by
|
||||
default uses the currently-selected Xcode, and the highest iOS SDK installed
|
||||
with that version of Xcode. This means that if you want to test iOS 6.1, but
|
||||
have iOS 7.0 installed, Appium will be forced to use the 7.0 Simulator
|
||||
regardless. The only way around this is to have multiple copies of Xcode
|
||||
installed with different sets of SDKs. You can then switch to the particular
|
||||
copy of Xcode that has the versions you want to test with before starting
|
||||
Appium.
|
||||
|
||||
In addition, it's been discovered that testing against iOS 6.1 with Xcode
|
||||
5 causes increased slowness and instability, so it's recommended that for
|
||||
testing against iOs 6.1 and below we use Xcode 4.6.3, and for testing against
|
||||
iOS 7.0 we use Xcode 5.We can do this by, say, having Xcode 5 at
|
||||
`/Applications/Xcode.app`, and Xcode 4.6 and `/Applications/Xcode-4.6.app`.
|
||||
Then we use the following command:
|
||||
|
||||
sudo xcode-select -switch /Applications/Xcode-4.6.app
|
||||
|
||||
To prepare for iOS 6.1 testing. We run it again with a different Xcode:
|
||||
|
||||
sudo xcode-select -switch /Applications/Xcode.app
|
||||
|
||||
To go back to iOS 7.0 testing.
|
||||
|
||||
<a name="android"></a>System setup (Android)
|
||||
--------
|
||||
|
||||
|
||||
@@ -262,7 +262,7 @@ module.exports.build = function(appRoot, cb, sdk) {
|
||||
|
||||
module.exports.buildApp = function(appDir, cb, sdk) {
|
||||
if(typeof sdk === "undefined") {
|
||||
sdk = "iphonesimulator6.1";
|
||||
sdk = "iphonesimulator7.0";
|
||||
}
|
||||
var appRoot = path.resolve(__dirname, 'sample-code/apps/', appDir);
|
||||
module.exports.build(appRoot, function(err) {
|
||||
|
||||
2
reset.sh
2
reset.sh
@@ -10,7 +10,7 @@ should_reset_ios=false
|
||||
should_reset_selendroid=false
|
||||
should_reset_gappium=false
|
||||
include_dev=false
|
||||
ios_sdk_ver="6.1"
|
||||
ios_sdk_ver="7.0"
|
||||
appium_home=$(pwd)
|
||||
reset_successful=false
|
||||
apidemos_reset=false
|
||||
|
||||
@@ -9,7 +9,7 @@ var wd = require('wd')
|
||||
, should = require("should")
|
||||
, defaultHost = '127.0.0.1'
|
||||
, defaultPort = process.env.APPIUM_PORT || 4723
|
||||
, defaultIosVer = '6.1'
|
||||
, defaultIosVer = '7.0'
|
||||
, defaultCaps = {
|
||||
browserName: ''
|
||||
, device: 'iPhone Simulator'
|
||||
|
||||
Reference in New Issue
Block a user