Search results for

“xcode github”

96,030 results found

Post

Replies

Boosts

Views

Activity

Reply to Xcode 26.4.1, iOS 26.4.2, watchOS 26.4, Apple Watch Ultra 3 not appearing as development device.
Thanks for the post, there are many Apple Watch engineers that I’m just they’ll jump into the thread, however this question seems like how to start with Apple Watch development and pair the Apple Watch to Xcode. When an Apple Watch fails to appear as a development device in Xcode, the issue usually stems from the wireless pairing bridge between Xcode, the iPhone, and the Watch, or a missing Developer Mode toggle. On the iPhone go to Settings → Privacy & Security → Developer Mode and toggle it on. On the Apple Watch go to Settings → Privacy & Security → Developer Mode and toggle it on. Both devices will require a restart. Connect the paired iPhone to your Mac via a physical cable. In Xcode, go to Window → Devices and Simulators. Select your iPhone in the left sidebar. Look at the Paired Watches section. If the Watch is listed but has a yellow warning triangle, hover over it. It may say Preparing device for development. If you have successfully completed all the steps
1w
Reply to CLLocationManager permission prompt never appears in Swift Playground
@Marka99 Welcome! Thank you for the post. I believe developers are referring to samples where you can observe how to implement that functionality. https://developer.apple.com/tutorials/sample-apps Also videos are very helpful in my opinion: https://developer.apple.com/search/?q=CLLocation Swift Playgrounds App projects fully support Core Location. Because they compile into real application bundles, they behave exactly like apps built in Xcode. You must provide a Usage Description string. In Xcode, this is done in the Info.plist. In Swift Playgrounds, this is done in the App Settings. If this string is blank, the prompt will never appear. The CLLocationManager instance must be strongly retained in memory. If you declare let manager = CLLocationManager() inside .onAppear, the manager is destroyed the moment the .onAppear closure finishes executing. Do not call startUpdatingLocation() immediately after requesting authorization. Instead, wait for the delegate to confirm you have permission. Albe
1w
Reply to ScrollView/ClipView weirdness.
Here is a sample program to demonstrate the problem. Using Xcode, create a new document project using interface: xib, language: swift Once that is done, delete Document.xib, go into Document.swift and add the following method: override func makeWindowControllers() { let controller = MyWC(document: self) addWindowController(controller) controller.showWindow(self) controller.window?.makeFirstResponder(nil) } Then make a new Swift file named MyWC.swift with this content: import AppKit class MyWC: NSWindowController { init(document: Document) { let window = NSWindow( contentRect: NSRect(x: 0.0, y: 100.0, width: 700.0, height: 500.0), styleMask: [.titled, .closable, .miniaturizable, .resizable], backing: .buffered, defer: false ) super.init(window: window) window.minSize = NSSize(width: 200, height: 200) let myScrollView = NSScrollView() let contentView = NSView(frame: NSRect(x: 0.0, y: 0.0, width: 800.0, height: 600.0)) let clipView = NSClipView(frame: myScrollView.contentView.frame) clipView.backgroundC
Topic: UI Frameworks SubTopic: AppKit Tags:
1w
TelephonyMessagingKit drops first SMS at cold launch — race between client XPC handler registration and server pending flush
Hi all, I'm the developer of OV Message, an end-to-end encrypted SMS messaging app already shipped on Google Play (Android, where it natively encrypts SMS content). The iOS port aims to be the default carrier-messaging app, handling SMS, MMS, and RCS through TelephonyMessagingKit with the com.apple.developer.carrier-messaging-app entitlement under the EU programme. While testing the cold-launch flow on iOS 26.x, I've hit a reproducible bug that silently drops the first SMS/MMS/RCS that wakes the app, and I'd like to confirm whether other devs working with this API see the same. The bug When a default carrier-messaging app is force-killed and a message arrives, iOS correctly: Routes the message via CommCenter (IMS in my case — SFR France) Wakes the app in background (state = .background at didFinishLaunchingWithOptions) Acquires a TelephonyMessaging runningboard assertion on the app But CommCenter then pushes the pending message via XPC before the client TMK library has finished registering its messag
3
0
192
1w
Reply to Charts performance issue
Hi everyone, I observe similar performance issue. They performance is degraded when the x axis domain is enlarged. I add 5 bars per day, and around 150 days there is a visible jitter and tearing while dragging. I've tried various techniques to improve it such as large xAxis and displaying events only around the scroll position, however as noted above using it lowers the performance. I've also tried prepending and apending days, without having a large x axis domain, but this makes the scroll position jump. Here is another code sample. import Charts import SwiftUI struct PerformanceBarChart: View { struct DataPoint: Identifiable { let id = UUID() let date: Date let x: Int let yStart: Date let yEnd: Date let category: String } private var today = Date.now.startOfDay() @State private var data: [DataPoint] = [] @State private var scrollPosition: Date = Date.now @State private var loading = false @State var xAxisDomain: ClosedRange = Date.now...Date.now private let calendar = Cal
Topic: UI Frameworks SubTopic: SwiftUI Tags:
1w
CloudKit container in a broken state
I'm a first time developer, relying heavily on Claude Agent. In my app, I'm using CloudKit to sync data between devices, but after a migration something got corrupted and syncing is no longer working. I'm using SwiftData with NSPersistentCloudKitContainer. I'm using Xcode 26.4.1 on a Mac mini. I'm testing my app on the same Mac mini, running Tahoe 26.4.1 as well as an iPad 12.9 running iPadOS 26.3.1 and an iPhone running iOS 18.7.8. Sync stopped after a cachedTotal property was added to a SwiftData model, which triggered a backfill migration that wrote to all records simultaneously across multiple devices. This was followed by an iCloud sign-out/sign-in on the Mac. Here’s a summary of everything I’ve tried already: Reset All Data on all devices multiple times Deleted and reinstalled the app on all devices Deleted the CloudKit zone twice Force-deleted local SQLite store files to clear change tokens Zone and subscription both appear correct in the dashboard Change token updates when data is written (co
2
0
114
1w
Reply to SwiftUI Text rendering with too small height / one line missing causing unexpected text truncation on iPhone devices
I can always reproduce this with any iPhone device or simulator with 2556x1179 screen for iOS 18.6, 26.4, and 26.5, but not on iOS 17.5. I didn't test other iOS versions so far. On my iPhone 15 device I have now reproduced again with 26.4.2 and earlier 26.4.1 I believe. macOS 26.4.1 (25E253) Xcode 26.5.0 beta 2 and beta 3 or Xcode 26.4.0 (17E192) I'm not sure what variable is different in your setup. In our main app this is part of an UICollectionView To confirm, you see the same result outside of a UIViewRepresentable as well? To make this more clear: Our main app is a bigger UICollectionViewController with UICollectionViewCell's with SwiftUI hosted content configuration. It happens here on the same devices (screen size) and horizontal padding of 20. No dynamic type involved here, because we have our own Typography system (creating Font and UIFont) with fixed font sizes and line heights. We now will ship a UILabel embedded in the same cell via UIViewRepresentable, which doesn't have this bu
Topic: UI Frameworks SubTopic: SwiftUI Tags:
1w
Reply to Xcode now hangs; SDKs are "status unavailable"
I'm wondering if this is actually as much of a macOS 26.4.x issue as well as an Xcode issue. I've tried Xcode 26.4, Xcode 26.4.1, Xcode 26.5 beta 3, cleaning out my installation and data directories each time as suggested in the above posts, and still no joy. Sometimes the simulators go status unavailable after a few hours, other times it happens after a reboot of the computer. I've even gone back to installing Xcode 26.3, but a reboot still causes the problem. I'm leery about installing the beta of macOS 26.5 because this is my production machine. Apple informed me they are aware of this bug, but nothing seems to fix it for me. Has anyone had luck with the macOS 26.5 beta along with the Xcode 26.5 beta regarding this bug? How are people getting their work done with this?
1w
CloudKit Query (and Dashboard) returns only a few records
When I query, an existing database with over 10,000 records from an Objective C app (i.e. CKQueryOperation) I get only N x 100 records returned where N varies each time between 0 and about 10 (i.e. never more than 1000 records and always an even multiple of 100). When I do a “Query Records” on the CloudKit Dashboard I get a similar number of pages of records downloaded (i.e. 0-10). If I tap “Query Records” multiple times I will get more pages of records until the full 10,000 are downloaded. This had been working fine until recently, both from the app and the Dashboard. There are multiple Record Types in the database. Only one Record Type is erroring. The other Record Types continue to work both from the app and the Dashboard. In particular, the Users Record Type has many many records and they all download to many pages with a single tap of “Query Records”. I have posted this to the Feedback Assistant under FB22358865. Here is my code: NSPredicate *predicate =[NSPredicate predicateWithFormat:
3
0
191
1w
Reply to SwiftData with CloudKit Error: Error updating background task request
@DTS Engineer Albert, thanks for the response. Error Please see the screenshot of the fault log, Subsystem for the log iscom.apple.cloudkit Category for the log is Scheduler Answer to your questions: Cloud sync works and data gets synced, no issue with the data. Yes correct primary sync doesn't happen via BGTaskScheduler. However SwiftData / CloudKit initiates a background task to do some processing. The background is the one that gets blocked. This is a clean new project (no 3rd party libraries) and I have written the code so I am sure of that there is no background task I am initiating. Testing / Sample project: If you really want to test it, please refer to the project attached in FB22634797 Though FB22634797 is for a different issue, the Xcode project would throw the fault log in Xcode. It is a very simple project. Question It would be great if someone from SwiftData / CoreData / CloudKit team can confirm this.
1w
Reply to SwiftUI Text rendering with too small height / one line missing causing unexpected text truncation on iPhone devices
This is interesting, thanks for your input @DTS Engineer @kai_ , When I test your latest code snippet, the text does not truncate for me on an iPhone 15, 16, or 17 simulator running iOS 17 - iOS 26. When I compare our view debugger screenshots sent above, I can see your content margins appear to have more padding then what I'm seeing in my Xcode. What version of Xcode and macOS are you using, and are you able to share the Xcode project file here? [quote='886011022, kai_, /thread/823675?answerId=886011022#886011022, /profile/kai_'] In our main app this is part of an UICollectionView [/quote] To confirm, you see the same result outside of a UIViewRepresentable as well? Thanks!  Travis
Topic: UI Frameworks SubTopic: SwiftUI Tags:
1w
Reply to Xcode 26.4.1, iOS 26.4.2, watchOS 26.4, Apple Watch Ultra 3 not appearing as development device.
Thanks for the post, there are many Apple Watch engineers that I’m just they’ll jump into the thread, however this question seems like how to start with Apple Watch development and pair the Apple Watch to Xcode. When an Apple Watch fails to appear as a development device in Xcode, the issue usually stems from the wireless pairing bridge between Xcode, the iPhone, and the Watch, or a missing Developer Mode toggle. On the iPhone go to Settings → Privacy & Security → Developer Mode and toggle it on. On the Apple Watch go to Settings → Privacy & Security → Developer Mode and toggle it on. Both devices will require a restart. Connect the paired iPhone to your Mac via a physical cable. In Xcode, go to Window → Devices and Simulators. Select your iPhone in the left sidebar. Look at the Paired Watches section. If the Watch is listed but has a yellow warning triangle, hover over it. It may say Preparing device for development. If you have successfully completed all the steps
Replies
Boosts
Views
Activity
1w
Reply to SwiftData with CloudKit Error: Error updating background task request
Thanks @DTS Engineer I have created a feedback FB22670187 It contains a sample project and also attached a video Run it on a real device The video shows the log being generated on Xcode. Look at the subsystem of the log, it is from com.apple.cloudkit It contains details about the fault and how to reproduce it.
Replies
Boosts
Views
Activity
1w
Xcode 26.4.1, iOS 26.4.2, watchOS 26.4, Apple Watch Ultra 3 not appearing as development device.
Xcode 26.4.1, iOS 26.4.2, watchOS 26.4, Apple Watch Ultra 3 not appearing as development device. Can't do any IWatch development
Replies
3
Boosts
0
Views
149
Activity
1w
Reply to CLLocationManager permission prompt never appears in Swift Playground
@Marka99 Welcome! Thank you for the post. I believe developers are referring to samples where you can observe how to implement that functionality. https://developer.apple.com/tutorials/sample-apps Also videos are very helpful in my opinion: https://developer.apple.com/search/?q=CLLocation Swift Playgrounds App projects fully support Core Location. Because they compile into real application bundles, they behave exactly like apps built in Xcode. You must provide a Usage Description string. In Xcode, this is done in the Info.plist. In Swift Playgrounds, this is done in the App Settings. If this string is blank, the prompt will never appear. The CLLocationManager instance must be strongly retained in memory. If you declare let manager = CLLocationManager() inside .onAppear, the manager is destroyed the moment the .onAppear closure finishes executing. Do not call startUpdatingLocation() immediately after requesting authorization. Instead, wait for the delegate to confirm you have permission. Albe
Replies
Boosts
Views
Activity
1w
Reply to ScrollView/ClipView weirdness.
Here is a sample program to demonstrate the problem. Using Xcode, create a new document project using interface: xib, language: swift Once that is done, delete Document.xib, go into Document.swift and add the following method: override func makeWindowControllers() { let controller = MyWC(document: self) addWindowController(controller) controller.showWindow(self) controller.window?.makeFirstResponder(nil) } Then make a new Swift file named MyWC.swift with this content: import AppKit class MyWC: NSWindowController { init(document: Document) { let window = NSWindow( contentRect: NSRect(x: 0.0, y: 100.0, width: 700.0, height: 500.0), styleMask: [.titled, .closable, .miniaturizable, .resizable], backing: .buffered, defer: false ) super.init(window: window) window.minSize = NSSize(width: 200, height: 200) let myScrollView = NSScrollView() let contentView = NSView(frame: NSRect(x: 0.0, y: 0.0, width: 800.0, height: 600.0)) let clipView = NSClipView(frame: myScrollView.contentView.frame) clipView.backgroundC
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
1w
TelephonyMessagingKit drops first SMS at cold launch — race between client XPC handler registration and server pending flush
Hi all, I'm the developer of OV Message, an end-to-end encrypted SMS messaging app already shipped on Google Play (Android, where it natively encrypts SMS content). The iOS port aims to be the default carrier-messaging app, handling SMS, MMS, and RCS through TelephonyMessagingKit with the com.apple.developer.carrier-messaging-app entitlement under the EU programme. While testing the cold-launch flow on iOS 26.x, I've hit a reproducible bug that silently drops the first SMS/MMS/RCS that wakes the app, and I'd like to confirm whether other devs working with this API see the same. The bug When a default carrier-messaging app is force-killed and a message arrives, iOS correctly: Routes the message via CommCenter (IMS in my case — SFR France) Wakes the app in background (state = .background at didFinishLaunchingWithOptions) Acquires a TelephonyMessaging runningboard assertion on the app But CommCenter then pushes the pending message via XPC before the client TMK library has finished registering its messag
Replies
3
Boosts
0
Views
192
Activity
1w
Reply to Charts performance issue
Hi everyone, I observe similar performance issue. They performance is degraded when the x axis domain is enlarged. I add 5 bars per day, and around 150 days there is a visible jitter and tearing while dragging. I've tried various techniques to improve it such as large xAxis and displaying events only around the scroll position, however as noted above using it lowers the performance. I've also tried prepending and apending days, without having a large x axis domain, but this makes the scroll position jump. Here is another code sample. import Charts import SwiftUI struct PerformanceBarChart: View { struct DataPoint: Identifiable { let id = UUID() let date: Date let x: Int let yStart: Date let yEnd: Date let category: String } private var today = Date.now.startOfDay() @State private var data: [DataPoint] = [] @State private var scrollPosition: Date = Date.now @State private var loading = false @State var xAxisDomain: ClosedRange = Date.now...Date.now private let calendar = Cal
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
1w
Reply to SwiftUI Text rendering with too small height / one line missing causing unexpected text truncation on iPhone devices
Hi, I’m a colleague of Kai’s. I think the missing piece here is the app language. When I run Kai’s code snippet, I only see truncated text when the app language is set to German (via the scheme’s run options), not when it is set to English. Here are screenshots from the iPhone 16 simulator (Xcode 26.5b3, iOS 26.5).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
1w
CloudKit container in a broken state
I'm a first time developer, relying heavily on Claude Agent. In my app, I'm using CloudKit to sync data between devices, but after a migration something got corrupted and syncing is no longer working. I'm using SwiftData with NSPersistentCloudKitContainer. I'm using Xcode 26.4.1 on a Mac mini. I'm testing my app on the same Mac mini, running Tahoe 26.4.1 as well as an iPad 12.9 running iPadOS 26.3.1 and an iPhone running iOS 18.7.8. Sync stopped after a cachedTotal property was added to a SwiftData model, which triggered a backfill migration that wrote to all records simultaneously across multiple devices. This was followed by an iCloud sign-out/sign-in on the Mac. Here’s a summary of everything I’ve tried already: Reset All Data on all devices multiple times Deleted and reinstalled the app on all devices Deleted the CloudKit zone twice Force-deleted local SQLite store files to clear change tokens Zone and subscription both appear correct in the dashboard Change token updates when data is written (co
Replies
2
Boosts
0
Views
114
Activity
1w
Reply to SwiftUI Text rendering with too small height / one line missing causing unexpected text truncation on iPhone devices
I can always reproduce this with any iPhone device or simulator with 2556x1179 screen for iOS 18.6, 26.4, and 26.5, but not on iOS 17.5. I didn't test other iOS versions so far. On my iPhone 15 device I have now reproduced again with 26.4.2 and earlier 26.4.1 I believe. macOS 26.4.1 (25E253) Xcode 26.5.0 beta 2 and beta 3 or Xcode 26.4.0 (17E192) I'm not sure what variable is different in your setup. In our main app this is part of an UICollectionView To confirm, you see the same result outside of a UIViewRepresentable as well? To make this more clear: Our main app is a bigger UICollectionViewController with UICollectionViewCell's with SwiftUI hosted content configuration. It happens here on the same devices (screen size) and horizontal padding of 20. No dynamic type involved here, because we have our own Typography system (creating Font and UIFont) with fixed font sizes and line heights. We now will ship a UILabel embedded in the same cell via UIViewRepresentable, which doesn't have this bu
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
1w
Reply to Xcode now hangs; SDKs are "status unavailable"
FWIW, my Intel MacBook Pro is still at macOS 26.3 and Xcode 26.3, and everything is running correctly with regard to the simulators always being available.
Replies
Boosts
Views
Activity
1w
Reply to Xcode now hangs; SDKs are "status unavailable"
I'm wondering if this is actually as much of a macOS 26.4.x issue as well as an Xcode issue. I've tried Xcode 26.4, Xcode 26.4.1, Xcode 26.5 beta 3, cleaning out my installation and data directories each time as suggested in the above posts, and still no joy. Sometimes the simulators go status unavailable after a few hours, other times it happens after a reboot of the computer. I've even gone back to installing Xcode 26.3, but a reboot still causes the problem. I'm leery about installing the beta of macOS 26.5 because this is my production machine. Apple informed me they are aware of this bug, but nothing seems to fix it for me. Has anyone had luck with the macOS 26.5 beta along with the Xcode 26.5 beta regarding this bug? How are people getting their work done with this?
Replies
Boosts
Views
Activity
1w
CloudKit Query (and Dashboard) returns only a few records
When I query, an existing database with over 10,000 records from an Objective C app (i.e. CKQueryOperation) I get only N x 100 records returned where N varies each time between 0 and about 10 (i.e. never more than 1000 records and always an even multiple of 100). When I do a “Query Records” on the CloudKit Dashboard I get a similar number of pages of records downloaded (i.e. 0-10). If I tap “Query Records” multiple times I will get more pages of records until the full 10,000 are downloaded. This had been working fine until recently, both from the app and the Dashboard. There are multiple Record Types in the database. Only one Record Type is erroring. The other Record Types continue to work both from the app and the Dashboard. In particular, the Users Record Type has many many records and they all download to many pages with a single tap of “Query Records”. I have posted this to the Feedback Assistant under FB22358865. Here is my code: NSPredicate *predicate =[NSPredicate predicateWithFormat:
Replies
3
Boosts
0
Views
191
Activity
1w
Reply to SwiftData with CloudKit Error: Error updating background task request
@DTS Engineer Albert, thanks for the response. Error Please see the screenshot of the fault log, Subsystem for the log iscom.apple.cloudkit Category for the log is Scheduler Answer to your questions: Cloud sync works and data gets synced, no issue with the data. Yes correct primary sync doesn't happen via BGTaskScheduler. However SwiftData / CloudKit initiates a background task to do some processing. The background is the one that gets blocked. This is a clean new project (no 3rd party libraries) and I have written the code so I am sure of that there is no background task I am initiating. Testing / Sample project: If you really want to test it, please refer to the project attached in FB22634797 Though FB22634797 is for a different issue, the Xcode project would throw the fault log in Xcode. It is a very simple project. Question It would be great if someone from SwiftData / CoreData / CloudKit team can confirm this.
Replies
Boosts
Views
Activity
1w
Reply to SwiftUI Text rendering with too small height / one line missing causing unexpected text truncation on iPhone devices
This is interesting, thanks for your input @DTS Engineer @kai_ , When I test your latest code snippet, the text does not truncate for me on an iPhone 15, 16, or 17 simulator running iOS 17 - iOS 26. When I compare our view debugger screenshots sent above, I can see your content margins appear to have more padding then what I'm seeing in my Xcode. What version of Xcode and macOS are you using, and are you able to share the Xcode project file here? [quote='886011022, kai_, /thread/823675?answerId=886011022#886011022, /profile/kai_'] In our main app this is part of an UICollectionView [/quote] To confirm, you see the same result outside of a UIViewRepresentable as well? Thanks!  Travis
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
1w