Use env-gated iOS simulator stub flow for Flic2.#54
Conversation
This introduces explicit device and simulator pod variants plus a JS/native no-op fallback path so simulator builds can run without flic2lib while keeping device behavior intact. Co-authored-by: Cursor <cursoragent@cursor.com>
Move simulator configuration guidance out of install steps into troubleshooting and add a fuller Podfile plus run command example for simulator workflows. Co-authored-by: Cursor <cursoragent@cursor.com>
Update package metadata and lockfile version fields so this branch and PR include the beta.20 release versioning. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Pull request overview
This PR introduces separate iOS CocoaPods variants for device vs simulator builds and adds a JS-side fallback so apps can run in the simulator without linking flic2lib, while keeping the real device implementation available via an explicit pod.
Changes:
- Added a JS no-op fallback module when the native
Flic2TurboModule isn’t present. - Added an iOS simulator stub implementation (
Flic2SimulatorStub) to satisfy the TurboModule interface withoutflic2lib. - Split iOS podspec setup into device/simulator variants (new standalone podspecs and
Flic2subspecs), and updated README simulator guidance.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/NativeFlic2.ts | Adds a JS fallback module when the native TurboModule can’t be resolved. |
| README.md | Documents simulator/device pod variant approach. |
| ios/Flic2SimulatorStub.mm | Implements a no-op iOS TurboModule stub for simulator builds. |
| ios/Flic2SimulatorStub.h | Declares the simulator stub TurboModule interface. |
| ios/Flic2.mm | Updates method signatures to match codegen numeric parameter types. |
| Flic2Simulator.podspec | New podspec for simulator stub variant. |
| Flic2Device.podspec | New podspec for device variant that links flic2lib.framework. |
| Flic2.podspec | Converts root spec into codegen-only with Device/Simulator subspecs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add an explicit iOS setup note that the autolinked root Flic2 pod is codegen-only and consumers must map Flic2Device (and Flic2Simulator for simulator builds) in Podfile. Co-authored-by: Cursor <cursoragent@cursor.com>
Update package metadata and lockfile to prepare and reflect the beta.21 npm release. Co-authored-by: Cursor <cursoragent@cursor.com>
This removes split Device/Simulator podspec entry points and restores the single Flic2 pod with FLIC2_IOS_SIMULATOR_STUB-based install-time switching, with README guidance updated accordingly. Co-authored-by: Cursor <cursoragent@cursor.com>
Update package metadata and lockfile for the published beta.22 release. Co-authored-by: Cursor <cursoragent@cursor.com>
This adds a dev-only warning when the native Flic2 module is missing and makes simulator troubleshooting pod commands consistent with plain pod install usage. Co-authored-by: Cursor <cursoragent@cursor.com>
Update package metadata and lockfile for the published beta.23 release. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the PR focused on simulator-stub behavior by dropping non-essential type/signature churn in the native iOS module. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Verification run completed successfully for What I tested
Result
Note: An initial simulator build failed while still linking the device-only framework; re-running |
This switches the iOS simulator support approach to the env-gated podspec flow (
FLIC2_IOS_SIMULATOR_STUB) while keeping the JS/native no-op fallback path.It also adds a dev-only warning when the native module is missing so fallback activation is visible during misconfiguration.
Co-authored-by: Cursor cursoragent@cursor.com