Unity Cloud Build (iOS) linker errors

2,187 views
Skip to first unread message

Chris Foulston

unread,
May 24, 2017, 8:04:15 PM5/24/17
to Firebase Google Group
Hi,

Having quite a lot of trouble trying to compile my project on Unity Cloud Build for IOS.
I'm aware that cocoapods are not supported on UCB. So I've followed the steps outlined here: https://stackoverflow.com/questions/41896479/firebase-xcode-linker-command-error-using-firebase-unity-sdk/43260825#43260825

Now, creating an empty project, importing the SDK and following the above guide, the project will compile!
However, as soon as I start using Firebase classes I get linker errors:

3907:        [xcode] ld: warning: arm64 function not 4-byte aligned: ltmp0 from /BUILD_PATH/ludomade.firebase-sdk.default-ios/temp.4ZXW6g/Libraries/libiPhone-lib.a(unwind_test_arm64.o)
3908:        [xcode] ld: warning: arm64 function not 4-byte aligned: _unwind_tester from /BUILD_PATH/ludomade.firebase-sdk.default-ios/temp.4ZXW6g/Libraries/libiPhone-lib.a(unwind_test_arm64.o)
3909:        [xcode] Undefined symbols for architecture arm64:
3910:        [xcode]   "_OBJC_CLASS_$_FIREmailPasswordAuthProvider", referenced from:
3911:        [xcode]       objc-class-ref in libAuth.a(credential_ios_ef8c3cf45c3329a5e5902f99026c639a.o)
3912:        [xcode] ld: symbol(s) not found for architecture arm64
3913:        [xcode] clang: error: linker command failed with exit code 1 (use -v to see invocation)
3914:        [xcode] ** ARCHIVE FAILED **
3915:        [xcode] The following build commands failed:
3916:        [xcode] Ld /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-diczpkbvenndtrflmfvevjaufsmv/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/arm64/zakstorm normal arm64
3917:        [xcode] (1 failure)

I haven't modified any framework or dll metadata in Unity. I simply imported the packages, wrote a custom PostProcessScript to add missing frameworks, -ObjC, etc.

The features I'm using are FirebaseAuth and FirebaseDatabase

I'm kinda out of options here, and I really don't want to go buy a Mac for the simple purpose of compiling my Project.

Any ideas?

Chris Foulston

unread,
May 25, 2017, 11:14:26 PM5/25/17
to Firebase Google Group
Still struggling with this. Any ideas or hints as to what this might be?

Am I missing some frameworks? My Post process script looks like this:

public class PostProcessHandler {

    [PostProcessBuild]
   public static void OnPostprocessBuild(BuildTarget buildTarget, string pathToBuiltProject) {

        Debug.Log("Post Processing Build Target: " + buildTarget);

        if (buildTarget == BuildTarget.iOS) {

            PostProcessIOS(pathToBuiltProject);
       }
   }

    private static void PostProcessIOS(string path) {

        Debug.Log("PostProcessIOS: " + path);

        // Go get pbxproj file

        string projPath = path + "/Unity-iPhone.xcodeproj/project.pbxproj";

        // PBXProject class represents a project build settings file,
       // here is how to read that in.

        UnityEditor.iOS.Xcode.PBXProject proj = new UnityEditor.iOS.Xcode.PBXProject();
       proj.ReadFromFile(projPath);

        string target = proj.TargetGuidByName("Unity-iPhone");

        proj.AddBuildProperty(target, "OTHER_LDFLAGS", "-ObjC");
       proj.AddBuildProperty(target, "OTHER_LDFLAGS", "-v");
       proj.SetBuildProperty(target, "ENABLE_BITCODE", "NO");

        if (!File.Exists(path + "/GoogleService-Info.plist")) {

            FileUtil.CopyFileOrDirectory("Assets/GoogleService-Info.plist", path + "/GoogleService-Info.plist");
       }

        string guid = proj.AddFile("GoogleService-Info.plist", "GoogleService-Info.plist");

        proj.AddFileToBuild(target, guid);

        proj.AddFrameworkToProject(target, "AdSupport.framework", false);
       proj.AddFrameworkToProject(target, "CoreData.framework", false);
       proj.AddFrameworkToProject(target, "SystemConfiguration.framework", false);
       proj.AddFrameworkToProject(target, "libz.dylib", false);
       proj.AddFrameworkToProject(target, "libsqlite3.dylib", false);
       proj.AddFrameworkToProject(target, "libicucore.tbd", false);
       proj.AddFrameworkToProject(target, "libApp.a", false);
       proj.AddFrameworkToProject(target, "libAnalytics.a", false);

        //Write the project back

        proj.WriteToFile(projPath);

        Debug.Log("PostProcessIOS Complete");
   }
}


Stewart Miles

unread,
May 30, 2017, 7:09:19 PM5/30/17
to Firebase Google Group
The most recent release of the iOS SDK (released at Google I/O '17) contained breaking API changes.  To make matters worse in our 3.0.3 Unity SDK release we ended up releasing a regression that broke how we pin to specific versions of Cocoapods.

You should import the latest Play Services Resolver plugin into your project available here https://github.com/googlesamples/unity-jar-resolver/blob/master/play-services-resolver-1.2.23.0.unitypackage which will fix the Podfile generation for local builds.

In your UCB builds if you're importing the frameworks you need to download the 3.17.0 frameworks and add them to your project instead.

Cheers,
Stewart

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/ac808827-05fe-45f2-b65a-4f235e6acee1%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Stewart Miles

unread,
Jun 9, 2017, 7:19:26 PM6/9/17
to Firebase Google Group
We resolve the Cocoapod version pinning issue in the 4.0.0 release of the Firebase Unity SDK.

Release notes here:

Please give this a try and let us know if you're still having issues.

Cheers,
Stewart

Super bunso

unread,
Jun 13, 2017, 9:48:50 AM6/13/17
to fireba...@googlegroups.com
Hi, I'm testing your latest release but I'm having error in unity cloud build , I attached image for the error in unity cloud build 

You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/WKDzxqoHFew/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-talk+unsubscribe@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.
Untitled.png

Stewart Miles

unread,
Jun 13, 2017, 10:50:26 AM6/13/17
to Firebase Google Group
Any chance you could share the complete Unity Cloud Build log?  If you can't on this public forum please open a support ticket on http://firebase.google.com/support and share privately there and we'll diagnose the issue.

Are you using Cocoapods in Unity Cloud Build or adding frameworks manually?

A couple of things stand out here:
  • Reference to FIRStorageUtils is very odd as we don't actually depend upon the FirebaseStorage framework / Cocoapod.
  • The reference to FIRDynamicLinks should only occur if you're using either dynamic links or invites in your project.  If you have Cocoapods enabled this should be included automatically, if you're manually including frameworks then perhaps you're not including the FirebaseDynamicLinks framework and it's dependencies?
Cheers,
Stewart

On Tue, Jun 13, 2017 at 4:48 AM, Super bunso <http....@gmail.com> wrote:
Hi, I'm testing your latest release but I'm having error in unity cloud build , I attached image for the error in unity cloud build 
Untitled.png

Super bunso

unread,
Jun 14, 2017, 9:55:21 AM6/14/17
to fireba...@googlegroups.com
I'm adding frameworks manually, yeah its wierd why it was showing I only import assets, auth, message, analytics ,storage and database

On Tue, Jun 13, 2017 at 10:50 PM, 'Stewart Miles' via Firebase Google Group <fireba...@googlegroups.com> wrote:
Any chance you could share the complete Unity Cloud Build log?  If you can't on this public forum please open a support ticket on http://firebase.google.com/support and share privately there and we'll diagnose the issue.

Are you using Cocoapods in Unity Cloud Build or adding frameworks manually?

A couple of things stand out here:
  • Reference to FIRStorageUtils is very odd as we don't actually depend upon the FirebaseStorage framework / Cocoapod.
  • The reference to FIRDynamicLinks should only occur if you're using either dynamic links or invites in your project.  If you have Cocoapods enabled this should be included automatically, if you're manually including frameworks then perhaps you're not including the FirebaseDynamicLinks framework and it's dependencies?
Cheers,
Stewart
On Tue, Jun 13, 2017 at 4:48 AM, Super bunso <http....@gmail.com> wrote:
Hi, I'm testing your latest release but I'm having error in unity cloud build , I attached image for the error in unity cloud build 

Stewart Miles

unread,
Jun 14, 2017, 11:58:51 AM6/14/17
to Firebase Google Group
Did you try upgrading to the latest set of iOS frameworks (version 4.0.2)?  That's what we require in the Firebase Unity 4.0.0 SDK.  You can always check the dependencies by looking at the pod dependencies under the *Deps.cs files in the plugin.

Cheers,
Stewart

On Tue, Jun 13, 2017 at 10:55 PM, Super bunso <http....@gmail.com> wrote:
I'm adding frameworks manually, yeah its wierd why it was showing I only import assets, auth, message, analytics ,storage and database

Super bunso

unread,
Jun 14, 2017, 9:14:22 PM6/14/17
to fireba...@googlegroups.com
yes I'm using the latest one 

On Wed, Jun 14, 2017 at 11:58 PM, 'Stewart Miles' via Firebase Google Group <fireba...@googlegroups.com> wrote:
Did you try upgrading to the latest set of iOS frameworks (version 4.0.2)?  That's what we require in the Firebase Unity 4.0.0 SDK.  You can always check the dependencies by looking at the pod dependencies under the *Deps.cs files in the plugin.

Cheers,
Stewart
On Tue, Jun 13, 2017 at 10:55 PM, Super bunso <http....@gmail.com> wrote:
I'm adding frameworks manually, yeah its wierd why it was showing I only import assets, auth, message, analytics ,storage and database

Stewart Miles

unread,
Jun 15, 2017, 11:21:14 AM6/15/17
to Firebase Google Group
Ok could you share the complete build log.  If you're seeing link errors then you're missing some frameworks, we can help determine which ones.

Cheers,
Stewart

On Wed, Jun 14, 2017 at 5:02 PM, Super bunso <http....@gmail.com> wrote:
yes I'm using the latest one 
Reply all
Reply to author
Forward
0 new messages