watchOS only targets broken in Xcode 15 RC?

Got a little app I am trying to build before launch, I've never built a watch only app, and it requires iOS 17 so I'm a bit stuck. When creating a watch only target, it seems that the template is broken. According to this: https://developer.apple.com/documentation/watchos-apps/creating-independent-watchos-apps/

There should be a blank iOS app target, that contains the watch app. The problem is once I go to build and upload the app to test flight, I get a bundle that Xcode has no clue what to do with (Because it only contains the watchkit app, and no containing xcode app.)

I'm guessing my only hope might be to create a watch only app targetted at iOS 9 with Xcode 14, then migrating to Xcode 15? I'm trying that now, but I guess I have another radar to file unless I'm missing something.

Post not yet marked as solved Up vote post of jclardy Down vote post of jclardy
1.3k views

Replies

Can you clarify the following points?

  • Watch-only apps don't require iOS 17, by definition, since the watch app is never installed on iOS. Do you mean that the app requires watchOS 10?
  • In what way is the template broken?
  • There's an iOS stub target, but the Watch App target is adjacent to it, not contained by it.
  • What is meant by "I get a bundle that Xcode has no clue what to do with (Because it only contains the watchkit app, and no containing xcode app.)"?
  • How are you submitting your archive? What error do you get when you do?

A Feedback with your project attached and the steps you are following to archive it for distribution to the App Store would likely give us the info we need to figure out what's wrong.

  • Also, please post the FB number here once you've filed so we can find it quickly. Thanks!

Add a Comment

@Frameworks Engineer Thanks for the reply - it seems my Mac/Xcode were just having some issues that day fixed by rebooting. What was happing was this iPhone stub target wasn't getting created, but on the test project I created today, it is working again. The app also was given a bundle identifier of .watchkitapp without appending the co.swiftfox.AppName, so it seems like somehow I was passing an empty app name string into the creation dialog.

I ended up just building an iPhone version of the watch app in question, so it worked out.

This is still a problem in Xcode 15.0.1 (& the current 15.1 Beta), and it does look like an issue with the project template. @jclardy did it work going back to Xcode 14 to create the initial project, or did you give up on the stand alone watch app and produce one with the parent iOS app?

I'm seeing exactly the same symptoms when trying to create a stand alone watch app. No iOS stub target at all, and the watch app target has an identifier of just ".watchkitapp" even though I've been through the process multiple times, making sure I give a proper bundle identifier during creation.

It also doesn't set the relevant plist values for a stand alone watch app e.g. "App can run independently of companion iPhone app", or "App is available only on Apple Watch".

If I correct the bundle identifier, and try archiving, I just get an empty "generic" archive with no app in it.

Logged feedback #13265919

Create watch only app:

This is what you get:

Do the following steps resolve the issue?

  1. Quit Xcode if it’s running.
  2. Run the following command in Terminal (without the quotes) to remove your last-used template settings: defaults delete com.apple.dt.Xcode IDETemplateOptions
  3. Try creating an Apple Watch application from the template.

@Frameworks Engineer I was experiencing the same problem as @siburb where the stub iOS app wasn't being created. Running that Terminal command and a new Watch only project now has a stub iOS app. Hurrah! I'm running Xcode 15.2 (15C500b) on macOS 14.3.1 (23D60).