This is an Articles topic on RemObjects SDK for Xcode
Feel free to add your notes to this topic below.
We have just published a full implementation for providing Push Notifications (APS) support for iPhone clients using RemObjects SDK, with minimal work required.
The current implementation is provided for servers written in .NET, although it should be easily adaptable to serve as a reference for implementing a similar functionality for RO/Delphi.
What are Push Notifications?
To conserve battery power, as well as reduce CPU load and network traffic, iPhone does not allow applications to stay active in the background and keep communicating with servers. This makes traditional approaches for real-time notifications, such as RemObjects SDK’s event sinks unfeasible, but is an understandable limitation given that users expect their iPhone batteries to last a long time and want to keep a tab on (sometimes metered) network traffic.
In exchange, Apple provides so called Apple Push Services (APS) that provide a unified approach for all applications on the device to receive notifications while they are not running.
Details about how APS works can be found in Apple’s documentation in the iPhone SDK (link), but basically, the system works by iPhone applications registering a device token with their servers (that’s the server you, the application author, is providing), and the server then dispatching notification messages through infrastructure provided by Apple. Apple’s servers will consolidate notifications received from all the different sources (yours and others) and send them to the devices .
What follows is a brief guide to working with Notifications in Cocoa. I’ll cover the basics, including registering an observer and posting notifications, just enough to start using notifications in your iPhone apps.
There is an instance of NSNotificationCenter available to every running iPhone application. This class acts as an intermediary to facilitate communication between objects that are interested in being notified at some point in the future (these objects are known as the observers) and a poster that posts to the notification center, resulting in all observers (registered for a specific notification) being called.
To give you an idea of where you might use notifications, consider how you might handle downloading of data in a background thread. I recently used notifications in this scenario as I wanted to be notified when a web-service call completed. Upon receiving a notification, I then proceeded to populate a view with the data retrieved, or with an error message if the data access failed.
This is a guest post by Sean Berry, a mod on the forums and the developer of Algebra Touch.
Me Gusta Localization!
Although the English-speaking App Store market is the largest, there are still plenty of other iPhone users in the world and you can greatly increase their user experience by supporting their native language.
The good news is Apple has made it very easy to make your apps work with multiple languages through some API calls and built-in Xcode support. The process of doing this is called localization, and that’s what I’ll be showing you how to do!
In this tutorial, you will be localizing a sample app I prepared called iLikeIt which was inspired by the rage comics in Ray’s post about in-app purchases. The app is very simple – when you tap ‘You like?’ a face appears, scales up, and fades away.
But right now it’s English only – so vamos a traducir!
This tutorial will be using Xcode 4, so if you haven’t upgraded already, why not use this as an excuse to do so?
This is a post by iOS Tutorial Team member Cesare Rocchi, a UX designer and developer specializing in web and mobile applications.
Develop a socket-based iPhone app and server!
Many iOS apps use HTTP to communicate to a web server, because it’s easy, convenient, and well-supported.
However, in some cases you might find the need to go a bit lower level than HTTP, and communicate using TCP sockets to your own custom server.
The advantages of doing this are several:
- You can send just the exact data you need to send – making your protocol lean and efficient.
- You can send connected clients data whenever you want, rather than requiring the clients to poll.
- You can write socket servers without a dependency of a web server, and can write in the language of your choice.
- Sometimes you just have to use sockets, if you are connecting to a legacy server!
In this tutorial, you’ll get some hands-on experience writing an iPhone app that communicates to a TCP socket server using NSStream/CFStream. Also, you’ll write a simple socket server for it to connect to, using Python!
The iPhone app and chat server will implement chat functionality, so you can chat between multiple devices in real-time!
This tutorial assumes you have a basic familiarity with Python and iOS programming. If you are new to Python programming, check out the official Python tutorial. If you are new to iOS programming, check out some of the iOS tutorials on this site first.
Without further ado, let’s do some socket programming!
As an iOS developer, you often need to use a web service from your app.
Sometimes you need to use a web service that someone else has written, and sometimes you need to use one of your own!
In this tutorial, you’ll get hands-one experience with using web services, by writing an iOS app that communicates with a simple web service that allows you to redeem promo codes to unlock extra content.
This tutorial is the second and final part of a two part series on custom web services. If you are curious how to develop the web service yourself, check out the first part of the series for full details!
You don’t necessarily have to set up the web service yourself for this tutorial – you can use the one I’ve already set up if you’d like.
This tutorial assumes you have basic familiarity with programming for iOS. If you are new to iOS development, you may wish to check out some of the other tutorials on this site first.
As an iPhone/iPad developer, it can be really useful to be able to write your own simple web services that integrate with your apps.
For example, you may wish to display some news updates that come from your web server, and display it on startup. Or perhaps store some user data “in the cloud”. Your imagination is the only limit!
In this first tutorial in this two-part series, you’ll go step-by-step through the process of creating a simple web service, based on a promo code system I included in my latest app, Wild Fables. In the next part of this series, you’ll write an iOS app that integrates with this web service!
To run through all of the steps on this tutorial, you’ll need a web server with MySQL and PHP. If you do not have a web server already, you have three options:
- If you want to enable Apache/MySQL/PHP directly on your Mac (for free), there are lots of good guides out there, here’s one I found with a quick Google search.
- If you want to rent a web server online (usually for $$), there are many good choices out there, but the one I personally use (and enjoy) is Linode – check this tutorial for more information.
- And if you’re just too lazy to do either of the above, you can just read through the steps below, and use the web service I’ve already made in part 2 of series :]
You don’t necessarily need to know PHP or MySQL to go through this tutorial (although it will be helpful!), as the tutorial includes all of the code you’ll need.