wxr
2023-06-06 592974441a4df95fffd9167c90192da1a390b1c2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
using Foundation;
namespace SiriKit
{
    public static class NSUserDefaultsHelper
    {
        private const string AppGroup = "group.com.hdl.onpro";
 
 
 
        public static class StorageKeys
        {
 
            public const string APP_KEY = "HDL-HOME-APP-TEST";
            public const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
 
 
            public const string GLOBAL_GIsLogin = "IsLogin";
 
            public const string GLOBAL_GAccessToken = "AccessToken";
 
            public const string GLOBAL_GRefreshToken = "RefreshToken";
 
            public const string GLOBAL_GRegionUrl = "RegionUrl";
 
            public const string GLOBAL_GHomeId = "HomeId";
        }
 
        public static NSUserDefaults DataSuite {
            get {
                var dataSuite = new NSUserDefaults(AppGroup, NSUserDefaultsType.SuiteName);
                if( dataSuite is null )
                {
                    throw new Exception($"Could not load UserDefaults for app group {AppGroup}");
                }
                return dataSuite;
            }
        }
    }
}