question

cdtaylor3 avatar image
cdtaylor3 asked

Weird iOS Stripping issue with Unity 2020: Null Reference ,Weird iOS Stripping Bug: Unity 2020. Null Reference

I am using Unity 2020 and the PlayFab SDK 2.104.

Android builds are fine, but when I build the iOS version of my app, and I try to call LoginWithFaceBook I receive;

ploading Crash Report

NullReferenceException: Object reference not set to an instance of an object.

-> applicationWillResignActive()

-> applicationDidEnterBackground()

-> applicationWillTerminate()

Setting up 1 worker threads for Enlighten.

Thread -> id: 16c5f3000 -> priority: 1

I have my IL2CPP "Managed Stripping Level" set to "Low" and have ensured that the Assemblies are preserved via the link.xml file, but I'm unable to get passed this for iOS.

Is this a potential bug or is there something else I can try?

,

I am using Unity 2020 and the PlayFab SDK 2.104.

Android builds are fine, but when I build the iOS version of my app, and I try to call LoginWithFaceBook I receive;

ploading Crash Report

NullReferenceException: Object reference not set to an instance of an object.

-> applicationWillResignActive()

-> applicationDidEnterBackground()

-> applicationWillTerminate()

Setting up 1 worker threads for Enlighten.

Thread -> id: 16c5f3000 -> priority: 1


I have my IL2CPP "Managed Stripping Level" set to "Low" and have ensured that the Assemblies are preserved via the link.xml file, but I'm unable to get passed this for iOS.

Is this a potential bug or is there something else I can try?

apisunity3dsdks
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
cdtaylor3 avatar image
cdtaylor3 answered

I resolved the issue myself;

Edit: Shared/Internal/SimpleJson.cs

Before the 'namespace' directive include this line:

[assembly: UnityEngine.Scripting.Preserve]

And the issue was resolved.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.