Search results for

file uri scheme

78,746 results found

Post

Replies

Boosts

Views

Activity

FileHandle(forWritingTo:) crash
I am having a rare crash when calling FileHandle(forWritingTo:) initializer with a file that does not exist. In the documentation, I see that the expected behaviour is to return nil, but in my app, in rare cases I have a Crash. My code that causes the crash is if let handle = try? FileHandle(forWritingTo: logFile) { Is it a known behaviour ? should I test if the file exist before calling FileHandle(forWritingTo:) ? Shareable_2025-09-01_05-32-28.3051.crash
2
0
55
1w
Reply to Error in gathering code coverage in Xcode16
To be more clear than my post from August 2025, the solution is to rebuild all of your upstream dependencies with a version of XCode that includes the same version of clang that your version of XCode includes. The easiest way to be sure that upstream and your app uses the same clang is to build them both with the same XCode. If you rely on a library that you cannot rebuild, you need to file a bug with the maintainer for them to do that rebuild. Until those things have ALL been built with the same version of clang, you will not be able to see code coverage data.
1w
Error reporting test coverage in Xcode 14.3.1
Xcode is throwing an error when attempting to report test coverage after running unit tests. Showing All Messages Failed to merge raw profiles in directory /{my project dir}/DerivedData/{my project name}/Build/ProfileData/A98EC493-3AB4-4B1C-B7FC-BC5D77B23EE3 to destination /{my project dir}/DerivedData/{my project name}/Build/ProfileData/A98EC493-3AB4-4B1C-B7FC-BC5D77B23EE3/Coverage.profdata: Aggregation tool '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/llvm-profdata' failed with exit code 1: warning: /{my project dir}/DerivedData/{my project name}/Build/ProfileData/A98EC493-3AB4-4B1C-B7FC-BC5D77B23EE3/997F01E3-3735-4897-AE00-31EBB0A9E8D3-57885.profraw: invalid instrumentation profile data (file header is corrupt) error: no profile can be merged Anyone else seeing this issue?
15
0
5.2k
1w
Entitlement values for the Enhanced Security and the Additional Runtime Platform Restrictions
I recently turned on the enhanced security options for my macOS app in Xcode 26.0.1 by adding the Enhanced Security capability in the Signing and Capabilities tab. Then, Xcode adds the following key-value sets (with some other key-values) to my app's entitlements file. com.apple.security.hardened-process.enhanced-security-version 1 com.apple.security.hardened-process.platform-restrictions 2 These values appear following the documentation about the enhanced security feature (Enabling enhanced security for your app) and the app works without any issues. However, when I submitted a new version to the Mac App Store, my submission was rejected, and I received the following message from the App Review team via the App Store Connect. Guideline 2.4.5(i) - Performance Your app incorrectly implements sandboxing, or it contains one or more entitlements with invalid values. Please review the included entitlements and sandboxing documentation and resolve this issue before resubmitting a new binary. Entitlement co
3
0
838
1w
Reply to Matter Media Playback Cluster
Kevin and ssmith_c for your assistance. I fortunately managed to file in the bug: FB20677188 Thank you! Looking over the bug, there was one point I wanted to comment on: For the Matter Media Device Basic Video Player Type Apple Home does support the commissioning (adding the device to the list of accessories displayed in Home App), but no controls are displayed. Not even the mandatory required controls: ... This type of Matter Device, which is part of the standard, should at least expose the mandatory controls and commands. The idea that Apple (and general ecosystem vendors more broadly) should try and support the full range of the Matter specification is, IMHO, one of those ideas which sounds reasonable on the surface but is, in fact, a very bad idea. First off, quoting myself: The Matter specification itself is sufficiently broad and complex that, in practice, I'm not sure it will ever really be possible to create a high-quality controller app* that actually supports EVERY possible accessory config
1w
Reply to Request File Access from Unity for Apple Vision Pro
I am working on a Gaussian Splatting App using the UnityGaussianSplatting package and building for Apple Vision Pro. I want to be able to load splat (.ply / .splat) files from the Vision Pro's storage into the application. OK. So the main issue to be aware of here is the difference between works fine for a developer and works well for a user. For development purposes, you can basically just set the two keys (UIFileSharingEnabled/LSSupportsOpeningDocumentsInPlace) and then use your Documents directory as your working storage. There could be issues if you edited or deleted those files while your app was actively running, but you will just avoid those issues... by not doing that. On the other hand, if you're planning to ship this to end users then you'll need to use things like file coordination to avoid those issues. Similarly, apps that are more viewer oriented (meaning, they don't edit the files they're working with) often use an import model where they copy (actually clone
Topic: Spatial Computing SubTopic: General Tags:
1w
Reply to Is it still possible to change the color of unselected icons in a TabView?
You can apply the tint(_:) modifier to your TabView to specify a tint color. This would only apply to the selected tab. For example: struct ContentView: View { var body: some View { TabView { Tab(Received, systemImage: tray.and.arrow.down.fill) { Color.red } Tab(Sent, systemImage: tray.and.arrow.up.fill) { Color.green } } .tint(.yellow) } } Specifying the colors for unselected tabs are currently not supported. You can file a Feedback report, via Feedback Assistant. Please post the Feedback ID here once you do.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
1w
Reply to MetricKit Payload Not Populating on Enterprise
Thank you for providing the post and the comprehensive description of the issue. I believe the payload should have been received at the very least. May I kindly request that you report a bug for this matter? 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? We will get to the bottom of the issue. Albert Pascual
  Worldwide Developer Relations.
Topic: App & System Services SubTopic: General Tags:
1w
Reply to HKObserverQuery stops delivering updates in background on watchOS 26
The code snippet provided above looks good. However, the one in your feedback report, as shown below, doesn't call completionHandler when an error happens, which led to the comment from the HealthKit folks. let query = HKObserverQuery(sampleType: heartType, predicate: nil) { query, completionHandler, error in if let error = error { logEvent(Observer error: (error.localizedDescription)) return } ... } In this situation, you can follow up with your feedback report by updating the code snippet, or even file a new feedback report, to be very clear that you call completionHandler in all your code paths but the issue is still there. Best, —— Ziqiao Chen  Worldwide Developer Relations.
1w
Made a new launch story board and removed old LaunchImages
Converted my app to use a Storyboard instead of a Launch Image. Everything was working fine until I removed all of the Launch Images within Image.xcassets. I kept the icons. Then I started getting an error that: None of the input catalogs contained a matching image set named LaunchImage. The storyboard imageview referenced an image not inside of LaunchImage catalog (but perhaps it did now that its causing this problem). I rebuilt, clean build, checked plist for entry and got the same error. I figured there was something wrong with the Storyboard so I completely removed it, rebuilt a new one, new name new image file, assigned the png file to the imageview and I get the same error. I've tried everything. There must be some deep metadata assignment that is looking for this catalog, so I put it back in, with the files assigned to universal 1x, 2x and 3x. I used LaunchImage as the image file and it recognized it but still get the same error during build. I can even remove the st
2
0
98
1w
Reply to Request File Access from Unity for Apple Vision Pro
Thanks @DTS Engineer for your quick & detailed answer!! So, my immediate question here is what your larger goal here actually is? I am working on a Gaussian Splatting App using the UnityGaussianSplatting package and building for Apple Vision Pro. I want to be able to load splat (.ply / .splat) files from the Vision Pro's storage into the application. This won't work. The primary goal of the App Sandbox is to protect user data, which is exactly the kind of data you want access to. Yeah, that was also what I suspected. Hence my question what the intended way to access files from an app would be. apps get access to files through one of two broad mechanisms: Thanks for referring to these, I think I stumbled upon it while researching, but did not consider them further yet because they are solutions that require editing the code in Xcode. Which poses two problems for me: 1 - I don't have a lot of experience with Swift and how Xcode apps are structured. 2 - The Xcode project is gener
Topic: Spatial Computing SubTopic: General Tags:
1w
Mac Issue with Developer ID certificate and Sign in with Apple capability
Hello I have a problem with provisionprofile file. I have created Identifier with Sign in with Apple capability turned on, created Profile with Developer ID selected and now I try to export archive with generated Developer ID provision file but it says Profile doesn't support Sign in with Apple Also interesting thing that default provisions like macOS App Development Mac App Store Connect don't show such error when I try to export archive Maybe this problem is only related to Developer ID provision and Direct Distribution doesn't support Sign in with Apple, but I havent found proves about this idea
2
0
432
1w
'openAppWhenRun' property causing AppIntentsExtension to fail
I have added an App Intents Extension target to my main application in macOS. This generated the below two files: TWAppIntent.swift import AppIntents struct TWAppIntent: AppIntent { static var title: LocalizedStringResource = TWAppIntentExtension static var parameterSummary: some ParameterSummary { Summary(Get information on (.$TWType)) } //launch app on running action static var openAppWhenRun: Bool = true // we can have multiple parameter of diff types @Parameter(title: TWType) var TWType: String func perform() async throws -> some IntentResult & ReturnsValue & ProvidesDialog { return .result(value: TWType, dialog: Logged break.) } } TWAppIntentExtension.swift import AppIntents @main struct TWAppIntentExtension: AppIntentsExtension { } I m able to build the extension target and I my intent action is available in the shortcuts app. However, on launching a shortcut with the above created intent action. I m getting the below popups: I have identified what is causing this error. Setting the
3
0
825
1w