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

Posts under Xcode tag

200 Posts

Post

Replies

Boosts

Views

Activity

New unexpected compile behavior in Xcode 16.3
I have a macro that converts expression into a string literal, e.g.: #toString(variable) -> "variable" #toString(TypeName) -> "TypeName" #toString(\TypeName.property) -> "property" In Xcode 16.3 #toString(TypeName) stopped to work, compilation throws 'Expected member name or initializer call after type name' error. Everything works fine in Xcode 16.2. I tried to compare build settings between 16.2 and 16.3 but haven't noticed differences that may cause this new error. The following works in both Xcode versions: #toString(variable) -> "variable" #toString(\TypeName.property) -> "property" Seems like Xcode tries to compile code that shouldn't be compiled because of macro expansion. Does anybody know what new has appeared in 16.3 and, perhaps, how to fix the problem?
5
1
236
Apr ’25
UICollectionView Dequeue Crash Xcode 16.2
I am facing same issue with major crash while coming out from this function. Basically using collectionView.dequeReusableCell with size calculation. func getSizeOfFavouriteCell(_ collectionView: UICollectionView, at indexPath: IndexPath, item: FindCircleInfoCellItem) -> CGSize { guard let dummyCell = collectionView.dequeueReusableCell( withReuseIdentifier: TAButtonAddCollectionViewCell.reuseIdentifier, for: indexPath) as? TAButtonAddCollectionViewCell else { return CGSize.zero } dummyCell.title = item.title dummyCell.subtitle = item.subtitle dummyCell.icon = item.icon dummyCell.layoutIfNeeded() var targetSize = CGSize.zero if viewModel.favoritesDataSource.isEmpty.not, viewModel.favoritesDataSource.count > FindSheetViewControllerConstants.minimumFavoritesToDisplayInSection { targetSize = CGSize(width: collectionView.frame.size.width / 2, height: collectionView.frame.height) var estimatedSize: CGSize = dummyCell.systemLayoutSizeFitting(targetSize) if estimatedSize.width > targetSize.width { estimatedSize.width = targetSize.width } return CGSize(width: estimatedSize.width, height: targetSize.height) } } We have resolve issue with size calculation with checking nil. Working fine in xcode 15 and 16+. Note: Please help me with reason of crash? Is it because of xCode 16.2 onwards **strict check on UICollectionView **
0
0
137
Apr ’25
Latest Xcode build giving multiple system level errors
with the latest Xcode version, i am getting all kinds of errors: few main ones: /Users/akashbhatia/MyApp/ios/Pods/Target Support Files/ReactCodegen/ReactCodegen-prefix.pch:2:9 Could not build module 'UIKit' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.4.sdk/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h:18:10 Could not build module 'CoreFoundation' /Users/akashbhatia/MyApp/ios/Pods/Headers/Public/RCT-Folly/folly/portability/Config.h:20:10 'folly/folly-config.h' file not found I have reinstalled Xcode, removed derived data, installed pod over and over again, but I have realized from the first error here, that it has more to do with Xcode and React Native now. Any help will be appreciated.
0
0
78
Apr ’25
Proper Provisiong Profile for Finder Sync Extension
Hi all, I'm developing a simple Finder Sync Extension, using Xcode 16.3. When running in Debug with Xcode, everything works fine. Instead, when compiling in Release and launching the containing app (by double-clicking on it), the Extension is not recognized (neither loaded) by the system. The only difference between Debug and Release stands in Signing configuration: Debug: Release: As you can see, in Release I'm using a Provisiong Profile, configured with my company's Developer ID. I'm wondering if Capabilities and Entitlements are not what is needed by my app. Anyway, I have no idea what the issue is. Any suggestion will be appreciated. Thank you in advance _Alex
3
0
188
Apr ’25
Menu Bar Icon NOT Showing Up
Hi, I'm trying to make a weather menu bar app, and I want to have it so that the icon of the app in the menu changes with the actual weather, but the icon isn't showing up. There is still a space in the menu bar where I can click and open the app, it's just that the icon has disappeared. Any ideas to fix it?
1
1
607
Apr ’25
Xcode 16 - Timeout while connecting to remote device.
Hi, I'm using XCode 16 to connect my iPhone. Recently I'm getting an error as below while connecting to Xcode to install the app Timeout while connecting to remote device. Domain: com.apple.mobiledevice Code: -402652910 User Info: { DVTErrorCreationDateKey = "2025-04-02 15:03:29 +0000"; FunctionName = "_AMDeviceCreateWithRemoteDeviceWithError"; IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker; LineNumber = 334; } System Information macOS Version 15.3.2 (Build 24D81) Xcode 16.2 (23507) (Build 16C5032a) Is there any way we can connect iOS 18 devices through USB only?
4
0
191
Apr ’25
Launch Host App from Share Extension
Hi! Could you please point me to the official documentation or recommended approach for launching the host app from a Share Extension? The scenario is: The user is sharing some text to my app. I need launch App and show this text. At the moment, I'm using the following hack: let selector = NSSelectorFromString("sharedApplication") if let app = UIApplication.perform(selector)?.takeUnretainedValue() as? UIApplication, app.responds(to: #selector(UIApplication.open(_:options:completionHandler:))) { app.open(url, options: [:], completionHandler: nil) } This does work, but it's terrible. So, the question: What is the official way to open the host app from within a Share Extension? Thanks!
2
0
153
Apr ’25
Using WebSocket for BCI Click Input in VisionOS - FocusState vs. System-Level Limitations
Hi everyone, My team and I are developing an accessibility-focused VisionOS app (MindTap) as part of a university project, aiming to support individuals with Locked-In Syndrome using Brain-Computer Interface (BCI) signals to trigger interactions (e.g., tapping) within the Apple Vision Pro environment. Problem 1: Simulating Eye Tracking in Simulator We are testing onHover with Send pointer to the device under I/O > Input in the simulator, and while it mostly works (a bit laggy), we found that onHover won't function on the actual Vision Pro hardware. From what I understand, we should be using FocusState for proper gaze interaction, but testing this requires the physical device. Is there any workaround or official Apple-recommended way to simulate Focus-based gaze detection without a real Vision Pro? Problem 2: WebSocket-triggered "Click" doesn't work outside the app We successfully use WebSocket to send a custom signal (a "1" from the brain signal device) to trigger an action inside our app. However, when the user opens a third-party app like Apple News, the WebSocket-triggered "click" no longer works. We suspect this is due to sandbox restrictions or lack of system-level permissions. Is it possible in anyway to: Trigger interaction events outside the app using custom input (like BCI via Websocket)? Access system-wide click/tap simulation APIs from within VisionOS apps Integrate this with accessibility services (like Voice Control or AssistiveTouch) We'd appreciate any official guidance or tips from others building similar accessibility apps with alternative input methods in VisionOS. Thanks in advance for any insight you can provide!
0
0
122
Apr ’25
Problems when testing Storekit purchases and subscriptions in Xcode and TestFlight
I have an app that unlocks content based on in-app purchases, both one-time payments and subscriptions. Recently, I added new subscription products, both for distribution in App Store Connect and in the configuration file in XCode to be able to test it, declaring it in the scheme. Since the beginning of development, I have had issues with subscriptions. Every time I close the app and reopen it, in order for the app to recover which subscription is active, I have to run the purchase function. This doesn’t happen with purchases or in the production environment, where it works fine. I’ve now implemented SubscriptionStoreView, so I don’t depend on my business logic, in case I’m doing something wrong in the code. This view never remembers which product I’ve already purchased. Currently, in a version deployed to my phone from XCode, it doesn't even process the payment. On macOS, the experience is even worse. On iPad, through TestFlight, I haven’t even been able to test payments at all.
0
0
85
Apr ’25
xcode install iOS 18.2 (22C146) SDK + iOS 18.3.1 (22D8075) Simulator (Components absent) fail
I tried installing the emulator directly from xcode,invalid signature talking about my Mac or the simulator package? Error detial: (-67061 invalid signature (code or signature have been modified) Domain: SimDiskImageErrorDomain Code: 5 User Info: { DVTErrorCreationDateKey = "2025-04-07 08:21:21 +0000"; unusableErrorDetail = ""; } (-67061 invalid signature (code or signature have been modified) Domain: SimDiskImageErrorDomain Code: 5 User Info: { unusableErrorDetail = ""; } System Information macOS Version 14.6.1 (Build 23G93) Xcode 16.2 (23507) (Build 16C5032a) Timestamp: 2025-04-07T16:21:21+08:00
1
1
316
Apr ’25
new rsync version not working as expected
after upgrade macos version to 15.4 the rsync start failing that cause the xcodebuild fail and not generate ipa rsync: on remote machine: --extended-attributes: unknown option rsync error: syntax or usage error (code 1) at main.c(1802) [server=3.4.1] rsync(73444): error: unexpected end of file rsync(73444): error: io_read_nonblocking rsync(73444): error: io_read_buf rsync(73444): error: io_read_int rsync(73444): warning: child 73445 exited with status 1
0
0
217
Apr ’25
App Crashes on iPhone 15 Pro and iPhone 16 After App Store Installation
Hello everyone, I'm experiencing an issue with my app, and I would greatly appreciate any guidance. Here's the situation: My app works flawlessly on the simulator for all iPhone models (16, 16 Pro, 16 Pro Max, SE, etc.). It runs without issues on physical iPhone 11 devices (both mine and a friend's). However, when my friend installs the app from the App Store on their iPhone 15 Pro or iPhone 16, it crashes immediately upon opening. Steps I’ve taken so far: Verified that the app works on the simulator for the same models where it crashes in real life. Updated the app's minimum deployment target to iOS 18, but this did not resolve the issue. The app still crashes on the physical iPhone 15 Pro and 16 models while continuing to run fine on previous physical devices and all simulated ones. Additionally, I had another friend beta test the app through TestFlight on their iPhone 15 Pro, and they received an alert message indicating that the app had crashed when they tried to open it. This confirms the issue still exists after my attempted fixes. I'm unsure what could be causing this discrepancy between the simulated and physical devices, or what the alert message in TestFlight might signify. Has anyone encountered a similar issue, or does anyone have suggestions on what I should do to fix this? Thanks in advance for your help!
1
0
372
Apr ’25
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
75
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
76
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
148
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
142
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
627
Apr ’25