@react-native-ohos/react-native-system-setting 1.7.7-rc.3 → 1.8.0-rc.2

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 (46) hide show
  1. package/README.OpenSource +1 -1
  2. package/harmony/react_native_system_setting/BuildProfile.ets +17 -0
  3. package/harmony/react_native_system_setting/Index.ets +1 -2
  4. package/harmony/react_native_system_setting/oh-package.json5 +1 -1
  5. package/harmony/react_native_system_setting/src/main/cpp/CMakeLists.txt +3 -5
  6. package/harmony/react_native_system_setting/src/main/cpp/{generated/RNOH/generated/BaseReactNativeSystemSettingPackage.h → RNSystemSettingPackage.h} +21 -10
  7. package/harmony/react_native_system_setting/src/main/cpp/{generated/RNOH/generated/turbo_modules/ReactNativeSystemSetting.cpp → ReactNativeSystemSetting.cpp} +8 -1
  8. package/harmony/react_native_system_setting/src/main/cpp/{generated/RNOH/generated/turbo_modules/ReactNativeSystemSetting.h → ReactNativeSystemSetting.h} +6 -1
  9. package/harmony/react_native_system_setting/src/main/ets/{RNSystemSettingPackage.ets → RNSystemSettingPackage.ts} +1 -2
  10. package/harmony/react_native_system_setting/src/main/ets/RNSystemSettingTurboModule.ts +27 -5
  11. package/harmony/react_native_system_setting/src/main/ets/generated/index.ets +4 -1
  12. package/harmony/react_native_system_setting/src/main/ets/generated/ts.ts +4 -1
  13. package/harmony/react_native_system_setting/src/main/ets/generated/turboModules/ReactNativeSystemSetting.ts +12 -4
  14. package/harmony/react_native_system_setting/src/main/ets/generated/turboModules/ts.ts +4 -1
  15. package/harmony/react_native_system_setting.har +0 -0
  16. package/package.json +13 -15
  17. package/src/ReactRNSystemSetting.ts +4 -0
  18. package/CHANGELOG.md +0 -206
  19. package/COMMITTERS.md +0 -7
  20. package/LICENSE +0 -21
  21. package/OAT.xml +0 -81
  22. package/harmony/react_native_system_setting/src/main/cpp/SystemSettingPackage.h +0 -36
  23. package/harmony/react_native_system_setting/src/main/cpp/generated/react/renderer/components/react_native_system_setting/ComponentDescriptors.h +0 -22
  24. package/harmony/react_native_system_setting/src/main/cpp/generated/react/renderer/components/react_native_system_setting/EventEmitters.cpp +0 -18
  25. package/harmony/react_native_system_setting/src/main/cpp/generated/react/renderer/components/react_native_system_setting/EventEmitters.h +0 -19
  26. package/harmony/react_native_system_setting/src/main/cpp/generated/react/renderer/components/react_native_system_setting/Props.cpp +0 -21
  27. package/harmony/react_native_system_setting/src/main/cpp/generated/react/renderer/components/react_native_system_setting/Props.h +0 -20
  28. package/harmony/react_native_system_setting/src/main/cpp/generated/react/renderer/components/react_native_system_setting/ShadowNodes.cpp +0 -19
  29. package/harmony/react_native_system_setting/src/main/cpp/generated/react/renderer/components/react_native_system_setting/ShadowNodes.h +0 -25
  30. package/harmony/react_native_system_setting/src/main/cpp/generated/react/renderer/components/react_native_system_setting/States.cpp +0 -18
  31. package/harmony/react_native_system_setting/src/main/cpp/generated/react/renderer/components/react_native_system_setting/States.h +0 -23
  32. package/harmony/react_native_system_setting/src/mock/mock-config.json5 +0 -2
  33. package/harmony/react_native_system_setting/src/ohosTest/ets/test/Ability.test.ets +0 -35
  34. package/harmony/react_native_system_setting/src/ohosTest/ets/test/List.test.ets +0 -5
  35. package/harmony/react_native_system_setting/src/ohosTest/ets/testability/TestAbility.ets +0 -47
  36. package/harmony/react_native_system_setting/src/ohosTest/ets/testability/pages/Index.ets +0 -17
  37. package/harmony/react_native_system_setting/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ets +0 -90
  38. package/harmony/react_native_system_setting/src/ohosTest/module.json5 +0 -36
  39. package/harmony/react_native_system_setting/src/ohosTest/resources/base/element/color.json +0 -8
  40. package/harmony/react_native_system_setting/src/ohosTest/resources/base/element/string.json +0 -16
  41. package/harmony/react_native_system_setting/src/ohosTest/resources/base/media/icon.png +0 -0
  42. package/harmony/react_native_system_setting/src/ohosTest/resources/base/profile/test_pages.json +0 -5
  43. package/harmony/react_native_system_setting/src/test/List.test.ets +0 -5
  44. package/harmony/react_native_system_setting/src/test/LocalUnit.test.ets +0 -33
  45. package/iOS.md +0 -101
  46. /package/harmony/react_native_system_setting/{ts.ets → ts.ts} +0 -0
package/iOS.md DELETED
@@ -1,101 +0,0 @@
1
- # iOS
2
-
3
- Some functions are diabled by default:
4
-
5
- * `switchWifi()`
6
- * `switchBluetooth()`
7
- * `switchLocation()`
8
- * `switchAirplane()`
9
- * `isBluetoothEnabled()`
10
- * `addBluetoothListener()`
11
-
12
- When you call these functions, you'll just get some warning log.
13
-
14
- You can enable it by add a preprocessor macros.
15
-
16
- ## Private API
17
-
18
- There are some functions which start with `switch`:
19
-
20
- * `switchWifi()`
21
- * `switchBluetooth()`
22
- * `switchLocation()`
23
- * `switchAirplane()`
24
-
25
- I implement them by using non-public APIs, which is not permitted on the App Store, see [this issue](https://github.com/c19354837/react-native-system-setting/issues/28).
26
-
27
- **These functions are disabled by default. You must not call them If your app need submit to App Store. As an alternative, you can show a tip to tell the user how to change the system setting.**
28
-
29
- Only when you'll distribute the app outside App Store, you can enable them by add a preprocessor macros `PRIVATE_API`.
30
-
31
- **WARNING: If you enable it and submit app to App Store, you'll definitely get a rejection from apple. In the worst case, your account will be ban!**
32
-
33
- ![add preprocessor macros `PRIVATE_API `](./screenshot/ios_private_api.png)
34
-
35
- > You should add `PRIVATE_API` in both `Debug` and `Release`
36
-
37
- ## Bluetooth
38
-
39
- There are some bluetooth-function:
40
-
41
- * `isBluetoothEnabled()`
42
- * `addBluetoothListener()`
43
-
44
- You can enable them in a few steps:
45
-
46
- First, add preprocessor macros `BLUETOOTH`, either
47
- 1) Manually, or
48
- 2) Using `post_install` hook in Podfile (for React-Native >=0.60 with autolinking)
49
-
50
- ### Manually adding a preprocessor macro:
51
-
52
- ![add preprocessor macros `BLUETOOTH`](./screenshot/ios_bluetooth.png)
53
-
54
- > You should add `BLUETOOTH` in both `Debug` and `Release`
55
-
56
- ### Automatically adding a preprocessor macro via Podfile
57
- Add `post_install` hook in `Podfile`:
58
- ```ruby
59
- post_install do |installer|
60
- flipper_post_install(installer)
61
-
62
- ## ADD THE FOLLOWING:
63
-
64
- # Enables bluetooth functionality of react-native-system-setting
65
- installer.pods_project.targets.each do |target|
66
- if target.name == "RCTSystemSetting"
67
- target.build_configurations.each do |config|
68
- config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
69
- if !config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'].include? 'BLUETOOTH'
70
- puts 'Adding BLUETOOTH in GCC_PREPROCESSOR_DEFINITIONS of Pod RCTSystemSetting...'
71
- config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'BLUETOOTH'
72
- end
73
- end
74
- end
75
- end
76
- end
77
- ```
78
-
79
- Then open `Info.plist` as source code.
80
-
81
- ![open Info.plist as source code](./screenshot/ios_bluetooth_plist.png)
82
-
83
- Finally, add `NSBluetoothPeripheralUsageDescription` in `Info.plist`, see [Info.plist - example](https://github.com/c19354837/react-native-system-setting/blob/master/examples/SystemSettingExample/ios/SystemSettingExample/Info.plist#L55-L56)
84
-
85
- ```xml
86
- <?xml version="1.0" encoding="UTF-8"?>
87
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
88
- <plist version="1.0">
89
- <dict>
90
-
91
- ...
92
-
93
- <key>NSBluetoothPeripheralUsageDescription</key>
94
- <string>Explain the reasons for accessing...</string>
95
-
96
- </dict>
97
- </plist>
98
- ```
99
-
100
- > You can change the `string` as you need
101
-