Update: iOS 64 bit support shipped as 4.6.2 (Unity Blog)
Hi Everyone,
I’m making this post to serve as a checklist for preparing your projects for iOS 64 bit support. But before that I would like to share current status on Unity iOS 64 bit support, which I already posted on other forum threads few days ago…
We already shipped first Unity 5 and Unity 4.6 alpha builds with iOS 64 bit support to the alpha group. We also partnered with Prime31 developers to make sure their plugins are 64 bit and IL2CPP compatible with first alpha builds. We are also working with dedicated focus group of developers to test it on as many different projects as possible. We expect to reach beta groups right after New Year.
To better prepare for iOS 64 bit support:
start upgrading your current project to Unity 4.6 (or Unity 5) now, only these two versions of Unity will receive iOS 64 bit support.
If you are dependent on some 3rd party plugins:
start asking plugin vendors for 64 bit versions of their plugin updates early;
if plugin vendors have troubles making them compatible with Unity iOS 64 bit scripting backend, they should contact support@unity3d.com or ping me directly via forum PM;
if you are plugin vendor or making native plugins on your own, here is basic checklist:
like I mentioned above, iOS 64 bit support will be brought only to Unity 4.6 and 5.0 versions, so it’s very important that plugins work fine with these versions;
Unity iOS 64 bit support is based on our own new .NET runtime implementation - IL2CPP, which means if plugin is using Mono runtime APIs (all the mono_* functions) then it won’t link anymore. The best way to resolve this issue is switching to passing managed delegates to the native side of plugin and calling them as callbacks when some native data or event arrives;
all plugins that come as precompiled static libraries (.a files) should now include ARM64 slice;
plugins that are targeting Unity 5.0 should keep in mind that Unity 5.0 Xcode project has ARC enabled by default, so plugin code available as ObjC files should be ARC compatible, or plugin integration script should ensure that these files have additional compile option -fno-objc-arc set when added to Xcode project. Also precompiled plugins that are using standard C++ libraries should be compiled with libc++ (LLVM C++ standard library with C++11 support) option in Xcode.
Our official blogpost on iOS 64 bit support can be found here: Unity Blog
We posted Unity 5.0 b19 in the Unity 5 Pre-Order Beta forum today for 5.0 pre-order customers. This build added iOS il2cpp and 64-bit support.
As promised, we are also working on bringing iOS 64-bit support with il2cpp back to Unity 4.6. You can download and discuss a beta of Unity 4.6 with iOS 64-bit support in the iOS subforum, in this thread.
FYI I believe the Mono (2.x) scripting backend handles System.Threading.Interlocked while the IL2CPP scripting backend does not. I don’t see this mentioned in the Known Issues for 4.6.2.
Reported against 5.0 Beta and also repro’d against 4.6.2.
I updated Unity from 4.5.5 to 4.6 in MAC OSX 10.10.1 and using XCode 6.1.1. When I tried to make build, Xcode stopped working. Xcode window shows up once (for couple of seconds) and then shows up error “launching iOS project via Xcode 4 failed” in my console. It happened when I upgraded Unity to 4.6.
We are having issues with OnAudioFilterRead: If you simply add a script with the method implemented, sounds stop working on 64 bit builds. Works fine in the editor and with the Mono backend, but simply kills all audio output with IL2CPP. I tested this with a very minimalistic fresh project, and reported the bug from the Editor.
Hi! I have issues with Socket: the AsyncCallback delegate of Socket.BeginConnect had not been invoked, but it work well in Mono (2.x) . Is it a known issue?
Case 669061.
I noticed I forgot to press save before attaching the project, sorry. But the bug is really simple to reproduce. Just add an AudioSource and add the Filter script (which implements OnAudioFilterRead) to it.
(Case 669261)
I just submitted a IL2CPP related bug that again only hits old devices/iOS versions ( iPod 3rd Gen, iOS 5.1.1 ), iPad3/iOS 8.1 is fine ( no other version available to verify. ) . The Bug also did NOT occure with the scripting backend set to Mono and/or using Unity 4.6.1P4 and earlier
Essentially it’s a bug where the game crashes with the following message
dyld: Symbol not found: ___sincosf_stret Referenced from: /var/mobile/Applications/… Expected in: /usr/lib/libSystem.B.dylib
Crash happens midgame, as soon as the game coreloop starts ( where i DO some math and physics). At the time of crash, a whole load of scene and resource loading and setup already happened - it’s really the start of the game core loop when this happens, long after the scene has been loaded and the level been setup.
Debug session tells me this happens in PhysicManager->FixedUpdate().
Googling told me that this is a somehow known crash caused by compiler optimizations regarding sinf()/cosf(), which are available on iOS7 and higher. This would fit to my experience getting the crash only on my iPod/iOS5.1.1
I submitted the XCode project, sorry can’t submit the whole Unity project because of legal issues
See the case number on top of this message
Despite this bug, congrats to the whole work on IL2CPP, i never thought i could get this rather big project to compile on IL2CPP so quickly …
When using the IL2CPP scripting backend, I get the following linker error from undefined symbols:
Undefined symbols for architecture armv7:
“Register_UnityEngine_Component_get_networkView()”, referenced from:
RegisterAllStrippedInternalCalls() in UnityICallRegistration.o
“Register_UnityEngine_Network_Internal_GetTime()”, referenced from:
RegisterAllStrippedInternalCalls() in UnityICallRegistration.o
“Register_UnityEngine_Network_get_peerType()”, referenced from:
RegisterAllStrippedInternalCalls() in UnityICallRegistration.o
“Register_UnityEngine_NetworkView_Internal_RPC()”, referenced from:
RegisterAllStrippedInternalCalls() in UnityICallRegistration.o
ld: symbol(s) not found for architecture armv7
This happens for both ARMv7 and ARM64 architectures. Mono 2.0 works fine.
I thought it might be because of code stripping, so I added a link.xml file just to test if it makes a difference:
Adding the link.xml, I get more errors (from the Network class):
Undefined symbols for architecture armv7:
“Register_UnityEngine_Network_HavePublicAddress()”, referenced from:
RegisterAllStrippedInternalCalls() in UnityICallRegistration.o
“Register_UnityEngine_Network_get_isMessageQueueRunning()”, referenced from:
RegisterAllStrippedInternalCalls() in UnityICallRegistration.o
“Register_UnityEngine_Network_GetAveragePing()”, referenced from:
RegisterAllStrippedInternalCalls() in UnityICallRegistration.o
“Register_UnityEngine_Network_Internal_GetPlayer()”, referenced from:
RegisterAllStrippedInternalCalls() in UnityICallRegistration.o
“Register_UnityEngine_Network_get_connectionTesterPort()”, referenced from:
RegisterAllStrippedInternalCalls() in UnityICallRegistration.o
“Register_UnityEngine_Network_get_useNat()”, referenced from:
RegisterAllStrippedInternalCalls() in UnityICallRegistration.o
“Register_UnityEngine_Network_get_maxConnections()”, referenced from:
RegisterAllStrippedInternalCalls() in UnityICallRegistration.o
…
Is this a bug that I should report, or am I doing something wrong? Any tips on how to proceed are appreciated.