0

I'm entirely new to development for Apple Platforms. I started by installing Xcode and setting up a new watchOS project. I noticed that I have three "products" within my new project:

  1. My App
  2. My App WatchKit App
  3. My App WatchKit Extension

The first one seems to be the actual AppStore target, the second one the actual app and not sure about the third one. My code resides in the "My App WatchKit Extension" while "My App WatchKit App" just contains an asset catalog and the Info.plist file.

Unfortunately, my App shows up on watchOS devices as "My App WatchKit App". I just want it to be "My App" obviously. I could change the "Product Name" property of "My App WatchKit App" to "My App". However, it defaults to "$(TARGET_NAME)". So I'm unsure if I should rename the whole target or just set the "Product Name" property of the "My App WatchKit App" target. What are the best practices here?

LuMa
  • 1,673
  • 3
  • 19
  • 41

1 Answers1

1

Is your project a watch-only app, or a watchOS app with an iOS app? Although it doesn't matter that much in this case, it is just important to know if you are completely new.

When you were setting up a new Xcode project, there was a window where you had to provide your product name. And that is the name of your app.

To solve this particular case, I would do the following: Go to the Info.plist file (it is in the folder of WatchKit App); change the value for the key Bundle display name to what your app's name is.

And when you run your app, it should display just as you expect.

And regarding the 'three' properties you mentioned, you may read this article: https://developer.apple.com/documentation/watchkit/creating_independent_watchos_apps/setting_up_a_watchos_project by Apple where it explains concisely what each folder does.

Let me know if anything is unclear.

Asol
  • 349
  • 3
  • 9
  • Ah, thanks for clarification. Yes, completely new. A lot of stuff was straight forward. But I kinda struggled with the naming. I wasn't sure if renaming all the targets makes sense or is a best practice. But the article kinda explained it and I managed to get it renamed properly using the method you explained :) – LuMa Jan 22 '21 at 21:25