Skip to content

fix: fix ios build with use_frameworks static#771

Merged
vonovak merged 8 commits intoreact-native-documents:mainfrom
jeongshin:fix/ios-build
Feb 26, 2025
Merged

fix: fix ios build with use_frameworks static#771
vonovak merged 8 commits intoreact-native-documents:mainfrom
jeongshin:fix/ios-build

Conversation

@jeongshin
Copy link
Copy Markdown
Contributor

Hi Thanks for great library.

This may fix this issue.

I tested on my app with linking static and it works.

Thank you.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 16, 2025

🦋 Changeset detected

Latest commit: 43e6a9d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@react-native-documents/picker Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vonovak
Copy link
Copy Markdown
Member

vonovak commented Feb 16, 2025

Hello, and thank you for the PR!

okay, let's give this a go!

@vonovak
Copy link
Copy Markdown
Member

vonovak commented Feb 16, 2025

@jeongshin the build fails with

/Users/runner/work/document-picker/document-picker/packages/document-picker/ios/RNDocumentPicker.mm:13:9: fatal error: 'react_native_document_picker/react_native_document_picker-Swift.h' file not found
#import <react_native_document_picker/react_native_document_picker-Swift.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

** BUILD FAILED **

can you pls take a look at it?

Thank you!

@vonovak
Copy link
Copy Markdown
Member

vonovak commented Feb 17, 2025

btw I'd guess that by the time the preprocessor runs, the headers are not yet available; this header is generated by xcode at build time I think

@jeongshin
Copy link
Copy Markdown
Contributor Author

btw I'd guess that by the time the preprocessor runs, the headers are not yet available; this header is generated by xcode at build time I think

I'm trying to fix the build issue, but I think the build fails even before I can fix the header problem.

I fixed the headers generation issue but stuck on the other problems.

I'll take a look for details on upcoming weekend. I don't have much time on weekdays... 🙏.

Thanks!

@jeongshin
Copy link
Copy Markdown
Contributor Author

@vonovak I think I fixed the build issue. Tested on forked main branch.

Thanks!

@stephane-r
Copy link
Copy Markdown

Hi @jeongshin thank you ! Build is success for me too.

@vonovak vonovak merged commit 62794a6 into react-native-documents:main Feb 26, 2025
4 checks passed
jeongshin added a commit to jeongshin/react-native-rate-app that referenced this pull request Mar 16, 2026
Support static framework linking by checking for <RateApp/RateApp-Swift.h>
before falling back to "RateApp-Swift.h". This prevents build failures when
using `use_frameworks! :linkage => :static` in Podfile.

Ref: react-native-documents/document-picker#771

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jeongshin added a commit to jeongshin/react-native-rate-app that referenced this pull request Mar 16, 2026
Support static framework linking by checking for <RateApp/RateApp-Swift.h>
before falling back to "RateApp-Swift.h". This prevents build failures when
using `use_frameworks! :linkage => :static` in Podfile.

Closes huextrat#460
Ref: react-native-documents/document-picker#771

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
huextrat pushed a commit to huextrat/react-native-rate-app that referenced this pull request Mar 16, 2026
Support static framework linking by checking for <RateApp/RateApp-Swift.h>
before falling back to "RateApp-Swift.h". This prevents build failures when
using `use_frameworks! :linkage => :static` in Podfile.

Closes #460
Ref: react-native-documents/document-picker#771

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
huextrat pushed a commit to huextrat/react-native-rate-app that referenced this pull request Mar 16, 2026
## [2.0.1](v2.0.0...v2.0.1) (2026-03-16)

### Bug Fixes

* **ios:** add __has_include guard for Swift bridging header ([#461](#461)) ([765657f](765657f)), closes [react-native-documents/document-picker#771](react-native-documents/document-picker#771)
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.

'react_native_document_picker-Swift.h' file not found

3 participants