Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add a possibility to simulate push notifications via simctl #1286

Merged
merged 3 commits into from
Mar 16, 2021

Conversation

Copy link

@wswebcreation wswebcreation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow,

This is really great and thanks for doing it so quickly!

🚀

*/
extensions.mobilePushNotification = async function mobilePushNotification (opts = {}) {
if (!this.isSimulator()) {
throw new Error('This extension only works on Simulator');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Name | Type | Required | Description | Example
--- | --- | --- | --- | ---
bundleId | string | yes | The bundle identifier of the target application | com.apple.Preferences
payload | map | yes | Valid Apple Push Notification values. Read the `Create the JSON Payload` topic of the [official Apple documentation](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification?language=objc) for more details on the payload creation. | `{"aps": {"alert": "This is a simulated notification!", "badge": 3, "sound": "default"} }`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link

@gromanas gromanas Apr 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I could made a comment, I have already try to use {"aps": {"alert": "This is a simulated notification!", "badge": 3, "sound": "default"} } and i got an error about Simulator Target Bundle using Xcode 12.4. I have change it to {"Simulator Target Bundle": "your.apps.bundleId", "aps": {"alert": { "title": "This is a simulated notification!"}, "badge": 3, "sound": "default"} } and it worked.

@mykola-mokhnach mykola-mokhnach merged commit d8f320f into appium:master Mar 16, 2021
@mykola-mokhnach mykola-mokhnach deleted the push branch March 16, 2021 20:30
github-actions bot pushed a commit that referenced this pull request Mar 16, 2021
# [3.39.0](v3.38.0...v3.39.0) (2021-03-16)

### Features

* Add a possibility to simulate push notifications via simctl ([#1286](#1286)) ([d8f320f](d8f320f))
@github-actions
Copy link
Contributor

🎉 This PR is included in version 3.39.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link
Member

@jlipps jlipps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

khanayan123 pushed a commit to khanayan123/appium-xcuitest-driver that referenced this pull request May 10, 2021
khanayan123 pushed a commit to khanayan123/appium-xcuitest-driver that referenced this pull request May 10, 2021
# [3.39.0](appium/appium-xcuitest-driver@v3.38.0...v3.39.0) (2021-03-16)

### Features

* Add a possibility to simulate push notifications via simctl ([appium#1286](appium#1286)) ([d8f320f](appium@d8f320f))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants