<div dir="ltr">Hi <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 &quot;Production&quot; and for &quot;Test&quot; you basically create a separate variant.</div><div><br></div><div>Apple Requirements:</div><div><div>
* iOS Distribution certificate (for your Apple developer ID/account)</div></div><div><div>* iOS Development certificate (for your Apple developer ID/account)</div></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 &quot;profile&quot; (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 &quot;register iOS Variant&quot; 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>&quot;Running the different profiles&quot;:</div><div><br></div><div>* update the iOS code to reflect the DEV variantID/secret, and run the device with the MATCHING signing identity(&quot;Development&quot; for your app-id) =&gt; This registers your DEV token, for the app/device, with our UP server</div>
<div><br></div><div>*send a message. </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(&quot;Distribution&quot; 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. </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 &quot;staging&quot; 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 &quot;filter&quot; by variantID, so that (instead of broadcast) you can just send &quot;test messages&quot; to the test variant ( this &quot;feature&quot; was already discussed on a separate thread, for different reasons but comes handy here too)</div>
<div> </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&#39;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 &quot;Accept: application/json&quot; -H &quot;Content-type: multipart/form-data&quot; -F &quot;developmentCertificate=@/Users/yavuz/Documents/Certificates.p12&quot; -F &quot;developmentPassphrase=pass&quot; -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 &quot;Accept: application/json&quot; -H &quot;Content-type: multipart/form-data&quot; -F &quot;certificate=@/Users/yavuz/Documents/Certificates.p12&quot; -F &quot;passphrase=pass&quot; -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>