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

[BUG] Can't build iOS #188

Closed
wilkinsonj opened this issue Mar 9, 2024 · 11 comments · Fixed by #191
Closed

[BUG] Can't build iOS #188

wilkinsonj opened this issue Mar 9, 2024 · 11 comments · Fixed by #191
Labels
bug Something isn't working

Comments

@wilkinsonj
Copy link

wilkinsonj commented Mar 9, 2024

Bug

Get a Fastlane exception when creating a development build on EXPO - 'react_native_blurhash-Swift.h' file not found

To Reproduce
Steps to reproduce the behavior:

  1. Add package to project
  2. Try to build using EAS build

Expected behavior
I expect the build to succeed. Android build is successful.

@wilkinsonj wilkinsonj added the bug Something isn't working label Mar 9, 2024
@sektr63a
Copy link

sektr63a commented Mar 9, 2024

@janicduplessis, @mrousavy

Faced with same issue on bare React Native project

@iM-GeeKy
Copy link

iM-GeeKy commented Mar 12, 2024

Relates to #186 (comment). Reverting back to "react-native-blurhash": "~1.1.11", seems to resolve the issue for now.

@Saphirah
Copy link

Saphirah commented Apr 8, 2024

Faced same issue

@JimTeva
Copy link

JimTeva commented Apr 12, 2024

Same issue with bare rn project. (rn 0.72.6; podfile: use_frameworks! (because I use firebase))
As suggested by @iM-GeeKy I reverted back to rnblurhash 1.1.11 for the moment and it works again
I cannot understand where the bug is coming from exactly.

@focux
Copy link
Contributor

focux commented May 23, 2024

Did anyone find a workaround that is not downgrading? For some reason, it works good on my machine but not on CI.

@iM-GeeKy
Copy link

Did anyone find a workaround that is not downgrading? For some reason, it works good on my machine but not on CI.

I haven't been able to get anything above 1.1.11 to work. I thought it might work when new arch support was added in 2.0, but I prototyped upgrading my project to the new arch and it still didn't work. So long story short, unfortunately, I think the answer is no.

@focux
Copy link
Contributor

focux commented May 23, 2024

By the way, I found the cause of the bug, looks like it was related to using dynamic/static frameworks (use_frameworks), which you most likely have enabled if you are using firebase.

I already opened a PR with the fix.

@iM-GeeKy
Copy link

By the way, I found the cause of the bug, looks like it was related to using dynamic/static frameworks (use_frameworks), which you most likely have enabled if you are using firebase.

I already opened a PR with the fix.

Nice work! I am in fact using firebase. I can try to use patch-package to verify your PR.

@focux
Copy link
Contributor

focux commented May 23, 2024

Ya, that'd be great. It's working good for me. This is the patch:

diff --git a/node_modules/react-native-blurhash/ios/BlurhashModule.mm b/node_modules/react-native-blurhash/ios/BlurhashModule.mm
index 0069675..560040d 100644
--- a/node_modules/react-native-blurhash/ios/BlurhashModule.mm
+++ b/node_modules/react-native-blurhash/ios/BlurhashModule.mm
@@ -6,7 +6,12 @@
 #import <blurhash_codegen/blurhash_codegen.h>
 #endif
 
+#if __has_include("react_native_blurhash/react_native_blurhash-Swift.h")
+#import "react_native_blurhash/react_native_blurhash-Swift.h"
+#else
 #import "react_native_blurhash-Swift.h"
+#endif
+
 
 #ifdef RCT_NEW_ARCH_ENABLED
 using namespace facebook::react;

@iM-GeeKy
Copy link

iM-GeeKy commented May 23, 2024

@focux I built with the patch applied and it worked for me. Do note, I don't have the new arch enabled, I'm just running bridgeless mode with "react-native": "0.74.1",, but previously without the patch this version was failing.

@mrousavy
Copy link
Owner

Nice @focux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants