GithubHelp home page GithubHelp logo

Comments (13)

sdzurenko avatar sdzurenko commented on July 28, 2024

Right now I'm dealing with FirebaseCore.h not being found. I've hacked the .pro file a bit while trying to debug this, so the compiler output below might differ a tad from what you expect. I can't seem to find the magical combination for the FirebaseCore framework to be found during the build.

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -g -fPIC -std=gnu++11 -arch arm64 -arch x86_64 -Xarch_arm64 -miphoneos-version-min=10.0 -Xarch_arm64 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk -Xarch_x86_64 -mios-simulator-version-min=10.0 -Xarch_x86_64 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk -fobjc-nonfragile-abi -fobjc-legacy-dispatch -fembed-bitcode-marker -Wall -W -fPIC -DQT_COMPILER_SUPPORTS_SSE2 -DQTFIREBASE_AUTO_REGISTER -DQTFIREBASE_BUILD_ANALYTICS -DQTFIREBASE_BUILD_MESSAGING -DQTFIREBASE_BUILD_ADMOB -DQTFIREBASE_BUILD_REMOTE_CONFIG -DQTFIREBASE_BUILD_AUTH -DQTFIREBASE_BUILD_DATABASE -DQT_STATICPLUGIN -DQT_PLUGIN -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_QML_DEBUG -I../QtFirebase -I. -I../../Qt/Qt5.10.1/5.10.1/ios/mkspecs/common/uikit -I../QtFirebase -I../../FirebaseSDK/firebase_cpp_sdk/include -I../QtFirebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers -I../../FirebaseSDK/firebase_cpp_sdk/include -I../QtFirebase/src -I../QtFirebase/src/ios -I../../Qt/Qt5.10.1/5.10.1/ios/include -I../../Qt/Qt5.10.1/5.10.1/ios/include/QtQuick -I../../Qt/Qt5.10.1/5.10.1/ios/include/QtGui/5.10.1 -I../../Qt/Qt5.10.1/5.10.1/ios/include/QtGui/5.10.1/QtGui -I../../Qt/Qt5.10.1/5.10.1/ios/include/QtGui -I../../Qt/Qt5.10.1/5.10.1/ios/include/QtQml -I../../Qt/Qt5.10.1/5.10.1/ios/include/QtNetwork -I../../Qt/Qt5.10.1/5.10.1/ios/include/QtCore/5.10.1 -I../../Qt/Qt5.10.1/5.10.1/ios/include/QtCore/5.10.1/QtCore -I../../Qt/Qt5.10.1/5.10.1/ios/include/QtCore -I. -I../../Qt/Qt5.10.1/5.10.1/ios/mkspecs/macx-ios-clang -o AppDelegate.o ../QtFirebase/src/ios/AppDelegate.mm
In file included from ../QtFirebase/src/ios/AppDelegate.mm:4:
../QtFirebase/src/ios/Firebase/Firebase.h:1:9: fatal error: 'FirebaseCore/FirebaseCore.h' file not found
#import <FirebaseCore/FirebaseCore.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [AppDelegate.o] Error 1
18:17:19: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project qtfirebase (kit: Qt 5.10.1 for iOS)
When executing step "Make"

from qtfirebase.

Larpon avatar Larpon commented on July 28, 2024

@sdzurenko - I'm glad you got the example working!
By "build QtFirebase on its own as a library" I guess you mean how do I get QtFirebase included in my own project - right?

As opposed to: "how do I build it as a dynamic shared library *.so (plugin) to include with my project and load later on" <- this part is still unexplored territory.

I can see you're using Qt 5.10.1 - but what versions of the Firebase (C++ / iOS) SDKs are you using? (TIP look in the readme's) :)

For a start it looks like the iOS SDK isn't included in the search path or something has changed in the SDK. Frameworks and libraries for iOS are included here: https://github.com/Larpon/QtFirebase/blob/master/qtfirebase_target.pri#L65-L112

Hmm - FirebaseCore is included here (from your output): -I../QtFirebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers

from qtfirebase.

sdzurenko avatar sdzurenko commented on July 28, 2024

Yes, I am trying to include QtFirebase in my own project. But I am trying to build it on its own first and then just link to the pre-built library from my own project. I am not trying to build it as a dynamic shared library. In fact, I added CONFIG += static to the qtfirebase.pro file.

I just started this effort yesterday and downloaded all the necessary source code then, so I assume I'm using current versions. The Firebase C++ SDK, according to the Release Notes in readme.md, is version 4.5.1. The Firebase iOS SDK is version 5.0.1.

Yes, it is a bit confusing that some of the configuration set in qtfirebase_target.pri#L65-112 does not appear in the compile output. However, the build is getting inside that ios block. When building, I do see the output message "QtFirebase iOS base." I even added additional message("") calls to verify that L65-112 is being executed. See output below.

The path ../QtFirebase/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers is included only because I explicitly added it to qtfirebase_target.pri while trying various things to make this work. However, I don't think this is the proper way to include framework headers. Since the library is imported as FirebaseCore/FirebaseCore.h, I wouldn't expect it to be found since there is no FirebaseCore directory under FirebaseCore.framework/Headers.

If I change the import line in Firebase.h from:
#import <FirebaseCore/FirebaseCore.h>
to:
#import <FirebaseCore.h>
then the build succeeds. But I assume that hacking header file paths in the source code is not the proper solution here. Plus, there's also the fact that this problem does not occur when QtFirebase is built from the QtFirebaseExample build. So there's something that is being set by the QtFirebaseExample build that is not getting set properly in the QtFirebase build.

Project MESSAGE: STEVE: Include qtfirebase.pri
Project MESSAGE: STEVE: Include qtfirebase_target.pri
Project MESSAGE: QtFirebase: configuring build for supported Firebase target platform...
Project MESSAGE: Using QTFIREBASE_SDK_PATH (/Users/steve/repositories/QtFirebase/../../FirebaseSDK/firebase_cpp_sdk)
Project MESSAGE: QtFirebase iOS base
Project MESSAGE: STEVE: LIBS is -framework FirebaseCore -F/Users/steve/repositories/QtFirebase/src/ios/Firebase//Analytics/ -ObjC -lsqlite3 -lz -L/Users/steve/repositories/QtFirebase/../../FirebaseSDK/firebase_cpp_sdk/libs/ios/universal/ -framework MediaPlayer -framework CoreMotion -framework CoreTelephony -framework MessageUI -framework GLKit -framework AddressBook -framework UIKit -framework SystemConfiguration -framework FirebaseCore
Project MESSAGE: QtFirebase including AdMob
Project MESSAGE: QtFirebase including RemoteConfig
Project MESSAGE: QtFirebase including Messaging
Project MESSAGE: QtFirebase Messaging requires iOS v10.x to build. Setting QMAKE_IOS_DEPLOYMENT_TARGET = 10.0
Project MESSAGE: QtFirebase including Analytics
Project MESSAGE: QtFirebase including Auth
Project MESSAGE: QtFirebase including Database
Project MESSAGE: This project is using private headers and will therefore be tied to this specific Qt module build version.
Project MESSAGE: Running this project against other versions of the Qt modules may crash at any arbitrary point.
Project MESSAGE: This is not a bug, but a result of using Qt internals. You have been warned!

from qtfirebase.

Larpon avatar Larpon commented on July 28, 2024

Hmm... Have you tried if #import <FirebaseCore.h> works with QtFirebaseExample?
If #import <FirebaseCore.h> works in both cases (and fixes your problem) - I'll be happy to pull the change in.

Like you - I can't see what QtFirebaseExample should be doing differently

edit It could be some breaking change in the iOS SDK - AFAIK the major version I've tested was 4.x - so it could be that something moved around in 5.x

from qtfirebase.

sdzurenko avatar sdzurenko commented on July 28, 2024

Just tried and it does not work. If I change the import to
#import <FirebaseCore.h>
then the QtFirebaseExample build fails and complains that FirebaseCore.h cannot be found.

from qtfirebase.

Larpon avatar Larpon commented on July 28, 2024

... weird. Maybe it's some Objective-C quirk or side effect? I'm running out of ideas

from qtfirebase.

Larpon avatar Larpon commented on July 28, 2024

Would changing it to #import "FirebaseCore.h" or #import "FirebaseCore/FirebaseCore.h" make a difference?

from qtfirebase.

sdzurenko avatar sdzurenko commented on July 28, 2024

Are you able to build QtFirebase from qtfirebase.pro?

from qtfirebase.

sdzurenko avatar sdzurenko commented on July 28, 2024

No, changing to from < > to " " did not make a difference.

from qtfirebase.

Larpon avatar Larpon commented on July 28, 2024

Are you able to build QtFirebase from qtfirebase.pro?

Yes - but I must admit it's been awhile since I tested that part on iOS (might even be before we added the AppDelegate.* files)

No, changing to from < > to " " did not make a difference.

Ok - just wanted to be sure - as we've had an issue with that elsewhere lately

from qtfirebase.

Larpon avatar Larpon commented on July 28, 2024

Well - maybe it's the solution for now - that if static is defined it should use a different path for the include? :/ - I mean - if everything else works. I'd still like to know why though :-)

from qtfirebase.

kshahim avatar kshahim commented on July 28, 2024

from qtfirebase.

Larpon avatar Larpon commented on July 28, 2024

Closing due to inactivity

from qtfirebase.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.