Figure 10-12. For now, do not enter a password on this screen; just click OK. in Objective-C

Generator QR Code in Objective-C Figure 10-12. For now, do not enter a password on this screen; just click OK.

Figure 10-12. For now, do not enter a password on this screen; just click OK.
QR Code JIS X 0510 Creator In Objective-C
Using Barcode generation for iPhone Control to generate, create QR Code image in iPhone applications.
www.OnBarcode.com
Data Matrix ECC200 Encoder In Objective-C
Using Barcode printer for iPhone Control to generate, create ECC200 image in iPhone applications.
www.OnBarcode.com
Next, you are the prompted for your login password to authorize the export. Enter the password you use to log in to your machine here (you do use a password to log in to your machine, yes ), as shown in Figure 10-13.
Printing ANSI/AIM Code 128 In Objective-C
Using Barcode printer for iPhone Control to generate, create Code128 image in iPhone applications.
www.OnBarcode.com
Draw USS Code 39 In Objective-C
Using Barcode creation for iPhone Control to generate, create ANSI/AIM Code 39 image in iPhone applications.
www.OnBarcode.com
CHAPTER 10: Demystiying Apple s Push Notification Service
Quick Response Code Printer In Objective-C
Using Barcode creation for iPhone Control to generate, create QR Code JIS X 0510 image in iPhone applications.
www.OnBarcode.com
Barcode Encoder In Objective-C
Using Barcode generation for iPhone Control to generate, create Barcode image in iPhone applications.
www.OnBarcode.com
Figure 10-13. Your login password gets entered here, just to authorize the export.
Barcode Creation In Objective-C
Using Barcode generation for iPhone Control to generate, create Barcode image in iPhone applications.
www.OnBarcode.com
GS1 - 8 Creation In Objective-C
Using Barcode maker for iPhone Control to generate, create EAN-8 Supplement 2 Add-On image in iPhone applications.
www.OnBarcode.com
Your password is not being added to the certificate; it is only being used to authorize the export of the APNS certificate, which is sensitive data and should be protected from disclosure. Click Allow to authorize this for this one time only. You should now have this sensitive file on your desktop. It is sensitive because it contains the private key that you created earlier that uniquely identifies you to Apple to authorize notifications. You now need to take one more step on this file to get it ready for use on the server, and that s to convert it from the .p12 format to the .pem format. (PEM stands for Privacy Enhanced Mode.) This is not hard but does require you to make a trip into the Terminal.app file. From the Terminal prompt, you ll need to navigate to where the .p12 file lives. You last left it on the desktop, so enter cd ~/Desktop to navigate to your desktop. Then, enter the following command, as shown in Figure 10-14:
QR Code ISO/IEC18004 Generation In .NET
Using Barcode maker for ASP.NET Control to generate, create Denso QR Bar Code image in ASP.NET applications.
www.OnBarcode.com
QR Code 2d Barcode Creation In None
Using Barcode drawer for Online Control to generate, create QR Code image in Online applications.
www.OnBarcode.com
openssl pkcs12 -in 2Push2-Dev-Cert.p12 -out 2push2-dev-cert.pem \ -nodes -clcerts
Recognizing Code 3 Of 9 In Visual Studio .NET
Using Barcode recognizer for VS .NET Control to read, scan read, scan image in .NET framework applications.
www.OnBarcode.com
UCC - 12 Printer In .NET
Using Barcode drawer for ASP.NET Control to generate, create Universal Product Code version A image in ASP.NET applications.
www.OnBarcode.com
When it asks you to enter the import password, enter nothing. Instead, simply hit Return.
GS1-128 Encoder In Java
Using Barcode drawer for Java Control to generate, create USS-128 image in Java applications.
www.OnBarcode.com
Code 128 Code Set A Maker In Visual Basic .NET
Using Barcode encoder for .NET Control to generate, create Code 128B image in .NET applications.
www.OnBarcode.com
Figure 10-14. Convert the .p12 file to a .pem file for the server using openssl on the command line
Barcode Scanner In Java
Using Barcode Control SDK for BIRT Control to generate, create, read, scan barcode image in BIRT applications.
www.OnBarcode.com
Decoding QR Code 2d Barcode In Java
Using Barcode scanner for Java Control to read, scan read, scan image in Java applications.
www.OnBarcode.com
I named the output file 2push2-dev-cert.pem to help keep track of what it is. You may want to shorten the name.
GTIN - 13 Generator In None
Using Barcode generation for Office Word Control to generate, create EAN13 image in Office Word applications.
www.OnBarcode.com
PDF-417 2d Barcode Drawer In Visual Studio .NET
Using Barcode creator for Reporting Service Control to generate, create PDF-417 2d barcode image in Reporting Service applications.
www.OnBarcode.com
CHAPTER 10: Demystiying Apple s Push Notification Service
Scan Code 39 Extended In None
Using Barcode recognizer for Software Control to read, scan read, scan image in Software applications.
www.OnBarcode.com
UPC - 13 Reader In None
Using Barcode recognizer for Software Control to read, scan read, scan image in Software applications.
www.OnBarcode.com
Note that the resulting file is extremely sensitive and should be protected from disclosure. Keep the .pem file handy, because you ll use it again during step 3.
Back to the Portal
OK, you re not quite done yet; you need to go back to the Apple program portal and create one more file. Click the Provisioning link in the left column, which will take you to your Development Provisioning Profiles list, as shown in Figure 10-15.
Figure 10-15. The Development Provisioning Profiles list in the program portal
Click New Profile. Enter a useful profile name, choose your development certificate, select the app ID you created earlier, and select the devices on which you want to be able to do development of this application, as shown in Figure 10-16.
CHAPTER 10: Demystiying Apple s Push Notification Service
Figure 10-16. Set up the certificate, app ID, and devices for the development provisioning profile.
NOTE: Once you use a device for APNS development, it is locked into push development mode. Switching back to Distribution (that is, ad hoc) mode may require a restore of the device. If you search Apple s iPhone Developer Forums about this topic, you ll find plenty of discussion. Some have reported that you can simply run an app that you got from the App Store that is in distribution mode to switch your device. Your mileage may vary. Submit the new provisioning profile setup, and wait for a moment while it s generated; then download your new mobileprovision file. In this case, it s called 2Push2DevAPNS.mobileprovision.
Add the Mobile Provisioning File for Code Signing
Double-click that file. Xcode will open, and the file will appear in the mobileprovision files list. You may want to quit and restart Xcode immediately after this step, just to make sure that it takes the file and recognizes it before the next step. Next, go back to your iPhone client application, 2push2.xcodeproj, and open the target settings (click the target in the left list, and then click the big blue i button at the top of the screen). In the inspector window that opens, choose the Build tab at the top. Select your mobileprovisioning file that you just created, as shown in Figure 10-17.
CHAPTER 10: Demystiying Apple s Push Notification Service
Figure 10-17. Selecting the new code-signing identity in Xcode in the Targets Info Build pane.
If it s there but not selectable, double-check to make sure that the app ID matches your bundle ID under the Properties pane of the same Target Info inspector window. Build and run your app, and you should see two juicy bits. The first is that the device token is now appearing in your console log output:
2009-07-26 22:56:57.840 2Push2[3272:207] didRegisterForRemoteNotificationsWithDeviceToken:<7c8f50b4 51ef62e1 6c068b42 b3425e47 839be4c6 5aeac1cd db0ede0f 85467304>
The second is that your application should have prompted the user to allow push notifications, as shown in Figure 10-18.
Copyright © OnBarcode.com . All rights reserved.