Submitting a WatchKit app
In the spirit of our increasingly cross-platform company, I thought I'd start posting some iOS development tips as they occur to me. I've been coding in iOS since the launch of the official App Store (I had one of the first apps on it) and it's something I enjoy doing very much. I'm currently experimenting with Apple Watch apps, and so far the trickiest part has been getting them ready for submitting to the Store.
Tips for submitting Watch Kit Apps
Once you have your Apple Watch app working in your emulator and running on your test device, set aside some time to get it ready for the store. The first time you try it might take longer than expected.
- When making icons for the Watch Kit app, I recommend using an app called “Asset Catalog Creator” from the Mac App Store. It checks you haven’t done something illegal like using PNG files with transparency as a Watch Kit icon, and automates the creation of all the different sizes
Now it’s time to get the AppIDs and Provisional Profiles configured. i.e. What's known in my office as "The Dark Arts".
- Go to the Apple Developer portal, and create some AppIDs for:
- Your app (you’ve probably done this if you are adding Watch Kit support to an existing app)
- The WatchKit App (com.company.AppName.watchkitapp)
- The WatchKit Extension (com.company.AppName.watchkitextension)
Double check your spelling is consistent. A mistake here is time consuming to fix later, not to mention annoying. Yes, I've made this mistake.
- Go the Apple Developer portal, and create some Provisioning profiles. (Select Distribution profiles for the Store, as these work for the Store and for Test Flight). Make profiles for:
- Your app (you may have done this already, as above.)
- A profile using the watchkitapp AppID you created above,
- A profile using the watchkitappextension AppID you created above.
When it comes to naming, I name them <appname> <store> <date> to help me keep track e.g. “MyApp Store May15” or “MyApp AdHoc June14”.
Double check your spelling is still consistent!
Now download these provisioning profiles so Xcode can use them.
- Go into the target for the app, watchkitapp, and watchkitextension and make sure the provisional profiles are listed in the correct places. The correct places are reached from..
- Targets / App / Build Settings
- Targets / App Watch Kit App / Build Settings
- Targets / App Watch Kit Extension / Build Settings
Enter “Code Sign” in the search bar to jump to the relevant section, and ror each, make sure you:
- Set the provisioning profile to match the correct one you downloaded,
- Set the Release value (and the "Any IOS SDK" setting underneath) explicitly to DISTRIBUTION.
- Remember that if the build fails, chances are Xcode changed one of those back for you to an incorrect value. You’re welcome.
Finally make sure you have the same Build and Version numbers. They must be exactly the same - 1.0 is not the same at 1.
You should then be able to create an Archive, validate it, and submit it. I recommend using TestFlight to be certain it can be accepted to the Store (based on AppID etc, not content or quality!). Yes, unless you are updating an existing TestFlight version, this can take an extra day or two. It’s probably worth it.
For more information, check out this excellent Blog post from ex-Microsoftie Mike Swanson.