---
sourceDocument: オーストラリア API リファレンス
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ja-JP/api-reference

 Release :

    - australia

ft:locale :

    - ja-JP

ft:publication_title :

    - オーストラリア API リファレンス

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# NowPush API - iOS

# NowPush API - iOS {#ariaid-title1}

* リリースバージョン: Australia
* 
* 更新日 2026年03月12日
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 所要時間：2分

NowPush API は、ユーザーが NowPush サービスインスタンスをインスタンス化できるようにするトップレベルのグローバル API です。

## NowPush:makePushService(instanceUrl: URL) {#ariaid-title2}

指定された構成で `NowChatService` のインスタンスを作成します。
{#NPush-makePushService_S__table_zgd_zwn_trb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| instanceUrl | URL | プッシュ通知サービスを提供する ServiceNow インスタンスの URL。 |
[表 : 1. パラメーター]

{#NPush-makePushService_S__table_zgd_zwn_trb} {#NPush-makePushService_S__table_ahd_zwn_trb__entry__2}

| タイプ | 説明 |
|-|-|
| AnyPublisher\<[NowPushService](https://servicenow-prod.fluidtopics.net/CjGCHQjp7nwpjxJ~E3haeg#NowPushServiceiOSAPI "NowPushService クラスは、プッシュ通知サービスとのやり取りを可能にする関数を提供します。")、NowServiceError\> | 成功した場合は、初期化された [NowPushService](https://servicenow-prod.fluidtopics.net/CjGCHQjp7nwpjxJ~E3haeg#NowPushServiceiOSAPI "NowPushService クラスは、プッシュ通知サービスとのやり取りを可能にする関数を提供します。") オブジェクトを返します。失敗した場合は、NowServiceError オブジェクトを返します。 |
[表 : 2. 返される内容]

{#NPush-makePushService_S__table_ahd_zwn_trb}  
この例では、 `NowChatService` のインスタンスを作成する方法を示します。

    func setup(with instanceURL: URL) -> AnyPublisher<NowService, ConfigurationError> {
      NowPush.makePushService(instanceUrl: instanceURL)
        .mapError { .sdkError($0) }
        .map { $0 as NowService }
        .eraseToAnyPublisher()
    }

## NowPush - makePushService(instanceUrl: URL, completion: @escaping ((Result\<NowPushService, NowServiceError\>) -\> Void)) {#ariaid-title3}

指定された構成で `NowPushService` のインスタンスを作成し、完了したら、指定された補完ハンドラーを呼び出します。
{#NPush-makePushService_S_O__table_vsv_f5n_trb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| instanceUrl | URL | プッシュ通知サービスを提供する ServiceNow インスタンスの URL。 |
| 完了 | @escaping ((Result\<[NowPushService](https://servicenow-prod.fluidtopics.net/CjGCHQjp7nwpjxJ~E3haeg#NowPushServiceiOSAPI "NowPushService クラスは、プッシュ通知サービスとのやり取りを可能にする関数を提供します。"), NowServiceError\>) -\> void) | 初期化された `NowPushService` インスタンスまたは初期化に失敗した理由を示す `NowServiceError` のいずれかを含む呼び出される補完ハンドラー。 |
[表 : 3. パラメーター]

{#NPush-makePushService_S_O__table_vsv_f5n_trb} {#NPush-makePushService_S_O__table_wsv_f5n_trb__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 4. 返される内容]

{#NPush-makePushService_S_O__table_wsv_f5n_trb}  
この例では、 `NowPushService` のインスタンスを作成する方法を示します。

    static func setup(with instanceURL: URL,completion: @escaping
      (Result<NowPushService, NowServiceError>) → Void) {
        NowPush.makePushService(instanceUrl: instanceURL} {result in
          switch result {
          case .success(letpushService):
            completion(.success(pushService))
          case .failure(let error):
            completion(.failure(eror))
          }
        }
      }


