【Swift4】file was built for archive which is not the architecture being linked (armv7s)というエラーの対処法【Objective-C】

2020年8月26日

CocoaTouchFrameworkでオリジナルのフレームワークを作成し、そのフレームワークを導入したアプリを審査に出そうとアーカイブしたとろこ以下のようなエラーがでました。

ld: warning: ignoring file ~~/~~/Hoge.framwork, file was built for archive which is not the architecture being linked (armv7s):~~/~~/Hoge.framwork

作成したフレームワークにarmv7sのアーキテクチャが見つからないといエラーのようです。

file was built for archive which is not the architecture being linked (armv7s)というエラーの対処法

TARGETS > Build Setting > Architectures > Build Active Architecture OnlyをNOに設定します。デフォルトではYESになっていますがこの状態だとarmv7のライブラリしか作成されないようです。