iOS Question Error Trying to get start with Firebase Integration [SOLVED]

miker2069

Active Member
Licensed User
Longtime User
I am trying to integration Firebase notifications into my iOS application. I've started with the Firebase Integration tutorial and trying to proceed slowly. I followed the instructions which led me to the Firebase 2.50 - April 2020 framework installation. I think I've followed this correctly. I figured I would start with simply adding FirebaseAnalytics (which based on what I've read is needed in all Firebase projects) and Just adding the FirebaseAnalytics library (which does say 2.5 in B4i after I installed into the internal library) and process global FirebaseAnalytics and just seeing if I can build a debug app. This is where I am stuck. I've tried search around before creating this post and could not find this particular error. I must be missing something or I have not copied the frameworks into the right place. The error that I am getting is below:


Ld /Users/michaelrobinson/Downloads/B4iBuildServer\ (3)/UploadedProjects/<user id>/Payload/Opener.app/Opener normal arm64 (in target: B4iProject)
cd /Users/michaelrobinson/Downloads/B4iBuildServer\ (3)/UploadedProjects/<user id>
export IPHONEOS_DEPLOYMENT_TARGET=10.2
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -L/Users/michaelrobinson/Downloads/B4iBuildServer\ \(3\)/UploadedProjects/<user id>/Payload -L../../Libs -F/Users/michaelrobinson/Downloads/B4iBuildServer\ \(3\)/UploadedProjects/<user id>/Payload -F../../Libs -filelist /Users/michaelrobinson/Downloads/B4iBuildServer\ \(3\)/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/Opener.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=10.2 -Xlinker -object_path_lto -Xlinker /Users/michaelrobinson/Downloads/B4iBuildServer\ \(3\)/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/Opener_lto.o -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -ObjC -lCore -framework Foundation -framework CoreGraphics -framework UIKit -liMQTT -liPhone -liXUI -liFirebaseAnalytics -framework AVFoundation -framework MessageUI -framework CoreMotion -framework FIRAnalyticsConnector -framework FirebaseAnalytics -framework FirebaseCore -framework FirebaseCoreDiagnostics -framework FirebaseInstallations -framework GoogleAppMeasurement -framework GoogleDataTransport -framework GoogleDataTransportCCTSupport -framework GoogleUtilities -framework PromisesObjC -framework nanopb -liHttp -liStringUtils -liBitmapCreator -liDateUtils -lxCustomListView -liDebug2 -Xlinker -dependency_info -Xlinker /Users/michaelrobinson/Downloads/B4iBuildServer\ \(3\)/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/Opener_dependency_info.dat -o /Users/michaelrobinson/Downloads/B4iBuildServer\ \(3\)/UploadedProjects/<user id>/Payload/Opener.app/Opener
ld: warning:
Could not find auto-linked framework 'FBLPromises'

Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_UIScene", referenced from:
objc-class-ref in GoogleUtilities(GULSceneDelegateSwizzler.o)
"_UISceneWillConnectNotification", referenced from:
___54+[GULSceneDelegateSwizzler proxyOriginalSceneDelegate]_block_invoke in GoogleUtilities(GULSceneDelegateSwizzler.o)
"_UISceneWillDeactivateNotification", referenced from:
-[GDTCORApplication init] in GoogleDataTransport(GDTCORPlatform.o)
"_UISceneWillEnterForegroundNotification", referenced from:
-[GDTCORApplication init] in GoogleDataTransport(GDTCORPlatform.o)
"___isPlatformVersionAtLeast", referenced from:
-[FIRInstallationsIIDStore deleteIIDFlagFromPlist:] in FirebaseInstallations(FIRInstallationsIIDStore.o)
-[FIRSecureStorage archiveDataForObject:error:] in FirebaseInstallations(FIRSecureStorage.o)
-[FIRSecureStorage unarchivedObjectOfClass:fromData:error:] in FirebaseInstallations(FIRSecureStorage.o)
-[FIRInstallationsIIDTokenStore IIDCheckinWithData:] in FirebaseInstallations(FIRInstallationsIIDTokenStore.o)
_GDTCORNetworkMobileSubTypeMessage in GoogleDataTransport(GDTCORPlatform.o)
_GDTCOREncodeArchive in GoogleDataTransport(GDTCORPlatform.o)
_GDTCORDecodeArchive in GoogleDataTransport(GDTCORPlatform.o)
...
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Error: 2020-05-18 03:57:47.892 xcodebuild[14604:1042041] DVTProvisioningProfileManager: Failed to load profile "/Users/michaelrobinson/Library/MobileDevice/Provisioning Profiles/35e72dbf-3522-42cd-8f66-ae7618582237" (Error Domain=DVTProvisioningProfileSourceErrorDomain Code=0 "No provisioning profile provider found for profile "/Users/michaelrobinson/Library/MobileDevice/Provisioning Profiles/35e72dbf-3522-42cd-8f66-ae7618582237"." UserInfo={NSLocalizedDescription=No provisioning profile provider found for profile "/Users/michaelrobinson/Library/MobileDevice/Provisioning Profiles/35e72dbf-3522-42cd-8f66-ae7618582237".})
2020-05-18 03:57:47.892 xcodebuild[14604:1042041] DVTProvisioningProfileManager: Failed to load profile "/Users/michaelrobinson/Library/MobileDevice/Provisioning Profiles/c62684a6-c8c4-4f6f-ba94-ec6cf248db17" (Error Domain=DVTProvisioningProfileSourceErrorDomain Code=0 "No provisioning profile provider found for profile "/Users/michaelrobinson/Library/MobileDevice/Provisioning Profiles/c62684a6-c8c4-4f6f-ba94-ec6cf248db17"." UserInfo={NSLocalizedDescription=No provisioning profile provider found for profile "/Users/michaelrobinson/Library/MobileDevice/Provisioning Profiles/c62684a6-c8c4-4f6f-ba94-ec6cf248db17".})
2020-05-18 03:57:47.892 xcodebuild[14604:1042041] DVTProvisioningProfileManager: Failed to load profile "/Users/michaelrobinson/Library/MobileDevice/Provisioning Profiles/d92e2ed2-0905-4f6d-b4a4-f8ede4b6fb58" (Error Domain=DVTProvisioningProfileSourceErrorDomain Code=0 "No provisioning profile provider found for profile "/Users/michaelrobinson/Library/MobileDevice/Provisioning Profiles/d92e2ed2-0905-4f6d-b4a4-f8ede4b6fb58"." UserInfo={NSLocalizedDescription=No provisioning profile provider found for profile "/Users/michaelrobinson/Library/MobileDevice/Provisioning Profiles/d92e2ed2-0905-4f6d-b4a4-f8ede4b6fb58".})
** BUILD FAILED **


The following build commands failed:
Ld /Users/michaelrobinson/Downloads/B4iBuildServer\ (3)/UploadedProjects/<user id>/Payload/Opener.app/Opener normal arm64
(1 failure)

I'm assuming the problem is with the

Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_UIScene", referenced from:


And what follows that. I am using the following:

B4i 6.3
Local Builder 6.3
XCODE 10.2.1
Mac OS 10.14

In My local builder Libs folder I've tried both copying the contents of Firebase250.zip and FirebaseMacWrappers.zip to the Libs folder as both just the folder in the zip. So I had:

Lib\Firebase250 (and it's contents)
Lib\FirebaseMacWrappers (and it's contents)

and I also copied all the files in the Firebase250 and FirebaseMacWrappers directly into Lib. I'm getting the same issue. I also copied the Facebook framework as well. I feel like I'm missing something. Any thoughts?
 

miker2069

Active Member
Licensed User
Longtime User
Interestly I just upgraded from 6.3 to 6.5 with host builder (been meaning to upgrade and figured I'd take the opportunity to do it now and get host builder). I just upgraded B4i Designer (not local builder just yet as I wanted to try with host builder). I just tried with host builder and still just adding the FirebaseAnalytics library and seeing if I could compile my app and I get a slightly different OBJ NOT FOUND error:


d>/Payload/Opener.app/Opener
ld: warning: Could not find or use auto-linked framework 'FBLPromises'
Undefined symbols for architecture arm64:
"_FBLPromiseErrorDomain", referenced from:
___60-[FIRSecureStorage getObjectForKey:eek:bjectClass:accessGroup:]_block_invoke in FirebaseInstallations(FIRSecureStorage.o)
"_OBJC_CLASS_$_FBLPromise", referenced from:
objc-class-ref in FirebaseInstallations(FIRInstallationsIDController.o)
objc-class-ref in FirebaseInstallations(FIRInstallationsAPIService.o)
objc-class-ref in FirebaseInstallations(FIRInstallationsIIDStore.o)
objc-class-ref in FirebaseInstallations(FIRInstallationsIIDTokenStore.o)
objc-class-ref in FirebaseInstallations(FIRInstallationsStore.o)
objc-class-ref in FirebaseInstallations(FIRSecureStorage.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Error: ** BUILD FAILED **

So I was surprised at this, which leads me to believe maybe there is something wrong locally? But the error looks like an object linking error. It might be worth mentioning my app settings are:

B4X:
#Region  Project Attributes
    #ApplicationLabel: Opener
    #Version: 1.0.0
    'Orientation possible values: Portrait, LandscapeLeft, LandscapeRight and PortraitUpsideDown
    #iPhoneOrientations: Portrait, LandscapeLeft, LandscapeRight
    #iPadOrientations: Portrait, LandscapeLeft, LandscapeRight, PortraitUpsideDown
    #Target: iPhone, iPad
    #ATSEnabled: False
    #MinVersion: 10.2
    #PlistExtra:<key>NSPhotoLibraryAddUsageDescription</key><string>Save photo in albums.</string>
    
#End Region

Maybe my app version is to low (although I thought 10.2 was the minimum version to build Firebase).
 
Upvote 0

miker2069

Active Member
Licensed User
Longtime User
Do you get this error with the hosted builder?

Add a new project, add FirebaseAnalytics and compile it with the hosted builder. Do you get this error?
Yes that is with host builder and yes it was with an older project. I am trying a clean project now...
 
Upvote 0

miker2069

Active Member
Licensed User
Longtime User
I created a brand new project, registered in firebase console and got the same error as before with host builder. As I was following the Firebase Integration instructions again, it occurs that maybe I am not placing the GoogleService-info.plist from the Firebase console in the right place? Step 2 in the config instructions says:

2. Download GoogleService-info.plist from the console and copy it to Files\Special

I assume that was the Files\Special folder of my project? I downloaded it directly to my projects folder Files\Special (I had to create the Special directory this time...I believe in my older project it was already there). Am I putting it in the right place?

1589877411038.png
 
Upvote 0

miker2069

Active Member
Licensed User
Longtime User
Yes.

The error is not related to all of this.

Which version of FirebaseAnalytics are you using?

Hmm, I didn't realize that I needed to re-download the updated FirebaseAnalytics after upgrading to B4i 6.5. After doing that and making sure it's version 2.5, the basic app now compiles fine with host builder. I went back to my older app and now that compiles as well!

So I guess my local builder issues are related to not using XCode 11 then? I knew it was something like that - such a chore to keep up with the local environment on a Mac (I use it so infrequently). Host Builder is a million times easier, but I will I will download Xcode 11 and see if that resolves my local build issues.

Thank You for the assistance. Once I confirm that my local builder is resolved I'll update the subject to include [RESOLVED].
 
Upvote 0

miker2069

Active Member
Licensed User
Longtime User
It looks like my issue was not having Xcode 11.x installed. I deleted the older Xcode 10.x and installed Xcode 11 as well as upgrading to local builder 6.5.1 and b4i 6.5 and it appears to compile just fine now.
 
Upvote 0
Top