{"id":18782967,"url":"https://github.com/webex/webex-ios-sdk-example-push-notification-server","last_synced_at":"2026-03-06T17:05:05.657Z","repository":{"id":44653948,"uuid":"139798470","full_name":"webex/webex-ios-sdk-example-push-notification-server","owner":"webex","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-29T14:48:00.000Z","size":91,"stargazers_count":0,"open_issues_count":4,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-21T08:11:21.612Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-05T05:22:39.000Z","updated_at":"2020-11-26T10:30:00.000Z","dependencies_parsed_at":"2024-04-29T16:05:20.831Z","dependency_job_id":null,"html_url":"https://github.com/webex/webex-ios-sdk-example-push-notification-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/webex/webex-ios-sdk-example-push-notification-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webex%2Fwebex-ios-sdk-example-push-notification-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webex%2Fwebex-ios-sdk-example-push-notification-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webex%2Fwebex-ios-sdk-example-push-notification-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webex%2Fwebex-ios-sdk-example-push-notification-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webex","download_url":"https://codeload.github.com/webex/webex-ios-sdk-example-push-notification-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webex%2Fwebex-ios-sdk-example-push-notification-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30186780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T14:42:24.748Z","status":"ssl_error","status_checked_at":"2026-03-06T14:42:14.925Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T20:37:38.750Z","updated_at":"2026-03-06T17:05:00.639Z","avatar_url":"https://github.com/webex.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\n\n[Cisco Webex iOS SDK](https://developer.webex.com/docs/sdks/ios) enables you to embed [Cisco Webex](https://www.webex.com/) calling and meeting experience into your iOS mobile application. The SDK provides APIs to make and receive audio/video calls. In order to receive audio/video calls, the user needs to be notified when someone is calling the user.\n\nThis sample Webhook/Push Notification Server demonstrates how to write a server application to receive [Incoming Call Notification](https://developer.webex.com/docs/sdks/ios) from Cisco Webex and use [Apple Push Notification Service](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/APNSOverview.html#//apple_ref/doc/uid/TP40008194-CH8-SW1) to notify the mobile application.\n\nThis sample is built upon [apns4j](https://github.com/teaey/apns4j) and [Sprint Boot](https://projects.spring.io/spring-boot). It is designed to be deployed and run on [Heroku](https://www.heroku.com). But it can be deployed and run on other environments with minimal changes.\n\nFor more information about iOS remote notification, please see [Apple developer guide](https://developer.apple.com/notifications/).\n\n# How it works\n\nAssuming this sample Webook/Push Notification Server has been deployed on the public Internet, the following describes the webhooks and push notification workflow step by step.\n\n![Webex-IOSSDK-APNS](https://dsc.cloud/hello/Spark-IOSSDK-APNS-1509615302.png)\n\n1. Register to the Apple Push Notification Service (APNs) when your iOS application is launching.\n\n2. The APNs returns a device token to the application.\n\n3. Register the device token returned by the APNs and the user Id of current user to the  Webhook/Push Notification Server. The Server stores these information locally in a database.\n\t```\n\tlet paramaters: Parameters = [\n\t\t\"email\": email,\n\t\t\"voipToken\": voipToken,\n\t\t\"msgToken\": msgToken,\n\t\t\"personId\": personId\n\t]\n\tAlamofire.request(\"https://example.com/register\", method: .post, parameters: paramaters, encoding: JSONEncoding.default).validate().response { res in\n\t\t// ...\n\t}\n\t```\n\n4. After the user logs into Cisco Webex，use [Webhook API](https://webex.github.io/webex-ios-sdk/Classes/WebhookClient.html) to create an webhook at Cisco Webex cloud. The target URL of the webhook must be the /webhook REST endpoint of this server. The URL has to be publicly accessible from the Internet.\n\t```\n\twebex.webhooks.create(name: \"Incoming Call Webhook\", targetUrl: targetUrl, resource: \"callMemberships\", event: \"created\", filter: \"state=notified\u0026personId=me\") { res in\n\t\tswitch res.result {\n\t        case .success(let webhook):\n            \t// perform positive action\n\t        case .failure(let error):\n            \t// perform negative action\n\t    \t}\n\t}\n\t```\n\n5. The remote party makes a call via Cisco Webex.\n\n6. Ciso Webex receives the call and triggers the webhook. The incoming call event is sent to the target URL, which should be /webhook REST endpoint of this Webhook/Push Notification server.\n\n7. The Webhook/Push Notification Server looks up the device token from the database by the user Id in the incoming call event, then sends the notification with the device token and incoming call information to the APNs.\n\n8. The APNs pushs notification to the iOS device.\n\n9. Your iOS application [gets the push notification](https://github.com/webex/webex-ios-sdk-example-buddies/tree/master/Buddies/AppDelegate.swift#L170) and uses the SDK API to accept the call from Spark Cloud.\n\nFor more details about Step 1 and 2, please see [Apple Push Notifications Guide]((https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/index.html#//apple_ref/doc/uid/TP40008194-CH3-SW1))\n\nFor more details about Step 3 and 6, please see Cisco Webex [Webhooks Guide](https://developer.webex.com/docs/api/guides/webhooks)\n\n# Deployment\n\nThe sample application can be easily deployed as a [Java application on the Heroku](https://devcenter.heroku.com/categories/java).\n\n1. Create an Herko account and [set up](https://devcenter.heroku.com/articles/getting-started-with-java#set-up) the Heroku environment.\n\n2. Create a new Heroku app.\n\n3. Clone the [sample code](https://sqbu-github.cisco.com/SDK4Spark/webex-ios-sdk-example-push-notification-server/) to a local directory.\n\t```\n\tgit clone git@sqbu-github.cisco.com:SDK4Spark/webex-ios-sdk-example-push-notification-server.git\n\t```\n\n4. Copy your Apple Push Certificates to `./webex-ios-sdk-example-push-notification-server/.jdk-overlay/jre/lib/security`.\n\n\tSending and receiving push notifications requires you to create Apple Push Certificates. For this sample application, you should create and upload three certificates corresponding, one for each type: Development, Production and VoIP Services.\n\t\n\tApple Push Certificates are generated from the [Apple Developer Member Center](https://developer.apple.com/account/overview.action) which requires a valid Apple ID to login. \n\t\n5. Deploy the application to Heroku.\n\t```\n\theroku git:remote -a YOUR_APP_NAME\n\tgit add .\n\tgit commit -am \"First Deploy\"\n\tgit push heroku master\n\t```\n\n# REST API endpoints and Usage\n\nThe sample Webhook/Push Notification server provides three REST API endpoints.\n\n* `POST /webhook` -- This REST API endpoint should be used as the target URL for Cisco Webex [Webhooks Guide](https://developer.webex.com/docs/api/guides/webhooks). Cisco Webex post the incoming call event to this endpoint.\n\n\tPlease see [the implementation](https://github.com/webex/webex-ios-sdk-example-push-notification-server/blob/master/src/main/java/com/ciscowebex/iossdk/example/pns/Main.java#L117) for more details.\n\n* `POST /register` -- This REST API endpoint should be used by the moible application to register the device token and user id to this sample server.\n\n\tPlease see [the implementation](https://github.com/webex/webex-ios-sdk-example-push-notification-server/blob/master/src/main/java/com/ciscowebex/iossdk/example/pns/Main.java#L163) for more details.\n\t\n* `DELETE /register/{device_token}` -- This REST API endpoint should be used to delete the registered device token.\n\n\tPlease see [the implementation](https://github.com/webex/webex-ios-sdk-example-push-notification-server/blob/master/src/main/java/com/ciscowebex/iossdk/example/pns/Main.java#L182) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebex%2Fwebex-ios-sdk-example-push-notification-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebex%2Fwebex-ios-sdk-example-push-notification-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebex%2Fwebex-ios-sdk-example-push-notification-server/lists"}