Closed yakovmanshin closed 3 years ago
I found a few problems with this issue:
The -ObjC
option needs to be added to the app's build settings. It should not be added to a Package.swift
. See the screenshot in https://github.com/firebase/firebase-ios-sdk/blob/master/SwiftPackageManager.md
Step 1: Describe your environment
Step 2: Describe the problem
The SPM integration guide mentions the
-ObjC
linker flag which must be added when Firebase Analytics is used.However, when Firebase is integrated via a Swift package and once this flag is added to the package’s target, it’s no longer possible to use the package in the iOS app due to the
The package product 'MyPackage' cannot be used as a dependency of this target because it uses unsafe build flags
error.Steps to reproduce:
Package.swift
, add Firebase Analytics as one of the package’s targets’ dependency;-ObjC
flag inlinkerSettings
for that target (see below);