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

Posts under Xcode tag

200 Posts

Post

Replies

Boosts

Views

Activity

Swift Assist
Hi, I'm testing out Xcode 16 beta and I have a couple of questions: Is Swift Assist only available on Sequoia? I see that predictive code completion is per https://www.apple.com/newsroom/2024/06/apple-empowers-developers-and-fuels-innovation-with-new-tools-and-resources/, but I tried the beta on Sonoma and I'm not seeing it Regarding Swift Assist - I understand that code is only used to process requests and never stored on servers, and Apple will not use it to train machine learning models. However, my company's security team may still decide that using Swift Assist is too much of a risk. How can we disable it across multiple developer machines? Thank you!
11
4
14k
Apr ’25
Animations exported from Blender does not shoe in Reality Composer Pro
I made an animation in Blender using geometry nodes that I exported to USDC file (then I used Reality Converter to convert to USDZ) and I can see the animation when viewing from the finder but does not play after importing to RCP. Any idea how I can play the animation? Or can the animation be accessed through Xcode? Thanks!
4
0
1.1k
Apr ’25
Xcode 16.1 hang after adding Store Kit configuration
I don't know Xcode very well, and had been using it sporadically to test a project exported from Unity. I recently added a StoreKit Configuration to the project, and since then it gives me ≈10s after launching before the beach ball appears, and it never leaves. Xcode says it is "Indexing" but I don't know if that's an obvious culprit. I can still build my project via the fastlane tool, on the command line, and the newly-added StoreKit configuration works just fine. But I cannot use Xcode interactively any more, unless I re-export the project from Unity. The only difference between it working and hanging is the Store Kit configuration. How do I understand what's going on, and (ideally) fix it? The Activity Monitor gives a bunch of backtraces that don't have an obvious network or I/O culprit in them.
0
0
73
Apr ’25
Xcode Archive API Key Error
I am creating an AI powered mobile application for my university dissertation that utilises Google Gemini in order to generate tailored responses with a prerequisite prompt. In order to facilitate this, I use an API key which allows the communication to be made. I received an email upon archiving my application that informed me that: ITMS-90683: Missing purpose string in Info.plist - Your app’s code references one or more APIs that access sensitive user data, or the app has one or more entitlements that permit such access. The Info.plist file for the “Amrit AI.app” bundle should contain a NSSpeechRecognitionUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. If you’re using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required." I have since made the adjustments to my info.plist by adding a description as to why the API key is being used. However, it still has not rectified the issue. I have contacted multiple apple support lines and none of them have been able to help with my error. I am under extreme pressure to upload this application to the App Store before my dissertation deadline as the reviews are critical to my evaluation section. Any help would be much appreciated.
1
0
71
Apr ’25
iOS app build error with iOS 18 SDK and Xcode 16
Hi, I am able to build my iOS app successfully, developed in objective-C with iOS 17.5 SDK and Xcode 15. Due to requirement of Appstore we are trying to build with iOS 18 SDK and Xcode 16. When building getting error in LAEnvironmentState.h file: a) "Property requires field to be named" b) "Expected member name or ';' after declaration specifiers" Same app when opening with Xcode 15 gets build without any issue. Any help/suggestion would be appreciated.
0
0
140
Apr ’25
SwiftUI views lock up after background and sleep for “Designed for iPad” apps
There's an easily reproducible SwiftUI bug on macOS where an app's UI state no longer updates/re-renders for "Designed for iPad" apps (i.e. ProcessInfo.processInfo.isiOSAppOnMac == true). The bug occurs in Xcode and also if the app is running independent of Xcode. The bug occurs when: the user Hides the app (i.e. it goes into the background) the user puts the Mac to sleep (e.g. Apple menu > Sleep) a total of ~60 seconds transpires (i.e. macOS puts the app into the "suspended state") when the app is brought back into the foreground the UI no longer updates properly The only way I have found to fix this is to manually open a new actual full app window via File > New, in which case the app works fine again in the new window. The following extremely simple code in a default Xcode project illustrates the issue: import SwiftUI @main struct staleApp: App { @State private var isBright = true var body: some Scene { WindowGroup() { ZStack { (isBright ? Color.white : Color.black).ignoresSafeArea() Button("TOGGLE") { isBright.toggle(); print("TAPPED") } } .onAppear { print("\(isBright ? "light" : "dark") view appeared") } } } } For the code above, after Hiding the app and putting the computer to sleep for 60 seconds or more, the button no longer swaps views, although the print statements still appear in the console upon tapping the button. Also, while in this buggy state, i can get the view to update to the current state (i.e. the view triggered by the last tap) by manually dragging the corner of the app window to resize the window. But after resizing, the view again does not update upon button tapping until I resize the window again. so it appears the diff engine is mucked or that the Scene or WindowGroup are no longer correctly running on the main thread I have tried rebuilding the entire view hierarchy by updating .id() on views but this approach does NOT work. I have tried many other options/hacks but have not been able to reset the 'view engine' other than opening a new window manually or by using: @Environment(.openWindow) private var openWindow openWindow could be a viable solution except there's no way to programmatically close the old window for isiOSAppOnMac (@Environment(.dismissWindow) private var dismissWindow doesn't work for iOS)
0
0
138
Apr ’25
Xcode 16's EmbeddedBinaryValidationUtility taking massive amounts of memory
Hey Apple Team! We recently updated to Xcode 16 and saw a massive memory spike, which caused "Out of memory" Mac warnings in the final stages of our app's build process. We noticed that the process responsible for this is "EmbeddedBinaryValidationUtility" (see screenshot). Is there a workaround to limit its memory usage? This is causing significant anguish for our developers.
9
47
611
Apr ’25
Is it possible to set the Derived Data location differently for different projects?
Within Xcode's settings location section is a drop down menu to switch between setting the derived data location to be default, relative or custom. However its a global setting. I work on more than one project simultaneously, and for one of them I want the location set to relative, but default for all the others. Is there any way of achieving that?
0
0
77
Apr ’25
Best Practices: Dependency management for local packages
I have a project which contains local packages. One of the packages has an explicit dependency on package A, but the main project also has the same dependency. Both of them are pinned to the exact version at all times. Should I manage "shared" dependencies at the project level for local packages? This seems counter intuitive at first, but this question is originating from me fighting with a "Build service could not create build operation: unable to load transferred PIF: The workspace contains multiple references with the same GUID" error in Xcode 16 (all versions). It happens when I switch branches. Closing and reopening Xcode does resolve the issue, but it's a real flow killer. The guide below doesn't mention dependency graph best practice. https://developer.apple.com/documentation/xcode/organizing-your-code-with-local-packages Thank in advance.
1
8
2.1k
Apr ’25
Need Help Updating a Custom WireGuard SPM for Xcode 16 & Swift 6
Hey iOS Dev's, I’m currently working on a Swift Package Manager (SPM) for WireGuard, originally developed by a previous team member. It was working fine in Xcode 15.2, but after upgrading to Xcode 16 and Swift 6, I need to update the SPM to ensure compatibility with my base projects and other projects relying on it. With Apple making Xcode 16 mandatory for app submissions starting April 24, this has become an urgent issue. I’ve searched extensively but haven’t found a working solution yet. Has anyone faced similar challenges with Swift 6 migration and SPM updates? Any insights, best practices, or debugging tips would be greatly appreciated! Let’s connect and collaborate—I’d love to discuss possible solutions! 😊 #iOSDevelopment #Swift6 #Xcode16 #SPM #WireGuard #iOS #Swift #SoftwareEngineering #AppStore
0
0
89
Apr ’25
The Source Editor Contextual Menu Is Missing Copy Submenu
I updated to Xcode Version 16.3 (16E140) on macOS Sequoia 15.3.2 (24D81). I noticed the contextual menu is missing the Copy submenu. This submenu is accessible from the Main Menu under Edit menu. You can see that the contextual menu is missing the Copy submenu, it was there prior to Xcode Version 16.3 (16E140). Why was it removed? Could this Copy submenu be restored in future updates, please?
1
0
80
Apr ’25
What is the proper way to integrate a CoreML app into Xcode
Hi, I have been trying to integrate a CoreML model into Xcode. The model was made using tensorflow layers. I have included both the model info and a link to the app repository. I am mainly just really confused on why its not working. It seems to only be printing the result for case 1 (there are 4 cases labled, case 0, case 1, case 2, and case 3). If someone could help work me through this error that would be great! here is the link to the repository: https://github.com/ShivenKhurana1/Detect-to-Protect-App this file with the model code is called SecondView.swift and here is the model info: Input: conv2d_input-> image (color 224x224) Output: Identity -> MultiArray (Float32 1x4)
1
1
177
Apr ’25
Xcode fails to attach to process when building to the Simulator
When trying to build and run our iOS app on the simulator we're hitting the following error: Could not attach to pid: "XXXXX" failed to get reply to handshake packet within timeout of 6.0 seconds I've included some more details on our project/setup below: We're working on a large project with multiple schemes / app targets. The error only affects one of our targets - however the dependencies between the problematic target and the others are very similar. The issue only affects building to the simulator; building to a physical device works fine. Scheme configuration is the same across all targets. We've faced this issue on multiple versions of Xcode, from 15.x through to the latest 16.3 RC. We've tried a number of workarounds, some of which work intermittently for some colleagues - but none of which have provided a durable solution. These include varying combinations of: Setting the IDEPreferLogStreaming=YES environment variable Unchecking Debug Executable under Edit Scheme -> Run Manually launching the app on the Simulator and then attaching the debugger using Debug -> Attach in Xcode Erasing all contents and settings on the simulator (this sometimes fixes things for a single build, but we run into the same issue again for all subsequent builds, and it doesn't work for all developers). Clearing out Derived Data and running a clean build (this doesn't seem to help). We'd really appreciate any input on how we can diagnose what's causing this issue or any suggested steps to help resolve it.
4
1
255
Apr ’25
How to request several models simultaneously
I am using HelloPhotogrammetry in Xcode I can make one model with something like HelloPhotogrammetry.main([path_to_folder_of images, path_to_output/model.usdz, "-d", "medium", "-o", "unordered", "-f", "high" ]) But how would I request several models simultaneously? I only want to vary the detail. [ ("/Users/you/Desktop/model_medium.usdz", detail: .medium), ("/Users/you/Desktop/model_full.usdz", detail: .full), ("/Users/you/Desktop/model_raw.usdz", detail: .raw ]
0
0
71
Apr ’25
Updated Deeplink is not working
Hello, We are facing deeplink related issue for our production app. In our finding, we got to know that issue is related to apple CDN caching, We have did the changes at our server level but still it is navigating to previous URL. Earlier deeplink was "https://bobcard.bobfinancial.com/dl" now it is changed to "https://linkdeep.bobcard.co.in/mapp". Please check and update this new one in apple cdn cache. For the new link it is redirecting to App store instead of App. Below are the link through which we have tested deeplink scenario: "https://app-site-association.cdn-apple.com/a/v1/bobcard.bobfinancial.com" working fine. "https://app-site-association.cdn-apple.com/a/v1/linkdeep.bobcard.co.in" it is throwing not found error.
1
0
73
Apr ’25
Need guidance for creating the xcprivacy file WITHOUT A MAC when coding on flutter, especially when third party sdks are there.
When you have a mac, creating xcprivacy is pretty straightforward for your app, you simply use xcode, then select the sdks and target them and your privacy manifest is ready. In the other hand, when you are using CI/CD solutions you might not use xcode direclty. In that instance and if you are coding in flutter, you need to create your privacy manifest by hand. I would like guidance how to write that file, I would it for a given third party SDK and where to put that file in the flutter project (just to be sure) For example we choose the most important third party SDK manifest: FUTTER framework. I keep getting errors about it for my app, got alot of builds get the INVALID BINARY error because of that, and my mails indicating me a problem with the manifest. Please show me the source code of the manifest privacy for a project where a third party SDK is present (in particular: flutter sdk) Thanks
3
0
138
Mar ’25
The developer disk image could not be mounted on this device. IPhone 16e Xcode 16.2
I'm having trouble with Xcode 16.2 when trying to pair or upload apps to my iPhone 16e running iOS 18.3. Interestingly, it works perfectly with older models like the iPhone 15 and 14, even though they’re on the same iOS version. When I attempt to install an app on my iPhone 16e via Xcode, I encounter this error: The developer disk image could not be mounted on this device. (com.apple.dt. CoreDeviceError error 12040 (0x2F08)) DDIPath = /Library/Developer/DeveloperDiskImages/iOS_DDI. dmg DeviceIdentifier = 42E4BEC2-3B1E -4903-9A29-CC5C6363F677 Options = { MountedBundlePath = "file:///private/var/tmp/CoreDevice_DDI_Staging_501/42E4BEC2-3B1-4903-9A29-CC5C6363F677/*; UseCredentials = 0; } NSURL = file:///Library/Developer/DeveloperDiskImages/iOS_DDI.dmg ERROR: Error mounting image: 0x800010f (kAMDMobileImageMounterPersonalizedBundleMissingVariantError: The bundle image is missing the requested variant for this device.) (com. apple,mobiledevice error -402652913 (OxE800010F)) FunctionName = AMDeviceRemoteMountPersonalizedBundle LineNumber = 2145 ERROR: Failed to initialize image properties: 0x800010f (kAMDMobileImageMounterPersonalizedBundleMissingVariantError: The bundle image is missing the requested variant for this device.) (com. apple.mobiledevice error -402652913 (0x800010F)) FunctionName = -[PersonalizedImage mountImage:] LineNumber = 1816 ERROR: Failed to find image for variant/identity: (variant: DeveloperDiskImage | boardID: 4 | chipID: 33088 | securityDomain: 1). (com.apple.mobiledevice error -402652913 (0xE800010F)) FunctionName = -[PersonalizedImage initializeImageProperties:] LineNumber = 1063
2
0
304
Mar ’25