Pusher Beams iOS & macOS SDK
Building and Running
- Swift 4.0+
- Xcode - The easiest way to get Xcode is from the App Store, but you can also download it from developer.apple.com if you have an AppleID registered with an Apple Developer account.
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
CocoaPods version 1.3.1 or newer is recommended to build Pusher Beams.
To integrate Pusher Beams into your Xcode project using CocoaPods, specify it in your
source 'https://github.com/CocoaPods/Specs.git' platform :ios, '10.0' use_frameworks! # Replace `<Your Target Name>` with your app's target name. target '<Your Target Name>' do pod 'PushNotifications', '~> 1.0.0' end
Then, run the following command:
$ pod install
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
Carthage version 0.26.2 or newer is recommended to build Pusher Beams.
You can install Carthage with Homebrew using the following command:
$ brew update $ brew install carthage
To integrate Pusher Beams into your Xcode project using Carthage, specify it in your
Continue following the steps below depending on the platform that you're building the dependency for:
- If you're building for OS X, follow this guide.
- If you're building for iOS, tvOS, or watchOS, follow this guide.
Generating Test Coverage Reports
Create a report as static html pages by running:
slather coverage --html --scheme PushNotifications --workspace PushNotifications.xcworkspace/ PushNotifications/PushNotifications.xcodeproj/
Open the html reports:
Pusher Beams Reference
- shared - View in Source
- start(instanceId:) - View in Source
- registerForRemoteNotifications - View in Source
- registerForRemoteNotifications(options:) - View in Source
- registerDeviceToken(_:completion:) - View in Source
- subscribe(interest:completion:) - View in Source
- setSubscriptions(interests:completion:) - View in Source
- unsubscribe(interest:completion:) - View in Source
- unsubscribeAll(completion:) - View in Source
- getInterests() - View in Source
- handleNotification(userInfo:) - View in Source
- interestsSetDidChange(interests:) - View in Source
- Found a bug? Please open an issue.
- Have a feature request. Please open an issue.
- If you want to contribute, please submit a pull request (preferrably with some tests).
Pusher Beams is owned and maintained by Pusher.
Pusher Beams is released under the MIT license. See LICENSE for details.