AeroGear UnifiedPush Server 0.8.1 released

I am happy to announce that we have a new release of the AeroGear UnifiedPush Server!

The biggest change we did in this release was applying an update to our RESTful Sender API: We now have one single endpoint to deliver Push Notifications to the supported platforms like Android, iOS and Mozilla’s SimplePush. This of course has some impact on the client libraries and we will have the Java Library available on Maven Central shortly, while our latest NodeJS API is already available on npm.

Besides that we added support for JavaEE Bean Validation, added support for WildFly and polished the Admin UI (including an update to Ember 1.0.0). An SSL workaround for our OpenShift cardridge could be remove as well, as the underlying bug was fixed. And other minor things. Below are the enitre release notes for further details!

Now, you can download the WAR file and give it a shot!

Have fun!
Matthias

Release Notes – AeroGear Push – Version 0.8.1

Bug

  • [AGPUSH-255] – Add server side validation and appropriate response body for bad requests
  • [AGPUSH-259] – When adding variant, all “help” links point to iOS help
  • [AGPUSH-298] – PushServer @DELETE methods violate REST specifications
  • [AGPUSH-299] – Misleading info in the Authentication Info section on the Mobile Variant Overview page
  • [AGPUSH-304] – Admin UI should do auth check before rendering content
  • [AGPUSH-342] – Admin UI installation details wrong label Description instead of Device Type
  • [AGPUSH-353] – Loading mispelled

Enhancement

  • [AGPUSH-343] – Add Access-Control-Max-Age to CORS preflight headers

Feature Request

  • [AGPUSH-200] – Add Google “Project Number” to Android Variant
  • [AGPUSH-271] – AdminUI: simplePushEndpoint for SP installations
  • [AGPUSH-275] – UnifiedPush Server: Add database CLI
  • [AGPUSH-287] – Undo OpenShift SSL Certificate workaround
  • [AGPUSH-288] – No way to show variant details if the variant has no name
  • [AGPUSH-302] – UnifiedPush: iOS-Corodva guide
  • [AGPUSH-305] – Move CURL commands to REST API specs
  • [AGPUSH-332] – Allow to add user
  • [AGPUSH-334] – Update to Ember 1.0.0
  • [AGPUSH-341] – Admin UI show push endpoint URL in installation details screen
  • [AGPUSH-354] – remove provider class name in persistence.xml
  • [AGPUSH-356] – Using AuthenticationManager injection with Agent parameter
  • [AGPUSH-357] – Using IdentityManagement injection with User parameter
  • [AGPUSH-375] – Update UnifiedPush Spec to use https

Task

Sub-task

Posted in aerogear

Speaking at JavaOne 2013

It has been a while that I did attend the JavaOne conference, but this year I am back. Yay!

During the conference I am giving two talks focusing on AeroGear and generally Mobile Development, that is powered by Java EE 7:

  • Notify Your Mobile Clients by Integrating Push Networks and Java EE 7 [CON5073] with Jay Balunas
    Monday, Sep 23, 8:30 AM – 9:30 AM – Parc 55 – Market S
  • Developing Enterprise iPhone Apps on Java EE 7 [BOF5117] with Jay Balunas
    Tuesday, Sep 24, 6:30 PM – 7:15 PM – Parc 55 – Embarcadero

Besides the talks I might hangout on the JBoss booth and at the JBoss party !

Looking forward to a great week in San Francisco!

Posted in aerogear

Node.js and the AeroGear UnifiedPush Server

With the recent release of the AeroGear UnifiedPush server and it is very simple to send push notifications to mobile devices.

Node.js integration

Usually a backend application is responsible for sending notifications based on events. Besides a Java library we also have an early version of a Node.js client library.

The setup of the JavaScript library is pretty simple, just clone the repo and install it locally:

npm install path/to/cloned/aerogear-unified-push-node-client

After it is present, the API is pretty straightforward to use:

// import the library
var agSender = require( "aerogear-sender-client" ).AeroGear;

// create the payload for the mobile device
var message = {
  alert: "Sent via AeroGear's Node.js SDK",
  sound: "default",
  badge: 2
};

// apply the UnifiedPush credentials for sending messages:
var options = {
  applicationID: "myPushApplicationID",
  masterSecret: "myMasterSecret"
};

// use the sender to submit a 'broadcast':
agSender.Sender( "https://my-server.rhcloud.com" )
  .broadcast( message, options )
    .on( "success", function( response ) {
      console.log( "success called", response );
    });

Once you have included this into your backend application, you are able to receive the message on those devices that are registered with the UnifiedPush Server:

Running the Server in the cloud

If you are interested in testing the server, it is quite simple to try our OpenShift cartridge - no server installation is required!

Have fun!

Posted in aerogear

Push Notifications for Android, iOS and Web

Today we are releasing the first community release of the AeroGear UnifiedPush Server!

The AeroGear UnifiedPush Server is a server that stores devices specific metadata and is able to sendpush notifications to different (mobile) platforms. The initial version of the server supports Apple’s APNs,Google Cloud Messaging and Mozilla’s SimplePush.

Three supported platforms

While Android and iOS are pretty much very well known, it’s worth spending a few seconds onSimplePush. SimplePush is a specification from Mozilla that describes a JavaScript API and a WebSocket-based protocol which allows backend/application developers to send notification messages to their web applications. Originally SimplePush was introduced for Firefox OS but there are plans to establish the API on the desktop and mobile browsers as well.

The AeroGear project is releasing a Netty-based server and a polyfill JavaScript library for SimplePush as well.

A few problems with Push Notifications

In order to be able to send messages to specific devices, the server side application needs to know the device token, which means the application on the device needs to store it on the server side database.

Another problem is that if you are supporting multiple platforms, they all have different APIs and behave differently – not only on the client side. You need to ensure that the server side application sends the notifications to all clients, for all supported platforms.

Enter AeroGear UnifiedPush Server

The AeroGear UnifiedPush Server addresses these concerns as it is capable to store device specific metadata, including device tokens and it offers a unified way to deliver notifications to Android, iOS and JavaScript applications.

REST API

All features of the server are powered by RESTful APIs:

  • registration of device specific metadata
  • sending push notifications
  • Management of the PushApplications and their different variants

AdminUI

The management of the PushApplications, their variants and all of the actual device installations are best handled by the AdminUI, which is based on Ember.js and Topcoat

Device Registration

As indicated on the above image we have SDKs for our supported platforms (AndroidiOS and JavaScript) to help registration of client devices with the AeroGear UnifiedPush Server.

Sending Push Notifications

Sending can be done over the RESTful API:

curl -u "{PushApplicationID}:{MasterSecret}"
   -v -H "Accept: application/json" -H "Content-type: application/json"
   -X POST
   -d '{
       "someKey":"someValue",
       "alert":"HELLO!",
       "sound":"default",
       "badge":7,
       "simple-push":"version=123"
     }'

http://SERVER:PORT/CONTEXT/rest/sender/broadcast

The above sends a broadcast notification to all the different platforms, supported by our server. Using commandline cURL is nice for testing, but for backend applications you usually want a more fluent API. Right now we do have a Java and a Node.js client. A PHP SDK is currently being developed.

To the cloud – and beyond

The AeroGear SimplePush and UnifiedPush server have been bundled in a OpenShift cartridge, so that you can get started in just minutes!

Feedback

We hope you enjoy what we offer and we are looking forward getting feedback, bug reports and feature requests!

Posted in aerogear

What’s new in AeroGear iOS ?

The 1.2.0 version of aerogear-ios contains only one minor change, the deprecation of thelogin: password: success: failure method.

APNs support

With the August release the entire AeroGear focus was around adding Push Notification. Two servers (seeUnifiedPush Server Blog and SimplePush server blog for more details) have been written and we added support to our client platforms (see here for Android/JS) as well!

For the iOS library that obviously means adding support for the Apple Push Notification Service.

Stay standard!

For receiving APNs push notifications there are no extra APIs introduced. The standard Apple APIs work with the AeroGear UnifiedPush server and the our AeroGear Push SDK. For instance, you can use the existing delegate for receiving remote notifications while the application is running, like:

- (void)application:(UIApplication *)application 
  didReceiveRemoteNotification:(NSDictionary *)userInfo {
    // extract desired value from the dictionary...
}

Device Registration

In order to be able to receive push notifications you need to register the iOS device token with a server. The same is true when using the AeroGear UnifiedPush server. The SDK helps you to perform an easy registration:

- (void)application:(UIApplication *)application
didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {

  AGDeviceRegistration *registration = 
    [[AGDeviceRegistration alloc] initWithServerURL:
     [NSURL URLWithString:@"http://YOUR_SERVER/ag-push/"]];

  [registration registerWithClientInfo:^(id<AGClientDeviceInformation> clientInfo) {

    // required fields
    [clientInfo setDeviceToken:deviceToken];
    [clientInfo setVariantID:@"YOUR IOS VARIANT ID"];
    [clientInfo setVariantSecret:@"YOUR IOS VARIANT SECRET"];

    // --optional config--
    UIDevice *currentDevice = [UIDevice currentDevice];
    [clientInfo setOperatingSystem:[currentDevice systemName]];
    [clientInfo setOsVersion:[currentDevice systemVersion]];
    [clientInfo setDeviceType: [currentDevice model]];
    } success:^() {
      NSLog(@"PushEE registration worked");
    } failure:^(NSError *error) {
      NSLog(@"PushEE registration Error: %@", error);
  }];
}

All you need is simply providing the URL of the UnifiedPush server, the deviceToken, the variantIDand the variantSecret.

In the UnifiedPush server when you create an iOS Variant for a PushApplication, the AdminUI does provide the information about the variantID and the variantSecret:

Xcode Template

Our AeroGear Xcode Template has been updated and supports the new Push SDK as well:

Tutorial

Getting started with the APNs is hard, especially with setting up all the Apple related things, like certificates or provisioning profiles. We have create a tutorial that explains the entire workflow, of using the AeroGear UnifiedPush server and the iOS SDK, explained with a simplified demo application.

Check it out!

Feedback welcome

Reach out to us on IRC or our mailing list. Bugs and feature requests are always welcome in our JIRA instance.

Enjoy !

Posted in aerogear

AeroGear iOS 1.1.0 release

Our little iOS library got a new minior release out! Most important part of this release is removing support for iOS 4.3 and now sticking with iOS 5.x and later. While getting this done, we have also updated the underlying AFNetworking library. We are now on the latest 1.3.1 version.

With version 1.1.0 the library now supports HTTP Authentication for Basic and Digest Access Authentication (RFC 2617), by using an NSURLCredential on the Pipe configuration object:

id tasks =
[pipeline pipe:^(id config) {
  [config setName:@"tasks"];

  [config setCredential:[NSURLCredential
     credentialWithUser:@"username"
	 password:@"passwd"
	 persistence:NSURLCredentialPersistenceNone
  ];

}];

On the AeroGear security side, we made the login function a bit more flexible, by accepting a dictionary, so that the user is able to provide the requested parameter names for password or username:

NSDictionary *credentials =
  @{@"username": @"john", @"password": @"123"};

// the login call
[authModole login:credentials success:^(id object) {
  ...
} failure:^(NSError *error) {
  ...
}];

Besides that a little isEmpty method has been added to the AGStore protocol. Finally, for our unit tests we are now using the OHHTTPStubs, when testing all the HTTP parts of the library.

Out side of the “core” library the Xcode Template has been updated to include our OTP library and an optional flag to choose the AeroGear Security module.

The entire release notes:

  • [AGIOS-4] – Add HTTP basic authentication support on AeroGear iOS
  • [AGIOS-5] – Add HTTP digest authentication support on AeroGear iOS
  • [AGIOS-7] – xcode template: include OTP option
  • [AGIOS-8] – Evaluate ARGenericTableViewController for use in the TODO app.
  • [AGIOS-9] – Further improvements of ios unit and mock testing
  • [AGIOS-10] – Update aerogear-ios-xcode template to include Basic/Digest auth options
  • [AGIOS-30] – Integration Tests: Remove (or update) Twitter Pagination tests
  • [AGIOS-32] – AGStore isEmpty method is missing
  • [AGIOS-34] – Update AeroGear-iOS to iOS5+
  • [AGIOS-35] – Update AuthModule for AG-Security
  • [AGIOS-36] – update xcode template guide to reflect 1.1.0
  • [AGIOS-11] – iOS: Evaluate the OHHTTPStubs project

As always, feedback (mailing list or JIRA) is appreciated!

Have fun!

Posted in aerogear

Attending UIKonf

Yesterday I was in Berlin (always worth to go there) for attending the UIKonf: an iOS developers conference. The location (Heimathafen) was awesome! Pretty good atmosphere, and awesome coffee all day. Yay!

The talk line-up was good as well. They had four rounds of sessions. All in one room, and each round had three sessions, that were scheduled to be 30 minutes: Perfect for getting quickly to the point!

The first session was pretty geeky. Joris Kluivers showed the Core Bluetooth Framework and did fancy things with a Mac, an iPhone and an actual lamp :) The second talk (by Boris Buegling) was about the Objective-C Runtime. He showed common things like introspecting objects/methods or associative references. While talking he mention some of the Github Frameworks, like Mantle or libextobjc as good examples. Daniel Eggert gave a pretty basic overview on CoreData. Being a formal Apple employee he gave some hints regarding performance and optimizations. IMO the most interesting statement was given at the end: Do NOT use NSIncrementalStore.

Afterwards I asked and he explained that using remote/http for CoreData just feels wrong. Indeed, I have been there with AFIncrementalStore too! Generally,… I am not that sure on CoreData…, and it looks like that most attendees were also not fans of CoreData :)

Robb gave a cool presentation about another Github Framework, called Reactive Cocoa, which is an Objective-C framework for Functional Reactive Programming: It provides APIs for composing and transforming streams of values. It’s a nice framework, but not 100% sure we really need to integrate it into the AeroGear-iOS library…

Since I am very interested in testing, I really did enjoy Tim Brueckmann‘s talk on “Testing and iOS”. The talk was common sense, IMO and frameworks like Kiwi (for BDD) or OCUnit got mentioned. One thing I took away was OHHTTPStubs. Currently we have our own “NSURLProtocol” impl, so that may go away :)

Another talk, by Florian Kugler, was on tooling/instruments. He showed how these tools can be used to find memory leaks and other issues with your code. A few talks were on Design and User Interaction. It’s not really my topic, but it was also not that bad :) The last talk given by Peter Steinberg was about tricks in your code, including some impressive reverse engineering.

The afterparty was at the Edelweiss bar/restaurant. With a few cold drinks the discussions continued all night long. Funny fact: a few mentioned their desire for something like generics, which I totally agree with!

For me it was a win, attending the conference. Various chats with folks that are longer doing iOS development was helpful, in kinda understanding that community. Also seeing we are using the right tools and libraries was good :) I think, it was also a bit interesting, that there were no talks on popular frameworks like AFNetworking or CocoaPods.

Thanks to Chris Eidhof et al. for running such a great conference. I will come back :)

Posted in Uncategorized
Follow

Get every new post delivered to your Inbox.

Join 32 other followers