Curnelious
Curnelious

Reputation: 1

App extension name can't be identical to app name?

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

The project “name” already contains a target named “name”. Please choose a different name.

But obviously I want your app name and extension name to be the same, (like other app extensions such as Pocket).

The extension name that I chose is the name that actually appears on the extension menu, and not the container app name .

How would I give them the same name?

Upvotes: 7

Views: 2667

Answers (4)

tyirvine
tyirvine

Reputation: 2341

For Safari Extensions

If anyone is trying to figure out how to change the display name for a Safari App Extension, all you need to do is to go into the manifest.json and change the "name" field to whatever you'd like. ⤵︎

enter image description here

Upvotes: 0

user5371950
user5371950

Reputation:

I created a Test App & added the Share Extension with a different name but after that I changed the name of the Share Extension Target's "Bundle Display Name"...

Upvotes: 1

Mahanthesh Kumbar
Mahanthesh Kumbar

Reputation: 501

create a share extension with different name , in info.plistof share extension change the bundle display name to your app name.

Upvotes: 19

Stephen Darlington
Stephen Darlington

Reputation: 52565

It's not saying that you can't have an extension of the same name. It says you can't have a target with the same name.

Create the target with a sensible name. How about "App Extension"?

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

Upvotes: 4

Related Questions