Notification Service ExtensionのアーカイブでMultiple commands produce 'GoogleUtilities.framework'が出て困った話(備忘録)
Notification Service Extensionを追加時にPodfileに以下のように追加しました。
target 'App' do
use_frameworks!
pod 'Firebase/Analytics'
pod 'Firebase/Messaging'
end
target 'NotificationServiceExtension' do
use_frameworks!
pod 'Firebase/Analytics'
pod 'Firebase/Messaging'
end
するとアーカイブ時にMultiple commands produce 'GoogleUtilities.framework'が出現します。
GoogleUtilities.frameworkはFirebase(多分Coreかな?)内封されており明示的にpodfileに書いていなくてもFirebaseを入れると勝手にインストールされます。そして要はGoogleUtilitiesのcopy commandが重複しているが故に発生しています。
そこで明示的にメインターゲットとExtensionにpod 'GoogleUtilities'を追加します。
target 'App' do
use_frameworks!
pod 'Firebase/Analytics'
pod 'Firebase/Messaging'
pod 'GoogleUtilities'
end
target 'NotificationServiceExtension' do
use_frameworks!
pod 'Firebase/Analytics'
pod 'Firebase/Messaging'
pod 'GoogleUtilities'
end
ちなみにpod 'Firebase/Core'は明記不要になっており、これを書いておくと古いバージョンのFirebaseの各モジュールがインストールされます。