26
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Embedded FrameworkでCarthageライブラリを利用する際の注意点(CFBundleIdentifier Collision)

Posted at

概要

Embedded Frameworkを組み込んだアプリをAppStoreの審査に提出しようとしたところ、アーカイブの検証の際に下記のエラーが表示され、つまづいたので記事にまとめます。

エラー内容

CFBundleIdentifier Collision. There is more than one bundle with the CFBundleIdentifier value under the iOS application <アプリ名>.

エラー文言によると、導入したCarthageライブラリのバンドルIDが複数同じものが存在し、衝突したようです。

image.png

アプリ構成

アプリの構成は下記のように、OSSライブラリに依存するEmbedded Frameworkを作成し、さらにそのFrameworkをアプリから利用していました。依存関係はCarthageによって解消しています。

Application
↓
Embedded Framework(Carthageで導入)
↓
OSS Libraries(Carthageで導入)

原因と対処方法

iOSアプリではFrameworkのネストが許されておらず、Frameworkがネストしている場合はAppStoreの審査に提出することができないようです。
今回のケースでは、Embedded FrameworkおよびApplicationの両方でBuild Phasesにてframeworkのcopyを行ってしまっていました。
image.png

copyをEmbedded Frameworkでは行わず、全てアプリケーション側でcopyすることで解決します。

まとめ

  • iOSアプリではFrameworkのネストが許可されていない
  • Embedded FrameworkではCarthageライブラリのcopyは行わないようにする
26
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
26
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?