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.
Xcode
RSS for tagBuild, test, and submit your app using Xcode, Apple's integrated development environment.
Posts under Xcode tag
200 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
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.
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.
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)
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.
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?
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.
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
This code was compiling fine on Xcode 16.2
public var hasSecureHardware: Bool {
let isSimulator = TARGET_OS_SIMULATOR == 1
return !isSimulator && isAvailable
}
However, now the build breaks with the message:
Cannot find 'TARGET_OS_SIMULATOR' in scope
All the threads only contain system calls. The crashed thread only contains a single call to my app's code which is main.swift:13.
What could cause such a crash?
crash.crash
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?
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)
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.
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
]
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.
Upon updating to Xcode 16.3, my StoreKit2 unit testing suite encountered a malfunction.
let result = await product.purchase()
The code snippet above simply halts execution, preventing the task from progressing. In a regular environment, everything appear to function correctly.
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
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
Background
I have a SwiftUI app that uses OSLog and the new Logger framework. In my SwiftUI views, I would like to use something like Self._logChanges() to help debug issues.
After some trial and error, I can see the messages appear in the System console log for the app I am debugging using the com.apple.SwiftUI subsystem.
Problem
I'd like to see those same messages directly in Xcode's console window so I can filter them as needed. How do I do that?
Thanks! -Patrick
** Facing issue for watch unreachable, I have tried for real device as well simulator**
if let controller = window?.rootViewController as? FlutterViewController {
let channel = FlutterMethodChannel(
name: "watchconnectivity",
binaryMessenger: controller.binaryMessenger)
channel.setMethodCallHandler({ [weak self] (call, result) in
switch call.method {
case "sendToWatch":
guard let watchSession = self?.session else {
print("❌ Watch session not initialized")
result(false)
return
}
guard watchSession.isPaired else {
print("❌ Watch not paired")
result(false)
return
}
guard watchSession.isReachable else {
print("❌")
print("isPaired: \(watchSession.isPaired)")
print("isWatchAppInstalled: \(watchSession.isWatchAppInstalled)")
print("isComplicationEnabled: \(watchSession.isComplicationEnabled)")
result(false)
return
}
guard let arguments = call.arguments as? [String: Any] else {
print("❌ Invalid arguments format")
result(false)
return
}
if watchSession.isWatchAppInstalled {
try? watchSession.updateApplicationContext(["forceLaunch": true])
}
print("📤 Sending message to Watch: \(arguments)")
watchSession.sendMessage(arguments,
replyHandler: { response in
print("✅ Message sent successfully")
result(true)
},
errorHandler: nil
)
default:
result(FlutterMethodNotImplemented)
}
})
}