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 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
- install_modules_dependencies(s)
17
-
18
- # Keep the root spec codegen-only so consumers can opt into
19
- # Device/Simulator implementations explicitly.
20
- s.default_subspecs = []
21
-
22
- s.subspec "Device" do |sp|
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.subspec "Simulator" do |sp|
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 pod wiring):**
45
- The autolinked root `Flic2` pod is codegen-only in the 2.x beta setup.
46
- To get a real iOS runtime implementation, add `Flic2Device` in your Podfile
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, use the no-op simulator pod and a
806
- dedicated simulator build configuration.
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. Add a simulator configuration in Xcode (for example `DebugSimulator`) and a scheme that uses it.
809
- 2. Map pods by configuration in your app `Podfile`:
807
+ 1. Install pods for normal/device builds:
810
808
 
811
- ```ruby
812
- # Example
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
- 3. Install pods normally (no env flags):
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
- 4. Launch simulator build (example):
819
+ 3. Launch simulator build (example):
839
820
 
840
821
  ```sh
841
- npx react-native run-ios --scheme YourAppSimulator --mode DebugSimulator --simulator "iPhone 17"
822
+ npx react-native run-ios --simulator "iPhone 17"
842
823
  ```
843
824
 
844
825
  Expected behavior on simulator:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-flic2",
3
- "version": "2.0.0-beta.21",
3
+ "version": "2.0.0-beta.22",
4
4
  "description": "React Native Flic plugin made with the Flic2 SDK (unofficial)",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -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
@@ -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