Giter VIP home page Giter VIP logo

iosdevicemanager's Introduction

develop master versioning license contributing
Build Status Build Status Version License Contributing

iOSDeviceManager

A command line tool for managing applications on iOS simulators and physical iOS devices.

Requirements

  • Xcode >= 12; Xcode 13.* preferred.
  • ruby >= 2.3.1

Code Signing

Project maintainers must clone the codesign repo and install the certs and profiles. Talk to a maintainer for details.

Contributors will need to update the Xcode project with valid code signing properties.

Building

$ git clone --recursive [email protected]:calabash/iOSDeviceManager.git
$ make build

Usage

After building, you can run:

$ Products/iOSDeviceManager

to see usage information.

Testing

$ make unit-tests
$ make integration-tests
$ make cli-tests

# Or just execute 'tests' to run all
$ make tests

# Test against an alternative Xcode
$ DEVELOPER_DIR=/Xcode/9.4.1/Xcode-beta.app/Contents/Developer make tests

If you encounter build errors in the Xcode IDE, clean the DerivedData directory (deep clean - Command + Shift + Option + K). You are likely to see errors if you switch Xcode IDEs between runs.

If you have physical device attached and it is compatible with and available to the active Xcode (the Xcode IDE or the returned by xcode-select), integration tests will be performed against the device. If no device is found, the tests are skipped.

The Expecta, Specta, and OCMock frameworks are controlled by Carthage. We commit the frameworks to source control to avoid having to run carthage bootstrap on CI machines and locally. To update the frameworks, run carthage update and commit the Cartfile.resolved and frameworks changes to git.

idb

The idb's repository is expected to be located ../ relative to this directory. Checkout the branch you want to build and run: make frameworks to build and install.

See bin/make/frameworks.sh

iosdevicemanager's People

Contributors

alex-oreshko avatar alexeybudynkov avatar andreymaslennikov avatar coderdavidl avatar dmitry-shibanov avatar ilyabausovakvelon avatar jescriba avatar jmoody avatar joesss avatar owenniblock avatar polyakrecords avatar stoneman avatar tikhon-polyakov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iosdevicemanager's Issues

IDM: Application.arches provides incomplete information

Application#arches purports to provide the architectures of the application.

When application instances are created from artifacts on disk, the arches only describe 32 bit vs 64 bit - not arm vs {i386 | x86_64}.

When application instances are created from artifacts on the target device, the arches only describe the architecture of the target device.

This leads to the app-info command giving incorrect information.

Build succeeds but execution fails on kill-app

I managed to finally build using Xcode 10.3 however on execution the kill-app feature, I get this error. I don't find any folders by name /usr/lib/swift. I thought Swift was installed as part of Xcode.

all I want to do is kill an app on iOS. I am using the syntax
iOSDeviceManager com.apple.Maps -d <device_id>
and it doesn't work and I get Abort trap: 6

I have seen suggestions to embed swift libraries, fix run search paths etc but none of those changes helped.

2019-08-07 16:32:41.678 iOSDeviceManager[3117:168105] *** Assertion failure in -[FBDeviceControlFrameworkLoader_Essential loadPrivateFrameworksOrAbort], /Users/Ivan/Documents/repos/Xamarin.UITest/FBSimulatorControl/FBControlCore/Utility/FBControlCoreFrameworkLoader.m:84
2019-08-07 16:32:41.679 iOSDeviceManager[3117:168105] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Failed to load private frameworks for FBDeviceControl with error Error Domain=com.facebook.FBControlCore Code=0 "Could not load dylib /usr/lib/swift/libswiftCore.dylib with dlopen: dlopen(/usr/lib/swift/libswiftCore.dylib, 10): image not found" UserInfo={NSLocalizedDescription=Could not load dylib /usr/lib/swift/libswiftCore.dylib with dlopen: dlopen(/usr/lib/swift/libswiftCore.dylib, 10): image not found}'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff2faa7f15 _exceptionPreprocess + 256
1 libobjc.A.dylib 0x00007fff5bc11efb objc_exception_throw + 48
2 CoreFoundation 0x00007fff2fac2dfa +[NSException raise:format:arguments:] + 98
3 Foundation 0x00007fff31e84e0d -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
4 FBControlCore 0x00000001026c4e1b -[FBControlCoreFrameworkLoader loadPrivateFrameworksOrAbort] + 635
5 FBDeviceControl 0x000000010279249b +[FBDeviceSet initialize] + 75
6 libobjc.A.dylib 0x00007fff5bc14898 CALLING_SOME
+initialize_METHOD + 19
7 libobjc.A.dylib 0x00007fff5bc04b8d _class_initialize + 282
8 libobjc.A.dylib 0x00007fff5bc04595 lookUpImpOrForward + 238
9 libobjc.A.dylib 0x00007fff5bc04014 _objc_msgSend_uncached + 68
10 iOSDeviceManager 0x0000000102610765 +[PhysicalDevice withID:] + 123
11 iOSDeviceManager 0x0000000102619655 +[Device withID:] + 118
12 iOSDeviceManager 0x000000010261c9ba +[Command deviceFromArgs:] + 130
13 iOSDeviceManager 0x000000010260ca5a +[KillAppCommand execute:] + 45
14 iOSDeviceManager 0x000000010261f49f +[CLI process:] + 1110
15 iOSDeviceManager 0x000000010260a8c5 main + 121
16 libdyld.dylib 0x00007fff5ccd8ed9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Using certificates which contains "Apple Development" text causes DeviceAgent-Runner installation to fail

I've updated run_loop to 4.5.0 and found when using certificates with text "Apple Development:" iOSDeviceManager is unable to install DeviceAgent-Runner.app and crashes.

Calabash says, "Your wish is my command."
calabash-ios 0.21.10> start_test_server_in_background
SHELL: xcrun simctl list devices --json
SHELL: xcrun instruments -s devices
DEBUG: HTTP: get http://192.168.102.201:27753/1.0/health {:retries=>1, :timeout=>0.5}
DEBUG: HTTP: get http://192.168.102.201:27753/1.0/health {:retries=>1, :timeout=>0.5}
DEBUG: Waiting for DeviceAgent to launch...
SHELL: cd /Users/ppalma/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/run_loop-4.5.0/lib/run_loop/device_agent
SHELL: ditto -xk Frameworks.zip .
SHELL: ditto -xk DeviceAgent-Runner.app.zip .
SHELL: /Users/ppalma/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/run_loop-4.5.0/lib/run_loop/device_agent/bin/iOSDeviceManager install /Users/ppalma/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/run_loop-4.5.0/lib/run_loop/device_agent/ipa/DeviceAgent-Runner.app --device-id #dev_id#
Traceback (most recent call last):
       15: from /Users/ppalma/.rbenv/versions/2.6.3/bin/irb:23:in `<main>'
       14: from /Users/ppalma/.rbenv/versions/2.6.3/bin/irb:23:in `load'
       13: from /Users/ppalma/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/irb-1.0.0/exe/irb:11:in `<top (required)>'
       12: from (irb):1
       11: from /Users/ppalma/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/calabash-cucumber-0.21.10/lib/calabash-cucumber/core.rb:1576:in `start_test_server_in_background'
       10: from /Users/ppalma/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/calabash-cucumber-0.21.10/lib/calabash-cucumber/launcher.rb:365:in `relaunch'
        9: from /Users/ppalma/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/calabash-cucumber-0.21.10/lib/calabash-cucumber/launcher.rb:412:in `new_run_loop'
        8: from /Users/ppalma/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/calabash-cucumber-0.21.10/lib/calabash-cucumber/launcher.rb:412:in `times'
        7: from /Users/ppalma/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/calabash-cucumber-0.21.10/lib/calabash-cucumber/launcher.rb:414:in `block in new_run_loop'
        6: from /Users/ppalma/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/run_loop-4.5.0/lib/run_loop.rb:113:in `run'
        5: from /Users/ppalma/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/run_loop-4.5.0/lib/run_loop/device_agent/client.rb:191:in `run'
        4: from /Users/ppalma/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/run_loop-4.5.0/lib/run_loop/device_agent/client.rb:325:in `launch'
        3: from /Users/ppalma/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/run_loop-4.5.0/lib/run_loop/device_agent/client.rb:1489:in `launch_cbx_runner'
        2: from /Users/ppalma/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/run_loop-4.5.0/lib/run_loop/device_agent/ios_device_manager.rb:146:in `launch'
        1: from /Users/ppalma/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/run_loop-4.5.0/lib/run_loop/shell.rb:116:in `run_shell_command'
RunLoop::Shell::Error ()
There was an error executing:

/Users/ppalma/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/run_loop-4.5.0/lib/run_loop/device_agent/bin/iOSDeviceManager install /Users/ppalma/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/run_loop-4.5.0/lib/run_loop/device_agent/ipa/DeviceAgent-Runner.app --device-id #dev_id#

The command generated this output:

Application sh.calaba.DeviceAgent.xctrunner is not installed on #dev_id#
No valid iOSDeveloperIdentities found on system.
2019-11-22 11:15:50.052 iOSDeviceManager[44270:633764] *** Terminating app due to uncaught exception 'CBXException', reason: 'Unable to find appropriate codesign identity for device #dev_id# / app sh.calaba.DeviceAgent.xctrunner combo'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff43100acd __exceptionPreprocess + 256
	1   libobjc.A.dylib                     0x00007fff6d802a17 objc_exception_throw + 48
	2   iOSDeviceManager                    0x00000001084b0698 +[Command resourcesFromArgs:] + 0
	3   iOSDeviceManager                    0x00000001084baa80 +[MobileProfile bestMatchProfileForApplication:device:] + 284
	4   iOSDeviceManager                    0x00000001084a4e48 -[PhysicalDevice installApp:mobileProfile:codesignIdentity:resourcesToInject:forceReinstall:] + 430
	5   iOSDeviceManager                    0x00000001084a52e5 -[PhysicalDevice installApp:resourcesToInject:forceReinstall:] + 67
	6   iOSDeviceManager                    0x00000001084a817b +[InstallAppCommand execute:] + 876
	7   iOSDeviceManager                    0x00000001084b35b7 +[CLI process:] + 1110
	8   iOSDeviceManager                    0x000000010849ed25 main + 121
	9   libdyld.dylib                       0x00007fff6efd13d5 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
calabash-ios 0.21.10>

Installing my old certificate which contains string "iPhone Developer:" fixed this issue installing DeviceAgent-Runner and avoid crashing.

As a workaround, allowing to use new certificates, I've modified isIOSDeveloperIdentity() in iOSDeviceManager/Resigning/CodesignIdentity.m. to:

- (BOOL)isIOSDeveloperIdentity {
    return [self.name containsString:@"iPhone Developer"] || [self.name containsString:@"Apple Development"];
}

Launching kills simulator

Not sure if this is intended, but I wanted to make a note of it.

It is not clear to me yet what the workflow will be.

Resigning should make no assumptions about entitlement format

Some entitlements can assume multiple forms such as array or string (common case is "*" as a string value and then ["id1", "id2"] as an array value).

In the past, calabash-tool failed whenever it encountered an unexpected format because Golang is not robust to type checking. As iOSDeviceManager becomes the replacement for calabash-tool, it should be robust to any entitlement possibly taking on any format.

Install works on iPhone 5s but not on 7 plus

Hello,

iOSDeviceManager install commands works on iPhone 5s ios-12.4.5 but not on iPhone 7 Plus ios-13.3.1 physical devices.

Xcode Version 11.5 (11E608c)

Command line for 5s:

./iOSDeviceManager install ../calculator.ipa -d a40b62cb1xxxxxxx

Output: (Install Success)

.....
This command:
  /usr/bin/xcrun codesign -d --entitlements :- /var/folders/yn/8vvb_vh96g54wh9lby7xsbt40000gn/T/CB85955E-7887-4D50-B31E-57730A45F9E1-32664-00021741FADBCA7E/Payload/calculator.app/Plugins/calculatorTests.xctest
produced this output:
=== PLIST BEGIN ===

=== PLIST END ===
stderr: 2020-06-27 15:45:19.951532+0300 codesign[33153:7125660] SecStaticCode: verification failed (trust result 6, error -2147409652)
Executable=/private/var/folders/yn/8vvb_vh96g54wh9lby7xsbt40000gn/T/CB85955E-7887-4D50-B31E-57730A45F9E1-32664-00021741FADBCA7E/Payload/calculator.app/PlugIns/calculatorTests.xctest/calculatorTests

The data couldn’t be read because it isn’t in the correct format.
2020-06-27 15:45:25.287715+0300 iOSDeviceManager[32664:7122005] AMDeviceSecureTransferPath (thread 0x100157dc0): disableDelta: FALSE, unzipOnFly: TRUE, StagingPath: PublicStaging
2020-06-27 15:45:25.288170+0300 iOSDeviceManager[32664:7122005] AMDeviceSecureTransferPath (thread 0x100157dc0): Trying SZConduit for transfer
Installed com.petri.calculator.calculator version: 1.0 / 1 to a40b62cb1bxxxx
Program ended with exit code: 0asdf

On iPhone 7 Plus:

./iOSDeviceManager install ../calculator.ipa -d c982d5dc9xxxx

Output:

stderr: 2020-06-27 14:08:38.985440+0300 codesign[29281:7045727] SecStaticCode: verification failed (trust result 6, error -2147409652)
Executable=/private/var/folders/yn/8vvb_vh96g54wh9lby7xsbt40000gn/T/623C5BDF-83B5-424D-80AC-2554B42B2850-28753-000212AB81B682FC/Payload/calculator.app/PlugIns/calculatorTests.xctest/calculatorTests

The data couldn’t be read because it isn’t in the correct format.
2020-06-27 14:10:11.714663+0300 iOSDeviceManager[28753:7039810] AMDeviceSecureTransferPath (thread 0x10015adc0): disableDelta: FALSE, unzipOnFly: TRUE, StagingPath: PublicStaging
2020-06-27 14:10:11.714897+0300 iOSDeviceManager[28753:7039810] AMDeviceSecureTransferPath (thread 0x10015adc0): Trying SZConduit for transfer
2020-06-27 14:10:15.552609+0300 iOSDeviceManager[28753:7039810] AMDErrorForMobileInstallationCallbackDict (thread 0x10015adc0): GOT AN ERROR 0xe800003a
2020-06-27 14:10:15.552797+0300 iOSDeviceManager[28753:7039810] perform_command (thread 0x10015adc0): There was an error communicating with the service agent: 0xe8008018
2020-06-27 14:10:15.552919+0300 iOSDeviceManager[28753:7039810] AMDeviceSecureInstallApplication (thread 0x10015adc0): Old style install failed for (PublicStaging/calculator.app)
2020-06-27 14:10:15.553049+0300 iOSDeviceManager[28753:7039810] AMDeviceSecureInstallApplication (thread 0x10015adc0): Could not install package on device: e8008018
Error installing application: Failed to install application with path /var/folders/yn/8vvb_vh96g54wh9lby7xsbt40000gn/T/623C5BDF-83B5-424D-80AC-2554B42B2850-28753-000212AB81B682FC/Payload/calculator.app

	install <app-path>
		-d,--device-id	<device-identifier>	iOS Simulator GUID, physical device ID, or an alias
		-f,--force	<force-reinstall-app> [OPTIONAL] 	Reinstall the app if the device contains an older version than the bundle specified	DEFAULT=0
		-p,--profile-path	<profile-path> [OPTIONAL] 	Path to provisioning profile
		-c,--codesign-identity	<codesign-identifier> [OPTIONAL] 	Identity used to codesign app bundle [device only]. Deprecated - should use profile path.	DEFAULT=
		-i,--resources-path	<resources-path> [OPTIONAL] 	Path to resources (executables) to inject into app directory. A list of colon separated files may be specified.
		-r,--robotic-server-port	<robotic-calabash-port> [OPTIONAL] 	Robotic mobi calabash server port to start calabash	DEFAULT=37265
Program ended with exit code: 5

It goes the same output until AMDErrorForMobileInstallationCallbackDict lines. I couldn't know how to debug to solve problems.

Thanks

Standardize logging mechanism

Between the FB* dependencies and our own logs, we should standardize and clean up the logging. We might consider using a framework.

I see this error when I try to launch facebook/WebDriverAgent with this

./iOSDeviceManager start_test --test-runner-bundle-id com.apple.test.WebDriverAgentRunner-Runner -d <udid> -k true
2016-09-29 11:00:13.756 iOSDeviceManager[4290:3331592] Starting test with SessionID: <__NSConcreteUUID 0x7fe3b3d0fcb0> BEEFBABE-FEED-BABE-BEEF-CAFEBEEFFACE, DeviceID: b10feb05ad89634ef1e5ed434385632ab43d5720, runnerBundleID: com.apple.test.WebDriverAgentRunner-Runner
2016-09-29 11:00:13.760 iOSDeviceManager[4290:3331592] MobileDevice: Loading from /System/Library/PrivateFrameworks/MobileDevice.framework 
2016-09-29 11:00:13.779 iOSDeviceManager[4290:3331592] MobileDevice: Successfully loaded
2016-09-29 11:00:13.780 iOSDeviceManager[4290:3331592] Loaded All Private Frameworks [MobileDevice]
2016-09-29 11:00:14.010 iOSDeviceManager[4290:3331592] DTXConnectionServices: Loading from /Applications/Xcode.app/Contents/SharedFrameworks/DTXConnectionServices.framework 
2016-09-29 11:00:14.023 iOSDeviceManager[4290:3331592] DTXConnectionServices: Successfully loaded
2016-09-29 11:00:14.024 iOSDeviceManager[4290:3331592] DTXConnectionServices: DTXConnection has correct path of /Applications/Xcode.app
2016-09-29 11:00:14.025 iOSDeviceManager[4290:3331592] DTXConnectionServices: DTXRemoteInvocationReceipt has correct path of /Applications/Xcode.app
2016-09-29 11:00:14.025 iOSDeviceManager[4290:3331592] DVTFoundation: Loading from /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework 
2016-09-29 11:00:14.117 iOSDeviceManager[4290:3331592] DVTFoundation: Successfully loaded
2016-09-29 11:00:14.127 iOSDeviceManager[4290:3331592] DVTFoundation: DVTDevice has correct path of /Applications/Xcode.app
2016-09-29 11:00:14.127 iOSDeviceManager[4290:3331592] IDEFoundation: Loading from /Applications/Xcode.app/Contents/Frameworks/IDEFoundation.framework 
2016-09-29 11:00:14.149 iOSDeviceManager[4290:3331592] IDEFoundation: Bundle could not be loaded from /Applications/Xcode.app/Contents/Frameworks/IDEFoundation.framework, attempting to find the Framework name
2016-09-29 11:00:14.149 iOSDeviceManager[4290:3331592] Attempting to load missing framework DVTAnalytics.framework
2016-09-29 11:00:14.150 iOSDeviceManager[4290:3331592] DVTAnalytics.framework could not be loaded from fallback directory /Applications/Xcode.app/Contents/Developer/../Frameworks
2016-09-29 11:00:14.150 iOSDeviceManager[4290:3331592] DVTAnalytics: Loading from /Applications/Xcode.app/Contents/SharedFrameworks/DVTAnalytics.framework 
2016-09-29 11:00:14.157 iOSDeviceManager[4290:3331592] DVTAnalytics: Bundle could not be loaded from /Applications/Xcode.app/Contents/SharedFrameworks/DVTAnalytics.framework, attempting to find the Framework name
2016-09-29 11:00:14.157 iOSDeviceManager[4290:3331592] Attempting to load missing framework DVTServices.framework
2016-09-29 11:00:14.157 iOSDeviceManager[4290:3331592] DVTServices.framework could not be loaded from fallback directory /Applications/Xcode.app/Contents/Developer/../Frameworks
2016-09-29 11:00:14.157 iOSDeviceManager[4290:3331592] DVTServices: Loading from /Applications/Xcode.app/Contents/SharedFrameworks/DVTServices.framework 
2016-09-29 11:00:14.165 iOSDeviceManager[4290:3331592] DVTServices: Successfully loaded
2016-09-29 11:00:14.165 iOSDeviceManager[4290:3331592] DVTServices.framework has been loaded from fallback directory '/Applications/Xcode.app/Contents/Developer/../SharedFrameworks', re-attempting to load DVTAnalytics
2016-09-29 11:00:14.166 iOSDeviceManager[4290:3331592] DVTAnalytics: Bundle could not be loaded from /Applications/Xcode.app/Contents/SharedFrameworks/DVTAnalytics.framework, attempting to find the Framework name
2016-09-29 11:00:14.167 iOSDeviceManager[4290:3331592] Attempting to load missing framework DVTAnalyticsClient.framework
2016-09-29 11:00:14.167 iOSDeviceManager[4290:3331592] DVTAnalyticsClient.framework could not be loaded from fallback directory /Applications/Xcode.app/Contents/Developer/../Frameworks
2016-09-29 11:00:14.167 iOSDeviceManager[4290:3331592] DVTAnalyticsClient: Loading from /Applications/Xcode.app/Contents/SharedFrameworks/DVTAnalyticsClient.framework 
2016-09-29 11:00:14.175 iOSDeviceManager[4290:3331592] DVTAnalyticsClient: Successfully loaded
2016-09-29 11:00:14.176 iOSDeviceManager[4290:3331592] DVTAnalyticsClient.framework has been loaded from fallback directory '/Applications/Xcode.app/Contents/Developer/../SharedFrameworks', re-attempting to load DVTAnalytics
2016-09-29 11:00:14.181 iOSDeviceManager[4290:3331592] DVTAnalytics: Successfully loaded
2016-09-29 11:00:14.181 iOSDeviceManager[4290:3331592] DVTAnalytics.framework has been loaded from fallback directory '/Applications/Xcode.app/Contents/Developer/../SharedFrameworks', re-attempting to load IDEFoundation
2016-09-29 11:00:14.183 iOSDeviceManager[4290:3331592] IDEFoundation: Bundle could not be loaded from /Applications/Xcode.app/Contents/Frameworks/IDEFoundation.framework, attempting to find the Framework name
2016-09-29 11:00:14.183 iOSDeviceManager[4290:3331592] Attempting to load missing framework DVTPortal.framework
2016-09-29 11:00:14.183 iOSDeviceManager[4290:3331592] DVTPortal.framework could not be loaded from fallback directory /Applications/Xcode.app/Contents/Developer/../Frameworks
2016-09-29 11:00:14.183 iOSDeviceManager[4290:3331592] DVTPortal: Loading from /Applications/Xcode.app/Contents/SharedFrameworks/DVTPortal.framework 
2016-09-29 11:00:14.194 iOSDeviceManager[4290:3331592] DVTPortal: Successfully loaded
2016-09-29 11:00:14.194 iOSDeviceManager[4290:3331592] DVTPortal.framework has been loaded from fallback directory '/Applications/Xcode.app/Contents/Developer/../SharedFrameworks', re-attempting to load IDEFoundation
2016-09-29 11:00:14.200 iOSDeviceManager[4290:3331592] IDEFoundation: Bundle could not be loaded from /Applications/Xcode.app/Contents/Frameworks/IDEFoundation.framework, attempting to find the Framework name
2016-09-29 11:00:14.200 iOSDeviceManager[4290:3331592] Attempting to load missing framework DVTSourceControl.framework
2016-09-29 11:00:14.200 iOSDeviceManager[4290:3331592] DVTSourceControl.framework could not be loaded from fallback directory /Applications/Xcode.app/Contents/Developer/../Frameworks
2016-09-29 11:00:14.200 iOSDeviceManager[4290:3331592] DVTSourceControl: Loading from /Applications/Xcode.app/Contents/SharedFrameworks/DVTSourceControl.framework 
2016-09-29 11:00:14.243 iOSDeviceManager[4290:3331592] DVTSourceControl: Successfully loaded
2016-09-29 11:00:14.243 iOSDeviceManager[4290:3331592] DVTSourceControl.framework has been loaded from fallback directory '/Applications/Xcode.app/Contents/Developer/../SharedFrameworks', re-attempting to load IDEFoundation
2016-09-29 11:00:14.245 iOSDeviceManager[4290:3331592] IDEFoundation: Bundle could not be loaded from /Applications/Xcode.app/Contents/Frameworks/IDEFoundation.framework, attempting to find the Framework name
2016-09-29 11:00:14.245 iOSDeviceManager[4290:3331592] Attempting to load missing framework SourceKit.framework
2016-09-29 11:00:14.246 iOSDeviceManager[4290:3331592] SourceKit.framework could not be loaded from fallback directory /Applications/Xcode.app/Contents/Developer/../Frameworks
2016-09-29 11:00:14.246 iOSDeviceManager[4290:3331592] SourceKit: Loading from /Applications/Xcode.app/Contents/SharedFrameworks/SourceKit.framework 
2016-09-29 11:00:14.292 iOSDeviceManager[4290:3331592] SourceKit: Successfully loaded
2016-09-29 11:00:14.293 iOSDeviceManager[4290:3331592] SourceKit.framework has been loaded from fallback directory '/Applications/Xcode.app/Contents/Developer/../SharedFrameworks', re-attempting to load IDEFoundation
2016-09-29 11:00:14.564 iOSDeviceManager[4290:3331592] IDEFoundation: Successfully loaded
2016-09-29 11:00:14.564 iOSDeviceManager[4290:3331592] IDEFoundation: IDEFoundationTestInitializer has correct path of /Applications/Xcode.app
2016-09-29 11:00:14.565 iOSDeviceManager[4290:3331592] DevToolsFoundation: Loading from /Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/Frameworks/DevToolsFoundation.framework 
2016-09-29 11:00:14.572 iOSDeviceManager[4290:3331592] DevToolsFoundation: Successfully loaded
2016-09-29 11:00:14.572 iOSDeviceManager[4290:3331592] DevToolsSupport: Loading from /Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/Frameworks/DevToolsSupport.framework 
2016-09-29 11:00:14.584 iOSDeviceManager[4290:3331592] DevToolsSupport: Successfully loaded
2016-09-29 11:00:14.584 iOSDeviceManager[4290:3331592] DevToolsCore: Loading from /Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/Frameworks/DevToolsCore.framework 
2016-09-29 11:00:14.617 iOSDeviceManager[4290:3331592] DevToolsCore: Successfully loaded
2016-09-29 11:00:14.617 iOSDeviceManager[4290:3331592] IDEiOSSupportCore: Loading from /Applications/Xcode.app/Contents/PlugIns/IDEiOSSupportCore.ideplugin 
2016-09-29 11:00:14.684 iOSDeviceManager[4290:3331592] IDEiOSSupportCore: Successfully loaded
2016-09-29 11:00:14.696 iOSDeviceManager[4290:3331592] IDEiOSSupportCore: DVTiPhoneSimulator has correct path of /Applications/Xcode.app
2016-09-29 11:00:14.696 iOSDeviceManager[4290:3331592] IBAutolayoutFoundation: Loading from /Applications/Xcode.app/Contents/Frameworks/IBAutolayoutFoundation.framework 
2016-09-29 11:00:14.704 iOSDeviceManager[4290:3331592] IBAutolayoutFoundation: Bundle could not be loaded from /Applications/Xcode.app/Contents/Frameworks/IBAutolayoutFoundation.framework, attempting to find the Framework name
2016-09-29 11:00:14.704 iOSDeviceManager[4290:3331592] Attempting to load missing framework IBFoundation.framework
2016-09-29 11:00:14.705 iOSDeviceManager[4290:3331592] IBFoundation: Loading from /Applications/Xcode.app/Contents/Frameworks/IBFoundation.framework 
2016-09-29 11:00:14.754 iOSDeviceManager[4290:3331592] IBFoundation: Successfully loaded
2016-09-29 11:00:14.754 iOSDeviceManager[4290:3331592] IBFoundation.framework has been loaded from fallback directory '/Applications/Xcode.app/Contents/Developer/../Frameworks', re-attempting to load IBAutolayoutFoundation
2016-09-29 11:00:14.768 iOSDeviceManager[4290:3331592] IBAutolayoutFoundation: Successfully loaded
2016-09-29 11:00:14.768 iOSDeviceManager[4290:3331592] IDEKit: Loading from /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework 
2016-09-29 11:00:14.794 iOSDeviceManager[4290:3331592] IDEKit: Bundle could not be loaded from /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework, attempting to find the Framework name
2016-09-29 11:00:14.794 iOSDeviceManager[4290:3331592] Attempting to load missing framework DVTProducts.framework
2016-09-29 11:00:14.794 iOSDeviceManager[4290:3331592] DVTProducts.framework could not be loaded from fallback directory /Applications/Xcode.app/Contents/Developer/../Frameworks
2016-09-29 11:00:14.794 iOSDeviceManager[4290:3331592] DVTProducts: Loading from /Applications/Xcode.app/Contents/SharedFrameworks/DVTProducts.framework 
2016-09-29 11:00:14.804 iOSDeviceManager[4290:3331592] DVTProducts: Successfully loaded
2016-09-29 11:00:14.804 iOSDeviceManager[4290:3331592] DVTProducts.framework has been loaded from fallback directory '/Applications/Xcode.app/Contents/Developer/../SharedFrameworks', re-attempting to load IDEKit
2016-09-29 11:00:14.807 iOSDeviceManager[4290:3331592] IDEKit: Bundle could not be loaded from /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework, attempting to find the Framework name
2016-09-29 11:00:14.807 iOSDeviceManager[4290:3331592] Attempting to load missing framework DADocSetManagement.framework
2016-09-29 11:00:14.807 iOSDeviceManager[4290:3331592] DADocSetManagement.framework could not be loaded from fallback directory /Applications/Xcode.app/Contents/Developer/../Frameworks
2016-09-29 11:00:14.807 iOSDeviceManager[4290:3331592] DADocSetManagement: Loading from /Applications/Xcode.app/Contents/SharedFrameworks/DADocSetManagement.framework 
2016-09-29 11:00:14.814 iOSDeviceManager[4290:3331592] DADocSetManagement: Bundle could not be loaded from /Applications/Xcode.app/Contents/SharedFrameworks/DADocSetManagement.framework, attempting to find the Framework name
2016-09-29 11:00:14.814 iOSDeviceManager[4290:3331592] Attempting to load missing framework DVTKit.framework
2016-09-29 11:00:14.815 iOSDeviceManager[4290:3331592] DVTKit.framework could not be loaded from fallback directory /Applications/Xcode.app/Contents/Developer/../Frameworks
2016-09-29 11:00:14.815 iOSDeviceManager[4290:3331592] DVTKit: Loading from /Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework 
2016-09-29 11:00:14.902 iOSDeviceManager[4290:3331592] DVTKit: Successfully loaded
2016-09-29 11:00:14.902 iOSDeviceManager[4290:3331592] DVTKit.framework has been loaded from fallback directory '/Applications/Xcode.app/Contents/Developer/../SharedFrameworks', re-attempting to load DADocSetManagement
2016-09-29 11:00:14.903 iOSDeviceManager[4290:3331592] DADocSetManagement: Bundle could not be loaded from /Applications/Xcode.app/Contents/SharedFrameworks/DADocSetManagement.framework, attempting to find the Framework name
2016-09-29 11:00:14.904 iOSDeviceManager[4290:3331592] Attempting to load missing framework DADocSetAccess.framework
2016-09-29 11:00:14.904 iOSDeviceManager[4290:3331592] DADocSetAccess.framework could not be loaded from fallback directory /Applications/Xcode.app/Contents/Developer/../Frameworks
2016-09-29 11:00:14.905 iOSDeviceManager[4290:3331592] DADocSetAccess: Loading from /Applications/Xcode.app/Contents/SharedFrameworks/DADocSetAccess.framework 
2016-09-29 11:00:14.931 iOSDeviceManager[4290:3331592] DADocSetAccess: Successfully loaded
2016-09-29 11:00:14.931 iOSDeviceManager[4290:3331592] DADocSetAccess.framework has been loaded from fallback directory '/Applications/Xcode.app/Contents/Developer/../SharedFrameworks', re-attempting to load DADocSetManagement
2016-09-29 11:00:14.936 iOSDeviceManager[4290:3331592] DADocSetManagement: Successfully loaded
2016-09-29 11:00:14.936 iOSDeviceManager[4290:3331592] DADocSetManagement.framework has been loaded from fallback directory '/Applications/Xcode.app/Contents/Developer/../SharedFrameworks', re-attempting to load IDEKit
2016-09-29 11:00:14.939 iOSDeviceManager[4290:3331592] IDEKit: Bundle could not be loaded from /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework, attempting to find the Framework name
2016-09-29 11:00:14.939 iOSDeviceManager[4290:3331592] Attempting to load missing framework DVTDeveloperModeHelper.framework
2016-09-29 11:00:14.939 iOSDeviceManager[4290:3331592] DVTDeveloperModeHelper.framework could not be loaded from fallback directory /Applications/Xcode.app/Contents/Developer/../Frameworks
2016-09-29 11:00:14.940 iOSDeviceManager[4290:3331592] DVTDeveloperModeHelper: Loading from /Applications/Xcode.app/Contents/SharedFrameworks/DVTDeveloperModeHelper.framework 
2016-09-29 11:00:14.946 iOSDeviceManager[4290:3331592] DVTDeveloperModeHelper: Successfully loaded
2016-09-29 11:00:14.947 iOSDeviceManager[4290:3331592] DVTDeveloperModeHelper.framework has been loaded from fallback directory '/Applications/Xcode.app/Contents/Developer/../SharedFrameworks', re-attempting to load IDEKit
2016-09-29 11:00:14.949 iOSDeviceManager[4290:3331592] IDEKit: Bundle could not be loaded from /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework, attempting to find the Framework name
2016-09-29 11:00:14.949 iOSDeviceManager[4290:3331592] Attempting to load missing framework DTGraphKit.framework
2016-09-29 11:00:14.949 iOSDeviceManager[4290:3331592] DTGraphKit.framework could not be loaded from fallback directory /Applications/Xcode.app/Contents/Developer/../Frameworks
2016-09-29 11:00:14.949 iOSDeviceManager[4290:3331592] DTGraphKit: Loading from /Applications/Xcode.app/Contents/SharedFrameworks/DTGraphKit.framework 
2016-09-29 11:00:14.969 iOSDeviceManager[4290:3331592] DTGraphKit: Successfully loaded
2016-09-29 11:00:14.969 iOSDeviceManager[4290:3331592] DTGraphKit.framework has been loaded from fallback directory '/Applications/Xcode.app/Contents/Developer/../SharedFrameworks', re-attempting to load IDEKit
2016-09-29 11:00:15.079 iOSDeviceManager[4290:3331592] IDEKit: Successfully loaded
2016-09-29 11:00:15.080 iOSDeviceManager[4290:3331592] IDESourceEditor: Loading from /Applications/Xcode.app/Contents/PlugIns/IDESourceEditor.ideplugin 
2016-09-29 11:00:15.107 iOSDeviceManager[4290:3331592] IDESourceEditor: Successfully loaded
2016-09-29 11:00:15.107 iOSDeviceManager[4290:3331592] Loaded All Private Frameworks [DTXConnectionServices, DVTFoundation, IDEFoundation, IDEiOSSupportCore, IBAutolayoutFoundation, IDEKit, IDESourceEditor]
2016-09-29 11:00:26.597 iOSDeviceManager[4290:3331592] SessionID: <__NSConcreteUUID 0x7fe3b3d0fcb0> BEEFBABE-FEED-BABE-BEEF-CAFEBEEFFACE
2016-09-29 11:00:26.597 iOSDeviceManager[4290:3331592] BundleID: com.apple.test.WebDriverAgentRunner-Runner
2016-09-29 11:00:28.849 iOSDeviceManager[4290:3331592] Connecting Test Bundle
2016-09-29 11:00:28.900 iOSDeviceManager[4290:3331601] Creating the test bundle connection.
2016-09-29 11:00:28.900 iOSDeviceManager[4290:3331601] Listening for proxy connection request from the test bundle (all platforms)
2016-09-29 11:00:28.900 iOSDeviceManager[4290:3331601] Resuming the test bundle connection.
2016-09-29 11:00:28.901 iOSDeviceManager[4290:3331592] Checking test manager availability...
2016-09-29 11:00:28.901 iOSDeviceManager[4290:3331592] Starting test session with ID BEEFBABE-FEED-BABE-BEEF-CAFEBEEFFACE
2016-09-29 11:00:29.029 iOSDeviceManager[4290:3331739] testmanagerd handled session request using protcol version 22.
2016-09-29 11:00:58.923 iOSDeviceManager[4290:3331592] Test Completed with Result: Bundle Connection Failed in error: Error Domain=com.facebook.XCTestBootstrap Code=0 "Timeout establishing connection" UserInfo={NSLocalizedDescription=Timeout establishing connection}
2016-09-29 11:00:58.924 iOSDeviceManager[4290:3331592] Err: Error Domain=com.facebook.XCTestBootstrap Code=0 "Test Manager Connection Failed: Internal Error Error Domain=com.facebook.XCTestBootstrap Code=0 "Timeout establishing connection" UserInfo={NSLocalizedDescription=Timeout establishing connection}" UserInfo={NSLocalizedDescription=Test Manager Connection Failed: Internal Error Error Domain=com.facebook.XCTestBootstrap Code=0 "Timeout establishing connection" UserInfo={NSLocalizedDescription=Timeout establishing connection}, NSUnderlyingError=0x7fe3b6b14b00 {Error Domain=com.facebook.XCTestBootstrap Code=0 "Timeout establishing connection" UserInfo={NSLocalizedDescription=Timeout establishing connection}}}

calabash code sign repo doesn't exist

Under Code signing it says "Project maintainers must clone the codesign repo and install the certs and profiles". However the target link https://github.com/calabash/calabash-codesign doesn't exist.

  1. If the repo does exist somewhere, please update the documentation with the new URL
  2. If the repo doesn't exist, please provide documentation on how to build with the valid certs and profiles.

iOSDeviceManager launch-simulator incorrectly suggest a device UDID

$ iOSDeviceManager launch-simulator
Missing required argument 'device-identifier'

        launch-simulator
                -d,--device-id  <device-identifier>     iOS Simulator GUIDs
Multiple physical devices detected but none specified

 Suggested deviceID from connected device: 193688959205dc7eb48d603c558ede919ad8dd0d

iOSDeviceManager: upload command fails to download existing xcappdata from the CLI

Reproduce

Connect at least one physical device via USB and note the device UDID.

$ cd iOSDeviceManager; git checkout develop; git pull
$ make clean; make build
$ cd Products
$ ./iOSDeviceManager install \
  -d $UDID \
  ../Tests/Resources/arm/TestApp.app
$ echo "Hello" > file.txt
$ ./iOSDeviceManager upload \
  -b sh.calaba.TestApp \
  -d $UDID \
  -f "${PWD}/file.txt"

Expected

file.txt to be uploaded to the TestApp.app data container in the Documents/ directory.

Found

Unable to download app data for sh.calaba.TestApp to 
/var/folders/7w/n70gn/T/6166E/61666E.xcappdata: (null)

Notes

The integration test for this behavior works - the file is uploaded to the TestApp data container.

iOSDeviceManager kill_app bundle identifier positional argument does not work

OSDeviceManager kill_app bundle identifier positional argument does not work

Reproduce

  • Xcode 8.3
  • Sierra
  1. Attach a physical device and make a note of its UDID
  2. Open Settings
  3. $ cd iOSDeviceManager; git co develop; git pull; make build
  4. cd Products
  5. kill Settings.app
$ ./iOSDeviceManager kill_app $UDID com.apple.Preferences

Expected

The Setttings.app to terminate.

Found

ERROR ConsoleWriter:32 | Unrecognized flag or unsupported argument: com.apple.test.DeviceAgent-Runner

Turn off FBControlCore ASL

The offending method is here:

https://github.com/facebook/FBSimulatorControl/blob/master/FBControlCore/Utility/FBWeakFramework.m#L146

This is spamming the terminal with:

May 31 20:48:10  FBControlCore[89818] <Info>: DTXConnectionServices: Successfully loaded
May 31 20:48:10  FBControlCore[89818] <Info>: DTXConnectionServices: DTXConnection has correct path of /Xcode/7.3.1/Xcode.app
May 31 20:48:10  FBControlCore[89818] <Info>: DTXConnectionServices: DTXRemoteInvocationReceipt has correct path of /Xcode/7.3.1/Xcode.app
May 31 20:48:10  FBControlCore[89818] <Info>: DVTFoundation: Successfully loaded
May 31 20:48:10  FBControlCore[89818] <Info>: DVTFoundation: DVTDevice has correct path of /Xcode/7.3.1/Xcode.app
May 31 20:48:10  FBControlCore[89818] <Info>: DVTServices: Successfully loaded
May 31 20:48:10  FBControlCore[89818] <Info>: DVTPortal: Successfully loaded
May 31 20:48:10  FBControlCore[89818] <Info>: DVTSourceControl: Successfully loaded
May 31 20:48:10  FBControlCore[89818] <Info>: IDEFoundation: Successfully loaded
May 31 20:48:10  FBControlCore[89818] <Info>: IDEFoundation: IDEFoundationTestInitializer has correct path of /Xcode/7.3.1/Xcode.app
May 31 20:48:10  FBControlCore[89818] <Info>: DevToolsFoundation: Successfully loaded
May 31 20:48:10  FBControlCore[89818] <Info>: DevToolsSupport: Successfully loaded
May 31 20:48:10  FBControlCore[89818] <Info>: DevToolsCore: Successfully loaded
May 31 20:48:10  FBControlCore[89818] <Info>: IDEiOSSupportCore: Successfully loaded
May 31 20:48:10  FBControlCore[89818] <Info>: IDEiOSSupportCore: DVTiPhoneSimulator has correct path of /Xcode/7.3.1/Xcode.app
May 31 20:48:10  FBControlCore[89818] <Info>: XCTest: Already loaded, skipping
May 31 20:48:10  FBControlCore[89818] <Info>: XCTest: XCTestConfiguration has correct path of /Xcode/7.3.1/Xcode.app
May 31 20:48:10  FBControlCore[89818] <Info>: IBFoundation: Successfully loaded
May 31 20:48:10  FBControlCore[89818] <Info>: IBAutolayoutFoundation: Successfully loaded
May 31 20:48:10  FBControlCore[89818] <Info>: DVTKit: Successfully loaded
May 31 20:48:10  FBControlCore[89818] <Info>: DADocSetAccess: Successfully loaded
May 31 20:48:10  FBControlCore[89818] <Info>: DADocSetManagement: Successfully loaded
May 31 20:48:10  FBControlCore[89818] <Info>: DVTDeveloperModeHelper: Successfully loaded
May 31 20:48:10  FBControlCore[89818] <Info>: DTGraphKit: Successfully loaded
May 31 20:48:10  FBControlCore[89818] <Info>: IDEKit: Successfully loaded
May 31 20:48:10  FBControlCore[89818] <Info>: IDESourceEditor: Successfully loaded
May 31 20:48:10  FBControlCore[89818] <Info>: Loaded All Private Frameworks [DTXConnectionServices, DVTFoundation, IDEFoundation, IDEiOSSupportCore, XCTest, IBAutolayoutFoundation, IDEKit, IDESourceEditor]

I created an issue on FBSimctl asking for advice.

Not all devices recognized by devicemanager

We are encountering instances where devicemanager only sees some of the attached devices (one or two of the four total).

We see all of the devices by running:
xcrun xcdevice list 2> /dev/null | jq -r '.[] | select(.simulator == false) | select(.modelCode | tostring | contains("iPhone")) | .name'

They also consistently appear in the devices window of XCode.

The error can be reproduced in run_loop 4.7.0 and 4.8.1 by running the install command:

for x in `xcrun xcdevice list 2> /dev/null | jq -r '.[] | select(.simulator == false) | select(.name | tostring | contains("CDPI")) | select(.modelCode | tostring | contains("iPhone")) | .identifier'`; do [path/to/bin/iOSDeviceManager] install [path/to/application.app] --device-id $x ; done

(replacing [path] values)

We have not seen this issue occur when using run_loop 4.6.0.

Devicemanager states that is gets back 0x0 for the target device, rather than the expected device info.

The issue seems to be random, coming and going without regard to the device.

A couple of additional examples; one iPhone 8, two iPhone 12, one iPhone 13 using run_loop 4.7.0:
iPhone 8 target, only shows the two iPhone 12 devices:

Could not install /private/tmp/4c4985a7-7665-49bd-9005-252e3bca7676/vendor/bundle/ruby/2.7.0/gems/run_loop-4.7.0/lib/run_loop/device_agent/ipa/DeviceAgent-Runner.app.  iOSDeviceManager says:

Sep 14 14:54:22  iOSDeviceManager[48396] <Notice>: _SubscribeForMuxNotifications (thread 0x10938d600): returned 0x0.
Sep 14 14:54:22  iOSDeviceManager[48396] <Notice>: _AMDDeviceAttachedCallbackv3 (thread 0x10938d600): Device 'AMDevice 0x600003d28000 {UDID = 00008101-0012515A2061401E, device ID = 123, location ID = 0x214000, product ID = 0x12a8}' attached.
Sep 14 14:54:22  iOSDeviceManager[48396] <Notice>: AMDeviceStopSession (thread 0x10938d600): returned 0x0 for device 123
Sep 14 14:54:22  iOSDeviceManager[48396] <Notice>: AMDeviceStopSession (thread 0x10938d600): returned 0x0 for device 123
Sep 14 14:54:22  iOSDeviceManager[48396] <Notice>: AMDeviceStopSession (thread 0x10938d600): returned 0x0 for device 123
Sep 14 14:54:22  iOSDeviceManager[48396] <Notice>: _AMDDeviceAttachedCallbackv3 (thread 0x10938d600): Device 'AMDevice 0x600003d2c5a0 {UDID = 00008101-0001409126B8001E, device ID = 122, location ID = 0x213000, product ID = 0x12a8}' attached.
Sep 14 14:54:22  iOSDeviceManager[48396] <Notice>: AMDeviceStopSession (thread 0x70000a43f000): returned 0x0 for device 122
Sep 14 14:54:22  iOSDeviceManager[48396] <Notice>: AMDeviceStopSession (thread 0x10938d600): returned 0x0 for device 122
Sep 14 14:54:22  iOSDeviceManager[48396] <Notice>: AMDeviceStopSession (thread 0x10938d600): returned 0x0 for device 122
Sep 14 14:54:22  iOSDeviceManager[48396] <Notice>: AMDeviceStopSession (thread 0x70000a43f000): returned 0x0 for device 118
Sep 14 14:54:22  iOSDeviceManager[48396] <Notice>: AMDeviceStopSession (thread 0x10938d600): returned 0x0 for device 122
Error getting device with ID 381319c078b01c563df0315a2d10026fb2c2769a: (null)

iPhone 12 as target, only shows the iPhone 8 device:

Command generated this output:

        Sep 14 14:55:12  iOSDeviceManager[49562] <Notice>: _SubscribeForMuxNotifications (thread 0x11a3d4600): returned 0x0.
Sep 14 14:55:12  iOSDeviceManager[49562] <Notice>: _AMDDeviceAttachedCallbackv3 (thread 0x11a3d4600): Device 'AMDevice 0x6000023b0000 {UDID = 381319c078b01c563df0315a2d10026fb2c2769a, device ID = 125, FullServiceName = 7c:9a:1d:45:44:96@fe80::7e9a:1dff:fe45:4496._apple-mobdev2._tcp.local.}' attached.
Sep 14 14:55:12  iOSDeviceManager[49562] <Notice>: _AMDDeviceAttachedCallbackv3 (thread 0x11a3d4600): Device 'AMDevice 0x6000023bc000 {UDID = 381319c078b01c563df0315a2d10026fb2c2769a, device ID = 124, location ID = 0x230000, product ID = 0x12a8}' attached.
Sep 14 14:55:13  iOSDeviceManager[49562] <Notice>: AMDeviceStopSession (thread 0x11a3d4600): returned 0x0 for device 124
Sep 14 14:55:13  iOSDeviceManager[49562] <Notice>: AMDeviceStopSession (thread 0x11a3d4600): returned 0x0 for device 124
Sep 14 14:55:13  iOSDeviceManager[49562] <Notice>: AMDeviceStopSession (thread 0x70000ca0c000): returned 0x0 for device 124
Sep 14 14:55:13  iOSDeviceManager[49562] <Notice>: AMDeviceStopSession (thread 0x70000ca0c000): returned 0x0 for device 119
Sep 14 14:55:13  iOSDeviceManager[49562] <Notice>: AMDeviceStopSession (thread 0x11a3d4600): returned 0x0 for device 124
Error getting device with ID 00008101-0001409126B8001E: (null)

And an example iPhone 12 using run_loop 4.8.1; four devices attached only one appearing:

Could not install /private/tmp/7e5877f7-c3ed-4800-a4be-04ee30b700b0/vendor/bundle/ruby/2.7.0/gems/run_loop-4.8.1/lib/run_loop/device_agent/ipa/DeviceAgent-Runner.app.  iOSDeviceManager says:

Sep 15 12:28:14  iOSDeviceManager[69890] <Notice>: _SubscribeForMuxNotifications (thread 0x1157a6600): returned 0x0.
Sep 15 12:28:14  iOSDeviceManager[69890] <Notice>: _AMDDeviceAttachedCallbackv3 (thread 0x1157a6600): Device 'AMDevice 0x600002414000 {UDID = 14d8fb116bedb9167d2ac6eef19cd12a5ee43777, device ID = 53, location ID = 0x320000, product ID = 0x12a8}' attached.
Sep 15 12:28:14  iOSDeviceManager[69890] <Notice>: AMDeviceStopSession (thread 0x1157a6600): returned 0x0 for device 53
Sep 15 12:28:14  iOSDeviceManager[69890] <Notice>: AMDeviceStopSession (thread 0x1157a6600): returned 0x0 for device 53
Sep 15 12:28:14  iOSDeviceManager[69890] <Notice>: AMDeviceStopSession (thread 0x700001251000): returned 0x0 for device 41
Sep 15 12:28:15  iOSDeviceManager[69890] <Notice>: AMDeviceStopSession (thread 0x1157a6600): returned 0x0 for device 53
Error getting device with ID 00008101-00164C6E0EE9003A: (null)

Exception "[__NSSingleObjectArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0] '", executing any command on the iPod Touch 6

An exception occurs when more than one physical device is connected to the mac.

/var/folders/2l/dfm8kr9s1ljb_3gxrtrlph6h0000gn/T/xdb/DeviceAgent.iOS.Dependencies/67717fde143b9dcd5fa3abafb8df12e3/bin/iOSDeviceManager version -j
{
"VERSION" : "3.2.1",
"GIT_REMOTE_ORIGIN" : "https://github.com/calabash/iOSDeviceManager.git",
"GIT_BRANCH" : "HEAD",
"GIT_SHORT_REVISION" : "59b9562"
}

1. Test-case:

  1. Сonnect one physical device
  2. Perform a check:
    /var/folders/2l/dfm8kr9s1ljb_3gxrtrlph6h0000gn/T/xdb/DeviceAgent.iOS.Dependencies/67717fde143b9dcd5fa3abafb8df12e3/bin/iOSDeviceManager is-installed /var/folders/2l/dfm8kr9s1ljb_3gxrtrlph6h0000gn/T/xdb/DeviceAgent.iOS.Dependencies/67717fde143b9dcd5fa3abafb8df12e3/ipa/DeviceAgent-Runner.app -d 1b4aabe6cc4de4b8522957cabfea768efe1a6d44
    Result: true
  3. Сonnect two physical devices
  4. Perform a check:
    /var/folders/2l/dfm8kr9s1ljb_3gxrtrlph6h0000gn/T/xdb/DeviceAgent.iOS.Dependencies/67717fde143b9dcd5fa3abafb8df12e3/bin/iOSDeviceManager is-installed /var/folders/2l/dfm8kr9s1ljb_3gxrtrlph6h0000gn/T/xdb/DeviceAgent.iOS.Dependencies/67717fde143b9dcd5fa3abafb8df12e3/ipa/DeviceAgent-Runner.app -d 1b4aabe6cc4de4b8522957cabfea768efe1a6d44
    Result:
    2018-11-02 14:41:03.431 iOSDeviceManager[58422:3555264] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSSingleObjectArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0]'
    *** First throw call stack:
    (
    0 CoreFoundation 0x00007fff441f343d __exceptionPreprocess + 256
    1 libobjc.A.dylib 0x00007fff70104720 objc_exception_throw + 48
    2 CoreFoundation 0x00007fff44116da9 -[__NSSingleObjectArrayI dealloc] + 0
    3 FBControlCore 0x000000010ae1c78d -[FBOSVersion number] + 141
    4 FBControlCore 0x000000010ae48260 FBiOSTargetComparison + 384
    5 FBDeviceControl 0x000000010af06377 -[FBDevice compare:] + 55
    6 CoreFoundation 0x00007fff4415bc18 __CFSimpleMergeSort + 77
    7 CoreFoundation 0x00007fff4415bb83 CFSortIndexes + 418
    8 CoreFoundation 0x00007fff44179756 -[NSArray sortedArrayFromRange:options:usingComparator:] + 699
    9 CoreFoundation 0x00007fff441ac682 -[NSArray sortedArrayUsingSelector:] + 151
    10 FBDeviceControl 0x000000010af0385b -[FBDeviceSet allDevices] + 155
    11 FBDeviceControl 0x000000010af035f5 -[FBDeviceSet query:] + 165
    12 FBDeviceControl 0x000000010af0372b -[FBDeviceSet deviceWithUDID:] + 203
    13 iOSDeviceManager 0x000000010ad836a0 +[PhysicalDevice withID:] + 159
    14 iOSDeviceManager 0x000000010ad8c1fb +[Device withID:] + 118
    15 iOSDeviceManager 0x000000010ad8f567 +[Command deviceFromArgs:] + 130
    16 iOSDeviceManager 0x000000010ad8170f +[IsInstalledCommand execute:] + 48
    17 iOSDeviceManager 0x000000010ad9207f +[CLI process:] + 1111
    18 iOSDeviceManager 0x000000010ad7d7d5 main + 121
    19 libdyld.dylib 0x00007fff711d2085 start + 1
    )
    libc++abi.dylib: terminating with uncaught exception of type NSException
    Abort trap: 6

2. Test-case

  1. Сonnect one physical device
  2. Install app:
    /var/folders/2l/dfm8kr9s1ljb_3gxrtrlph6h0000gn/T/xdb/DeviceAgent.iOS.Dependencies/67717fde143b9dcd5fa3abafb8df12e3/bin/iOSDeviceManager install /var/folders/2l/dfm8kr9s1ljb_3gxrtrlph6h0000gn/T/xdb/DeviceAgent.iOS.Dependencies/67717fde143b9dcd5fa3abafb8df12e3/ipa/DeviceAgent-Runner.app -d 1b4aabe6cc4de4b8522957cabfea768efe1a6d44
    Result:
    Application com.apple.test.DeviceAgent-Runner is not installed on 1b4aabe6cc4de4b8522957cabfea768efe1a6d44
    Installed com.apple.test.DeviceAgent-Runner version: 1.3.1 / 1537307478 to 1b4aabe6cc4de4b8522957cabfea768efe1a6d44
  3. Uninstall app:
    /var/folders/2l/dfm8kr9s1ljb_3gxrtrlph6h0000gn/T/xdb/DeviceAgent.iOS.Dependencies/67717fde143b9dcd5fa3abafb8df12e3/bin/iOSDeviceManager uninstall "com.apple.test.DeviceAgent-Runner" -d 1b4aabe6cc4de4b8522957cabfea768efe1a6d44
    Result: without output. DeviceAgent successfully removed from device
  4. Сonnect two physical devices
  5. Install app:
    /var/folders/2l/dfm8kr9s1ljb_3gxrtrlph6h0000gn/T/xdb/DeviceAgent.iOS.Dependencies/67717fde143b9dcd5fa3abafb8df12e3/bin/iOSDeviceManager install /var/folders/2l/dfm8kr9s1ljb_3gxrtrlph6h0000gn/T/xdb/DeviceAgent.iOS.Dependencies/67717fde143b9dcd5fa3abafb8df12e3/ipa/DeviceAgent-Runner.app -d 1b4aabe6cc4de4b8522957cabfea768efe1a6d44
    Result:
    2018-11-02 14:56:33.123 iOSDeviceManager[58586:3559848] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSSingleObjectArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0]'
    *** First throw call stack:
    (
    0 CoreFoundation 0x00007fff441f343d __exceptionPreprocess + 256
    1 libobjc.A.dylib 0x00007fff70104720 objc_exception_throw + 48
    2 CoreFoundation 0x00007fff44116da9 -[__NSSingleObjectArrayI dealloc] + 0
    3 FBControlCore 0x0000000103e6878d -[FBOSVersion number] + 141
    4 FBControlCore 0x0000000103e94260 FBiOSTargetComparison + 384
    5 FBDeviceControl 0x0000000103f55377 -[FBDevice compare:] + 55
    6 CoreFoundation 0x00007fff4415bc18 __CFSimpleMergeSort + 77
    7 CoreFoundation 0x00007fff4415bb83 CFSortIndexes + 418
    8 CoreFoundation 0x00007fff44179756 -[NSArray sortedArrayFromRange:options:usingComparator:] + 699
    9 CoreFoundation 0x00007fff441ac682 -[NSArray sortedArrayUsingSelector:] + 151
    10 FBDeviceControl 0x0000000103f5285b -[FBDeviceSet allDevices] + 155
    11 FBDeviceControl 0x0000000103f525f5 -[FBDeviceSet query:] + 165
    12 FBDeviceControl 0x0000000103f5272b -[FBDeviceSet deviceWithUDID:] + 203
    13 iOSDeviceManager 0x0000000103dd06a0 +[PhysicalDevice withID:] + 159
    14 iOSDeviceManager 0x0000000103dd91fb +[Device withID:] + 118
    15 iOSDeviceManager 0x0000000103ddc567 +[Command deviceFromArgs:] + 130
    16 iOSDeviceManager 0x0000000103dd3cad +[InstallAppCommand execute:] + 321
    17 iOSDeviceManager 0x0000000103ddf07f +[CLI process:] + 1111
    18 iOSDeviceManager 0x0000000103dca7d5 main + 121
    19 libdyld.dylib 0x00007fff711d2085 start + 1
    20 ??? 0x0000000000000005 0x0 + 5
    )
    libc++abi.dylib: terminating with uncaught exception of type NSException
    Abort trap: 6

iOSDeviceManager fails to run

Using Visual Studio for Mac 8.5 (Build) on MacOS 10.15.3 I get this dialog if I try to run a Xamarin.UITest from within the IDE:

Screenshot 2020-03-25 at 14 30 12

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.