Friday, 30 October 2015

Trouble creating an Apple Push Notification Certificate

Today we were updating our Apple push notification certificate as it was due to expire (why do they only last a year). We've done this many times before and know the process well; but for some reason today after deploying the updated certificate every call to create the PushSharp instance returned the following error:

The specified network password is not correct

We went through the standard process of repeating the creation / deployment of the certificate, then double / triple checking and then repeating the creation process again but nothing improved the situation - the same error message was returned all the time. We tried different passwords / double checked eveything in the Apple developer portal. We cleared the historic and new entries in the KeyChain, tried new .cer certificates / private keys, nothing resolved the issue.

As we'd exhausted every option we could think of, we just tried the process on another machine.....just to see......it worked first time! At the current time we think the issue was caused by a particular machine. Now that we're able to send push notifications again we will have to investigate it further. We did have "show password" ticked when exporting to the P12 file, I've noticed when that is ticked that the password strength indicator no longer works, I wonder if there's an issue around that? If we get to the bottom of the issue then I'll post an update.

Sunday, 24 May 2015

Getting back into Android development

After learning both iOS and Android development about 18 months ago we've not really had many enhancements needed in our mobile applications, with any changes just needing our existing knowledge. In reality this has probably meant my knowledge has actually decayed; which is a shame given the challenge of intially learning mobile development we went through. To try and remedy this; as a side project I'm looking to rebuild our existing application from scratch with an updated UI. Our current application is built using Eclipse and has a standardised screen for all format which only works in portrait mode. So as part of this work I want to "improve" the UI so it makes use of the additional real estate of larger screens and landscape mode. I also want to see how Android studio works to see if it is worth porting the application across and making that our standard Android IDE.

It's always fun starting out with a new, empty project. Typically you do hope that everything will just work, which wasn't the case this time around. Opening the new project displayed 3 errors; the first two were that the project requires Java 7 to be installed and that it should be compiled against JDK7. As I already had Java 8 installed; I did a quick dig around (a Google search) and found the following Stack Overflow article. So updated the path and that resolved the first errors. The next error occurred when trying to view the activity; which failed with an error "java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable". Again looking online I found this Stack Overflow article which solved the problem, for some reason the view wouldn't render when set to be the most recent API; backing it down sorted out the problems.

So now the project compiles and deploys to my device, let the fun begin.