Post

Replies

Boosts

Views

Activity

Unable to install test app on Apple Watch
I repeat this older thread, as it does not show on the forum with my added post !https://forums.developer.apple.com/message/298938#298938I answered to KMT answer (I read the referenced thread)---------------Looks like that triggered the name change dialog.Can you just right click on the watch name without that happening? Try it on the phone, on the left so see what I'm looking for.Otherwise, this sounds like what others went thru (routine pairing v o o d o o ) in this SO thread - seen it ? [ filter does not like v o o …]https://stackoverflow.com/questions/30792520/in-xcode-i-see-no-paired-apple-watch-even-though-the-watch-is-paired-and-the-w-------------------------So, my question nowI run in the same problem.I just got the Apple Watch (4, OS 5.1.1) and use XCode 10.1. OSX 10.13.6I can create the app + WatchOS on simulator without problem. But not on device.The watch is paired with iPhone.I connect iPhone with USB=> get the message :The iPhone "iPhone XS" can not be used because it requires iTunes 12.9 or later. Do you want to download the latest version of iTunes now?I ignore the message (as I think iTunes 12.9 requires Mojave, isn't it ?). Could it be the problem ???In XCode, I select the scheme iPhone Xs of XXX + Apple Watch of XXXI run, it compiles OK, but at the end says:"Finished running myApp on Apple Watch of XXX" in the XCode barPlus alert:App installation failedThe host is not paired with the device.I have checked in XCode Devices:- on the left, I see iPhoneXS of XXX- but not the Watch- On the right of Devices window, I see the PAIRED WATCHES:Apple Watch of XXXI also checked that Apple Watch is listed with an UDID in the Devices listThe scheme was in Debug mode.So, I changed to release mode, and get the message in Scheme that paired devices not available for debug.So, Compile again, but then get message :Could not launch 'Autonomie' on iPhone XS XXXThere was an error preparing Apple Watch de XXX for development.Try reattaching the device to which Apple Watch de XXX is paired. The device rejected the pairing attempt.So I unpaired the device.ReattachedTruted the hostRun again, just to get again the messageThe host is not paired with the device.I do not see which and where I should pair.
11
0
17k
Jan ’21
List with 2 cells side by side
From the Landmarks sample project, I tried a variation, to get two cells side by side in the List. This is the original with on cell per row as in the tutorial: struct LandmarkList: View { &#9;&#9; &#9;&#9;var body: some View { &#9;&#9;&#9;&#9;List(landmarks) { landmark in &#9;&#9;&#9;&#9;&#9;&#9;LandmarkRow(landmark: landmark) &#9;&#9;&#9;&#9;} &#9;&#9;} } Surprisingly, the following variation works well to display 2 cells side by side: struct LandmarkList: View { &#9;&#9; &#9;&#9;var body: some View { &#9;&#9;&#9;&#9;List (0 ..< (landmarks.count+1)/2) { item in &#9;&#9;&#9;&#9;&#9;&#9;LandmarkRow(landmark: landmarks[2*item]) &#9;&#9;&#9;&#9;&#9;&#9;if 2*item + 1 < landmarks.count { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;LandmarkRow(landmark: landmarks[(2*item)+1]) &#9;&#9;&#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;} &#9;&#9;} } I thus tried to go on and add navigationLinks… It works when adding a navigation link to the first cell only struct LandmarkList: View { &#9;&#9; &#9;&#9;var body: some View { &#9;&#9;&#9;&#9;NavigationView { &#9;&#9;&#9;&#9;&#9;&#9;List (0 ..< (landmarks.count+1)/2) { item in &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;NavigationLink(destination: LandmarkDetail()) { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;LandmarkRow(landmark: landmarks[2*item]) &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if 2*item + 1 < landmarks.count { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;LandmarkRow(landmark: landmarks[(2*item)+1]) &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;&#9;&#9;.navigationTitle("Landmarks")&#9; &#9;&#9;&#9;&#9;} &#9;&#9;} } But adding NavigationLink to the second makes it fail: struct LandmarkList: View { &#9;&#9; &#9;&#9;var body: some View { &#9;&#9;&#9;&#9;NavigationView { &#9;&#9;&#9;&#9;&#9;&#9;List (0 ..< (landmarks.count+1)/2) { item in &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;NavigationLink(destination: LandmarkDetail()) { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;LandmarkRow(landmark: landmarks[2*item]) &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if 2*item + 1 < landmarks.count { NavigationLink(destination: LandmarkDetail()) { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; LandmarkRow(landmark: landmarks[(2*item)+1]) &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; } &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;&#9;&#9;.navigationTitle("Landmarks")&#9; &#9;&#9;&#9;&#9;} &#9;&#9;} } The error is on line 3: The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions Is it a normal List behaviour ? Or did I miss something ? Which expression could I break ?
2
0
730
Dec ’20