Search results for

“xcode github”

96,036 results found

Post

Replies

Boosts

Views

Activity

Reply to How does Associated Domains Development works on watchOS?
Thanks @kelin Yeah in Apple Watch there are still a few limitations. There is a good documentation to see the difference and how to test per device: https://developer.apple.com/documentation/xcode/allowing-apps-and-websites-to-link-to-your-content/#Support-universal-links openSystemURL(_:) in watchOS I think you finding the limitations of what app will open. I would recommend to fill an enhancement request for the watch if you want to behave like an iOS device: If you're not familiar with how to file enhancement requests, take a look at Bug Reporting: How and Why? Albert Pascual
  Worldwide Developer Relations.
Topic: App & System Services SubTopic: General Tags:
Apr ’26
SwiftData document-based app crashes on undo/redo without ModelContext.transaction(block:)
Overview I'm developing a document-based app for macOS using SwiftData. When I undo/redo changes using Command-Z/Command-Shift-Z, the app reliably crashes with the following error: SwiftData/ModelSnapshot.swift:46: Fatal error: Unexpected backing data for snapshot creation: SwiftData._FullFutureBackingData And before the app crashes, what always happens is that UndoManager stops removing/restoring instances of ChildItem (but continues to remove/restore instances of ParentItem). The issue goes away when I enclose the relevant code in ModelContext.transaction(block:). However, this shouldn't be necessary, as ModelContext.autosaveEnabled is true by default. The issues are occurring with Xcode 26.4 (17E192) and macOS Tahoe 26.4 (25E246). I have modified the macOS Document App project template to showcase the issue. The sample project, along with a screen recording of the crash, can be downloaded from here: https://drive.google.com/drive/folders/13bCB1qRZ6273BI81zW2zUUBraSvv6p5w?usp=share_link Is this exp
3
0
356
Apr ’26
SwiftData document-based app crashes on undo/redo without ModelContext.transaction(block:)
Overview I'm developing a document-based app for macOS using SwiftData. When I undo/redo changes using Command-Z/Command-Shift-Z, the app reliably crashes with the following error: SwiftData/ModelSnapshot.swift:46: Fatal error: Unexpected backing data for snapshot creation: SwiftData._FullFutureBackingData And before the app crashes, what always happens is that UndoManager stops removing/restoring instances of ChildItem (but continues to remove/restore instances of ParentItem). The issue goes away when I enclose the relevant code in ModelContext.transaction(block:). However, this shouldn't be necessary, as ModelContext.autosaveEnabled is true by default. The issues are occurring with Xcode 26.4 (17E192) and macOS Tahoe 26.4 (25E246). I have modified the macOS Document App project template to showcase the issue. The sample project, along with a screen recording of the crash, can be downloaded from here: https://drive.google.com/drive/folders/13bCB1qRZ6273BI81zW2zUUBraSvv6p5w?usp=share_link Is this exp
1
0
291
Apr ’26
Does CKSyncEngine have to be re-initialized after an account change event?
According to this comment in the sample project on GitHub and this answer by Apple Staff, CKSyncEngine should be re-initialized after signing out or switching accounts so that CKSyncEngine schedules a new fetch on init. But according to my tests, CKSyncEngine will schedule a fetch after having a signed out and signed in again, without me ever having to reset the serialized sync state. The documentation doesn't mentioned anywhere that CKSyncEngine should be re-initialized after an account change. In fact, it states that CKSyncEngine will reset its state internally on account changes. So if that's the case, then I'm very confused as to why the official recommendation is to re-initialize CKSyncEngine after receiving .signOut or .accountSwitch. Can someone please clarify the correct approach here?
1
0
280
Apr ’26
Double appearance of a button in .bottomBar ToolbarItem
I'm trying to understand why would a single button appear twice in the toolbar, like so: Do you see the eclipsed button peeking from underneath the top button? It's the same button, somehow doubled or cloned, or replicated. To reproduce it, I only needed to create a fresh iOS project in Xcode and apply this code change: diff --git a/BugRepro20260409/ContentView.swift b/BugRepro20260409/ContentView.swift index 426b298..d22433f 100644 --- a/BugRepro20260409/ContentView.swift +++ b/BugRepro20260409/ContentView.swift @@ -28,7 +28,7 @@ struct ContentView: View { ToolbarItem(placement: .navigationBarTrailing) { EditButton() } - ToolbarItem { + ToolbarItem(placement: .bottomBar) { Button(action: addItem) { Label(Add Item, systemImage: plus) } This is all I needed to do for the double-vision button. Why would this button appear twice when moved to .bottomBar? By the way, when moved to the side and displayed on a smaller device like iPhone SE, the duplication is quite jarring: Interestingly, both buttons are
0
0
61
Apr ’26
Reply to Using mTLS with YubiKey via USB-C and PIV
OK, you’re definitely on the right path here. [quote='883659022, RobJones, /thread/821896?answerId=883659022#883659022, /profile/RobJones'] it works ONLY WITH my enterprise provisioning profile. [/quote] Interesting. I didn’t expect to see a difference between team types here, because Developer Account Help > Reference > Supported capabilities (iOS) says that Keychain Sharing is available for all three team. However, I tested this and discovered a discrepancy. Specifically, I created a test project with two app targets: Individual, signed by the Individual team I use for testing (SKMME9E2Y8) PersonalTeam, signed by the Personal Team I use for testing (SKMME9E2Y8) Note Personal Team is the term that Xcode uses for Apple’s free provisioning feature. It corresponds to the Apple Developer column in the table I referenced earlier. In contrast, an Individual team is covered by the ADP column. I then added the Keychain Sharing capability to both, built them for the device, and then dumped the profiles
Topic: Privacy & Security SubTopic: General Tags:
Apr ’26
Reply to How to add icon and thumbnail image for a Screensaver ?
[quote='883691022, akadeepsh, /thread/806641?answerId=883691022#883691022, /profile/akadeepsh'] isn't there any way to add a thumbnail to replace the blue swirl galaxy? [/quote] (Negative question. Tricky!) AFAIK there’s no supported way to replace the default thumbnail. [quote='883691022, akadeepsh, /thread/806641?answerId=883691022#883691022, /profile/akadeepsh'] I haven't signed any screensaver before so i have no idea. [/quote] I presume you’re distributing it directly? If so, you’ll need to use Developer ID signing. I have a couple of key points about that: Developer ID signing identities are precious, so you need to manage them carefully. See The Care and Feeding of Developer ID. If you’re using Xcode, be aware that the organiser can only export apps. If your distribute a standalone screen saver — rather than, say, nesting it within an app — then you’ll need to manually export and re-sign the screen saver from your Xcode archive. For more on how to do that, see Creating distribution-si
Topic: App & System Services SubTopic: General Tags:
Apr ’26
Issue with Apple Search Ads Attribution Callback (SKAdNetwork / AdAttributionKit)
Dear Apple Developer Technical Support Team, We are currently integrating Apple Search Ads attribution (SKAdNetwork / AdAttributionKit) for our application, but we have been unable to receive any attribution callbacks from Apple. We would appreciate your assistance in diagnosing this issue. App Information: App ID: 1531290216 Bundle ID: com.volvapps.tk2.cn Callback Endpoint: Our server endpoint for receiving attribution postbacks is: https://volvgames.com/.well-known/skadnetwork/report-attribution Issue Description: We have conducted multiple tests under different scenarios, but in all cases, our server has not received any callback from Apple. Test Scenarios: ① Xcode Installation Test Built and launched the app directly via Xcode. Called the following APIs within the app: SKAdNetwork registerAppForAdNetworkAttribution SKAdNetwork updateConversionValue:value Result: No callback received on our server. ②On-Device Developer Mode Test (AdAttributionKit) Enabled AdAttributionKit Developer Mode o
0
0
378
Apr ’26
AppStore.ageRatingCode always returns 0 on real device — is this expected behavior?
Hello everyone I'm implementing age verification in my app to comply with upcoming age assurance laws (Utah, etc.), and I'm using AppStore.ageRatingCode from StoreKit to retrieve my app's current age rating. According to the documentation: extension AppStore { @available(iOS 26.2, macOS 26.2, tvOS 26.2, watchOS 26.2, *) public static var ageRatingCode: Int? { get async } } Use this property to fetch the age rating for your app and compare it with the last known age rating to check if it has changed. However, calling this always returns 0 in my environment. Environment: Device: Real physical device (not simulator) iOS version: 26.4 Sandbox Apple Account: signed in via Settings → Developer → Sandbox Apple Account App Store Connect: app is registered and age rating is configured Xcode Scheme → Run → Options → StoreKit Configuration: None Code: func getAgeRatingCode() async -> Int? { guard let ageRatingCode = await AppStore.ageRatingCode else { print(Age rating code unavailable) return nil } print(age
0
0
71
Apr ’26
App Store Connect rejects com.apple.deviceactivity.monitor for Device Activity Monitor Extension
I’m submitting an iOS app that uses Family Controls / DeviceActivity APIs, and App Store Connect rejects the archive during distribution with this error: Invalid Info.plist value. The value of the NSExtensionPointIdentifier key, com.apple.deviceactivity.monitor, in the Info.plist of “activity-tracking.app/PlugIns/ScheduleMonitorExtension.appex” is invalid. What I’ve already verified: Family Controls capability is approved for our team App IDs and distribution provisioning profiles were regenerated The source Info.plist for the extension contains: NSExtensionPointIdentifier = com.apple.deviceactivity.monitor The archived .appex inside the .xcarchive also contains the same exact value Signed entitlements in the archived .appex include: com.apple.developer.family-controls = true app group entitlement Main app archive is signed correctly as well Latest stable Xcode used This makes it look like the archive is configured correctly, but App Store Connect still rejects the Device Activity Monitor extension p
1
0
171
Apr ’26
Reply to How does Associated Domains Development works on watchOS?
Thank you for the post. Associated Domains work the same in the watchOS. There is an important note: https://developer.apple.com/documentation/xcode/supporting-associated-domains#Add-the-associated-domains-entitlement-to-your-app For a single-target watchOS apps, add the Associated Domains capability to the watchOS app target. For watchOS apps with separate WatchKit extensions, you must add the Associated Domains capability to the WatchKit Extension target. Because the Apple Watch lacks a traditional web browser and has a smaller screen, testing and diagnosing Associated Domains (like Universal Links) requires a slightly different workflow. Just like on iOS, if your apple-app-site-association (AASA) file is hosted on a local server or a dev environment not reachable by Apple's CDN. Since you cannot paste a link into a Diagnostics menu, you have to trigger the link exactly how a user would encounter it on their wrist. The most reliable way to test is to use the Messages or Mail app. Send the Universal
Topic: App & System Services SubTopic: General Tags:
Apr ’26
Reply to How to add icon and thumbnail image for a Screensaver ?
Sorry for asking after such a long time,isn't there any way to add a thumbnail to replace the blue swirl galaxy ? Actually,the person for whom i made the thumbnail reverted to me after long time asking can you try and see if there is any further way to show the thumbnail in the screen saver or make it look a little more professional ? Also installing the screensaver on their Mac shows the security warning so i guess it would be solved by just signing the screensaver. I haven't signed any screensaver before so i have no idea. Let me know if there is any other steps apart from just enabling signing in Xcode.
Topic: App & System Services SubTopic: General Tags:
Apr ’26
Reply to How does Associated Domains Development works on watchOS?
Thanks @kelin Yeah in Apple Watch there are still a few limitations. There is a good documentation to see the difference and how to test per device: https://developer.apple.com/documentation/xcode/allowing-apps-and-websites-to-link-to-your-content/#Support-universal-links openSystemURL(_:) in watchOS I think you finding the limitations of what app will open. I would recommend to fill an enhancement request for the watch if you want to behave like an iOS device: If you're not familiar with how to file enhancement requests, take a look at Bug Reporting: How and Why? Albert Pascual
  Worldwide Developer Relations.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’26
SwiftData document-based app crashes on undo/redo without ModelContext.transaction(block:)
Overview I'm developing a document-based app for macOS using SwiftData. When I undo/redo changes using Command-Z/Command-Shift-Z, the app reliably crashes with the following error: SwiftData/ModelSnapshot.swift:46: Fatal error: Unexpected backing data for snapshot creation: SwiftData._FullFutureBackingData And before the app crashes, what always happens is that UndoManager stops removing/restoring instances of ChildItem (but continues to remove/restore instances of ParentItem). The issue goes away when I enclose the relevant code in ModelContext.transaction(block:). However, this shouldn't be necessary, as ModelContext.autosaveEnabled is true by default. The issues are occurring with Xcode 26.4 (17E192) and macOS Tahoe 26.4 (25E246). I have modified the macOS Document App project template to showcase the issue. The sample project, along with a screen recording of the crash, can be downloaded from here: https://drive.google.com/drive/folders/13bCB1qRZ6273BI81zW2zUUBraSvv6p5w?usp=share_link Is this exp
Replies
3
Boosts
0
Views
356
Activity
Apr ’26
SwiftData document-based app crashes on undo/redo without ModelContext.transaction(block:)
Overview I'm developing a document-based app for macOS using SwiftData. When I undo/redo changes using Command-Z/Command-Shift-Z, the app reliably crashes with the following error: SwiftData/ModelSnapshot.swift:46: Fatal error: Unexpected backing data for snapshot creation: SwiftData._FullFutureBackingData And before the app crashes, what always happens is that UndoManager stops removing/restoring instances of ChildItem (but continues to remove/restore instances of ParentItem). The issue goes away when I enclose the relevant code in ModelContext.transaction(block:). However, this shouldn't be necessary, as ModelContext.autosaveEnabled is true by default. The issues are occurring with Xcode 26.4 (17E192) and macOS Tahoe 26.4 (25E246). I have modified the macOS Document App project template to showcase the issue. The sample project, along with a screen recording of the crash, can be downloaded from here: https://drive.google.com/drive/folders/13bCB1qRZ6273BI81zW2zUUBraSvv6p5w?usp=share_link Is this exp
Replies
1
Boosts
0
Views
291
Activity
Apr ’26
Reply to error build: Command SwiftCompile failed with a nonzero exit code
@MMarcin Thanks for the post, this thread is 2 years old, would you mind to create a new thread and post the version of Xcode you are using as well as the errors you are getting in the console? Thanks Albert
  Worldwide Developer Relations.
Replies
Boosts
Views
Activity
Apr ’26
Does CKSyncEngine have to be re-initialized after an account change event?
According to this comment in the sample project on GitHub and this answer by Apple Staff, CKSyncEngine should be re-initialized after signing out or switching accounts so that CKSyncEngine schedules a new fetch on init. But according to my tests, CKSyncEngine will schedule a fetch after having a signed out and signed in again, without me ever having to reset the serialized sync state. The documentation doesn't mentioned anywhere that CKSyncEngine should be re-initialized after an account change. In fact, it states that CKSyncEngine will reset its state internally on account changes. So if that's the case, then I'm very confused as to why the official recommendation is to re-initialize CKSyncEngine after receiving .signOut or .accountSwitch. Can someone please clarify the correct approach here?
Replies
1
Boosts
0
Views
280
Activity
Apr ’26
Double appearance of a button in .bottomBar ToolbarItem
I'm trying to understand why would a single button appear twice in the toolbar, like so: Do you see the eclipsed button peeking from underneath the top button? It's the same button, somehow doubled or cloned, or replicated. To reproduce it, I only needed to create a fresh iOS project in Xcode and apply this code change: diff --git a/BugRepro20260409/ContentView.swift b/BugRepro20260409/ContentView.swift index 426b298..d22433f 100644 --- a/BugRepro20260409/ContentView.swift +++ b/BugRepro20260409/ContentView.swift @@ -28,7 +28,7 @@ struct ContentView: View { ToolbarItem(placement: .navigationBarTrailing) { EditButton() } - ToolbarItem { + ToolbarItem(placement: .bottomBar) { Button(action: addItem) { Label(Add Item, systemImage: plus) } This is all I needed to do for the double-vision button. Why would this button appear twice when moved to .bottomBar? By the way, when moved to the side and displayed on a smaller device like iPhone SE, the duplication is quite jarring: Interestingly, both buttons are
Replies
0
Boosts
0
Views
61
Activity
Apr ’26
Reply to Using mTLS with YubiKey via USB-C and PIV
OK, you’re definitely on the right path here. [quote='883659022, RobJones, /thread/821896?answerId=883659022#883659022, /profile/RobJones'] it works ONLY WITH my enterprise provisioning profile. [/quote] Interesting. I didn’t expect to see a difference between team types here, because Developer Account Help > Reference > Supported capabilities (iOS) says that Keychain Sharing is available for all three team. However, I tested this and discovered a discrepancy. Specifically, I created a test project with two app targets: Individual, signed by the Individual team I use for testing (SKMME9E2Y8) PersonalTeam, signed by the Personal Team I use for testing (SKMME9E2Y8) Note Personal Team is the term that Xcode uses for Apple’s free provisioning feature. It corresponds to the Apple Developer column in the table I referenced earlier. In contrast, an Individual team is covered by the ADP column. I then added the Keychain Sharing capability to both, built them for the device, and then dumped the profiles
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’26
Reply to How to add icon and thumbnail image for a Screensaver ?
[quote='883691022, akadeepsh, /thread/806641?answerId=883691022#883691022, /profile/akadeepsh'] isn't there any way to add a thumbnail to replace the blue swirl galaxy? [/quote] (Negative question. Tricky!) AFAIK there’s no supported way to replace the default thumbnail. [quote='883691022, akadeepsh, /thread/806641?answerId=883691022#883691022, /profile/akadeepsh'] I haven't signed any screensaver before so i have no idea. [/quote] I presume you’re distributing it directly? If so, you’ll need to use Developer ID signing. I have a couple of key points about that: Developer ID signing identities are precious, so you need to manage them carefully. See The Care and Feeding of Developer ID. If you’re using Xcode, be aware that the organiser can only export apps. If your distribute a standalone screen saver — rather than, say, nesting it within an app — then you’ll need to manually export and re-sign the screen saver from your Xcode archive. For more on how to do that, see Creating distribution-si
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’26
Issue with Apple Search Ads Attribution Callback (SKAdNetwork / AdAttributionKit)
Dear Apple Developer Technical Support Team, We are currently integrating Apple Search Ads attribution (SKAdNetwork / AdAttributionKit) for our application, but we have been unable to receive any attribution callbacks from Apple. We would appreciate your assistance in diagnosing this issue. App Information: App ID: 1531290216 Bundle ID: com.volvapps.tk2.cn Callback Endpoint: Our server endpoint for receiving attribution postbacks is: https://volvgames.com/.well-known/skadnetwork/report-attribution Issue Description: We have conducted multiple tests under different scenarios, but in all cases, our server has not received any callback from Apple. Test Scenarios: ① Xcode Installation Test Built and launched the app directly via Xcode. Called the following APIs within the app: SKAdNetwork registerAppForAdNetworkAttribution SKAdNetwork updateConversionValue:value Result: No callback received on our server. ②On-Device Developer Mode Test (AdAttributionKit) Enabled AdAttributionKit Developer Mode o
Replies
0
Boosts
0
Views
378
Activity
Apr ’26
AppStore.ageRatingCode always returns 0 on real device — is this expected behavior?
Hello everyone I'm implementing age verification in my app to comply with upcoming age assurance laws (Utah, etc.), and I'm using AppStore.ageRatingCode from StoreKit to retrieve my app's current age rating. According to the documentation: extension AppStore { @available(iOS 26.2, macOS 26.2, tvOS 26.2, watchOS 26.2, *) public static var ageRatingCode: Int? { get async } } Use this property to fetch the age rating for your app and compare it with the last known age rating to check if it has changed. However, calling this always returns 0 in my environment. Environment: Device: Real physical device (not simulator) iOS version: 26.4 Sandbox Apple Account: signed in via Settings → Developer → Sandbox Apple Account App Store Connect: app is registered and age rating is configured Xcode Scheme → Run → Options → StoreKit Configuration: None Code: func getAgeRatingCode() async -> Int? { guard let ageRatingCode = await AppStore.ageRatingCode else { print(Age rating code unavailable) return nil } print(age
Replies
0
Boosts
0
Views
71
Activity
Apr ’26
Reply to Paired Watch not appearing in Xcode
It is useful to re-pair the watch after it has been unpaired. After I did this operation, it could be displayed in Xcode.
Replies
Boosts
Views
Activity
Apr ’26
App Store Connect rejects com.apple.deviceactivity.monitor for Device Activity Monitor Extension
I’m submitting an iOS app that uses Family Controls / DeviceActivity APIs, and App Store Connect rejects the archive during distribution with this error: Invalid Info.plist value. The value of the NSExtensionPointIdentifier key, com.apple.deviceactivity.monitor, in the Info.plist of “activity-tracking.app/PlugIns/ScheduleMonitorExtension.appex” is invalid. What I’ve already verified: Family Controls capability is approved for our team App IDs and distribution provisioning profiles were regenerated The source Info.plist for the extension contains: NSExtensionPointIdentifier = com.apple.deviceactivity.monitor The archived .appex inside the .xcarchive also contains the same exact value Signed entitlements in the archived .appex include: com.apple.developer.family-controls = true app group entitlement Main app archive is signed correctly as well Latest stable Xcode used This makes it look like the archive is configured correctly, but App Store Connect still rejects the Device Activity Monitor extension p
Replies
1
Boosts
0
Views
171
Activity
Apr ’26
Reply to Xcode 26.4 rc
Same here, Xcode Version 26.4 (17E192) Very frustrating experience. Submitted: FB22452094
Replies
Boosts
Views
Activity
Apr ’26
Reply to How does Associated Domains Development works on watchOS?
Thank you for the post. Associated Domains work the same in the watchOS. There is an important note: https://developer.apple.com/documentation/xcode/supporting-associated-domains#Add-the-associated-domains-entitlement-to-your-app For a single-target watchOS apps, add the Associated Domains capability to the watchOS app target. For watchOS apps with separate WatchKit extensions, you must add the Associated Domains capability to the WatchKit Extension target. Because the Apple Watch lacks a traditional web browser and has a smaller screen, testing and diagnosing Associated Domains (like Universal Links) requires a slightly different workflow. Just like on iOS, if your apple-app-site-association (AASA) file is hosted on a local server or a dev environment not reachable by Apple's CDN. Since you cannot paste a link into a Diagnostics menu, you have to trigger the link exactly how a user would encounter it on their wrist. The most reliable way to test is to use the Messages or Mail app. Send the Universal
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’26
Reply to How to add icon and thumbnail image for a Screensaver ?
Sorry for asking after such a long time,isn't there any way to add a thumbnail to replace the blue swirl galaxy ? Actually,the person for whom i made the thumbnail reverted to me after long time asking can you try and see if there is any further way to show the thumbnail in the screen saver or make it look a little more professional ? Also installing the screensaver on their Mac shows the security warning so i guess it would be solved by just signing the screensaver. I haven't signed any screensaver before so i have no idea. Let me know if there is any other steps apart from just enabling signing in Xcode.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’26