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]: No type or protocol named 'OSUser' and 'OSLiveActivities' #1717

Open
2 of 3 tasks
WillyRosa opened this issue Jun 18, 2024 · 9 comments
Open
2 of 3 tasks

[Bug]: No type or protocol named 'OSUser' and 'OSLiveActivities' #1717

WillyRosa opened this issue Jun 18, 2024 · 9 comments

Comments

@WillyRosa
Copy link

What happened?

I have installed latest version and after compiling the app. I'm getting this issue.

Screenshot 2024-06-18 at 16 35 32

Steps to reproduce?

1. Install latest sdk
2. Pod install
3. Run the app
4. Got those issues

What did you expect to happen?

I expect the app to compile and run on my emulator.

React Native OneSignal SDK version

5.2.0

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
@SagredoIsmael
Copy link

Same to me 🙏🏻

@oumaima-khameri
Copy link

Moi aussi

@kelbin
Copy link

kelbin commented Jun 19, 2024

I found a solution, you need to downgrade your version of library to 5.1.6 (before they announced live activities). It works for me, but anyway that's the temporary solution.

@KodyKendall
Copy link

@kelbin how did you do this? What does your Podfile look like?

@KodyKendall
Copy link

Thanks, @kelbin, I was able to get this workaround working by running rm -rf node_modules, then changing my package.json to be "react-native-onesignal": "~5.1.6", then running yarn install, and resolving to 5.1.3, so my yarn.lock file looked like this:

react-native-onesignal@~5.1.6:
  version "5.1.3"
  resolved "https://registry.yarnpkg.com/react-native-onesignal/-/react-native-onesignal-5.1.3.tgz#2da1819255a329dca6571ddef22184410c26b627"
  integrity sha512-ynHUqN6TaV98xghA05GddwBXF41jgb7BboP2xucvvJljxEw6CICnaiMfcupsxGNNHm74FBLsl5JK3qMuoLpoJw==
  dependencies:
    invariant "^2.2.2"

Then, I ran: cd ios && rm -rf Pods && rm Podfile.lock, and then modified Podfile to be:

...
pod 'OneSignalXCFramework', '5.1.6'
...

target 'OneSignalNotificationServiceExtension' do
  pod 'OneSignalXCFramework', '5.1.6'
end

That got it to build on iOS.

@Chasty
Copy link

Chasty commented Jun 27, 2024

@nan-li can u check this issue, it is happening to a lot of users.

@Chasty
Copy link

Chasty commented Jun 27, 2024

Thanks, @kelbin, I was able to get this workaround working by running rm -rf node_modules, then changing my package.json to be "react-native-onesignal": "~5.1.6", then running yarn install, and resolving to 5.1.3, so my yarn.lock file looked like this:

react-native-onesignal@~5.1.6:
  version "5.1.3"
  resolved "https://registry.yarnpkg.com/react-native-onesignal/-/react-native-onesignal-5.1.3.tgz#2da1819255a329dca6571ddef22184410c26b627"
  integrity sha512-ynHUqN6TaV98xghA05GddwBXF41jgb7BboP2xucvvJljxEw6CICnaiMfcupsxGNNHm74FBLsl5JK3qMuoLpoJw==
  dependencies:
    invariant "^2.2.2"

Then, I ran: cd ios && rm -rf Pods && rm Podfile.lock, and then modified Podfile to be:

...
pod 'OneSignalXCFramework', '5.1.6'
...

target 'OneSignalNotificationServiceExtension' do
  pod 'OneSignalXCFramework', '5.1.6'
end

That got it to build on iOS.

but they dont have a 5.1.6 version on react-native-onesignal repo.

@KodyKendall
Copy link

KodyKendall commented Jun 27, 2024 via email

@kelbin
Copy link

kelbin commented Jun 28, 2024

I used a unity build (the error same for all platform, except iOS), 5.1.6 exist there.

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

6 participants