wxr
2024-04-16 1b6d5116f9f3e291da636b9ec510d65a4fedf639
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.santian.hdlon";
 
 
 
        public static class StorageKeys
        {
 
            public const string APP_KEY = "QWERREWQ";
            public const string SECRET_KEY = "CPBUCTRLCPBUABCD";
 
 
            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;
            }
        }
    }
}