
Security News
pnpm 10.12 Introduces Global Virtual Store and Expanded Version Catalogs
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.
Add this line to your application's Gemfile:
gem 'zero_push'
And then execute:
$ bundle
Or install it yourself as:
$ gem install zero_push
Generate the ZeroPush initializer if you are using Ruby on Rails.
$ rails g zero_push:install
The easiest way to use the API client is to set the server auth_token
at the module level and call methods on the ZeroPush module. You can find the token on settings page for your app.
ZeroPush.auth_token = 'iosprod_your-server-token'
ZeroPush.verify_credentials
=> true
ZeroPush.notify(device_tokens: ['abcdef'], alert: 'hello, world', badge: '+1')
If your web application supports must support multiple mobile apps, you may configure it like this:
if Rails.env == 'development' #or ENV['RACK_ENV']
ZeroPush.auth_tokens = {
apns: 'iosdev_XYZ',
gcm: 'gcmdev_ABC',
}
else
ZeroPush.auth_tokens = {
apns: 'iosprod_XYZ',
gcm: 'gcmprod_ABC',
}
end
You may then instantiate clients by calling the method that matches the auth token key:
ZeroPush.apns.broadcast( ... )
ZeroPush.gcm.broadcast( ... )
Lastly, if you have many apps you may instantiate clients API Clients
client_1 = ZeroPush.client('iosprod_app-server-token-1')
client_1.broadcast(alert: 'hello, app1')
client_2 = ZeroPush.client('iosprod_app-server-token-2')
client_1.broadcast(alert: 'hello, app2')
Methods supported by this gem and their parameters can be found in the API Reference
For more documentation, check our Getting Started Guide with ZeroPush
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that zero_push demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.
Security News
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.