I discovered this nugget of Apple Documentation. It visualises how the scheme is the link specifying which build target is used by the test target. Unfortunately this doesn't seem to be the case. The host application field in the test target (general tab) appears to be the main determinator. So my assumptions above seem to be correct, and you can be easily be misled into assuming one build target is used whereas in fact another target is used.
Tip: Include a screenshot of the about page of your app/clip/widget to avoid being misled.
Post
Replies
Boosts
Views
Activity
Here's the code:
https://github.com/alanrick/CreateMLImageDistributor
Solved. I'm not sure where or how Sandbox is selected as a capability. I'd much rather it wasn't. But my problem was that User Selected File (see screenshot above) was specified as read/write in the release tab, but none in the debug tab.
Same problem in Sequoa 15.1.
But, when I copy the same code into another project it works. There must be some project/profile/info.plist setting that makes all the difference π
I'm also getting a 513 error no matter what I code. I even tried using chatGTP and Harmony and Copilot generated code. All to no avail.
Here's the copilot code (as it seemed better to me)
func copilotCreateTheNewDirectory(in downloadsURL: URL)
{
guard downloadsURL.startAccessingSecurityScopedResource() else {
let errorMessage = "Failed to access the selected location"
showError = true
return
}
defer {
downloadsURL.stopAccessingSecurityScopedResource()
}
let newDir = "myShinyNewDir"
let fileManager = FileManager.default
let newDirectoryURL = downloadsURL.appendingPathComponent(newDir)
do {
try fileManager.createDirectory(
at: newDirectoryURL,
withIntermediateDirectories: false,
attributes: nil
)
} catch {
let errorMessage = "Failed to create directory: \(error.localizedDescription)"
showError = true
}
}
}
I tried using Swift5 instead of Swift6 and that failed, too.
I tried in Documents and Downloads locations - all failed.
Here are my App Sandbox settings:
Xcode: Version 16.0 (16A242d)
MacOS: Sequoa 15.0.1
I created this enhancement request: FB15562835
I also coded a small MacOS App to generate folders and copy images into them based on a spreadsheet. This satisfies my requirements, but of course I'd prefer this capability to be available directly in CreateML.
I'll put the App's code in GitHub soon.
One of my projects crashes consistently every few minutes in Xcode 16.0 so I set it to legacy preview.
Keywords in case anyone else googles for the problem:
AccessibilityControlsExtension
Responsible Process: SimulatorTrampoline
I compiled this using Xcode 16RC 16A242 (instead of 15) and it now just about works.
In iPadOS 18RC it works perfectly.
In iOS 17.6.1 the swipe does not react when started from on top of the button but the showTab2 property does not change either so it remains consistent.
It seems this is a problem in Xcode 15 but it has been fixed in Xcode 16 as Sydney π suggested.
PS: πKudus to Xcode Cloud for making this test so easy to perform. I'd never used it before and it was truly simple to onboard.
(Post obsolete)
Hi Sydney,
Xcode Version 15.4 (15F31d)
Swift 5 (according to the build settings) I'm surprised, but can't figure yet how to update to 5.1.
The code is running on the simulator (iPhone 15) and also iPadOS 18.0 (22A3354) iPad Air and iOS 17.6.1 on an iPhone 13 Pro.
I checked all gesture attributes and couldn't find anything dodgy about them.
Here's the video: https://youtube.com/shorts/SVlESw5nGX0?si=5JCUgu2iYBCh9Smk
Thanks for your interest,
Alan
I used Rob the Artist's solution in a different context and it worked perfectly. I was struggling with how to inject a @Namespace in a class that required initialisation into the preview. I'm a newbie so much appreciated the simplicity of the solution.
#Preview {
struct RectButtonPreview: View {
@Namespace var slideLevel
var body: some View {
RectButtonView(buttonCol: .blue, selected: true)
.environment(SlideAnimations(slideLevel: slideLevel))
}
}
return RectButtonPreview()
}
Here's the nub...
The scheme does not directly include a reference to the platform used, but it does directly reference the Targets config, which determines the platform used. I had assumed that I select the Target by placing the cursor on the Targets config when building the archive, but this is irrelevant π€¦ββοΈ And the Targets config used is specified in the Builds tab, not the archive tab (where I'd expected it)
Such a simple solution - now I finally understand the relation between Targets, Schemes and the builds.
Success!
I switched to a different scheme and then the correct destination appeared. I've no idea which of the dip switches was relevant but once I've identified the scheme setting I'll post the answer here.
It is already the target Supported destination.
It's also in the included in the project Deployment
And it's in the target architecture
Just now I added it to the Targeted Device Families for vision OS deployment but that didn't help.
There are so many different tabs and settings... is there a way of getting this in xml/json to pinpoint the entry that is missing?
It did indeed. Many thanks!