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

Version mismatch and compile errors #28

Open
helferapp opened this issue Mar 5, 2020 · 3 comments
Open

Version mismatch and compile errors #28

helferapp opened this issue Mar 5, 2020 · 3 comments

Comments

@helferapp
Copy link

There are different issues:

  1. version mismatch: when I load NativeToolkit from Unity Asset store, there are 2 version:
    version 1.2 from May,22 2019 and for Unity 2018.2.20
    version 1.2.2 from August,13 2018
    Why has the new version a lower version number? This way Asset Store update mechanism is confused.

  2. Unity build for iOS: Using latest unity 2019.3.3f1, on OSX Catalina 10.15.3
    here I get a build error: Exception: Calling TargetGuidByName with name='Unity-iPhone' is deprecated.
    I needed to change file Assets/NativeToolkit/Editor/PostProcessor.cs, line 24 to:
    string targetGuid = proj.GetUnityMainTargetGuid();

  3. Compile errors in XCode Version 11.3.1: compiling a sample project with Native Toolkit only I get a list of linker errors:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_ALAssetsLibrary", referenced from:
      objc-class-ref in ImageTools.o
  "_OBJC_CLASS_$_ABPeoplePickerNavigationController", referenced from:
      objc-class-ref in Contacts.o
  "_kABPersonFirstNameProperty", referenced from:
      -[Contacts peoplePickerNavigationController:shouldContinueAfterSelectingPerson:] in Contacts.o
  "_kABPersonPhoneProperty", referenced from:
      -[Contacts peoplePickerNavigationController:shouldContinueAfterSelectingPerson:] in Contacts.o
  "_kABPersonEmailProperty", referenced from:
      -[Contacts peoplePickerNavigationController:shouldContinueAfterSelectingPerson:] in Contacts.o
  "_ABRecordCopyValue", referenced from:
      -[Contacts peoplePickerNavigationController:shouldContinueAfterSelectingPerson:] in Contacts.o
  "_kABPersonLastNameProperty", referenced from:
      -[Contacts peoplePickerNavigationController:shouldContinueAfterSelectingPerson:] in Contacts.o
  "_OBJC_CLASS_$_MFMailComposeViewController", referenced from:
      objc-class-ref in Email.o
  "_ABMultiValueCopyValueAtIndex", referenced from:
      -[Contacts peoplePickerNavigationController:shouldContinueAfterSelectingPerson:] in Contacts.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

What to do to link without errors?
Thank you
Frank

@mahgo
Copy link

mahgo commented Sep 8, 2020

Did you have any luck getting this building? I'm having issues getting it built too.

@mraustinmiller
Copy link

Also having this issue. Any updates?

@mraustinmiller
Copy link

mraustinmiller commented Mar 9, 2021

I am working on Unity 2020.1.17f and was continuing to get this issue. I only want to use the image tools out of the issues outlined above so I removed all of them except for that. I dug a little deeper to find a fix and recently and found out that the the AssetLibrarys.framework doesn't come out of the box for Unity projects. So for the issue with "_OBJC_CLASS_$_ALAssetsLibrary", referenced from: objc-class-ref in ImageTools.o, you can fix it by adding the AssetLibrary.framework to the Framework and Libraries section in BOTH the UnityFramework and Unity-iPhone targets in XCode. It needs to be in both or it won't work. If you want it to be done automatically you can add the following the the PostProcessor.cs script:

proj.AddFrameworkToProject(proj.GetUnityFrameworkTargetGuid(), "AssetsLibrary.framework", false); proj.AddBuildProperty(proj.GetUnityFrameworkTargetGuid(), "OTHER_LDFLAGS", "-ObjC"); proj.AddFrameworkToProject(proj.GetUnityMainTargetGuid(), "AssetsLibrary.framework", false); proj.AddBuildProperty(proj.GetUnityMainTargetGuid(), "OTHER_LDFLAGS", "-ObjC");

where proj is a PBXProject type that is set in the original PostProcessor.cs script in this repo. This fix will likely not work pre 2019.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants