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]: Build fails with Framework not found OneSignalUser after adding onesignal. #1607

Closed
2 of 3 tasks
harrisrobin opened this issue Nov 30, 2023 · 3 comments
Closed
2 of 3 tasks

Comments

@harrisrobin
Copy link

harrisrobin commented Nov 30, 2023

What happened?

Hello,

I am trying to setup OneSignal on our iOS app. Our app has two flavours (targets), Staging & Prod.
As a result, I created two extensions targeting each respective target (please advise if this is a bad idea):

CleanShot 2023-11-30 at 12 41 16@2x

I've had quite a few issues getting it to work, latest one solved by making sure that the deployment targets match. However, now I get: Framework not found OneSignalUser and there does not seem to be any issues about this particular error here.

CleanShot 2023-11-30 at 12 43 07@2x

In my podfile, i have:

target 'OneSignalNotificationServiceExtension' do
  pod 'OneSignalXCFramework', '>= 5.0.0', '< 6.0'
end

target 'OneSignalNotificationServiceExtensionStaging' do
  pod 'OneSignalXCFramework', '>= 5.0.0', '< 6.0'
end

Any ideas what could be causing this?

Steps to reproduce?

1. Install react-native-one-signal `^5.0.3`
2. Use xcode `15.0.1`
3. use react-native `0.72.6`

What did you expect to happen?

I expect my app to build, right now the build fails ever since i added onesignal due to the error above.

React Native OneSignal SDK version

5.0.3

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

No response

Code of Conduct

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

When I delete the extension target and re-add it, i now get: No such module 'OneSignalExtension'

CleanShot 2023-11-30 at 12 55 39@2x

@harrisrobin
Copy link
Author

Doing the following eventually fixed the issue for me. Seems odd that I have to do this, i am working on a standard project so this seems like it should be included in the docs?

Will close this, thanks

@fedeolto
Copy link

For the ones landed here because getting "No such module 'OneSignalExtension'" error:
https://documentation.onesignal.com/docs/troubleshooting-ios#no-such-module-onesignal

Also looks like having 2 notifications services, one per target is the right way:
https://documentation.onesignal.com/docs/troubleshooting-ios#can-we-setup-multiple-notification-service-extensions-for-multiple-targets-in-single-xcode-project

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

2 participants