OneSignal-Unity-SDK icon indicating copy to clipboard operation
OneSignal-Unity-SDK copied to clipboard

[Bug]: Code in tutorial references old 2.x.x method GetPermissionSubscriptionState

Open TimmyBest opened this issue 3 years ago • 1 comments

What happened?

The code provided in the tutorial doesnt compile. The Xcode complains with a deprecated method. See screenshots here. Unity version 2020.3.32 https://drive.google.com/drive/folders/1AiKLfFIELVVLbgYwlrb11vIIbKxfu7GT?usp=sharing

Edit: attachment directly added by @jkasten2: Screenshot 2022-06-17 at 23 11 53

Steps to reproduce?

Build on unity for iOS

What did you expect to happen?

To have no errors and for the example snippet code to compile.

Unity version

2020.3.32

OneSignal Unity SDK version

3.0.2

Platform

iOS

Relevant log output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

TimmyBest avatar Jun 17 '22 22:06 TimmyBest

@TimmyBest Per the OneSignal 2.x.x to 3.x.x migration guide the OneSignal.GetPermissionSubscriptionState(); has been split up into different methods. Please see the guide for each conversion you should use.

If you see OneSignal.GetPermissionSubscriptionState(); anywhere in the OneSignal guides still please share so we can correct them.

The Xcode screenshot looks only to be a warning, not a compile or runtime error. If you use notifications from other libraries test to ensure they are still working and check for updates from them if they are not.

jkasten2 avatar Jun 28 '22 04:06 jkasten2