Database in iOS App

Hi,
I'm trying to develop an iOS app but I'm not sure of what's the best option to store and manage data.
My starting point is a MySQL database; I've already written the code to access my database (using PHP) and perform some analysis on the stored data. E.g., I've tables to store user infos, for bank transactions, and so on; I can see the list of the transactions for a single user, categorize the transactions, ecc.
This works well for a browser but I'd like to repeat the exercise with an App (iOS for now and OS X later).
Even if I know about object oriented programming (I work using C++), I'm new to Object-C and this is my first App so I still have to learn a lot about XCode, iOS SDK and other stuff.
Now my question:
what's the easiest way to reproduce my data structure?
Googling a bit I've seen that the two most used approaches are to manage data through SQLite or Core Data. Both these options are not directly compatible with the DB I already have; this means that portability becomes another important variable if I want to develop for different frameworks.
Thanks in advance for any suggestion! I will really appreciate if you could also point me to tutorials or guides regarding this topic.
Bye...

TShirt wrote:
1 - Why do you suggest Core Data istead of SQLite3 ?
Because using native SQLite is a roll-your-own approach. Sometimes that is a good idea. I had an app that used native SQLite to access a pre-built database. Using Core Data for that is overkill and not necessary.
However, if this is data that you plan to update within the app, that is different. You would have to do a lot of work to manage your data and manage your tables. You can certainly do that, but then if you want advance your app and move into iCloud, you will have to re-do it all.
Core Data is written from a programmer perspective, not a database perspective. If you are thinking in terms of a database then it seems silly to go through all the hassle. But once you are writing your software and interacting with the user interface, it is much easier to deal with data as objects with built-in relations to other objects. Core Data is a lot of effort for a small project, but once accomplished, it will scale easily and with far less effort on your part.
2 - Why "Be patient" ? It's hard to implement what I need ?
Core Data is just difficult conceptually if you are used to working databases natively. In my example above where I used SQLite natively, I had an ulterior motive - I didn't understand Core Data. I still don't fully understand it because I haven't had time to work with it. But I'm making progress. I have made enough progress that I can definitely assure you that thinking from a database perspective is just going to hold you back. That perspective is easier to understand conceptually than Core Data, but harder to get a working, real-world app. That is, of course, the ultimate goal.

Similar Messages

  • What is the best remote database for connet IOS App and how to do that ..

    Hello ...
    I'm new to Mac as well as ios developments.. Kindly anyone tell me, Is it possible to connect IOS app to remote database. If yes .. may I know what kind of databases available for this. And what kind of steps we have to follow when we code IOS app for connect remote database.
    Your response would be highly appreceated.
    Thank you.
    Iranga

    Ideally, you need a REST server to connect to your remote database. There are many frameworks like Jackson and Jersey that are reasonable alternatives but it does require too much effort. One of my friends work at a startup that just came up with a way to get RESTful API to any of the SQL databases. You may want to try it out and see if it works for you at EspressoLogic.

  • Updating iOS App without deleting the SQL DB

    Hello there,
    I have a huge knot in my brain right now....
    I need to update my iOS App, wich has a local SQL db installed (generated when you run the app for the first time).
    Users have encrypted data stored in this database. Now, i'm not sure of what i should do, or rather how an update on iOS works.
    If you install an update, will the entire App get wiped (with the database) and then replaced with the updated App, or how does this work?
    IMPORTANT: I need to update the App, but the Database can't be touched or replaced, wich is stored in the applicationStorageDirectory.
    Thank you very much for your help

    It is usually a good idea to keep the database in the ApplicationStorageDirectory directory so that it is not accessible by other applications and it is preserved when the application is updated. -source: http://book.zi5.me/books/read/2473/118
    Do you know a solution to my question? writing and reading arrays using application storage directory. its on the 1st page of the forum. id appreciate the help.

  • IOS app

    I need to create an IOS app.... simple... just need to access a database stored in the cloud... read, write... queries... etc... have a PC, so apple's xcode is not an option... would love to use an adobe product... is there anything out there that will do what I need it to do?

    Hi Astroair,
    If you have a Creative Cloud membership you might investigate Flash Builder and Flash Pro which are included with the membership to see if they would be what you need.
    - Dave

  • Anyone profiled iOS app using FlashBuilder?

    We're making an iOS app using Flash Professional. I also use Flash builder for my editing. 
    the application also unfortunately uses AIR-specific features, such as SQLite database and NativeApplication references.
    I've had luck before using the profiler by just profiling as a web application (which is what gets created when I do "create new Flash Professional Project..." in FlashBuilder.
    But I am stuck on how to get FlashBuilder profiler working on this project because it always wants to launch the thing in a web browser, which can't function due to the AIR-only features.
    Anyone ever gotten this combination to work?  I *so* wish I could just start from an MXML wrapper and load my FLA as a swf, but silly iOS restrictions force me to have just one SWF with all my code in it.
    thanks!

    Hi ericmathew
    iPhone 6 & iPhone6+ require different Launch Images than older phones:
    For Example,
    For iPhone 6 : Default-375w-667h@2x~iphone.png
    And iPhone6+ : Default-414w-736h@3x~iphone.png
    For more details regarding this, check out below article :
    http://blogs.adobe.com/airodynamics/2015/03/09/launch-images-on-ios-with-adobe-air/
    -Tushar,
    Adobe AIR Team

  • Error coming while installing Berkeley database for IOS Device.

    Hi I want to install berkeley db in my MAC. My Xcode version is 4.5.2. I downloaded db-5.3.21(Berkeley) from oracle site.I installed command line tool for xcode. I installed berkeley db in my MAC for iPhoneSimulator. Where as for iPhone device I am unable to install. I am following below link for installing the berkeley db. http://docs.oracle.com/cd/E17076_02/html/installation/build_unix_iphone.html
    When I am installing berkeley db for IOS device it is showing following error.
    checking for arm-apple-darwin11.4.2-sh... no checking for sh... /bin/sh checking for a BSD-compatible install... /usr/bin/install -c checking for arm-apple-darwin11.4.2-cc... /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc checking whether the C compiler works... no configure: error: in /Users/celstra/rajaramesh/db-5.3.21/build_unix': configure: error: C compiler cannot create executables See config.log' for more details
    ............................... The error is telling that C compiler cannot create executables... But for iPhonesimulator it is not showing the error...
    Steps performed for installing Berkeley database for IOS device.
    export DEV_iOS=/Developer/Platforms/iPhoneOS.platform/Developer
    export SDK_iOS=${DEV_iOS}/SDKs/iPhoneOS6.0.sdk
    export COMPILER_iOS=${DEV_iOS}/usr/bin
    export CC=${COMPILER_iOS}/gcc
    export CXX=${COMPILER_iOS}/g++
    export CFLAGS="-arch armv6 -pipe -Os -gdwarf-2\
    -no-cpp-precomp -mthumb -isysroot $SDKROOT "
    export CXXFLAGS="-arch armv6 -pipe -Os -gdwarf-2\
    -no-cpp-precomp -mthumb -isysroot $SDKROOT "
    export CFLAGS=${LDFLAGS}
    export CXXFLAGS=${LDFLAGS}
    //export CPP=”/usr/bin/cpp ${CPPFLAGS}”
    export LD=${COMPILER_iOS}/ld
    export AR=${COMPILER_iOS}/ar
    export AS=${COMPILER_iOS}/as
    export NM=${COMPILER_iOS}/nm
    export RANLIB=${COMPILER_iOS}/ranlib
    ../dist/configure --host=arm-apple-darwin9\
    --prefix=$SDKROOT ...   
    Same steps i performed for iPHONESIMULATOR. But at that time c complier works fine. But while i am try to install for IOS device it is showing above error.
    Can we need any license software for this installation. Could any one please provide exact document regarding installation for IOS device.
    Any advice would be appreciated.
    Edited by: 1000547 on Apr 17, 2013 12:58 AM
    Edited by: 1000547 on Apr 17, 2013 1:03 AM
    Edited by: 1000547 on Apr 17, 2013 2:31 AM

    Thanks for the  reply komal i did that but not cleared..one thing when i create the build from my flash builder the error happens.but the same project i used in another flashbuilder and create build..That build works fine...is there any chance for flash builder compiler problem.
    cheers,
    venkat

  • Which programming language do we use for ios apps?

    Hello,
    I would like to know which programing language do professional ios app developers use for apps which work with an integrated database. I thought firstly about C# but recently Ruby has come into my attention as a good app development language.
    Thank you very much.

    Since you mentioned Ruby, there is the RubyMotion toolchain, which can be used to develop applications for iOS, OS X, and Android.  It isn't free, but then again you won't have to use Objective-C or Swift (or even Xcode for that matter).  You will still need to be able to at least read Objective-C/Swift/Java/whatever, since that is what the various API documentation is written for.

  • AiO Remote iOS app -scanning A4

    I have a Photosmart 5515 All in One printer and have been using the iOS app AiO Remote app to scan in some A4 pages. I set the app to scan to a document and also the page size to A4. Looking at the resultant document it has scaled the the document down. It has centralised the document but you end up with margins of a couple of inches all round.
    Has anyone else noticed this?
    Does anyone know how to overcome this?

    Hi Rturner003,
    Welcome to the HP Support forums.  I understand that you are encountering difficulties when scanning A4 documents with HP's All-in-One Printer Remote app.
    I did some testing on this with an iPad and 3 different ePrint capable printers and each time I was able to recreate it. However that doesn't mean we are kippered.  I have included a link to a post on the forums and the key part for you to get your A4 scanned document to print the document as you require, please follow step 3 after you have scanned the image. The key is to pinch the image to the size you would like.
    Regards,
    Happytohelp01
    Please click on the Thumbs Up on the right to say “Thanks” for helping!
    Please click “Accept as Solution ” on the post that solves your issue to help others find the solution.
    I work on behalf of HP

  • Can I use iCloud storage for iOS apps?

    Hello,
    I'm trying to work out if it's possible to use iCloud to save/load data across devices with iOS apps created using Air.
    I know there is a lot of talk about now meeting the Apple data storage guidelines eg http://www.saumitrabhave.com/2011/11/air-ios-solving-apps-must-follow-ios.html
    What I can't understand is if I actually want to use iCloud to save data a user has created in my app (ie condition 1 of the storage guidelines - user generated data, cannot be re-created by application).
    If I was to save this user data to the <Application>/Documents directory...
    a) would it be backed up by iCloud and meet Apples requirements?
    b) if my application was installed on another device is there any way, using Air/AS3, to know that a file has been updated and read the file?
    Please let me know if this doesn't make sense... still trying to get my head around how it all works.
    Thanks.

    More details are available at http://blogs.adobe.com/airodynamics/2012/03/05/app-compliance-with-apple-data-storage-guid elines/

  • HP ePrint iOS app no longer finds Photosmart C4780 after app update

    I have an HP Photosmart C4780 connected through WiFi to my network but sadly it's not supported by AirPrint on iDevices.
    So, I was using HP ePrint Home & Biz iOS app (version 4.1) which was very useful for me as it found the printer and allowed me to print from my iPad/iPhone. 
    Today I updated the app on my iPhone to version 5 (now simply named "HP ePrint" on the App Store) and after the update, the new version doesn't find my Photosmart C4780 anymore. I did the Activation thing on the iPhone, as it was requested to refresh the list of printer on my network in the All tab, but after Refresh no printer is found.
    Still I have the old 4.1 on my iPad (and hopefully in my iTunes library) and the printer is located, I assume, through mDSN as it shows the name specified for this setting.
    So, question is: Did you dropped support for Photosmart C4780 on 5.0 release of HP ePrint iOS app? If so, why did't you informed this appropriately on the app update text description in the App Store? A message like "some printers may not be supported anymore" would have been helpul.
    If HP ePrint should find Photosmart C4700 series printers and this is an issue, how should we proceed from here?
    Thanks.

    WilliamBPS, 
    I was not informed that support was removed from the app for certain printers. It may have been lost in the transition to the new updated app. I will deffinitly pass this information along as it is very important that the app supports as many printers as it can. I'll go ahead and take note of your printer model. If I find anything out about this, I'll try to give you an update in this thread. 
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------

  • Sync iOS Apps to iTunes - Questions on how exactly this works...

    I'm going to put my questions up top, but my understanding of the current system is below, and may be relevant to the questions, if you'd like to read through it.
    How can I back up / restore a SINGLE app, including its data (e.g. a game save file), to either iTunes or the cloud... or anything else for that matter. Does syncing an app to iTunes serve this purpose?
    What IS the purpose of syncing an iOS app to iTunes? Does this sync include the data stored on my iOS device? For example, if I have a game in which I've made progress, is this progress stored on both my iPhone and my Mac once I've synced the app to iTunes?
    If data IS synced along with the app, how is this data managed? Say I have two iPhones, both with the same game but different progress in each. If I sync iPhone A with iTunes, then sync iPhone B, will iPhone A's data overwrite iPhone B's? Or are there two versions of this app floating around on my mac?
    If data is NOT synced along with the app, why on earth would I want a bunch of huge storage-hogging iOS apps that are identical to what I could download from the App Store taking up GIGABYTES of space on my MacBook's SSD?
    And finally, should the answer to question 4 be "there is no reason to store 42GB worth of useless apps on your 256GB SSD alongside your already gigantic iOS device backup files," how would I go about removing these apps stored in iTunes without iTunes trying to delete them from my iOS device every time I want to sync some TV shows or podcasts?
    My Understanding So Far:
    Of the many things Apple has addressed and improved upon over the years, backing up iOS app data has strangely not been one of them. As I understand it, the only way to back up an app, including its data (e.g. the save data for a game), is to do a FULL backup of the ENTIRE device. The only way to restore an app, including the data that you backed up, is to restore the ENTIRE device, all other apps included, to a previous state.
    The driving force behind these questions is that I'd like the option to delete an app from my iPhone when I'm finished with it - but I'd also like the option to re-download it in the future and pick up where I left off. In a perfect world, all these apps would automatically sync through iCloud or GameCenter, or at least have that option to "upload to iCloud" or "restore from iCloud." Even with these apps, I'm not entirely sure where the backed up files exist - somewhere on my iCloud drive separate from my iPhone backup, photos, contacts, etc? Is there a way to see a list of apps that are storing things in my iCloud drive, and even manage this data?
    So if I wanted to back up an app's data that does NOT automatically back up to iCloud, it seems my only option would be to install one of the many 3rd party Mac <-> iOS data transfer apps, and copy the contents of the "Documents" folder to a designated directory on my Mac. Then I could delete the app off my iPhone. Say in the future I re-download the app - I'd use the same data transfer app to copy the backed-up data to the re-downloaded app's Documents folder, and we're back in business. The only downside is that if it's been a while and the app has undergone updates, this backed-up data might be corrupt or no longer relevant. Plus, it's kind of a hassle.
    When I discovered iTunes was syncing my apps to my Mac, I thought it might be serving as a way to back up my apps, data included, to my computer. Okay, it seemed like a little overkill to sync the whole app along with the data, but when I discovered that you could UPDATE the apps within iTunes, I thought apple had solved the problem of storing backed-up data for out-of-date versions of an app - simply update the app in iTunes, it does what's necessary to your backed-up data, and when you want to put the app back on your iPhone, voila! Your old data's there, AND you've got the most recent version! But apparently this is not at all how iTunes app syncing works.
    As I NOW understand it, when iTunes "syncs" an app to your Mac, it includes only the app's core data - the same as if you'd just downloaded it from the App Store, and it does so for EVERYTHING you've purchased, ever, whether or not it's on any of your iOS devices. I can see how this could be convenient if you live on a farm and want to restore an old app to your iPhone without an internet connection, but I don't think it's worth, unexaggerated, a FIFTH of my hard drive. Worse, I can't figure out how to get rid of them.
    TL;DR
    So, if you're still with me, what is the purpose of iTunes App Sync, and if it's as useless as I think it is, how do I get rid of it for good?

    You can upgrade to Snow Leopard and skip over Leopard, and only upgrade to Lion later if wanted/needed. snow Leopard specs/requirements below.
    http://store.apple.com/us/product/MC573Z/A?fnode=MTY1NDAzOA
    Stedman

  • Is it still possible to create a 32-bit only iOS app?

    With the latest AIR release (17), is there any way to still create a 32-bit only iOS app for testing on the iPad 1? It's currently not possible to install an app with 64-bit support on an iPad 1 to test the app. My understanding, however, is that Apple will do something on their end that will allow apps submitted to the App Store (with 64-bit support) to still be downloaded and installed on an iPad 1. Having a way to test on the iPad 1 before submission to Apple would be nice.
    Is there a compiler switch or something that can be used for this purpose? If not, could such a switch be added easily? If we had such an option, we could continue testing on and supporting the iPad 1. Being in the education market, this is kind of critical to us.
    Thanks,
    Chris Sheffield
    Read Naturally, Inc.
    www.readnaturally.com

    Because an app built with 64-bit support *cannot* be installed on an iPad 1 device for testing purposes, whether using iTunes or Xcode. It simply doesn't work. This is the message generated by Xcode:
    This is when trying to install an app built with Flash Builder 4.7 and AIR sdk 17 beta.
    As I stated before, my understanding is that Apple will still allow installing apps on an iPad 1 through the App Store, but *only* through the App Store. In my opinion, this is too late. We really need a way to continue testing on the iPad 1, if at all possible. That's why I'm asking if there's a possibility of adding a compiler switch of some kind that would allow building 32-bit only apps, for testing purposes only.
    Thanks.

  • Is there any downside mixing Objective-C with C++ for iOS apps?

    I'd like to use C++ since it's fast and more dynamically in memory reference.
    Is there any downside mixing Objective-C with C++ for iOS apps?
    When googled for info, I only found tutorials about how to let xcode compile Objective-C with C++.
    Thanks for help.

    hokanst wrote:
    Both Objective-C and C++ are (more or less) extensions of C.
    C supports manipulation of pointers and casting of pointers, this implies that both Objective-C and C++ will be able to manipulate C data like arrays, structs ...
    Objective-C has classes like NSData to read/write blocks of bytes from/to file and to access ranges of bytes when the data is loaded into memory.
    C++ probably has similar classes (I'm not well versed in C++ so I don't know).
    If you want to look into using C++ you will probably want to look at Objective-C++, the link below has links to docs on how to use C++ with Objective-C:
    http://stackoverflow.com/questions/3684112/what-is-objective-c
    Thanks for the info, NSData does what I need.
    A replied in the link also mentioned that he's using C++ in his application too. As long as I'm aware of memory management (prevent memory leaks, etc) as @disguise said, it should be fine.
    @etresoft indeed, but C is the base language of ObjC, there are ways to deal with.

  • Help! On ios app store, in featured I accendently tapped app starter kit and I can't get out!

    Help! On ios app store, in featured I accendently tapped app starter kit and I can't get out! I closed the app out of mutlitasking, hit the featured button multiple times, but nothing happened! There's not even a back button! I can still see top 25, search, updates, but not see featured, genus, new,etc
    HELP!!!!!

    what mac os x are you useing.

  • HT4528 I have an IPHONE 4 and the IOS app was downloaded on my phone. I Hate it...I do group texting for my church and I am unable to do it now, it says please wait and then I can never get it to let me type the message..Is there anyway to take this off m

    I have an Iphone 4 and the IOS app was downloaded. I HATE it it will not allow me to group text. i do a prayer chain for my church and it will not let me type any messages...is there anyway to delete this app or upgrade

    As major software releases go iOS 7 is amazing?  Many requests for support found on these boards are solved via advice related to How To Do Something.  Many times the advice is right out of the User Documentation provided by Apple.  If someone were to compare the number of critical issues reflected across these posts vs. most other major releases from any major vendor ...iOS 7 is excellent.

Maybe you are looking for

  • Installed Additional RAM - anything else?

    I just installed an additional 512mb of RAM on my iBook, bringing the total RAM up to 1GB. The installation was pretty painless, but now I'm wondering: is there anything I should do to double-check the RAM to make sure it is working properly? On the

  • Burning photos - only to read, hoe to do it ?

    Hi everyone ! I would like to burn some photos on a CD but I don't want the other person to copy them. I seen some PDF files in internet that you can download but to save or edit them you need to enter a password. Can I do the same with my photos ? t

  • USB Flash Disk does not mount after Leopard Upgrade

    I am not able to use my USB flash disk after the upgrade to Leopard. The disk does not mount at all, though i can see it listed in the System Profiler. Before the upgrade to Leopard, the same disk used to work perfectly. Can anyone please tell me how

  • Rented movie will not stream

    I am using my iPad and I use it to rent a movie the movie begins to download but I can not get it to stream to me. I can get movies I rent. On my desktop to stream. Do I have To wait for the entire movie to download to my iPad before I can view it?

  • Install CC on my computer ... somewhere else than C://

    Hello, I try in english. I split my HD in 5 parts. I try to install all the programs on E:// instead of C:// which is full. CC told me "not enough space on C://" ... How can I decide where to install the Adobe programs? Thanks for your help.