react-native-flic2 2.0.0-beta.20 → 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 +13 -27
- 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,6 +41,10 @@ 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 simulator):**
|
|
45
|
+
For simulator installs, re-run `pod install` with
|
|
46
|
+
`FLIC2_IOS_SIMULATOR_STUB=1` (see Troubleshooting below).
|
|
47
|
+
|
|
44
48
|
2. **Add Bluetooth permissions to `Info.plist`:**
|
|
45
49
|
Add the following keys to your `ios/YourApp/Info.plist`:
|
|
46
50
|
```xml
|
|
@@ -797,43 +801,25 @@ const scanForButtons = async () => {
|
|
|
797
801
|
|
|
798
802
|
### Running on iOS Simulator
|
|
799
803
|
|
|
800
|
-
`flic2lib` is device-only. For simulator builds,
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
1. Add a simulator configuration in Xcode (for example `DebugSimulator`) and a scheme that uses it.
|
|
804
|
-
2. Map pods by configuration in your app `Podfile`:
|
|
805
|
-
|
|
806
|
-
```ruby
|
|
807
|
-
# Example
|
|
808
|
-
project 'YourApp.xcodeproj', {
|
|
809
|
-
'Debug' => :debug,
|
|
810
|
-
'DebugSimulator' => :debug,
|
|
811
|
-
'Release' => :release,
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
target 'YourApp' do
|
|
815
|
-
# ... your existing use_react_native! setup
|
|
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.
|
|
816
806
|
|
|
817
|
-
|
|
818
|
-
:path => '../node_modules/react-native-flic2',
|
|
819
|
-
:configurations => ['Debug', 'Release']
|
|
807
|
+
1. Install pods for normal/device builds:
|
|
820
808
|
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
:configurations => ['DebugSimulator']
|
|
824
|
-
end
|
|
809
|
+
```sh
|
|
810
|
+
cd ios && bundle exec pod install && cd ..
|
|
825
811
|
```
|
|
826
812
|
|
|
827
|
-
|
|
813
|
+
2. Install pods for simulator builds:
|
|
828
814
|
|
|
829
815
|
```sh
|
|
830
|
-
cd ios && bundle exec pod install && cd ..
|
|
816
|
+
cd ios && FLIC2_IOS_SIMULATOR_STUB=1 bundle exec pod install && cd ..
|
|
831
817
|
```
|
|
832
818
|
|
|
833
|
-
|
|
819
|
+
3. Launch simulator build (example):
|
|
834
820
|
|
|
835
821
|
```sh
|
|
836
|
-
npx react-native run-ios --
|
|
822
|
+
npx react-native run-ios --simulator "iPhone 17"
|
|
837
823
|
```
|
|
838
824
|
|
|
839
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
|