Post

Replies

Boosts

Views

Activity

Reply to Shortcuts Action with File parameter as input conflicts with Sandbox
Hi there, yes I do receive the file from the input and I've also figured out how to access the file with the Sandbox enabled:     func handle(intent: ExamplePDFIntent, completion: @escaping (ExamplePDFIntentResponse) -> Void) {         if let files = intent.files, {             var outputFiles = [INFile]()             for file in files {                 if file.fileURL!.startAccessingSecurityScopedResource() { //do your work here file.fileURL!.stopAccessingSecurityScopedResource() } else { //don't forget error handling } } } } So we have to use security scopes: https://developer.apple.com/documentation/foundation/url/1779698-startaccessingsecurityscopedreso Makes sense now that I know it :) Cheers
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’21
Reply to Xcode 12.0 B2 SwiftUI - Bottom toolbar after List in ContentView no longer displays.
You could als just use ToolbarItemGroup: struct ContentView: View {   var body: some View {     NavigationView {       List {         ForEach (1..<10) {           row in           Text("\(row) - Test").foregroundColor(Color.white).fontWeight(.bold)         }         .listRowBackground(Color.burgundy)       }             .navigationTitle(Text("List Background Color Test"))       .navigationBarTitleDisplayMode(.inline)       .toolbar {         ToolbarItemGroup(placement: .bottomBar) {           HStack {             Button(action: {}, label: {               Text("One").foregroundColor(Color.white)             })             Spacer()             Button(action: {}, label: {               Text("Two").foregroundColor(Color.white)             })             Spacer()             Button(action: {}, label: {               Text("Three").foregroundColor(Color.white)             }).foregroundColor(.blue)           }         }       }           }               } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’21
Reply to TipKit: showing a popover tip on a SwiftUI toolbar button
Thanks, but it doesn't seem to be a workaround anymore. :( import TipKit struct ContentView: View { struct ExampleTip: Tip { var title: Text { Text("title") } var message: Text? { Text("message") } } var body: some View { Text("Hello world") // .popoverTip(NewSnippetTip()) //This works .toolbar(content: { ToolbarItemGroup(placement: ToolbarItemPlacement.bottomBar) { Button(action: {}) { Label("New Snippet", systemImage: "doc.badge.plus") } .buttonStyle(.plain) // WORKAROUND: Adding this line does NOT fix the issue. .popoverTip(ExampleTip()) } }) } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’23
Reply to Bonjour for discovering a specific device's ip
Hi there, I struggle to get the mDNS name using _services._dns-sd._udp on iOS 26.1. I tried two methods: NetServiceBrowser always gives me ["NSNetServicesErrorCode": -72008 (missingRequiredConfigurationError), "NSNetServicesErrorDomain": 10] DNSServiceBrowser fails with NoAuth I also tried NWBrowser, but learned that it does not work with _services._dns-sd._udp. My Info.plist: <key>NSBonjourServices</key> <array> <string>_services._dns-sd._udp</string> </array> <key>NSLocalNetworkUsageDescription</key> <string>mDNS_Browser needs to have network access to search for Multicast services</string> I tested it with a physical device, none of the above methods work. The strange thing is that NSBonjourServices works in the simulator the first time I use it but then fails, DNSServiceBrowser does not work. But with macOS 17 DNSServiceBrowser works but NSBonjourServices does not. This is so random, I am out of ideas. Here is an example project that can be used to test both methods: GitHub @DTS Engineer :)
Nov ’25
Reply to Can't change Developer Account Address
You can contact them here: https://developer.apple.com/contact/topic/select
Replies
Boosts
Views
Activity
Aug ’21
Reply to Update address/country of apple developer account
You have to contact Apple directly via https://developer.apple.com/contact/topic/select That's probably because depending on the state of your business, they need some legal documents.
Replies
Boosts
Views
Activity
Aug ’21
Reply to Shortcuts Action with File parameter as input conflicts with Sandbox
Hi there, yes I do receive the file from the input and I've also figured out how to access the file with the Sandbox enabled:     func handle(intent: ExamplePDFIntent, completion: @escaping (ExamplePDFIntentResponse) -> Void) {         if let files = intent.files, {             var outputFiles = [INFile]()             for file in files {                 if file.fileURL!.startAccessingSecurityScopedResource() { //do your work here file.fileURL!.stopAccessingSecurityScopedResource() } else { //don't forget error handling } } } } So we have to use security scopes: https://developer.apple.com/documentation/foundation/url/1779698-startaccessingsecurityscopedreso Makes sense now that I know it :) Cheers
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Shortcuts Action with File parameter as input conflicts with Sandbox
So your Shortcuts Workflow looks more or less like this? Did you check the Privacy section?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Shortcuts Action with File parameter as input conflicts with Sandbox
Vincent, you have to uncheck "Ask Where To Save"
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to Xcode 12.0 B2 SwiftUI - Bottom toolbar after List in ContentView no longer displays.
You could als just use ToolbarItemGroup: struct ContentView: View {   var body: some View {     NavigationView {       List {         ForEach (1..<10) {           row in           Text("\(row) - Test").foregroundColor(Color.white).fontWeight(.bold)         }         .listRowBackground(Color.burgundy)       }             .navigationTitle(Text("List Background Color Test"))       .navigationBarTitleDisplayMode(.inline)       .toolbar {         ToolbarItemGroup(placement: .bottomBar) {           HStack {             Button(action: {}, label: {               Text("One").foregroundColor(Color.white)             })             Spacer()             Button(action: {}, label: {               Text("Two").foregroundColor(Color.white)             })             Spacer()             Button(action: {}, label: {               Text("Three").foregroundColor(Color.white)             }).foregroundColor(.blue)           }         }       }           }               } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to SFSpeechRecognizer kLSRErrorDomain 102
Have you been able to fix the issue? I've got the same error. On macOS it works fine, on iOs it gives me this error. url.startAccessingSecurityScopedResource() does not help. Also it works with request.requiresOnDeviceRecognition = false
Topic: Machine Learning & AI SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’22
Reply to TipKit: showing a popover tip on a SwiftUI toolbar button
Thanks, but it doesn't seem to be a workaround anymore. :( import TipKit struct ContentView: View { struct ExampleTip: Tip { var title: Text { Text("title") } var message: Text? { Text("message") } } var body: some View { Text("Hello world") // .popoverTip(NewSnippetTip()) //This works .toolbar(content: { ToolbarItemGroup(placement: ToolbarItemPlacement.bottomBar) { Button(action: {}) { Label("New Snippet", systemImage: "doc.badge.plus") } .buttonStyle(.plain) // WORKAROUND: Adding this line does NOT fix the issue. .popoverTip(ExampleTip()) } }) } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to fileImporter not showing
One reason for this could be that a parent view already has a fileImporter modifier. For example the initial content view.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’24
Reply to App rejected due to Guideline 3.2.2 - Business - Other Business Model Issues - Unacceptable
You can respond and explain that your app displays non-App Store apps. Ensure everyone understands that your app focuses solely on desktop console video games.
Replies
Boosts
Views
Activity
Mar ’24
Reply to Cloudkit com.apple.developer.icloud-container-environment set to Production fails
I just had the same error with the signing errors. For com.apple.developer.icloud-container-environment i set production or development, however it has to be Production or Development. Capital P or D. :)
Topic: Code Signing SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to App Groups: How to use group. prefix and Team ID prefix for Multiplatform apps?
Thanks, Rico. Unfortunately, CloudKit can’t replace the app group for my use case, so I’ll need to separate the targets. Hopefully, future versions of Xcode will eliminate the need for this workaround.
Replies
Boosts
Views
Activity
Nov ’24
Reply to Bonjour for discovering a specific device's ip
Hi there, I struggle to get the mDNS name using _services._dns-sd._udp on iOS 26.1. I tried two methods: NetServiceBrowser always gives me ["NSNetServicesErrorCode": -72008 (missingRequiredConfigurationError), "NSNetServicesErrorDomain": 10] DNSServiceBrowser fails with NoAuth I also tried NWBrowser, but learned that it does not work with _services._dns-sd._udp. My Info.plist: <key>NSBonjourServices</key> <array> <string>_services._dns-sd._udp</string> </array> <key>NSLocalNetworkUsageDescription</key> <string>mDNS_Browser needs to have network access to search for Multicast services</string> I tested it with a physical device, none of the above methods work. The strange thing is that NSBonjourServices works in the simulator the first time I use it but then fails, DNSServiceBrowser does not work. But with macOS 17 DNSServiceBrowser works but NSBonjourServices does not. This is so random, I am out of ideas. Here is an example project that can be used to test both methods: GitHub @DTS Engineer :)
Replies
Boosts
Views
Activity
Nov ’25