How do I create an iPhone app to take a picture and send it back to an Oracle database? - iphone

I'm trying to create a program that you can take a photo with your camera, and send it back, where it will then be attached as a field into an Oracle database. An existing app that this is similar to (if I'm not explaining it clearly enough) would be bank apps that allow you to photograph the front and back of your checks, then send them off to a different location to be processed.
From my understanding, I would need some sort of middleware and not access the database directly with the pictures taken, but I'm just trying to get the project off the ground at the moment.
So, my immediate questions are:
What sort of base project template would be the best to use for this kind of app?
What sort of code is required to send a file from one location to another? (I'm mainly used to these scenarios in .NET languages, not in xCode)

Expose an HTTP based service (and that can be written in any language and run on any platform e.g. GNU/Linux).
The app itself would be native iOS, and you can certainly consume web-services.
The server itself is just your basic CRUD system backed by a persistent store, in your case an RDBMS.
[iOS] <-----/net:HTTP/---->[server]<==/LINQ/==>[RDBMS]

Related

How to Learn/Create a Database iPhone App?

I have a rather simple idea for an iPhone app. What I need to accomplish:
Allow login of users (which means I'll have to store usernames, passwords, and other account info).
Allow users to submit strings that other users can view.
Attributes attached to each string that must be tracked (i.e. "votes, views, comments, etc.).
As such, I assume I'll need to start learning about databases and working between a server and client. I've gotten my feet wet in OSX/iOS programming (specifically Objective-C) before. I want to learn how one can accomplish a data-based application and the needs I listed above.
I've done some light research and discovered something called SQLite (free and open-source is always good). Is this the right path to achieve what I want to do? I'm a total "noob" when it comes to this field of server/client/data "stuff".
Your help is greatly appreciated.
SQLLite is more like a local database. Really, the database that you will use is unimportant. It sounds like a project with webservices. Inside your webservices, you might connect to a Microsoft SQL Server or anything you want.
I think you should study how to setup a webservice that can be accessed in your code. Webservices is not an Objective-C topic, it applies to any platform. Your project is more like a web development project.
You can save user's credentials in keychain.
#Kinderchocolate is right about introducing database into your project.
It hears about a app which need transmitting data among clients.It means your need server database and local database.
For server database,I recommend you to use Parse.Parse is a platform which provide a convenient way to use their server database with Objective-c in your app.This tool will save many times and energy(it's not necessary to learn PHP,Apache,Mysql).Parse is not free of course,but it has a free period and enough for you to examine your idea.
Here's Parse!.
For local database,I recommend you to use Core Data,Which is provided by XCode.Core data is so strong to meet your need.You can find a way to use Core Data in many books.
Go try Firebase for database in the cloud. (On the server). In Swift 4 there is complete support for Firebase and SQLite

Reading data from Oracle DB in iPhone

I would like to read/write data from my Oracle DB into my iPhone code.
Can you suggest some methods for the same?
One possible solution is provide your iOS App a REST Api and implement methods to read/update/delete your model entities.
If you could access a database directly from your iOS App, for every change in your model you had to deploy a new version on your iOS App. Providing a REST Api you can made changes in your model and do not change parameters or response on your services.
Don't.
Database connections generally expect to be reliable. Connections from an iPhone aren't.
Also, any DB administrator would tell you that the first step to ensuring database security is to lock down the number of places from which the database can be directly accessed. This is why you never (or should never) see client devices talking directly to a database.
Instead, implement an intermediary (such as a web service) that accepts, e.g., HTTPS connections from the iPhone in the usual manner (NSURLConnection, etc.) and does the actual database heavy lifting itself. I'm not an Oracle expert, but I would assume that they have some products that help you do this with relatively little effort given how common a task it is. If not, it should be fairly straightforward for you to implement your own in Java, Python, or a language of your choosing.

iOS data sharing to Google Apps for social features: Workable?

I'm putting on my thinking cap for this one, looking for a high level overview of possibility. I'm the author of an iPhone app that tracks user generated statistics. Data is essentially stored in a table on the device, with each entry having several fields/columns. Users can then sort that data, view graphs, and do other nerdy number crunching stuff. I want to take it farther and incorporate a sharing platform online. Game Center, Open Feint and other third party platforms are too narrow in scope. I'm interested in writing a web app, that users can visit to do three things:
Post New Table entries (automated by device)
View own entries and share via web (read only)
View other members table entries (read only)
Is Google App Engine a viable solution for this? My iOS app will require a POST URL, and the web app will need to save that authenticated user's data, and possibly return an "identifier" value to be referenced in the future in case the user needs to modify the item on the web. It will also require a GET URL to retrieve the authenticated user's statistics one by one or in total.
Next, the user will be able to visit the website and type in a "username" (probably email address) and see read-only statistics that have been submitted.
Thank you in advance for your input.
Sure, you could do all that with App Engine. If you wanted to, you could even make that local table of data sync with your app on GAE.
Really, there's not much on GAE that you can't do, although sometimes the database layer take some time to get used to.
My personal preference would be to set up a Django instance, but you could use any Python or Java-based app, depending on what you're comfortable with.
In short, yeah, you won't have any trouble doing basic REST work with GAE, and you could probably push it harder to do some more number crunching on those stats.

How do I create a development tool to create custom object instances for iphone os

I'm setting out to create an app where it will use 7-10 instances of a custom class, lets call them "books" each class will consist of a number of pages, a title, a int of how many pages a book contains and possibly some notes of the author associated with a specific page.
My question is what is the best way of creating these objects. it seems weak to just hard-code all the books together programatically, and if there are more added after the initial release I'd almost like to have the author be able to construct them with a simple desktop app.
So I guess what I'm looking for is a way to a create a small app to create instances of a custom class on a desktop, then bring those instances into the iphone app.
I only have an iphone dev license as far as I know. Obviously you don't have to be super specific but I'm looking for ways to accomplish this type of task. Maybe if there is a good way to go about hard coding them I would like to hear about that as well.
I guess an equivalent would be a game developer making like a level editor for his game so he doesn't have to create the boards programatically.
Provide your data in XML or JSON
format (or whatever flavour of file
format you prefer), this is to transfer data to/from application.
Parse your data file (xml/json) and store in permanent storage (file,sqlite,core data) on phone. This is the data that your application will regularly use from now on.
Offer user the option to get updates over network
If user selects to get updates, download updated xml/jason file over network, parse and update your permanent store
Use SQLite. You could easily create a sqlite database editor, or use some of the free ones out there. The iPhone can read a sqlite database natively, just include the library.

Online MySQL database in Objective-C

I'm writing a game for iPhone, and I want an online leaderboard using mySQL, which i'm very familiar with.
How do I implement this in my app?
I would assume there's a framework/library i need to obtain?
You don't.
You most certainly DO NOT want to expose and publish your database connection to the "live" internet. That's simply folly.
The database listeners simply aren't designed to work over such an unrestricted domain. They tend to live sheltered lives.
Instead, you should front your database with another service that IS designed for the wilds of the internet. This service can handle the authentication, encryption, load balancing, etc. requirements that good internet servers support.
Most folks today use some variant of web service, posting XML or JSON, but you can do whatever you want.
But don't open the DB connection to the live internet. You're just asking for trouble.
You should abstract the DB technology from the app, wrap your MySQL DB with a simple web service and run it on a web server, then you can use standard HTTP requests to interact with your database from your app.
My suggestions (not by any means the only way to do this)...
Use Django (or some other simple web framework) to wrap your database model, you can ever have django generate the code from your existing DB schema.
Write a few basic views to modify your DB using basic HTTP POST calls and send the username and score data in the POST data
Write a few simple pages that return the data you want in an XML format that you app can parse and display however you want, these are essentially just very simple generated web pages.
Now you have a publicly accessible leaderboard server that your app can interface with by posting scores and retrieving data through simple socket HTTP calls.
This may be outside your scope, but have you considered using OpenFeint instead to do Leaderboards and more? There's no actual framework/library from Apple to create a leaderboard in GameKit. You have to write one yourself from scratch. Although, using the OpenFeint library would give you all this for you, but that's if you want to use it.
More information here on a tutorial to do just what you're asking.
http://icodeblog.com/2009/10/29/iphone-coding-tutorial-creating-an-online-leaderboard-for-your-games/