Apple Watchkit Simulator Issue: Sperrorinvalidbundlenogizmobinarymessage

Apple Watchkit simulator issue: SPErrorInvalidBundleNoGizmoBinaryMessage

Did you change the bundle ID of your app? If so you may need to manually update the WKAppBundleIdentifier in the WatchKit Extension and also the WKCompanionAppBundleIdentifier in the WatchKit App.

iOS WatchKit - Error launching watch app SPErrorInvalidBundleNoGizmoBinaryMessage

Ok figured it out. I was pretty close.
It seems that the WatchKit Extension Bundle Identifier cannot contain the WatchKit App Bundle Identifier.

So my problem was that

com.nitwitstudios.myWatchApp.watchkit.extension 

was too similar to

com.nitwitstudios.myWatchApp.watchkit

Changed my extension identifier to the below and voilà, I can now send two-way messages using MMWormhole library:

com.nitwitstudios.myWatchApp.extension

Apple Watch Simulator Won't Start

Once you are running the simulator go to Hardware -> External displays and chose the Apple watch size you want to simulate. This should show another window.

No Simulators showing up under my Watchkit target

There are other strange things about that scheme that you're displaying there. The WatchKit Extension would not normally appear there, nor should any of those CocoaPods. (I am assuming that the ThemoDiemExtension is the WatchKit Extension. If it is some other kind of Extension, perhaps it might be intended to appear there?)

Try selecting "New Scheme..." at the bottom of that menu, and create a new clean Scheme that includes your app and your watchKit App. You may also want to select "Manage Schemes..." and see if you can see anything clearly wrong with the current one.

I presume you have already tried the "More simulators..." option under the "Mickey's iPhone (no paired Apple Watch)"?

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

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.

Debug WatchKit on real Apple Watch - Nothing happens

thank you for your answers. I finally managed to get the debugging running (most of the time) on my real Apple Watch. However it is quite cumbersome and not very reliable. There is not enough space in the comments so I will use this answer to describe my solution. Maybe it is help full to other:

  1. Make sure, the App on your Watch is not running (as BalestraPatrick described). Launch the app and hold the side button a few seconds to bring up the "Turn off your Watch" dialog. Hold the side button for another few seconds to close the app and to return to the Watch homescreen.
  2. Make sure the iPhone is not locked.

  3. Select the WatchKit App target and your real iPhone and run the project.

  4. Running the Watch App resulted quite often in an error SPErrorInvalidBundleNoGizmoBinaryMessage. Re-starting Xcode and cleaning both the Watch App and the App target solved this.
  5. If the build of the Watch App succeed there will be a short message in Xcode but nothing on your iPhone or Watch. If you have made changes to the Watch App it will take a few seconds to refresh the app on the Watch. This is indicated by the progress-circle overlay over the app icon. If you made no changes ore once the app has been transfered: Launch the watch app manually by tapping the icon. There will be no automatic launch.
  6. In most cases Xcode will recognize the app launch and attach its debugger to it. This will allow to use breakpoints, inspect the code, etc.

In my case I whanted to inspect how the iPhone App handles the application:handleWatchKitExtensionRequest:reply: call when the app was not active before. This is important because this cannot be done using the simulator. If the app takes to long to handle the request the Watch will receive no valid response.

After following the steps described above Xcode is only attached the watch app and will not hold on breakpoints in the iPhone app code. To do this, one has to manually attach the Debugger to the iPhone app process that is started when the watch app sends its call.

To be able to attach the debugger I added a delay to the apps main function: [NSThread sleepForTimeInterval:5]:

  1. Select function in Watch App that will start the call to the iPhone App
  2. The iPhone App will be launched in background. The delays gives you 5 seconds to attach the debugger.
  3. Choose Debug\Attach To Process\Likely Targes\Your iPhone Appin Xcode to attach the debugger.
  4. After the 5 seconds delay the process will continue and you will be able to use breakpoints in your iPhone app code as well.
  5. Do not forget do remove the delay code when you finished testing :-)

NOTE:
You will not be able to see NSLog output (or any console output at all) from the iPhone App since attaching the debugger does NOT re-route the console output.

Happy testing with this awesome new Apple product :-P

watchkit companion app failed to start

I had to remove this from the plist file.

<key>UIApplicationExitsOnSuspend</key>
<true/>


Related Topics



Leave a reply



Submit