Skip to content

Use env-gated iOS simulator stub flow for Flic2.#54

Merged
wesdewitte merged 15 commits into
developfrom
feature/invalidate_listeners
Jun 15, 2026
Merged

Use env-gated iOS simulator stub flow for Flic2.#54
wesdewitte merged 15 commits into
developfrom
feature/invalidate_listeners

Conversation

@jdegger

@jdegger jdegger commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

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

jdegger and others added 2 commits June 14, 2026 21:23
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>
Copilot AI review requested due to automatic review settings June 14, 2026 19:24
jdegger and others added 2 commits June 14, 2026 21:25
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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Flic2 TurboModule isn’t present.
  • Added an iOS simulator stub implementation (Flic2SimulatorStub) to satisfy the TurboModule interface without flic2lib.
  • Split iOS podspec setup into device/simulator variants (new standalone podspecs and Flic2 subspecs), 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.

Comment thread src/NativeFlic2.ts Outdated
Comment thread src/NativeFlic2.ts
Comment thread README.md Outdated
Comment thread Flic2.podspec Outdated
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>
Copilot AI review requested due to automatic review settings June 15, 2026 05:39
Update package metadata and lockfile to prepare and reflect the beta.21 npm release.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.

Comment thread src/NativeFlic2.ts Outdated
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>
Copilot AI review requested due to automatic review settings June 15, 2026 05:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.

Comment thread src/NativeFlic2.ts Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread Flic2.podspec
jdegger and others added 2 commits June 15, 2026 08:08
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>
Copilot AI review requested due to automatic review settings June 15, 2026 06:14
@jdegger jdegger changed the title Add simulator/device iOS pod variants for Flic2. Use env-gated iOS simulator stub flow for Flic2. Jun 15, 2026
Update package metadata and lockfile for the published beta.23 release.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.

Comment thread src/NativeFlic2.ts
Comment thread ios/Flic2.mm Outdated
Comment thread ios/Flic2.mm Outdated
Comment thread README.md
Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings June 15, 2026 06:32
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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Comment thread README.md
Comment thread ios/Flic2SimulatorStub.mm
Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings June 15, 2026 06:36
jdegger and others added 2 commits June 15, 2026 08:39
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated no new comments.

@jdegger

jdegger commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

Verification run completed successfully for 2.0.0-beta.25.

What I tested

  • npm install in xgac-rn-alarm (dependency install path)
  • npm run pod-install (device pod install path)
  • npm run pod-install-simulator (simulator pod install path with FLIC2_IOS_SIMULATOR_STUB=1)
  • iOS simulator launch: npx react-native run-ios --simulator \"iPhone 17 Pro\" --no-packager

Result

  • App build succeeded and app launched successfully on iOS simulator.
  • RN CLI reported:
    • success Successfully built the app
    • success Successfully launched the app

Note: An initial simulator build failed while still linking the device-only framework; re-running pod-install-simulator refreshed the local podspec to Flic2SimulatorStub and the subsequent simulator build+launch succeeded.

@wesdewitte wesdewitte merged commit 6204394 into develop Jun 15, 2026
2 checks passed
@wesdewitte wesdewitte deleted the feature/invalidate_listeners branch June 15, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants