Post not yet marked as solved
Using Xcode 11.6; Swift; deploying to iOS.
The app has a ~250M SQLite database as a core resource.
The database is built up by importing a dozen .txt files. This process takes considerable time.
I have used the simulator to build up the database. I then obtained the .sqlite file from the macOS filesystem and include it in the iOS app Resources.
Since this database will undergo changes as the app is used, during first use the .sqlite file id copied to the .applicationSupportDirectory.
The original file in the mainBundle remains useful in the event that the user wishes to 'reset to factory'.
All of this is working fine and as expected.
My concern is the 2x usage of the users storage:
250M in mainBundle + 250M in .applicationSupport....
I have tried using Swift [data].compressed(using: .lz4) and .decompressed() ... The .compressed() works as expected and results in a ~65M file.. BUT the .decompressed() never finishes and never errors - it simply runs until the process is killed... Are there known issues with .sqlite files?
Is there a better strategy?
I really would like to understand the best practice for deploying a large .sqlite file without using 2x the storage...
Any feedback is appreciated.
Post not yet marked as solved
Will Apple respond to all DTK applicants regardless of outcome? e.g. will someone be informed that they will not be receiving the DTK?
Is there any guidance on when the final outcome of applications will be known?
Post not yet marked as solved
Will the Translate capability for Siri be available through an API?
A very quick look through Dev Docs in Xcode 12 didn't turn anything so I'm guessing not. So devs are till stuck with Google Translate within their apps.....
Any links which contradict this hypothesis would be appreciated...
I've been rummaging aroud trying to figure out best path to reading a barcode on iOS.
I see related code in both Vision and AVFoundation..
Anyone have thoughts on why I would choose one over the other?
Thank-You
Post not yet marked as solved
How is it decided when an app clip is shown? Is there documentation explaining this?
If there is contention in a given context between 2 or more App Clips how is it decided which App Clip is presented?
a background SKProductsRequest that has been working for nearly a year is suddenly coming back via- (void) request:(SKProductsRequest *)request didFailWithError:(NSError *)error {Request:<SKProductsRequest: 0x60000030df20> ERROR: Error Domain=AMSErrorDomain Code=301 "Invalid Status Code" UserInfo={AMSStatusCode=502, NSLocalizedDescription=Invalid Status Code, NSLocalizedFailureReason=The response has an invalid status code}Anybody have any useful thoughts here?
I have a macOS app that uses compiled AppleScript to enage with Microsoft Outlook.This app used to function correctly and is currently approved for sale in the Mac App Store.Now in development on macOS 10.15.5 with Xcode 11.5 I am getting this:NSAppleScriptErrorAppName = "Microsoft Outlook";
NSAppleScriptErrorBriefMessage = "Not authorized to send Apple events to Microsoft Outlook.";
NSAppleScriptErrorMessage = "Not authorized to send Apple events to Microsoft Outlook.";
NSAppleScriptErrorNumber = "-1743";
NSAppleScriptErrorRange = "NSRange: {51, 13}";I have the entitlement set:<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<string>com.microsoft.outlook</string>
</array>
</plist>I have the explanation in the info.plist:<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<string>WhoDo uses AppleEvents to create contacts in Outlook and optionally open Outlook after creating a contact.</string>
</plist>I have checked (and set & reset) the Privacy preference in System Preferences.Has something changed in Catalina that I am missing here!This used to work just fine??Thanks for any thoughts!Steve
I have a macOS application (10.15.4 Xcode 11.4.1) that has all the necessary entitlements to execute AppleScript against 'Contacts'.The script works correctly but I am experiencing a 9 second interval to execute this trivial script:tell application "Contacts" to return the id of the first person whose selected is trueI have experimented with executing this as a compiled script or as [[[NSAppleScript alloc] initWithSource:@"..."];I see the same time interval either way.So two questions:1) Why would the time be the same if it had already been compiled?2) Why on earth does it take that long to execute?Any thoughts appreciated!
Post not yet marked as solved
I have a macOS app which works with the CNContacts framwork.Everything is functioning as expected.I have had a recent request to add functionality which would be best served by opening the 'Contacts' application to a specific contact.I have in the past had this work:[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"addressbook://%@", currentContact.identifier]]];What I observe in Catalina is that this works correctly ONLY IF 'Contact's is not running at the time this is executed.If 'Contacts' IS running when this is executed then a spurious empty 'Contacts' window is opened on top of the current view.Anyone have any useful thoughts?Thanks,Steve
Folks;I'm seeing some behavior I don't understand related to 'Privacy : Automation' (Xcode 11.4 Catalina 10.15.4)My macOS app uses AppleScript to interact with ~20 other mainstream macOS applications (Safari, Chrome, Word, etc..)All of this used to work in Mojave (and I'm pretty certain earlier Catalina)I've been noticing some strange results during testing so I have reset Privacy for my app using 'tccutil reset All com.someName.myAppName'This reset has been successful - in System Preferences I no longer see my app under the 'Automation' area.HOWEVERwhen my app is about to execute AppleScript to another app it first executes:OSStatus status = AEDeterminePermissionToAutomateTarget(targetAppEventDescriptor.aeDesc, typeWildCard, typeWildCard, false);after the reset above, this now returns 'errAEEventWouldRequireUserConsent'after receiving this 'wouldRequire' response my app executes:OSStatus status = AEDeterminePermissionToAutomateTarget(targetAppEventDescriptor.aeDesc, typeWildCard, typeWildCard, true);this is now ALWAYS returning 'errAEEventNotPermitted'.This paradigm used to work very nicely.Is there some information that I have missed?My hunch is that 'typeWildCard' for AEEventClass and AEEventID are now problematic...Any help here would be deeply appreciated!Steve
Post not yet marked as solved
Xcode 11.4 installed this morning after updating to 10.15.4.now when I try and drag a button onto a tabView item Xcode spikes CPU usage to over 100%; the UI feedback in Xcode is VERY slow and the normal 'insertion mark' on the left in the view hierarchy just bounces around and never stabilizes to indicate the drop location.I have spent nearly an hour trying to place a button on a tabView!!I have restarted the machine and switched pointing devices.Does anyone have any suggestions?
Folks;macOS 10.15 - Xcode 11.3.1I've been somewhat successful getting this method to create a PDFDocument from the contents of an NSTextView.However, the contents of this NSTextView is an NSAttributedString (set using TextStorage).The view behaves as expected and there is .pdf document created.The contents of the .pdf file appears to be the .string value of the NSTextView.How do I use this NSPrintOperation to produce a PDFDocument which retains the attributed string?Thanks for any thoughts!SteveBTW: If anyone has a means of producing a PDFDocument from NSAttributedString for macOS that does not involve NSPrintOperation I would appreciate a quick example or a link... I used to use 'cupsfilter' but it has been marked deprecated AND it also yields this same result... It logs'cupsfilter: No filter to convert from text/rtf to application/pdf.' but creates the file...(but loses the attributed string)
Post not yet marked as solved
Folks;I'm looking at CNContacts ability to supply some localized values.In my very first test I'm setting NSString *test = [CNLabeledValue localizedStringForLabel:CNLabelHome];The value that gets assigned is 'domicile' !I'm running macOS 10.15.2 & Xcode 11.3 with only English specified in System Prefs - Language & Region - preferred languagesI have not localized any storyboards.The Project does NOT have 'Use Base Internationalization' turned on and has 'English - Development Langauge' as the only localization.The [NSLocale currentLocale] is 'en_US'.I had expected the result to 'Home' since the localization for the mac should be English...How do I detemine how this method is using the French language for its localization?All insights appreciated!Steve
Post not yet marked as solved
Folks;I have a set of auto renewable subscriptions working for iPhone and iPad.I'm now beginning to explore all the nooks and crannies of delivering a localized version of the product.The UI aspect seems pretty straightforward.In the case of auto-renewables my best understanding is that the app needs to display information per Schedule 2 of the Paid Applications Developer Agreement... My app contains the following boilerplate language:"This is an auto-renewing subscription. A payment will be charged to your account at the end of your 3 day free trial. Your subscription will automatically renew unless it is canceled at least 24 hours before the end of the current period. Your account will be charged for the renewal within 24 hours prior to the end of the current period. You can manage and cancel your subscriptions by going to your @account settings@ on the App Store after purchase. For more information please see our @TermsOfService@ and @PrivacyStatement@."My recollection is that this language was specifically required and reviewed by App Store Review.The '@' designates a hyperlink will be rendered at that text to provide access to the developer website.Is there any means that Apple can provide localized versions of the required boilerplate?I guess I'm not confident that a random translation service would render something that would pass Apple's legal inspection.For example, go the App Store and examine the 'Terms and Conditions' document and review the 'Subscriptions' entry.Since Apple is requiring that the app internally provide this information in order that the user is fully informed it would seem reasonable that they could provide different text for different markets. (It would appear that they already do via the 'Terms and Conditions' mentioned above.) It seems to me that a more efficient solution to this whole issue it provide a mechanism for Apple to supply text (the 'Subscription' secction) which adequately describes the subscription information to the satisfaction of Apple legal - if this were the case then a standard boilerplate could be supplied and everyone would be better served... As it is the user is faced with a myriad of different stated and translated texts that may read quite differently and require an onerous effort to understand ...Any thoughts or reflections appreciated.Steve