Skip to content

Commit

Permalink
🐛 Add [Preserve] attribute to fix code stripping & Simplify Android m…
Browse files Browse the repository at this point in the history
…anifest
  • Loading branch information
GabrielePicco committed Jun 28, 2024
1 parent a064c45 commit c2b97d6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
12 changes: 11 additions & 1 deletion Runtime/Plugins/Web3AuthSDK/Types/LoginParams.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
using System;
using UnityEngine.Scripting;

[Preserve]
[Serializable]
public class LoginParams
{
[Preserve]
public Provider loginProvider { get; set; }
[Preserve]
public string dappShare { get; set; }
[Preserve]
public ExtraLoginOptions extraLoginOptions { get; set; }
[Preserve]
public Uri redirectUrl { get; set; }
[Preserve]
public string appState { get; set; }
[Preserve]
public MFALevel mfaLevel { get; set; }

[Preserve]
public Curve curve { get; set; } = Curve.SECP256K1;
[Preserve]
public string dappUrl { get; set; }
}
20 changes: 8 additions & 12 deletions Samples~/Solana Wallet/Plugins/Android/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<activity android:name="com.unity3d.player.UnityPlayerActivity"
android:exported="true"
android:theme="@style/UnityThemeSelector">
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
<meta-data android:name="unityplayer.UnityActivity" android:value="true"/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand All @@ -27,23 +27,19 @@
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="unitydl" android:host="disconnect"/>
</intent-filter>
<intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="unitydl" android:host="disconnect"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="torusapp" android:host="com.torus.Web3AuthUnity/auth" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="torusapp" android:host="com.torus.Web3AuthUnity" />
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="torusapp" android:host="com.torus.Web3AuthUnity"
android:pathPrefix="/auth"
android:pathPattern="/*"/>
</intent-filter>
</activity>
</application>
Expand Down

0 comments on commit c2b97d6

Please sign in to comment.