OneSignalは、デバイス中心モデル(Player ID)からユーザー中心モデル(OneSignal ID)に更新されました。移行ガイダンスについては、User Model Migration Guideを参照してください。レガシーデバイス中心実装のドキュメントについては、Version 9を参照してください。
OneSignalのレガシーPlayer Model(v3およびv4)と最新のUser Model(v5+)のメソッドおよびプロパティ名を比較し、より簡単な移行のためにSwiftコード例を並べて表示します。
initWithLaunchOptions()setLogLevel()setExternalId()removeExternalUserId()sendTag()sendTags()getTags()deleteTag()deleteTags()notificationPermissionStatususerIdhasNotificationPermission() / areNotificationsEnabledpushTokenhasNotificationPermissionisSubscribed [Dropped]isPushDisabled [Dropped]setLanguage()setRequiresUserPrivacyConsent()consentGranted()setLocationShared()isLocationShared()promptLocation()addSubscriptionObserver()removeSubscriptionObserver()promptForPushNotifications()postNotification() [Dropped]clearOneSignalNotifications()disablePush()unsubscribeWhenNotificationsAreDisabled() [Dropped]setLaunchURLsInApp() [Dropped]registerForProvisionalAuthorization()setNotificationWillShowInForegroundHandler()setNotificationOpenedHandler()addPermissionObserver()removePermissionObserver()enterLiveActivity()exit()addTrigger()addTriggers()removeTriggerForKey()removeTriggerForKeys()getTriggerValueForKey() [Dropped]inAppMessagesArePausedsetInAppMessageLifecycleHandler()setInAppMessageClickHandler()setEmail()logoutEmail()setSMSNumber()logoutSMSNumber()addSMSSubscriptionObserver() [Dropped]getSMSId() [Dropped]sendOutcome()sendOutcomeWithValue()sendUniqueOutcome()