32

Xcode 9.1 Simulator 10.0 OSX 10.12.6

I would like to upload a new build of my sticker pack to iTunes Connect. But Product > Archive is grayed out. So I ran the Simulator and got ""Failed to set plugin placeholders for (name)."

Only one answer anywhere in the whole world -- delete Derived Data Folder. I did and got same error message.

BTW Under General in Xcode the Version is 1. The build is 1.4. Does the build number have to be changed somewhere else as well?

markgrant
  • 321
  • 1
  • 3
  • 4

10 Answers10

76

What worked for me, Go to your target Build Phases and on "Embedded App Extensions" check the "Copy only when installing" checkbox.

enter image description here

James Rochabrun
  • 2,459
  • 17
  • 17
29

I had the same problem today. In my situation I had a different identifier in my original app than in the extension identifier "base". The extension has to have the same identifier as the original app plus something else.

E.g:

  • Dummy App: com.company.dummy-app
  • Dummy App Extension: com.company.dummy-app.extensionName

After Xcode told me that, I changed my wrong names to look like above and then the problem occurred: The problem was, that I had "automatic manage signing" turned on but Xcode didn't recognize that I changed the identifier.

Solution: Just change the identifier again and check if "automatic manage signing" has created a new provisioning profile. Deleting derived data may also helps.

d.ennis
  • 3,375
  • 2
  • 25
  • 35
  • 1
    This worked for me. Even though Xcode labeled the correct bundle id in the provisioning profile info modal. I just had to continually add and remove letters from my bundle ID until the certificates were correctly assigned. – Dylan Moore Jul 26 '18 at 04:59
7

It took me a while to find the fix for this. First go to build phases click the X beside the embedded and delete it. This should fix the problem it is what worked for me.

5

You must have different bundleIds for your project and extension.

Example:

  • App bundleId: com.companyName.appName
  • Extension bundleId: com.companyName.appName.extensionName

I got this error when I set one configuration file for my project and notification service.

I changed the notification service configuration file to the correct one and this fixed my problem. enter image description here

maxwell
  • 2,734
  • 6
  • 20
  • 34
3

This is the solution:

app bundle identifier: com.SohaibSiddique.ShopApp
extension bundle identifier: com.SohaibSiddique.ShopApp.Notification

It may work for you.

double-beep
  • 3,889
  • 12
  • 24
  • 35
Sohaib Siddique
  • 337
  • 4
  • 13
2

It may also happen if the bundle identifier of the extension doesn't have the app identifier as a prefix.

E.g. this would raise the OP issue:

  • com.example.App
  • com.example.AppExtension

Instead:

  • com.example.App
  • com.example.App.Extension

will work as expected.

keeshux
  • 526
  • 2
  • 8
2

Click details button in Error prompt and check the error log. In mycase it was "bundleVersion must be set in placeholder attributes for a plugin placeholder", Build version was empty in one of my target led me into this error.

jeff ayan
  • 660
  • 1
  • 10
  • 15
1

A clean and rebuild will often fix this issue. If that doesn't work, try removing appex files which often cache items which xcode should have rebuilt:

find ~/Library/Developer/Xcode/DerivedData -name "*.appex" -exec rm -fr {} \;
JamesDill
  • 1,709
  • 16
  • 22
1

In my case, even though I was respecting the your.bundle.identifiex.<+extensionSuffixHere> format, I had both the Widget and AppExtension with the same bundle Id.

Apparently, even though on build time it doesn't create any problem, on runtime it gave me this error. So remember to set differently in case you're in the same situation!

Alessandro Francucci
  • 1,162
  • 13
  • 22
0

Product->Clean Build Folder

Solved it for me.

Stephen
  • 233
  • 2
  • 9