Skip to content

Commit c2b97d6

Browse files
committed
🐛 Add [Preserve] attribute to fix code stripping & Simplify Android manifest
1 parent a064c45 commit c2b97d6

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
using System;
2+
using UnityEngine.Scripting;
23

4+
[Preserve]
5+
[Serializable]
36
public class LoginParams
47
{
8+
[Preserve]
59
public Provider loginProvider { get; set; }
10+
[Preserve]
611
public string dappShare { get; set; }
12+
[Preserve]
713
public ExtraLoginOptions extraLoginOptions { get; set; }
14+
[Preserve]
815
public Uri redirectUrl { get; set; }
16+
[Preserve]
917
public string appState { get; set; }
18+
[Preserve]
1019
public MFALevel mfaLevel { get; set; }
11-
20+
[Preserve]
1221
public Curve curve { get; set; } = Curve.SECP256K1;
22+
[Preserve]
1323
public string dappUrl { get; set; }
1424
}

Samples~/Solana Wallet/Plugins/Android/AndroidManifest.xml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<activity android:name="com.unity3d.player.UnityPlayerActivity"
55
android:exported="true"
66
android:theme="@style/UnityThemeSelector">
7-
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
7+
<meta-data android:name="unityplayer.UnityActivity" android:value="true"/>
88
<intent-filter>
99
<action android:name="android.intent.action.MAIN"/>
1010
<category android:name="android.intent.category.LAUNCHER"/>
@@ -27,23 +27,19 @@
2727
<category android:name="android.intent.category.BROWSABLE"/>
2828
<data android:scheme="unitydl" android:host="disconnect"/>
2929
</intent-filter>
30-
<intent-filter>
30+
<intent-filter>
3131
<action android:name="android.intent.action.VIEW"/>
3232
<category android:name="android.intent.category.DEFAULT"/>
3333
<category android:name="android.intent.category.BROWSABLE"/>
3434
<data android:scheme="unitydl" android:host="disconnect"/>
35-
</intent-filter>
36-
<intent-filter>
37-
<action android:name="android.intent.action.VIEW" />
38-
<category android:name="android.intent.category.DEFAULT" />
39-
<category android:name="android.intent.category.BROWSABLE" />
40-
<data android:scheme="torusapp" android:host="com.torus.Web3AuthUnity/auth" />
4135
</intent-filter>
4236
<intent-filter>
43-
<action android:name="android.intent.action.VIEW" />
44-
<category android:name="android.intent.category.DEFAULT" />
45-
<category android:name="android.intent.category.BROWSABLE" />
46-
<data android:scheme="torusapp" android:host="com.torus.Web3AuthUnity" />
37+
<action android:name="android.intent.action.VIEW"/>
38+
<category android:name="android.intent.category.DEFAULT"/>
39+
<category android:name="android.intent.category.BROWSABLE"/>
40+
<data android:scheme="torusapp" android:host="com.torus.Web3AuthUnity"
41+
android:pathPrefix="/auth"
42+
android:pathPattern="/*"/>
4743
</intent-filter>
4844
</activity>
4945
</application>

0 commit comments

Comments
 (0)