"New Target...">

The application extension name cannot be identical to the application name?

I have an application called "name" and I go to "File"> "New Target" in Xcode and choose a sharing extension, but when I try to give it a name identical to the name of the application (container), I get an error :

The project "name" already contains a target named "name". Choose a different name.

But, obviously, I want your application name and extension name to be the same (for example, other application extensions like Pocket).

The extension name I selected is the name that actually appears in the extension menu, not the name of the container application.

How can I give them the same name?

+4
source share
3 answers

create a shared extension with a different name, in info.plistthe shared extension, change the display name of the package to the name of your application.

+13
source

This does not mean that you cannot have an extension with the same name. It says that you cannot have a target with the same name.

Create a goal with a reasonable name. How about an app extension?

Then in Info.plist for extension you can give it the display name you want.

+2
source

Share , " "...

+1

Source: https://habr.com/ru/post/1608804/


All Articles