How do you sync a Core-Data application between a Mac and a iPhone? - objective-c

Just wondering what code I would need to do this?

There's no CoreData for the iPhone (yet), so there's no way to use the same code in your iPhone and Mac app. You could write your own wrapper around sqlite that will run on both. The Omni group has an open source version of this (under a modified MIT license) which would probably be a good starting point.
In addition, there's no built in way to sync data, so you'll have to come up with a way to do that as well. Many apps run a server on the phone/mac and sync via that server. It generally requires that your phone is connected to the same wifi network as the mac.

Core Data does not exist on the iPhone, so you'll need to use something else for the iPhone portion at least. In fact, if you want to share a significant amount of code between the iPhone and Mac apps, you'll probably want to avoid Core Data altogether.

Related

Utility like iFinBox and iExplorer for OS X

I want to make a Utility app like iFunBox and iExplorer for Mac OS X where i can retrieve information and files of connected device and display it.
Though i have good experience in iPhone Development, I have never developed anything for mac.Can anybody provide me good starting point from where i can start.
Thanks
There isn't a public API from Apple for working directly with iOS devices. There are open source solutions like libimobiledevice if you want to make an iFunBox style application.

Use phonegap or go native?

I'm about to make an application for ipad that has the following specifications:
download JSON (or xml) from server
download short audiofiles from server (locations are in the JSON from above)
save these to the iPad for offline use.
based on these files the user gets to do some exercises
user progress/results need to be saved to the device so they can continue where they left off the next time they launch the app.
My question: Can this be done with only html/css/jquery Phonegap? Or should I go native and make this all in Objective-C? Or can I combine phonegap and Objective-C?
Now I'd like to know how I can save a json file on the device for offline use.
Also I'd like to know how to download audio (or images or whatever) and save those to the device.
This can be done with PhoneGap/Cordova and its HTML5 approach.
If it is iPad only, then go native.
Your app's high level requirements do not sound too complicated. For more complex apps always consider that facebook just went native for iOS because of their performance issues. In the end, this may be the way to go for a number of apps. PhoneGap or other HTML5 or cross compiling approaches for 1000+ devices plus native solutions for the market leaders.
It depends on what level UX your are aiming for and how you think your app may expand in the future.
If you need full control over the user experience, then you will need to go native. All the physics involved in scrolling/swiping will be done for you. How much content will you have? if it's thousands of items then again native will offer the best performance. You can also perform certain tasks on background threads (my app did image compression and resizing before uploading the image, for example).
Otherwise - if you just want to get something out quick, go with phonegap.
*I speak as a developer who started out with Phonegap but went Native for performance reasons. Others may have had better experiences.
Comparing application build in native Objective-C with applications build with Webtool like PhoneGap, in terms of being fast, Objective-C apps always win, but in terms of building it fast with zero knowledge of Objective-C Web apps win.
If you have knowledge of Objective-C, in my opinion go with native Objective-C app, else do it with PhoneGap.
BTW, those functionality mentioned in your question can be done with both.

iOS 4 Document-Based Applications

I need to create an application capable to modify and manage files on IOS.
With IOS 5 is "easy" to create a Document-Based Application, but I need to support IOS 4 too.
Anyone knows if there is a way to create a Document-Based Applications in IOS 4?
Thanks in advance.
Short answer is no as UIDocument and UIManagedDocument only arrived with iOS 5
Long answer is yes. There are hundreds of document based apps for iOS. e.g Brushes, Sketchbook Pro which are all document based apps. My own app is document based, its not that hard to do.
What UIDocument/UIManagedDocument provides is a canned API for making a generic document. Feed it a URL and it does (most of) the rest of the housekeeping.
If you wish to do an iOS4 based app then stuff you will need to pay attention to is.
UIApplicationWillTerminateNotification/UIApplicationDidEnterBackgroundNotification
Opening a new document.
Saving a document.
Shutting a document.
Autosave (maybe)
Core Data stack , if you're using Core Data
www.raywenderlich.com has some great tutorials. Maybe even iOS4 based ones still.
IMO - Don't bother with iOS4 support. Like above post states 85% use iOS5 and anyone still on iOS4 probably isn't in your target market. Especially as this is (I assume) a new app and iOS6 will be around by the time you go to market.
Just going to ask, do you really need to support iOS 4?
The adoption of iOS is over 85% of devices.
Whats the basis for the need to continue iOS 4 support?

New to Ipad, familiar with SQL, how to get started

I have been a SQL writer using MS Access some years ago and have been given an IPad upon my retirement. I want to create simple database driven apps using SQL. I have downloaded SQL Lite editor from the Apps Store but it seems to have a big chunk of something missing.
Question. Do I need to have an Apple computer as a workstation and then copy to the iPad, or can I use my Windows 7 PC as the authoring tool.
Where do I find the tools for creating the graphics to enhance database search results?
Do I need to use C or C++ to create the application, as I never got around to learning it.
Odd questions I know, but google searches seem to leave me totally in the dark on this topic, yet I geel that most app's seem to revolve around some database manipulation. Would be helpful if I could find a series fo links somehwere.
best regards
Kaela
Hi
In order to develop native applications to ios devices you need the XCode environment and knowledge in objective c, its a bit odd and there are examples.
for that you will need a mac or run the mac os on a virtual box.
You can also create a non native app such as webapp using HTML5 and js and then import it to the XCode using Phonegap.
By using this method you will be able to create apps for many devices such as android and more and all you will have to do is to import your HTML5 and js into the supporting environment.
Just to warn you about these kind of apps, app store allows only native apps and its better to make native app because it will pass every inspection they make.
Thanks
yes, to develop on Apple's engine, you have to had an Apple computer. However, you can mount a virtual machine running OS X, but it's illegal and very complicated (but doable).
The "bible" for mac developers is here : http://developer.apple.com/.
It's recommanded to write your application in Objective C.

About WAP websites

How to create a WAP website?
What software do I use?
Do I just need to use HTML coding or other type of language?
And after I created it, Can I view it on my own phone?
Do I need a server to let it run or I can just view it on my phone?
Can someone help please, its for my project.
Thanks alot.
What phones are you targeting? Any phone released in the last 3-5 years is able to view standard (X)HTML without issue - except for the fact that they mostly have very small screens.
Some phones do not support Javascript very well (but that is mostly changing, too) and most phones do not support Flash (yet - most newish phones except iPhone will probably support flash "soon", if not already).
The only other main difference is that most phones these days use a touch interface, rather than a traditional keyboard/mouse. That means you can't really do things like hover effects and so on.
But other than the smaller size, everything else is pretty minor.
I agree with the post above that unless you are targeting very old phones, there is probably very little point to working with WAP today - AFAIK the last official version was WAP 2.0 which was circa 2002.
WAP 2.0 used a streamlined version of XHTML. The best way to develop is to either navigate your phone to a standard HTTP server hosting your files - or download and use a simulator. I found the best practice was to develop the app until it worked on the simulator (which could often be directed to load local files) and then do final testing and tweaking with actual devices.