Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Problem with link iOS Firebase framework (from Cocoa pods)

Problem with link iOS Firebase framework (from Cocoa pods)

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 616 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mr_roman
    wrote on 15 Dec 2020, 14:13 last edited by
    #1

    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:

    1. created a Qt project
    2. collected it
    3. XCode project file appeared in build folder
    4. in the build folder created a pod file via "pod init"
    5. in the pod file added the lines pod 'Firebase' pod 'Firebase / Core' pod 'FirebaseAnalytics' pod 'Firebase / Messaging'
    6. 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.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 15 Dec 2020, 19:13 last edited by
      #2

      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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      1/2

      15 Dec 2020, 14:13

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved