OneSignal/onesignal-expo-plugin

1.3.2 [Bug]: 'onesignal/onesignal.h' file not found react native

MortadhaFadhlaoui opened this issue · 8 comments

What happened?

The latest version of the SDK 1.3.2 cause ios build to fail

Steps to reproduce?

onesignal-expo-plugin@1.3.2
npx expo run:ios

What did you expect to happen?

finish ios build successfully

OneSignal Expo SDK version

1.3.2

Platform

iOS

Relevant log output

❌  (ios/OneSignalNotificationServiceExtension/NotificationService.m:1:9)

> 1 | #import <OneSignal/OneSignal.h>
    |         ^ 'OneSignal/OneSignal.h' file not found
  2 | 
  3 | #import "NotificationService.h"

Code of Conduct

  • I agree to follow this project's Code of Conduct
emawby commented

@MortadhaFadhlaoui Was this working on a previous version and is failing now that you have upgraded? If so which version were you on previously? Has anything else changed in your build process (Mac version, Xcode version, Cocoapods version, etc.)?

@emawby nothing has changed so far, I have the same build environment in EAS

Installed software:
- Xcode 14.1 (14B47b)
- Node.js 16.18.1
- Yarn 1.22.17
- pnpm 7.15.0
- npm 8.1.2
- fastlane 2.210.1
- CocoaPods 1.11.3
- Ruby 2.7
- Expo CLI 6.0.0

I only downgrade to 1.3.1 and the build is working again.
Even in my local machine, nothing changed.

emawby commented

It looks like the 1.3.2 release only bumped dependency versions and then made this change. That PR is probably causing the issue 👀

Same issue here, even after downgrading..

Same issue here. 1.3.2 / 1.3.1 is failing / 1.3.0 too.

To fix you have to replace the code in NotificationService like in the doc..
https://documentation.onesignal.com/docs/react-native-sdk-setup

Looks like the solution is to replace the import in the NotificationService.m file:

OneSignal/react-native-onesignal#1440 (comment)

This will be fixed in https://github.com/OneSignal/onesignal-expo-plugin/pull/195/files