问题
I have used the link below to set up push notifications on Parse:
https://github.com/ParsePlatform/PushTutorial/tree/master/iOS
I'm having a similar problem to the user from this post: Parse Push Notification iOS.
Basically, I set up push notifications and they seemed to be working. However, I couldn't write PFInstallation objects into the Core database, but I could receive push notifications as long as the device token was set to my phone's device token. To try and debug the problem I deleted my app on Parse and I deleted all my certificates and redid the process, and now my test device doesn't even appear in my Core installation objects. I wrote a question earlier (Parse Push Notifications Testing PFInstallation Not Working) but have not gotten an answer to how to upload PFInstallation objects to the Core Installation database in Parse.
One possible solution I found appears in this question: Parse push notification in iphone
Basically, it says to make sure to use the mobile provisioning profile.
In the Parse iOS push tutorial, section 2, step 10 says:
"Add the profile to your "login" keychain by double-clicking on the downloaded file."
However, when I double click on the .mobileprovision file, nothing happens. There's a flash as if something is going to open, but nothing ends up opening. I check the "login" keychain in Keychain Access, and nothing has been added. The default for "Open with" for the file is xCode 7.2. I've tried to open it with Keychain Access, but that's impossible to do for a .mobileprovision file.
Any advice?
Update
Under Build settings, there's a "Provisioning Profile" tab that's set to automatic. The provisioning profile that I created in section 2, step 10 of the tutorial appears as an option in this tab, but when I set it to this provisioning profile and try to run the code, I get the error below:
"Your build settings specify a provisioning profile with the UUID “(my UUID)”, however, no such provisioning profile was found."
回答1:
I finally solved it. I had to go to build settings in both my app and my target and change "Provisioning Profiles" to the .mobileprovision file.
After doing this, I got the error message: "Your build settings specify a provisioning profile with the UUID “(my UUID)”, however, no such provisioning profile was found."
But nothing was wrong. All I had to do was quit Xcode and restart the app, as was suggested in one of the answers on this post: Xcode 5: "No such provisioning profile was found ..." error
来源:https://stackoverflow.com/questions/34728888/mobileprovision-file-is-not-added-to-keychain-access-when-double-clicked-for-pa