Apple Watch App Extension won't run on the simulator anymore - watchos-2

I'm creating my first Apple Watch app and upon first adding the Watch and Watch extension targets I was able to start building my interface and running on the simulator. Since then I've needed to update my iOS app while still working on the Watch app. So I used this advice to "disable" my watch app so I could submit a build for the new iOS version:
Prevent deploying (disable) WatchKit App with iOS iPhone App in Xcode
Simply, by removing the watch and extension in target dependencies and embedded watch content in Build Phases did the trick. Now I'm picking back up the work I put down but can't seem to get it to run on the simulator. I add back the target dependencies and the embedded watch content but I get the error: Error Launching 'App Name Extension' Invalid Bundle - No Apple Watch Binary
Can anyone explain what that means and why I am getting this error?

For anyone who comes across this problem seeking an answer. I found that I had been changing my version and build number to accommodate my current iPhone version and build number. This was creating that error, so to fix it I left the watch app and extension app version/build as default 1.0 and 1.

Related

ITMS-90428: Invalid Swift Support - The files libswift_Concurrency.dylib don’t match

I am trying to upload a new build of my app from the new Xcode 14.1 RC but it keeps failing with the below error:
ITMS-90428: Invalid Swift Support - The files libswift_Concurrency.dylib don’t match
/Payload/MY_APP.app/MY_APP_WatchOS.app/libswift_Concurrency.dylib.
Make sure the files are correct, rebuild your app, and resubmit it.
Don’t apply post-processing to /Payload/MY_APP.app/MY_APP_WatchOS.app/libswift_Concurrency.dylib.
My bundle contains a watchOS 4.3 app which I thought might have been an issue, so I tried increasing it to watchOS 7.0 but still got the error.
Bitcode is disabled for all targets.
I don't think I have any post-processing enabled either as I just use the standard Xcode submit to App Store.
The same problem here.
I changed nothing in my watch app since the last successful upload.
The only change is Xcode 14.0 -> 14.1.
Success.
I finally got a build to be accepted.
I set ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO for the watch target.
I don't know how this might affect the actual running of the watch app, as I no longer have an Apple Watch to test it on, but the iOS app is running fine through TestFlight.

Archive distribution problem for watch extension app

We've been developing and testing a Watchkit Extension app (iOS 12.1 and WatchOS 5.1) for the past few months and successfully testing it on a simulator and local, connected devices (iPhoneX + Watch 4) using xCode 10.1.
This past week we built an archive for posting to App Store Connect. We got stuck in the Archive Organizer after archiving for release. The "Validate Content" button was disabled, the Version is blank, the Identifier is blank, and the Type is "Generic Xcode Archive". Unfortunately, all we can do is export the .app files from the Archive Organizer; we can't push the archive to App Store Connect.
We made sure the build scheme was set to Release and we archived to a Generic iOS and WatchOS device. We also set Skip Install for the three targets (iOS app, Watch app, Watch extension) to No as we assumed none of those are static libraries. We even tried every permutation of Skip Install settings. We looked at the issue in the following link and we have no Header steps in the Build Phases of any targets:
https://developer.apple.com/library/archive/technotes/tn2215/_index.html#//apple_ref/doc/uid/DTS40011221-CH1-PROJ
We have two frameworks we included in the project using carthage. We thought maybe these were causing issues, but we rolled back to a branch before we added them and still have the same problem.
We made sure the build in the Scheme is set to a single target and cleared out the Derived Data folder. Still no dice.
I’m not 100% sure from your question, but are you trying to push an archive of the watch app to the App Store?
If so, that’s not how you submit the app. The Watch app is embedded in the “regular” iOS app, and to distribute it you need to archive and submit that app as usual.
If I’ve misunderstood, feel free to ignore this!
I had the exact same problem. When I changed Skip install on the watch app and watch app extension to YES, it suddenly worked. No idea why.

Not able to install apple watch app

I created an application for Apple watch Model MJ3T2B/A using health kit. It is with watch OS version 2.0. I used Xcode version 7.3.1 to create the app and installed it in my iPhone using diawi. I am not able to run it directly since it said deployment version of watch app is 2.2 and the one i am using is 2.0.
When i enable Show App in Apple Watch it is automatically getting disabled after some time in iPhone(iOS 9.3.2) watch application. Do i need to use different xcode version to create my app? I am not getting any OS updates also in my iPhone app. It says watch OS 2.0 and software is upto date.
I got what was the issue. It is the deployment target which keeps me from installing the watch app. I changed the deployment target to 2.0 in Project->Build settings and now i am able to install the application
For me it helped to check "Window" > "Devices and Simulators". For the iPhone to which the relevant Apple Watch is paired, the name of the Apple Watch was shown as <null>. After unpairing the iPhone (right click > "Unpair Device") and pairing it again, the issues was gone.
Afterwards I was able to select the WatchKit App in the Schemes list and select the entry for "My iPhone + My Apple Watch" in the Device list and Run/Debug the app.
It has also sadly shown that the issue re-appears multiple times during the day and I have to repeat these steps.
I had to add ClockKit.framework as an Optional library under the watch app Extension "Link Binary With Library" Build Phases because I was using the WatchOS 5.0 function called CLKFullColorImageProvider which was causing the app to crash. But, before I did this, I set the deployment target to match that of the Watch OS (4.3 in my case) so the app would run from XCode and dump out the error. So, it seems that changing the deployment target is a good way to get the app to install in order to debug other problems.
I found this answer here: https://forums.developer.apple.com/thread/108598
I had a similar issue where the Apple Watch app would fail to install my Development Apple Watch App. I was able to finally get it installed by increasing the Bundle Number the iOS App and the WatchKit App.

Why does my WatchKit extension cause a "Waiting to attach" message on an actual Apple Watch but not in a simulator?

I have a published iOS app and am trying to add a WatchKit extension for it.
For now, all I have is a watch interface.storyboard with a single label just to verify the entire building process. The app runs fine on the simulator (iPhone 6 (8.3)) and the Watch simulator.
When I run it on the iPhone and Apple Watch, it runs on the iPhone, installs on the Apple Watch, but then just displays a wait status when trying to run it on the Apple Watch.
The error in Xcode says "Waiting to attach", and when I try to attach it via Xcode > Debug > Attach to Process, it says "Lost connection to iPhone".
I am using Xcode 6.3.1.
The Waiting to attach message is bothering many people. Here are a few things that you can do:
Build the main iPhone app first, then stop it and build the WatchKit app
Wait some time for the attachment to finish (it can take 20 seconds or so)
I found that tapping the app icon on the Apple Watch sometimes helps to re-establish a lost connection. After tapping the app icon, the app often starts to update. So tap on your Apple Watch app after the message Waiting to attachappears.
If waiting does not help, stop all processes (make sure that the stop button in Xcode becomes gray) and then build and run your code again
Sometimes, restarting Xcode helps to solve problems
Force-quit your app on the Apple Watch as explained here
If that still does not help, deinstall and reinstall your WatchKit extension using the Apple Watchapp on your iPhone
Other things you could try:
Clean your project
Uninstall and re-install your watch app using the Apple Watchapp on your iPhone
Delete your iPhone app from the device
Delete/recreate the target scheme
In the WatchKit app target settings, set "Skip Install" to NO
I discovered that my WatchKit Bundle Names in my info.plist were not consistent. Ensure that the prefixes are exactly correct.
It was really never working for me.
I was able to fix it to remove any specific architectures in the build settings of the app target and leave it to Automatic (remove ARCHS = ... in project file)
Restarting the watch solved this for me.
Press and Hold the side button until you see the Power Off Slider.
Drag the slider to turn off your device completely. (Note it is NOT a button to press)
After you turn off your Apple Watch, press and hold the side button again until you see the Apple logo.
From this Apple Support Page: https://support.apple.com/en-gb/HT204510
I was developing a findersync extension for Mac and faced similar issue with XCode 7.2.1 and i found my changing bundle identifier of the extension project, it fixes the issue. I know this is not a permanent solution but atleast it will help you keep going forward if nothing else works
I have the same issue I have already two watch apps in the App Store but the current project with only some Interface objects runs fine in simulator but not on the watch I get only the waiting symbol and then it switch back to the apps screen on the watch.
I found the issue it was a setting of the Build architecture in the build setting. I used Xcode automatic problem solver to change the old project.
Now it works fine.

Getting black screen on Watchkit simulator and "Waiting to Attach" when adding to existing project

I'm interested in adding a Watchkit Extension to my existing app already in the app store. I've done my research, followed some tutorials, and now am ready to actually implement.
The problem I'm having is, I can't seem to add a Watchkit App to my existing project and get it to run in the simulator. If I start a new project and do some tutorials or whatever, the Watchkit App runs fine. Adding to my existing project, I just get a black screen in the simulator window. Not even the status bar is present. http://i.imgur.com/kG7H06i.png
Only lead I have so far is: In the debug navigator, I get "Waiting to Attach" every time I try and launch the app. http://i.imgur.com/vYLfJN8.png
Any help on this would be appreciated. I reseting my simulators, tried deleting my simulators and then reinstalling. Double checked that bundle identifiers and versions match. Target for the WatchKit App and Extension are both set to 8.2 (I was getting an error setting to 8.3). Target on the main app is 6.0, but I tried bumping this up to 8.2 and had the same results.
Thanks!
EDIT: Before this is marked as a duplicate of How to run a WatchKit App, I do want to mention that I'm running the "Watchkit App" Scheme, and I do not have a status bar like in the window like he does.
Are you using iOS 8.2 simulator ?
I had similar error, switching to simulator with iOS 8.3 fixed it for me.
Check that your build target is the Watchkit App. I had it set to the main app so the main app was launching in the sim, but the watch app was blank.
referenced here.
How to run a WatchKit App
I am also running into a similar problem but not on the simulator but on the Apple Watch device. Try setting Skip Install to NO in the WatchKit App target settings
After working with Apple, it appears as if this was an issue with Xcode creating the target. Our app is several years old, and for some reason when creating any new target, the Wrapper Extension is set to "app" every time. This has caused us issues in the past with trying to add testing targets as well.
We were able to fix the issue by going to the Watchkit Extension target, and changing the Wrapper Extension from "app" to "appex". Make sure you leave the Watchkit App target to "app". We asked why Xcode wasn't doing this automatically for this particular project, and it's because the overall project target has the Wrapper Extension set. If you create a new project, you'll notice that Xcode now leaves this blank.
Hope this helps someone else.
Sometimes, restarting Xcode solves the problem.
Even if everything is configured correctly, it may take 20 seconds to attach the process to the debugger.
I tried everything but nothing helped. Then I backed up the watch app and watch extension folders. After that I removed the watch app and watch extension targets and created new targets. Then I restored the files from the backup. It's an awkward approach but it solved the "waiting to attach" problem.
Xcode 10.0; Swift 4.2; iOS 12.0
I had the same issue with Apple Watch simulator. What actually solved it was deleting the default Siri watch face from the Watch App on the iPhone simulator.

Resources