Post

Replies

Boosts

Views

Activity

How can I do some trivial AppleScript from a Swift app?
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
7
0
8.8k
Feb ’23
Use Xcode to see files written by iOS app?
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?
2
1
3.5k
Sep ’21
How can my iPhone app pass CSV files to my Mac?
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.
3
0
1k
Sep ’21