react-native-flic2 2.0.0-beta.21 → 2.0.0-beta.22
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.
- package/Flic2.podspec +8 -14
- package/README.md +12 -31
- package/package.json +1 -1
- package/Flic2Device.podspec +0 -21
- package/Flic2Simulator.podspec +0 -20
package/Flic2.podspec
CHANGED
|
@@ -13,20 +13,14 @@ Pod::Spec.new do |s|
|
|
|
13
13
|
s.platforms = { :ios => min_ios_version_supported }
|
|
14
14
|
s.source = { :git => "https://github.com/X-Guard/react-native-flic2.git", :tag => "#{s.version}" }
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
sp.source_files = "ios/Flic2.{h,mm}"
|
|
24
|
-
sp.private_header_files = "ios/Flic2.h"
|
|
25
|
-
sp.ios.vendored_frameworks = "ios/flic2lib.framework"
|
|
16
|
+
if ENV["FLIC2_IOS_SIMULATOR_STUB"] == "1"
|
|
17
|
+
s.source_files = "ios/Flic2SimulatorStub.{h,mm}"
|
|
18
|
+
s.private_header_files = "ios/Flic2SimulatorStub.h"
|
|
19
|
+
else
|
|
20
|
+
s.source_files = "ios/Flic2.{h,mm}"
|
|
21
|
+
s.private_header_files = "ios/Flic2.h"
|
|
22
|
+
s.ios.vendored_frameworks = "ios/flic2lib.framework"
|
|
26
23
|
end
|
|
27
24
|
|
|
28
|
-
s
|
|
29
|
-
sp.source_files = "ios/Flic2SimulatorStub.{h,mm}"
|
|
30
|
-
sp.private_header_files = "ios/Flic2SimulatorStub.h"
|
|
31
|
-
end
|
|
25
|
+
install_modules_dependencies(s)
|
|
32
26
|
end
|
package/README.md
CHANGED
|
@@ -41,10 +41,9 @@ npm install react-native-flic2
|
|
|
41
41
|
See `Troubleshooting` -> `Running on iOS Simulator` for a full configuration
|
|
42
42
|
example and launch commands.
|
|
43
43
|
|
|
44
|
-
**Important (iOS
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
(and `Flic2Simulator` for simulator-specific configurations).
|
|
44
|
+
**Important (iOS simulator):**
|
|
45
|
+
For simulator installs, re-run `pod install` with
|
|
46
|
+
`FLIC2_IOS_SIMULATOR_STUB=1` (see Troubleshooting below).
|
|
48
47
|
|
|
49
48
|
2. **Add Bluetooth permissions to `Info.plist`:**
|
|
50
49
|
Add the following keys to your `ios/YourApp/Info.plist`:
|
|
@@ -802,43 +801,25 @@ const scanForButtons = async () => {
|
|
|
802
801
|
|
|
803
802
|
### Running on iOS Simulator
|
|
804
803
|
|
|
805
|
-
`flic2lib` is device-only. For simulator builds,
|
|
806
|
-
|
|
804
|
+
`flic2lib` is device-only. For simulator builds, install pods with
|
|
805
|
+
`FLIC2_IOS_SIMULATOR_STUB=1` so the no-op native stub is used.
|
|
807
806
|
|
|
808
|
-
1.
|
|
809
|
-
2. Map pods by configuration in your app `Podfile`:
|
|
807
|
+
1. Install pods for normal/device builds:
|
|
810
808
|
|
|
811
|
-
```
|
|
812
|
-
|
|
813
|
-
project 'YourApp.xcodeproj', {
|
|
814
|
-
'Debug' => :debug,
|
|
815
|
-
'DebugSimulator' => :debug,
|
|
816
|
-
'Release' => :release,
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
target 'YourApp' do
|
|
820
|
-
# ... your existing use_react_native! setup
|
|
821
|
-
|
|
822
|
-
pod 'Flic2Device',
|
|
823
|
-
:path => '../node_modules/react-native-flic2',
|
|
824
|
-
:configurations => ['Debug', 'Release']
|
|
825
|
-
|
|
826
|
-
pod 'Flic2Simulator',
|
|
827
|
-
:path => '../node_modules/react-native-flic2',
|
|
828
|
-
:configurations => ['DebugSimulator']
|
|
829
|
-
end
|
|
809
|
+
```sh
|
|
810
|
+
cd ios && bundle exec pod install && cd ..
|
|
830
811
|
```
|
|
831
812
|
|
|
832
|
-
|
|
813
|
+
2. Install pods for simulator builds:
|
|
833
814
|
|
|
834
815
|
```sh
|
|
835
|
-
cd ios && bundle exec pod install && cd ..
|
|
816
|
+
cd ios && FLIC2_IOS_SIMULATOR_STUB=1 bundle exec pod install && cd ..
|
|
836
817
|
```
|
|
837
818
|
|
|
838
|
-
|
|
819
|
+
3. Launch simulator build (example):
|
|
839
820
|
|
|
840
821
|
```sh
|
|
841
|
-
npx react-native run-ios --
|
|
822
|
+
npx react-native run-ios --simulator "iPhone 17"
|
|
842
823
|
```
|
|
843
824
|
|
|
844
825
|
Expected behavior on simulator:
|
package/package.json
CHANGED
package/Flic2Device.podspec
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
require "json"
|
|
2
|
-
|
|
3
|
-
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
-
|
|
5
|
-
Pod::Spec.new do |s|
|
|
6
|
-
s.name = "Flic2Device"
|
|
7
|
-
s.version = package["version"]
|
|
8
|
-
s.summary = package["description"]
|
|
9
|
-
s.homepage = package["homepage"]
|
|
10
|
-
s.license = package["license"]
|
|
11
|
-
s.authors = package["author"]
|
|
12
|
-
|
|
13
|
-
s.platforms = { :ios => min_ios_version_supported }
|
|
14
|
-
s.source = { :git => "https://github.com/X-Guard/react-native-flic2.git", :tag => "#{s.version}" }
|
|
15
|
-
|
|
16
|
-
install_modules_dependencies(s)
|
|
17
|
-
|
|
18
|
-
s.source_files = "ios/Flic2.{h,mm}"
|
|
19
|
-
s.private_header_files = "ios/Flic2.h"
|
|
20
|
-
s.ios.vendored_frameworks = "ios/flic2lib.framework"
|
|
21
|
-
end
|
package/Flic2Simulator.podspec
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
require "json"
|
|
2
|
-
|
|
3
|
-
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
-
|
|
5
|
-
Pod::Spec.new do |s|
|
|
6
|
-
s.name = "Flic2Simulator"
|
|
7
|
-
s.version = package["version"]
|
|
8
|
-
s.summary = package["description"]
|
|
9
|
-
s.homepage = package["homepage"]
|
|
10
|
-
s.license = package["license"]
|
|
11
|
-
s.authors = package["author"]
|
|
12
|
-
|
|
13
|
-
s.platforms = { :ios => min_ios_version_supported }
|
|
14
|
-
s.source = { :git => "https://github.com/X-Guard/react-native-flic2.git", :tag => "#{s.version}" }
|
|
15
|
-
|
|
16
|
-
install_modules_dependencies(s)
|
|
17
|
-
|
|
18
|
-
s.source_files = "ios/Flic2SimulatorStub.{h,mm}"
|
|
19
|
-
s.private_header_files = "ios/Flic2SimulatorStub.h"
|
|
20
|
-
end
|