Sync iOS & Mac OS X data - objective-c

Friends I am working on an app with two versions i.e. iOS & Mac OS X. Currently I am exploring my options to sync core data of iOS version to Mac OS X and vice versa.
Could someone suggest me regarding right tools/apis for the same. Or someone have some tips on how to do the same.
The only condition is we can't use cloud/webservice based syncing.
--- Update 01 ---
While working towards the solution, I explored towards syncing via HTTPServer inline/embeded in an app.
http://cocoawithlove.com/2009/07/simple-extensible-http-server-in-cocoa.html
This allows iOS app to share data but via its IP. I am confused how an OS X app would be able to detect the IP or is there any iPhone connected with the Mac OS.
Just to clarify what I am exactly looking for is ---
User work on any one of the app iOS app OR Mac OSx app. Then user connect the iPhone with Mac machine and sync the data.
I hope someone would be able to guide me accordingly.

I recommend to create a Status Menu Bar Application on Mac and sync your data with libimobiledevice.
The syncing itself is not so easy (if it's directly iOS<->Mac or not iOS<->Cloud<-Mac/iOS->). You might start here.

Related

Monitor User App Usage From Mac OS X App

I am interested in building a Mac OS X application that requires knowing what applications the user has open and when a new one opens, all when my app is running. It doesn't have to be approved by the Mac App Store (If this violates their use terms). An example of an app that does this is the Rescue Time app.
Thank you for any answers,
Michael Truell
Don't know if you're still trying to needs this, but I did some more research on how to solve this and here is what you could look into:
To get notified when applications are opened by a user, use NSWorkspace's notification center, and add an observer for keys like NSWorkspaceDidActivateApplicationNotification. See the documentation NSWorkspace. You can also use NSWorkspace to get all running applications.
If you need to access information about a running application, you should check out Scripting Bridge, and if you don't care about App Store or sandboxing, check you accessibility api, AX

Access/Use iCloud Data of existing iOS App from a Mac OS App

I am working an Mac OS version of an existing iOS App. The iOS App uses iCloud to share its data accross devices. Of course this data should be accessable from the Mac OS version as well. When implementing the iCloud functionality in the iOS App the Stanford videos have been a great help. The iOS App uses a UIManagedDocument to setup the Core Data stack and handle all the iCloud related stuff.
Unfurtunatly there is no "UIManagedDocument class for Mac OS" wich does the same thing. NSPersistantDocument integrates the Core Data framework but is not designed to work with iCloud. Thus I am not sure how I can access/use the UIManagedDocument data in iCloud from within the Mac OS App.
Access to iCloud from within the Mac OS App is no problem. After using URLForUbiquityContainerIdentifier: I can access the "iCloud Folder" and see all data wich is stored there. But seeing and using the data are two different things.
Is there any example that demonstrates to how use iCloud from iOS AND Mac OS?
Thank you very much!e

Accessing iPhone data from a Mac OS X application?

Is there a class library or an Objective-C framework which could permit me to access my iPhone data from a Mac OS X application?
For example, if I develop an application to edit pictures, I would like access to my iPhone pictures from this application without using iTunes. I connect my iPhone as USB device and pictures are displayed into the application.
Apple doesn't support this mode for (recent) iDevices. There are some apps (mainly on Windows) which can sort of do this kind of thing, but I don't think you're going to find any libraries to make it simple. You may want to check the jailbreaking sites. They might provide better information.

UIRequiredDeviceCapabilities equivalent for Mac App Store?

I am developing a Mac app that is only useful for laptop owners (MacBooks) and plan on distributing this app on the Mac App Store. For the iOS App Store, you can specify in the plist UIRequiredDeviceCapabilities so that only users with the proper device can see the app in the store. Is there a way to do the same with the Mac App Store?
From page 39 of the iTunes Connect Developer Guide:
If your iOS app requires a specific device capability (i.e. telephony,
GPS, accelerometer, etc.) to function properly, you will need to be
sure to code this into the info.plist of your binary utilizing the
UIRequiredDeviceCapabilities key. Refer to the Build-Time
Configuration Details section of the iOS Application Programming
Guide to learn more. At runtime, iOS cannot launch your application
unless the declared capabilities are present on the device. Further,
the App Store requires this information so that it can generate a
list of requirements for user devices and prevent users from
downloading applications that they cannot run. It is not necessary to
specify required device capabilities for Mac OS X apps.
While there is no equivalent to UIRequiredDeviceCapabilities, some capabilities can be specified in a PreInstallRequirements.plist.
This approach let you specify minimum RAM, GPU capabilities, minimum minversions.
See here:
Mac app store productbuild
https://developer.apple.com/library/archive/qa/qa1748/_index.html#//apple_ref/doc/uid/DTS40011181
https://developer.apple.com/library/archive/documentation/DeveloperTools/Reference/DistributionDefinitionRef/Chapters/Distribution_XML_Ref.html

How to test iphone p2p aplications?

Is there a way to test iphone OS 3.0 p2p applications?
Can I run multiple iphone simulator instances? Aperantly no.
Any help?
I put up a detailed post on how to do this a couple weeks ago, so I'll just refer you to it: http://ramin.firoozye.com/2009/06/18/debugging-peer-to-peer-and-wifi-apps-on-the-iphone/
Try to get permission from work or someplace with several computers on a LAN to run several instances. This will let you test network stuff, too.
According to this forum post you will need to test it on two real devices.
You must use 2 hardware devices for testing gamekit p2p connections.
Untested, but you should be able to run two instances of the iPhone Simulator by duplicating it..
Run the simulator as normal for phone 1.
For the second, go to /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/ and copy (not move) the application somewhere (your Desktop?). When you run the copy, it will ask where the Developer Tools are installed and the application to run. Provide this and it should run a second copy.
Also, perhaps you could test it on both your real phone and the simulator?
I found a solution:
activate tethering on your iPhone
connect your mac with the simulator on it to the phone
Now you can test the gamekit on your sim and your iPhone
(I also have internet-sharing activated on my macbook - but I think the tethering-part is important... oh, this implies that bluetooth is running on the iPhone and the mac, of course)...
I'm pretty happy I found this solution - this was a major drawback...
I try to the same test on my macbook OS5.0 and iPhone 3gs , the iPhone simulator app can see the iPhone device via the app , but can not connected ... does this problem cause the bluetooth device is unauthorized ?
install VMware seem great but too trouble...