[Fixed] Installing an IOS application gives a loop

When I start up an appium session to test an IOS application, the simulator starts up but it performs a loop when it tries to install the Application.

See the youtube video for the loop:

Youtube Loop Movie

Launching Appium with command: ‘/Applications/Appium.app/Contents/Resources/node/bin/node’ lib/server/main.js --pre-launch --platform-version “8.2” --platform-name “iOS” --app “/Users/macbookprobartvr/Documents/IosApps/362.ipa” --device-name “iPhone 5”

info: [debug] Starting Appium in pre-launch mode

info: Pre-launching app
info: [debug] Using local .ipa from command line: /Users/macbookprobartvr/Documents/IosApps/362.ipa
info: [debug] Copying local zip to tmp dir

info: [debug] /Users/macbookprobartvr/Documents/IosApps/362.ipa copied to /var/folders/c4/7pfrkz_15fs_y54l4dmvrx440000gn/T/115217-35777-szjrl3/appium-app.zip

info: [debug] Unzipping /var/folders/c4/7pfrkz_15fs_y54l4dmvrx440000gn/T/115217-35777-szjrl3/appium-app.zip

info: [debug] Testing zip archive: /var/folders/c4/7pfrkz_15fs_y54l4dmvrx440000gn/T/115217-35777-szjrl3/appium-app.zip

info: [debug] Zip archive tested clean

info: [debug] Unzip successful

info: [debug] Using locally extracted app: /var/folders/c4/7pfrkz_15fs_y54l4dmvrx440000gn/T/115217-35777-szjrl3/Payload/deredactie.app

info: [debug] Creating new appium session 646c16cd-1e0d-419e-a5b0-e668ec61fe36

info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode folder

info: [debug] Setting Xcode version

info: [debug] Setting iOS SDK Version

info: [debug] Getting sdk version from xcrun with a timeout

info: [debug] iOS SDK Version set to 8.2

info: [debug] Checking whether instruments supports our device string
info: [debug] Getting list of devices instruments supports
info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments

info: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“6.2”,“iOSSDKVersion”:“8.2”,“deviceName”:“iPhone 5”,“platformVersion”:“8.2”}

info: [debug] fixDevice is on
info: [debug] Final device string is: ‘iPhone 5 (8.2 Simulator)’
info: [debug] iOS sim UDID is 296E4D09-ABA6-41AE-94B2-6573FD5A3341
info: [debug] Detecting automation tracetemplate

info: [debug] Not auto-detecting udid, running on sim
info: [debug] Could not parse plist file (as binary) at /var/folders/c4/7pfrkz_15fs_y54l4dmvrx440000gn/T/115217-35777-szjrl3/Payload/deredactie.app/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
info: [debug] Could not parse plist file (as XML) at /var/folders/c4/7pfrkz_15fs_y54l4dmvrx440000gn/T/115217-35777-szjrl3/Payload/deredactie.app/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings assuming it doesn’t exist
info: [debug] Getting bundle ID from app
info: [debug] Could not parse plist file (as binary) at /var/folders/c4/7pfrkz_15fs_y54l4dmvrx440000gn/T/115217-35777-szjrl3/Payload/deredactie.app/Info.plist
info: Will try to parse the plist file as XML

info: [debug] Parsed app Info.plist (as XML)
info: [debug] Creating instruments
info: On some xcode 6 platforms, instruments-without-delay does not work. If you experience this, you will need to re-run appium with the --native-instruments-lib flag
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/macbookprobartvr/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {“nodePath”:“/Applications/Appium.app/Contents/Resources/node/bin/node”,“commandProxyClientPath”:“/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js”,“instrumentsSock”:“/tmp/instruments_sock”,“interKeyDelay”:null,“justLoopInfinitely”:false,“autoAcceptAlerts”:false,“autoDismissAlerts”:false,“sendKeyStrategy”:“oneByOne”}

info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!

info: [debug] Dynamic bootstrap path: /Users/macbookprobartvr/Library/Application Support/appium/bootstrap/bootstrap-516354d056bc7b25.js
info: [debug] Reusing dynamic bootstrap: /Users/macbookprobartvr/Library/Application Support/appium/bootstrap/bootstrap-516354d056bc7b25.js
info: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“6.2”,“iOSSDKVersion”:“8.2”,“deviceName”:“iPhone 5”,“platformVersion”:“8.2”}
info: [debug] fixDevice is on
info: [debug] Final device string is: ‘iPhone 5 (8.2 Simulator)’
info: [debug] We’re on iOS7.1+ so forcing defaultDevice on
info: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“6.2”,“iOSSDKVersion”:“8.2”,“deviceName”:“iPhone 5”,“platformVersion”:“8.2”}
info: [debug] fixDevice is on
info: [debug] Final device string is: ‘iPhone 5 (8.2 Simulator)’
info: [debug] Could not parse plist file (as binary) at /var/folders/c4/7pfrkz_15fs_y54l4dmvrx440000gn/T/115217-35777-szjrl3/Payload/deredactie.app/Info.plist
info: Will try to parse the plist file as XML

info: [debug] Parsed app Info.plist (as XML)

info: [debug] Wrote new app Info.plist with device type
info: [debug] Checking whether we need to set app preferences
info: [debug] Running ios sim reset flow
info: [debug] Killing the simulator process
info: [debug] Killall iOS Simulator
info: [debug] Killing any other simulator daemons

info: [debug] Cleaning sim data files

info: Executing: xcrun simctl erase 296E4D09-ABA6-41AE-94B2-6573FD5A3341 with timeout 2000

info: [debug] Cleaning app data files

warn: Applications directory /Users/macbookprobartvr/Library/Developer/CoreSimulator/Devices/296E4D09-ABA6-41AE-94B2-6573FD5A3341/data/Containers/Data/Application doesn’t exist. Have you run this simulator before?
warn: Applications directory /Users/macbookprobartvr/Library/Developer/CoreSimulator/Devices/296E4D09-ABA6-41AE-94B2-6573FD5A3341/data/Containers/Bundle/Application doesn’t exist. Have you run this simulator before?

info: Couldn’t find app directories to delete. Probably it’s not installed
info: [debug] Not setting locale
info: [debug] No iOS / app preferences to set
info: [debug] Starting iOS 8.* simulator log capture

info: [debug] Not pre-launching simulator
info: [debug] No device id or app, not installing to real device.
info: [debug] Starting command proxy.
info: [debug] Instruments socket server started at /tmp/instruments_sock
info: [debug] Starting instruments
info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: Launching instruments

info: [debug] Attempting to run app on iPhone 5 (8.2 Simulator)
info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w “iPhone 5 (8.2 Simulator)” /var/folders/c4/7pfrkz_15fs_y54l4dmvrx440000gn/T/115217-35777-szjrl3/Payload/deredactie.app -e UIASCRIPT “/Users/macbookprobartvr/Library/Application Support/appium/bootstrap/bootstrap-516354d056bc7b25.js” -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {“DYLD_INSERT_LIBRARIES”:“/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6/InstrumentsShim.dylib”,“LIB_PATH”:“/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6”}
info: [debug] And launch timeouts (in ms): {“global”:90000}

info: [debug] [INST] Waiting for device to boot…

1 Like

I’m having the same issue with Xcode 6.2, iOS 8.2, iPhone 6. My app stays in a loop when I click on the “Inspector” button. It works fine when I deploy via Xcode.

I too am having the same issue. Xcode 6.2, iOS 8.2, iPhone 6 simulator and iPhone 5s simulator.

Here’s a gif of mine https://i.imgflip.com/jj22v.gif

Update: Built the same app and run inside 8.1 simulator and the issue is resolved, so it appears to be isolated to 8.2 only

You must load the app from the Xcode project.
You can’t load the stand alone app file, that gives a loop on iOS 8.0, 8.1 and 8.2 and a crash on iOS 7.1.

Please check if it is helpful for you

  1. Better to use .app file
  2. .app file should be built in xcode for simulator that will be used for testing

Thnx Nbabil,

I got the same answer earlier, I changed the subject to Fixed.