Push Notifications for iOS
The source code is provided. The video is in Spanish, but Luis Felipe is paging through the source code in a very nice manner, so it's easy to follow along.
Super cool, Luis Felipe! :)
Enjoy!

Comments
-
Charles Stack Saturday, 11 May 2013
Hello Anders,
I am at wits end. I can not get past the error indicating no apns entitlements.
If I try to change the ApplePushDemo.entitlements file and add the keys as demonstrated, they are always overwritten BEFORE deployment to my device. How can I stop this behavior!
Also, if we our own provisioning profiles with the aps entitlement, how do we configure things so that we can use this provisioning profile?
Thanks for your help! -
Anders Ohlsson Monday, 13 May 2013
Charles, since the IDE is maintaining that particular file, and there's no way to set APN entitlements in the IDE, I created my own Anders.entitlements.
In the Deployment tab - uncheck the old one. Deploy the new one to Entitlements.plist.
Also - pay very careful attention to the file contents. If you have any CR (as in CR/LF) in your file you will get XML errors out of the code signing process. Best is to create and edit this file on the Mac side and then stick it back on your Windows machine for deployment.
Hope that helps -
Charles Stack Monday, 13 May 2013
Is there something else we need to do to get our provisioning profile to work?
What settings should we be using to compile? Debug, Ad-Hoc?
What specific entitlements should be set?
I have aps-environment, application-identifier, and get-task, keychain-access-groups (and associated values).
The provisioning profile IS already on my device...I don't see how to get that to carry over.
Will the ability to create and maintain the entitlements be forthcoming an update? -
Both Debug and Ad-Hoc should work. I've only tried Debug in this particular case. If the provisioning profile is already on the device, you're good. Your entitlements look OK, assuming they are formatted correctly.
I'm assuming that you created a new provisioning profile that you added APN to, or that you added APN to an existing profile (which you "dirtied" in some way) and downloaded a fresh copy of it.
If this doesn't help, then I need to know EXACTLY what error condition you're seeing and where.
Note: APN isn't actually supported by XE4, but I'll do my best.
PS: I can't answer the entitlement editor question at this time. -
Charles Stack Monday, 13 May 2013
How do I specify the correct provisioning file when my Target is iOS Device - Debug?
I know the provisioning file is good as app written in Objective C works perfectly, so I have to assume it has something to do with the code signing process and/or entitlements.
The other day, I managed to get the code to register with APNS and receive a token. But, I have been unable to replicate it since. And, even then, it would not receive the APNS sent.
Could I inspire you to provide more detailed information on the process of debugging an iOS app that has a provisioning profile? :-) -
Torje Rørvik Wednesday, 22 May 2013
Hello Anders,
Can you please explain "In the Deployment tab - uncheck the old one. Deploy the new one to Entitlements.plist." more detailed?
Do you mean; add the file xxx.entitlements and then change the value of the "Remote name"-field to Entitlements.plist?
It would have been great if you also could post which other changes we have to make before this demo will work. As I understand it, I will also have to change the values in Project->Options->Version info? -
Charles Stack Thursday, 23 May 2013
Torje,
Anders has been trying to help. This AM, I managed to get the app to register for APNS. But, it's still not receiving my messages (I know my sender works).
I did see that the CFBundleName and CFBundleIdentifer had to be set in the demo. And, it looks like the aps-environmentdevelopment needs to also be set.
What isn't clear is whether the application-identifieryour app id also needs to be set. I suspect it does.
Make sure you don't have CRLF's in your entitlement file.
In Deploy, you need to uncheck the .Entitlements entry and then supply your own with a file of a different name. The remote does need to Entitlements.plist, though.
I would suggest editing the Entitlements file on your mac and copying it back to be sure it's in the right format.
That's as far as I have gotten. -
Torje Rørvik Thursday, 23 May 2013
Hello Charles,
Thanks for your help.
But I still do not understand how to deploy the new entitlements file :-)
The original file, that I am supposed to Uncheck, is named "IOSDevice\Debug\ApplePushRemote.Entitlements" with the
remote name of "Entitlements.plist".
This file does not exist in the source code from Luis, and I guess it will be generated the first time you compile the project.
His file is called "Prueba.entitlements", and I guess this is the file that I am supposed to make a copy of and load in to the deployment window.
Will this new file then become ApplePushRemote.Entitlements the first time I compile?
If so; Why do I need to UnCheck the "AppPushRemote.Entitlements" in the first place?
If not; Where is the link between Prueba and AppPushRemote.Entitlements? I can't find any settings or properties which indicate those two files are the same.
(I have even had someone to translate his video for me, but it didn't help..) -
I hope this blog post will help - http://blogs.embarcadero.com/ao/2013/05/24/39472
I tried to catch and cover all the questions you had. -
If you need a ready-made push messaging solution please visit http://www.littlepostman.com. It's cross-platform and very easy to integrate.
-
Please login first in order for you to submit comments
- Page :
- 1
Hello Anders,
I'm trying XE4.
I can successfully run my "Hello World XE4" app on simulator.
When trying to deploy to device, I get error [DCC Error] E2597 ld: warning: directory not found for option '-FC:\Users\admin\Documents\RAD Studio\SDKs\commandlinetools.sdk\System\Library\PrivateFrameworks'
Have you encountered this error message before? Any tips?