Wednesday, July 15, 2015

Wow! finally found a workaround to run an app on the watch with beta3 software

I, like quite a few other folks, have been stuck trying to get anything to run on the hardware. Various combinations of code signing issues and so on were down the wrong path of getting a app to run. Thankfully "BJamUT" posted a reliable workaround to getting code on the phone/watch.  From Apple forums:
Jul 15, 2015 2:29 PM
Update: I can run (not debug) every time on the watch by installing an ad hoc distribution through iTunes.
  1. Product -> Archive  [You may have some code signing issues to figure out here--especially if you have multiple people who sign the builds for your organization.]
  2. Export... -> for Ad Hoc Distribution
  3. Uninstall the app from your iPhone.
  4. Drop the ipa file onto iTunes.
  5. Select your iPhone in iTunes, go to the Apps tab, and find the app you just dropped in.
  6. Click install.
  7. Click apply.
  8. Make sure that "Show App on Apple Watch" is selected in the Apple Watch app, and wait for it to install.
It should run at least.  I wasn't able to attach the debugger to the processes, but I was able to see the performance of the changes that I had already tested on the simulator.

The good news is that performance of button and table responsiveness is probably 10x that of beta 2 if you have lots of buttons.  It was tough to get it to run, but I feel like there was a treasure at the end of the hunt.
Yes, the downside is I'll have to resort to some sort of printf debugging here -- perhaps to a property panel or glance or something.  This code pattern doesn't seem to work with the debugger either.

Anyway, I can now take the code from last Saturday and distribute it into my phone via local iTunes. And the app with accelerometer processing starts up and runs even when the phone is offline or out of range!  This is the demo I have been working toward; having an application run "natively" on the Watch!

Status:

  • beta3 is reasonably stable
  • battery life is good
  • phone communication via wifi is disabled -- it is unreliable across cellular link changes
  • basic apps are working roughly
  • (waiting for next beta dump to reset all the "this works, this doesn't"...)


No comments:

Post a Comment