I've got a Swift app that looks at a timeline of occurences. I'd like to be able pop up the Calendar.app, focused on the date a user has selected within the app.Nothing fancy -- no data comes back from Calendar...Using ScriptingBridge, I could imagine just running [on the CalendarApplication that is returned from let calendarApp = SBApplication(url: url)]the method:- (void) viewCalendarAtDate:(NSDate *)at;or perhaps passing a string to the following script:on showDateInCalendar(s as string) tell application "Calendar" view calendar at date s end tellend showDateInCalendarThere seem to be lebenty different ways to approach this problem, but they all seem documented in the style of you-have-to-have-understood-this-once-before-you-can-understand-it-again.Any suggestions, or am I doomed to the command line and Python scripts?Richard
Post
Replies
Boosts
Views
Activity
Years ago, one could use a window in Xcode to select an app being developed on an iPhone, and see the *.sqlite files that the app used for Core Data. One could copy those files back onto the Mac, and so preserve the current state of the app's data.
I've tried to get back to that window in the current Xcode, but with no joy. Can anyone give me a clue as to how to preserve a Core Data state for an iOS app?
I recently got an Apple Watch, and now I have lots of health data on my iPhone. I'd like to get that data onto my Mac, where I can analyze it using statistical packages like "R".
As a kludge, I can run an iPhone app in the debugger to "print" the health data as CSV records to the Xcode output, and then do a "Select All", "Copy" and "Paste" to put the data into Aquamacs, where I can save to a Mac *.csv file and access it using "R"
This is straightforward, but tedious. Does anyone have another suggestion? I've considered using CloudKit or CoreData in iCloud, but both seem like overkill. Is there any way to write a CSV file to iCloud, or to connect to a file URL on my Mac over the local network from the iPhone?
Thanks.
I am developing an iOS app (mostly for myself) where I'm entering a lot of data that would be very tedious to re-enter. Right now, my iPad works fine in CoreData, and the corresponding CloudKit database seem accurate. But I am old enough to remember when Apple decided that my nearly-empty iOS Calendar app was "the truth" and wiped out 25,000 entries on OS-X.
So, I would like a strategy for backing up the current state of either CoreData or CloudKit, in prep for trying out my app on the iPhone. If there is a way to write a file on iOS that would survive a recompile, I don't know how to do it. The only idea I have is to print() *.csv formatted records in the Xcode debugger, and cut-pasting it from Xcode to aquamacs. I'd appreciate any comments...
PS -- I haven't written JavaScript in the last decade.
I have a UIScrollView taking up about the lower third of the screen on an iPhone 6s. The content view is an UIImageView displaying a typical iPhone camera image 2100x1575. When the app first puts an image in the UIImageView/UIScrollView, it is well zoomed in because the scroll view is only about 400x400. At this point single-finger scroll gestures have no effect. If I do a pinch gesture, the zoom effect "wakes up" and I can manipulate the image, but in a way that confuses me. How far I can scroll in the image seems to be affected by the zoom level; surprisingly (to me) I can roam the zoomed-in image over a wider range than the zoomed-out image.
I tried to make sense of what's going on by putting print statements in the scrollViewDidZoom and scrollViewDidScroll delegate methods, but when I do a pinch gesture, I get both zoom AND scroll callbacks from a "purely" pinch gestures.
Where can I find an explanation that deconvolves the behavior of the scroll view?
I am trying to read a straightforward XML file, but I can't get XMLDocument() -- Use of unresolved identifier 'XMLDocument'; did you mean 'UIDocument'?, although I can get XMLParserDelegate() to initialize with the same URL. What am I missing here?
I wanted to enumerate into a photoslibrary to see which image files I have im/exported and used in other places. When I create a directory enumerator, the directory attributes show that I've gotten ahold of the photoslibrary directory, but the enumerator.nextObject returns nil. I see that there are options like DirectoryEnumerator.Options.skipsPackageDescendents, but setting or unsetting the bit has no effect that I can see.The same code works OK with ordinary directories, like ~/Pictures. Unix commands like "find" and "ls" have no problems with iterating into a photoslibrary, so am I condemned to run "find" and read its stdout, rather than using FileManger goodness?