Build, test, and submit your app using Xcode, Apple's integrated development environment.

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

A Summary of the WWDC25 Group Lab - Developer Tools
At WWDC25 we launched a new type of Lab event for the developer community - Group Labs. A Group Lab is a panel Q&A designed for a large audience of developers. Group Labs are a unique opportunity for the community to submit questions directly to a panel of Apple engineers and designers. Here are the highlights from the WWDC25 Group Lab for Developer Tools. Will my project codebase be used for training when I use Xcode's intelligent assistant powered by cloud-based models? When using ChatGPT without logging in, your data will not be used to improve any models. If you log in to a ChatGPT account, this is based on your ChatGPT account settings, which allows you to opt-out (it defaults to on). When using Xcode with accounts for other model providers, you should check with the policies of your provider. And finally, at no point will any portion of your codebase be used to train or improve any Apple models. We'd love to make our SwiftUI Previews (and soon, Playgrounds) as snappy as possible. Is there any way to skip certain build steps, such as running linters? It seems the build environment is exactly the same (compared to a debug build), but maybe there's a trick. Starting with Xcode 16, SwiftUI previews use the exact same build artifacts as the regular build. The new Playgrounds support in Xcode 26 uses these build artifacts too. Shell script build phases are the most common thing that introduces extra build time, so as a first step, try turning off all shell script build phases (like linters) to get an idea if that’s the issue. If those build phases add significant time to your build, consider moving some of those phases into asynchronous steps, such as running linters before committing instead of on every build. If you do need a shell script build phase to run during your build, make sure to explicitly define the input and output files, as that is a huge way to improve your build performance. Are we able to provide additional context for the models, like coding standards? Documentation for third party dependencies? Documentation on your own codebase that explains things like architecture and more? In general, Xcode will automatically search for the right context based on the question and the evolving answer, as the model can interact multiple times with your project as it develops an answer. This will automatically pick up the coding style of the code it sees, and can include files that contain architecture comments, etc. Beyond automatic context, you can manually attach other documents, even if they aren't in your project. For example, you could make a file with rules and ideas and attach it, and it will influence the response. We are very aware of other kinds of automatic context like rule files, etc, though Xcode does not support these at this time. Once ChatGPT is enabled for Coding Intelligence in Xcode 26, and I sign into my existing ChatGPT account, will the ChatGPT Coding Intelligence model in Xcode know about chat conversations on Xcode development done previously in the ChatGPT Mac app? Xcode does not use information from other conversations, and conversations started in Xcode are not accessible in the web UI or ChatGPT app. Is there a plan to make SwiftUI views easier to locate and understand in the view hierarchy like UIKit views? SwiftUI uses a declarative paradigm to define your user interface. That allows you to specify what you want, with the system translating that into an efficient representation at runtime. Unlike traditional AppKit and UIKit, seeing the runtime representation of SwiftUI views isn't sufficient in order to understand why it's not doing what you want. This year, we introduced a SwiftUI Instrument that shows why things are happening, like view re-rendering. Is it possible to use the AI chat with ChatGPT Enterprise? My company doesn't allow us to use the general ChatGPT, only the enterprise version they have setup that prevents data from being leaked Yes, Xcode 26 supports logging into any existing ChatGPT account, including enterprise accounts. If that does not meet your needs, you can also setup a local server that implements the popular chat completions REST API to talk to your enterprise account how you need. Now that Icon Composer is here, how does it complement or replace existing vector design tools such as Sketch for icon design? Icon Composer complements your existing vector design tools. You should continue to create your shapes, gradients, and layers in another tool like Sketch, and compose the exported SVG layers in Icon Composer. Once you bring your layers into Icon Composer, you can then use it to influence the translucency, blur, and specular highlights for your icon. What’s one feature or improvement in the new Xcode that you personally think developers will love, but might not immediately discover? Maybe something tucked away or quietly powerful that’s flown under the radar so far? One feature we're particularly excited about is the new power profiler for iOS, which gives you further insights into the energy consumption of your app beyond what was possible with the energy instrument previously. You can learn more about how to use this instrument and how it can help you greatly reduce your apps battery usage in the documentation, as well as the session Profile and optimize power usage in your app. There were also improvements in accessibility this year with Voice Control, where you can naturally speak your Swift code to Xcode, and it understands the Swift syntax as you speak. To see it in action, take a look at the demonstration in What’s new in Xcode 26. We have a software advisory council that is very sensitive to having our private information going to the cloud in any form. What information do you have to help me guide Xcode and Apple Intelligence through the acceptance process? One thing you can do is configure a proxy for your enterprise that implementing the popular Chat Completions API endpoint protocol. When using a model provider via URL, you can use your proxy endpoint to inspect the network traffic for anything that you do not want sent outside of your enterprise, and then forward the traffic through the proxy to your chosen model provider. Are there list of recommended LLMs to use with Xcode via Intelligence/Local? I've tried Gemma3-12B, but.. I hope there are better options? Apple doesn't have a published list of recommended local models. This is a fast-moving space, and so a recommendation would become out of date very quickly as new models are released. We encourage you to try out the local model support in Xcode 26 with models that you find meet your needs, and let us and the community know! (continued below)
1
0
518
Jul ’25
**Debug Build Issue: App Crashes on Device Due to Manual Merge in Mergeable Libraries**
If I use the manual merge option with a mergeable library in debug mode, the app crashes on the device only. Here's what I found when debugging this issue. Problem situation 1 In the debug build, the linker does not find the type of the Meregeable Library. Explain the debugged result of Problem Situation 1 We have a type called UserAdDTO, which belongs to the B Framework. - In our project, B Framework and C Framework are mergeable libraries, and they are merged into A Framework. We are using Manual Merge in A Framework. When we build with the simulator, we link the UserAdDTO from CFramework.framework/CFramework in the app target. On the other hand, when I build with the device, I try to link it from AFramework.framework/AFramework, and I get the issue that UserAdDTO is not found. So, even if you output DYLD_PRINT_BINDINGS, the simulator build links to the C Framework to find the UserAdDTO, but the app links to the B Framework, causing a runtime crash. Problem situation 2 It is confirmed that only the device build does not copy the reexported binary. Detailed description of problem situation 2 If you compare the build messages from the device build with the build messages from the release build, both generate the reexported binaries of B and C Frameworks, but do not copy them to BFramework.framework and CFramework.framework. Instead, they copy the files in different paths. This appears to be a bug, and I'd like to ask you to confirm.
0
0
517
Sep ’24
Performance difference between Xcode's "Build for Profiling" and xcodebuild for Release
For normal testing I build an application using Xcode and selecting "Build for Profiling" from the Product menu. For production I do "xcodebuild clean build -configuration Release ......." I notice a big performance difference. In my case the XCode profiling build runs in under a minute, the xcodebuild version takes over 4 minutes. The XCode profiling build uses the Release configuration, the xcodebuild is also using the Release configuration. What additional configuration options are being set/used when "Building for Profiling"? I'm having a hard time finding an answer to this question.
2
0
1.2k
Jan ’25
Unknown file type error in Xcode
Hello! I have been successfully building out my Xcode project in the past few months to my iPhone 15. I recently got a new iPhone 16 pro and have been having a hell of a time trying to figure out how to build to my new phone. Here's the error I am getting: Unknown file type in '/Users/username/Desktop/filename/Libraries/libiPhone-lib.a' please help! Any suggestions would be greatly appreciated. NOTE: I am using a M1 laptop with Sequoia OS
0
0
685
Oct ’24
"Xcode Build Error: 'Framework not found Reachability' and 'Linker command failed with exit code 1'"
Hello everyone, I'm having trouble building my app in Xcode. When I try to build, I get the following error: "Framework not found Reachability" And also this error: "Linker command failed with exit code 1 (use -v to see invocation)" Does anyone know what might be causing this, or how I can fix it? Any help would be greatly appreciated! Thank you in advance!
0
0
395
Sep ’24
KeyedUnarchive a previously object archived with NSArchiver archivedDataWithRootObject
Hi, in my previous macOS app I used to archive a dictionary to a preference file using [NSArchiver archivedDataWithRootObject:dictionary]; and to unarchive it using [NSUnarchiver unarchiveObjectWithData:dataFromDisk]; Now I would like to replace the 2 deprecated methods with NSError *error; NSSet *classSet = [NSSet setWithObjects:[NSDictionary class], [NSArray class], [NSString class], [NSNumber class], [NSData class], nil]; NSDictionary *dictionary = [NSKeyedUnarchiver unarchivedObjectOfClasses:classSet fromData:dataFromDisk error:&error]; But I get a nil dictionary and the error 4864: non-keyed archive cannot be decoded by NSKeyedUnarchiver. So I guess I should first keep on unarchiving the preferences dataFromDisk using the old deprecated method [NSUnarchiver unarchiveObjectWithData:dataFromDisk]; Then I could use the new NSKeyedArchiver and NSKeyedUnarchiver methods for the upcoming release. But, if this deprecated method [NSUnarchiver unarchiveObjectWithData:dataFromDisk]; fails to unarchive the old data (and on some machines now it fails), how could I use the new methods? Should I consider my old preference file gone? Is a way to force the new NSKeyedUnarchiver method to unarchive data previously archived with NSArchiver ?
0
0
152
Sep ’24
Does the iOS simulator append any different HTTPs headers to an iPhone?
I've got a bit of code which is making a HTTPS GET request. On an iPhone it runs as expected, however when running on the simulator there's a HTTP 400 response. I've logged the url and my http headers that I'm adding, and in both cases they are identical for the simulator and iPhone (there is no http body content). Therefore, as everything is identical, I'm wondering how it could work with hardware and not with the simulator? Does the OS append any additional HTTP headers before the request goes out (such as User-Agent for example) and might those be different between iPhone/simulator?
0
0
397
Oct ’24
XCUITest target invalid config sets both USES_XCTRUNNER and either TEST_HOST or RUNTIME_TEST_HOST
I am trying to add an XCUITest target to an existing application. When I try to run the tests, I get the error "Invalid configuration: MyProjectUITests sets both USES_XCTRUNNER and either TEST_HOST or RUNTIME_TEST_HOST". I have seen information stating that it might be because I have multiple apps built from different build configurations in the same scheme, but I could not resolve the issue with any of the suggestions I saw. I've attached a screenshot of the error message and a link to a project stripped down to just the existing configuration to help with diagnosing this issue. I would really love to be able to get some UI tests running. My Project
1
0
554
Nov ’24
.sheet is displayed wrong
Hi, unfortunately I discovered that the following code: .sheet(isPresented: $showSheetMapView) { VStack(alignment: .leading, spacing: 10, content: { SheetMapView( isShowingAddressMap: $isShowingAddressMap, showSheetMapView: $showSheetMapView, isLoading: $isLoading, filteredRegistrations: filteredRegistrations, selectedTransporteurId: $selectedTransporteurId, ComeFromRecipient: $ComeFromRecipient, ComeFromRetour: $ComeFromRetour, selectedDate: $selectedDate, selectedQuantityXL: $selectedQuantityXL, selectedQuantityL: $selectedQuantityL, selectedQuantityM: $selectedQuantityM, selectedQuantityS: $selectedQuantityS, XLQuantityAdd: $XLQuantityAdd, XLQuantityAdd2: $XLQuantityAdd2, XLQuantityAdd3: $XLQuantityAdd3, XLQuantityAdd4: $XLQuantityAdd4, LQuantityAdd: $LQuantityAdd, LQuantityAdd2: $LQuantityAdd2, LQuantityAdd3: $LQuantityAdd3, LQuantityAdd4: $LQuantityAdd4, MQuantityAdd: $MQuantityAdd, MQuantityAdd2: $MQuantityAdd2, MQuantityAdd3: $MQuantityAdd3, MQuantityAdd4: $MQuantityAdd4, SQuantityAdd: $SQuantityAdd, SQuantityAdd2: $SQuantityAdd2, SQuantityAdd3: $SQuantityAdd3, SQuantityAdd4: $SQuantityAdd4, RecipientSelectedXL: $RecipientSelectedXL, RecipientSelectedL: $RecipientSelectedL, RecipientSelectedM: $RecipientSelectedM, RecipientSelectedS: $RecipientSelectedS, ComesfromAtoB: $ComesfromAtoB, AtoBSelectedXL: $AtoBSelectedXL, AtoBSelectedL: $AtoBSelectedL, AtoBSelectedM: $AtoBSelectedM, AtoBSelectedS: $AtoBSelectedS ) .id(filteredRegistrations) .overlay( //Bezahl Button VStack{ if !filteredRegistrations.isEmpty{ Spacer() HStack { ApplePayButton() .frame(width: 350, height: 70) .onTapGesture { isLoading = true AssignmentButtonTapped = true if addressViewModel.selectedAddress != nil && selectedTransporteurId != nil && addressViewModel.isAddressValid == true { // Zahlungsvorgang starten if ComeFromRetour { initiatePaymentRetour() } else if ComeFromRecipient { initiatePaymentForRecipient() } else if ComesfromAtoB { initiatePaymentForAtoB() } } else { print("Fehler bei der Auswahl.") isLoading = false } } } } } ) }) .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .top) .presentationDetents([.medium]) .presentationCornerRadius(30) .presentationDragIndicator(.hidden) .presentationBackgroundInteraction(.enabled(upThrough: .medium)) .presentationBackground(.white) .interactiveDismissDisabled() } is not displayed as it should be. simulating this on iOS 17.5 or under it is displayed fine. iOS 18 is ignoring .presentationDetents([.medium]). In every case it automatically change the sheet to .large. Why? it completely destroys the function of this view. Please help me. Thank you.
2
0
231
Oct ’24
IOS 16 build / unexpected service error: The Xcode build system has crashed. Build again to continue.
Translated Report (Full Report Below) Process: XCBBuildService [47544] Path: /Applications/Xcode.app/Contents/SharedFrameworks/XCBuild.framework/Versions/A/PlugIns/XCBBuildService.bundle/Contents/MacOS/XCBBuildService Identifier: com.apple.dt.XCBBuildService Version: 1.0 (23000.1.226) Build Info: XCBuild-23000001226000000~21 (16A242d) Code Type: ARM-64 (Native) Parent Process: Xcode [25688] Responsible: Xcode [25688] User ID: 502 Date/Time: 2024-09-22 15:45:07.2531 +0530 OS Version: macOS 15.0 (24A335) Report Version: 12 Anonymous UUID: 286B9741-8E5D-765F-A412-4814BBAEFFF8 Sleep/Wake UUID: 633F27DD-DBD3-495A-852E-25513538F671 Time Awake Since Boot: 9600 seconds Time Since Wake: 7346 seconds "name" : "XCBTaskConstruction", "CFBundleVersion" : "23000.1.226" }, { "source" : "P", "arch" : "arm64", "base" : 4397056000, "CFBundleShortVersionString" : "1.0", "CFBundleIdentifier" : "com.apple.dt.XCBTaskExecution", "size" : 1179648, "uuid" : "908f7c32-c5d5-3027-ace3-874d6c83e90c", "path" : "\/Applications\/Xcode.app\/Contents\/SharedFrameworks\/XCBuild.framework\/Versions\/A\/PlugIns\/XCBBuildService.bundle\/Contents\/Frameworks\/XCBTaskExecution.framework\/Versions\/A\/XCBTaskExecution", "name" : "XCBTaskExecution", "CFBundleVersion" : "23000.1.226" }, { "source" : "P", "arch" : "arm64", "base" : 4384325632, "size" : 3653632, "uuid" : "5e5f39eb-5e1c-356d-9d28-28d1b62b7f8b", "path" : "\/Applications\/Xcode.app\/Contents\/Developer\/Toolchains\/XcodeDefault.xctoolchain\/usr\/lib\/libSwiftDriver.dylib", "name" : "libSwiftDriver.dylib" }, { "source" : "P", "arch" : "arm64", "base" : 4380737536, "CFBundleShortVersionString" : "1.0", "CFBundleIdentifier" : "com.apple.dt.XCBLLBuild", "size" : 16384, "uuid" : "28f5320e-9f77-3100-a346-b00eb9cadcf6", "path" : "\/Applications\/Xcode.app\/Contents\/SharedFrameworks\/XCBuild.framework\/Versions\/A\/PlugIns\/XCBBuildService.bundle\/Contents\/Frameworks\/XCBLLBuild.framework\/Versions\/A\/XCBLLBuild", "name" : "XCBLLBuild", "CFBundleVersion" : "23000.1.226" }, { "source" : "P", "arch" : "arm64", "base" : 4380590080, "CFBundleShortVersionString" : "1.0", "CFBundleIdentifier" : "com.apple.dt.XCBCSupport", "size" : 65536, "uuid" : "bb4f1b7a-89be-3b20-b5d9-e930fcbca265", "path" : "\/Applications\/Xcode.app\/Contents\/SharedFrameworks\/XCBuild.framework\/Versions\/A\/PlugIns\/XCBBuildService.bundle\/Contents\/Frameworks\/XCBCSupport.framework\/Versions\/A\/XCBCSupport", "name" : "XCBCSupport", "CFBundleVersion" : "23000.1.226" }, { "source" : "P", "arch" : "arm64", "base" : 4389109760, "CFBundleShortVersionString" : "1.0", "CFBundleIdentifier" : "com.apple.dt.llbuild", "size" : 835584, "uuid" : "8b38eaf5-b815-390c-940e-34a645e10bfc", "path" : "\/Applications\/Xcode.app\/Contents\/SharedFrameworks\/llbuild.framework\/Versions\/A\/llbuild", "name" : "llbuild", "CFBundleVersion" : "23000.0.31" }, { "source" : "P", "arch" : "arm64", "base" : 4382588928, "CFBundleShortVersionString" : "1.0", "CFBundleIdentifier" : "com.apple.dt.XCBLibc", "size" : 16384, "uuid" : "be7fa119-c9cc-3863-af3f-ae96cd4228cc", "path" : "\/Applications\/Xcode.app\/Contents\/SharedFrameworks\/XCBuild.framework\/Versions\/A\/PlugIns\/XCBBuildService.bundle\/Contents\/Frameworks\/XCBLibc.framework\/Versions\/A\/XCBLibc", "name" : "XCBLibc", "CFBundleVersion" : "23000.1.226" }, { "source" : "P", "arch" : "arm64", "base" : 4380917760, "CFBundleShortVersionString" : "1.0", "CFBundleIdentifier" : "com.apple.dt.XCBCLibc", "size" : 16384, "uuid" : "31deeefc-7a76-3112-a73b-51f66534b781", "path" : "\/Applications\/Xcode.app\/Contents\/SharedFrameworks\/XCBuild.framework\/Versions\/A\/PlugIns\/XCBBuildService.bundle\/Contents\/Frameworks\/XCBCLibc.framework\/Versions\/A\/XCBCLibc", "name" : "XCBCLibc", "CFBundleVersion" : "23000.1.226" }, { "source" : "P", "arch" : "arm64", "base" : 13191659520, "size" : 115720192, "uuid" : "476e35ff-6787-31e0-870a-597bd525254d", "path" : "\/Applications\/Xcode.app\/Contents\/Developer\/Toolchains\/XcodeDefault.xctoolchain\/usr\/lib\/swift\/host\/lib_InternalSwiftScan.dylib", "name" : "lib_InternalSwiftScan.dylib" }, { "source" : "P", "arch" : "arm64", "base" : 4919033856, "size" : 65536, "uuid" : "9fe47d2a-a9b4-3de6-a20d-9153fc7f3563", "path" : "\/Applications\/Xcode.app\/Contents\/Developer\/Toolchains\/XcodeDefault.xctoolchain\/usr\/lib\/swift\/host\/libSwiftIDEUtils.dylib", "name" : "libSwiftIDEUtils.dylib" }, { "source" : "P", "arch" : "arm64", "base" : 4921032704, "size" : 294912, "uuid" : "ff5c9933-0266-35a3-a857-52de4f1ca1ca", "path" : "\/Applications\/Xcode.app\/Contents\/Developer\/Toolchains\/XcodeDefault.xctoolchain\/usr\/lib\/swift\/host\/libSwiftCompilerPluginMessageHandling.dylib", "name" : "libSwiftCompilerPluginMessageHandling.dylib" }, { "source" : "P", "arch" : "arm64", "base" : 4918607872, "size" : 163840, "uuid" : "e55b9c97-b69a-3240-99d0-26107b16fd45", "path" : "\/Applications\/Xcode.app\/Contents\/Developer\/Toolchains\/XcodeDefault.xctoolchain\/usr\/lib\/swift\/host\/libSwiftSyntaxMacroExpansion.dylib", "name" : "libSwiftSyntaxMacroExpansion.dylib" }, { "source" : "P", "arch" : "arm64", "base" : 4919820288, "size" : 114688, "uuid" : "ff72542b-0d39-38f9-b909-2d8585f02814", "path" : "\/Applications\/Xcode.app\/Contents\/Developer\/Toolchains\/XcodeDefault.xctoolchain\/usr\/lib\/swift\/host\/libSwiftOperators.dylib", "name" : "libSwiftOperators.dylib" }, { "source" : "P", "arch" : "arm64", "base" : 4919558144, "size" : 32768, "uuid" : "2612e448-1b3d-35fd-b68d-94eca7e31285", "path" : "\/Applications\/Xcode.app\/Contents\/Developer\/Toolchains\/XcodeDefault.xctoolchain\/usr\/lib\/swift\/host\/libSwiftSyntaxMacros.dylib", "name" : "libSwiftSyntaxMacros.dylib" }, { "source" : "P", "arch" : "arm64", "base" : 4932501504, "size" : 212992, "uuid" : "2f7da703-7979-3616-b30f-96ce4e2f54c7", "path" : "\/Applications\/Xcode.app\/Contents\/Developer\/Toolchains\/XcodeDefault.xctoolchain\/usr\/lib\/swift\/host\/libSwiftSyntaxBuilder.dylib", "source" : "P", "arch" : "arm64", "base" : 4933500928, "size" : 376832, "uuid" : "4757e13b-4636-326c-8588-82a4070536d4",
1
0
753
Sep ’24
App compiles but "Unable to install" on device
When I try to run my app on my iPhone, from Xcode, I get a popup that says Unable to Install "AppName". There is some text in the popup. Here's the first part of it. (I replaced the real app's name with "AppName".) Anyone know how to fix this? Unable to install "AppName" Domain: com.apple.dt.MobileDeviceErrorDomain Code: -402653103 User Info: { DVTErrorCreationDateKey = "2024-09-28 04:04:29 +0000"; IDERunOperationFailingWorker = IDEInstalliPhoneLauncher; } -- Unable to install "AppName" Domain: com.apple.dt.MobileDeviceErrorDomain Code: -402653103 -- Could not inspect the application package. Domain: com.apple.dt.MobileDeviceErrorDomain Code: -402653103 User Info: { DVTRadarComponentKey = 282703; MobileDeviceErrorCode = "(0xE8000051)"; "com.apple.dtdevicekit.stacktrace" = ( ...
1
0
362
Sep ’24
Pls validate workaround for Predictive Code n/a on external boots
What minimal changes can I make to use Xcode 16+ predictive code completion (PCC) when I've been booting from external drives (on the same apple-silicon machine)? PCC says it requires booting from an internal drive. I boot from external for a host of reasons that aren't going to change, but need to investigate whether/how I should accommodate PCC. I haven't found technical communications on PCC requirements, and I hate to guess (wrong) because OS/workflow reconfiguration is hard and disruptive. So this post is to ask whether my approach would work, or if there's a better one. I hope to continue using the external for the user home directory, the installed Xcode application, and Xcode temporary files (and of course the projects and artifacts). (a) Does the "internal drive" requirement extend only to booting, or also to installing Xcode or situating the user HOME dir? (b) Can one use the same external HOME directory for a user booting alternately from an internal and external drives? I would doubt it since the OS's would conflict e.g., in the HOME/Library state. So I assume that means we use separate HOME dir's, but link key user HOME directories to external/real HOME (git, etc. - also .ssh?). Then OS's have distinct views, but user has mostly common view. (Assuming user always codes/builds for least-common-denominator.) Aside: is it possible to redirect the system var/temp to an external? (c) Xcode signing for the same machine/CPU seems locked to a specific OS. I.e., to switch between OS drives but do code signing in Xcode, I've had to re-issue a certificate. (c-1) Is that avoidable? (c-2) Can I somehow maintain a per-machine certificate, and toggle between them? (c-3) Is that process made possible or impossible if Xcode is always pointing at the same Derived-Data/Archives directories? Is there any way to make it semi-automatic, once configured? Thank you! (I didn't see any forum tag for PCC.)
2
0
345
Sep ’24
Simple Xcode CLI/Swift project reflects nothing on change
Once I start a new project everything seems fine and the first commit is always successful. Once I change one of the parameters e.g. set TimeInterval = 6 any consequent run would do absolutely nothing, the only thing I can do is switch back to the old value or start a new project with the new values. I'm currently stuck, anything could help, thanks! import Foundation import CoreGraphics // A helper function to move the cursor smoothly from one coordinate to another. func moveCursor(from start: CGPoint, to end: CGPoint, duration: TimeInterval) { let steps = 100 // Number of steps for smoothness let delay = duration / TimeInterval(steps) // Time delay between each step for i in 0...steps { let progress = Double(i) / Double(steps) // Interpolating X and Y coordinates based on progress (linear interpolation) let newX = start.x + CGFloat(progress) * (end.x - start.x) let newY = start.y + CGFloat(progress) * (end.y - start.y) // Move the cursor let point = CGPoint(x: newX, y: newY) moveCursor(to: point) // Sleep for a short time to create a smooth movement usleep(useconds_t(delay * 1_000_000)) // usleep takes microseconds } } // Function to set the cursor position using CGEvent func moveCursor(to point: CGPoint) { let moveEvent = CGEvent(mouseEventSource: nil, mouseType: .mouseMoved, mouseCursorPosition: point, mouseButton: .left) moveEvent?.post(tap: .cghidEventTap) } // Main function to take multiple coordinates and move between them func moveCursorAlongPath(coords: [CGPoint], totalTime: TimeInterval) { guard coords.count > 1 else { return } let segmentTime = totalTime / TimeInterval(coords.count - 1) // Split time between segments for i in 0..<(coords.count - 1) { let start = coords[i] let end = coords[i + 1] moveCursor(from: start, to: end, duration: segmentTime) } } // Example usage: // Coordinates you want to move between let coordinates: [CGPoint] = [CGPoint(x: 100, y: 100), CGPoint(x: 400, y: 400), CGPoint(x: 800, y: 200)] let totalDuration: TimeInterval = 5 // Total duration in seconds // Move the cursor smoothly along the path moveCursorAlongPath(coords: coordinates, totalTime: totalDuration)``` ![]("https://developer.apple.com/forums/content/attachment/4482329e-42fd-423e-9f4c-860558eeef80" "title=Screenshot 2024-10-09 at 09.29.44.png;width=642;height=331")
0
0
164
Oct ’24
What is "bridgeOS Device Support" for?
In my Mac's Settings -> General -> Storage -> Developer -> (i) I have a series of entries for "bridgeOS", all 2.49 GB except one that is "zero". Do I need these? Can I remove them? I am only doing "normal" iPhone / iPad development. (There was some previous mention of this here: https://developer.apple.com/forums/thread/711279 with no feedback.)
2
0
3.9k
Dec ’24
Issue codesign on VS Code and XCode
Hello, I'm starting to develop a new app with Flutter on VS Code. I. struggle to start because I face constantly this error : Error (Xcode): Target debug_unpack_ios failed: Exception: Failed to codesign /Users/Nylan1/Desktop/Thoughts./Flutter Application/app_v0/app_v0/build/ios/Debug-iphonesimulator/Flutter.framework/Flutter with identity -. Can someone pleas help me to solve that ? I've checked on Xcode and the macOS signing certificate is on Development but the IOS one is not working.
0
0
503
Oct ’24
Simulator runtime stuck "Deleting"
I have numerous simulator runtimes marked as "Deleting": $ xcrun simctl runtime list == Disk Images == -- iOS -- iOS 18.0 (22A3351) - 036938A4-AAF7-4671-8880-8E381770E397 (Deleting) iOS 18.0 (22A5326g) - 756A6FE1-A9C7-4A3D-A8FD-01FD7B5F84BC (Deleting) iOS 18.0 (22A5307f) - 5DB182D5-FAA1-477D-922F-CFA728C5A6FA (Deleting) iOS 18.0 (22A5346a) - C844925F-1BCA-46FD-B0B9-21587AB3EDE5 (Deleting) iOS 18.0 (22A5307f) - CC3EB15F-4EAA-4591-AE5C-2762AC17C426 (Unusable - Other Failure: Duplicate of 5E3173BD-25F7-4446-9593-B5E6330B65CE) -- tvOS -- tvOS 18.0 (22J5290l) - A7A2E335-D433-456D-AC61-D5061317A911 (Ready) -- watchOS -- watchOS 11.0 (22R5284o) - 87DB6C3E-A51E-4394-AD35-F6BDCBDEFDC9 (Ready) How to I finish deleting these runtimes? I can't re-install, because: $ simctl runtime add iOS_18_Release_Candidate_Simulator_Runtime.dmg The iOS Simulator runtime 22A3351 is not installed, installing... D: C76A5156-5225-4683-806A-FC604074F2C7 iOS (18.0 - 22A3351) (Unusable - Other Failure: Error Domain=SimDiskImageErrorDomain Code=5 "Duplicate of 036938A4-AAF7-4671-8880-8E381770E397" UserInfo={NSLocalizedDescription=Duplicate of 036938A4-AAF7-4671-8880-8E381770E397, unusableErrorDetail=}) and it's the "Deleting" runtimes aren't usable (causing things like ibtool/actool to stop working), presumably because they're "Deleting." A reboot does not fix anything.
1
0
629
Sep ’24
CLCircularGeographicCondition not found
I'm attempting to use this sample code in Xcode 16 and iOS 18. I get a compile error indicating "cannot find 'CLCircularGeographicCondition' The remainder of the sample code does not compile as in the document the compiler wants "await" before the call to monitor.add and another "await" before monitor.events Is there updated sample code for this use case?
1
0
448
Oct ’24
Unable to Vertify App/ Preview only on iPhone
Choose the real iPhone device on my Xcode and build for running. Xcode warn me to vertify the Developer App certification in VPN & Device Management. When I get through it as vertify. The setting page still ask me to vertify the app. I press the "Vertify App" Button and press "Vertify" but it can't work. And it also cannot preview when I choose my device in the previewer. But both work well on my iPad Air. I can pass the vertify app and also can preview through Xcode. I searched the problem in forum.i found someone who has the same problem. https://developer.apple.com/forums/thread/744579 I try to change my network environment, reboot the device, reboot the develop laptop, but still cannot work. I'm using Xcode Version 16.0 (16A242d) iPhone 14 Pro with iOS 18.0 (22A3354) iPad Air 3 with iPad OS 17.6.1
0
0
337
Sep ’24