Giter Club home page Giter Club logo

apns-push-cmd's Issues

Sending push from Windows

I'm trying to use the Windows version to send push notification.

Here is my command prompt:
apnscmd_windows_386 -cert-p12 "Test.p12" -token "2af6c2c33ca83e145cba2cd6d296387ba7303ecc1f45b6f6912fb78d766c34bb" -alert-text "Hello" -topic "com.sintesi.ibrama"

And this is the result:
apns-push-cmd v1.2 - Apple Push Notification service Command Line Push
2024/04/03 17:13:07 Sending... POST https://api.push.apple.com/3/device/2af6c2c33ca83e145cba2cd6d296387ba7303ecc1f45b6f6912fb78d766c34bb
POST /3/device/2af6c2c33ca83e145cba2cd6d296387ba7303ecc1f45b6f6912fb78d766c34bb HTTP/1.1
Host: api.push.apple.com
Apns-Expiration: 0
Apns-Push-Type: alert
Apns-Topic: com.sintesi.ibrama

2024/04/03 17:13:27 Error in HTTP request: Post "https://api.push.apple.com/3/device/2af6c2c33ca83e145cba2cd6d296387ba7303ecc1f45b6f6912fb78d766c34bb": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

Maybe it's related to HTTP/1.1?
I googled this error but it's a generic error, so I really don't know what's wrong.

Support for background pushes

Hi,
thanks for the open source project ๐Ÿ™

Would it be possible to add a parameter support for background notifications? Namely a parameter that can set the Apns-Push-Type header value to background as described in the Apple docs.

apns-push-cmd/main.go

Lines 369 to 373 in 2b17376

if len(MdmPushMagic) > 0 {
req.Header.Set("apns-push-type", "mdm")
} else {
req.Header.Set("apns-push-type", "alert")
}

thanks in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.