4.6 iOS 64-bit beta

Update Feburary 19th: We have just released Unity4.6.3 which contains many iOS il2cpp improvements: Unity Blog

Update January 29th: We have just released Unity 4.6.2 which contains il2cpp for iOS and iOS 64-bit support.


Update January 23rd: We have just released Unity 4.6.1p5 which contains il2cpp for iOS and iOS 64-bit support.

Original Post:

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 we wrote before, we are also committed to bringing iOS il2cpp and 64-bit support back to Unity 4.6. So, here is the first public beta release (designated #2, #1 was a private beta only) of Unity 4.6 with iOS 64 support.

Please make sure you test this with us on projects you are currently developing or have on the appstore today; as per the Apple announcements, 64-bit support will be required for new apps starting the 1st of February 2015 and for that you will need to build with ARM64 and thus, IL2CPP support.

This build of 4.6 does not yet support Metal, that will come in a later beta. This build is in sync on IL2CPP support with Unity 5 b19 ARM64 build and is for the rest roughly equivalent to the latest 4.6 patch release build.

For more context about that that means; we’ve recently blogged about ios and ARM64 here; and we’ve got an in depth post on our strategy with IL2CPP here.
This build is early beta quality, with known issues, but we wanted to start getting builds out to you and see / hear how your project is doing on IL2CPP.

Some notes on work in progress / current state of this build.

  • To enable IL2CPP and ARM64 support you should switch scripting backend to “IL2CPP” in the Player Settings/iOS tab.
  • Build times are much longer, we are working on this.
  • Build sizes are currently bigger than with Mono, we are working on this, but note that shipping a universal build will always be bigger due to the fact it ships both a 32bit and 64bit executable.
  • This build is intended for iOS IL2CPP testing only, other platforms might not work as well as on general Unity 4.6 patch release builds.
  • There is known issue that uGUI input fields won’t work with touch keyboards. Fix is on the way
  • There is a known issue with codegeneration for marshalling of array of structs for pinvokes. If your project does this, it will fail to compile. This will be fixed in the next build.

Things we haven’t implemented yet;

  • WebRequest API is not yet supported with IL2CPP, we are working on it.
  • iOS simulator builds are not supported with IL2CPP backend, we are working on it.
  • Managed code debugger is in progress, but won’t be available for initial release. For quite some time you would need to rely on Xcode debugger, which is now easier to use than with Mono scripting backend. If you need to debug managed code and rely on Monodevelop, you might consider switching back to mono backend for this task.

Please do note that Prime31 plugins are supposed to work with an updated version from those plugins by Prime31. Other plugins might or might not; we’d love to hear about those you are using that aren’t working correctly.

Download and test!

You can download latest build here:

http://beta.unity3d.com/download/4933178406/download.html

Please test your projects with this build and post feedback bugs for any issues you find. Please post case numbers of bugs specific to this build in this thread so we have a fast path for finding and verifying reports.

Kind Regards,
The iOS & IL2CPP team.

5 Likes

Thank you Jonas, I will give this a test, I guess best test is also to see if I can upload build to Apple and confirm the game working on, will pass Apple submission process without any issues.

I look forward to this:
There is known issue that uGUI input fields won’t work with touch keyboards. Fix is on the way
This is a blocker for myself as using uGUI in the game often have fields where user needs to enter name of save file, character name, just things like this.

So I will wait for this before submitting game to Apple using the beta build

Cheers

One other thing, this build is based on 4.6.1 final? or includes some patch releases with it?

From the original post:

1 Like
  • WebRequest API is not yet supported with IL2CPP, we are working on it.

Any ETA for WWW implementation? Because our game heavily depends on this.
Thank you.

UnityEngine.WWW works fine. System.Net.WebRequest support is pending. (Actually I think it already works if you talk to a webserver that sends data non compressed, but it currently fails if the server decides to send gzipped response)

1 Like

Oh thanks.
I’ll try build our game with this beta and reach you back as soon I have time.

Could it be that DES Cryptography API is not supported?

I’m getting

NullReferenceException: A null value was found where an object instance was required.

somewhere in the code:

var des = DES.Create();
des.Key = new byte[ ] { /* some private info */ };
des.IV = new byte[ ] { /* some private info */ };

when I build for IL2CPP. It works fine with Mono though.

The build time takes more time (but you warn us) //
The precompiling time is REALLY longer in XCODE and created some freeze (sometimes)

== Not really worried about that ==
There is a loooot of unused variable generated ! (format : V_X )

There is a lot of :

Implicit conversion loses integer precision: 'uintptr_t' (aka 'unsigned long') to 'uint32_t' (aka 'unsigned int')" in all bulk file generated. (bulk mscorlib and Assembly-CSharp files generated)

There is “loses integer precision” too in WWWConnection.mm // iPhone-sensors.mm // UnityAppControler+Rendering.mm // DisplayManager.mm // PlatformInvoke.h

There is some “Integer constant is larger than the largest signed integer type” in your generated files too.

== This worried me a little bit more :s ==
I’ve got a lot of these errors (not always the same, i can send you the details for each one if this can help you to solve this or maybe it’s something that we must patch from our side) :

(null): Direct access in mscorlib_mscorlib_System_Collections_Generic_List_1_mscorlib_System_Object_git_m_System_Collections_IList_Add_gshared(mscorlib_mscorlib_System_Collections_Generic_List_1_mscorlib_System_Object_git*, mscorlib_System_Object*) to global weak symbol typeinfo for Il2CppExceptionWrapper means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.

My build is broken actually with the IL2CPP version.

We used some plugins and I try to investigate on them too to see if they can create some problem with unity IL2CPP version.
The plugin seems ok (Facebook / Adjust / HockeyApp / Our own InAppPurchase ObjC script ).

I investigate to find the maximum location issue to give you the most precises feedback.

If you need more information about this build or other just ask.

1 Like

Just to confirm, if System.Net.WebRequest is being used, how would it break? I may be including some plugins that may use it, but I’m unsure (I don’t see it referenced in any source). I am getting 5 linker errors, possible related to gzip stream, since the missing references are:

_Flush
_WriteZStream
_ReadZStream
_CloseZStream
_CreateZStream

This may sound strange, but is it “breaking correctly?” :slight_smile:

fwiw resulting build size is horrendous atm, an app with practically 1 empty scene is ~150 MB on device - there is probably no stripping in free version though

for some reason there’s no sound (locally streamed mp3) ; I’ll see if I could pull myself together and bugreport it

It could be that the DES.Create call fails due to stripping of code. Please file a bug report for us to investigate this.

That indeed sounds like breaking correctly :wink:

Are you building in debug or release? Sizes are definitely smaller with stripping enabled and in release. At this point, they are generally 20-30% larger than mono. We are actively working on improving this.

As for the audio, there is a known issue with “streamed from disk” sounds on ARM64. It will be fixed in a future release.

no idea, just hitting run button in Xcode :wink:
but the local development build ( not to be confused with development build in iOS player setting - that is off ) in Xcode is probably a debug one and Archive / Submission build/s are with Release config - but, frankly, I’m not entirely sure - just 150 MB seemed little bit too much for either one; I’ll keep an eye on this

thanks for confirmation!
Edit: the testing device is not an arm64 one though, will try with next release

Just started testing with our project. We are getting “Parse Issue” with the generated code.

static const int32_t System_System_System_Collections_Generic_SortedList_2_EnumeratorMode_mscorlib_System_ObjectU002CU0020mscorlib_System_Object_git_KEY_MODE_DefaultValueData = ;
static Il2CppFieldDefaultValueEntry System_System_System_Collections_Generic_SortedList_2_EnumeratorMode_mscorlib_System_ObjectU002CU0020mscorlib_System_Object_git_KEY_MODE_DefaultValue =
{
    &System_System_System_Collections_Generic_SortedList_2_EnumeratorMode_mscorlib_System_ObjectU002CU0020mscorlib_System_Object_git_KEY_MODE_FieldInfo/* field */
    , { (char*)&System_System_System_Collections_Generic_SortedList_2_EnumeratorMode_mscorlib_System_ObjectU002CU0020mscorlib_System_Object_git_KEY_MODE_DefaultValueData, IL2CPP_TYPE_I4 }/* value */
};

First line generates something to the effect of “blah = ;” basically no default value?

Other thing that I remark (I know this example is not smart but this generate an error during the build phase) :

#if UNITY_WEBPLAYER
        StartCoroutine( InjectJS() );
#endif

and this

IEnumerator InjectJS()
    {
       //Some code here
#if !UNITY_FLASH
            Application.ExternalEval( www.text.Replace( "\n", string.Empty ).Replace( "\r", string.Empty ) );
           //Some code here
#endif
    }

This generate an error with the Application.ExternalEval cause it’s available only for Webplayer. This must be excluded earlier with the first “#if UNITY_WEBPLAYER” but it seems not :frowning:

And did you have some answer to my previous post issues ?

[quote=“Liszt, post:17, topic: 563177, username:Liszt”]
This generate an error with the Application.ExternalEval cause it’s available only for Webplayer. This must be excluded earlier with the first “#if UNITY_WEBPLAYER” but it seems not :frowning:
[/quote]Which error does it generate? And did this compile successfully under the regular 32-bit pipeline in 4.6.1?

With Unity 4.6.1 in a regular 32bits pipeline it works fine. But when I swich to 64bits IL2CPP pipeline this generate and error during unity building phase.
The error is :
UnityEngine.Application' does not contain a definition for ExternalEval’. The problem is that he didn’t exclude the coroutine with the first “#if”

Can you please copy and paste the exact error message?

My suspicion is that it’s correct to fail to build in this way, but I’m surprised that it worked before. The compiler isn’t able to eliminate code just because you aren’t calling it any more; it’s the build stripper which does that sort of thing, and that’s run later in the process. So, if you’re getting a compiler error, that would make sense, though it still makes me wonder why it worked before.