Post

Replies

Boosts

Views

Activity

Swift Student Challenge requires Swift Playground (.swiftpm), minimum OS setting not available.
When making a new Swift Playground via Xcode > New > Project > iOS > App Playground, as a .swiftpm package, the settings are very limited, including setting the minimum OS version. This is incredibly irritating because I can't keep make @available blocks because that would double the size of my code, and I can't use SwiftData (for example) because my app needs to also support iOS 16. Is there a way to set the minimum OS or some other upload type accepted for Apple so that I can change this simple setting? Thank you
2
0
898
Oct ’24
Xcode Predictive Code Completion can't download
I got the Xcode 16 beta a few months and I downloaded the predictive code completion model, and it worked, but then recently I deleted Xcode and the Developer directories and then installed a newer beta, but I couldn't download the model because of this issue: "The operation couldn’t be completed. (ModelCatalog.CatalogErrors.AssetErrors error 1.)" AND "Failed - Failed to find asset: com.apple.gm.safety_deny.input.code_intelligence.base - no asset" Then expanding this window gave me this error: The operation couldn’t be completed. (ModelCatalog.CatalogErrors.AssetErrors error 1.) Domain: ModelCatalog.CatalogErrors.AssetErrors Code: 1 User Info: { DVTErrorCreationDateKey = "2024-08-22 13:00:57 +0000"; } -- Failed to find asset: com.apple.gm.safety_deny.input.code_intelligence.base - no asset Domain: ModelCatalog.CatalogErrors.AssetErrors Code: 1 -- System Information macOS Version 15.1 (Build 24B5024e) Xcode 16.1 (23047) (Build 16B5001e) Timestamp: 2024-08-22T21:00:57+08:00 I have uninstalled then reinstalled Xcode 16.1 beta and Xcode 16.0 beta, but none of them worked. Thank you!
9
0
2.1k
Sep ’24
Something wrong with SwiftData
I have made the following code to basically play around with haptics: LibraryView.swift import SwiftUI import SwiftData struct LibraryView: View { @Environment(\.modelContext) var modelContext @Query/*(sort: \CustomHaptic.dateMade)*/ var customHapticArray: [CustomHaptic] @Query/*(sort: \DefaultHaptic.dateMade)*/ var defaultHapticArray: [DefaultHaptic] @State private var showingAddCustomHaptic = false @State private var showingAddDefaultHaptic = false var body: some View { NavigationStack { VStack { List { ForEach(customHapticArray) { customHaptic in HStack { VStack { Text("\(customHaptic.sharpness)") Text("") Text("\(customHaptic.intensity)") } Spacer() VStack { Text("\(customHaptic.repeats)") } } } } } .sheet(isPresented: $showingAddCustomHaptic, content: { NewCustomHaptic() }) .toolbar { Button("New Custom Haptic", systemImage: "plus") { showingAddCustomHaptic = true } } .navigationTitle("Haptikiser") } } } And NewCustomHaptic.swift, which is a sheet to add a new class CustomHaptic: @Model class CustomHaptic: Identifiable { var id = UUID() var dateMade = Date.now var repeats: Int var sharpness: Float var intensity: Float init(repeats: Int, sharpness: Float, intensity: Float) { self.repeats = repeats self.sharpness = sharpness self.intensity = intensity } } and import SwiftUI import SwiftData struct NewCustomHaptic: View { @Environment(\.dismiss) var dismiss @Environment(\.modelContext) var modelContext @Query(sort: \CustomHaptic.dateMade) var customHapticArray: [CustomHaptic] @State var sharpness: Float = 1 @State var intensity: Float = 1 @State var repeats: Int = 3 let array0to1: [Float] = [0.2, 0.4, 0.6, 0.8, 1.0] var body: some View { VStack { Form { Section("Sharpness") { Picker(selection: $sharpness, label: Label("Sharpness", systemImage: "bolt.horizontal")) { ForEach(array0to1, id: \.self) { i in Text("\(Int(i * 10))") } } .pickerStyle(.segmented) } Section("Intensity") { Picker(selection: $intensity, label: Label("Intensity", systemImage: "42.circle")) { ForEach(array0to1, id: \.self) { i in Text("\(Int(i * 10))") } } .pickerStyle(.segmented) } Section("Repeats") { Stepper(value: $repeats, in: 1...10) { Label("\(repeats)", systemImage: "repeat") } } } Button("Done") { let newCustomHaptic = CustomHaptic(repeats: repeats, sharpness: sharpness, intensity: intensity) modelContext.insert(newCustomHaptic) dismiss() } .buttonStyle(.borderedProminent) .font(.title) Spacer() } } } every single time i run it, i get " Query encountered an error: Error Domain=NSCocoaErrorDomain Code=256 "The file “default.store” couldn’t be opened." " in the console. And when I press done on the sheet, i get the same error. Thank you for helping
0
1
648
Feb ’24
watchOS Smart Stack widget background
A watchOS widget requires you set a container background: .containerBackground(for: .widget) { Color.black } But I see some .accessoryRectangular widgets, on the Smart Stack, using a glass background. From what I know there is no way to set this using .containerBackground. Does anyone know how to do this? Thank you
Replies
4
Boosts
1
Views
174
Activity
3w
Website that tracks all Apple Feedback requests
I remember a long time ago seeing a website that would show every single piece of feedback sent to Apple, not showing the sender. The website looked old but still working. Dies anyone know what it is? Thank you
Replies
1
Boosts
0
Views
494
Activity
Oct ’24
Swift Student Challenge requires Swift Playground (.swiftpm), minimum OS setting not available.
When making a new Swift Playground via Xcode > New > Project > iOS > App Playground, as a .swiftpm package, the settings are very limited, including setting the minimum OS version. This is incredibly irritating because I can't keep make @available blocks because that would double the size of my code, and I can't use SwiftData (for example) because my app needs to also support iOS 16. Is there a way to set the minimum OS or some other upload type accepted for Apple so that I can change this simple setting? Thank you
Replies
2
Boosts
0
Views
898
Activity
Oct ’24
Xcode Predictive Code Completion can't download
I got the Xcode 16 beta a few months and I downloaded the predictive code completion model, and it worked, but then recently I deleted Xcode and the Developer directories and then installed a newer beta, but I couldn't download the model because of this issue: "The operation couldn’t be completed. (ModelCatalog.CatalogErrors.AssetErrors error 1.)" AND "Failed - Failed to find asset: com.apple.gm.safety_deny.input.code_intelligence.base - no asset" Then expanding this window gave me this error: The operation couldn’t be completed. (ModelCatalog.CatalogErrors.AssetErrors error 1.) Domain: ModelCatalog.CatalogErrors.AssetErrors Code: 1 User Info: { DVTErrorCreationDateKey = "2024-08-22 13:00:57 +0000"; } -- Failed to find asset: com.apple.gm.safety_deny.input.code_intelligence.base - no asset Domain: ModelCatalog.CatalogErrors.AssetErrors Code: 1 -- System Information macOS Version 15.1 (Build 24B5024e) Xcode 16.1 (23047) (Build 16B5001e) Timestamp: 2024-08-22T21:00:57+08:00 I have uninstalled then reinstalled Xcode 16.1 beta and Xcode 16.0 beta, but none of them worked. Thank you!
Replies
9
Boosts
0
Views
2.1k
Activity
Sep ’24
Xcode Says " 'App' is only available in macOS 11.0 or newer "
Xcode says 'App' is only available in macOS 11.0 or newer when building an app with a package dependency. As soon as I remove the package, the errors disappear. I anyway set the minimum OS requirements as macOS 14.0+, so how does this error exist?
Replies
1
Boosts
0
Views
614
Activity
Jul ’24
Something wrong with SwiftData
I have made the following code to basically play around with haptics: LibraryView.swift import SwiftUI import SwiftData struct LibraryView: View { @Environment(\.modelContext) var modelContext @Query/*(sort: \CustomHaptic.dateMade)*/ var customHapticArray: [CustomHaptic] @Query/*(sort: \DefaultHaptic.dateMade)*/ var defaultHapticArray: [DefaultHaptic] @State private var showingAddCustomHaptic = false @State private var showingAddDefaultHaptic = false var body: some View { NavigationStack { VStack { List { ForEach(customHapticArray) { customHaptic in HStack { VStack { Text("\(customHaptic.sharpness)") Text("") Text("\(customHaptic.intensity)") } Spacer() VStack { Text("\(customHaptic.repeats)") } } } } } .sheet(isPresented: $showingAddCustomHaptic, content: { NewCustomHaptic() }) .toolbar { Button("New Custom Haptic", systemImage: "plus") { showingAddCustomHaptic = true } } .navigationTitle("Haptikiser") } } } And NewCustomHaptic.swift, which is a sheet to add a new class CustomHaptic: @Model class CustomHaptic: Identifiable { var id = UUID() var dateMade = Date.now var repeats: Int var sharpness: Float var intensity: Float init(repeats: Int, sharpness: Float, intensity: Float) { self.repeats = repeats self.sharpness = sharpness self.intensity = intensity } } and import SwiftUI import SwiftData struct NewCustomHaptic: View { @Environment(\.dismiss) var dismiss @Environment(\.modelContext) var modelContext @Query(sort: \CustomHaptic.dateMade) var customHapticArray: [CustomHaptic] @State var sharpness: Float = 1 @State var intensity: Float = 1 @State var repeats: Int = 3 let array0to1: [Float] = [0.2, 0.4, 0.6, 0.8, 1.0] var body: some View { VStack { Form { Section("Sharpness") { Picker(selection: $sharpness, label: Label("Sharpness", systemImage: "bolt.horizontal")) { ForEach(array0to1, id: \.self) { i in Text("\(Int(i * 10))") } } .pickerStyle(.segmented) } Section("Intensity") { Picker(selection: $intensity, label: Label("Intensity", systemImage: "42.circle")) { ForEach(array0to1, id: \.self) { i in Text("\(Int(i * 10))") } } .pickerStyle(.segmented) } Section("Repeats") { Stepper(value: $repeats, in: 1...10) { Label("\(repeats)", systemImage: "repeat") } } } Button("Done") { let newCustomHaptic = CustomHaptic(repeats: repeats, sharpness: sharpness, intensity: intensity) modelContext.insert(newCustomHaptic) dismiss() } .buttonStyle(.borderedProminent) .font(.title) Spacer() } } } every single time i run it, i get " Query encountered an error: Error Domain=NSCocoaErrorDomain Code=256 "The file “default.store” couldn’t be opened." " in the console. And when I press done on the sheet, i get the same error. Thank you for helping
Replies
0
Boosts
1
Views
648
Activity
Feb ’24