Repository navigation
fix(ios): Guard newer APIs for older SDK compatibility - #34
Conversation
Add `RNDUO_HAS_IOS_27_SDK` and `RNDUO_HAS_IOS_27_1_SDK` compile-time checks and use them across Duo iOS views/utilities to wrap 27.0/27.1-only types, properties, and methods. This keeps runtime `@available` behavior but prevents references to unavailable symbols when building with older SDKs. The fallback paths remain active, including clearer unsupported-camera messaging when 27.1 APIs are not present.
CAWRESTLER
left a comment
There was a problem hiding this comment.
Thanks for this, @alieldab3! The guard approach looks right and CI is green on Xcode 27.1. Two small things before I merge:
- Unused static helpers on older SDKs. In
ios/RNDuoArrangementView.mm,RNDuoAxesandRNDuoOverlayEdgeare only called from code that's now inside the iOS 27 compile-time guard, so on older Xcode they're unused and trigger-Wunused-function. That will break builds for apps compiling with-Werror. Could you wrap those two helpers in the same#ifguard? - Branch is behind
main. Please update/rebase onto the latestmainso the required checks can run against it.
Optional, fine as a follow-up: the README, docs/COMPATIBILITY.md, and CHANGELOG still say Xcode 27.1 is required to compile. With this PR, older Xcode builds succeed and report Duo features as unavailable, so a note there would help. I can handle that after merge if you'd rather not.
Thanks again for the contribution!
Wrap Duo-only static helper functions in `RNDuoArrangementView.mm` with `RNDUO_HAS_IOS_27_1_SDK` so native iOS code can compile against older SDKs. Update README, CHANGELOG, and compatibility docs to clarify the new behavior: older-SDK builds keep fallback UI paths and report Duo APIs as unsupported, while native Duo features still require building with the iOS 27.1 SDK and running on iOS 27.1+.
|
Thanks @CAWRESTLER for the review! Both helpers are now wrapped in the same SDK guard, and I’ve updated the README, compatibility guide, and changelog to clarify older-SDK fallback behavior. I also fetched the latest upstream main and confirmed it’s already included in this branch through the existing merge. All 19 focused native tests and git diff --check pass. I’ll commit and push these local updates so CI can rerun. |
CAWRESTLER
left a comment
There was a problem hiding this comment.
Thanks @alieldab3! Both helpers are guarded, the docs are updated, and CI is green on all platforms. Merging.
fix(ios): Guard newer APIs for older SDK compatibility
Summary
Validation
git diff --checkpassed.Limitations