Search results for

“file uri scheme”

81,744 results found

Post

Replies

Boosts

Views

Activity

Reply to Is it a bug in UIActivityViewController to Airdrop ?
I filed a bug report with an sample project and 2 files for testing. I confirm the problem. FB22253128 Here the message in FB (with the zipped sample project and 2 test files): Context: Xcode 26.3, iOS 18.7.6 on iPhone Xs In this iOS app, I call UIActivityViewController to let user Airdrop files from the app. When trying to send a URL whose file name contains some characters like accentuated (-, é, '), the transfer fails. Removing those characters makes it work without problem. Steps to reproduce Build and load the app on iPhone transfer the 2 pdf files ('name accentué.pdf' and 'name plain.pdf' to the Documents folder of Test app (I did it in Finder on Mac with iPhone USB connected to the Mac). The 2 files are identical except their name. Run the app Tap 'Send by AirDrop name plain.pdf' and select AirDrop to Mac : Transfer OK Tap 'Send by AirDrop name accentué.pdf' and select AirDrop to Mac : Transfer fails
Topic: UI Frameworks SubTopic: UIKit Tags:
2w
Reply to FileManager.replaceItemAt(_:withItemAt:) fails sporadically on ubiquitous items
(I say “in theory” because LibZip seems to be doing something smarter somehow; even if you overwrite the text file at the same position—at the first entry—saves are still a lot faster than they would be writing the entire 500MB out again.) So, one factor here is just write caching. The more specifically, the write() syscall is returning as soon as data reaches the UBC (Universal Buffer Cache), which is the shared read/write cache for the entire system. This ensures that subsequent reads() return the just written data, even if the read originates from different file descriptors or processes. However, when the data will actually reach the disk is basically undefined, which is why fsync and F_FULLFSYNC exist. What makes copies slow isn't the writes; it's the reads, since the data still has to be pulled off the disk so it can be sent back to write. __ Kevin Elliott DTS Engineer, CoreOS/Hardware
Topic: App & System Services SubTopic: Core OS Tags:
2w
Reply to NSProgress - way to publish progress to make the file url unselectable in Finder?
I briefly tried to get this to work today using the old Carbon API, which I must confess I'm not super familiar with (before my time), but didn't have any success. Before I posted this thread, I tried what looked like the most straightforward way to accomplish this: No, that won't work. NSFileBusy is looking at ExtendedFileInfo.extendedFinderFlags and checking if kExtendedFlagObjectIsBusy is set. I don't think it's really used today, but my recollection was that this meant “busy” in the file access/locking sense, which is different than the creation case of the Finder. In any case, I'd start by checking/setting kMagicBusyCreationDate. I believe that's the Finder primary mechanism, and, more practically, it's not deprecated and easier to access than type/creator. __ Kevin Elliott DTS Engineer, CoreOS/Hardware
Topic: UI Frameworks SubTopic: AppKit Tags:
2w
Reply to Is it a bug in UIActivityViewController to Airdrop ?
Not as far as I can see, Can you file a report that I can share with the relevant engineering team? I think this issue is worth looking at. Please include a sample project with steps to reproduce the issue, note a filename you used also. Reply with the FB number here once complete. One tip I have is, if you are unsure if it's a known issue or not, file the report anyway. This gives us a head start on this investigation and a timeline view if it has been reported previously. Thank you @Claude31 😁  Travis
Topic: UI Frameworks SubTopic: UIKit Tags:
2w
Notarization Requests In Progress
Hello, I am following up on several notarization requests in order to understand the process better. I submitted my first notary request yesterday and it took several hours to complete (where I submitted two other requests along the way thinking they may be stuck). They were all accepted after ~3 hours had passed since the first request was made. In that time I discovered a bug and had to rebuild/codesign, and submitted to notarize again. I've now had two requests with the new build (.zip file) in progress for ~18 hours. The bug fix I made between builds was innocuous and I'm wondering if my jobs are getting flagged due to recent account lockouts when I was first setting up my organizations' developer account. I've seen several replies here in the forum from DTS Engineers - hi Quinn :), so I'm aware of the possibility of 'rare' in-depth analysis, however I've experienced it in 100% of my requests. What is causing my requests to always require in-depth analysis and is there anything I can do to preven
1
0
132
2w
Reply to BGProcessingTask expirationHandler — No way to distinguish expiration reason
Q1. Is there an official, complete list of all conditions that trigger expirationHandler? The documentation only mentions time expires. No, but the primary causes are user cancellation and failure to report progress. Theoretically, resource pressure could cause it; however, in practice, I think the system typically ends up killing your app instead[1]. Q2. What is the specific time limit before timeout? If it varies by device state, what are the conditions? There isn't any specific time limit. I've never worked out what the absolute maximum (defined by the progress reporting requirement) is, but that limit would be high enough that it's not really a constraint. Q3. A way to distinguish the reason is needed. User stop and system expiration require completely different handling. Currently, this is impossible. Yes, this is definitely an issue with the API. Please file an enhancement request asking for this, then post the bug number back here. [1] The issue here is similar to (one of…) the reason why memo
2w
copyfile Sometimes Fails to copy .DS_Store when Copying a Folder But Does Not Report Usable Error
Testing copyfile on a folder on an external volume (which takes a bit a of time) I'm running into an issue where copyfile gets to the end of the operation and then just fails. In the callback I can see that the failure occurs on a .DS_Store file inside the folder. So for a .DS_Store it is simple enough for me to just ignore the error and return COPYFILE_SKIP but the somewhat more concerning issue here is that the true error reason is seemingly not reported? In the callback if I read errno it is 0. When copyfile returns it returns -1 after I return COPYFILE_QUIT (and errno is 0) so I don't know what the error is or the appropriate way to handle it. For .DS_Store just skipping seems reasonable but when copying a folder it may be appropriate to get the true failure reason. But checking the last path component of source path seems like a hack way to handle errors. If a file in the copying folder with important user data I can't just silently skip it - it isn't clear to me how I should properly p
6
0
215
2w
Reply to Crash while presenting a media picker for Music
Thanks! On device? I do not see any bugs on that part, and I would really encourage you to create a simple focused project so you can show the crash on a device after submitting a bug that I think will be the best approach in this case. Once you open the bug report, please post the FB number here for my reference. If you have any questions about filing a bug report, take a look at Bug Reporting: How and Why? Albert Pascual
  Worldwide Developer Relations.
Topic: Media Technologies SubTopic: Audio Tags:
2w
Reply to How to upload large videos with PHAssetResourceUploadJobChangeRequest?
Thanks for the detailed response, Albert. Our server API has a strict payload limit of 250 MB per request. Because of this constraint, our existing upload infrastructure uses chunked uploads for large files — splitting videos into smaller byte ranges and uploading each chunk separately via the BITS protocol (CreateSession → Fragment → CloseSession). However, I don't see any API surface in PHAssetResourceUploadJobChangeRequest to: Specify byte ranges for partial uploads Create multiple sequential jobs for chunks of the same resource Provide a callback/delegate pattern for give me the next upload destination Given that the system daemon handles uploads out-of-process (as you explained), it seems this API assumes the destination endpoint can accept the entire file in a single HTTP request. My question then becomes: For services with server-side payload limits, is PHBackgroundResourceUploadExtension the wrong tool for the job? Should we instead: Continue using our existing NSURLSession backgroun
2w
Reply to invalid API object reference
[quote='879858022, hasii2021, /thread/818406?answerId=879858022#879858022, /profile/hasii2021'] I set up the file system as APFS case-sensitive. [/quote] I’ve seen that cause problems in the past. However, I don’t think that’s the case here. I created a case-sensitive APFS disk image, copied your zip archive to that, and repeated my tests there, and everything still worked. But, yeah, a disk image is a great way to test stuff like this. If you managed to figure out what’s causing this, please reply here with the info. I’m super curious. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
2w
Reply to Swift compiler fails in Release (-O) when using generic ObservableObject with @Published on iOS < 26 in Xcode 26.3
[quote='879813022, wuzihang, /thread/818722?answerId=879813022#879813022, /profile/wuzihang'] FB22081725 [/quote] Thanks for filing that. [quote='879813022, wuzihang, /thread/818722?answerId=879813022#879813022, /profile/wuzihang'] has [this] been routed to the appropriate Swift/Xcode engineering team … ? [/quote] Yes. [quote='879813022, wuzihang, /thread/818722?answerId=879813022#879813022, /profile/wuzihang'] [is] there is any information about which future Xcode version … ? [/quote] Even if there were, I can’t talk about The Future™ here on the forums. See tip 3 in Quinn’s Top Ten DevForums Tips. This lack of visibility is one of the reasons why I encourage folks with Swift compiler bugs to file their bugs via the Swift bug process. However, that’s not really appropriate here because you need an Apple framework, Combine, to reproduce it. But if you can find a way to reproduce the crash without that dependency, a Swift bug would make a lot of sense. ps In future, if you have existing case
2w
Reply to PCI Transport Entitlements
There are some key things to keep in mind here: Your provisioning profile acts as an entitlement allowlist. Your .entitlements file is source code that feeds into the code signing machinery. The entitlements claimed by your app are baked into the app’s code signature. Likewise for embedded app extensions, DEXTs, and so on. The fact that you’ve been granted access to a capability lets you create an provisioning profile that authorises your use of the associated entitlements. However, you still have to claim that access, by updating your .entitlements file. You can then verify that the claim and the profile are in sync using the codesign and security tools, respectively. For the exact commands, and more general background, see TN3125 Inside Code Signing: Provisioning Profiles. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: App & System Services SubTopic: Core OS Tags:
2w
Reply to The SecKeyCreateSignature method always prompts for the current user's login password.
[quote='818948021, Ere0n, /thread/818948, /profile/Ere0n'] this private key is clearly stored in the local P12 file [/quote] That’s not the caes, at least on macOS. SecPKCS12Import behaves differently on iOS and macOS: On iOS it imports the PKCS#12 file and gives you back an in-memory digital identity. On macOS, it defaults to importing the PKCS#12 file to the default keychain, and gives you back a digital identity that references that keychain. If you want the iOS behaviour on macOS, you have to opt it to that by setting kSecImportToMemoryOnly. Having said that, I’m not sure that continuing to re-import the file is the right option. In general, it’s better to store secrets in the keychain rather than in a .p12 file on disk. But that raises the question of which keychain. I generally recommend the data protection keychain, in which case the path forward is: Get an in-memory digital identity. Call SecItemAdd with the kSecUseDataProtectionKeychain to add it to the da
Topic: Privacy & Security SubTopic: General Tags:
2w
Reply to On iOS 26, HLS alternate audio track selection behaves inconsistently
Update — Workaround found After further investigation I have found a workaround that resolves the inconsistent track switching behaviour described above. Observation I noticed that changing the order of EXT-X-MEDIA audio entries in the manifest produced different results. Specifically, when the DEFAULT=YES track is listed first, switching behaviour is unreliable. When the DEFAULT=YES track is placed last, switching back to the default language works correctly. Workaround Reorder the EXT-X-MEDIA audio entries so that the DEFAULT=YES rendition appears last in the manifest: #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID=program_audio,LANGUAGE=de,NAME=Deutsch,AUTOSELECT=YES,DEFAULT=NO,CHANNELS=2,URI=audio_DEU.m3u8 #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID=program_audio,LANGUAGE=fr,NAME=Francais,AUTOSELECT=YES,DEFAULT=NO,CHANNELS=2,URI=audio_FRA.m3u8 #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID=program_audio,LANGUAGE=en,NAME=English,AUTOSELECT=YES,DEFAULT=YES,CHANNELS=2,URI=audio_ENG.m3u8 In our case the manifest is gener
Topic: Media Technologies SubTopic: Streaming Tags:
2w
Reply to Promo code generation hanging
I don't think I'm experiencing the problem anymore, but it appears that multiple promo codes were generated inadvertently. I've filed FB22253261 with more information if you want to look.
Replies
Boosts
Views
Activity
2w
Reply to Is it a bug in UIActivityViewController to Airdrop ?
I filed a bug report with an sample project and 2 files for testing. I confirm the problem. FB22253128 Here the message in FB (with the zipped sample project and 2 test files): Context: Xcode 26.3, iOS 18.7.6 on iPhone Xs In this iOS app, I call UIActivityViewController to let user Airdrop files from the app. When trying to send a URL whose file name contains some characters like accentuated (-, é, '), the transfer fails. Removing those characters makes it work without problem. Steps to reproduce Build and load the app on iPhone transfer the 2 pdf files ('name accentué.pdf' and 'name plain.pdf' to the Documents folder of Test app (I did it in Finder on Mac with iPhone USB connected to the Mac). The 2 files are identical except their name. Run the app Tap 'Send by AirDrop name plain.pdf' and select AirDrop to Mac : Transfer OK Tap 'Send by AirDrop name accentué.pdf' and select AirDrop to Mac : Transfer fails
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
2w
Reply to FileManager.replaceItemAt(_:withItemAt:) fails sporadically on ubiquitous items
(I say “in theory” because LibZip seems to be doing something smarter somehow; even if you overwrite the text file at the same position—at the first entry—saves are still a lot faster than they would be writing the entire 500MB out again.) So, one factor here is just write caching. The more specifically, the write() syscall is returning as soon as data reaches the UBC (Universal Buffer Cache), which is the shared read/write cache for the entire system. This ensures that subsequent reads() return the just written data, even if the read originates from different file descriptors or processes. However, when the data will actually reach the disk is basically undefined, which is why fsync and F_FULLFSYNC exist. What makes copies slow isn't the writes; it's the reads, since the data still has to be pulled off the disk so it can be sent back to write. __ Kevin Elliott DTS Engineer, CoreOS/Hardware
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
2w
Reply to NSProgress - way to publish progress to make the file url unselectable in Finder?
I briefly tried to get this to work today using the old Carbon API, which I must confess I'm not super familiar with (before my time), but didn't have any success. Before I posted this thread, I tried what looked like the most straightforward way to accomplish this: No, that won't work. NSFileBusy is looking at ExtendedFileInfo.extendedFinderFlags and checking if kExtendedFlagObjectIsBusy is set. I don't think it's really used today, but my recollection was that this meant “busy” in the file access/locking sense, which is different than the creation case of the Finder. In any case, I'd start by checking/setting kMagicBusyCreationDate. I believe that's the Finder primary mechanism, and, more practically, it's not deprecated and easier to access than type/creator. __ Kevin Elliott DTS Engineer, CoreOS/Hardware
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
2w
Reply to Is it a bug in UIActivityViewController to Airdrop ?
Not as far as I can see, Can you file a report that I can share with the relevant engineering team? I think this issue is worth looking at. Please include a sample project with steps to reproduce the issue, note a filename you used also. Reply with the FB number here once complete. One tip I have is, if you are unsure if it's a known issue or not, file the report anyway. This gives us a head start on this investigation and a timeline view if it has been reported previously. Thank you @Claude31 😁  Travis
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
2w
Notarization Requests In Progress
Hello, I am following up on several notarization requests in order to understand the process better. I submitted my first notary request yesterday and it took several hours to complete (where I submitted two other requests along the way thinking they may be stuck). They were all accepted after ~3 hours had passed since the first request was made. In that time I discovered a bug and had to rebuild/codesign, and submitted to notarize again. I've now had two requests with the new build (.zip file) in progress for ~18 hours. The bug fix I made between builds was innocuous and I'm wondering if my jobs are getting flagged due to recent account lockouts when I was first setting up my organizations' developer account. I've seen several replies here in the forum from DTS Engineers - hi Quinn :), so I'm aware of the possibility of 'rare' in-depth analysis, however I've experienced it in 100% of my requests. What is causing my requests to always require in-depth analysis and is there anything I can do to preven
Replies
1
Boosts
0
Views
132
Activity
2w
Reply to BGProcessingTask expirationHandler — No way to distinguish expiration reason
Q1. Is there an official, complete list of all conditions that trigger expirationHandler? The documentation only mentions time expires. No, but the primary causes are user cancellation and failure to report progress. Theoretically, resource pressure could cause it; however, in practice, I think the system typically ends up killing your app instead[1]. Q2. What is the specific time limit before timeout? If it varies by device state, what are the conditions? There isn't any specific time limit. I've never worked out what the absolute maximum (defined by the progress reporting requirement) is, but that limit would be high enough that it's not really a constraint. Q3. A way to distinguish the reason is needed. User stop and system expiration require completely different handling. Currently, this is impossible. Yes, this is definitely an issue with the API. Please file an enhancement request asking for this, then post the bug number back here. [1] The issue here is similar to (one of…) the reason why memo
Replies
Boosts
Views
Activity
2w
copyfile Sometimes Fails to copy .DS_Store when Copying a Folder But Does Not Report Usable Error
Testing copyfile on a folder on an external volume (which takes a bit a of time) I'm running into an issue where copyfile gets to the end of the operation and then just fails. In the callback I can see that the failure occurs on a .DS_Store file inside the folder. So for a .DS_Store it is simple enough for me to just ignore the error and return COPYFILE_SKIP but the somewhat more concerning issue here is that the true error reason is seemingly not reported? In the callback if I read errno it is 0. When copyfile returns it returns -1 after I return COPYFILE_QUIT (and errno is 0) so I don't know what the error is or the appropriate way to handle it. For .DS_Store just skipping seems reasonable but when copying a folder it may be appropriate to get the true failure reason. But checking the last path component of source path seems like a hack way to handle errors. If a file in the copying folder with important user data I can't just silently skip it - it isn't clear to me how I should properly p
Replies
6
Boosts
0
Views
215
Activity
2w
Reply to Crash while presenting a media picker for Music
Thanks! On device? I do not see any bugs on that part, and I would really encourage you to create a simple focused project so you can show the crash on a device after submitting a bug that I think will be the best approach in this case. Once you open the bug report, please post the FB number here for my reference. If you have any questions about filing a bug report, take a look at Bug Reporting: How and Why? Albert Pascual
  Worldwide Developer Relations.
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
2w
Reply to How to upload large videos with PHAssetResourceUploadJobChangeRequest?
Thanks for the detailed response, Albert. Our server API has a strict payload limit of 250 MB per request. Because of this constraint, our existing upload infrastructure uses chunked uploads for large files — splitting videos into smaller byte ranges and uploading each chunk separately via the BITS protocol (CreateSession → Fragment → CloseSession). However, I don't see any API surface in PHAssetResourceUploadJobChangeRequest to: Specify byte ranges for partial uploads Create multiple sequential jobs for chunks of the same resource Provide a callback/delegate pattern for give me the next upload destination Given that the system daemon handles uploads out-of-process (as you explained), it seems this API assumes the destination endpoint can accept the entire file in a single HTTP request. My question then becomes: For services with server-side payload limits, is PHBackgroundResourceUploadExtension the wrong tool for the job? Should we instead: Continue using our existing NSURLSession backgroun
Replies
Boosts
Views
Activity
2w
Reply to invalid API object reference
[quote='879858022, hasii2021, /thread/818406?answerId=879858022#879858022, /profile/hasii2021'] I set up the file system as APFS case-sensitive. [/quote] I’ve seen that cause problems in the past. However, I don’t think that’s the case here. I created a case-sensitive APFS disk image, copied your zip archive to that, and repeated my tests there, and everything still worked. But, yeah, a disk image is a great way to test stuff like this. If you managed to figure out what’s causing this, please reply here with the info. I’m super curious. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Replies
Boosts
Views
Activity
2w
Reply to Swift compiler fails in Release (-O) when using generic ObservableObject with @Published on iOS < 26 in Xcode 26.3
[quote='879813022, wuzihang, /thread/818722?answerId=879813022#879813022, /profile/wuzihang'] FB22081725 [/quote] Thanks for filing that. [quote='879813022, wuzihang, /thread/818722?answerId=879813022#879813022, /profile/wuzihang'] has [this] been routed to the appropriate Swift/Xcode engineering team … ? [/quote] Yes. [quote='879813022, wuzihang, /thread/818722?answerId=879813022#879813022, /profile/wuzihang'] [is] there is any information about which future Xcode version … ? [/quote] Even if there were, I can’t talk about The Future™ here on the forums. See tip 3 in Quinn’s Top Ten DevForums Tips. This lack of visibility is one of the reasons why I encourage folks with Swift compiler bugs to file their bugs via the Swift bug process. However, that’s not really appropriate here because you need an Apple framework, Combine, to reproduce it. But if you can find a way to reproduce the crash without that dependency, a Swift bug would make a lot of sense. ps In future, if you have existing case
Replies
Boosts
Views
Activity
2w
Reply to PCI Transport Entitlements
There are some key things to keep in mind here: Your provisioning profile acts as an entitlement allowlist. Your .entitlements file is source code that feeds into the code signing machinery. The entitlements claimed by your app are baked into the app’s code signature. Likewise for embedded app extensions, DEXTs, and so on. The fact that you’ve been granted access to a capability lets you create an provisioning profile that authorises your use of the associated entitlements. However, you still have to claim that access, by updating your .entitlements file. You can then verify that the claim and the profile are in sync using the codesign and security tools, respectively. For the exact commands, and more general background, see TN3125 Inside Code Signing: Provisioning Profiles. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
2w
Reply to The SecKeyCreateSignature method always prompts for the current user's login password.
[quote='818948021, Ere0n, /thread/818948, /profile/Ere0n'] this private key is clearly stored in the local P12 file [/quote] That’s not the caes, at least on macOS. SecPKCS12Import behaves differently on iOS and macOS: On iOS it imports the PKCS#12 file and gives you back an in-memory digital identity. On macOS, it defaults to importing the PKCS#12 file to the default keychain, and gives you back a digital identity that references that keychain. If you want the iOS behaviour on macOS, you have to opt it to that by setting kSecImportToMemoryOnly. Having said that, I’m not sure that continuing to re-import the file is the right option. In general, it’s better to store secrets in the keychain rather than in a .p12 file on disk. But that raises the question of which keychain. I generally recommend the data protection keychain, in which case the path forward is: Get an in-memory digital identity. Call SecItemAdd with the kSecUseDataProtectionKeychain to add it to the da
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
2w
Reply to On iOS 26, HLS alternate audio track selection behaves inconsistently
Update — Workaround found After further investigation I have found a workaround that resolves the inconsistent track switching behaviour described above. Observation I noticed that changing the order of EXT-X-MEDIA audio entries in the manifest produced different results. Specifically, when the DEFAULT=YES track is listed first, switching behaviour is unreliable. When the DEFAULT=YES track is placed last, switching back to the default language works correctly. Workaround Reorder the EXT-X-MEDIA audio entries so that the DEFAULT=YES rendition appears last in the manifest: #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID=program_audio,LANGUAGE=de,NAME=Deutsch,AUTOSELECT=YES,DEFAULT=NO,CHANNELS=2,URI=audio_DEU.m3u8 #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID=program_audio,LANGUAGE=fr,NAME=Francais,AUTOSELECT=YES,DEFAULT=NO,CHANNELS=2,URI=audio_FRA.m3u8 #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID=program_audio,LANGUAGE=en,NAME=English,AUTOSELECT=YES,DEFAULT=YES,CHANNELS=2,URI=audio_ENG.m3u8 In our case the manifest is gener
Topic: Media Technologies SubTopic: Streaming Tags:
Replies
Boosts
Views
Activity
2w