Post

Replies

Boosts

Views

Activity

Get the title view of an editor style UINavigationItem (iOS 16+)
I'd like to match the behaviour of the new Freeform app by offering an Export as PDF function accessible from the title menu. I can't figure out how to get the actual view that displays the document menu to supply as the UIActivityViewController's popoverPresentationController source view. The Freeform app shows the PDF document sharing popover directly under the little arrow to the right of the document title, so there must be a way.
3
0
933
Dec ’22
Slow framework unit test failure (~5s)
Starting from Xcode 12.4 (I think), failing unit tests in framework targets take about 5 seconds to complete. Successful tests complete almost instantly (as expected). For example, the following test:     func testExampleFailure() {         XCTFail()     } Takes 4.356 seconds to execute on my 2019 MacBook Pro: Test Case '-[FrameworkTests.FrameworkTests testExampleFailure]' failed (4.356 seconds). This seems to only affect unit tests in Framework targets (unit tests for App targets are unaffected). I have also tested this in fresh Framework template projects across multiple Macs, so it appears to be an Xcode bug. I'd hoped Xcode 13 would fix this issue, but it persists for me on Monterey. Perhaps someone could suggest a workaround?
9
7
3.3k
Oct ’21
App Sandbox for "droplets"
My Mac app produces mini Mac apps configured for a particular purpose. Panic's Transmit does something similar with "droplets". These little .app bundles are generated at runtime, and each embeds a unique file specified by the user in its Resources folder. I would like the scaffold for these mini apps to use the App Sandbox (there's no reason not to, as they only access a single file from within their own bundles). However, I can't code-sign the scaffold when building it from Xcode, as embedding a new resouce later will void the code signature (and then Gatekeeper will reject it, if it ever ends up in quarantine). Is there a correct way to do something like this? The mini apps are not notarized or DeveloperID signed (that's fine, users can open them with control-clicking-open), but I would like to maximize security if at all possible, and use the sandbox.
15
0
1.8k
Aug ’20
Xcode 11.4: 'Target Integrity Error' for embedded Catalyst app
I'm writing an AppKit app which needs to send HTML email. Unfortuantely there is no API in AppKit for doing so. There is however MFMessageComposeViewController in iOS/Catalyst.The approach I have been using is to embed a "Mail Assistant" Catalyst helper app inside my main AppKit app's bundle. The main app launches this helper app when it needs to send HTML email. It has been working great.(this approach was inspired by Drafts: https://docs.getdrafts.com/misc/mail-assistant)Unfortunately, Xcode 11.4 does not seem to like Catalyst helper apps being inside the bundle of AppKit apps. When building using 11.4, I get the following error:"Target Integrity: Building for macOS, but the embedded app 'Mail Assistant.app' was built for Mac Catalyst.I can't see any real problem fundamentally with my approach, yet it seems Apple has decided to prevent this kind of AppKit-Catalyst cooperation.Can anyone think of a workaround, or will I be forced to remove the HTML mail sending feature from my AppKit app?
0
0
1.3k
Mar ’20
Installing Catalina on external HD deleted all my files
Yesterday I installed the Catalina Beta 7 on an external HD that I use for photo storage as well. My photos were in a folder called Photos at the root of the hard drive. After upgrading the HD from Mojave (which I had already installed on the drive) to Catalina, I noticed that the entire photos folder (about 1TB of data) was missing.Finder still shows my external drive as having 1 TB used, so I'm assuming my files are somewhere, but I can't find them.I found in the release notes for Beta 1 (I installed Beta 7), this message:"During upgrades to macOS 10.15, files and folders stored at the root-level of a volume are moved aside to /Library/SystemMigration/History/Migration-UUID/QuarantineRoot/."However there is only a 59 KB file "Request" in that folder. It sounds like root level files are not safe during installation of Catalina, which is probably an issue for others installing on an externa drive that's also used for storage.Any suggestions for recovering my precious photos?
7
0
2.3k
Sep ’19
Entitlement to open helper app inside bundle?
I include a faceless helper app inside my main app's bundle (inside the SharedSupport directory). The first time I go to launch it using NSWorkspace, the system presents a dialog:"You are opening the application “HelperApp” for the first time. Are you sure you want to open this application?The application is in a folder named “SharedSupport”. To see the application in the Finder without opening it, click Show Application."The user can choose cancel and the helper will not be launched. This is a bit annoying and confusing for the user, and a bit of an implementation leak. Is there any way I can include a permission in the entitlements for my main app, or some other way to bypass the dialog?
4
0
1.5k
Feb ’19