I’m new to iPhone development, so apologies if this is a silly question, but before I actually create my app I want to know if this is possible, and if Apple will reject this.
(Note this is all theoretical)
So I’d have a API (.NET) that runs on a cloud server somewhere and can return HTML/JSON/XML.
I’ll have a website that can access this API and allow customers to do some stuff (but this is not important for this question).
I would then like my iPhone app to make a call to this API which would return JSON data. So my iPhone app might make a call to http://myapp/Foos which would return a JSON string of Foo objects. The iPhone app would then parse this JSON and do some funky stuff with it.
So, that’s the background, now the questions:
- Is this possible? (that is, call an external cloud API over HTTP, parse JSON response?)
- What are the chances of Apple rejecting this application (because it would be calling a non-Apple API)
- Are there any limitations (security, libraries, etc) on the iPhone/Objective-C/Cocoa that might hinder this solution? In regards to Security – can you freely make a HTTP (or even HTTPS call) from inside an iPhone app, and parse the response? In regards to libraries – is there sufficient support in Objective-C/Cocoa to accomplish this?
On this website, they seem to be doing exactly what im asking.
Thoughts, suggestions, links would be greatly appreciated…
Yes. It is possible. There are quite a few apps that do similar things.
Slim to none. Apple hinders what languages and libraries you can develop in and run on the phone. They won’t limit you based on what external data you pull in to your app.
There shouldn’t be any worries here either. You shouldn’t run in to security concerns and there are plenty of libraries that you should be able to utilize to make your life much easier.
Good luck!