Onesignal-flutter-sdk: Building IOS app results in error (when using Firebase)

Created on 9 Dec 2019  Â·  27Comments  Â·  Source: OneSignal/OneSignal-Flutter-SDK

TL;DR for the ones who just got here
In order to fix this add the firebase pods from your xcode error to the onesignal target, as a workaround

Description:

Running flutter build ios throws an error (see bottom of issue)

EDIT: Changing to ^2.3.1 prints the second error
EDIT 2: It turned out that the OneSignal target also tries to compile with the Firebase pods, adding them to the target worked as a workaround

Environment
OneSignal flutter: ^2.0.0 (pub.dev)

Steps to Reproduce Issue:

  1. Follow the setup tutorial https://documentation.onesignal.com/docs/flutter-sdk-setup
  2. Run flutter build ios or flutter run with an iOS device connected

Anything else:
```
2019-12-09 16:13:56.784 xcodebuild[2261:23606] DTDeviceKit: deviceType from f5a636663df701faeeb802603d17d40e58668839 was NULL
2019-12-09 16:13:56.934 xcodebuild[2261:23801] DTDeviceKit: deviceType from f5a636663df701faeeb802603d17d40e58668839 was NULL
* BUILD FAILED *

Xcode's output:
↳
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:21:
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Private/GDTRegistrar_Private.h:17:
In file included from /Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTRegistrar.h:19:
In file included from /Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTPrioritizer.h:19:
/Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTLifecycle.h:26:11: error: duplicate protocol definition of 'GDTLifecycleProtocol' is ignored [-Werror,-Wduplicate-protocol]
@protocol GDTLifecycleProtocol
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:17:
/Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Public/GDTLifecycle.h:26:11: note: previous definition is here
@protocol GDTLifecycleProtocol
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:21:
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Private/GDTRegistrar_Private.h:17:
In file included from /Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTRegistrar.h:19:
In file included from /Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTPrioritizer.h:19:
/Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTLifecycle.h:59:1: error: duplicate interface definition for class 'GDTLifecycle'
@interface GDTLifecycle : NSObject
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:17:
/Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Public/GDTLifecycle.h:59:12: note: previous definition is here
@interface GDTLifecycle : NSObject
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:21:
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Private/GDTRegistrar_Private.h:17:
In file included from /Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTRegistrar.h:19:
/Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTPrioritizer.h:51:37: error: reference to 'GDTLifecycleProtocol' is ambiguous
@protocol GDTPrioritizer
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:21:
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Private/GDTRegistrar_Private.h:17:
In file included from /Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTRegistrar.h:19:
In file included from /Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTPrioritizer.h:19:
/Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTLifecycle.h:26:11: note: candidate found by name lookup is 'GDTLifecycleProtocol'
@protocol GDTLifecycleProtocol
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:17:
/Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Public/GDTLifecycle.h:26:11: note: candidate found by name lookup is 'GDTLifecycleProtocol'
@protocol GDTLifecycleProtocol
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:21:
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Private/GDTRegistrar_Private.h:17:
In file included from /Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTRegistrar.h:19:
/Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTPrioritizer.h:51:37: error: cannot find protocol declaration for 'GDTLifecycleProtocol'
@protocol GDTPrioritizer
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:21:
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Private/GDTRegistrar_Private.h:17:
In file included from /Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTRegistrar.h:21:
/Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTUploader.h:28:34: error: reference to 'GDTLifecycleProtocol' is ambiguous
@protocol GDTUploader
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:21:
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Private/GDTRegistrar_Private.h:17:
In file included from /Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTRegistrar.h:19:
In file included from /Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTPrioritizer.h:19:
/Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTLifecycle.h:26:11: note: candidate found by name lookup is 'GDTLifecycleProtocol'
@protocol GDTLifecycleProtocol
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:17:
/Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Public/GDTLifecycle.h:26:11: note: candidate found by name lookup is 'GDTLifecycleProtocol'
@protocol GDTLifecycleProtocol
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:21:
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Private/GDTRegistrar_Private.h:17:
In file included from /Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTRegistrar.h:21:
/Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTUploader.h:28:34: error: cannot find protocol declaration for 'GDTLifecycleProtocol'
@protocol GDTUploader
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:21:
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Private/GDTRegistrar_Private.h:17:
/Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTRegistrar.h:26:37: error: reference to 'GDTLifecycleProtocol' is ambiguous
@interface GDTRegistrar : NSObject
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:21:
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Private/GDTRegistrar_Private.h:17:
In file included from /Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTRegistrar.h:19:
In file included from /Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTPrioritizer.h:19:
/Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTLifecycle.h:26:11: note: candidate found by name lookup is 'GDTLifecycleProtocol'
@protocol GDTLifecycleProtocol
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:17:
/Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Public/GDTLifecycle.h:26:11: note: candidate found by name lookup is 'GDTLifecycleProtocol'
@protocol GDTLifecycleProtocol
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:21:
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Private/GDTRegistrar_Private.h:17:
/Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTRegistrar.h:26:37: error: no type or protocol named 'GDTLifecycleProtocol'
@interface GDTRegistrar : NSObject
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:22:
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Private/GDTStorage_Private.h:17:
/Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Private/GDTStorage.h:27:51: error: reference to 'GDTLifecycleProtocol' is ambiguous
@interface GDTStorage : NSObject
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:21:
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Private/GDTRegistrar_Private.h:17:
In file included from /Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTRegistrar.h:19:
In file included from /Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTPrioritizer.h:19:
/Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTLifecycle.h:26:11: note: candidate found by name lookup is 'GDTLifecycleProtocol'
@protocol GDTLifecycleProtocol
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:17:
/Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Public/GDTLifecycle.h:26:11: note: candidate found by name lookup is 'GDTLifecycleProtocol'
@protocol GDTLifecycleProtocol
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:22:
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Private/GDTStorage_Private.h:17:
/Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Private/GDTStorage.h:27:51: error: cannot find protocol declaration for 'GDTLifecycleProtocol'
@interface GDTStorage : NSObject
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:23:
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Private/GDTTransformer_Private.h:17:
/Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Private/GDTTransformer.h:33:39: error: reference to 'GDTLifecycleProtocol' is ambiguous
@interface GDTTransformer : NSObject
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:21:
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Private/GDTRegistrar_Private.h:17:
In file included from /Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTRegistrar.h:19:
In file included from /Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTPrioritizer.h:19:
/Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTLifecycle.h:26:11: note: candidate found by name lookup is 'GDTLifecycleProtocol'
@protocol GDTLifecycleProtocol
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:17:
/Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Public/GDTLifecycle.h:26:11: note: candidate found by name lookup is 'GDTLifecycleProtocol'
@protocol GDTLifecycleProtocol
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:23:
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Private/GDTTransformer_Private.h:17:
/Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Private/GDTTransformer.h:33:39: error: no type or protocol named 'GDTLifecycleProtocol'
@interface GDTTransformer : NSObject
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:24:
/Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Private/GDTUploadCoordinator.h:33:33: error: reference to 'GDTLifecycleProtocol' is ambiguous
: NSObject
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:21:
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Private/GDTRegistrar_Private.h:17:
In file included from /Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTRegistrar.h:19:
In file included from /Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTPrioritizer.h:19:
/Users/User/appname/build/ios/Debug-iphoneos/GoogleDataTransport/GoogleDataTransport.framework/Headers/GDTLifecycle.h:26:11: note: candidate found by name lookup is 'GDTLifecycleProtocol'
@protocol GDTLifecycleProtocol
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:17:
/Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Public/GDTLifecycle.h:26:11: note: candidate found by name lookup is 'GDTLifecycleProtocol'
@protocol GDTLifecycleProtocol
^
In file included from /Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:24:
/Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/Private/GDTUploadCoordinator.h:33:33: error: cannot find protocol declaration for 'GDTLifecycleProtocol'
: NSObject
^
/Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:74:38: error: no visible @interface for 'GDTTransformer' declares the selector 'appWillBackground:'
[[GDTTransformer sharedInstance] appWillBackground:application];
~~~~~~~ ^~~~~
/Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:77:34: error: no visible @interface for 'GDTStorage' declares the selector 'appWillBackground:'
[[GDTStorage sharedInstance] appWillBackground:application];
~~~~~~~ ^~~~~
/Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:80:44: error: no visible @interface for 'GDTUploadCoordinator' declares the selector 'appWillBackground:'
[[GDTUploadCoordinator sharedInstance] appWillBackground:application];
~~~~~~~~~ ^~~~~
/Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:83:36: error: no visible @interface for 'GDTRegistrar' declares the selector 'appWillBackground:'
[[GDTRegistrar sharedInstance] appWillBackground:application];
~~~~~~~ ^~~~~
/Users/User/appname/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTLibrary/GDTLifecycle.m:90:38: error: no visible @interface for 'GDTTransformer' declares the selector 'appWillForeground:'
[[GDTTransformer sharedInstance] appWillForeground:application];
~
~~~~~~ ^~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Debug-iphoneos/onesignal_flutter'
ld: framework not found onesignal_flutter
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Could not build the precompiled application for the device.

Error launching application on iPhone von Link.```

```Text
Xcode build done. 18,5s
Failed to build iOS app
Error output from Xcode build:
↳
* BUILD FAILED *

Xcode's output:
↳
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Release-iphoneos/FirebaseAuth'
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Release-iphoneos/FirebaseCore'
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Release-iphoneos/FirebaseCoreDiagnostics'
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Release-iphoneos/FirebaseFirestore'
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Release-iphoneos/FirebaseInstanceID'
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Release-iphoneos/GTMSessionFetcher'
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Release-iphoneos/GoogleDataTransportCCTSupport'
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Release-iphoneos/GoogleUtilities'
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Release-iphoneos/abseil'
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Release-iphoneos/android_intent'
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Release-iphoneos/cloud_firestore'
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Release-iphoneos/devicelocale'
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Release-iphoneos/firebase_analytics'
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Release-iphoneos/firebase_auth'
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Release-iphoneos/firebase_core'
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Release-iphoneos/flutter_inappbrowser'
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Release-iphoneos/flutter_nfc_reader'
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Release-iphoneos/fluttertoast'
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Release-iphoneos/gRPC-C++'
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Release-iphoneos/gRPC-Core'
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Release-iphoneos/leveldb-library'
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Release-iphoneos/onesignal_flutter'
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Release-iphoneos/shared_preferences'
ld: warning: directory not found for option '-F/Users/User/appname/build/ios/Release-iphoneos/url_launcher'
ld: framework not found FirebaseAuth
clang: error: linker command failed with exit code 1 (use -v to see invocation)```

Not OneSignal Compatibility Issue

All 27 comments

Hello,
Are you sure you added the SDK correctly? Please take another look at the setup guides and make sure you followed it carefully.

We checked that several times. Why also die the whole Setup guide again and it did Not Change anything

Could it be related to me adding use_framework! because I saw an issue on that but it was closed

run "pod repo update", if still have problem please send your Podfile configuration.

Adding the firebase dependecies from the Runner Target to the OneSignal target fixed it

@DRSchlaubi what did you do to add the firebase dependancies to the onesignal target, i'm not sure how to do it

I just added the Firebase pods to the OneSignal target in the Podfile for me it was Firebase/Core and Firebase/Firestore iirc

excellent thanks for your help i've got it running now!!

the issue still is not fixed tough as you have to manually add some dependency to the OneSignal target you should not need to add

I got that error too when I add OneSignal, after I run Flutter build ios I got failed build

here is message

Automatically signing iOS for device deployment using specified development team in Xcode project: YA4E6DJXE2
Running Xcode build...
Xcode build done. 58.3s
Failed to build iOS app
Error output from Xcode build:
↳
2020-01-18 10:38:50.870 xcodebuild[25767:1956730] DTDeviceKit: deviceType from 00008006-0010B9E13653002E was NULL
2020-01-18 10:38:50.972 xcodebuild[25767:1956704] [MT] DTDeviceKit: deviceType from 00008006-0010B9E13653002E was NULL
2020-01-18 10:38:50.976 xcodebuild[25767:1956704] [MT] DTDeviceKit: deviceType from 00008006-0010B9E13653002E was NULL
2020-01-18 10:38:50.979 xcodebuild[25767:1956704] [MT] DTDeviceKit: deviceType from 00008006-0010B9E13653002E was NULL
2020-01-18 10:38:51.574 xcodebuild[25767:1956704] [MT] iPhoneConnect: 📱 == Underlying device preparation errors ==
2020-01-18 10:38:51.575 xcodebuild[25767:1956704] [MT] iPhoneConnect: 📱 -- Failed _shouldMakeReadyForDevelopment check even though device is not locked by passcode.
Domain: com.apple.platform.iphoneos
Code: 5
Failure Reason: allowsSecureServices: 1. isConnected: 0. Platform: TPlatform:0x7fed7b308f20:'com.apple.platform.iphoneos':>. DTDKDeviceIdentifierIsIDID: 0
--
2020-01-18 10:38:51.575 xcodebuild[25767:1956704] [MT] iPhoneConnect: 📱 == END: Underlying device preparation errors ==
2020-01-18 10:38:51.665 xcodebuild[25767:1956704] [MT] DTDeviceKit: deviceType from 00008006-0010B9E13653002E was NULL
2020-01-18 10:38:51.672 xcodebuild[25767:1956704] [MT] DTDeviceKit: deviceType from 00008006-0010B9E13653002E was NULL
2020-01-18 10:38:51.676 xcodebuild[25767:1956704] [MT] DTDeviceKit: deviceType from 00008006-0010B9E13653002E was NULL
* BUILD FAILED *

Xcode's output:
↳
Building AOT snapshot in release mode (ios-release)...
Building App.framework for arm64...

Building App.framework for armv7...
Building AOT snapshot in release mode (ios-release)...             50.3s
Built to build/aot/.
warning: parsing line table prologue at offset 0x6f697463 found unsupported version 0x00
warning: line table parameters mismatch. Cannot emit.
note: while processing /Users/longsmacbook/Desktop/Romanson/LabelStoreMax/build/aot/armv7/snapshot_assembly.o
Project /Users/longsmacbook/Desktop/Romanson/LabelStoreMax built and packaged successfully.
/Users/longsmacbook/Desktop/Romanson/LabelStoreMax/ios/Runner/GeneratedPluginRegistrant.m:6:9: fatal error: 'device_info/DeviceInfoPlugin.h' file not found
#import <device_info/DeviceInfoPlugin.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
/Users/longsmacbook/Desktop/Romanson/LabelStoreMax/ios/Runner/GeneratedPluginRegistrant.m:6:9: fatal error: 'device_info/DeviceInfoPlugin.h' file not found
#import <device_info/DeviceInfoPlugin.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning build
note: Constructing build description

Encountered error while building for device.
Process finished with exit code 1

here is message

Automatically signing iOS for device deployment using specified development team in Xcode project: YA4E6DJXE2
Running Xcode build...
Xcode build done. 58.3s
Failed to build iOS app
Error output from Xcode build:
↳
2020-01-18 10:38:50.870 xcodebuild[25767:1956730] DTDeviceKit: deviceType from 00008006-0010B9E13653002E was NULL
2020-01-18 10:38:50.972 xcodebuild[25767:1956704] [MT] DTDeviceKit: deviceType from 00008006-0010B9E13653002E was NULL
2020-01-18 10:38:50.976 xcodebuild[25767:1956704] [MT] DTDeviceKit: deviceType from 00008006-0010B9E13653002E was NULL
2020-01-18 10:38:50.979 xcodebuild[25767:1956704] [MT] DTDeviceKit: deviceType from 00008006-0010B9E13653002E was NULL
2020-01-18 10:38:51.574 xcodebuild[25767:1956704] [MT] iPhoneConnect: 📱 == Underlying device preparation errors ==
2020-01-18 10:38:51.575 xcodebuild[25767:1956704] [MT] iPhoneConnect: 📱 -- Failed _shouldMakeReadyForDevelopment check even though device is not locked by passcode.
Domain: com.apple.platform.iphoneos
Code: 5

Failure Reason: allowsSecureServices: 1. isConnected: 0. Platform: . DTDKDeviceIdentifierIsIDID: 0

2020-01-18 10:38:51.575 xcodebuild[25767:1956704] [MT] iPhoneConnect: 📱 == END: Underlying device preparation errors ==
2020-01-18 10:38:51.665 xcodebuild[25767:1956704] [MT] DTDeviceKit: deviceType from 00008006-0010B9E13653002E was NULL
2020-01-18 10:38:51.672 xcodebuild[25767:1956704] [MT] DTDeviceKit: deviceType from 00008006-0010B9E13653002E was NULL
2020-01-18 10:38:51.676 xcodebuild[25767:1956704] [MT] DTDeviceKit: deviceType from 00008006-0010B9E13653002E was NULL
* BUILD FAILED *

Xcode's output:
↳
Building AOT snapshot in release mode (ios-release)...
Building App.framework for arm64...

Building App.framework for armv7...
Building AOT snapshot in release mode (ios-release)...             50.3s
Built to build/aot/.
warning: parsing line table prologue at offset 0x6f697463 found unsupported version 0x00
warning: line table parameters mismatch. Cannot emit.
note: while processing /Users/longsmacbook/Desktop/Romanson/LabelStoreMax/build/aot/armv7/snapshot_assembly.o
Project /Users/longsmacbook/Desktop/Romanson/LabelStoreMax built and packaged successfully.
/Users/longsmacbook/Desktop/Romanson/LabelStoreMax/ios/Runner/GeneratedPluginRegistrant.m:6:9: fatal error: 'device_info/DeviceInfoPlugin.h' file not found
#import <device_info/DeviceInfoPlugin.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
/Users/longsmacbook/Desktop/Romanson/LabelStoreMax/ios/Runner/GeneratedPluginRegistrant.m:6:9: fatal error: 'device_info/DeviceInfoPlugin.h' file not found
#import <device_info/DeviceInfoPlugin.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning build
note: Constructing build description

Encountered error while building for device.
Process finished with exit code 1

Experiencing same issue. Did you get a fix?

The error does not seem to be related to OneSignal

This issue still is released to OneSignal just the error @Aditi12345 posted is not

@FabianVarela The OneSignalNotificationServiceExtension target should only have OneSignal as a dependency, make sure you don't have any other pods in your Podfile for this target.

_Originally posted by @jkasten2 in https://github.com/OneSignal/OneSignal-Flutter-SDK/issues/168#issuecomment-550082820_

The problem is the extension requires firebase just because of having it in the Runner target

Probably it's because the ios Pod is a static framework

I think this is safe to close at this point. If not, just comment with a tag at me and I will reopen

The issue still exists

I also ran into this issue and had to add the Firebase pod manually to the extension.

@rgomezp This needs to be fixed (can't say if it even is fixable) or at least be mentioned in the setup guide.

I also ran into this issue and had to add the Firebase pod manually to the extension.

I had to add firebase auth and I don't understand how OneSignal would need Firebase auth

Same issue on my site with the same fix. After I add the libraries to the OneSignal target it works again.

The same Issue just with Firebase/Core and some MLKit libs

look the same instead ld: framework not found FBLPromises in my case

@NiKoTron same issue whenever i give it all the frameworks the OneSignalExtention.. requires it ended up with

Showing All Messages
: error: /Users/dev/Library/Developer/Xcode/DerivedData/Runner-fsiqdskfucpsnqgqesxrmwzrgpsy/Build/Products/Debug-iphonesimulator/FirebaseABTesting.framework: No such file or directory

Xcode/DerivedData/Runner-coyksibarnqabvegzsvpgzydcjvn/Build/Products/Debug-iphoneos/OneSignalNotificationServiceExtension.appex/OneSignalNotificationServiceExtension normal arm64
    cd /Users/atulkumar/Desktop/pocketpills/pocketpills-flutter/flutter-mobile/ios
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios13.2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk -L/Users/atulkumar/Library/Developer/Xcode/DerivedData/Runner-coyksibarnqabvegzsvpgzydcjvn/Build/Products/Debug-iphoneos -F/Users/atulkumar/Library/Developer/Xcode/DerivedData/Runner-coyksibarnqabvegzsvpgzydcjvn/Build/Products/Debug-iphoneos/FirebaseCoreDiagnostics-iOS13.2 -F/Users/atulkumar/Library/Developer/Xcode/DerivedData/Runner-coyksibarnqabvegzsvpgzydcjvn/Build/Products/Debug-iphoneos/FirebaseInstallations-iOS13.2 -F/Users/atulkumar/Library/Developer/Xcode/DerivedData/Runner-coyksibarnqabvegzsvpgzydcjvn/Build/Products/Debug-iphoneos/GoogleDataTransport-iOS13.2 -F/Users/atulkumar/Library/Developer/Xcode/DerivedData/Runner-coyksibarnqabvegzsvpgzydcjvn/Build/Products/Debug-iphoneos/GoogleDataTransportCCTSupport-iOS13.2 -F/Users/atulkumar/Library/Developer/Xcode/DerivedData/Runner-coyksibarnqabvegzsvpgzydcjvn/Build/Products/Debug-iphoneos/GoogleUtilities-iOS13.2 -F/Users/atulkumar/Library/Developer/Xcode/DerivedData/Runner-coyksibarnqabvegzsvpgzydcjvn/Build/Products/Debug-iphoneos/PromisesObjC-iOS13.2 -F/Users/atulkumar/Library/Developer/Xcode/DerivedData/Runner-coyksibarnqabvegzsvpgzydcjvn/Build/Products/Debug-iphoneos/nanopb-iOS13.2 -filelist /Users/atulkumar/Library/Developer/Xcode/DerivedData/Runner-coyksibarnqabvegzsvpgzydcjvn/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/OneSignalNotificationServiceExtension.build/Objects-normal/arm64/OneSignalNotificationServiceExtension.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/../../Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/../../Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/atulkumar/Library/Developer/Xcode/DerivedData/Runner-coyksibarnqabvegzsvpgzydcjvn/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/OneSignalNotificationServiceExtension.build/Objects-normal/arm64/OneSignalNotificationServiceExtension_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fapplication-extension -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/atulkumar/Library/Developer/Xcode/DerivedData/Runner-coyksibarnqabvegzsvpgzydcjvn/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/OneSignalNotificationServiceExtension.build/Objects-normal/arm64/OneSignalNotificationServiceExtension.swiftmodule -ObjC -lc++ -lsqlite3 -lstdc++ -lz -framework AdSupport -framework Branch -framework CoreGraphics -framework CoreServices -framework CoreTelephony -framework Crashlytics -framework FBLPromises -framework FBSDKCoreKit -framework FIRAnalyticsConnector -framework FMDB -framework Fabric -framework FirebaseABTesting -framework FirebaseAnalytics -framework FirebaseAuth -framework FirebaseCore -framework FirebaseCoreDiagnostics -framework FirebaseDynamicLinks -framework FirebaseInstallations -framework FirebaseInstanceID -framework FirebaseMessaging -framework FirebaseRemoteConfig -framework Flutter -framework Foundation -framework GTMSessionFetcher -framework GoogleAppMeasurement -framework GoogleDataTransport -framework GoogleDataTransportCCTSupport -framework GoogleUtilities -framework ImageIO -framework JavaScriptCore -framework Mantle -framework MediaPlayer -framework Mixpanel -framework OneSignal -framework QuartzCore -framework Reachability -framework SDWebImage -framework SDWebImageWebPCoder -framework SafariServices -framework Security -framework StoreKit -framework SystemConfiguration -framework UIKit -framework UserNotifications -framework WebKit -framework XCDYouTubeKit -framework app_review -framework connectivity -framework contacts_service -framework device_info -framework firebase_analytics -framework firebase_auth -framework firebase_core -framework firebase_crashlytics -framework firebase_dynamic_links -framework firebase_messaging -framework firebase_remote_config -framework flutter_advertising_id -framework flutter_branch_io_plugin -framework flutter_image_compress -framework flutter_keyboard_visibility -framework flutter_pdf_renderer -framework flutter_plugin_android_lifecycle -framework flutter_sms -framework flutter_webview_plugin -framework flutter_youtube -framework iAd -framework image_picker -framework launch_review -framework libwebp -framework nanopb -framework native_mixpanel -framework onesignal_flutter -framework package_info -framework path_provider -framework permission_handler -framework protobuf -framework share -framework shared_preferences -framework sms_autofill -framework sqflite -framework url_launcher -weak_framework Accelerate -weak_framework Accounts -weak_framework AudioToolbox -weak_framework CoreGraphics -weak_framework CoreLocation -weak_framework Foundation -weak_framework QuartzCore -weak_framework Security -weak_framework Social -weak_framework UIKit -weak_framework UserNotifications -weak_framework WebKit -ObjC -lc++ -lsqlite3 -lstdc++ -lz -framework AdSupport -framework Branch -framework CoreGraphics -framework CoreServices -framework CoreTelephony -framework FBLPromises -framework FBSDKCoreKit -framework FIRAnalyticsConnector -framework FirebaseAnalytics -framework FirebaseCore -framework FirebaseCoreDiagnostics -framework FirebaseInstallations -framework Foundation -framework GoogleAppMeasurement -framework GoogleDataTransport -framework GoogleDataTransportCCTSupport -framework GoogleUtilities -framework OneSignal -framework Security -framework StoreKit -framework SystemConfiguration -framework UIKit -framework UserNotifications -framework WebKit -framework iAd -framework nanopb -weak_framework Accelerate -weak_framework Accounts -weak_framework AudioToolbox -weak_framework CoreGraphics -weak_framework CoreLocation -weak_framework Foundation -weak_framework QuartzCore -weak_framework Security -weak_framework Social -weak_framework UIKit -e _NSExtensionMain -framework Pods_OneSignalNotificationServiceExtension -Xlinker -dependency_info -Xlinker /Users/atulkumar/Library/Developer/Xcode/DerivedData/Runner-coyksibarnqabvegzsvpgzydcjvn/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/OneSignalNotificationServiceExtension.build/Objects-normal/arm64/OneSignalNotificationServiceExtension_dependency_info.dat -o /Users/atulkumar/Library/Developer/Xcode/DerivedData/Runner-coyksibarnqabvegzsvpgzydcjvn/Build/Products/Debug-iphoneos/OneSignalNotificationServiceExtension.appex/OneSignalNotificationServiceExtension

**ld: framework not found FirebaseAuth
clang: error: linker command failed with exit code 1 (use -v to see invocation)**

Can you please include your podfile?

I found out this is not only related to OneSignal, since other plugins that require extensions causes similar issues

@DRSchlaubi Same problem here. You can help-me ? Please

Including your podfile will help us better assist you.

Was this page helpful?
0 / 5 - 0 ratings