Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix ios build with use_frameworks static #771

Merged
merged 8 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/gorgeous-countries-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@react-native-documents/picker": patch
---

fix: enable ios build with use_frameworks static
7 changes: 7 additions & 0 deletions packages/document-picker/ios/RNDocumentPicker.mm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
#import "RCTConvert+RNDocumentPicker.h"
// this header file is generated by Xcode: https://developer.apple.com/documentation/swift/importing-swift-into-objective-c
// if it cannot be found, try cleaning the build folder and Xcode derived data folder

// When using use_frameworks! :linkage => :static in Podfile
#if __has_include(<react_native_document_picker/react_native_document_picker-Swift.h>)
#import <react_native_document_picker/react_native_document_picker-Swift.h>
#else
#import "react_native_document_picker-Swift.h"
#endif

// for UIModalPresentationStyle conversion
// remove after https://github.com/facebook/react-native/commit/2d547a3252b328251e49dabfeec85f8d46c85411 is released
#import <React/RCTModalHostViewManager.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Pod::Spec.new do |s|
}

if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
# RN 71+
install_modules_dependencies(s)
else
s.dependency "React-Core"
Expand Down
4 changes: 2 additions & 2 deletions packages/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@ PODS:
- React-jsiexecutor
- React-RCTFBReactNativeSpec
- ReactCommon/turbomodule/core
- react-native-document-picker (10.0.1):
- react-native-document-picker (10.1.0):
- DoubleConversion
- glog
- hermes-engine
Expand Down Expand Up @@ -1885,7 +1885,7 @@ SPEC CHECKSUMS:
React-logger: 02e5802824aa9b15cb7df42e10a91abead83cd8d
React-Mapbuffer: 99bd566147aaa78e872568be53ebca8a4449ddae
React-microtasksnativemodule: 51e7813abf875408a0f367e473a65bbab6aa8481
react-native-document-picker: 00f3dedbea5b81e9e5d810720d0ed9ff40e3f687
react-native-document-picker: d566165412d4913ff83e611c6ba51cebaa05cd79
react-native-document-viewer: e72376e1efe598380803ef661c33e3b3a3c0e3b0
react-native-segmented-control: bf6e0032726727498e18dd437ae88afcdbc18e99
react-native-uitextview: d30631440c99dde5210691267bdaf5480a080ffe
Expand Down
Loading