Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS Sample apps failing during linking process #13

Closed
ToddKerpelman opened this issue Nov 23, 2016 · 5 comments
Closed

iOS Sample apps failing during linking process #13

ToddKerpelman opened this issue Nov 23, 2016 · 5 comments

Comments

@ToddKerpelman
Copy link

I'm sure this is a case of "Todd forgetting some simple step" here, but I'm having issues running the sample apps on an actual iOS device -- the apps fail on the linker step.

I'll use the remote-config one as an example. I've imported the RemoteConfig.unitypackage and added the appropriate info.plist file to the sample app. I've selected iOS as the platform; built and run.

The generated Xcode project opens okay, but during the linking process fails with:

Undefined symbols for architecture arm64:
"OBJC_CLASS$_FIROptions", referenced from:
objc-class-ref in libApp.a(app_ios_c76c7d869e568a9b561ea55e25a7dcc0.o)
"OBJC_CLASS$_FIRRemoteConfigSettings", referenced from:
objc-class-ref in libRemoteConfig.a(remote_config_ios_53531e292e202c8e07f4ebe5b73bbec1.o)
"OBJC_CLASS$_FIRRemoteConfig", referenced from:
objc-class-ref in libRemoteConfig.a(remote_config_ios_53531e292e202c8e07f4ebe5b73bbec1.o)
"OBJC_CLASS$_FIRApp", referenced from:
objc-class-ref in libApp.a(app_ios_c76c7d869e568a9b561ea55e25a7dcc0.o)
"_FIRRemoteConfigThrottledEndTimeInSecondsKey", referenced from:
____ZN8firebase13remote_config5FetchEy_block_invoke in libRemoteConfig.a(remote_config_ios_53531e292e202c8e07f4ebe5b73bbec1.o)

I can see both libApp.a and libRemoteConfig.a in my Build Phases > Link Binary with Libraries step. And it appears as though the pod install has run, although I don't see a generated workspace -- I'm assuming that's intentional due to integrate_targets being false.

So I'm guessing this is probably a case of something simple not being added or some flag not being set. Any ideas?

@ToddKerpelman
Copy link
Author

Further information I probably should have noticed earlier: On exporting, I do get an error about Unity being unable to parse my PBX project. This is with Unity 5.4.2 and Xcode 8.1. I'll update my Unity to 5.4.3 and see if that fixes the issue...

Exception: Invalid PBX project (parsing line 0)
UnityEditor.iOS.Xcode.PBX.Parser.ParseTree () (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/XCode/PBX/Parser.cs:114)
UnityEditor.iOS.Xcode.PBXProjectData.ParseContent (System.String content) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/XCode/PBXProjectData.cs:451)
UnityEditor.iOS.Xcode.PBXProjectData.ReadFromStream (System.IO.TextReader sr) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/XCode/PBXProjectData.cs:458)
UnityEditor.iOS.Xcode.PBXProject.ReadFromStream (System.IO.TextReader sr) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/XCode/PBXProject.cs:868)
UnityEditor.iOS.Xcode.PBXProject.ReadFromString (System.String src) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/XCode/PBXProject.cs:863)
Google.IOSResolver.OnPostProcessUpdateProjectDeps (BuildTarget buildTarget, System.String pathToBuiltProject)
UnityEditor.HostView:OnGUI()

@ToddKerpelman
Copy link
Author

Just confirming that I still get this ParseTree() error even when I update to Unity 5.4.3f1. Hmmm....

@stewartmiles
Copy link
Contributor

Looking at the example project ToddKerpelman shared with me, it's possible that this is due to an out of date Cocoapods install which is causing CocoaPods/CocoaPods#1275 . Essentially when "pod install" is executed it generates an XML Xcode project which can't be read by the xcodeapi in Unity. We have better reporting lined up for the next release.

@stewartmiles
Copy link
Contributor

Todd confirmed that updating to Cocoapods 1.1.x resolved the issue. He was using 1.0.0 before which resulted in the generate Pods.xcproject to be written out in XML format which can't be read by Unity.

@ToddKerpelman
Copy link
Author

Yep. For anybody else who encounters this problem, please update your version of Cocoapods.

@firebase firebase locked and limited conversation to collaborators Oct 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants