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: load auto-generated Swift import header correctly #16

Open
rishipyth opened this issue Oct 11, 2024 · 0 comments
Open

fix: load auto-generated Swift import header correctly #16

rishipyth opened this issue Oct 11, 2024 · 0 comments

Comments

@rishipyth
Copy link

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch @attentive-mobile/[email protected] for the project I'm working on.

I was getting the error attentive_react_native_sdk-Swift file not found. On searching, it looks like a common error on the way auto generated Swift header is imported from a pod.

Here is the diff that solved my problem:

diff --git a/node_modules/@attentive-mobile/attentive-react-native-sdk/ios/AttentiveReactNativeSdk.mm b/node_modules/@attentive-mobile/attentive-react-native-sdk/ios/AttentiveReactNativeSdk.mm
index 8090d58..a97660a 100644
--- a/node_modules/@attentive-mobile/attentive-react-native-sdk/ios/AttentiveReactNativeSdk.mm
+++ b/node_modules/@attentive-mobile/attentive-react-native-sdk/ios/AttentiveReactNativeSdk.mm
@@ -11,7 +11,7 @@
 #import "AttentiveReactNativeSdk-Swift.h"
 #else
 // Load the headers from the attentive-ios-sdk Pod
-#import "attentive_react_native_sdk-Swift.h"
+#import <attentive_react_native_sdk/attentive_react_native_sdk-Swift.h>
 #endif
 
 @implementation AttentiveReactNativeSdk {

This issue body was partially generated by patch-package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant