Search results for

“file uri scheme”

81,707 results found

Post

Replies

Boosts

Views

Activity

Reply to Incorrect menu consistency warnings logged in Tahoe for NSStatusItem, performance issues related?
Dear Developers, This is a known issue that the relevant engineering team is aware of. If there is a fix available, we will make sure to update this thread. For those who have not yet filed a bug report, feel free to do so and post the FB number here, to receive automatic updates on the issue. You can see the status of your feedback in Feedback Assistant. There, you can track if the report is still being investigated, has a potential identifiable fix, or has been resolved in another way. The status appears beside the label Resolution. We're unable to share any updates on specific reports on the forums. For more details on when you'll see updates to your report, please see What to expect after submission. Thank you for your patience, Richard Yeh  Developer Technical Support
Topic: UI Frameworks SubTopic: AppKit Tags:
3w
Reply to URLByResolvingAliasFileAtURL: Appears to Be Broken - resolves to the the wrong folder
So if I create an alias of a folder in Finder and hand the alias to my app (I also moved the alias file to a new folder, but I did not move the original folder)... Please file a bug on this and then post the bug number back here. I can explain what's going on, but URLByResolvingAliasFileAtURL should always resolve to the same location as the Finder. Only seems to happen if the folder I move the alias to happens to contain a sibling folder that has the same title as the original folder. So, making things concrete, the actual issue here is the following configuration sequence: (1) Create an alias file to the target beside that target: target target alias NewDir target (2) Move the object into a new directory beside another object with the same name as the target: target NewDir target alias target What's going on here is that bookmark resolution is driven by heuristics, one factor of which is the relative position of the bookmark and its target. Those heuristics are what allow resoluti
Topic: UI Frameworks SubTopic: AppKit Tags:
3w
Reply to NSFileManager getRelationship:ofDirectoryAtURL:toItemAtURL:error: returning NSURLRelationshipSame for Different Directories
FSEventStreamRef reports changes on a directory. I have some comments below, but FSEvents are a complicated topic in their own right. If you've got a product that's actually focused on monitoring and updating a large hierarchy (this isn't actually all that common), then it might be worth starting a new thread that's focused on those issues. Does it work on file reference URLs? No, it takes the opposite approach, which is basically force you to iterate the hierarchy until it happens to stabilize. The core underlying issue here is that the file system doesn't restrict how it's modified and the API it provides only provides a picture of a particular instant in time. That is, when you ask for a directories contents what you actually get is the contents at that instant without any guarantee that they're still the current contents. Most of the time the contents don't change fast enough for that to matter, but in a frequently changing directory the past and now can diverge VERY quickly. You'll note
Topic: App & System Services SubTopic: Core OS Tags:
3w
macOS App Distributed via ZIP Cannot Open — Possible Code Signing / Notarization Issue
My team is distributing a cross-platform app outside the Mac App Store via ZIP file. The app works perfectly on Windows, but on macOS, while the ZIP downloads and extracts without issue, the app refuses to open. Users see either the app appear in the dock then immediately disappear or a Gatekeeper prompt saying the developer cannot be verified. We suspect the root cause is related to code signing and/or notarization, but we're not entirely sure where the breakdown is occurring. We have a few questions as we work through this. For ZIP-based distribution outside the Mac App Store, is both a Developer ID certificate and Apple notarization required on current macOS versions? We've also seen references to using ditto instead of Finder's built-in Compress option when packaging the ZIP. Is that necessary to properly preserve the app bundle structure and extended attributes? Any guidance on where this process might be going wrong would be hugely appreciated. Thanks!
1
0
117
3w
File Export from iOS - eventually import too
iOS 15 - iOS 26.x, SwiftUI, Xcode 26.1.1 (rewritten without links) I’m attempting to add the capability to export a file from CoreData. Since ShareLink requires iOS16+, I found an article showing how to create a UIKit wrapper for 'UIActivityViewController' This does work, but I end up with multiple files instead of one. How do I merge this into one file? Note: I don’t think I want to write to the app’s document directory – rather I’d like to allow the user to export to iCloud. Eventually, I’d like to share a list of dates with descriptions and if someone puts a sensitive date in there – I don’t want it to be left in a directory. I would include a warning that the file that they export needs to be handled with care if there are any sensitive dates. Some might consider birthdays as private information, right? I'd also like to be able to name the file - so far when the share sheet comes up, I select Save to Files and it uses a default name of text.txt My next
Topic: UI Frameworks SubTopic: SwiftUI
6
0
320
3w
Reply to FileManager.replaceItemAt(_:withItemAt:) fails sporadically on ubiquitous items
From your answer, I realise I was overlooking the obvious: after doing the work in the fast temp directory, I then need to create a second temp directory on the slower destination volume using URL(for: .itemReplacementDirectory…), copy the file across, and then use replaceItemAt from there. Sure, that makes sense. I think this is also one of those cases where the broader context of your app and user base is really a really important factor. Some apps (smaller documents, more consumer focused) should do their best to hide all of these details from the user, as they're not really useful/relevant and they just end up creating noise. Other apps (larger documents, more expert focused) benefit from making this visible to the user, as it lets them understand what's going on both to correct any problems (for example, space loss due to save failures) and take advantage of the data you have for them (for example, failure recovery). So any attempts to use that will continue to fail until the kernel (?) has fini
Topic: App & System Services SubTopic: Core OS Tags:
3w
Reply to spctl --type install rejects notarized .pkg on macOS 26 Tahoe (26.3)
Honestly, I’m not sure what’s going on here. None of this sounds at all familiar. I’d like to get a copy of your installer package so that I can poke at it myself. Can you share a link to a download site here? [1] If not, you can file a bug and attach it to your bug report, and then post the bug number here. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com [1] Posty your link in the clear; see tip 14 in Quinn’s Top Ten DevForums Tips.
Topic: Code Signing SubTopic: Notarization Tags:
3w
Reply to XCTest Bundle cannot access local network.
Thanks for filing FB22152886. Zenning on this over the weekend I realised that there’s a much easier solution here. This is based on two key factoids: The app under test must have the Local Network privilege. Local network privacy doesn’t apply to loopback connections. So, you can set up a network listener in your app that listens for incoming connections and, for each one, opens a connection to your accessory and proxies traffic between the two. Your UI test can then connect to 127.0.0.1 and talk to the accessory indirectly through the app. I prototyped this in my office and it seems to work. I recommend that you try it out and see how far you get. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
3w
Reply to User crash report contains ??? instead of my app's symbols and no binary image base address
When running those commands on my M1 Mac I get this: % file /Applications/MyApp.app/Contents/MacOS/MyApp /Applications/MyApp.app/Contents/MacOS/MyApp: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64] /Applications/MyApp.app/Contents/MacOS/MyApp (for architecture x86_64): Mach-O 64-bit executable x86_64 /Applications/MyApp.app/Contents/MacOS/MyApp (for architecture arm64): Mach-O 64-bit executable arm64 and % otool -f /Applications/MyApp.app/Contents/MacOS/MyApp Fat headers fat_magic 0xcafebabe nfat_arch 2 architecture 0 cputype 16777223 cpusubtype 3 capabilities 0x0 offset 16384 size 3190880 align 2^14 (16384) architecture 1 cputype 16777228 cpusubtype 0 capabilities 0x0 offset 3211264 size 3069792 align 2^14 (16384) and ... ==== Non-writable regions for process 14835 REGION TYPE START - END [ VSIZE RSDNT DIRTY SWAP] PRT/MAX SHRMOD PURGE REGION DETAIL __TEXT 10061c000-1008a0000 [ 2576K 2048K 0K 0K] r-x/r-x SM=COW /Applications/MyApp.app/Contents/MacOS/MyA
3w
Reply to User crash report contains ??? instead of my app's symbols and no binary image base address
[quote='878607022, Nickkk, /thread/817724?answerId=878607022#878607022, /profile/Nickkk'] I'm assuming that's what you mean by Mach-O image. [/quote] A Mach-O image is code that can be mapped into memory by the dynamic linker and then run directly, as opposed to something like a .o file that contains code that must be linked before it can be run. I talk more about this in An Apple Library Primer. A Mach-O image is often stored within a universal binary, one image per architecture. So when looking at stuff like this you have to consider the image of the architecture that was running. The other thing to considered is that the dynamic linker may only map in parts of your image. A good way to see what actually gets mapped is to run the app and then run vmmap against it. Consider this: % ls -lh Pages Creator Studio.app/Contents/MacOS/Pages -rwxr-xr-x 1 root wheel 45M 16 Jan 02:44 Pages Creator Studio.app/Contents/MacOS/Pages The Pages executable is 45 MiB. And this: % file Pages Creator Studio.ap
3w
Reply to RealityKit crashes when rendering SpriteKit scene with SKShapeNode in postProcess callback
Thanks for your input. I added the following code in the arView.renderCallbacks.postProcess callback: let depthStencilDescriptor = MTLTextureDescriptor() depthStencilDescriptor.pixelFormat = .depth32Float_stencil8 depthStencilDescriptor.width = context.targetColorTexture.width depthStencilDescriptor.height = context.targetColorTexture.height depthStencilDescriptor.usage = .renderTarget depthStencilDescriptor.storageMode = .private renderPassDescriptor.stencilAttachment.texture = device!.makeTexture(descriptor: depthStencilDescriptor) renderPassDescriptor.stencilAttachment.loadAction = .clear renderPassDescriptor.stencilAttachment.storeAction = .dontCare renderPassDescriptor.stencilAttachment.clearStencil = 0 but the app now crashes with error Assertion failed: (destDepthFormat == jet_texture_format_DepthStencil), function create_render_mode, file jet_context_Metal.mm, line 895. VTPixelTransferSession 420f sid 494 (512.00 x 512.00) [0.00 0.00 512 512] rowbytes( 512, 512 ) Color( kCGColorSpaceSRGB, 0x0
Topic: Graphics & Games SubTopic: RealityKit Tags:
3w
Reply to Incorrect menu consistency warnings logged in Tahoe for NSStatusItem, performance issues related?
Dear Developers, This is a known issue that the relevant engineering team is aware of. If there is a fix available, we will make sure to update this thread. For those who have not yet filed a bug report, feel free to do so and post the FB number here, to receive automatic updates on the issue. You can see the status of your feedback in Feedback Assistant. There, you can track if the report is still being investigated, has a potential identifiable fix, or has been resolved in another way. The status appears beside the label Resolution. We're unable to share any updates on specific reports on the forums. For more details on when you'll see updates to your report, please see What to expect after submission. Thank you for your patience, Richard Yeh  Developer Technical Support
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
3w
Reply to URLByResolvingAliasFileAtURL: Appears to Be Broken - resolves to the the wrong folder
So if I create an alias of a folder in Finder and hand the alias to my app (I also moved the alias file to a new folder, but I did not move the original folder)... Please file a bug on this and then post the bug number back here. I can explain what's going on, but URLByResolvingAliasFileAtURL should always resolve to the same location as the Finder. Only seems to happen if the folder I move the alias to happens to contain a sibling folder that has the same title as the original folder. So, making things concrete, the actual issue here is the following configuration sequence: (1) Create an alias file to the target beside that target: target target alias NewDir target (2) Move the object into a new directory beside another object with the same name as the target: target NewDir target alias target What's going on here is that bookmark resolution is driven by heuristics, one factor of which is the relative position of the bookmark and its target. Those heuristics are what allow resoluti
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
3w
Reply to NSFileManager getRelationship:ofDirectoryAtURL:toItemAtURL:error: returning NSURLRelationshipSame for Different Directories
FSEventStreamRef reports changes on a directory. I have some comments below, but FSEvents are a complicated topic in their own right. If you've got a product that's actually focused on monitoring and updating a large hierarchy (this isn't actually all that common), then it might be worth starting a new thread that's focused on those issues. Does it work on file reference URLs? No, it takes the opposite approach, which is basically force you to iterate the hierarchy until it happens to stabilize. The core underlying issue here is that the file system doesn't restrict how it's modified and the API it provides only provides a picture of a particular instant in time. That is, when you ask for a directories contents what you actually get is the contents at that instant without any guarantee that they're still the current contents. Most of the time the contents don't change fast enough for that to matter, but in a frequently changing directory the past and now can diverge VERY quickly. You'll note
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
3w
Reply to Get UDP/TCP Payload for NWConnections?
Thanks for checking with the network team so quickly! I have filed a bug: FB22181144
Replies
Boosts
Views
Activity
3w
Reply to With iOS in German language, Safari inserts the wrong decimal separator in number inputs
Thank you for your report! I could personally reproduce in French as well. I’d encourage you to file your feedback on https://feedbackassistant.apple.com and share the FB number here for tracking.
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
3w
macOS App Distributed via ZIP Cannot Open — Possible Code Signing / Notarization Issue
My team is distributing a cross-platform app outside the Mac App Store via ZIP file. The app works perfectly on Windows, but on macOS, while the ZIP downloads and extracts without issue, the app refuses to open. Users see either the app appear in the dock then immediately disappear or a Gatekeeper prompt saying the developer cannot be verified. We suspect the root cause is related to code signing and/or notarization, but we're not entirely sure where the breakdown is occurring. We have a few questions as we work through this. For ZIP-based distribution outside the Mac App Store, is both a Developer ID certificate and Apple notarization required on current macOS versions? We've also seen references to using ditto instead of Finder's built-in Compress option when packaging the ZIP. Is that necessary to properly preserve the app bundle structure and extended attributes? Any guidance on where this process might be going wrong would be hugely appreciated. Thanks!
Replies
1
Boosts
0
Views
117
Activity
3w
File Export from iOS - eventually import too
iOS 15 - iOS 26.x, SwiftUI, Xcode 26.1.1 (rewritten without links) I’m attempting to add the capability to export a file from CoreData. Since ShareLink requires iOS16+, I found an article showing how to create a UIKit wrapper for 'UIActivityViewController' This does work, but I end up with multiple files instead of one. How do I merge this into one file? Note: I don’t think I want to write to the app’s document directory – rather I’d like to allow the user to export to iCloud. Eventually, I’d like to share a list of dates with descriptions and if someone puts a sensitive date in there – I don’t want it to be left in a directory. I would include a warning that the file that they export needs to be handled with care if there are any sensitive dates. Some might consider birthdays as private information, right? I'd also like to be able to name the file - so far when the share sheet comes up, I select Save to Files and it uses a default name of text.txt My next
Topic: UI Frameworks SubTopic: SwiftUI
Replies
6
Boosts
0
Views
320
Activity
3w
Reply to FileManager.replaceItemAt(_:withItemAt:) fails sporadically on ubiquitous items
From your answer, I realise I was overlooking the obvious: after doing the work in the fast temp directory, I then need to create a second temp directory on the slower destination volume using URL(for: .itemReplacementDirectory…), copy the file across, and then use replaceItemAt from there. Sure, that makes sense. I think this is also one of those cases where the broader context of your app and user base is really a really important factor. Some apps (smaller documents, more consumer focused) should do their best to hide all of these details from the user, as they're not really useful/relevant and they just end up creating noise. Other apps (larger documents, more expert focused) benefit from making this visible to the user, as it lets them understand what's going on both to correct any problems (for example, space loss due to save failures) and take advantage of the data you have for them (for example, failure recovery). So any attempts to use that will continue to fail until the kernel (?) has fini
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
3w
Reply to spctl --type install rejects notarized .pkg on macOS 26 Tahoe (26.3)
Honestly, I’m not sure what’s going on here. None of this sounds at all familiar. I’d like to get a copy of your installer package so that I can poke at it myself. Can you share a link to a download site here? [1] If not, you can file a bug and attach it to your bug report, and then post the bug number here. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com [1] Posty your link in the clear; see tip 14 in Quinn’s Top Ten DevForums Tips.
Topic: Code Signing SubTopic: Notarization Tags:
Replies
Boosts
Views
Activity
3w
Reply to XCTest Bundle cannot access local network.
Thanks for filing FB22152886. Zenning on this over the weekend I realised that there’s a much easier solution here. This is based on two key factoids: The app under test must have the Local Network privilege. Local network privacy doesn’t apply to loopback connections. So, you can set up a network listener in your app that listens for incoming connections and, for each one, opens a connection to your accessory and proxies traffic between the two. Your UI test can then connect to 127.0.0.1 and talk to the accessory indirectly through the app. I prototyped this in my office and it seems to work. I recommend that you try it out and see how far you get. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Replies
Boosts
Views
Activity
3w
Reply to "Testflight is currently unavailable" message for all users
Filed a feedback ticket: FB22176952
Replies
Boosts
Views
Activity
3w
Reply to User crash report contains ??? instead of my app's symbols and no binary image base address
When running those commands on my M1 Mac I get this: % file /Applications/MyApp.app/Contents/MacOS/MyApp /Applications/MyApp.app/Contents/MacOS/MyApp: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64] /Applications/MyApp.app/Contents/MacOS/MyApp (for architecture x86_64): Mach-O 64-bit executable x86_64 /Applications/MyApp.app/Contents/MacOS/MyApp (for architecture arm64): Mach-O 64-bit executable arm64 and % otool -f /Applications/MyApp.app/Contents/MacOS/MyApp Fat headers fat_magic 0xcafebabe nfat_arch 2 architecture 0 cputype 16777223 cpusubtype 3 capabilities 0x0 offset 16384 size 3190880 align 2^14 (16384) architecture 1 cputype 16777228 cpusubtype 0 capabilities 0x0 offset 3211264 size 3069792 align 2^14 (16384) and ... ==== Non-writable regions for process 14835 REGION TYPE START - END [ VSIZE RSDNT DIRTY SWAP] PRT/MAX SHRMOD PURGE REGION DETAIL __TEXT 10061c000-1008a0000 [ 2576K 2048K 0K 0K] r-x/r-x SM=COW /Applications/MyApp.app/Contents/MacOS/MyA
Replies
Boosts
Views
Activity
3w
Reply to "Testflight is currently unavailable" message for all users
Filed a feedback ticket: FB22176453
Replies
Boosts
Views
Activity
3w
Reply to User crash report contains ??? instead of my app's symbols and no binary image base address
[quote='878607022, Nickkk, /thread/817724?answerId=878607022#878607022, /profile/Nickkk'] I'm assuming that's what you mean by Mach-O image. [/quote] A Mach-O image is code that can be mapped into memory by the dynamic linker and then run directly, as opposed to something like a .o file that contains code that must be linked before it can be run. I talk more about this in An Apple Library Primer. A Mach-O image is often stored within a universal binary, one image per architecture. So when looking at stuff like this you have to consider the image of the architecture that was running. The other thing to considered is that the dynamic linker may only map in parts of your image. A good way to see what actually gets mapped is to run the app and then run vmmap against it. Consider this: % ls -lh Pages Creator Studio.app/Contents/MacOS/Pages -rwxr-xr-x 1 root wheel 45M 16 Jan 02:44 Pages Creator Studio.app/Contents/MacOS/Pages The Pages executable is 45 MiB. And this: % file Pages Creator Studio.ap
Replies
Boosts
Views
Activity
3w
Reply to RealityKit crashes when rendering SpriteKit scene with SKShapeNode in postProcess callback
Thanks for your input. I added the following code in the arView.renderCallbacks.postProcess callback: let depthStencilDescriptor = MTLTextureDescriptor() depthStencilDescriptor.pixelFormat = .depth32Float_stencil8 depthStencilDescriptor.width = context.targetColorTexture.width depthStencilDescriptor.height = context.targetColorTexture.height depthStencilDescriptor.usage = .renderTarget depthStencilDescriptor.storageMode = .private renderPassDescriptor.stencilAttachment.texture = device!.makeTexture(descriptor: depthStencilDescriptor) renderPassDescriptor.stencilAttachment.loadAction = .clear renderPassDescriptor.stencilAttachment.storeAction = .dontCare renderPassDescriptor.stencilAttachment.clearStencil = 0 but the app now crashes with error Assertion failed: (destDepthFormat == jet_texture_format_DepthStencil), function create_render_mode, file jet_context_Metal.mm, line 895. VTPixelTransferSession 420f sid 494 (512.00 x 512.00) [0.00 0.00 512 512] rowbytes( 512, 512 ) Color( kCGColorSpaceSRGB, 0x0
Topic: Graphics & Games SubTopic: RealityKit Tags:
Replies
Boosts
Views
Activity
3w