Skip to main content
OneSignalは、デバイス中心モデル(Player ID)からユーザー中心モデル(OneSignal ID)に更新されました。移行ガイダンスについては、User Model Migration Guideを参照してください。レガシーデバイス中心実装のドキュメントについては、Version 9を参照してください。
このページでは、OneSignalのPlayer ModelとUser Model SDKのメソッドおよびプロパティ名をマッピングします。これは、親しみやすさのために元のPlayer Model Client SDK Referenceのレイアウトを反映しています。Swift例はAPI変更を示していますが、これらは常に完全な動作サンプルであるとは限りません。他の言語での例と完全な実装の詳細については、リンクされたドキュメントを参照してください。

OneSignalの初期化

initWithLaunchOptions()

Player Model リファレンス
User Model リファレンス

デバッグ

setLogLevel()

Player Model リファレンス
User Model リファレンス

外部ユーザーID

setExternalId()

Player Model リファレンス
User Model リファレンス

removeExternalUserId()

Player Model リファレンス
User Model リファレンス

タグ

sendTag()

Player Model リファレンス
User Model リファレンス

sendTags()

getTags()

deleteTag()

deleteTags()


ユーザーデータ

notificationPermissionStatus

userId

hasNotificationPermission() / areNotificationsEnabled

pushToken

hasNotificationPermission

isSubscribed [Dropped]

User Model: N/A

isPushDisabled [Dropped]

User Model: N/A

setLanguage()


プライバシー

setRequiresUserPrivacyConsent()

consentGranted()


位置情報

setLocationShared()

isLocationShared()

promptLocation()


サブスクリプションオブザーバー

addSubscriptionObserver()

removeSubscriptionObserver()


プッシュ通知

promptForPushNotifications()

postNotification() [Dropped]

User Model: N/A

clearOneSignalNotifications()

disablePush()

unsubscribeWhenNotificationsAreDisabled() [Dropped]

User Model: N/A

setLaunchURLsInApp() [Dropped]

User Model: N/A

registerForProvisionalAuthorization()

setNotificationWillShowInForegroundHandler()

setNotificationOpenedHandler()

addPermissionObserver()

removePermissionObserver()


ライブアクティビティ

enterLiveActivity()

exit()


アプリ内メッセージ

addTrigger()

addTriggers()

removeTriggerForKey()

removeTriggerForKeys()

getTriggerValueForKey() [Dropped]

User Model: N/A

inAppMessagesArePaused

setInAppMessageLifecycleHandler()

setInAppMessageClickHandler()


メール

setEmail()

User Model doc

logoutEmail()


SMS

setSMSNumber()

logoutSMSNumber()

addSMSSubscriptionObserver() [Dropped]

User Model: N/A

getSMSId() [Dropped]

User Model: N/A

アウトカム

sendOutcome()

sendOutcomeWithValue()

sendUniqueOutcome()