Skip to content

Commit

Permalink
fix: crash when IL2CCP option is enabled (#28)
Browse files Browse the repository at this point in the history
* fix: crash when IL2CCP option is enabled
  • Loading branch information
willpassidomo authored Jun 30, 2022
1 parent fb408b1 commit d6772b6
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 5 deletions.
Binary file modified Assets/Plugins/iOS/mParticleUnity.m
Binary file not shown.
2 changes: 2 additions & 0 deletions Assets/mParticle/MParticleAndroid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

namespace mParticleAndroid
{
#if UNITY_ANDROID || UNITY_EDITOR
public sealed class MParticleAndroid : IMParticleSDK
{
private AndroidJavaObject mp;
Expand Down Expand Up @@ -454,4 +455,5 @@ public IMParticleTask<IdentityApiResult> AddFailureListener(OnFailure listener)
}

}
#endif
}
3 changes: 2 additions & 1 deletion Assets/mParticle/MParticleiOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

namespace mParticleiOs
{
#if UNITY_IOS || UNITY_EDITOR
public class MParticleiOS : IMParticleSDK
{
/*
Expand Down Expand Up @@ -637,6 +638,6 @@ internal void setFailed(IdentityHttpResponse onFailure)
listener.Invoke(_failure);
}
}

}
#endif
}
2 changes: 2 additions & 0 deletions Assets/mParticle/android/ToAndroidUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

namespace mParticle.android
{
#if UNITY_ANDROID || UNITY_EDITOR
internal class ToAndroidUtils
{
internal AndroidJavaClass identityTypeClass;
Expand Down Expand Up @@ -257,4 +258,5 @@ internal AndroidJavaObject ConvertToMpOptions(MParticleOptions options, object c
return nativeMpOptions.Call<AndroidJavaObject>("build");
}
}
#endif
}
2 changes: 2 additions & 0 deletions Assets/mParticle/android/ToCSUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace mParticle.android
{
#if UNITY_ANDROID || UNITY_EDITOR
internal class ToCSUtils
{
public ToCSUtils()
Expand All @@ -19,4 +20,5 @@ internal static mParticle.Environment ConvertToCSharpEnvironment(AndroidJavaObje
return (mParticle.Environment)Enum.Parse(typeof(Environment), value.Call<string>("name"));
}
}
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace mParticle.android
{
#if UNITY_ANDROID || UNITY_EDITOR
internal class AndroidOnFailureListener : AndroidJavaProxy
{
OnFailure listener;
Expand Down Expand Up @@ -45,4 +46,5 @@ void onFailure(AndroidJavaObject response)
}

}
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace mParticle.android
{
#if UNITY_ANDROID || UNITY_EDITOR
public class AndroidOnSuccessListener : AndroidJavaProxy
{
OnSuccess listener;
Expand All @@ -30,6 +31,6 @@ void onSuccess(AndroidJavaObject result)
});
}
}

}
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace mParticle.android
{
#if UNITY_ANDROID || UNITY_EDITOR
class AndroidOnUserIdentified : AndroidJavaProxy
{
OnUserIdentified onUserIdentifiedHandler;
Expand All @@ -20,4 +21,5 @@ void onUserIdentified(AndroidJavaObject user)
onUserIdentifiedHandler.Invoke(new MParticleUserImpl(user));
}
}
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace mParticle.android
{
#if UNITY_ANDROID || UNITY_EDITOR
class AndroidUserAliasHandler : AndroidJavaProxy
{
OnUserAlias userAliasHandler;
Expand All @@ -20,7 +21,5 @@ public void onUserAlias(AndroidJavaObject previousUser, AndroidJavaObject newUse
userAliasHandler.Invoke(new MParticleUserImpl(previousUser), new MParticleUserImpl(newUser));
}
}



#endif
}
2 changes: 2 additions & 0 deletions Assets/mParticle/ios/ToCSUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace mParticle.ios
{
#if UNITY_IOS || UNITY_EDITOR
public class ToCSUtils
{
public ToCSUtils()
Expand Down Expand Up @@ -172,6 +173,7 @@ private static string[] popDictionaryStringFromString(string valueRaw)
return new string[]{ valueRaw, "" };
}
}
#endif
}

// Sample = "AssertAttribute1":"value101","AssertAttribute3":"value303","AssertAttribute2":"value202"
2 changes: 2 additions & 0 deletions Assets/mParticle/ios/ToiOSUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace mParticle.ios
{
#if UNITY_IOS || UNITY_EDITOR
internal class ToiOSUtils
{
public ToiOSUtils()
Expand Down Expand Up @@ -68,5 +69,6 @@ internal bool ParseBoolean(string result, bool fallback)
}
}
}
#endif
}

0 comments on commit d6772b6

Please sign in to comment.