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]: 'OneSignalFramework/OneSignalFramework.h' file not found #231

Open
1 task done
fw-amgaa opened this issue May 27, 2024 · 11 comments
Open
1 task done

[Bug]: 'OneSignalFramework/OneSignalFramework.h' file not found #231

fw-amgaa opened this issue May 27, 2024 · 11 comments

Comments

@fw-amgaa
Copy link

What happened?

Created clean expo project, followed this doc: https://documentation.onesignal.com/docs/react-native-expo-sdk-setup.
Then I built native ios to test it on my phone, but this error keeps occurring.

Steps to reproduce?

#import <OneSignalFramework/OneSignalFramework.h>
^
'OneSignalFramework/OneSignalFramework.h' file not found

What did you expect to happen?

I expect it to work properly when I build to native IOS from expo.

OneSignal Expo SDK version

2.0.2

Platform

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@mrrenaud
Copy link

@fw-amgaa Could you show you plugins config in app.json ?

@mikeislearning
Copy link

mikeislearning commented Jun 23, 2024

I'm having the same issue, my plugin config looks like:

plugins: [
...
  [
        "onesignal-expo-plugin",
        {
          mode: "development",
        },
      ],

UPDATE: Got it to work by ensuring that onesignal-expo-plugin is the first plugin in my app.config.js

@codeagus11
Copy link

Same issue here!

@Robooze
Copy link

Robooze commented Aug 1, 2024

I'm having the same issue, my plugin config looks like:

plugins: [
...
  [
        "onesignal-expo-plugin",
        {
          mode: "development",
        },
      ],

UPDATE: Got it to work by ensuring that onesignal-expo-plugin is the first plugin in my app.config.js

This fix worked for me as well. Thanks @mikeislearning!

@codeagus11
Copy link

Please move onesignal-expo-plugin at the root and works fine

@louwjlabuschagne
Copy link

Also struggling with this, @codeagus11 what do you mean with at the root? Just first in the array? Or is there somewhere else we should put this?

@louwjlabuschagne
Copy link

Also struggling with this, @codeagus11 what do you mean with at the root? Just first in the array? Or is there somewhere else we should put this?

We are not using eas BTW

@codeagus11
Copy link

codeagus11 commented Aug 5, 2024

Correct @louwjlabuschagne , you should put the onesignal-expo-plugin as a first element of the array.

EAS is not related to the app.json (or app.config.js). The configuration in this file will change the native properties (inside the android and ios folders).

@louwjlabuschagne
Copy link

@codeagus11 this solves the problem when building the app in the GUI, however, if we try and build using xcode CLI using

xcodebuild -scheme "$SCEHEME" \
-archivePath $TMP/$SCEHEME.xcarchive \
-sdk iphoneos \
-configuration Release \
-destination generic/platform=iOS \
DEVELOPMENT_TEAM=$TEAM_ID

We still get the error - any ideas? It seems like the framework needs XCode GUI to ensure the linking to the files?

@codeagus11
Copy link

@codeagus11 this solves the problem when building the app in the GUI, however, if we try and build using xcode CLI using

xcodebuild -scheme "$SCEHEME" \
-archivePath $TMP/$SCEHEME.xcarchive \
-sdk iphoneos \
-configuration Release \
-destination generic/platform=iOS \
DEVELOPMENT_TEAM=$TEAM_ID

We still get the error - any ideas? It seems like the framework needs XCode GUI to ensure the linking to the files?

try with npx expo prebuild --clean before

@ChristopherGabba
Copy link

I can confirm. I'm still experiencing this issue. Moving the one-signal plugin to the first plugin fixed the problem per @mikeislearning 's solution

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

No branches or pull requests

7 participants