Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24069] iOS: Unable to build for Apple Watch Series 2 WatchOS 3.1 sim

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2016-12-17T14:09:16.000+0000
Affected Version/sRelease 6.0.0
Fix Version/sRelease 6.0.1
ComponentsiOS, Tooling
Labelsqe-6.0.0
ReporterEric Wieber
AssigneeChris Barber
Created2016-10-24T22:55:04.000+0000
Updated2016-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

FileDateSize
log.txt2016-12-16T18:43:49.000+000033030

Comments

  1. Chris Barber 2016-12-08

    Titanium SDK master PR: https://github.com/appcelerator/titanium_mobile/pull/8667
  2. Chris Barber 2016-12-08

    To test, you need to run xcrun simctl list, then locate all of the device pairs. Do xcrun 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.
  3. Chris Barber 2016-12-13

    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
  4. Samir Mohammed 2016-12-16

    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]
  5. Chris Barber 2016-12-16

    [~smohammed] Please build the app with the DEBUG=ioslib:* environment var set and attach the new log.
  6. Chris Barber 2016-12-16

    ioslib v1.1.2 PR: https://github.com/appcelerator/ioslib/pull/53
  7. Chris Barber 2016-12-16

    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 change

    Run
    xcrun simctl list | grep "Apple Watch Series 2 - 42mm \[Titanium\]"
    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\]" UDID

    Check 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): DEBUG=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>

    By specifying -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.
  8. Samir Mohammed 2016-12-19

    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*
       XCode 8.2 and 8.1
       Titanium SDK Version: 6.0.1.v20161217061750
       Appcelerator studio Version: 4.8.1.201612050850
       Operating system: Mac OS X Version 10.11.6
       Node.js version: 4.6.0
       NPM Version: 4.2.8
       CLI Version: 6.10.0
       

JSON Source