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

I completed the steps on your website for Unity integration, but I receive a compile error 'OneSignal' does not contain a definition for 'Initialize' #643

Closed
1 task done
breban1 opened this issue Oct 1, 2023 · 2 comments

Comments

@breban1
Copy link

breban1 commented Oct 1, 2023

How can we help?

I completed the steps on the OneSignal website for Unity integration, but I receive a compile error 'OneSignal' does not contain a definition for 'Initialize'. It's like OneSignal isn't installed.

Using Unity 2020.3.42f1 LTS
Using the latest OneSignal asset from the asset store v3.0.11

In Unity when I click Windows->OneSignal SDK Setup it shows all steps are complete (all "Run" are grayed out).

I see files for OneSignal in:
Assets->OneSignal
Assets->Plugins->Android->OneSignalConfig.plugin

And 3 OneSignal packages:
Android, Core, and iOS

Code of Conduct

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

In 3.0.11 you have to call Initialize on OneSignal.Default.Initialize(appid);
In the latest 5.x version it's OneSignal.Initialize(appid);

@shepherd-l
Copy link
Contributor

shepherd-l commented Oct 6, 2023

victornor is correct. 3.x uses the OneSignal.Default static class

Our documentation website defaults to the latest version, 5.x

If you would like to see our 3.x documentation, you can find it in our v9.0 docs:
https://documentation.onesignal.com/v9.0/docs/sdk-reference

Going to close this issue for now, but let me know if you have any further questions

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

3 participants