Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattt/Orbiter
Push Notification Registration for iOS
https://github.com/mattt/Orbiter
Last synced: 6 days ago
JSON representation
Push Notification Registration for iOS
- Host: GitHub
- URL: https://github.com/mattt/Orbiter
- Owner: mattt
- License: mit
- Archived: true
- Created: 2012-11-29T00:10:13.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2021-06-22T17:10:23.000Z (over 3 years ago)
- Last Synced: 2024-11-20T18:56:24.675Z (22 days ago)
- Language: Objective-C
- Size: 36.1 KB
- Stars: 673
- Watchers: 22
- Forks: 46
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - Orbiter - Push Notification Registration for iOS. (Notifications / Push Notifications)
- awesome-ios-star - Orbiter - Push Notification Registration for iOS. (Notifications / Push Notifications)
README
# Orbiter
> **Note**: This project is no longer being maintained.
For most iOS client / server applications, push notifications are negotiated through an intermediary service provider, such as [Urban Airship](http://urbanairship.com). The service provider exposes APIs to register a device token, as well as APIs to send push notifications to devices meeting some specified criteria.
Orbiter is a small library that provides simple interfaces to register (and unregister) for Push Notifications with [Urban Airship](http://urbanairship.com) (without needing to include their SDK), as well as [Helios](http://helios.io) apps.
> Orbiter is named for the [orbital space craft of the Space Shuttle program](http://en.wikipedia.org/wiki/Space_Shuttle_orbiter), which houses the flight crew and electronics used to communicate with mission control.
> This project is part of a series of open source libraries covering the mission-critical aspects of an iOS app's infrastructure. Be sure to check out its sister projects: [GroundControl](https://github.com/mattt/GroundControl), [SkyLab](https://github.com/mattt/SkyLab), [CargoBay](https://github.com/mattt/CargoBay), and [houston](https://github.com/mattt/houston).
## Example Usage
### Urban Airship Registration
```objective-c
- (void)application:(UIApplication *)application
didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
[[UrbanAirshipOrbiter urbanAirshipManagerWithApplicationKey:@"..." applicationSecret:@"..."] registerDeviceToken:deviceToken withAlias:nil success:^(id responseObject) {
NSLog(@"Registration Success: %@", responseObject);
} failure:^(NSError *error) {
NSLog(@"Registration Error: %@", error);
}];
}
```### Helios Registration
```objective-c
- (void)application:(UIApplication *)application
didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
NSURL *serverURL = [NSURL URLWithString:@"http://raging-notification-3556.herokuapp.com/"];
Orbiter *orbiter = [[Orbiter alloc] initWithBaseURL:serverURL credential:nil];
[orbiter registerDeviceToken:deviceToken withAlias:nil success:^(id responseObject) {
NSLog(@"Registration Success: %@", responseObject);
} failure:^(NSError *error) {
NSLog(@"Registration Error: %@", error);
}];
}
```## License
Orbiter is available under the MIT license. See the LICENSE file for more info.