firebase / quickstart-unity

Firebase Quickstart Samples for Unity
https://firebase.google.com/games
Apache License 2.0
836 stars 431 forks source link

iOS - Xcode: linker command failed with exit code 1, using firebase plugin #211

Closed neeravBlacklight closed 5 years ago

neeravBlacklight commented 6 years ago

ErrorLog.txt

Operating system: macOS Operating system version: High Sierra 10.13.4 Unity version: 2018.1.4f1 Xcode: 9.4.1 (9F2000)

Exported iOS xcode project for device sdk. When building in Xcode for an actual device

Error: linker command failed with exit code 1 attached are the error logs.

Then i tried without the firebase plugin, removed the firebase plugin from unity, exported xcode project then tried building and the Build was successful.

I've followed the exact steps mentioned. Don't know where i'm going wrong. Any help would be much appreciated.

Thanks.

nickreffitt commented 6 years ago

I am experiencing the same issue:

Undefined symbols for architecture arm64:
  "_Firebase_App_Variant_blob_as_vector", referenced from:
      _AppUtilPINVOKE_Firebase_App_Variant_blob_as_vector_m2570477025 in Bulk_Firebase.App_0.o
      _Variant_blob_as_vector_m1034438908 in Bulk_Firebase.App_0.o
     (maybe you meant: _AppUtilPINVOKE_Firebase_App_Variant_blob_as_vector_m2570477025)
  "_Firebase_App_FirebaseApp_Name_get", referenced from:
      _AppUtilPINVOKE_Firebase_App_FirebaseApp_Name_get_m2723388150 in Bulk_Firebase.App_0.o
      _FirebaseApp_get_Name_m2009872515 in Bulk_Firebase.App_0.o
     (maybe you meant: _AppUtilPINVOKE_Firebase_App_FirebaseApp_Name_get_m2723388150)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Operating system: macOS Operating system version: High Sierra 10.13.6 Unity version: 2018.2.8f1 Xcode version tested: 9.4.1, 10.0 iOS versions tested: 11.0, 12.0 iOS devices tested: iPhone X, iPhone 6s, iPhone 5s

I've tried downgrading the firebase pod versions from 5.7 to 4.0 and 3.7, but getting the same error.

a-maurice commented 6 years ago

Hey all,

Sorry for the delay in response. Not entirely sure why you might be seeing this problem, but I have a couple questions that can hopefully narrow it down for us.

In your Unity project, under "Assets/Plugins/iOS/Firebase", do you have "libFirebaseCppApp.a", along with whichever APIs you have also included. Are there other libraries in that folder that don't have that naming convention?

In the generated Xcode project, in the project view, are those libraries present in "Unity-iPhone/Libraries/Plugins/iOS/Firebase"? Then, if you select "Unity-iPhone", then "General", at the bottom is "Linked Frameworks and Libraries". Are "libFirebaseCppApp.a" and the other libraries present in that list?

nickreffitt commented 6 years ago

Hi @a-maurice

Thanks for the follow up, my issue was due to importing two versions of GoogleIOSResolver

google-services

Using v1.2.53.0 alone allows me to build and run on iOS.

Thanks!

a-maurice commented 6 years ago

Hi @nickreffitt

Thanks for the response. That's a bit concerning, as part of what the resolver should be doing is clearing out old versions of itself. You can read more about it how it works here: https://github.com/googlesamples/unity-jar-resolver#unity-plugin-version-management

Just to clarify, after you imported the newer version of the Firebase SDK, did you have both 1.2.53 and 1.2.69? In normal circumstances a dialog box should pop up once the code compiles stating that it detected old versions, and asking if you want to delete them. Just wondering, could you check from the toolbar Assets > Play Services Resolver > Version Handler > Settings. By default it should have "Enable version management", "Prompt for obsolete file deletion" and "Use project settings" checked, and if those first two aren't, that could explain why you ran into this issue.

neeravBlacklight commented 6 years ago

Hey all,

Sorry for the delay in response. Not entirely sure why you might be seeing this problem, but I have a couple questions that can hopefully narrow it down for us.

In your Unity project, under "Assets/Plugins/iOS/Firebase", do you have "libFirebaseCppApp.a", along with whichever APIs you have also included. Are there other libraries in that folder that don't have that naming convention?

In the generated Xcode project, in the project view, are those libraries present in "Unity-iPhone/Libraries/Plugins/iOS/Firebase"? Then, if you select "Unity-iPhone", then "General", at the bottom is "Linked Frameworks and Libraries". Are "libFirebaseCppApp.a" and the other libraries present in that list?

Hey, sorry for the late response the "libFirebaseCppApp.a" was not present in the "Assets/Plugins/iOS/Firebase". So reimporting the plugin and found that these libs were included. But as soon as the play service resolver completes, these were gone from the "Assets/Plugins/iOS/Firebase".

Also i'm seeing some additional files in the "Assets/Firebase/Plugins/iOS" pfa.

I haven't checked building to iOS after the reimport. Will update on progress.

Thanks screen shot 2018-09-24 at 12 24 09 pm

Update: Checked on xcode, do not have those files in the plugin but i can see meta's available, in the folder.

a-maurice commented 6 years ago

Hi @neeravBlacklight

That is definitely odd, I've never encountered that behavior before myself. We do delete older versions of files when new versions are available, so maybe something has been tagged incorrectly, and thus files that shouldn't be deleted are being deleted.

Are there any files other than those .meta files that you listed in the Assets/Plugins/iOS/Firebase directory? Also, if you examine one of those meta files, near the top it should have something like "- gvh_version-5.2.1". What version number are you seeing in that?

As for the files in "Assets/Firebase/Plugins/iOS", those look correct. Basically, those are the C# libraries, while for some reason the C++ libraries in the other directory, that the C# ones use, are being deleted out from under you.

Also, just to be clear, what version of the Unity plugin have you been trying to use?

neeravBlacklight commented 6 years ago

Hey, @a-maurice

Currently i'm on version 5.3.0 I manage to solve the problem by reimporting the .a files for iOS from the plugins that were missing, making sure the play service resolver did not run.

After this on building for iOS i could see the .a files in the xcode project. But, this is a weird issue. Every-time play service resolver runs, it clears the iOS firebase plugins folder. I had to keep a separate copy of the ".a" files just to paste them in the "Assets/Firebase/Plugins/iOS"

a-maurice commented 6 years ago

Thanks for the info @neeravBlacklight

It's good that you have a workaround, but that is definitely still a problem... If you could, could you go to the toolbar's Assets > Play Services Resolver > Version Handler > Settings, and first confirm that it has the default settings ("Enable version management", "Prompt for obsolete file deletion", and "Use project settings" should be enabled, while the other two should not). Then, enable "Verbose logging", and run the Update for it. Presumably in the Console, or the Unity editor logs (https://docs.unity3d.com/Manual/LogFiles.html), it should say something about why it trying to delete those ".a" files.

Ciaviel commented 6 years ago

We are encountering a similar issue with Unity 2018.2.6f1 and Firebase 5.3. We resolved it by manually adding the frameworks, though this seems to be version 5.9 and now crashes on app start with this stack trace:

Initialize engine version: 2018.2.6f1 (c591d9a97a0b) SIGSEGV received (segmentation violation) -- WHOA! I did something nasty. Dumping the stack trace: 0 brushingteeth 0x0000000103cd9124 sig_handler + 180 1 libsystem_platform.dylib 0x00000001afb8aa10 + 40 2 brushingteeth 0x0000000102d58f10 -[DisplayManager updateDisplayListCacheInUnity] + 144 3 brushingteeth 0x0000000102d5e294 -[UnityAppController startUnity:] + 72 4 Foundation 0x00000001b0a1b6d0 NSFireDelayedPerform + 404 5 CoreFoundation 0x00000001aff0ebf0 + 28 6 CoreFoundation 0x00000001aff0e920 + 864 7 CoreFoundation 0x00000001aff0e154 + 248 8 CoreFoundation 0x00000001aff09030 + 1880 9 CoreFoundation 0x00000001aff085b8 CFRunLoopRunSpecific + 436 10 GraphicsServices 0x00000001b217c584 GSEventRunModal + 100 11 UIKitCore 0x00000001dc833558 UIApplicationMain + 212 12 brushingteeth 0x0000000102d4edf8 _rdc_main(int, char**) + 148 13 brushingteeth 0x0000000103cd8e48 main + 764 14 libdyld.dylib 0x00000001af9c8b94 + 4

Also, this: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[AGXA11FamilyTexture countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance

stewartmiles commented 6 years ago

Similar to https://github.com/firebase/quickstart-unity/issues/209 this may be due to the iOS SDK being broken by an update to the GoogleUtilities pod. Could you give the 5.3.1 release a try https://firebase.google.com/support/release-notes/unity#5.3.1 ?

Ciaviel commented 6 years ago

Tried it out without adding the frameworks manually and still getting (in fact it seems to have gotten worse):

Undefined symbols for architecture armv7: "_OBJCCLASS$_FIROptions", referenced from: objc-class-ref in libFirebaseCppApp.a (app_ios_a1d3eabf342713143f18eb00d6ec885e.o) "_OBJCCLASS$_FIRApp", referenced from: objc-class-ref in libFirebaseCppApp.a (app_ios_a1d3eabf342713143f18eb00d6ec885e.o) "_OBJCCLASS$_FIRAnalytics", referenced from: objc-class-ref in libFirebaseCppAnalytics.a (analytics_ios_0f007ecb4a68103f235a4a2b5d31b4b7.o) "_OBJCCLASS$_FIRAnalyticsConfiguration", referenced from: objc-class-ref in libFirebaseCppAnalytics.a (analytics_ios_0f007ecb4a68103f235a4a2b5d31b4b7.o) ld: symbol(s) not found for architecture armv7

haroldsati commented 6 years ago

Xcode version: 10 Firebase SDK version: 5.3.1 Firebase Component: Auth Unity: 2018.2.11f also try on 2018.2.10

screen shot 2018-10-03 at 4 45 25 pm

I built a clean version from the 5.3.1 version and AuthExample but is a compilation problem in Xcode. There is no much information about the error, just that code. I Already review all the comments in here, but nothing works for me.

I Hope someone can help me.

stewartmiles commented 6 years ago

@Ciaviel and @haroldsati :

haroldsati commented 6 years ago

Hi @stewartmiles,

First IOS Resolver: screen shot 2018-10-04 at 10 08 56 am

Second, Yes i am. i am using a AuthExample from here with Firebase 5.3.1

Third Cocoapods: screen shot 2018-10-04 at 10 09 23 am

jexreffy commented 6 years ago

Xcode version: 10 Firebase SDK version: 5.3.1 Firebase Component: App, Functions, Messaging Unity: 2018.2.11f

@stewartmiles I just installed Firebase into my Unity Project for the first time last week. Having the same issue as @haroldsati iOS Resolver and Cocoapods are the same.

stewartmiles commented 6 years ago

@jexreffy similar to what I've mentioned before did you:

@haroldsati

bobak-ss commented 6 years ago

Xcode version: 10 Firebase SDK version: 5.3.1 Firebase Component: Auth Unity: 2018.1.0f2

Same problem here I also tried importing Firebase in an empty unity project and build successfully completed. I reset the project back to the latest working version without Firebase, then I imported Firebase again without any implementations and Xcode builds successfully but after adding Firebase initialization code I can't get to build the project again!

ozbra commented 6 years ago

Xcode version: 10 Firebase SDK version: 5.3.1 Firebase Component: Auth Unity: 2017.4.1f1

I was using Firebase SDK version 5.3.0 and getting working builds until 2 days ago. Both on my machine and cloud build. But when I tried today both on Cloud and my machine, Unity builds it to xCode successfully although I can't get any working build from xCode side. Error message is below.

ekran resmi 2018-10-19 17 06 35

After this, I've upgraded Firebase SDK to 5.3.1 but the error is still same. I even tried with empty Unity project, Just with Hello Word UI element with Firebase Auth and Firebase Database components, and the error is still same. I have a feeling, everytime there is an update on pod side or Firebase side, older versions are getting effected. Why previously working version get effected by this?

jexreffy commented 6 years ago

@stewartmiles Mea Culpa on my part. I thought I had Cocoapods installed when I did not. Once I got it installed, I can build no problem. My apologies.

stewartmiles commented 6 years ago

Hi everyone,

Before posting "me too" on this thread, we need more information that you're all providing:

  1. Turn on verbose logging in the iOS Resolver settings (see Assets > Play Services Resolver > iOS Resolver > Settings)
  2. Build for iOS and if the build fails
  3. Share your UnityEditor.log (see https://docs.unity3d.com/Manual/LogFiles.html )
  4. Share your Xcode version
  5. Xcode build logs (so we can see the linker errors etc. reporting exit code 1 is not very informative)
  6. Cocaopods version (see https://stackoverflow.com/questions/26677830/how-to-find-out-the-version-of-installed-cocoa-pods?rq=1 )

Thanks, Stewart

stewartmiles commented 6 years ago

I've been chatting with one of our iOS SDK leads and they suggested that you could try deleting the Xcode DerivedData cache and updating to Cocoapods 1.5.3.

i.e

rm -rf ~/Library/Developer/Xcode/DerivedData

then

sudo gem install cocoapods

and finally check that Cocoapods is up to date with...

pod --version

stewartmiles commented 6 years ago

Oh also, if you're using Unity 5.6 and above with the "Xcode Workspace" integration enabled in the iOS resolver, you'll need to make sure you're opening up the .xcworkspace file not the .xcproject file generated by Unity's build process. Unity 'should' open the correct file when you select "build and run".

ozbra commented 6 years ago

I was creating detalied list according to your suggesting up there and after setting verbose on, I figured out there was a missing file. I noticed this after checking Xcode build logs with Verbose on. And missing file is not related to firebase. After solving that, it worked out fine for me.

bobak-ss commented 6 years ago

Xcode version: 10 Unity version: 2018.1.0f2 Cocoapods version: 1.5.3 Firebase SDK version: 5.3.1

In my case the error accures only when I try to build with the simulator so after Unity opens up my project I go to Supported Platforms and I change iphones to IOS then I choose iPhoneX(12.0) simulator and I hit Build button, after a few minutes my builds results in failed. Here is the Xode log file: Xcode_build_on_simulator_Log But when I just try to build the project into my device(iPadMini - ios 9.3.5) the build proccess takes so much time and even waiting for 30 minutes to 1 hour id does not simply finish and sometimes it makes Xcode crash! Here's the Xcode log file for this case: Xcode_build_on_device_Log

Here is my UnityEditor log file: Editor.log

I should mention that my simulator does have problems even out side this project because when I tried to run an empty unity project in simulator I encountered the same error as firebase project. I even tried importing Firebase SDK into an empty unity porject and it worked just fine and build on device was successfull! After I imported Firebase to my main project it does work in the unity editor but I can't get it to build on my device!

stewartmiles commented 6 years ago

@babak-ss Unity typically generates projects that only have schemes to build for either a real device or the simulator. To switch to a simulator build:

If you're going to manually add new schemes you'll need to take care to configure them appropriately. The build log you shared contains quite a few warnings which suggest mis-configured build settings...

warning: The iOS Simulator deployment target is set to 6.0, but the range of supported deployment target versions for this platform is 8.0 to 12.0. (in target 'GoogleUtilities')
warning: Mapping architecture armv7 to i386. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target 'GoogleUtilities')
liquidise commented 6 years ago

I don't think this is unity specific. I am getting the same errors after updating firebase in an app without any unity integrations. Happy to provide whatever details would be helpful here.

Pod: 1.5.3 FirebaseAnalytics (4.2.0) FirebaseCore (4.0.20) FirebaseInstanceID (2.0.10) FirebaseMessaging (2.0.8)

Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_FIRComponent", referenced from:
      objc-class-ref in FirebaseAuth(FIRAuth.o)
  "_OBJC_CLASS_$_FIRComponentType", referenced from:
      objc-class-ref in FirebaseAuth(FIRAuth.o)
  "_OBJC_CLASS_$_FIRComponentContainer", referenced from:
      objc-class-ref in FirebaseAuth(FIRAuth.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
stewartmiles commented 6 years ago

@liquidise any chance you have a project you could share? We can then pass it over to the iOS SDK team to figure out what's going on. Also, what Xcode version are you using? I'm concerned that we may be seeing problems with bitcode compatibility between Xcode versions for the prebuilt components that we ship.

liquidise commented 6 years ago

@stewartmiles Xcode Version 10.0 (10A255) on Mojave. The project is our business's ios app, so very hesitant to share the uncompiled code en-masse.

liquidise commented 6 years ago

also notable is that the issue is not armv7 specific. If i adjust my deployment targets, i get the same error for arm64:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_FIRComponent", referenced from:
      objc-class-ref in FirebaseAuth(FIRAuth.o)
  "_OBJC_CLASS_$_FIRComponentType", referenced from:
      objc-class-ref in FirebaseAuth(FIRAuth.o)
  "_OBJC_CLASS_$_FIRComponentContainer", referenced from:
      objc-class-ref in FirebaseAuth(FIRAuth.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
bobak-ss commented 6 years ago

@stewartmiles Thanks for your response, and sorry for replaying this too late. I finally figured what was the problem, it was not firebase related after all! It seems like I had a big chunk of code inside a try{}catch and for some reason it made xcode freeze.

timskap commented 6 years ago

I've got the same problem as @liquidise

ld: warning: arm64 function not 4-byte aligned: _unwind_tester from 
Libraries/libiPhone-lib.a(unwind_test_arm64.o)
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_FIRAnalyticsConfiguration", referenced from:
      objc-class-ref in libFirebaseCppAnalytics.a(analytics_ios_d28a0e676a7367b8f2d91944bb505d87.o)
  "_OBJC_CLASS_$_FIRRemoteConfigSettings", referenced from:
      objc-class-ref in libFirebaseCppRemoteConfig.a(remote_config_ios_e6d2ed559f32c182ac8412737f5fb36a.o)
  "_OBJC_CLASS_$_FIRMessaging", referenced from:
      objc-class-ref in libFirebaseCppMessaging.a(messaging_231c52c311096cfce13e67fa91eb9ac5.o)
  "_OBJC_CLASS_$_FIRRemoteConfig", referenced from:
      objc-class-ref in libFirebaseCppRemoteConfig.a(remote_config_ios_e6d2ed559f32c182ac8412737f5fb36a.o)
  "_OBJC_CLASS_$_FIROptions", referenced from:
      objc-class-ref in libFirebaseCppApp.a(app_ios_814e1620d4f88024cea4bade26623a67.o)
  "_OBJC_CLASS_$_FIRAnalytics", referenced from:
      objc-class-ref in libFirebaseCppAnalytics.a(analytics_ios_d28a0e676a7367b8f2d91944bb505d87.o)
  "_FIRRemoteConfigThrottledEndTimeInSecondsKey", referenced from:
      ____ZN8firebase13remote_config5FetchEy_block_invoke in libFirebaseCppRemoteConfig.a(remote_config_ios_e6d2ed559f32c182ac8412737f5fb36a.o)
  "_OBJC_CLASS_$_FIRApp", referenced from:
      objc-class-ref in libFirebaseCppApp.a(app_ios_814e1620d4f88024cea4bade26623a67.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
stewartmiles commented 6 years ago

@liquidise I recommend opening up a ticket with https://firebase.google.com/support and sharing a broken project there.

@timskap are you able to reproduce this build failure with our sample projects in this repository?

sivamurugan commented 5 years ago

I got the same problem on using FirebaseDynamicLinks
Also added -ObjC in build settings "Other Linker Flag"

Imported in AppDelegate.m

import "AppDelegate.h"

import <FirebaseCore/FIRApp.h>

import <FirebaseCore/FIROptions.h>

import <FirebaseDynamicLinks/FIRDynamicLinks.h>

Undefined symbols for architecture armv7: "_OBJCCLASS$_FIRComponent", referenced from: objc-class-ref in FirebaseDynamicLinks(FIRDynamicLinks.o) "_OBJCCLASS$_FIRDependency", referenced from: objc-class-ref in FirebaseDynamicLinks(FIRDynamicLinks.o) "_OBJCCLASS$_FIRComponentType", referenced from: objc-class-ref in FirebaseDynamicLinks(FIRDynamicLinks.o) "_OBJCCLASS$_FIRComponentContainer", referenced from: objc-class-ref in FirebaseDynamicLinks(FIRDynamicLinks.o) ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

timskap commented 5 years ago

@timskap are you able to reproduce this build failure with our sample projects in this repository?

I fixed it by using "pod install" and "pod update" in project directory

sivamurugan commented 5 years ago

@timskap i am not using cocopods

zhique commented 5 years ago

@liquidise You don't need to hesitate to share uncompiled code because I created an empty project and only imported the FirebaseDynamicLinks framework, which also causes this error Xcode 10.1 Undefined symbols for architecture x86_64: "_FIRLogError", referenced from: _FDLLog in FirebaseDynamicLinks(FDLLogging.o) "_FIRLogWarning", referenced from: _FDLLog in FirebaseDynamicLinks(FDLLogging.o) "_FIRLogNotice", referenced from: _FDLLog in FirebaseDynamicLinks(FDLLogging.o) "_FIRLogInfo", referenced from: _FDLLog in FirebaseDynamicLinks(FDLLogging.o) "_kFIRLoggerDynamicLinks", referenced from: _FDLLog in FirebaseDynamicLinks(FDLLogging.o) "_OBJCCLASS$_FIRComponentType", referenced from: objc-class-ref in FirebaseDynamicLinks(FIRDynamicLinks.o) "_OBJCCLASS$_FIRDependency", referenced from: objc-class-ref in FirebaseDynamicLinks(FIRDynamicLinks.o) "_OBJCCLASS$_FIRComponentContainer", referenced from: objc-class-ref in FirebaseDynamicLinks(FIRDynamicLinks.o) "_FIRLogDebug", referenced from: _FDLLog in FirebaseDynamicLinks(FDLLogging.o) "_OBJCCLASS$_FIRApp", referenced from: objc-class-ref in FirebaseDynamicLinks(FIRDynamicLinks.o) "_kFirebaseDurableDeepLinkErrorDomain", referenced from: -[FIRDynamicLinks configureDynamicLinks:] in FirebaseDynamicLinks(FIRDynamicLinks.o) "_kServiceInfoFileName", referenced from: -[FIRDynamicLinks configureDynamicLinks:] in FirebaseDynamicLinks(FIRDynamicLinks.o) "_kServiceInfoFileType", referenced from: -[FIRDynamicLinks configureDynamicLinks:] in FirebaseDynamicLinks(FIRDynamicLinks.o) "_OBJCCLASS$_FIRComponent", referenced from: objc-class-ref in FirebaseDynamicLinks(FIRDynamicLinks.o) "_kFIRServiceDynamicLinks", referenced from: -[FIRDynamicLinks configureDynamicLinks:] in FirebaseDynamicLinks(FIRDynamicLinks.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Have you solved the problem now?

NumaNumaNuma commented 5 years ago

Hi, I don't know if this is a related issue, but I also had linking errors, specifically one mentioning libplatform.a. Tried all the above suggestions, nothing worked. I then tried unticking the target membership and now it builds ok... How's libplatform.a used ? Is it safe to disable?

This is the errors I get: Undefined symbols for architecture arm64: "gvr::CardboardHmd::SetDeviceParams(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from: l005 in libplatform.a(vr_ios.o) "gvr::OffscreenFramebuffer::Resize(ion::math::Vector<2, int> const&)", referenced from: l005 in libplatform.a(vr_ios.o) "gvr::VrAppRunner::RenderFrame()", referenced from: l004 in libplatform.a(vr_ios.o) "gvr::VrAppRunner::OnBack()", referenced from: l001 in libplatform.a(vr_ios.o) "gvr::VrAppRunner::Init(std::__1::unique_ptr<gvr::VrSessionImpl, std::__1::default_delete<gvr::VrSessionImpl> >, std::__1::unique_ptr<gvr::VrApp, std::__1::default_delete<gvr::VrApp> >)", referenced from: l001 in libplatform.a(vr_ios.o) "gvr::VrAppRunner::OnTrigger()", referenced from: l001 in libplatform.a(vr_ios.o) l007 in libplatform.a(vr_ios.o) "gvr::ParseCommandLine(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)", referenced from: l001 in libplatform.a(vr_ios.o) "gvr::CreateMainApp__EXPECTED_EXACTLY_ONE_VR_MAIN_APP_STATEMENT__(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&)", referenced from: l001 in libplatform.a(vr_ios.o) "gvr::CardboardVrSessionFactory::CreateCardboardVrSession(gvr::DisplayMetrics const&, gvr::VrAppInfo const&, std::__1::function<void ()> const&, std::__1::function<void ()> const&, std::__1::function<void ()> const&)", referenced from: l001 in libplatform.a(vr_ios.o) ld: symbol(s) not found for architecture arm64

Alexleet commented 5 years ago

Hi! my project is compiled into the archive normally, but as soon as I add:

pod 'Firebase / Database'
pod 'Firebase / Auth'
pod 'Firebase / Storage'
pod 'Firebase / Messaging ’

Install:

Installing Firebase (5.14.0)
Installing FirebaseAnalyticsInterop (1.1.0)
Installing FirebaseAuth (5.1.0)
Installing FirebaseAuthInterop (1.0.0)
Installing FirebaseCore (5.1.9)
Installing FirebaseDatabase (5.0.4)
Installing FirebaseInstanceID (3.3.0)
Installing FirebaseMessaging (3.2.2)
Installing FirebaseStorage (3.0.3)
Installing GTMSessionFetcher (1.2.1)
Installing GoogleUtilities (5.3.6)
Installing Protobuf (3.6.1)
Installing leveldb-library (1.20)

an error occurs:

ld: warning: Some object files have incompatible Objective-C category definitions. Some category metadata may be lost. All files containing Objective-C categories should be built using the same compiler.
ld: could not reparse object file in bitcode bundle: 'Invalid bitcode version (Producer: '902.0.39.2_0' Reader: '900.0.39.2_0')', using libLTO version 'LLVM version 9.0.0, (clang-900.0.39.2)' for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Xcode Version 9.2 (9C40b)

pod --version
1.5.3

I suppose it doesn't depend on the Xcode version

jonsimantov commented 5 years ago

Xcode Version 9.2 (9C40b)

Xcode 9.2 is incompatible with the Firebase Unity libraries due to a bug in Bitcode compatibility in that version.

The Firebase Unity SDK's minimum supported version is Xcode 9.4.1.

Alexleet commented 5 years ago

Xcode Version 9.2 (9C40b)

Xcode 9.2 is incompatible with the Firebase Unity libraries due to a bug in Bitcode compatibility in that version.

The Firebase Unity SDK's minimum supported version is Xcode 9.4.1.

yea, my problem was in the xcode version

zendorx commented 5 years ago

Hello, I have struggled with same error. I did try 'pod install' 'pod update' manually but it did not help.

Xcode version: Version 10.1 (10B61) Unity version: 2018.3.0f2 Cocoapods version: 1.5.3 Firebase SDK version: 5.4.3

Undefined symbols for architecture armv7: "_OBJCCLASS$_FIRMessaging", referenced from: objc-class-ref in libFirebaseCppMessaging.a

unity editor log console output full error output pod file

Update: I update Firebase Analytics and Messaging to 5.4.4 and also fixed pod file:

source 'https://github.com/CocoaPods/Specs.git' source 'https://github.com/CocoaPods/Specs' platform :ios, '10.0'

target 'Unity-iPhone' do pod 'Firebase/Analytics', '5.15.0' pod 'Firebase/Core', '5.15.0' pod 'GoogleAppMeasurement', '5.4.0' pod 'Google-Mobile-Ads-SDK', '~> 7.0' end

But still get same error!

zendorx commented 5 years ago

Bug found, fibase generate invalid pod file, I need manually fix it to setup frameworks.. There is no Messaging framewk in pod file

stewartmiles commented 5 years ago

@zendorx Firebase generates a podfile using the iOS Resolver. Each pod is referenced by a Firebase/Editor/COMPONENTDependencies.xml file in the plugin, if you've removed Firebase/Editor/MessagingDependencies.xml file then the Firebase/Messaging pod will not be added to the generated Podfile.

From what I can fathom, the issues originally reported in this thread have been solved so I'm closing this issue.

MichelPro commented 5 years ago

I am experiencing the same issue:

Undefined symbols for architecture arm64:
  "_Firebase_App_Variant_blob_as_vector", referenced from:
      _AppUtilPINVOKE_Firebase_App_Variant_blob_as_vector_m2570477025 in Bulk_Firebase.App_0.o
      _Variant_blob_as_vector_m1034438908 in Bulk_Firebase.App_0.o
     (maybe you meant: _AppUtilPINVOKE_Firebase_App_Variant_blob_as_vector_m2570477025)
  "_Firebase_App_FirebaseApp_Name_get", referenced from:
      _AppUtilPINVOKE_Firebase_App_FirebaseApp_Name_get_m2723388150 in Bulk_Firebase.App_0.o
      _FirebaseApp_get_Name_m2009872515 in Bulk_Firebase.App_0.o
     (maybe you meant: _AppUtilPINVOKE_Firebase_App_FirebaseApp_Name_get_m2723388150)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Operating system: macOS Operating system version: High Sierra 10.13.6 Unity version: 2018.2.8f1 Xcode version tested: 9.4.1, 10.0 iOS versions tested: 11.0, 12.0 iOS devices tested: iPhone X, iPhone 6s, iPhone 5s

I've tried downgrading the firebase pod versions from 5.7 to 4.0 and 3.7, but getting the same error.

Hi ! Have you solved this bug?

zendorx commented 5 years ago

Have you solved this bug?

Hi, I found that Firebase plugin does not generate podfile properly. I have added Admob (or whatever lib you need) manually to podfile after XCODE project generation.

stewartmiles commented 5 years ago

@zendorx what do you mean the Podfile isn't generated properly? What Podfile do you see generated and how is it incorrect?

FWIW: https://github.com/googlesamples/unity-jar-resolver generates the Podfile not the Firebase plugin.

google-oss-bot commented 5 years ago

Hey @neeravBlacklight. We need more information to resolve this issue but there hasn't been an update in 7 days. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot commented 5 years ago

Since there haven't been any recent updates here, I am going to close this issue.

@neeravBlacklight if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

rajashekaranugu commented 5 years ago

Hi All am also facing the same issue

Using Firebase plugin and firebase dynamic plugin in my ionic/cordova project < plugin name="cordova-plugin-firebase-dynamiclinks" source="npm" spec="0.14.0"> < param name="APP_DOMAIN" value="mysite.com" /> < param name="PAGE_LINK_DOMAIN" value="example.page.link" /> < param name="FIREBASE_DYNAMIC_LINKS_VERSION" value="11.0.0" />

IONIC INFO Ionic:

ionic (Ionic CLI) : 4.5.0 Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.2.4

Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1) Cordova Platforms : browser 5.0.4, ios 4.5.5 Cordova Plugins : cordova-plugin-ionic-webview 1.2.1, (and 21 other plugins)

System:

ios-deploy : 1.9.4 NodeJS : v10.16.3 (/usr/local/bin/node) npm : 6.12.1 OS : macOS Mojave Xcode : Xcode 11.1 Build version 11A1027

Error: Undefined symbols for architecture x86_64: "_OBJCCLASS$_FIRComponent", referenced from: objc-class-ref in FirebaseAuth(FIRAuth.o) "_OBJCCLASS$_FIRComponentType", referenced from: objc-class-ref in FirebaseAuth(FIRAuth.o) "_OBJCCLASS$_FIRComponentContainer", referenced from: objc-class-ref in FirebaseAuth(FIRAuth.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Tried pod install and pod update pOD FILE . ---pod --version . 1.8.4 platform :ios, '8.0' target 'MMA_Uat' do project 'MMA_Uat.xcodeproj' pod 'Firebase/DynamicLinks', '~> 4.1' pod 'FirebaseMessaging', '~> 2.0.0' end

Struggling with this error from past two days any help is appriciated

Thanks

rajashekaranugu commented 5 years ago

I got the same problem on using FirebaseDynamicLinks Also added -ObjC in build settings "Other Linker Flag"

Imported in AppDelegate.m

import "AppDelegate.h"

import <FirebaseCore/FIRApp.h>

import <FirebaseCore/FIROptions.h>

import <FirebaseDynamicLinks/FIRDynamicLinks.h>

Undefined symbols for architecture armv7: "_OBJCCLASS$_FIRComponent", referenced from: objc-class-ref in FirebaseDynamicLinks(FIRDynamicLinks.o) "_OBJCCLASS$_FIRDependency", referenced from: objc-class-ref in FirebaseDynamicLinks(FIRDynamicLinks.o) "_OBJCCLASS$_FIRComponentType", referenced from: objc-class-ref in FirebaseDynamicLinks(FIRDynamicLinks.o) "_OBJCCLASS$_FIRComponentContainer", referenced from: objc-class-ref in FirebaseDynamicLinks(FIRDynamicLinks.o) ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Hi How did you resolve this issue. can you please help m