Re: Programmatically displaying UISplitViewController popover?
It would help a lot if you post code from the failed effort ;). -ev On Jun 3, 2011, at 12:44, Rick Mann wrote: To aid discoverability, we'd like for our app, which presents a UISplitViewController, when launched in portrait mode, to automatically open the popover to reveal the contents of the left-hand side of the split view. However, all my efforts to open this up programmatically so far have failed. Does anyone know how to do this? Thanks! -- Rick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/ev%40monoceroi.com This email sent to e...@monoceroi.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
NSTerminateLater and thread
I would like my application executes a given task before the log-out. I almost succeeded but since this task could take a few minutes and since I have to launch it on a separated thread (so the user could stop it), I am getting some trouble. In the applicationShouldTerminate method, I know that the Quit has been invoked by the log-out thanks to the NSWorkspaceWillPowerOffNotification So from within applicationShouldTerminate I invoke: [self ExecuteLogOutTask]; return NSTerminateLater; In this case the task gets executed properly but the user cannot cancel it. The application looks unresponsive to the user. So I tried: [NSApplication detachDrawingThread:@selector(ExecuteLogOutTask) toTarget:self withObject:nil]; return NSTerminateLater; But I get a dialog saying: You haven't been logged out because the application MyAppLogOut failed to quit. Try logging out again And the ExecuteLogOutTask has not been called at all. If I return NSTerminateCancel I cancel the whole log-out, which is not what the user expects. So how to manage this case? Regards -- Leonardo ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Programmatically displaying UISplitViewController popover?
Which bit can't you do? Are you having trouble opening the popover (in which case you just want to call the code which would be called if you pressed the button, just call it programatically) or are you having trouble figuring out when your app is launched in portrait mode, which you could do by setting a flag in one of the application methods to say you just launched, and checking it when you get the viewDidAppear: call. On 03-Jun-2011, at 12:44 PM, Rick Mann wrote: To aid discoverability, we'd like for our app, which presents a UISplitViewController, when launched in portrait mode, to automatically open the popover to reveal the contents of the left-hand side of the split view. However, all my efforts to open this up programmatically so far have failed. Does anyone know how to do this? Thanks! -- Rick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/rols%40rols.org This email sent to r...@rols.org ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
iOS: drawing the end of a CGPath differently
How would I go about drawing a terminus at the end of a path? I'm drawing a path in an overlay to a MKMapView, but I would like to somehow designate the end point of the path to differentiate it from the rest of the path. CGContextAddPath(context,path); CGContextSetRGBStrokeColor(context,0.0f,0.0f,1.0f,0.5f); CGContextSetLineJoin(context,kCGLineJoinRound); CGContextSetLineCap(context,kCGLineCapRound); CGContextSetLineWidth(context,lineWidth); CGContextSetShadow(context,offset_size,0.0); CGContextStrokePath(context); CGPathRelease(path); Is there some kind of CGHighlightEndPointOfPath() call or its equivalent? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: iOS: drawing the end of a CGPath differently
On Jun 3, 2011, at 10:16 AM, Nathan Sims wrote: How would I go about drawing a terminus at the end of a path? I'm drawing a path in an overlay to a MKMapView, but I would like to somehow designate the end point of the path to differentiate it from the rest of the path. CGContextAddPath(context,path); CGContextSetRGBStrokeColor(context,0.0f,0.0f,1.0f,0.5f); CGContextSetLineJoin(context,kCGLineJoinRound); CGContextSetLineCap(context,kCGLineCapRound); CGContextSetLineWidth(context,lineWidth); CGContextSetShadow(context,offset_size,0.0); CGContextStrokePath(context); CGPathRelease(path); Is there some kind of CGHighlightEndPointOfPath() call or its equivalent? A path is strictly a geometric construct and has no stylistic attributes attached to it, as such there isn't a way to do what you are trying to accomplish with a single path. Instead I would recommend you use another MKOverlay to designate the end of the path. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
OS + iOS best practice
I hope this appropriate for this list, if not please accept my apologies. I've got a fairly basic core data app that I've written for personal use on my iMac. I'd like to have an iPad version as it would be very useful to have whilst I was mobile. (It's basically a customer/product database). Is there a best way to manage sharing the data between an OS and iOS version? I assume it will be possible as long as they use the same datamodel. I was thinking maybe some kind of dropbox sync would be best as it wouldn't depend on a network connection, and I wouldn't need to use both the mac an iPad versions at the same time. I have absolutely no idea how to do this though. I know some apps have built in dropbox sync but I fear it may be beyond me as I haven't found a handy tutorial anywhere. Can anyone point me in the right direction at all? Many Thanks Amy ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Handling NSRunLoop with AUGraph
On Thu, Jun 2, 2011 at 10:05 PM, Sasikumar JP jps...@gmail.com wrote: Hi, I am working on streaming audio application. Sorry for cross posting, I am facing the issue with NSRunLoop and AUGraph. coreaudio-api is still the better list to post to. Everything in userland deals with runloops (either NSRunLoop or CFRunLoop). The distinguish feature of your post is Core Audio. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: OS + iOS best practice
On Jun 3, 2011, at 1:04 PM, Amy Heavey wrote: I hope this appropriate for this list, if not please accept my apologies. I've got a fairly basic core data app that I've written for personal use on my iMac. I'd like to have an iPad version as it would be very useful to have whilst I was mobile. (It's basically a customer/product database). Is there a best way to manage sharing the data between an OS and iOS version? I assume it will be possible as long as they use the same datamodel. I was thinking maybe some kind of dropbox sync would be best as it wouldn't depend on a network connection, and I wouldn't need to use both the mac an iPad versions at the same time. I have absolutely no idea how to do this though. I know some apps have built in dropbox sync but I fear it may be beyond me as I haven't found a handy tutorial anywhere. Can anyone point me in the right direction at all? Many Thanks Amy If it's an app for multiple users to have the same data, you probably want to have a central database that client apps retrieve data from. Core data isn't really a multi-cient database.___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: OS + iOS best practice
Thanks, It's an app for just me really. I just prefer to work on a desktop mac when I'm in the house, and I can't carry my iMac with me :) I do find typing much easier on an actual keyboard. Maybe I should just get a keyboard for the iPad? Many Thanks Amy On 3 Jun 2011, at 7:11PM, John Joyce wrote: On Jun 3, 2011, at 1:04 PM, Amy Heavey wrote: I hope this appropriate for this list, if not please accept my apologies. I've got a fairly basic core data app that I've written for personal use on my iMac. I'd like to have an iPad version as it would be very useful to have whilst I was mobile. (It's basically a customer/product database). Is there a best way to manage sharing the data between an OS and iOS version? I assume it will be possible as long as they use the same datamodel. I was thinking maybe some kind of dropbox sync would be best as it wouldn't depend on a network connection, and I wouldn't need to use both the mac an iPad versions at the same time. I have absolutely no idea how to do this though. I know some apps have built in dropbox sync but I fear it may be beyond me as I haven't found a handy tutorial anywhere. Can anyone point me in the right direction at all? Many Thanks Amy If it's an app for multiple users to have the same data, you probably want to have a central database that client apps retrieve data from. Core data isn't really a multi-cient database. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSTerminateLater and thread
Return NSTerminateCancel when applicationShouldTerminate calls ExecuteLogOutTask to be performed in a secondary thread. At the end of your ExecuteLogOutTask method, call something like [myApplicationDelegate performSelectorOnMainThread: (logOutTaskDidFinish) withObject:nil waitUntilDone:NO]. Then, in logOutTaskDidFinish, call NSApplication's -terminate: method and set a flag indicating that ExecuteLogOutTask was already executed. The next time applicationShouldTerminate is called, return NSTerminateNow if this flag is has been set so ExecuteLogOutTask is not called forever. Cheers, Peter Am 03.06.2011 um 13:49 schrieb Leonardo: I would like my application executes a given task before the log-out. I almost succeeded but since this task could take a few minutes and since I have to launch it on a separated thread (so the user could stop it), I am getting some trouble. In the applicationShouldTerminate method, I know that the Quit has been invoked by the log-out thanks to the NSWorkspaceWillPowerOffNotification So from within applicationShouldTerminate I invoke: [self ExecuteLogOutTask]; return NSTerminateLater; In this case the task gets executed properly but the user cannot cancel it. The application looks unresponsive to the user. So I tried: [NSApplication detachDrawingThread:@selector(ExecuteLogOutTask) toTarget:self withObject:nil]; return NSTerminateLater; But I get a dialog saying: You haven't been logged out because the application MyAppLogOut failed to quit. Try logging out again And the ExecuteLogOutTask has not been called at all. If I return NSTerminateCancel I cancel the whole log-out, which is not what the user expects. So how to manage this case? Regards -- Leonardo ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: OS + iOS best practice
Could indeed be easiest solution ;) You could also look at how you serialize or save data for export / import between two environments. Just have it custom save out to a standard plist format or a simple xml schema. Then you can decouple that from the CoreData versioning and differences. Internally, for speed or what have you it could easily import to the CoreData model. However, a simple web app might be just as feasible. Depends on what interests you at this point. On Jun 3, 2011, at 1:16 PM, Amy Heavey wrote: Thanks, It's an app for just me really. I just prefer to work on a desktop mac when I'm in the house, and I can't carry my iMac with me :) I do find typing much easier on an actual keyboard. Maybe I should just get a keyboard for the iPad? Many Thanks Amy On 3 Jun 2011, at 7:11PM, John Joyce wrote: On Jun 3, 2011, at 1:04 PM, Amy Heavey wrote: I hope this appropriate for this list, if not please accept my apologies. I've got a fairly basic core data app that I've written for personal use on my iMac. I'd like to have an iPad version as it would be very useful to have whilst I was mobile. (It's basically a customer/product database). Is there a best way to manage sharing the data between an OS and iOS version? I assume it will be possible as long as they use the same datamodel. I was thinking maybe some kind of dropbox sync would be best as it wouldn't depend on a network connection, and I wouldn't need to use both the mac an iPad versions at the same time. I have absolutely no idea how to do this though. I know some apps have built in dropbox sync but I fear it may be beyond me as I haven't found a handy tutorial anywhere. Can anyone point me in the right direction at all? Many Thanks Amy If it's an app for multiple users to have the same data, you probably want to have a central database that client apps retrieve data from. Core data isn't really a multi-cient database. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSTerminateLater and thread
2011/6/3 Peter Lübke sound-fab...@gmx.de: Return NSTerminateCancel when applicationShouldTerminate calls ExecuteLogOutTask to be performed in a secondary thread. At the end of your ExecuteLogOutTask method, call something like [myApplicationDelegate performSelectorOnMainThread:(logOutTaskDidFinish) withObject:nil waitUntilDone:NO]. Then, in logOutTaskDidFinish, call NSApplication's -terminate: method and set a flag indicating that ExecuteLogOutTask was already executed. The next time applicationShouldTerminate is called, return NSTerminateNow if this flag is has been set so ExecuteLogOutTask is not called forever. That's not going to resume the aborted logout. Leonardo, you will need to either finish your task in the time allotted by NSTerminateLater, or you will need to abort logout. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Programmatically displaying UISplitViewController popover?
On Jun 3, 2011, at 5:42 , Roland King wrote: Which bit can't you do? Are you having trouble opening the popover (in which case you just want to call the code which would be called if you pressed the button, just call it programatically) or are you having trouble figuring out when your app is launched in portrait mode, which you could do by setting a flag in one of the application methods to say you just launched, and checking it when you get the viewDidAppear: call. The former. I don't call any code when the button is pressed. The UISplitView creates the UIBarButtonItem and handles the action message. This is part of the problem. I do have a reference to the UIPopoverController, but if I call its -presentPopoverFromBarButtonItem:... method, it pops up with the approximately correct width, and a height of about 10 pixels. I tried doing this right in -applicationDidFinishLaunching, and I tried doing it after a 1-second delay. Neither worked. When I tap on the button, it opens correctly. The next thing I was going to try was to see if the UIBarButtonItem had a UIButton as its view, and try to get the target/selector from that to call, but that's such a disgustingly gross hack, I hope there is a better way. -- Rick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: OS + iOS best practice
On Jun 3, 2011, at 11:04 AM, Amy Heavey wrote: I've got a fairly basic core data app that I've written for personal use on my iMac. I'd like to have an iPad version as it would be very useful to have whilst I was mobile. (It's basically a customer/product database). Is there a best way to manage sharing the data between an OS and iOS version? I assume it will be possible as long as they use the same datamodel. Yup. In fact I would try to share all of the model-related code between the two apps, to ensure that all the ‘business logic’ [I hate that word] is consistent. The easiest way to share the data is to use the file transfer feature of iOS 4, which will let you clumsily use iTunes to copy files to and from the iPad. It looks really simple to implement — IIRC most of it is just declaring in your Info.plist that you support the feature, and then specifying a subfolder of your Documents folder where copied files will live. Dropbox sync is a lot smoother, of course. I am not sure if there is a convenient Cocoa library to use for that. Coding it yourself probably isn’t too hard if you know your way around NSURLConnection, especially if you want to ignore niceties like the ability to browse folders in the dropbox. In the long run this will be an excellent use case for CouchDB (a document-oriented data store that excels at syncing), but the iOS version of that is still very much beta, and there’s no high-level API for it yet that gives you anywhere near the convenience of CoreData. [I’m starting to design one, though…] —Jens smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: OS + iOS best practice
Dropbox sync is good for a pile of files, but no more than that. Let’s rebound the requirements: * there’s a single user Core Data app * want an iPad version of the app * the two versions will sync up Given the requirements, and add the fact that I’m pretty sure that Dropbox would keep conflicted copies of any file around, so there is no fear for lost data, and you can probably merge anything… it’s probably a good fit. If you don’t pull in any external resources, for example pictures on the filesystem which are only referenced by path strings in Core Data entities, the only thing that needs syncing would be the .sqlite file and things can probably work. If this is not the case then a simple Web service would go a long way. Dropbox carries its own stateless JSON based API, but there is a SDK out there (for prototyping purposes) too. -ev On Jun 4, 2011, at 02:16, Amy Heavey wrote: Thanks, It's an app for just me really. I just prefer to work on a desktop mac when I'm in the house, and I can't carry my iMac with me :) I do find typing much easier on an actual keyboard. Maybe I should just get a keyboard for the iPad? Many Thanks Amy On 3 Jun 2011, at 7:11PM, John Joyce wrote: On Jun 3, 2011, at 1:04 PM, Amy Heavey wrote: I hope this appropriate for this list, if not please accept my apologies. I've got a fairly basic core data app that I've written for personal use on my iMac. I'd like to have an iPad version as it would be very useful to have whilst I was mobile. (It's basically a customer/product database). Is there a best way to manage sharing the data between an OS and iOS version? I assume it will be possible as long as they use the same datamodel. I was thinking maybe some kind of dropbox sync would be best as it wouldn't depend on a network connection, and I wouldn't need to use both the mac an iPad versions at the same time. I have absolutely no idea how to do this though. I know some apps have built in dropbox sync but I fear it may be beyond me as I haven't found a handy tutorial anywhere. Can anyone point me in the right direction at all? Many Thanks Amy If it's an app for multiple users to have the same data, you probably want to have a central database that client apps retrieve data from. Core data isn't really a multi-cient database. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/ev%40monoceroi.com This email sent to e...@monoceroi.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Programmatically displaying UISplitViewController popover?
So you have the bar button item and tapping it works; I believe tapping it just invokes its action on its target and there is no much wizardry in thaqt. Is the item we’re talking about the same item that the split view controller sends to you in -splitViewController:willHideViewController:withBarButtonItem:forPopoverController: ? If that is the case, does something along the line of [[item target] performSelector:@selector(action) withObject:item] work? -ev On Jun 4, 2011, at 02:40, Rick Mann wrote: On Jun 3, 2011, at 5:42 , Roland King wrote: Which bit can't you do? Are you having trouble opening the popover (in which case you just want to call the code which would be called if you pressed the button, just call it programatically) or are you having trouble figuring out when your app is launched in portrait mode, which you could do by setting a flag in one of the application methods to say you just launched, and checking it when you get the viewDidAppear: call. The former. I don't call any code when the button is pressed. The UISplitView creates the UIBarButtonItem and handles the action message. This is part of the problem. I do have a reference to the UIPopoverController, but if I call its -presentPopoverFromBarButtonItem:... method, it pops up with the approximately correct width, and a height of about 10 pixels. I tried doing this right in -applicationDidFinishLaunching, and I tried doing it after a 1-second delay. Neither worked. When I tap on the button, it opens correctly. The next thing I was going to try was to see if the UIBarButtonItem had a UIButton as its view, and try to get the target/selector from that to call, but that's such a disgustingly gross hack, I hope there is a better way. -- Rick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/ev%40monoceroi.com This email sent to e...@monoceroi.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: OS + iOS best practice
On Fri, Jun 3, 2011 at 2:48 PM, Evadne Wu e...@monoceroi.com wrote: Dropbox sync is good for a pile of files, but no more than that. Let’s rebound the requirements: * there’s a single user Core Data app * want an iPad version of the app * the two versions will sync up Given the requirements, and add the fact that I’m pretty sure that Dropbox would keep conflicted copies of any file around, so there is no fear for lost data, and you can probably merge anything… it’s probably a good fit. If you don’t pull in any external resources, for example pictures on the filesystem which are only referenced by path strings in Core Data entities, the only thing that needs syncing would be the .sqlite file and things can probably work. If this is not the case then a simple Web service would go a long way. Dropbox carries its own stateless JSON based API, but there is a SDK out there (for prototyping purposes) too. Be careful of Dropbox. The service encrypts data at its leisure and pleasure. With the laxed practices, I imagine they are more than happy to share with law enforcement on a whim rather than court order [2]. Jeff [1] http://seclists.org/funsec/2011/q2/135 [2] http://www.pcworld.com/article/225549/update_dropbox_will_hand_over_your_files_to_the_feds_if_asked.html ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: OS + iOS best practice
Thanks Sounds like dropbox would be a good fit, I'll download the ask and give it a go. My current mac app stores the data in a sqllite file that I'm hoping to just sync with dropbox. However it does currently also store images in a directory and just store the paths as string attributes. Not sure of the best solution for those. I'm not expecting to always have web access on the iPad when the app is running. The images would not change too often once the app is initialised with data. A dozen or so new ones a month, and from the iPad they would only need to be read. Perhaps I could store the SQLite file and the images in a directory that can be stored in the dropbox directory? Many thanks for all your help. Sent from my iPad On 3 Jun 2011, at 19:48, Evadne Wu e...@monoceroi.com wrote: Dropbox sync is good for a pile of files, but no more than that. Let’s rebound the requirements: * there’s a single user Core Data app * want an iPad version of the app * the two versions will sync up Given the requirements, and add the fact that I’m pretty sure that Dropbox would keep conflicted copies of any file around, so there is no fear for lost data, and you can probably merge anything… it’s probably a good fit. If you don’t pull in any external resources, for example pictures on the filesystem which are only referenced by path strings in Core Data entities, the only thing that needs syncing would be the .sqlite file and things can probably work. If this is not the case then a simple Web service would go a long way. Dropbox carries its own stateless JSON based API, but there is a SDK out there (for prototyping purposes) too. -ev On Jun 4, 2011, at 02:16, Amy Heavey wrote: Thanks, It's an app for just me really. I just prefer to work on a desktop mac when I'm in the house, and I can't carry my iMac with me :) I do find typing much easier on an actual keyboard. Maybe I should just get a keyboard for the iPad? Many Thanks Amy On 3 Jun 2011, at 7:11PM, John Joyce wrote: On Jun 3, 2011, at 1:04 PM, Amy Heavey wrote: I hope this appropriate for this list, if not please accept my apologies. I've got a fairly basic core data app that I've written for personal use on my iMac. I'd like to have an iPad version as it would be very useful to have whilst I was mobile. (It's basically a customer/product database). Is there a best way to manage sharing the data between an OS and iOS version? I assume it will be possible as long as they use the same datamodel. I was thinking maybe some kind of dropbox sync would be best as it wouldn't depend on a network connection, and I wouldn't need to use both the mac an iPad versions at the same time. I have absolutely no idea how to do this though. I know some apps have built in dropbox sync but I fear it may be beyond me as I haven't found a handy tutorial anywhere. Can anyone point me in the right direction at all? Many Thanks Amy If it's an app for multiple users to have the same data, you probably want to have a central database that client apps retrieve data from. Core data isn't really a multi-cient database. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/ev%40monoceroi.com This email sent to e...@monoceroi.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/home%40willowtreecrafts.co.uk This email sent to h...@willowtreecrafts.co.uk ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSTerminateLater and thread
Thank you Kyle, however, I realize, it's incredible there is no way to execute a task before quitting the app. I easily run a task at launch but I can't run a task before quit. The problem is that the task could a few minutes and the app should remain responsive to the user, in the best Mac tradition. I will struggle myself some day more on this issue. Let's cross the fingers. Regards -- Leonardo Da: Kyle Sluder kyle.slu...@gmail.com Data: Fri, 3 Jun 2011 11:35:41 -0700 A: Peter Lübke sound-fab...@gmx.de Cc: Leonardo mac.iphone@gmail.com, Cocoa Developers cocoa-dev@lists.apple.com Oggetto: Re: NSTerminateLater and thread 2011/6/3 Peter Lübke sound-fab...@gmx.de: Return NSTerminateCancel when applicationShouldTerminate calls ExecuteLogOutTask to be performed in a secondary thread. At the end of your ExecuteLogOutTask method, call something like [myApplicationDelegate performSelectorOnMainThread:(logOutTaskDidFinish) withObject:nil waitUntilDone:NO]. Then, in logOutTaskDidFinish, call NSApplication's -terminate: method and set a flag indicating that ExecuteLogOutTask was already executed. The next time applicationShouldTerminate is called, return NSTerminateNow if this flag is has been set so ExecuteLogOutTask is not called forever. That's not going to resume the aborted logout. Leonardo, you will need to either finish your task in the time allotted by NSTerminateLater, or you will need to abort logout. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: OS + iOS best practice
As for the SQLite file, I am never sure if Core Data’s OS X implementation and iOS implementation share the same format and will continue to be so, and it is surely a very strong and valid idea to just use an intermediate format you control, I’ve been bouncing them across OS X iOS with no problem… Note that Dropbox exposes directory hashes, so that might help with images. I’m not sure if referenced images would be updated at all — this can be a big problem if they can be updated outside the app and you need to handle that. For the record, going with Dropbox might not be very safe, could be not scalable at all, and might have security implications as Jeffrey pointed out. But it might work very well for your scenario. If you’re serious about making it robust, I still recommend that you create a tiny and dedicated web service for this app… -ev On Jun 4, 2011, at 04:23, Amy Gibbs wrote: Thanks Sounds like dropbox would be a good fit, I'll download the ask and give it a go. My current mac app stores the data in a sqllite file that I'm hoping to just sync with dropbox. However it does currently also store images in a directory and just store the paths as string attributes. Not sure of the best solution for those. I'm not expecting to always have web access on the iPad when the app is running. The images would not change too often once the app is initialised with data. A dozen or so new ones a month, and from the iPad they would only need to be read. Perhaps I could store the SQLite file and the images in a directory that can be stored in the dropbox directory? Many thanks for all your help. Sent from my iPad On 3 Jun 2011, at 19:48, Evadne Wu e...@monoceroi.com wrote: Dropbox sync is good for a pile of files, but no more than that. Let’s rebound the requirements: * there’s a single user Core Data app * want an iPad version of the app * the two versions will sync up Given the requirements, and add the fact that I’m pretty sure that Dropbox would keep conflicted copies of any file around, so there is no fear for lost data, and you can probably merge anything… it’s probably a good fit. If you don’t pull in any external resources, for example pictures on the filesystem which are only referenced by path strings in Core Data entities, the only thing that needs syncing would be the .sqlite file and things can probably work. If this is not the case then a simple Web service would go a long way. Dropbox carries its own stateless JSON based API, but there is a SDK out there (for prototyping purposes) too. -ev On Jun 4, 2011, at 02:16, Amy Heavey wrote: Thanks, It's an app for just me really. I just prefer to work on a desktop mac when I'm in the house, and I can't carry my iMac with me :) I do find typing much easier on an actual keyboard. Maybe I should just get a keyboard for the iPad? Many Thanks Amy On 3 Jun 2011, at 7:11PM, John Joyce wrote: On Jun 3, 2011, at 1:04 PM, Amy Heavey wrote: I hope this appropriate for this list, if not please accept my apologies. I've got a fairly basic core data app that I've written for personal use on my iMac. I'd like to have an iPad version as it would be very useful to have whilst I was mobile. (It's basically a customer/product database). Is there a best way to manage sharing the data between an OS and iOS version? I assume it will be possible as long as they use the same datamodel. I was thinking maybe some kind of dropbox sync would be best as it wouldn't depend on a network connection, and I wouldn't need to use both the mac an iPad versions at the same time. I have absolutely no idea how to do this though. I know some apps have built in dropbox sync but I fear it may be beyond me as I haven't found a handy tutorial anywhere. Can anyone point me in the right direction at all? Many Thanks Amy If it's an app for multiple users to have the same data, you probably want to have a central database that client apps retrieve data from. Core data isn't really a multi-cient database. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/ev%40monoceroi.com This email sent to e...@monoceroi.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/home%40willowtreecrafts.co.uk This email sent to h...@willowtreecrafts.co.uk
Re: OS + iOS best practice
On Jun 3, 2011, at 1:29 PM, Evadne Wu wrote: As for the SQLite file, I am never sure if Core Data’s OS X implementation and iOS implementation share the same format and will continue to be so SQLite’s file format is 100% consistent cross-platform. And I have no reason to think the same’s not true of CoreData’s schema, since it’s supposed to be compatible between OS’s. Note that Dropbox exposes directory hashes, so that might help with images. I’m not sure if referenced images would be updated at all — this can be a big problem if they can be updated outside the app and you need to handle that. If you make the application’s store a directory and put the images in it as well as the CoreData file, and if you sync the whole directory with Dropbox, it should Just Work. For the record, going with Dropbox might not be very safe, could be not scalable at all, and might have security implications as Jeffrey pointed out. Dropbox has been quite safe and scalable in my experience. I’ve been using it for a lot of my data for two years, have never lost data or gotten files messed up, and I can’t think of the last time it didn’t sync in a timely manner. The security issues are overblown due to the recent fracas. Yes, your files could theoretically be accessed by their employees or requested by the FBI. The same thing is true of your email, your iDisk, your Google Docs/Sites/Spreadsheets, any software running on your hosted web space, and anything else you put up in “the Cloud”. If you’re super paranoid you can encrypt and decrypt the files locally; but then you run into the complications of key management and transfer … which is one of the reasons cloud services don’t go as far as to do this. But it might work very well for your scenario. If you’re serious about making it robust, I still recommend that you create a tiny and dedicated web service for this app… I understand your point, but in practice, a service designed and run by professionals is going to be more reliable than a quickie web-app cobbled together in your spare time. (What’s the least reliable blog site I’ve ever used? The private WordPress installation I run on my domain. Mostly because the @*%$ sysadmin [me] never has the time to upgrade or fix it…) —Jens smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Multi-OS API Question
Hello, I'm using some API's which are only available on 10.5 and above but I want to compile my app to run on 10.4 and higher. How can I include multiple bits of code so that if the system is running 10.4 it will run Code A and if 10.5 and higher run Code B? Example if ( os == 104 ) { // Run 10.4 Code } elseif ( os = 105 ) { // Run 10.5 and higher API } Thanks, Charles___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Programmatically displaying UISplitViewController popover?
On Jun 3, 2011, at 11:54 , Evadne Wu wrote: So you have the bar button item and tapping it works; I believe tapping it just invokes its action on its target and there is no much wizardry in thaqt. Is the item we’re talking about the same item that the split view controller sends to you in -splitViewController:willHideViewController:withBarButtonItem:forPopoverController: ? If that is the case, does something along the line of [[item target] performSelector:@selector(action) withObject:item] work? Doing that works, it just strikes me as a hack. But I guess it's what I'll have to go with. Thanks! The exact line I wrote is: [self.popoverButtonItem.target performSelector: self.popoverButtonItem.action withObject: self.popoverButtonItem]; -- Rick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Why is my app generating warnings about Deregistering for sleep notifications?
Hi all. Looking over some logs from my phone, I'm seeing lots of Warning: [Warning] Deregistering for sleep notifications when we have not registered and also Warning: [Warning] IORegisterForSystemPower failed I'm also getting deny iokit-open RootDomainUserClient. It's pretty much the combo that this guy's reporting here: http://jira.appcelerator.org/browse/TIMOB-3303 Anybody know why these warnings are being issued? Thanks! Gavin ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Multi-OS API Question
On Jun 3, 2011, at 6:57 PM, Heizer, Charles wrote: I'm using some API's which are only available on 10.5 and above but I want to compile my app to run on 10.4 and higher. How can I include multiple bits of code so that if the system is running 10.4 it will run Code A and if 10.5 and higher run Code B? Example if ( os == 104 ) { // Run 10.4 Code } elseif ( os = 105 ) { // Run 10.5 and higher API } This is the Apple documentation on this subject: http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/cross_development/ Regards, Ken ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSTerminateLater and thread
Besides from the fact I didn't care about the aborted logout, I was wrong anyway due to bad memory :( But you can bring up an application modal window after detaching the secondary thread in applicationShouldTerminate, giving the user options like cancelling, showing a progress indicator etc.. Repeatedly call runModalSession until the task is finished or the user cancelled. This worked fine for me in a similar situation. I guess a logout will time out anyway if the task takes too long. Cheers, Peter Am 03.06.2011 um 22:23 schrieb Leonardo: Thank you Kyle, however, I realize, it's incredible there is no way to execute a task before quitting the app. I easily run a task at launch but I can't run a task before quit. The problem is that the task could a few minutes and the app should remain responsive to the user, in the best Mac tradition. I will struggle myself some day more on this issue. Let's cross the fingers. Regards -- Leonardo Da: Kyle Sluder kyle.slu...@gmail.com Data: Fri, 3 Jun 2011 11:35:41 -0700 A: Peter Lübke sound-fab...@gmx.de Cc: Leonardo mac.iphone@gmail.com, Cocoa Developers cocoa-dev@lists.apple.com Oggetto: Re: NSTerminateLater and thread 2011/6/3 Peter Lübke sound-fab...@gmx.de: Return NSTerminateCancel when applicationShouldTerminate calls ExecuteLogOutTask to be performed in a secondary thread. At the end of your ExecuteLogOutTask method, call something like [myApplicationDelegate performSelectorOnMainThread: (logOutTaskDidFinish) withObject:nil waitUntilDone:NO]. Then, in logOutTaskDidFinish, call NSApplication's -terminate: method and set a flag indicating that ExecuteLogOutTask was already executed. The next time applicationShouldTerminate is called, return NSTerminateNow if this flag is has been set so ExecuteLogOutTask is not called forever. That's not going to resume the aborted logout. Leonardo, you will need to either finish your task in the time allotted by NSTerminateLater, or you will need to abort logout. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Good and updated book for iPhone development
Hi Guys, I have some general experience on programming (8 years) but I'm just starting on Cocoa / Objective-C world now. Currently I'm reading the: Cocoa Programming by Pragmatic Programmershttp://pragprog.com/titles/dscpq/cocoa-programming http://pragprog.com/titles/dscpq/cocoa-programmingThis book is a nice intro and cover the basics nice, but after I finish it I wanna get some book for iPhone specific stuff, if possible some updated book for XCode 4 and iOS 4. What you guys can recommend to me? Thanks --- Wilker Lúcio http://about.me/wilkerlucio/bio Kajabi Consultant +55 81 82556600 ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Good and updated book for iPhone development
I like Programming iOS4 by Matt Neuburg (O'Reilly) David On Jun 2, 2011, at 1:37 AM, Wilker wrote: Hi Guys, I have some general experience on programming (8 years) but I'm just starting on Cocoa / Objective-C world now. Currently I'm reading the: Cocoa Programming by Pragmatic Programmershttp://pragprog.com/titles/dscpq/cocoa-programming http://pragprog.com/titles/dscpq/cocoa-programmingThis book is a nice intro and cover the basics nice, but after I finish it I wanna get some book for iPhone specific stuff, if possible some updated book for XCode 4 and iOS 4. What you guys can recommend to me? Thanks --- Wilker Lúcio http://about.me/wilkerlucio/bio Kajabi Consultant +55 81 82556600 ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/rowlandd%40sbcglobal.net This email sent to rowla...@sbcglobal.net ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
inApp Purchases
How do you decode the information sent from apple when you verify a receipt? I send the data to apple and they send what appears to be a json object back however I have tried a bunch of ways to decode the json object and all I get is a null return. I'm using a php script for the verify. Is there something about the return data that I am missing?___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Good and updated book for iPhone development
Beginning iphone 4 prograaming by jeff lamarche i tought Rikza Azriyan Student of Sriwijaya University Palembang, Indonesia Sent from my iPhone 4 Provided by Telkomsel. On Jun 4, 2011, at 11:46 AM, David Rowland rowla...@sbcglobal.net wrote: I like Programming iOS4 by Matt Neuburg (O'Reilly) David On Jun 2, 2011, at 1:37 AM, Wilker wrote: Hi Guys, I have some general experience on programming (8 years) but I'm just starting on Cocoa / Objective-C world now. Currently I'm reading the: Cocoa Programming by Pragmatic Programmershttp://pragprog.com/titles/dscpq/cocoa-programming http://pragprog.com/titles/dscpq/cocoa-programmingThis book is a nice intro and cover the basics nice, but after I finish it I wanna get some book for iPhone specific stuff, if possible some updated book for XCode 4 and iOS 4. What you guys can recommend to me? Thanks --- Wilker Lúcio http://about.me/wilkerlucio/bio Kajabi Consultant +55 81 82556600 ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/rowlandd%40sbcglobal.net This email sent to rowla...@sbcglobal.net ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/rikzaxtrmsprt%40yahoo.com This email sent to rikzaxtrms...@yahoo.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com