[TIMOB-24069] iOS: Unable to build for Apple Watch Series 2 WatchOS 3.1 sim
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-12-17T14:09:16.000+0000 |
Affected Version/s | Release 6.0.0 |
Fix Version/s | Release 6.0.1 |
Components | iOS, Tooling |
Labels | qe-6.0.0 |
Reporter | Eric Wieber |
Assignee | Chris Barber |
Created | 2016-10-24T22:55:04.000+0000 |
Updated | 2016-12-19T18:43:59.000+0000 |
Description
When building using Xcode 8.1, for an iOS sim that has an Apple Watch Series 2 (WatchOS 3.1) sim, I get the below error:
[ERROR] : An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=161):
Unable to pair devices
At least one of the requested devices is already paired with the maximum number of supported devices and cannot accept another pairing.
*Steps to reproduce issue*
1. Select Xcode 8.1 sudo xcode-select -s <path_to_xcode_8.1>
2. Create a new project and add an Apple Watch App to it
3. Add a team ID to your tiapp.xml
4. Build the project for an iOS sim with Apple Watch Series 2 (v3.1)
*Expected Results*
The project builds/installs/runs without issue
*Actual Results*
The above error is encountered
Attachments
File | Date | Size |
---|---|---|
log.txt | 2016-12-16T18:43:49.000+0000 | 33030 |
Titanium SDK master PR: https://github.com/appcelerator/titanium_mobile/pull/8667
To test, you need to run
xcrun simctl list
, then locate all of the device pairs. Doxcrun simctl unpair <pair udid>
for each device pair. CoreSimulator will automatically re-pair specific iOS and watchOS simulators. On my computer, it always pairs a "iPhone 7 Plus" sim with a "Apple Watch Series 2 - 42mm" watch sim and a "iPhone 7" sim with a "Apple Watch Series 2 - 38mm" watch sim. To reproduce the problem, you need to pair the "iPhone 7 Plus" sim with the "Apple Watch Series 2 - 38mm" watch sim. You can also try to pair the "Apple Watch Series 2 - 42mm" watch sim with some other iPhone sim such as an iPhone 6s. What's happening is ioslib will now detect the pair failure try to unpair and re-pair or in worst case will create a new watch sim and use that to pair with the specified iPhone sim.Bug fixes: Titanium SDK master PR: https://github.com/appcelerator/titanium_mobile/pull/8683 Titanium SDK 6_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/8684
Reopening as error stated in the description still occurs on Xcode 8.2 using the titanium version of the Apple watch series 2 (v3.1) [^log.txt]
[~smohammed] Please build the app with the
DEBUG=ioslib:*
environment var set and attach the new log.ioslib v1.1.2 PR: https://github.com/appcelerator/ioslib/pull/53
Ti SDK master PR: https://github.com/appcelerator/titanium_mobile/pull/8696 Ti SDK 6_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/8697 To test,
Make sure you have Xcode 8.1 and Xcode 8.2 installed
Make sure Xcode 8.2 is your selected Xcode:
xcode-select -p
to check,sudo xcode-select -s /path/to/xcode8.2
to changeRun
and check if you have a Titanium created watch sim
If not, run
xcrun simctl create "Apple Watch Series 2 - 42mm \[Titanium\]" com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-42mm com.apple.CoreSimulator.SimRuntime.watchOS-3-1
Run
xcrun simctl list
and find the "Apple Watch Series 2 - 42mm \[Titanium\]" UDIDCheck if the Titanium Watch sim is already paired with an iOS sim
If yes, unpair it:
xcrun simctl unpair <pair udid>
Find the UDID of the iOS 10.1 iPhone SE sim
Pair the iOS 10.1 iPhone SE sim with the Titanium Watch sim:
xcrun simctl pair <watch udid> <phone udid>
Find the UDID of the iOS 10.2 iPhone 7 Plus sim
Build your Titanium app (that has a watch app):
By specifyingDEBUG=ioslib:* appc run -p ios -I 10.2 --log-level trace --device-id <iphone 7 plus sim udid> --watch-device-id <ti watch sim udid>
-I 10.2
, it will build with Xcode 8.2 and will unpair the iOS 10.1 sim from the Titanium watch sim, then pair it with the 10.2 sim. Everything should launch, install, and run perfectly.Verified fix with the test case mentioned above. Was able to build on Xcode 8.2 with the iOS 10.1 sim being unpaired with the titanium watch sim and then pairing it with the 10.2 sim. *Environement*