Problem with link iOS Firebase framework (from Cocoa pods)
-
Good day.
Sorry for my bad english :-)
I am trying to connect Firebase Messaging to a Qt project. I did everything according to the instructions:- created a Qt project
- collected it
- XCode project file appeared in build folder
- in the build folder created a pod file via "pod init"
- in the pod file added the lines pod 'Firebase' pod 'Firebase / Core' pod 'FirebaseAnalytics' pod 'Firebase / Messaging'
- installed these modules with the "pod install" command.
As a result, a Pods folder with Firebase modules was created in the build folder. But I cannot figure out how to properly connect headers and framework to a qt project.
In the .pro file, I do this:ios { OBJECTIVE_SOURCES += iosappdelegate.mm LIBS += -framework Foundation -framework CoreFoundation -framework UIKit -framework UserNotifications QMAKE_LFLAGS += -ObjC QMAKE_LFLAGS += -framework FirebaseCore LIBS += -F$$PWD/FirebaseIOS/FirebaseCore QMAKE_LFLAGS += -F$$PWD/FirebaseIOS/FirebaseMessaging LIBS += -framework FirebaseMessaging INCLUDEPATH += /Users/macuser/tests/testPushNotification/iosCompile/Pods/FirebaseCore/FirebaseCore/Sources/Public/FirebaseCore }
But on startup, the application crashes and dyld: dependent dylib '@ rpath / FirebaseCore.framework / FirebaseCore' not found for '/ private / var / containers / Bundle / Application / XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX / testPushNotification is displayed in the console. app / testPushNotification ', tried but didn't find:' / private / var / container
s / Bundle / Application / XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX / testPushNotification.app / Frameworks / FirebaseCore.framework / FirebaseCore '' @ rpath / FirebaseCore.framework / FirebaseCore '' /Fystem/Library/Framework/Framework/Library FirebaseCore 'Here I want to note the fact that when you create a project in XCode and build it (without Qt), .framework folders appear in the Debug-iphoneos folder. I copied these folders into my project.
Please help me figure out what I'm doing wrong.
-
Hi,
IIRC (it's been a long time), you can use the QMAKE_BUNDLE_DATA variable to copy additional items to the app bundle.
Hope it helps