Search results for

“xcode github”

96,025 results found

Post

Replies

Boosts

Views

Activity

RealityKit custom component: `has()` returns `true` but typed subscript returns `nil` in SwiftPM test runner
swift test (SwiftPM CLI) fails to decode RealityKit custom components from USD files, even though entity.components.has(MyComponent.self) returns true. Typed access via entity.components[MyComponent.self] returns nil. This forces projects that use RealityKit custom components to use xcodebuild test exclusively. Minimal repro: github.com/mesqueeb/swiftpm-realitykit-custom-component-repro Repro steps git clone https://github.com/mesqueeb/swiftpm-realitykit-custom-component-repro cd swiftpm-realitykit-custom-component-repro swift test --filter componentsPresentButNotDecodableInSwiftTest Observed ✅ entity.components.has(ReproComponent.self) returns true ❌ entity.components[ReproComponent.self] returns nil Expected If has(...) returns true for a registered custom component, typed lookup should decode and return non-nil. Notes Running the same test via xcodebuild test works correctly The component is properly registered and the USDA file correctly references it This affects any project that relies on custom Reality
1
0
203
1d
SwiftData in-memory ModelContainer causes DefaultStore validation errors on consecutive xcodebuild test runs
When running parallel Swift Testing tests that each create their own in-memory ModelContainer, the first xcodebuild test run succeeds but all subsequent runs fail with DefaultStore save failed validation errors — unless DerivedData is deleted between runs. Setup Each test suite creates an isolated in-memory container with a unique name: ModelConfiguration(UUID().uuidString, schema: schema, isStoredInMemoryOnly: true) The @Model class has non-optional properties (e.g. var v: String, var entityDicMoveNr: Int) that are always set in init. Symptoms on second run SwiftData.DefaultStore save failed with error: Error Domain=NSCocoaErrorDomain Code=1560 Multiple validation errors occurred. NSValidationErrorKey=v, NSValidationErrorValue=null NSValidationErrorKey=entityDicMoveNr, NSValidationErrorValue=null NSValidationErrorKey=historyBackup, NSValidationErrorValue=null The errors appear before test code executes — during SwiftData's internal DefaultStore auto-save. Properties that are always initialized in Swift show
2
0
113
1d
Reply to Localization doesn't work in watchOS widget configuration intent
Hopefully this is not too late. I've been quite swamped these days... No, I'm still trying to resolve this problem. Thank you for investigating it. Tomorrow, I will be able to check it on a physical device. However, even if this is a workaround, it won't help in my case, because I need to have access to intents from the watch app to check a couple of things and to perform old complications migration from ClockKit to WidgetKit. Also, intents should be shared between the watchOS app and widgets extension. If you don't share it and tap on a widget you get these warnings in the console: Failed to instantiate type ConfigurationAppIntent by name (12WatchWidgets22ConfigurationAppIntentV). The type with this mangled name does not exist in the process’s memory space. [InitializeAction <>] Could not find an intent with identifier ConfigurationAppIntent, mangledTypeName: Optional(12WatchWidgets22ConfigurationAppIntentV) associateAppIntent(forUserActivity:) - Error converting INIntent to App Intent: AppIntents.Perf
2d
Reply to Sometimes my apps crash on launch at _libsecinit_appsandbox.cold.6
That suggests that you’re hitting the issue described in Updating Mac Software, or something like it. That's weird. My apps do include a software updater (Sparkle) for the versions I sell on my website, but for the App Store versions, the updater is not included. I have separate Xcode targets for the two versions, and the App Store target (the one for which Xcode downloads the crash reports) doesn't even link to the updater. And when running the apps locally (including when the only crash on my Mac happened, which wasn't in Xcode, but just launching the debug build from Spotlight), I always run the App Store version.
Topic: App & System Services SubTopic: Core OS Tags:
2d
Xcode Cloud with watchOS
When I chose a watchOS Test and set the watch with latest watchOS on Xcode Cloud, I could not pass the CI because it showed xcodebuild: error: Unable to find a destination matching the provided destination specifier: { platform:watchOS Simulator, id:9863C79E-3793-483E-BAA1-F96A0BD34005 } I've change some destination, but it's not worked. Is there any idea what I can do? The watch app is along with the mobile, not standalone.
1
0
28
2d
This device is already associated with other accounts” error on newly activated Apple Developer account
Hello Developers, I am facing an issue while trying to sign in to a newly created Apple Developer account on my Mac/Xcode. Error message: “This device is already associated with other accounts in the Apple Developer Program or the Apple Developer Enterprise Program. Please use a different device.” Details: The Apple ID works correctly in browser login Apple Developer membership/payment is completed The account is accessible on the Apple website The issue only appears while signing in on the Mac/Xcode I already contacted Apple Support and received a case ID, but no response yet after 24+ hours Things already tried: Signed out/in from Apple ID Restarted Mac Tried different network Cleared related account settings Has anyone faced this issue before? Is this a temporary device association/security restriction from Apple’s side, or does it require manual reset by Apple Support? Any guidance would be appreciated. Thank you.
0
0
43
2d
Reply to Localization doesn't work in watchOS widget configuration intent
Hopefully this is not too late. I've been quite swamped these days... First, when opening your project with my Xcode (26.4) and selecting the WidgetLocalizable.xcstrings file, and I saw that Xcode showed a warning sign for the watchWidgetConfig.some.title key. Clicking the sign gave me the following: References to this key could not be found in source code. ... I wasn't sure how you had gotten there, but I did the following to fix the issue: Removed the key. Turned on the Use Compiler to Extract Swift Strings build setting the targets. Re-built the project. Observe that Xcode generated the watchWidgetConfig.some.title key, and the warning sign disappeared. Your project then looked good, and so I managed to build and run your project on my Apple Watch, and was able to reproduce and debug the issue, and here is my finding: In your project, AppIntent.swift and WidgetLocalizable.xcstrings are shared by the Watch and WatchWidgets targets. With some debugging, I find that removing the Wat
2d
RealityView Camera Target Error when set while Orbiting
When interacting with RealityView’s realityViewCameraControls .orbit and setting a new RealityViewCameraContent .cameraTarget, the resulting camera target and camera orbit is incorrect. This can be demonstrated where one finger is orbiting the RealityView, and another pushes a button which changes the camera target. Instead of the camera facing the new target, some point in the scene is the new effective camera target and orbit point. This only occurs when an orbit interaction is currently taking place. If you stop interacting with the orbit, change target, then start orbit interacting again, everything works as expected. Though this example uses two-touches, any change of the camera target has this conflict with orbit interaction. This means interacting with orbit will result in the wrong camera view which is unexpected for users and difficult to reconcile or detect, for developers. Expected: Interacting (orbiting) the scene while setting a new camera target with the buttons on screen (at the same time), the
1
0
297
2d
HSplitView resize cursor missing when split view is conditionally rendered (FB22712819)
Hey all, Ran into a fun one on macOS 26.4.1 / Xcode 26.4.1, and I think I've narrowed it down enough to be worth sharing. Symptom: HSplitView's divider drags fine, but the cursor never changes to the resize cursor on hover. Just stays as the regular arrow. The cause (in my case): the HSplitView was conditionally rendered via an outer if let: struct PlayerDetailsView: View { let theme: Theme var playerVM = PlayerViewModel.shared var body: some View { let grayscaleCM = ColorMap(table: .grayscale) ZStack { VStack(spacing: 0) { Rectangle() .fill(LinearGradient(colors: [Color.black.opacity(0.45), Color.black.opacity(0)], startPoint: .top, endPoint: .bottom)) .frame(height: 8) Spacer() Rectangle() .fill(LinearGradient(colors: [Color.black.opacity(0.45), Color.black.opacity(0)], startPoint: .bottom, endPoint: .top)) .frame(height: 8) } .allowsHitTesting(false) if let disc = playerVM.disc { HSplitView { DiscInfoView( disc: disc, theme: theme, ) .frame(minWidth: 720, alignment: .topLeading) .buttonShadow() .f
Topic: UI Frameworks SubTopic: SwiftUI
0
0
91
2d
Reply to Free trial for one-time purchase: Is the $0 IAP workaround still recommended in 2026?
@Bikrrr Your screenshots show you are testing in the local test environment. Apple reviews In-App Purchases in the sandbox, the same environment used for testing In-App Purchases. To test your In-App Purchases in the sandbox, In App Store Connect, create a Sandbox Apple Account. In your Xcode project, disable StoreKit Testing in Xcode Build and run your app on a device to test in the sandbox. For more information, see Testing In-App Purchases with sandbox.
2d
Reply to Xcode 26.4.1 Crashes on Launch with Code Signature Invalid on macOS 26.4.1 and All Higher Versions (26.5 / 26.6 beta)
I may have found a way to make it work: try to launch it via terminal using admin privileges like sudo xed . and next time you launch it should magically start. I previously cleaned everything under ~/Library/Develop and tried without success from /Library/Develop (with admin privileges), I also previously deleted and reinstalled Xcode from the AppStore a couple of times. Once it started I removed all previously installed iOS and watchOS simulators that thought I removed before but instead they were still listed as installed by Xcode > components, because I think what caused the issue were those components that were probably corrupted by the latests macOS and/or Xcode 26.4.1 update.
2d
Reply to Detect SD Card
This is as far as I have got with ImageCaptureCore - attempting the simplest possible case to detect the card - running on an iPhone from Xcode it crashes. I have also tried with the ICDeviceBrowserDelegate directly on the DeviceProbe class but get the same result. import Foundation import ImageCaptureCore @objcMembers final class CameraBrowserDelegate: NSObject, ICDeviceBrowserDelegate { func deviceBrowser(_ browser: ICDeviceBrowser, didAdd device: ICDevice, moreComing: Bool) { print(Did add device: (device)) } func deviceBrowser(_ browser: ICDeviceBrowser, didRemove device: ICDevice, moreGoing: Bool) { print(Did remove device: (device)) } } final class DeviceProbe: NSObject { private let browser = ICDeviceBrowser() private let delegate = CameraBrowserDelegate() override init() { super.init() browser.delegate = delegate browser.browsedDeviceTypeMask = ICDeviceTypeMask( rawValue: ICDeviceTypeMask.camera.rawValue )! print(Starting device browser...) browser.start() // <-- crash occurs here } }
Topic: App & System Services SubTopic: Core OS Tags:
3d
Sometimes my apps crash on launch at _libsecinit_appsandbox.cold.6
I first started observing this behaviour through the crash logs of one of my App Store apps which are downloaded by Xcode. Then 3 days ago the same crash happened when launching one of my other apps on my own Mac. On the next try, the app launched correctly. The crash logs don't show any of my app's symbols, only a single thread that does something with libsecinit. I have no idea what the problem is, and since these crashes are also downloaded by Xcode, one would get the impression it’s a fault in my programming… but without any hint as to what I’m doing wrong, I have no chance to fix it, and so I get the feeling that it’s actually a macOS bug. I created FB22712334. crash
6
0
124
3d
RealityKit custom component: `has()` returns `true` but typed subscript returns `nil` in SwiftPM test runner
swift test (SwiftPM CLI) fails to decode RealityKit custom components from USD files, even though entity.components.has(MyComponent.self) returns true. Typed access via entity.components[MyComponent.self] returns nil. This forces projects that use RealityKit custom components to use xcodebuild test exclusively. Minimal repro: github.com/mesqueeb/swiftpm-realitykit-custom-component-repro Repro steps git clone https://github.com/mesqueeb/swiftpm-realitykit-custom-component-repro cd swiftpm-realitykit-custom-component-repro swift test --filter componentsPresentButNotDecodableInSwiftTest Observed ✅ entity.components.has(ReproComponent.self) returns true ❌ entity.components[ReproComponent.self] returns nil Expected If has(...) returns true for a registered custom component, typed lookup should decode and return non-nil. Notes Running the same test via xcodebuild test works correctly The component is properly registered and the USDA file correctly references it This affects any project that relies on custom Reality
Replies
1
Boosts
0
Views
203
Activity
1d
SwiftData in-memory ModelContainer causes DefaultStore validation errors on consecutive xcodebuild test runs
When running parallel Swift Testing tests that each create their own in-memory ModelContainer, the first xcodebuild test run succeeds but all subsequent runs fail with DefaultStore save failed validation errors — unless DerivedData is deleted between runs. Setup Each test suite creates an isolated in-memory container with a unique name: ModelConfiguration(UUID().uuidString, schema: schema, isStoredInMemoryOnly: true) The @Model class has non-optional properties (e.g. var v: String, var entityDicMoveNr: Int) that are always set in init. Symptoms on second run SwiftData.DefaultStore save failed with error: Error Domain=NSCocoaErrorDomain Code=1560 Multiple validation errors occurred. NSValidationErrorKey=v, NSValidationErrorValue=null NSValidationErrorKey=entityDicMoveNr, NSValidationErrorValue=null NSValidationErrorKey=historyBackup, NSValidationErrorValue=null The errors appear before test code executes — during SwiftData's internal DefaultStore auto-save. Properties that are always initialized in Swift show
Replies
2
Boosts
0
Views
113
Activity
1d
Reply to Localization doesn't work in watchOS widget configuration intent
Hopefully this is not too late. I've been quite swamped these days... No, I'm still trying to resolve this problem. Thank you for investigating it. Tomorrow, I will be able to check it on a physical device. However, even if this is a workaround, it won't help in my case, because I need to have access to intents from the watch app to check a couple of things and to perform old complications migration from ClockKit to WidgetKit. Also, intents should be shared between the watchOS app and widgets extension. If you don't share it and tap on a widget you get these warnings in the console: Failed to instantiate type ConfigurationAppIntent by name (12WatchWidgets22ConfigurationAppIntentV). The type with this mangled name does not exist in the process’s memory space. [InitializeAction <>] Could not find an intent with identifier ConfigurationAppIntent, mangledTypeName: Optional(12WatchWidgets22ConfigurationAppIntentV) associateAppIntent(forUserActivity:) - Error converting INIntent to App Intent: AppIntents.Perf
Replies
Boosts
Views
Activity
2d
Reply to Sometimes my apps crash on launch at _libsecinit_appsandbox.cold.6
That suggests that you’re hitting the issue described in Updating Mac Software, or something like it. That's weird. My apps do include a software updater (Sparkle) for the versions I sell on my website, but for the App Store versions, the updater is not included. I have separate Xcode targets for the two versions, and the App Store target (the one for which Xcode downloads the crash reports) doesn't even link to the updater. And when running the apps locally (including when the only crash on my Mac happened, which wasn't in Xcode, but just launching the debug build from Spotlight), I always run the App Store version.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
2d
Xcode Cloud with watchOS
When I chose a watchOS Test and set the watch with latest watchOS on Xcode Cloud, I could not pass the CI because it showed xcodebuild: error: Unable to find a destination matching the provided destination specifier: { platform:watchOS Simulator, id:9863C79E-3793-483E-BAA1-F96A0BD34005 } I've change some destination, but it's not worked. Is there any idea what I can do? The watch app is along with the mobile, not standalone.
Replies
1
Boosts
0
Views
28
Activity
2d
This device is already associated with other accounts” error on newly activated Apple Developer account
Hello Developers, I am facing an issue while trying to sign in to a newly created Apple Developer account on my Mac/Xcode. Error message: “This device is already associated with other accounts in the Apple Developer Program or the Apple Developer Enterprise Program. Please use a different device.” Details: The Apple ID works correctly in browser login Apple Developer membership/payment is completed The account is accessible on the Apple website The issue only appears while signing in on the Mac/Xcode I already contacted Apple Support and received a case ID, but no response yet after 24+ hours Things already tried: Signed out/in from Apple ID Restarted Mac Tried different network Cleared related account settings Has anyone faced this issue before? Is this a temporary device association/security restriction from Apple’s side, or does it require manual reset by Apple Support? Any guidance would be appreciated. Thank you.
Replies
0
Boosts
0
Views
43
Activity
2d
Reply to Localization doesn't work in watchOS widget configuration intent
Hopefully this is not too late. I've been quite swamped these days... First, when opening your project with my Xcode (26.4) and selecting the WidgetLocalizable.xcstrings file, and I saw that Xcode showed a warning sign for the watchWidgetConfig.some.title key. Clicking the sign gave me the following: References to this key could not be found in source code. ... I wasn't sure how you had gotten there, but I did the following to fix the issue: Removed the key. Turned on the Use Compiler to Extract Swift Strings build setting the targets. Re-built the project. Observe that Xcode generated the watchWidgetConfig.some.title key, and the warning sign disappeared. Your project then looked good, and so I managed to build and run your project on my Apple Watch, and was able to reproduce and debug the issue, and here is my finding: In your project, AppIntent.swift and WidgetLocalizable.xcstrings are shared by the Watch and WatchWidgets targets. With some debugging, I find that removing the Wat
Replies
Boosts
Views
Activity
2d
RealityView Camera Target Error when set while Orbiting
When interacting with RealityView’s realityViewCameraControls .orbit and setting a new RealityViewCameraContent .cameraTarget, the resulting camera target and camera orbit is incorrect. This can be demonstrated where one finger is orbiting the RealityView, and another pushes a button which changes the camera target. Instead of the camera facing the new target, some point in the scene is the new effective camera target and orbit point. This only occurs when an orbit interaction is currently taking place. If you stop interacting with the orbit, change target, then start orbit interacting again, everything works as expected. Though this example uses two-touches, any change of the camera target has this conflict with orbit interaction. This means interacting with orbit will result in the wrong camera view which is unexpected for users and difficult to reconcile or detect, for developers. Expected: Interacting (orbiting) the scene while setting a new camera target with the buttons on screen (at the same time), the
Replies
1
Boosts
0
Views
297
Activity
2d
HSplitView resize cursor missing when split view is conditionally rendered (FB22712819)
Hey all, Ran into a fun one on macOS 26.4.1 / Xcode 26.4.1, and I think I've narrowed it down enough to be worth sharing. Symptom: HSplitView's divider drags fine, but the cursor never changes to the resize cursor on hover. Just stays as the regular arrow. The cause (in my case): the HSplitView was conditionally rendered via an outer if let: struct PlayerDetailsView: View { let theme: Theme var playerVM = PlayerViewModel.shared var body: some View { let grayscaleCM = ColorMap(table: .grayscale) ZStack { VStack(spacing: 0) { Rectangle() .fill(LinearGradient(colors: [Color.black.opacity(0.45), Color.black.opacity(0)], startPoint: .top, endPoint: .bottom)) .frame(height: 8) Spacer() Rectangle() .fill(LinearGradient(colors: [Color.black.opacity(0.45), Color.black.opacity(0)], startPoint: .bottom, endPoint: .top)) .frame(height: 8) } .allowsHitTesting(false) if let disc = playerVM.disc { HSplitView { DiscInfoView( disc: disc, theme: theme, ) .frame(minWidth: 720, alignment: .topLeading) .buttonShadow() .f
Topic: UI Frameworks SubTopic: SwiftUI
Replies
0
Boosts
0
Views
91
Activity
2d
Reply to Xcode 26.4: IBOutlets/IBActions gutter circles missing — cannot connect storyboard to code (works in 26.3)
Xcode 26.5 RC still doesn't work either.
Replies
Boosts
Views
Activity
2d
Reply to Free trial for one-time purchase: Is the $0 IAP workaround still recommended in 2026?
@Bikrrr Your screenshots show you are testing in the local test environment. Apple reviews In-App Purchases in the sandbox, the same environment used for testing In-App Purchases. To test your In-App Purchases in the sandbox, In App Store Connect, create a Sandbox Apple Account. In your Xcode project, disable StoreKit Testing in Xcode Build and run your app on a device to test in the sandbox. For more information, see Testing In-App Purchases with sandbox.
Replies
Boosts
Views
Activity
2d
Reply to Xcode 26.4.1 Crashes on Launch with Code Signature Invalid on macOS 26.4.1 and All Higher Versions (26.5 / 26.6 beta)
I may have found a way to make it work: try to launch it via terminal using admin privileges like sudo xed . and next time you launch it should magically start. I previously cleaned everything under ~/Library/Develop and tried without success from /Library/Develop (with admin privileges), I also previously deleted and reinstalled Xcode from the AppStore a couple of times. Once it started I removed all previously installed iOS and watchOS simulators that thought I removed before but instead they were still listed as installed by Xcode > components, because I think what caused the issue were those components that were probably corrupted by the latests macOS and/or Xcode 26.4.1 update.
Replies
Boosts
Views
Activity
2d
Reply to Sometimes my apps crash on launch at _libsecinit_appsandbox.cold.6
Well, for instance https://developer.apple.com/documentation/xcode/identifying-the-cause-of-common-crashes says If the Swift runtime encounters a programming error, the runtime catches the error and intentionally crashes the app. But again the question is, if this is really a programming error on my side, how do I find it?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
3d
Reply to Detect SD Card
This is as far as I have got with ImageCaptureCore - attempting the simplest possible case to detect the card - running on an iPhone from Xcode it crashes. I have also tried with the ICDeviceBrowserDelegate directly on the DeviceProbe class but get the same result. import Foundation import ImageCaptureCore @objcMembers final class CameraBrowserDelegate: NSObject, ICDeviceBrowserDelegate { func deviceBrowser(_ browser: ICDeviceBrowser, didAdd device: ICDevice, moreComing: Bool) { print(Did add device: (device)) } func deviceBrowser(_ browser: ICDeviceBrowser, didRemove device: ICDevice, moreGoing: Bool) { print(Did remove device: (device)) } } final class DeviceProbe: NSObject { private let browser = ICDeviceBrowser() private let delegate = CameraBrowserDelegate() override init() { super.init() browser.delegate = delegate browser.browsedDeviceTypeMask = ICDeviceTypeMask( rawValue: ICDeviceTypeMask.camera.rawValue )! print(Starting device browser...) browser.start() // <-- crash occurs here } }
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
3d
Sometimes my apps crash on launch at _libsecinit_appsandbox.cold.6
I first started observing this behaviour through the crash logs of one of my App Store apps which are downloaded by Xcode. Then 3 days ago the same crash happened when launching one of my other apps on my own Mac. On the next try, the app launched correctly. The crash logs don't show any of my app's symbols, only a single thread that does something with libsecinit. I have no idea what the problem is, and since these crashes are also downloaded by Xcode, one would get the impression it’s a fault in my programming… but without any hint as to what I’m doing wrong, I have no chance to fix it, and so I get the feeling that it’s actually a macOS bug. I created FB22712334. crash
Replies
6
Boosts
0
Views
124
Activity
3d