Database driven ios app - first steps - iphone

I'm about to start work on my first app which will be an internal release to gather customer information at a trade show.
I'm hopefully looking into using air for ios or maybe one of the various html/js frameworks to develop this app as an alternative to learning C.
ideally I would do it with some server based php > sql to store and share gathered information between a fleet of iPads, unfortunately due to the population of this trade show there will be no guarantee that i can maintain a wireless connection so need to prepare for these apps all being local access only.
in which case, how would you recommend going about the saving/reading of the stored data, and also how to sync it up with a sql server and then back to the iPads each night.

Did you try PhoneGap? It is an HTML5 app platform that allows you to author native applications with web technologies, in other words it will let you make an iphone app without having to learn C.
People have written tutorials and plugins for storing data locally.
PhoneGap basically wraps a web app hence you can use AJAX for sync with server as and when needed. This article might help.
We explored PhoneGap and found it very useful. and easy too. hope this helps you.

Related

Core data/Database IOS

I'm new to IOS programming, and I have had a great time learning it. It took me about 4 months to really get a good grasp on it. I have began creating my own app, and I ran in to a few questions. The app I'm creating is a live app like instagram, foursquare, etc. How do I store all of the information I need. Can I use Core-Data to create a real-time app that can handle updates from multiple users?
The app I'm creating is a live app like instagram, foursquare, etc.
How do I store all of the information I need.
You'll probably create some sort of server to manage the data. Having a single, central source of data is a lot easier than trying to sync data between multiple devices.
Can I use Core-Data to create a real-time app that can handle updates from multiple users?
You can -- Core Data works on MacOS X as well as on iOS, so you could write a Mac program that is the server for your iOS app. Whether that's the best approach is another question... I suppose it depends on how well you already know Core Data, whether there are any advantages to using the same Core Data data model on both the server and the client, how many clients you think you might have to support at once, etc.
If you're asking about using Core Data on the iOS client, then yes, you can certainly do that.

How to implement and create a central Scoring server using iPhones to send updates

I have been searching and googling different ways to build a central scoring server for a golf tournament but have not found any dead set answers on how I can do this. What I'm looking for is some advice on how I should implement this. I do have a background in programming in Objective-C as I have created a couple of iPhone apps and I'm not afraid of trying and learning new things. I will explain what I envision and if I could get some suggestions on how to start, that would be great.
a. My golf tournament would have about 80 people playing in it.
b. I would have 5 volunteers with iPhones stationed around the golf course to collect scores from the players as they finish a couple of holes.
c. The volunteer would enter the scores into an app on the iPhone. The app would then send the scores to the central scoring server to update a giant leader board at the clubhouse.
My questions are what kind of database should I use? I'll need something that is very user friendly as I'll need to be able to make quick changes to the database on the fly if required. The iPhones will not share the same network as the central server as they would most likely be on 3G out on the golf course. For now, the iPhone app that is sending scores to the server, will not be in the app store as I will build the app through an ad Hoc profile.
Any help, suggestions or advice would greatly be appreciated.
You would presumably need a hosted service of some sort that each instance of your iPhone app would send its data to. Typically those hosted services are implemented in other languages/technology stacks like Java, PHP, or Ruby/Rails. The server app would then persist data into a database: MySQL is a commonly used solution, but there are a lot of options with different strengths and weaknesses depending on your specific requirements.
If a hosted server application isn't somewhere you want to go, and if your requirements are simple enough, you could look into a file-based server solution. For example, you could build your iPhone app to place scores in a small file on a Dropbox folder and then write a standalone app that collects those small files and does whatever you want with the data.
Hope that helps
If you have little experience with servers, you might also consider one of the new server-in-a-can services like parse, stackmob, or kinverse. There's quite a bit involved in building/maintaining a server, especially if you need it to scale.

iPhone: Need suggestion for SYNC contact

i want to create a application which sync my iPhone contacts to my server and vice-versa.
i read a article on google Get Google Sync on your phone . i want to this type of feature which directly update the contact without user interaction (however one time setting is desired).
any body have idea how the google sync work .
Please advice me that how can i achieve this task. any suggestion and link is greatly appreciated
I think it's important to separate the two overlapping approaches in your question.
Firstly, Google Sync is essentially a way to use Microsoft Exchange protocols and to setup a Mail / Contact / Calendar profile on an iPhone. The iPhone OS supports this feature, not an iPhone App in the App Store. Google Sync leverages this fundamental capability of the phone by exposing the data (mail, contacts, calendars) via these known protocols. If you want to expose data in this way to your users, setup a Microsoft Exchange server and ask questions on serverfault.
Secondly, there are iPhone apps. iPhone apps sold in the app store are not currently allowed to run in the background. This means you can't emulate functionality like iTunes or Mail where your music plays while you are browsing the web, or mail checking is done while you are playing a game of Mini Squadron. If you want this backgrounding capability, file a bug/enhancement with Apple.. However, you can interact with iPhone contacts (Address Book) via the API.. You can also of course "re-invent the wheel" and expose the data however you like via the internet, and consume that data from a custom iPhone App with the one caveat that users would need to actively launch your application to get to this data and it would not be integrated with the built-in iPhone Calendar, Address Book or Mail applications. Some good examples of that are some of the music community apps that have messaging systems built into them. Presumably that is all being done with web services.
EDIT: It is also worth mentioning that should you go the "iPhone App" route, you should at least consider if push notifications are right for you, and if so how you will handle it.
Have you seen the API-Docs?
http://developer.apple.com/iphone/library/documentation/ContactData/Conceptual/AddressBookProgrammingGuideforiPhone/100-Introduction/Introduction.html
Next there is an application I use called Funambol - it is a sync4j Server/Client. They have an open source application to sync contacts on the iPhone. Source is somewhere in their repository, informations here: http://forge.ow2.org/scm/?group_id=96
As slf told you your application must run in foreground. This may limit you.
Good luck & best regards,
Florian
The 3.0 SDK will allow your application to read contact data on the phone.
Web services will allow you to publish that data to your server, and receive updates.
You may also want to use coredata to store a hash of all contact data so you can tell what is new / updated and just send that data to your server.

What do you want an iPhone library to do for you?

I'm an undergraduate university student who also writes iPhone applications. Next year I'm expected to do a final project, something that lasts the full year and involves a fair bit of software engineering.
My original plan was to write an object-relational wrapper around SQLite for the iPhone (or rather, to massively clean up and extend one I already have) and ultimately release it as open source. Unfortunately, with Core Data being added to iPhone OS 3.0, that's no longer really necessary. (At least, that's how it seems to me; any opinions on this?)
However, I'd still like to do a useful, technically interesting iPhone-related project next year. So here's my question: what do developers need? What sort of problems do you encounter in your apps which seem like they could be handled by some sort of library or framework? My focus is generally more on utility, productivity, and communication apps than games. And since I'm proposing this to a university, something that's either theoretically interesting or attractive to potential students would be preferred. And of course, it'll need to be something that they haven't added to the new version of iPhone OS.
It's in the early stages, but a bunch of scientifically-minded Cocoa developers (headed by Drew McCormack) have joined together to start a BSD-licensed data charting / plotting / visualization framework called Core Plot (mailing list here). This framework is cross-platform between Mac and iPhone, relying on Core Animation for rendering.
While you wouldn't be starting your own project fresh, contributing to this open source framework would be technically challenging and I believe that the framework will have far-reaching applications. I'm sure that the university would be impressed by the potential scientific and educational uses of such a framework.
A library that provides a very simple API that would enable any app to act as an OAuth consumer would be incredible! It could be used to enable data access against hundreds of OAuth-enabled data APIs all over the web, including those of Google, MySpace, Twitter, Yahoo, Flickr, etc. Imagine how many thousands of additional applications you could enable other developers to build with ease.
Your code could be included in pretty much every worthwhile iPhone app that any future developer writes!
I'd like to see a framework that abstracts the interface to various social networking sites. Having a standard API to send updates and post pictures to MySpace, Facebook, Flickr, Picassa, Blogger, Twitter, and other services would be very useful.
A general purpose framework to communicate with a particular iphone from any application with internet connectivity. iphone apps are great, but so much more can be delivered with serivces from the web - so some sort of communications would be nice.
Make some sort of API that can be used to talk to iphone from other connected applications - either web services or desktop, etc.
I ended up having to go in a different direction due to the rules of the project, but I'll keep these in mind as possibilities for future, non-university work. Thanks, everyone!

What is the iPhone SDK Missing?

I've been doing mobile app development for a long time (2001?), but the systems we worked with back then were dedicated mobile development environments (Symbian, J2ME, BREW). iPhone SDK is a curious hybrid of Mac OS X and Apple's take on mobile (Cocoa Touch).
But it is missing some stuff that other mobile systems have, IMO. Specifically:
Application background processing
SMS/MMS application routing (send an SMS to my application in the background)
API for accessing phone functions/call history/call interception
I realize that Apple has perfectly valid reasons for releasing the SDK the way they did. I am curious what people on SO think the SDK is missing and how would they go about fixing/adding it, were they an Engineering Product Manager at Apple.
The biggest shortcoming in my opinion is support for separating licensing from distribution.
What I mean by this is that it should be possible to download a trial version of an application and later purchase a license for that application (from an API call inside the application or from the app store). This would make it much easier to try-before-you-buy and get rid of the current duplicates of many applications with 'lite' versions.
I think lack of push notifications for apps is the big thing we're missing right now. With push, you can register your application to perform a task (like getting the most recent data from a web service) even when it's not running, at a time and frequency the OS decides is best. In an ideal world, along with the existing concept of iPhone apps loading quickly and resuming where you last left off, this solves the problem of not running in the background. I know some tasks will be more difficult or maybe impossible with this strategy, but it's still a pretty good compromise between third party applications and the iPhone's limited hardware.
Originally push was scheduled for last September, but it was removed from the beta SDK and not spoken of since then.
API's I'm personally looking for:
Apple80211 as a public API (private, current API is fine if documented)
Access to Volume buttons (semi-accessible via Celestial, private, needs new API)
Access to Calendar (private, API status unknown)
Access to Bluetooth + SPP profile (status unknown)
Access to Camera (directly, API status unknown)
Access to JavaScript runtime (directly, not through UIWebView, API status unknown)
WebKit access that's lower-level than UIWebView (private, current API is fine)
Access to Music Library (private, current API is fine)
Garbage Collection.
CoreData is missing.
You've mentioned some of the big ones - copy & paste (or in fact any way for apps to collaborate) is another huge omission.
It also seems to lack a desktop synch framework (at least if it exists I can't find it).
Language independence and especially lack of scripting is another pet peeve - objective-c is all very well but more languages to choose from would be good.
Inability to dynamically extend apps, via scripts or otherwise, is another big omission. This is partly an SDK/OS issue, partly licensing.
My list ordered by priority:
Mapping abstraction (the MapKit looks awesome), but that would require a new Google Maps TOS
Music library
Camera (photo + video) Access to more
UIViews, Apple designed some pretty nice custom ones for their apps
Better UIWebKit abstraction
The features I see missing that it should have is
Access to SMS
Direct Access to Google Maps App. You should be able have access to this so you could extend your application to use the built in features provided by Google Maps.
Access to the Bluetooth functionality of the phone.
Access to the Calendar. Why not allow access to simply post a calendar event for the user.
Access to Active Sync. It would great if we could directly access this and communicate back to the Exchange Server.
Core Image. They provide Core Animation but Core Image is missing. I hope that this is added to the API soon.
These are some of the features that my clients have access for in the past and are supprised when they are not available.
We definitely miss a Calendar API and SMS access. So many applications could leverage such APIs. The iPhone allows users to have everything in their pocket, but it's almost useless as long as developers cannot leverage this integration in their apps.
A language with proper namespaces.
A limitation that bugs me is lack of access to system features that require root or setuid. For example: opening privileged IP ports.
I'm not sure there is a good solution to this, as long as Apple's policy is to keep the device locked-down.
Allow program to set some kind of local timed event for your application to bring up an alert and launch your app if the user agrees (like any calendar app). You could do that with push notifications but there are many cases I'd hate to have to rely on a whole server infrastructure and network connectivity just to basically do some timed thing.
Some idea of what direction the user is facing. I cannot believe the GPS chip the newer iPhones use are not capable of reporting direction.
I would personally love to see
Access to the CoreTelephony Framework (Currently private). Which allows access to all the phone functions (Especially sending MMS / SMS).
Some sort of ability to run stuff in the background. While push notifications is ok for most things, but it is a bit hard to leverage CoreLocation (i.e. have the app show a notification at a certain location). Of course this would probably need an on/off button or app specific like push is.
animation view which will be reduce developer to make a cool app , of course the core business local still need consider more , but the view layer could more easy to use ....