Skip to content

Commit

Permalink
fix(ios): allow building with use_frameworks static (#771)
Browse files Browse the repository at this point in the history
* fix: fix ios build with use_frameworks static

* Create gorgeous-countries-exist.md

* chore: update podspec

* chore: add workflow_dispatch on ci

* fix: fix header import

* chore: revert workflow_dispatch

* Update packages/document-picker/react-native-document-picker.podspec

---------

Co-authored-by: Vojtech Novak <vonovak@gmail.com>
  • Loading branch information
jeongshin and vonovak authored Feb 26, 2025
1 parent cd25c26 commit 62794a6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
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

0 comments on commit 62794a6

Please sign in to comment.