@aks-dev/easyui 1.2.3 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,30 @@
1
+
2
+ require "json"
3
+
4
+ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
5
+
6
+ Pod::Spec.new do |s|
7
+ s.name = "RNPermissions"
8
+ s.version = package["version"]
9
+ s.license = package["license"]
10
+ s.summary = package["description"]
11
+ s.author = package["author"]
12
+ s.homepage = package["homepage"]
13
+
14
+ s.platform = { :ios => "12.4" }
15
+ s.source = { :git => "https://gitee.com/the_period_of_the_ten_kingdoms/aks-easyui.git", :tag => "master" }
16
+ s.source_files = "**/*.{h,m,mm,swift,xib,c}"
17
+ s.requires_arc = true
18
+ s.resource_bundles = { 'RNEasyui' => ['assets/*'] }
19
+
20
+
21
+ # s.dependency "React"
22
+ #s.dependency "others"
23
+ if ENV['RCT_NEW_ARCH_ENABLED'] == "1" then
24
+ install_modules_dependencies(s)
25
+ else
26
+ s.dependency "React-Core"
27
+ end
28
+ end
29
+
30
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aks-dev/easyui",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "工具箱",
5
5
  "exports": {
6
6
  ".": {
@@ -37,7 +37,8 @@
37
37
  "!/i.sh",
38
38
  "!/src/**/assets/*",
39
39
  "!/docs",
40
- "/src/specs"
40
+ "/src/specs",
41
+ "RNEasyui.podspec"
41
42
  ],
42
43
  "homepage": "https://gitee.com/the_period_of_the_ten_kingdoms",
43
44
  "repository": {
@@ -82,6 +83,11 @@
82
83
  "jsSrcsDir": "./src/specs",
83
84
  "android": {
84
85
  "javaPackageName": "com.easyui"
86
+ },
87
+ "ios": {
88
+ "modulesProvider": {
89
+ "RNEasyui": "RNEasyui"
90
+ }
85
91
  }
86
92
  }
87
93
  }
package/ios/RNEasyui.h DELETED
@@ -1,18 +0,0 @@
1
- /*
2
- * @Author: shiguo
3
- * @Date: 2022-04-25 17:57:29
4
- * @LastEditors: shiguo
5
- * @LastEditTime: 2022-04-27 09:21:02
6
- * @FilePath: /easy/ios/RNEasyui.h
7
- */
8
-
9
- #if __has_include("RCTBridgeModule.h")
10
- #import "RCTBridgeModule.h"
11
- #else
12
- #import <React/RCTBridgeModule.h>
13
- #endif
14
-
15
- @interface RNEasyui : NSObject <RCTBridgeModule>
16
-
17
- @end
18
-
package/ios/RNEasyui.m DELETED
@@ -1,20 +0,0 @@
1
-
2
- #import "RNEasyui.h"
3
- #import "RomUtil.h"
4
-
5
- @implementation RNEasyui
6
-
7
- - (dispatch_queue_t)methodQueue
8
- {
9
- return dispatch_get_main_queue();
10
- }
11
- RCT_EXPORT_MODULE()
12
-
13
- RCT_EXPORT_METHOD(getDeviceBrand:(RCTPromiseResolveBlock)resolve
14
- reject:(RCTPromiseRejectBlock)reject){
15
- resolve([RomUtil getCurrentDeviceModel]);
16
- }
17
-
18
-
19
- @end
20
-
@@ -1,25 +0,0 @@
1
-
2
- Pod::Spec.new do |s|
3
- s.name = "RNEasyui"
4
- s.version = "1.0.6"
5
- s.summary = "RNEasyui"
6
- s.description = <<-DESC
7
- RNEasyui
8
- DESC
9
- s.homepage = "https://gitee.com/the_period_of_the_ten_kingdoms/aks-easy"
10
- s.license = "MIT"
11
- # s.license = { :type => "MIT", :file => "FILE_LICENSE" }
12
- s.author = { "author" => "author@domain.cn" }
13
- s.platform = :ios, "11.0"
14
- s.source = { :git => "https://gitee.com/the_period_of_the_ten_kingdoms/aks-easyui.git", :tag => "master" }
15
- s.source_files = "**/*.{h,m,swift,xib,c}"
16
- s.requires_arc = true
17
- s.resource_bundles = { 'RNEasyui' => ['assets/*'] }
18
-
19
-
20
- s.dependency "React"
21
- #s.dependency "others"
22
-
23
- end
24
-
25
-
@@ -1,12 +0,0 @@
1
-
2
- #if __has_include("RCTBridgeModule.h")
3
- #import "RCTBridgeModule.h"
4
- #else
5
- #import <React/RCTBridgeModule.h>
6
- #endif
7
-
8
-
9
- @interface UpgradeModule : NSObject<RCTBridgeModule>
10
-
11
- @end
12
-
@@ -1,132 +0,0 @@
1
- //
2
- // UpgradeModule.m
3
- // AksFireApp
4
- //
5
- // Created by mac on 2022/5/5.
6
- //
7
-
8
- #import "UpgradeModule.h"
9
- #import <UIKit/UIKit.h>
10
- #import "UpgradeView.h"
11
- #import "LEEAlert.h"
12
- @interface UpgradeModule ()
13
-
14
-
15
-
16
- @end
17
-
18
-
19
-
20
- @implementation UpgradeModule
21
-
22
- - (dispatch_queue_t)methodQueue
23
- {
24
- return dispatch_get_main_queue();
25
- }
26
-
27
-
28
-
29
-
30
- RCT_EXPORT_MODULE();
31
-
32
-
33
- RCT_EXPORT_METHOD(getAppVersion:(RCTPromiseResolveBlock)resolve
34
- reject:(RCTPromiseRejectBlock)reject){
35
- NSDictionary *infoDict = [[NSBundle mainBundle] infoDictionary];
36
- NSString *currentVersion = [infoDict objectForKey:@"CFBundleShortVersionString"];
37
- resolve(currentVersion);
38
- }
39
-
40
-
41
-
42
- RCT_EXPORT_METHOD(getOSVersion:(RCTPromiseResolveBlock)resolve
43
- reject:(RCTPromiseRejectBlock)reject){
44
- UIDevice *device = [UIDevice currentDevice];
45
- NSString *systemVersion = [NSString stringWithFormat:@"%@ %@",device.systemName,device.systemVersion];
46
- resolve(systemVersion);
47
- }
48
-
49
-
50
-
51
-
52
- RCT_EXPORT_METHOD(upgrade:(NSDictionary *)info
53
- resolve:(RCTPromiseResolveBlock)resolve
54
- reject:(RCTPromiseRejectBlock)reject){//checkCode, desc
55
-
56
- NSString * version = info[@"version"];
57
- NSString * title = info[@"title"];
58
- NSString * downloadUrl = info[@"downloadUrl"];
59
- NSString * note = info[@"note"];
60
- BOOL force = info[@"force"];
61
-
62
- NSString *currentVersion = [self getLocalVersion];
63
- NSComparisonResult result =[self buildVersion:currentVersion compareWithAppstoreVersion:version];
64
- if( result== NSOrderedAscending){
65
- dispatch_async(dispatch_get_main_queue(), ^{
66
- CGFloat SCREEN_WIDTH = [UIScreen mainScreen].bounds.size.width;
67
- UpgradeView *view = [[UpgradeView alloc] initWithTitle:title note:note force:force];
68
- view.closeBlock = ^{
69
- [LEEAlert closeWithCompletionBlock:nil];
70
- };
71
- view.settingBlock = ^{
72
- [[UIApplication sharedApplication] openURL:[NSURL URLWithString: [downloadUrl stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]] options:@{} completionHandler:nil];
73
- };
74
-
75
- [LEEAlert alert].config
76
- .LeeMaxWidth(SCREEN_WIDTH-40)
77
- .LeeCustomView(view)
78
- .LeeHeaderInsets(UIEdgeInsetsMake(0, 0, 0, 0))
79
- .LeeItemInsets(UIEdgeInsetsMake(0, 0, 0, 0))
80
- #ifdef __IPHONE_13_0
81
- .LeeUserInterfaceStyle(UIUserInterfaceStyleLight)
82
- #endif
83
- .LeeShow();
84
-
85
- });
86
- }
87
- else if(result == NSOrderedDescending){
88
- reject(@"error_app_upgrade",@"商城版本低于本地版本",NULL);
89
- }else if(result == NSOrderedSame){
90
- reject(@"error_app_upgrade",@"已是最新版本",NULL);
91
- }else{
92
- resolve(@"发现新版本");
93
- }
94
-
95
-
96
- }
97
-
98
- - (NSString*) getLocalVersion {
99
- return [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
100
- }
101
-
102
- /**
103
- 版本比较
104
- */
105
- -(NSComparisonResult)buildVersion:(NSString*)buildVersion compareWithAppstoreVersion:(NSString*)appStoreVersion{
106
- NSArray* buildVersionNums = [buildVersion componentsSeparatedByString:@"."];
107
- NSArray* appStoreVersionNums = [appStoreVersion componentsSeparatedByString:@"."];
108
- for (NSInteger i=0; i<buildVersionNums.count; i++) {
109
- NSInteger buildNum = [buildVersionNums[i] integerValue];
110
- if(i<appStoreVersionNums.count){
111
- NSInteger appStoreNum = [appStoreVersionNums[i] integerValue];
112
- if(buildNum < appStoreNum){
113
- return NSOrderedAscending;
114
- }else if(buildNum>appStoreNum){
115
- return NSOrderedDescending;
116
- }
117
- }
118
- }
119
-
120
- if(buildVersionNums.count > appStoreVersionNums.count){
121
- return NSOrderedDescending;
122
- }else if(buildVersionNums.count < appStoreVersionNums.count){
123
- return NSOrderedAscending;
124
- }
125
- return NSOrderedSame;
126
- }
127
-
128
-
129
- + (BOOL)requiresMainQueueSetup {
130
- return YES;
131
- }
132
- @end