[aerogear-dev] New branch for Prod/Dev Certs (was: Re: [aerogear-unified-push-server] Problem with ProdCerts branch iOS variant addition)
Christos Vasilakis
cvasilak at gmail.com
Thu Jul 18 07:17:29 EDT 2013
Hi
tested locally the branch, and I was able to send messages using both 'DEV' and 'DIST' profiles.
+1
Thanks
Christos
On Jul 18, 2013, at 9:30 AM, Matthias Wessendorf <matzew at apache.org> wrote:
> Hi
>
> here is a different branch:
> https://github.com/aerogear/aerogear-unified-push-server/tree/ProductionCertFlag
>
> it allows only one CERT/PASS per variant. So for "Production" and for "Test" you basically create a separate variant.
>
> Apple Requirements:
> * iOS Distribution certificate (for your Apple developer ID/account)
> * iOS Development certificate (for your Apple developer ID/account)
>
> * Make sure both Dist/Dev SSL certs are enabled (on the actual APP ID). Download and export BOTH, similar to:
> http://staging.aerogear.org/docs/guides/aerogear-push-ios/app-id-ssl-certificate-apns/
>
> For each "profile" (DEV and DIST) you need a separate Provisioning file, to be downloaded from the Apple Provisioning Portal. Import them to Xcode and your iOS device.
>
> I have update the "register iOS Variant" dec:
> https://github.com/aerogear/aerogear-unified-push-server/tree/ProductionCertFlag#ios-variant
>
> "Running the different profiles":
>
> * update the iOS code to reflect the DEV variantID/secret, and run the device with the MATCHING signing identity("Development" for your app-id) => This registers your DEV token, for the app/device, with our UP server
>
> *send a message.
> * stop the app
>
> * Now, update the iOS code to reflect the DIST variantID/secret, and re-run the device with the MATCHING signing identity("Distribution" for your app-id) => This registers your DIST token, for the app/device, with our UP server (Note the token here is DIFFERENT)
>
> *send a message.
>
>
>
> Here, we now have the test tokens in a separate variant, so only TEST tokens are send to the Apple Sandbox Server, and only DIST tokens are send to the Prod Server of Apple.
>
> Before we were sending both token types (TEST and DIST) to the TEST or DIST server (based on the "staging" value in the payload. This does not work with APNs: No messages are delivered...
>
>
>
> NExt: I am now working on a "filter" by variantID, so that (instead of broadcast) you can just send "test messages" to the test variant ( this "feature" was already discussed on a separate thread, for different reasons but comes handy here too)
>
> -Matthias
>
>
> On Wed, Jul 10, 2013 at 6:24 PM, Yavuz Selim YILMAZ <yavuzsel at buffalo.edu> wrote:
> Hi all,
>
> I'm trying out the ProdCerts branch on aerogear-unified-push-server to enable AeroGear powered push notifications on my production iOS application.
>
> When I am trying to add an iOS variant, I am getting:
>
> HTTP/1.1 400 Bad Request
> …
> The request sent by the client was syntactically incorrect ().
> …
>
> The curl command I am using is here:
>
> $curl -i -b cookies.txt -c cookies.txt -H "Accept: application/json" -H "Content-type: multipart/form-data" -F "developmentCertificate=@/Users/yavuz/Documents/Certificates.p12" -F "developmentPassphrase=pass" -X POST http://localhost:8080/ag-push/rest/applications/8055d0a9-ed30-463c-9ac3-baf8cee39ebc/iOS
>
> As far as I could see, Bad Request is returned if developmentCertificate and/or developmentPassphrase is null (in my case, productionCertificate/Passphrase are already null). Therefore, in order to make sure my Certificates.p12 does not read null , I switched to master branch, and executed the following command successfully and add my variant:
>
> $curl -i -b cookies.txt -c cookies.txt -H "Accept: application/json" -H "Content-type: multipart/form-data" -F "certificate=@/Users/yavuz/Documents/Certificates.p12" -F "passphrase=pass" -X POST http://localhost:8080/ag-push/rest/applications/688d0fe1-4cc2-4606-ab10-09660620b483/iOS
>
> Any ideas why I might be getting this error, or any suggestions/directions are most appreciated.
>
> Kind regards,
>
> ---
> Yavuz Selim Yilmaz
> SUNY at Buffalo
> Computer Science and Engineering
> PhD Candidate
>
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at 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
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20130718/2bd8912a/attachment.html
More information about the aerogear-dev
mailing list