<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi<div><br></div><div>tested locally the branch, and I was able to send messages using both 'DEV' and 'DIST' profiles.</div><div><br></div><div>+1</div><div><br></div><div>Thanks</div><div>Christos</div><div><br></div><div><br></div><div><div><div>On Jul 18, 2013, at 9:30 AM, Matthias Wessendorf &lt;<a href="mailto:matzew@apache.org">matzew@apache.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hi&nbsp;<div><br></div><div>here is a different branch:</div><div><a href="https://github.com/aerogear/aerogear-unified-push-server/tree/ProductionCertFlag">https://github.com/aerogear/aerogear-unified-push-server/tree/ProductionCertFlag</a><br>
</div><div><br></div><div>it allows only one CERT/PASS per variant. So for "Production" and for "Test" you basically create a separate variant.</div><div><br></div><div>Apple Requirements:</div><div>
* iOS Distribution certificate (for your Apple developer ID/account)</div><div>* iOS Development certificate (for your&nbsp;Apple&nbsp;developer ID/account)</div><div><br></div><div>* Make sure both Dist/Dev SSL certs are enabled (on the actual APP ID). Download and export BOTH, similar to:</div>
<div><a href="http://staging.aerogear.org/docs/guides/aerogear-push-ios/app-id-ssl-certificate-apns/">http://staging.aerogear.org/docs/guides/aerogear-push-ios/app-id-ssl-certificate-apns/</a><br></div><div><br></div><div>
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.</div><div><br></div><div>I have update the "register iOS Variant" dec:</div>
<div><a href="https://github.com/aerogear/aerogear-unified-push-server/tree/ProductionCertFlag#ios-variant">https://github.com/aerogear/aerogear-unified-push-server/tree/ProductionCertFlag#ios-variant</a><br></div><div><br>
</div><div>"Running the different profiles":</div><div><br></div><div>* update the iOS code to reflect the DEV variantID/secret, and run the device with the MATCHING signing&nbsp;identity("Development" for your app-id)&nbsp;=&gt; This registers your DEV token, for the app/device, with our UP server</div>
<div><br></div><div>*send a message.&nbsp;</div><div>* stop the app</div><div><br></div><div><div>* 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) =&gt; This registers your DIST token, for the app/device, with our UP server (Note the token here is DIFFERENT)</div>
</div><div><br></div><div><div>*send a message.&nbsp;</div><div><br></div></div><div><br></div><div><br></div><div>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.</div>
<div><br></div><div>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...</div>
<div><br></div><div><br></div><div><br></div><div>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)</div>
<div>&nbsp;</div><div>-Matthias<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 10, 2013 at 6:24 PM, Yavuz Selim YILMAZ <span dir="ltr">&lt;<a href="mailto:yavuzsel@buffalo.edu" target="_blank">yavuzsel@buffalo.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">Hi all,<div><br></div><div>
I'm trying out the ProdCerts branch on aerogear-unified-push-server to enable AeroGear powered push notifications on my production iOS application.</div><div><br></div><div>When I am trying to add an iOS variant, I am getting:</div>
<div><br></div><div>HTTP/1.1 400 Bad Request</div><div>…</div><div>The request sent by the client was syntactically incorrect ().</div><div>…</div><div><br></div><div>The curl command I am using is here:</div><div><br></div>
<div>$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 <a href="http://localhost:8080/ag-push/rest/applications/8055d0a9-ed30-463c-9ac3-baf8cee39ebc/iOS" target="_blank">http://localhost:8080/ag-push/rest/applications/8055d0a9-ed30-463c-9ac3-baf8cee39ebc/iOS</a></div>
<div><br></div><div>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:</div>
<div><br></div><div>$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 <a href="http://localhost:8080/ag-push/rest/applications/688d0fe1-4cc2-4606-ab10-09660620b483/iOS" target="_blank">http://localhost:8080/ag-push/rest/applications/688d0fe1-4cc2-4606-ab10-09660620b483/iOS</a></div>
<div><br></div><div>Any ideas why I might be getting this error, or any suggestions/directions are most appreciated.</div><div><br></div><div>Kind regards,</div><div><div>
<div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
<br>---</div><div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
Yavuz Selim Yilmaz</div><div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
SUNY at Buffalo</div><div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
Computer Science and Engineering</div><div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
PhD Candidate</div>
</div>
<br></div></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Matthias Wessendorf <br>
<br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
</div></div></div>
_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/aerogear-dev</blockquote></div><br></div></body></html>