_______________________________________________On Thu, Jun 27, 2013 at 7:38 AM, Matthias Wessendorf <matzew@apache.org> wrote:
Hi,yes. There is a security branch:Please update your Podfile, like this:pod 'AeroGearPush', :git => 'https://github.com/matzew/aerogear-push-ios-registration.git', :branch => 'security'
and run "pod update" afterwards :-)When you register the iOS Variant, it gives you a variantID and a secret. In your iOS, you need to set that (like you are already doing):...
[clientInfo setMobileVariantID:@"some_id"];
[clientInfo setMobileVariantSecret:@"some_secret"];
...Greetings,MatthiasOn Thu, Jun 27, 2013 at 1:02 AM, Yavuz Selim YILMAZ <yavuzsel@buffalo.edu> wrote:
_______________________________________________Hi all,After registering an application and iOS variant on my push server following the instructions on https://github.com/aerogear/aerogear-unified-push-server, I am implementing the following method on my iOS client:// Here we need to register this "Mobile Variant Instance"- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {// we init our "Registration helper:AGDeviceRegistration *registration =// WARNING: make sure, you start JBoss with the -b 0.0.0.0 option, to bind on all interfaces// from the iPhone, you can NOT use localhost :)[[AGDeviceRegistration alloc] initWithServerURL:[NSURL URLWithString:@"http://10.193.23.8:8080/pushee/"]];[registration registerWithClientInfo:^(id<AGClientDeviceInformation> clientInfo) {// Use the Mobile Variant ID, from your register iOS Variant//// This ID was received when performing the HTTP-based registration// with the PushEE server:[clientInfo setMobileVariantID:@"MY_VARIANT_ID"];// apply the token, to identify THIS device[clientInfo setDeviceToken:deviceToken];
// --optional config--// set some 'useful' hardware information paramsUIDevice *currentDevice = [UIDevice currentDevice];[clientInfo setOperatingSystem:[currentDevice systemName]];[clientInfo setOsVersion:[currentDevice systemVersion]];[clientInfo setDeviceType: [currentDevice model]];} success:^() {//} failure:^(NSError *error) {// did receive an HTTP error from the PushEE server ???// Let's log it for now:NSLog(@"PushEE registration Error: %@", error);}];}The registerWithClientInfo call fails with this error:PushEE registration Error: Error Domain=AFNetworkingErrorDomain Code=-1011 "Expected status code in (200-299), got 401" UserInfo=0x1d5522b0 {NSLocalizedRecoverySuggestion=Unauthorized Request, AFNetworkingOperationFailingURLRequestErrorKey=<NSMutableURLRequest http://10.193.23.8:8080/pushee/rest/registry/device>, NSErrorFailingURLKey=http://10.193.23.8:8080/pushee/rest/registry/device, NSLocalizedDescription=Expected status code in (200-299), got 401, AFNetworkingOperationFailingURLResponseErrorKey=<NSHTTPURLResponse: 0x1d549310>}Do you have any idea/suggestion to solve my problem? Your help is appreciated.Thanks and regards,
---Yavuz Selim YilmazSUNY at BuffaloComputer Science and EngineeringPhD Candidate
aerogear-dev mailing list
aerogear-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-dev
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
aerogear-dev mailing list
aerogear-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-dev