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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

Download container not success on iOS 17 / Xcode 15
I try to use "Download container" on "Devices and Simulators". But on iOS 17, xcappdata file size is 4KB and ''AppData" folder is empty. On iOS 15, xcappdata file size is 2MB and success downloaded. Xcode show these error when I unplug iOS 17 and plugin iOS 15. The system failed to get a list of files on the remote device. Domain: com.apple.dt.CoreDeviceError Code: 7001 User Info: { DVTErrorCreationDateKey = "2023-12-12 07:39:24 +0000"; NSFilePath = ""; } -- Unknown response: { XPCErrorDescription => Connection interrupted } Domain: com.apple.dt.remoteservices.error Code: -1 -- System Information macOS Version 14.2 (Build 23C64) Xcode 15.1 (22502) (Build 15C65) Timestamp: 2023-12-12T15:39:24+08:00 PS. I had turn on [Airplane mode] on iOS 17.
5
0
2.9k
Dec ’24
XLSXWriter Help
Hello, I am brand new to development in Xcode. I have created a Mac app that I need to use XLSXWriter to export a workbook and sheet. Is GitHub the only place for this download or is there an apple developer specific area to get the library? Thanks
0
0
124
Jan ’25
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
4k
Dec ’24
How to start and automatically update/end a local live activity?
I'm implementing a timer feature and facing the issue that the live activity I'm starting just continues showing after the timer is complete. The body of the live activity widget is more or less: ActivityConfiguration(for: WhendyWidgetAttributes.self) { context in VStack { Text( context.state.timerEndDate, style: .timer ) // if Date.now < timerEndTime { Text("Done") } self.expandedView(state: context.state) } } … Ideally I could get the activity to show something else when it is done but I don't know how to get it to re-evaluate it's body once the end time is reached. I create the activity with let activity = try ActivityKit.Activity.request( attributes: attributes, content: .init( state: .init(timerEndDate: timerEndDate), staleDate: timerEndDate ), pushType: nil ) Can I schedule the activity to do a refresh it's body (and reevaluating Date.now) once the timerEndDate is reached? Considered Approaches trying staleDate However, the activity never shows that it has become stale. Would it be expected that it shows the stale-ness? scheduling dismissal I also thought about starting and immediately stopping the activity with a delayed dismissal, but unfortunately it seems this is limited to a 4 hour window, and I'd like longer timers too. remote updates I understand I could use remote notifications to update the live activity, but I'd really like to keep things local as all the functionality is locally plannable. Background Tasks I understand these don't run reliably or at a predictable time. A Timer in the app that updates the content I think this would only update the activity while the app is in foreground.
0
0
535
Nov ’24
Cannot assign build target to usdz file
I’m working in the app playground and want to add my usdz file but when i drag drop the file to my main folder i cannot add target to it which leads to a resource not found error while I build my app. It was working on a normal xcode project but while transitioning to app playground it is not working. How can I fix this issue?
0
0
367
Jan ’25
Xcode 16: AppLaunchTimeoutError: Failed to launch app in reasonable time
Xcode Version: 16 MacOS Version: 15.0 My app has 2 packages: Firebase iOS SDK (https://github.com/firebase/firebase-ios-sdk.git) Google Mobile Ads (https://github.com/googleads/swift-package-manager-google-mobile-ads.git) My app fails to run on the Xcode Preview window. The app works successfully on a simulator when built. But, not in the Xcode Preview. I have tried: Cleaning and rebuilding. Changing the target device. Resetting Package Cache There are no solutions mentioned/provided online. I have a previews-diagnostics zip file ready. Who can I share it with?
0
0
274
Nov ’24
Xcconfig variables doesn't get loaded automatically in project settings
Hi, I am using xcode build that receive it's configuration using xcconfig files, those add some new definitions to the project, like the location of openssl library. If xcode environment variable include prefix that matches one of the fields in the project settings, it is automatically referred to as if you added it to that field. for example : the var HEADER_SEARCH_PATHS_openssl_libopenssl has value (openssl headers' path) that should be automatically added to the field Headers Search Paths under project settings. For some reason it stopped working for me and i'm not sure why (i've tried to release the xcconfig files). any idea why ? Thanks !
0
0
328
Jan ’25
EXC_BAD_ACCESS KERN_INVALID_ADDRESS ,Crashed: com.apple.main-thread
I am experiencing a crash on iOS 18 for some devices when the app becomes active again after being inactive for one or two days, with the following details: Crash Information: Thread: com.apple.main-thread Exception: EXC_BAD_ACCESS KERN_INVALID_ADDRESS The crash occurs intermittently on certain devices, but I haven’t been able to reproduce it consistently. Based on the crash logs, it seems to be related to accessing an invalid or corrupted memory address. But if user try to uninstall the app or restart the device, the issue is gone . Is this a known issue in iOS 18? Are there any official workarounds or fixes? Could this be related to specific device configurations, such as limited memory on older models? Are there any known APIs or frameworks in iOS 18 that could trigger such an issue? What additional debugging steps would you recommend to narrow down the root cause? Have other developers encountered similar crashes in iOS 18? Thank you for your help! I appreciate any insights or suggestions.
1
0
670
Dec ’24
Xcode Git integration destroyed my git local repository
This is using Xcode 16.2 (16C5032a), MacOS 15.2, on MacbookPro 16 M1 Pro. I have two repositories, one for an application and another one for a framework. The repository framework is integrated into the application one as git submodule. I was going to push the submodule to Github using Xcode git integration. It detects some conflicts and ask to pull. I pull. A window appears with some conflicting files (5 or 6). Review them. While reviewing something in Xcode crashed, but as Xcode was still up and running, ignored the crash. Decided to cancel the conflicts window and inspect my local files. Pull again but this time I decided to pull both repos. Review the conflicting changes and decided to cancel again to continue by hand in a terminal. Then, I notice that the project for the submodule is in red and that the "Changes" tab shows a bunch of files with and admiration mark. I go to the submodule folder in Finder and... everything inside the submodule folder was gone, disappeared, lost... everything, even the ".git" folder (only remained a binary folder for a component I use for the framework but is empty). I decided to run a recovery tool. It finds nothing to recover inside that folder, nothing. A lot of files even from years ago but nothing inside that folder? how is that possible? I filled a Feedback assistant issue: FB16307182 Could it be possible that Xcode "moved" everything to another place (I'm desperate so I'm starting to think in absurd explanations) Thanks
1
0
410
Jan ’25
How to create a new asset catalog in a package
I created a package using "File > New > Package" and now I want to add a new Asset Catalog to this package. With my package selected in the project navigator I select "File > New > File" but it creates a Swift file instead of showing the Template Selection dialog Ref: https://developer.apple.com/documentation/xcode/managing-assets-with-asset-catalogs#Create-a-new-asset-catalog
1
0
673
Mar ’25
Checking for NIL
I have a program where the user enters 2 fields with numerics. If they accidently enter a letter the program crashes. How can I check for NIL without making the variable optional. If I make it optional I get an error in the Textfield. How can I test a Textfield for NIL? Please help.
4
0
363
Dec ’24
XIB file is showing an old version
I am trying to update my AboutView.xib file (https://git.callpipe.com/AccelerateNetworks/an-mobile-ios/-/blob/main/Classes/Base.lproj/AboutView.xib) through the xcode interface builder, and the changes that I make are correctly reflected in the wysiwyg, as well as in the file itself. However, I whenever the app is built and installed, it shows an older version of the about page. Things I have tried to resolve this are (not listed in order): Product > Clean Build Folder Uninstall and reinstall the app Restart the phone Restart xcode Restart the computer Test a build created through xcode cloud rm -rv ~/Library/Developer/Xcode/DerivedData rm -rf ~/Library/Caches/com.apple.dt.Xcode rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache" Changing something in the xib file (hoping it will recognize a change) The only time the about page has shown something different is when I deleted the xib entirely. The project still built and deployed to the test device, but the about page was completely blank. This tells me I am working with the correct file, and when I look at the xml contents of the file, I can't find any of the old strings that are showing up. What the editor shows: What the app shows:
2
0
317
Jan ’25
Seeking advice on building a multiplatform PDF viewer app
Hi everyone, I’m planning to develop a cross-platform PDF viewer app for iOS and macOS that will read PDFs from local storage and cloud services (Google Drive, iCloud, WorkDrive, etc.). The app should be read-only and display both the PDF content and its metadata (author, title, creation date, etc.). Key Features: View PDFs: Local and remote (cloud storage integration). Display metadata: Title, author, page count, etc. Cloud integration: Google Drive, iCloud, Zoho WorkDrive, etc. Read-only mode: No editing features, just viewing. Questions: Xcode Template: Should I use the Document App or Generic App template for this? PDF Metadata: Any built-in libraries for extracting PDF metadata in a read-only app? Performance: Any advice or documentation on handling large PDFs or cloud fetching efficiently? Thanks in advance for any advice or resources!
0
0
288
Nov ’24
Issue during loading account information on virtual machine
I'm not able to see my account information on the Mac Mini machine with M2 CPU. I log in to my account in Settings, but in Xcode 16.1 it fails with the Decoding Error There was a failure decoding response I think this is the same as here: https://developer.apple.com/forums/thread/767673 https://developer.apple.com/forums/thread/769069 https://developer.apple.com/forums/thread/759877
0
0
191
Nov ’24