Pep's Diary

いろんなことを共有していきたいと思います。たまに持論を言います

【swift】submit時のエラーでめちゃくちゃ苦戦した話

今回ウィジェットを使ってアプリを作り、submitをしようとした時に、意味不明な3つのエラーが出ました。

iTunes Store operation failed.
Invalid Code Signing Entitlements. Your application bundle's signatire contains code signing entitlements that are not supported on iOS. Specifcally, value 'XXXXXXXXXX.com.my.app.XXX' for key 'application-identifier' in 'Payload/App Title.app/Plugins/StickerPackExtension.appex/StickerPackExtension' is not supported. This value should be a string starting with your TEAMID, followed by a dot '.', followed by the bundle identifier.

iTunes Store operation failed.
Invalid Code Signature Identifier. The identifier "com.my.app.XXX" in your code signature for "StickerPackExtension" must match its Bundle Identifier "com.my.app"

iTunes Store operation failed.
Bad bundle identifier. The bundle identifier 'com.my.app' of the application extension App Title.app/Plugins/StickerPackExtension.appex should start with the application's bundle identifier 'com.my.app' and not contain more than one period "." after the application bundle ID.

 

 まず、Extension系のbundle ID はcom.company.アプリ名.XXXと言うように、何かもう一つの文字を入れろと言われたので、.Widgetを付け加えてもう一度submitしてみました。

しかし、何も起こらず。そのまま3つのエラーが出たままでした。そこでExtension系のprovisioning profileはApp IDから全てメインのアプリとは違うものにしなければならないとう記事を見つけたので、新しく作り直して、provisioning profileをそれに設定しsubmitしました。

しかしまたもや何も起こらず。そして、ふと、bundle IDをcom.company.アプリ名.アプリ名Extensionのように、最後のXXXをユニークなものに変えてみました。そうしてもう一度submitすると、通りました!!

結局よくわからなかったけど、参考になれば幸いです。