Current location - Quotes Website - Signature design - Xcode support file?
Xcode support file?
Before we begin, let's start this wonderful tutorial by creating an SSL certificate from the AppleDeveloper website, which associates AppID with the development provisioning profile. Then, let's take a look at how to configure Parseapp on Parsewebsite under iOS. Finally, we put these theories into practice and create an App with push function to push messages to users. Before starting this wonderful journey, everyone must note that the iOS emulator does not support push, so you must try to find the real machine. There is also an Apple developer agreement that can be developed and tested on a real machine. To create an SSL certificate, you need to create an AppID and an associated SSL certificate on the Apple developer website. With this certificate, the resolution server can find your AppID and then push the notification to the application. To create a certificate request, first we need to have a certificate signing request file, and then it makes sense to create an SSL certificate. The method of creating files is as follows: 1. Run keychain on Mac 2. Select keychain access >; Certificate assistant > requests a certificate from a certification authority. 3. Enter your name and email address. By default, CA email address will be fine. Don't try to make any changes. 4. Select "Save to Hard Disk" to download the newly created certificate application file to the computer desktop. Create and optimize AppID. Each iOS program installed on a developer's device requires a unique AppID. For convenience, AppID is named after the reverse path rule, which looks like com.parseSampleApp, but it must be noted that AppID cannot contain an asterisk ("*"). The creation steps are as follows: 1. Log on to the website AppleDeveloperMemberCenter, and enter the iOSProvisioningPortal. 2. Click AppIDs in the left column. 3. Select NewAppID, and then create a new AppID. Make sure there are no asterisks in the BundleIdentifier column. 4. find Configure under your AppID and select it. 5. Check "Enable for applebushnotification Service", and then click "Configure" under DevelopmentPushSSLCertificate, and the setup wizard of applebushnotification Service Authentication Assistant will appear. 6. Click Continue to continue, then click Select File and select. The certSigningRequest file you just created. 7. Click Generate to start generating, and then click Download to download the generated SSL certificate. 8. Install the downloaded SSL certificate through the keychain program. 9. Next, in the "My Certificate" option, find the certificate named "Apple de development software services: XXX" just installed. 10. Double-click the certificate and select Export. The exported file extension is named p 12. Pay attention at this time! Do not add anything when the password prompt appears. It is worth noting that we only started the push notification function of the application in development mode, so before the application is officially released, we must remember to go through the process from step 4 to step 9 again, and change the "DevelopmentPushSSLCertificate" in step 5 to "ProductionPushSSLCertificate". This is perfect. Creating a ProvisioningProfile can verify the device running the developed application. Whether you create a new AppID or modify an existing AppID, you must regenerate and install the ProvisioningProfile again. The steps are as follows: 1. Select provisioning transition in IOSPR provisioning portal. 2. Click New Profile 3. Fill in the corresponding information to ensure that there are no omissions in the three items (developercertificate, AppID just created above and equipment used for testing), and all of them are selected. 4. Click the "Download" button under the "Operation" column to download the generated ProvisioningProfile. 5. Double-click the downloaded file. By default, the file is opened by the iPhoneConfigurationUtility program. To configure ParseApp to use the parsing function in push notifications, you must set this function to on, and then upload the push SSL certificate created above. The steps are as follows: 1. Find your Parseapp on Parsewebsite and select the Settings tab. 2. Under iOSPushNotificationSettings, click Select File, and then upload the p 12 file that was previously exported using keychain. 3. If we want users to send push notifications, we need to set Clientpushenabled? Select Yes in the options. This function is very useful for instant chat and other software. Let's check it now. Of course, developers need to decide whether to turn this feature on or not. 4. Click Save to save. At this point, all the prerequisites have been completed, and we will immediately enter the most exciting part of creating a push notification application, have a drink and start acting. To create an application with push notification, we need to make some settings for the Xcode project to ensure that AppID and provisioningprofile are set to a good state. Do you want to develop? 1. select ProjectName-Info.plist in the SupportingFiles folder, and modify the BundleIdentifier option in the right view, which is consistent with the AppID created by yourself (form: com.parseSampleApp). 2. Select the newly created project file from the menu on the left, find BuildSettings below and search for CodeSigningIdentity. 3. Set all values corresponding to provisioningprofile. 4. Select the project name under Targets on the left, find BuildSettings again, and go to the CodeSigningIdentity area to ensure that all values are consistent with the new provisioningprofile.