File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
com.onesignal.unity.android/Runtime
com.onesignal.unity.core/Runtime
com.onesignal.unity.ios/Runtime Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ namespace OneSignalSDK {
3434 /// </summary>
3535 internal static class OneSignalAndroidInit {
3636 [ RuntimeInitializeOnLoadMethod ] public static void Init ( ) {
37- if ( string . IsNullOrEmpty ( OneSignal . AppId ) )
37+ if ( ! OneSignal . DidInitialize )
3838 OneSignal . Default = new OneSignalAndroid ( ) ;
3939 }
4040 }
Original file line number Diff line number Diff line change 3232namespace OneSignalSDK {
3333 public abstract partial class OneSignal {
3434 internal static string AppId { get ; private set ; }
35+ internal static bool DidInitialize { get ; private set ; }
3536 internal static event Action < string > OnInitialize ;
3637
3738 protected static void _completedInit ( string appId ) {
38- AppId = appId ;
39+ AppId = appId ;
40+ DidInitialize = true ;
3941 OnInitialize ? . Invoke ( AppId ) ;
4042 }
4143
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ namespace OneSignalSDK {
3434 /// </summary>
3535 internal static class OneSignalIOSInit {
3636 [ RuntimeInitializeOnLoadMethod ] public static void Init ( ) {
37- if ( string . IsNullOrEmpty ( OneSignal . AppId ) )
37+ if ( ! OneSignal . DidInitialize )
3838 OneSignal . Default = new OneSignalIOS ( ) ;
3939 }
4040 }
You can’t perform that action at this time.
0 commit comments