Debugging APNS certificates

aps-environment

I've just spent sometime debugging an interesting issue with push notifications in our TMCS iPhone App.

Apple informed me they would not approve the latest version (1.5.0) of the application as it "had a bug". The bug was the app was failing to prompt the user to allow push notifications. Which was very strange as it was working fine on all three of my test devices.

After pulling my hair out trying to debug code which I knew worked fine I decided to recreate the distribution provisioning profile (xxx.mobileprovision) via iOS Provisioning Portal.

Distribution Provisioning Files
Once the new profile was recompiled into the binary (app) everything started working fine.

The reason it didn't originally work was because I enabled push notifications after creating the original distribution profiles; therefore the profile did not have the push notification key within it; however the Development profile did have the key which is why it worked on my three development devices.

For future reference you can check the .mobileprovision file by opening it with a text editor and looking for the key aps-environment.

 

aps-environment

Related Posts

About the Author

Written by Matt Takhar

Matt has a background in engineering and has 15+ years of IT experience. He has been working with SharePoint since 2006. In 2007 he attended a 6 day SharePoint boot camp by Firebrand training, and joined the Taylor Made team. He passed the WSS 3.0 and MOSS 2007 exams and which makes him a Microsoft Technical Specialist in SharePoint. Since 2007 he has been specialising in delivering SharePoint solutions and in 2009 he changed roles to Software Development Manager, where his team specialises in developing SharePoint and Project Server based solutions amoungts many other technologies.

Comments

No comments.

Leave a comment

Your email is never published nor shared. Required fields are marked *

*

You may use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>