0
0

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 1 year has passed since last update.

FlutterでiOSのネイティブ部分のテストを追加したら error: Multiple commands produce '/パス/GoogleUtilities.framework':

Posted at

FlutterアプリでiOSネイティブ部分の実装が複雑になってきたので、単体テストを追加してテスト用のTargetを追加したところ、以下のエラーが出力されipaの生成ができなくなってしまいました。

    Multiple targets match implicit dependency for linker flags '-framework GoogleUtilities'. Consider adding an explicit dependency on the intended target to resolve this ambiguity. (in target 'Runner' from project 'Runner')
    Multiple targets match implicit dependency for linker flags '-framework GoogleUtilities'. Consider adding an explicit dependency on the intended target to resolve this ambiguity. (in target 'Runner' from project 'Runner')

❌  error: Multiple commands produce '/パス/GoogleUtilities.framework':

原因

テストではFlutterは不要かと思い、Podfileは以下の状態になっていました。

target 'Runner' do
  platform :ios, '13.0'
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))

  pod 'RealmSwift'
  pod 'GoogleMaps', '5.1.0'
  # 他必要なライブラリ郡
end

target 'myTests' do
  platform :ios, '13.0'
  use_frameworks!
  use_modular_headers!

  pod 'RealmSwift'
  pod 'GoogleMaps', '5.1.0'
  # 他必要なライブラリ郡
end

しかし以下の行も必要だったようで、この行を追加したら無事にArchiveできるようになりました。

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))

根本的な理由は調べきれていません。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?