Hi
I'm trying to build my game on IOS using Unity cloud build. Unfortunately i got some problems with linker and can't figure out how to fix them.
This is part of the log from build:
18376: [xcode] Undefined symbols for architecture arm64:
18377: [xcode] "_OBJC_CLASS_$_NSBundleResourceRequest", referenced from:
18378: [xcode] objc-class-ref in libiPhone-lib.a(OnDemandResources.o)
18379: [xcode] ld: symbol(s) not found for architecture arm64
i tried to find something about that in google but have no good answer. Just before i got this error i started to use post process api to add some libraries needed by google analitics plugins (for the record did it for fix some other linker error). Maybe i made something wrong there? Maybe i have to add something similar? This is code i use
public static void OnPostprocessBuild(BuildTarget buildTarget, string path)
{
#if UNITY_IOS
Debug.Log("OnPostprocessBuildiOS");
string projPath = path + "/Unity-iPhone.xcodeproj/project.pbxproj";
PBXProject proj = new PBXProject ();
proj.ReadFromString (File.ReadAllText (projPath));
string target = proj.TargetGuidByName ("Unity-iPhone");
// Set a custom link flag
proj.AddBuildProperty (target, "OTHER_LDFLAGS", "-all_load");
proj.AddBuildProperty (target, "OTHER_LDFLAGS", "-ObjC");
// add frameworks
proj.AddFrameworkToProject(target, "AdSupport.framework", true);
proj.AddFrameworkToProject(target, "CoreData.framework", true);
proj.AddFrameworkToProject(target, "SystemConfiguration.framework", true);
AddUsrLib(proj, target, "libz.dylib");
AddUsrLib(proj, target, "libsqlite3.dylib");
File.WriteAllText (projPath, proj.WriteToString ());
}
private static void AddUsrLib(PBXProject proj, string targetGuid, string framework)
{
string fileGuid = proj.AddFile("usr/lib/" + framework, "Frameworks/" + framework, PBXSourceTree.Sdk);
proj.AddFileToBuild(targetGuid, fileGuid);
#endif
}
i will be glad to hear any suggestions ;-).
↧