We have an app that was originally made for iOS. Now the client wants to port it to Android. All well, we download this package and unselect everything regarding to iOS. We use our own ARKit hooks for that. However linking fails because the ARCore for iOS framework is not added. Why are we forced to use this?
It seems that Unity ARCore plugin has hard dependencies to the iOS ARCore SDK?
Hi, thanks for the report. Could you explain a little more of what's your project set up, your build target, what is the error and what would have been the expected behaviour?
The setup is as I mentioned made for iOS first. We therefore already have an ARKit integration running. We use Jenkins to build and distribute. We are building from command line with the following arguments:
-projectPath "${WORKSPACE}/" -buildNumber ${BUILD_NUMBER} -buildtarget ios -quit -batchmode -executeMethod CiBuild.BuildScript.BuildIos -logFile /dev/stdout
The BuildIos function simply adds stuff to the Info.plist. Now this part of the process works fine but the next step which is the Xcode build fails at linking as it is trying to reference ARCore integration stuff like these:

Mind you, we have unselected integration and generation of Cocoapods packages. So why is this still happening on iOS?
Android build works fine though.
I had a similar question in #247. For iOS 11 it's possible to include the ARCore library as a dependency, but for earlier versions ARCore will prevent us from compiling the app at all.
I worked around it by adding #if UNITY_ANDROID to all ARCore files. Make sure to keep the serialized properties and fields in place so you don't lose references and data whenever switching platforms. It would be great if this was supported out of the box :)
Thing is there are options to not include and generate podfile for iOS but even with everything unchecked I get the linker errors. Would love an official response on this.
Can you guys try to change the "__Internal" to "NOT_AVAILABLE" in these two files and see if that resolves your issue?
We have the same problem. Our app uses ARCore for Android, and ARKit for iOS. On Devices without ARCore/ARKit we have a fallback mode. But with ARCore included it is not possible to compile for iOS SDK versions below 11.0
Thw workaround suggested by @Klipi is not practicable in my opinion as there are a lot of files that need to be changed after each update.
The workaround suggested by @bopangzz seems to be better but an option to completly exclude ARCore from iOS Builds would be really nice.
Unfortunately it is also not possible to move the ARCore folder into Plugins/Android.
Any information from official side about this issue?
I should add that we also have a fallback solution for non-ar devices and therefore target iOS 10.
Also I see this is tagged as a ”feature request” which worries me a bit. This seems more like a architectual error than a proposed feature. I hope this gets prioritized accordingly.
The issue with iOS is that everything is static linked on iOS and since ARCore provide cloud anchor support on iOS, it will need to static link the ARCore iOS library.
We will prioritize this issue and resolve it in future releases. Stay tuned.
@bopangzz a framework can be dynamic. Why don’t you package it like that instead?
Unfortunately, Unity doesn't support dynamic framework on iOS yet. But we have prioritized this issue and will make the ARCore iOS support an opt-in option in ARCore settings in the next release.
For now, you can delete AppDependencies.xml under Assets/GoogleARCore/Editor folder and change the "__Internal" to "NOT_AVAILABLE" in these two files to workaround this issue.
Let me know if there is other issues regards this problem.
@bopangzz You are right, although isn't the framework added by a podfile later anyway? In any way, nevermind - you seem to have this under control. Thank you for swift communication and feedback!
Thanks @sebrk , we'll keep it open until we release a fix for it.
Hi, ARCore SDK for Unity v1.4.0 has been released and now you can disable the iOS support through Edit->ProjectSettings->ARCore-> iOS support enabled.
Most helpful comment
The issue with iOS is that everything is static linked on iOS and since ARCore provide cloud anchor support on iOS, it will need to static link the ARCore iOS library.
We will prioritize this issue and resolve it in future releases. Stay tuned.