Posts under Developer Tools & Services topic

Post

Replies

Boosts

Views

Activity

Attach a debugger to app launched via `devicectrl`
With the latest (26) version of Apple's developer tools, is there a way to manually attach a debugger (other than lldb) to an iOS app launched with "devicectl device process launch --start-stopped"? In the past, this was possible via the ios-deploy third-party tool (now defunct), which provided a debugserver port. This information is notably missing when using devicectrl – although the process ID of the launch process is provided, and the tool is clearly aimed at letting you launch and attach to processes from the command line. lldb can, of course, attach via its built-in support for this using the device set of commands. But I'm explicitly looking for a way to attach my own debugger via the GDB-compatible debug proxy.
2
0
71
5d
ChatGPT in Xcode 26 not recognizing Plus subscription
Hi all, Has anyone else run into this issue in Xcode 26? I’m logged into my paid ChatGPT Plus account, but the Xcode integration doesn’t seem to recognize the subscription. After a short period of use, I get the following error: “Over daily limit. ChatGPT in Xcode will be unavailable for up to 24 hours. For higher limits, sign in with a paid ChatGPT account.” Since I’m already signed in with a paid account, this looks like either a bug or a limitation specific to Xcode. Is this expected behavior, or has anyone found a workaround to make Xcode properly recognize Plus accounts? Thanks in advance for any guidance.
31
19
1.7k
5d
Creating Swift Package with binaryTarget that has dependencies
How can you distribute an XCFramework via Swift Package Manager when it has dependencies on other Swift packages? We accomplished this with CocoaPods in order to distribute our closed source SDK that has dependencies, but need to migrate to SPM. Note none of the types from the dependencies are used as part of our module’s public interface - usage is purely internal. I’ve made a lot of progress following these steps for a simple example: Create Framework Project Create a new iOS Framework project in Xcode and name it WallpaperKit In the project settings select the target and verify in Build Settings that Build Libraries for Distribution is Yes then set Skip Install to No Create a new UIViewController subclass, name it WallpaperPreviewViewController, make it public, and add some functionality to it to show a UIImageView Add a new Package Dependency in the project settings, for this example we’ll use https://github.com/onevcat/Kingfisher, and specify exact version 8.5.0 Add internal import Kingfisher and use it in WallpaperPreviewViewController to download and show an image from the web Close the WallpaperKit project Create Hosting App Project (this makes it easier to develop the framework functionality and test it in an app with Xcode building both in the same workspace) Create a new iOS app project and name it WallpaperApp Create a new workspace named WallpaperApp Close the WallpaperApp project Drag and drop WallpaperApp.xcodeproj into the workspace’s sidebar Drag and drop WallpaperKit.xcodeproj into the workspace’s sidebar Switch the scheme to WallpaperKit and build Select WallpaperApp project, then with WallpaperApp target selected, in the General tab under Frameworks, Libraries, and Embedded Content, click + and add WallpaperKit.framework In ViewController.swift, import WallpaperKit and add functionality to present an instance of WallpaperPreviewViewController Run the app and verify it works Create XCFramework In Terminal, cd into WallpaperKit and run xcodebuild archive -scheme WallpaperKit -configuration Release -destination 'generic/platform=iOS' -archivePath './build/WallpaperKit.framework-iphoneos.xcarchive' SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES DEFINES_MODULE=YES Run xcodebuild archive -scheme WallpaperKit -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath './build/WallpaperKit.framework-iphonesimulator.xcarchive' SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES DEFINES_MODULE=YES Run xcodebuild -create-xcframework -framework './build/WallpaperKit.framework-iphonesimulator.xcarchive/Products/Library/Frameworks/WallpaperKit.framework' -framework './build/WallpaperKit.framework-iphoneos.xcarchive/Products/Library/Frameworks/WallpaperKit.framework' -output './build/WallpaperKit.xcframework' Open the build folder and retrieve the XCFramework Create Swift Package Create a new package in Xcode, select Library, and name it WallpaperKitDist Drag and drop WallpaperKit.xcframework into Sources Create a new directory in Sources called WallpaperKitDependencies Create a new Swift file in WallpaperKitDependencies called WallpaperKitDependencies (SPM requires a Swift file to recognize WallpaperKitDependencies as a valid target and fetch dependencies) Open Package.swift and change it to import PackageDescription let package = Package( name: "WallpaperKit", platforms: [ .iOS(.v18) ], products: [ .library( name: "WallpaperKit", targets: ["WallpaperKit", "WallpaperKitDependencies"] ), ], dependencies: [ .package( url: "https://github.com/onevcat/Kingfisher.git", exact: "8.5.0" ) ], targets: [ .binaryTarget( name: "WallpaperKit", path: "./Sources/WallpaperKit.xcframework" ), .target( name: "WallpaperKitDependencies", dependencies: [ "Kingfisher" ], path: "./Sources/WallpaperKitDependencies" ) ] ) Create Test App (to simulate a third-party app using the package) Create a new iOS app project and name it TestApp Add a new Local package selecting the WallpaperKitDist directory that contains Package.swift Import WallpaperKit and use it to present a WallpaperPreviewViewController This works! Though the console logs objc[39953]: Class _TtC10KingfisherP33_6AA794C9C370CDB07604B4D8B99AEAA312BundleFinder is implemented in both /Users/Name/Library/Developer/Xcode/DerivedData/TestApp-capvhjiqxrdgdnbevpkajicnjpcs/Build/Products/Debug-iphonesimulator/WallpaperKit.framework/WallpaperKit (0x100e8bbf8) and /Users/Name/Library/Developer/CoreSimulator/Devices/E0AF13C2-874C-47B9-B864-72AF3E4D5D4B/data/Containers/Bundle/Application/AF32011A-92E7-4E26-9A97-9F0C25C07863/TestApp.app/TestApp.debug.dylib (0x101a543b0). This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed. I thought using internal import Kingfisher (or @_implementationOnly import Kingfisher) would have resolved this, but seems to make no difference compared to just import Kingfisher. I suspect it might not be an issue as long as the Kingfisher version number specified in the distribution Package.swift matches the version used in the framework project (and the app does not add a different version as a dependency), but not positive. Can these warnings be resolved, or is it not a concern in this setup? Is this the best solution to distribute an XCFramework via Swift Package Manager that has dependencies on other Swift packages for now or is there a better approach? Thanks!
4
0
246
5d
LLDB RPC Server crashing
Hi I am seeing an LLDB crash in the RPC server. I have tried to update and restart everything but I am still seeing this problem. I have break points setup around code that is invoked when a WKWebView based code is being loaded. There does not seem to be a specific state the debugger crashes in and it is hard to isolate any changes in the code base. A collegue also managed to reproduce the crash. Ever so often it will be successful on then to crash on a subsequent run. This has happened on Device and simulator. We suspect that maybe a library change may of caused debug symbols to be missing or something like that. What options to I have to debug the root cause of this crash?
4
0
100
5d
Where can I manually get device token for APNs online tool?
For testing, I'm trying to "manually" send a push notification to my app using Apple's tool at https://icloud.developer.apple.com/dashboard/notifications/ ... , and I can't figure out where to get the required device token without writing a program to do so. Is there somewhere in Xcode or on https://developer.apple.com where I can copy it from? I already have the .p8 file with APNs enabled, and have set the "remote notifications" capability for the app in Xcode. I must be missing something obvious. I've read a bunch of search results and all they cover is how to get the token programmatically. The device token must be available somewhere, right?
2
0
104
5d
Xcode 26.0.1 strange compile errors
After uprgading to new XCode version 26.0.1 my project can't be longer build. There are strange compiler errors without concrete error message. If I want to investigate the single errors they disappears on selection... I can send a recorded screen-video. I invested over 2 weeks on trying to solve the problem without success. That's not the first time that the project couldnt be build after a xcode upgrade. Thats really annoying.
1
0
46
5d
SF Symbols 7: Hundreds of SF Symbols missing 'Availability' info
In SF Symbols 7 (115), there are 458 symbols missing Availability info. I only discovered this after using one that didn’t appear in iOS 18 but does in iOS 26. Questions: Are there plans to add Availability info for all symbols? If the field is blank, is there a safe latest-OS version we can assume? I realize managing 7,000+ icons is tough, but missing info like this makes development frustrating. It doesn't help that there's no build warning when a named image isn't found, it just defaults to the text label. Screenshot Screenshot of SF Symbols 7 showing three symbols missing Availability info. The symbol ellipsis.circle.badge is selected and its properties pane also shows no Availability info.
2
0
98
6d
Present User an error message when SwiftData save fails
Have a data model that sets certain fields as unique. If the user attempts to save a duplicate value, the save fails quietly with no indication to the user that the save failed. The program is on Mac OS 26.0.1 @Environment(\.modelContext) var modelContext @Query private var typeOfContracts: [TypeOfContract] @State private var typeName: String = "" @State private var typeCode: String = "" @State private var typeDescription: String = "" @State private var contracts: [Contract] = [] @State private var errorMessage: String? = "Data Entered" @State private var showAlert: Bool = false var body: some View { Form { Text("Enter New Contract Type") .font(.largeTitle) .foregroundStyle(Color(.green)) .multilineTextAlignment(.center) TextField("Contract Type Name", text: $typeName) .frame(width: 800, height: 40) TextField("Contract Type Code", text: $typeCode) .frame(width: 800, height: 40) Text("Contract Type Description") TextEditor(text: $typeDescription) .frame(width: 800, height: 200) .scrollContentBackground(.hidden) .background(Color.teal) .font(.system(size: 24)) Button(action: { self.saveContractType() }) { Text("Save new contract type") } } } func saveContractType() { let typeOfContract = TypeOfContract(contracts: []) typeOfContract.typeName = typeName typeOfContract.typeCode = typeCode typeOfContract.typeDescription = typeDescription modelContext.insert(typeOfContract) do { try modelContext.save() }catch { errorMessage = "Error saving data: \(error.localizedDescription)" } } } I have tried to set alerts but Xcode tells me that the alerts are not in scope
9
0
176
6d
[Beginner] Unsure if I need Foundation import, and how to auto-import it
I'm working in Xcode for the first time in over a decade (coming from VS Code and Zed), so bear with me on this one. I've just started up a new project and got things running, and I'm adding the following struct to my project: struct HttpRequest: Codable { let body: String? let headers: [String: String] let id: UUID let method: HttpMethod let url: String } The UUID type is from Foundation, of course. However, when I hit Ctrl+Space to auto-complete it, it says "Foundation is not imported." If I hit enter to select that entry, it does not auto-import Foundation, and gives me an error that it "Cannot find type 'UUID' in scope". I can click that error and it then click "import Foundation" to add the import, but this seems like a lot of effort just to "automatically" add an import that Xcode is already aware I need to add. On the other hand, I found a number of threads online during my search for answers that suggested I shouldn't even need this import, despite Xcode's insistence. TL;DR, my questions are: 1) Do I need the Foundation import to use UUID in Swift? and 2) If I do need it, how can I auto-import the Foundation module when I auto-complete the UUID type?
3
0
101
6d
Enrollment problems
I am trying to register for the Apple Developer Program, click “Enrollment,” select “Individual,” and get the following error: “Your enrollment in the Apple Developer Program could not be completed at this time.” How can I fix this? What could be the problem?
0
1
98
1w
Connect Apple Watch to Xcode.
How to connect Apple Watch to Xcode? I haven't used Apple Watch for ages but it used to work fine. Today after adding changes to one of my apps Watch extension I wanted to test it on my Apple Watch but I'm not able to get Xcode to discover my Apple Watch. Apple watch has both Bluetooth and Wifi on. It's connected to the same Wifi as my Mac mini. Watch is paired with iPhone and the iPhone is connected to Mac mini via USB cable. Deploying to iPhone works fine, but I Xcode doesn't see as Apple Watch. iPhone sees Apple Watch. I tried Xcode 16.2, and Xcode 26.0 and Xcode Version 26.1 beta 2. I updated Apple Watch to Watch OS 26 but it didn't help. iPhone 12 Pro Max, iOS 26.0 Apple Watch Series 8 (GPS), watchOS 26.0.2 Mac mini 2025, Apple M4 Pro, macOS 15.6 Please advise. It's so frustrating! I wasted 2 hours on that already. In the past (years ago) I used to manage 3 apps with Apple Watch extensions and connection were finicky but it wasn't so bad!
1
0
126
1w
Xcode
I just had WindowServer crash. Xcode stopped working shortly after that. I tried restarting Xcode 26.0.1 universal but it refused. I rebooted macOS 26.0.1 Tahoe and tried to start the same Xcode, no joy. I tried...six different already installed Xcodes, all displaying the "Xcode_26.1b quit unexpectedly." alert. Looking at the report: Exception Type: EXC_BAD_ACCESS (SIGKILL (Code Signature Invalid)) Exception Subtype: UNKNOWN_0x32 at 0x00000001111e4000 Exception Codes: 0x0000000000000032, 0x00000001111e4000 Termination Reason: Namespace CODESIGNING, Code 2, Invalid Page This seems wild to me. Thanks! -Mike
0
0
40
1w
我在使用java验证apple pay支付提示401
我在对接apple pay内购,调用https://api.storekit-sandbox.itunes.apple.com/inApps/v1/transactions/{transactionId},一直提示401,我不知道是我对接代码的错误,还是在开发者配置有问题或者是对应的参数提供错误,排查很久,依旧提示: Server returned HTTP response code: 401 for URL: https://api.storekit-sandbox.itunes.apple.com/inApps/v1/transactions/xxx 请问我该如何去查找我的问题呢
0
0
72
1w
Apple 1-Hour Security Feature Keeps Triggering When Registering iPhone (Starlink User)
Hi everyone, I’m hoping someone here can shed some light on what’s going on with Apple’s one-hour security delay when trying to register an iPhone for development use. I’m currently setting up an app build using Expo / EAS and a paid Apple Developer account. Every time I scan the device registration QR code or try to authorise my iPhone as a development device, I get hit with a “security delay — try again in one hour” message. This happens every single time, even if I wait the full hour. The device is the same iPhone I always use, signed in to the same Apple ID, and verified with 2FA. The only thing unusual about my setup is that I’m using Starlink for internet access. Because Starlink uses dynamic IP routing and your exit node changes frequently (depending on which satellite or ground station you’re on), it looks like I’m signing in from a new location each time — sometimes even hundreds of miles apart. It seems that Apple’s security system flags each of these as a “new login” or “new device registration,” then enforces a one-hour safety lockout. That makes it basically impossible to register my device and proceed with iOS builds or testing. Has anyone else run into this problem while using Starlink (or other dynamic-routing connections like VPNs or cellular hotspots)? And if so — is there any known workaround or setting to whitelist a device, stabilise verification, or bypass the repeated one-hour wait? This feels like an over-protective security feature that doesn’t play well with modern satellite internet setups. Any insights from the Apple engineers or other developers would be hugely appreciated. Thanks, Tim Lazenby
0
0
43
1w
Debugger Issue After Installing macOS Tahoe 26.0.1
After upgrading to macOS Tahoe 26.0.1, I encountered an issue where the debugger could no longer display standard C++ library types such as std::map, std::string, and other std:: containers. Instead, the debugger simply showed: Summary Unavailable 🧪 What I Tried • Switched from the default LLVM compiler to GDB to check if it was a debugger-related problem — no improvement. • Cleaned and rebuilt the project — the issue persisted. ✅ Solution Downgrading Xcode to version 16.4 immediately resolved the issue. According to Apple’s official Xcode support documentation, Xcode 16.4 is compatible with macOS Sequoia 15.6 and later, which includes macOS Tahoe 26.0.1. This suggests that the problem may be caused by a compatibility issue in the latest Command Line Tools bundled with newer versions of Xcode. 💡 Takeaway If you encounter the same problem: 1. Try downgrading to Xcode 16.4 or reinstalling the corresponding Command Line Tools. 2. Make sure your debugger (LLDB or GDB) is correctly linked to the appropriate SDK version. Hopefully this helps anyone experiencing the same issue!
0
0
63
1w
Debugger Issue After Installing macOS Tahoe 26.0.1
After upgrading to macOS Tahoe 26.0.1, I encountered an issue where the debugger could no longer display standard C++ library types such as std::map, std::string, and other std:: containers. Instead, the debugger simply showed: Summary Unavailable 🧪 What I Tried • Switched from the default LLVM compiler to GDB to check if it was a debugger-related problem — no improvement. • Cleaned and rebuilt the project — the issue persisted. ✅ Solution Downgrading Xcode to version 16.4 immediately resolved the issue. According to Apple’s official Xcode support documentation, Xcode 16.4 is compatible with macOS Sequoia 15.6 and later, which includes macOS Tahoe 26.0.1. This suggests that the problem may be caused by a compatibility issue in the latest Command Line Tools bundled with newer versions of Xcode. 💡 Takeaway If you encounter the same problem: Try downgrading to Xcode 16.4 or reinstalling the corresponding Command Line Tools. Make sure your debugger (LLDB or GDB) is correctly linked to the appropriate SDK version. Hopefully this helps anyone experiencing the same issue!
0
0
332
1w