@quec/rn-device-module 1.9.19 → 2.16.1

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.
Files changed (80) hide show
  1. package/.vscode/settings.json +3 -0
  2. package/QuecRNDeviceModule.podspec +54 -0
  3. package/README.md +1535 -1043
  4. package/android/build.gradle +119 -0
  5. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  6. package/android/gradle/wrapper/gradle-wrapper.properties +5 -0
  7. package/android/gradle.properties +23 -0
  8. package/android/gradlew +185 -0
  9. package/android/gradlew.bat +89 -0
  10. package/android/old-info.properties +2 -0
  11. package/android/proguard-rules.pro +21 -0
  12. package/android/publishInfo.properties +4 -0
  13. package/android/settings.gradle +3 -0
  14. package/android/src/main/AndroidManifest.xml +6 -0
  15. package/android/src/main/java/com/quectel/smart/rnplugin/quecrndevicemodule/IQuecRNDeviceModuleSpec.java +1352 -0
  16. package/android/src/main/java/com/quectel/smart/rnplugin/quecrndevicemodule/QuecRNDeviceModule.java +2423 -0
  17. package/android/src/main/java/com/quectel/smart/rnplugin/quecrndevicemodule/QuecRNDeviceModulePackage.java +23 -0
  18. package/android/src/main/java/com/quectel/smart/rnplugin/quecrndevicemodule/bean/DataInfo.java +25 -0
  19. package/android/src/main/java/com/quectel/smart/rnplugin/quecrndevicemodule/bean/DataRes.java +31 -0
  20. package/android/src/main/java/com/quectel/smart/rnplugin/quecrndevicemodule/bean/DeviceDpsUpdateModel.java +18 -0
  21. package/android/src/main/java/com/quectel/smart/rnplugin/quecrndevicemodule/bean/ModelBridgeBasic.java +86 -0
  22. package/android/src/main/java/com/quectel/smart/rnplugin/quecrndevicemodule/bean/OtaUpgradePlanModel.java +292 -0
  23. package/android/src/main/java/com/quectel/smart/rnplugin/quecrndevicemodule/bean/ShareInfo.java +166 -0
  24. package/android/src/main/java/com/quectel/smart/rnplugin/quecrndevicemodule/bean/UserInfo.java +137 -0
  25. package/android/src/main/java/com/quectel/smart/rnplugin/quecrndevicemodule/bean/WriteCmdWithId.java +10 -0
  26. package/android/src/main/java/com/quectel/smart/rnplugin/quecrndevicemodule/utils/AnalysisChannelDataUtils.java +82 -0
  27. package/android/src/main/java/com/quectel/smart/rnplugin/quecrndevicemodule/utils/DataConvertUtils.kt +130 -0
  28. package/android/src/main/java/com/quectel/smart/rnplugin/quecrndevicemodule/utils/ErrorCode.java +26 -0
  29. package/android/src/main/java/com/quectel/smart/rnplugin/quecrndevicemodule/utils/ErrorUtils.java +11 -0
  30. package/android/src/main/java/com/quectel/smart/rnplugin/quecrndevicemodule/utils/IpcUtil.java +75 -0
  31. package/android/src/main/java/com/quectel/smart/rnplugin/quecrndevicemodule/utils/NetUtils.java +85 -0
  32. package/android/src/main/java/com/quectel/smart/rnplugin/quecrndevicemodule/utils/OnConnectListener.java +22 -0
  33. package/android/src/main/java/com/quectel/smart/rnplugin/quecrndevicemodule/utils/ParamsValueUtils.java +79 -0
  34. package/android/src/main/java/com/quectel/smart/rnplugin/quecrndevicemodule/utils/QuecIotChannelMode.java +8 -0
  35. package/android/src/main/java/com/quectel/smart/rnplugin/quecrndevicemodule/utils/ReactNativeJson.java +199 -0
  36. package/android/src/main/java/com/quectel/smart/rnplugin/quecrndevicemodule/utils/ResponseUtils.java +156 -0
  37. package/android/src/main/res/values/strings.xml +4 -0
  38. package/android/src/main/res/values-en/strings.xml +4 -0
  39. package/android/src/main/res/values-zh/strings.xml +4 -0
  40. package/android/src/test/java/com/quectel/smart/template/ExampleUnitTest.java +17 -0
  41. package/build.gradle +1 -0
  42. package/gradle/wrapper/gradle-wrapper.jar +0 -0
  43. package/gradle/wrapper/gradle-wrapper.properties +6 -0
  44. package/ios/Example/Podfile +17 -0
  45. package/ios/Example/QuecRNDeviceModule/AppDelegate.h +13 -0
  46. package/ios/Example/QuecRNDeviceModule/AppDelegate.m +46 -0
  47. package/ios/Example/QuecRNDeviceModule/Base.lproj/LaunchScreen.storyboard +31 -0
  48. package/ios/Example/QuecRNDeviceModule/Base.lproj/Main.storyboard +31 -0
  49. package/ios/Example/QuecRNDeviceModule/Images.xcassets/AppIcon.appiconset/Contents.json +98 -0
  50. package/ios/Example/QuecRNDeviceModule/QuecRNDeviceModule-Info.plist +40 -0
  51. package/ios/Example/QuecRNDeviceModule/QuecRNDeviceModule-Prefix.pch +16 -0
  52. package/ios/Example/QuecRNDeviceModule/ViewController.h +12 -0
  53. package/ios/Example/QuecRNDeviceModule/ViewController.m +29 -0
  54. package/ios/Example/QuecRNDeviceModule/en.lproj/InfoPlist.strings +2 -0
  55. package/ios/Example/QuecRNDeviceModule/main.m +15 -0
  56. package/ios/Example/QuecRNDeviceModule.xcodeproj/project.pbxproj +583 -0
  57. package/ios/Example/QuecRNDeviceModule.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  58. package/ios/Example/QuecRNDeviceModule.xcodeproj/xcshareddata/xcschemes/QuecRNDeviceModule-Example.xcscheme +101 -0
  59. package/ios/Example/QuecRNDeviceModule.xcworkspace/contents.xcworkspacedata +10 -0
  60. package/ios/Example/QuecRNDeviceModule.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  61. package/ios/LICENSE +4 -0
  62. package/ios/QuecRNDeviceModule/Assets/.gitkeep +0 -0
  63. package/ios/QuecRNDeviceModule/Classes/QuecRNDeviceModule+Ext.h +27 -0
  64. package/ios/QuecRNDeviceModule/Classes/QuecRNDeviceModule+Impl.h +1137 -0
  65. package/ios/QuecRNDeviceModule/Classes/QuecRNDeviceModule+Impl.m +1524 -0
  66. package/ios/QuecRNDeviceModule/Classes/QuecRNDeviceModule.h +157 -0
  67. package/ios/QuecRNDeviceModule/Classes/QuecRNDeviceModule.m +721 -0
  68. package/ios/README.md +20 -0
  69. package/{.prettierrc.js → js/.prettierrc.js} +11 -11
  70. package/js/README.md +1535 -0
  71. package/js/package.json +25 -0
  72. package/{src → js/src}/index.ts +12 -12
  73. package/{src → js/src}/module.ts +1332 -939
  74. package/{src → js/src}/viewCommon.ts +3 -3
  75. package/js/tsconfig.json +26 -0
  76. package/js/yarn.lock +4 -0
  77. package/package.json +10 -25
  78. package/plugin.ts +1180 -0
  79. package/settings.gradle +2 -0
  80. package/tsconfig.json +9 -0
@@ -0,0 +1,101 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Scheme
3
+ LastUpgradeVersion = "0720"
4
+ version = "1.3">
5
+ <BuildAction
6
+ parallelizeBuildables = "YES"
7
+ buildImplicitDependencies = "YES">
8
+ <BuildActionEntries>
9
+ <BuildActionEntry
10
+ buildForTesting = "YES"
11
+ buildForRunning = "YES"
12
+ buildForProfiling = "YES"
13
+ buildForArchiving = "YES"
14
+ buildForAnalyzing = "YES">
15
+ <BuildableReference
16
+ BuildableIdentifier = "primary"
17
+ BlueprintIdentifier = "6003F589195388D20070C39A"
18
+ BuildableName = "QuecRNDeviceModule_Example.app"
19
+ BlueprintName = "QuecRNDeviceModule_Example"
20
+ ReferencedContainer = "container:QuecRNDeviceModule.xcodeproj">
21
+ </BuildableReference>
22
+ </BuildActionEntry>
23
+ </BuildActionEntries>
24
+ </BuildAction>
25
+ <TestAction
26
+ buildConfiguration = "Debug"
27
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
+ shouldUseLaunchSchemeArgsEnv = "YES">
30
+ <Testables>
31
+ <TestableReference
32
+ skipped = "NO">
33
+ <BuildableReference
34
+ BuildableIdentifier = "primary"
35
+ BlueprintIdentifier = "6003F5AD195388D20070C39A"
36
+ BuildableName = "QuecRNDeviceModule_Tests.xctest"
37
+ BlueprintName = "QuecRNDeviceModule_Tests"
38
+ ReferencedContainer = "container:QuecRNDeviceModule.xcodeproj">
39
+ </BuildableReference>
40
+ </TestableReference>
41
+ </Testables>
42
+ <MacroExpansion>
43
+ <BuildableReference
44
+ BuildableIdentifier = "primary"
45
+ BlueprintIdentifier = "6003F589195388D20070C39A"
46
+ BuildableName = "QuecRNDeviceModule_Example.app"
47
+ BlueprintName = "QuecRNDeviceModule_Example"
48
+ ReferencedContainer = "container:QuecRNDeviceModule.xcodeproj">
49
+ </BuildableReference>
50
+ </MacroExpansion>
51
+ <AdditionalOptions>
52
+ </AdditionalOptions>
53
+ </TestAction>
54
+ <LaunchAction
55
+ buildConfiguration = "Debug"
56
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
57
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
58
+ launchStyle = "0"
59
+ useCustomWorkingDirectory = "NO"
60
+ ignoresPersistentStateOnLaunch = "NO"
61
+ debugDocumentVersioning = "YES"
62
+ debugServiceExtension = "internal"
63
+ allowLocationSimulation = "YES">
64
+ <BuildableProductRunnable
65
+ runnableDebuggingMode = "0">
66
+ <BuildableReference
67
+ BuildableIdentifier = "primary"
68
+ BlueprintIdentifier = "6003F589195388D20070C39A"
69
+ BuildableName = "QuecRNDeviceModule_Example.app"
70
+ BlueprintName = "QuecRNDeviceModule_Example"
71
+ ReferencedContainer = "container:QuecRNDeviceModule.xcodeproj">
72
+ </BuildableReference>
73
+ </BuildableProductRunnable>
74
+ <AdditionalOptions>
75
+ </AdditionalOptions>
76
+ </LaunchAction>
77
+ <ProfileAction
78
+ buildConfiguration = "Release"
79
+ shouldUseLaunchSchemeArgsEnv = "YES"
80
+ savedToolIdentifier = ""
81
+ useCustomWorkingDirectory = "NO"
82
+ debugDocumentVersioning = "YES">
83
+ <BuildableProductRunnable
84
+ runnableDebuggingMode = "0">
85
+ <BuildableReference
86
+ BuildableIdentifier = "primary"
87
+ BlueprintIdentifier = "6003F589195388D20070C39A"
88
+ BuildableName = "QuecRNDeviceModule_Example.app"
89
+ BlueprintName = "QuecRNDeviceModule_Example"
90
+ ReferencedContainer = "container:QuecRNDeviceModule.xcodeproj">
91
+ </BuildableReference>
92
+ </BuildableProductRunnable>
93
+ </ProfileAction>
94
+ <AnalyzeAction
95
+ buildConfiguration = "Debug">
96
+ </AnalyzeAction>
97
+ <ArchiveAction
98
+ buildConfiguration = "Release"
99
+ revealArchiveInOrganizer = "YES">
100
+ </ArchiveAction>
101
+ </Scheme>
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Workspace
3
+ version = "1.0">
4
+ <FileRef
5
+ location = "group:QuecRNDeviceModule.xcodeproj">
6
+ </FileRef>
7
+ <FileRef
8
+ location = "group:Pods/Pods.xcodeproj">
9
+ </FileRef>
10
+ </Workspace>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>IDEDidComputeMac32BitWarning</key>
6
+ <true/>
7
+ </dict>
8
+ </plist>
package/ios/LICENSE ADDED
@@ -0,0 +1,4 @@
1
+ Copyright (C) 2022 Quectel
2
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
4
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
File without changes
@@ -0,0 +1,27 @@
1
+ //
2
+ // QuecRNDeviceModule+Ext.h
3
+ //
4
+ // Auto-Created on 2022/09/07.
5
+ // Copyright © 2022年 quectel. All rights reserved.
6
+ //
7
+
8
+ #import <Foundation/Foundation.h>
9
+ #import <QuecDeviceKit/QuecDeviceKit.h>
10
+
11
+ /// 重要:QuecRNDeviceModule.h / QuecRNDeviceModule.m / QuecRNDeviceModule+Impl.h 三个文件中的修改在插件构建时会被重置
12
+ /// 请在此文件的匿名分类(扩展)中声明所需的property
13
+ @class QuecDeviceModel, QuecDeviceClient;
14
+ @interface QuecRNDeviceModule () <QuecDeviceClientDelegate>
15
+
16
+ @property (nonatomic, assign, getter=isUnbindingDevice) BOOL unbindingDevice;
17
+ @property (nonatomic, strong) QuecDeviceModel *deviceModel;
18
+ @property (nonatomic, strong) QuecDeviceClient *device;
19
+ @property (nonatomic, assign) BOOL hasUnsubscribed;
20
+ @property (nonatomic, assign) BOOL hasListeners;
21
+ @property (nonatomic, copy) RCTPromiseResolveBlock mConnectResolve;
22
+ @property (nonatomic, copy) RCTPromiseRejectBlock mConnectReject;
23
+ @property (nonatomic, assign) NSInteger mode;
24
+ /// 支持面板订阅多个设备 (当前版本暂时不支持 2.8.5 )
25
+ @property (nonatomic, strong) QuecThreadSafeMutableDictionary *subDeviecDict;
26
+
27
+ @end