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

Xcode Documentation

Pinned Posts

Posts under Xcode tag

3,075 Posts
Sort by:
Post not yet marked as solved
0 Replies
6 Views
I am converting a large core data app to SwiftData and have hit a problem I can't fix, namely code generated by a Model crashing. Here is the model showing the failing expansion. Here is the model containing the inverse for the failing attribute: /Users/writingshedprod/Desktop/Screenshot 2024-05-08 at 20.21.51.png And here is the mass of core data output generated when the app launches. If anyone can make sense of this I'd be grateful. This is where the problem might lie. Debugger.txt
Posted Last updated
.
Post not yet marked as solved
0 Replies
13 Views
I can run it on the simulators, and directly on physical devices, but not on My Mac (Designed for iPad). The error is: error: attach by pid '33190' failed -- attach failed (Not allowed to attach to process. Look in the console messages (Console.app), near the debugserver entries, when the attach failed. The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.) Checked the log and this is what I found: error 12:44:36.527139-0500 mdbulkimport could not make proxies from uuids in optimized path! Error Domain=NSOSStatusErrorDomain Code=-10814 "Unable to find this application extension record in the Launch Services database." UserInfo={_LSFunction=, _LSLine=679, NSDebugDescription=Unable to find this application extension record in the Launch Services database., SK=, IS=0} error 12:44:36.527174-0500 mdbulkimport Using expensive fallback path for obtaining plugin proxies from install notifications. This process should be entitled to use the LS database. default 12:44:36.529748-0500 debugserver [LaunchAttach] (32518) about to task_for_pid(32517) default 12:44:36.529778-0500 kernel macOSTaskPolicy: (com.apple.debugserver) may not get the task control port of (Piano Motifs) (pid: 32517): (Piano Motifs) is hardened, (Piano Motifs) doesn't have get-task-allow, (com.apple.debugserver) is a declared debugger(com.apple.debugserver) is not a declared read-only debugger error 12:44:36.529795-0500 debugserver error: [LaunchAttach] MachTask::TaskPortForProcessID task_for_pid(32517) failed: ::task_for_pid ( target_tport = 0x0203, pid = 32517, &task ) => err = 0x00000005 ((os/kern) failure) So the issue seems to be not finding the application's extension record in the Launch Services database. How is this problem solved?
Posted
by fermor.
Last updated
.
Post not yet marked as solved
0 Replies
22 Views
We have a server with mac and Xcode which generates apps for IOS signing them with release provisioning profile and sign identities. It does by command line It worked perfectly until we upgraded from Xcode 14 to Xcode 15.2 This is the command that we execute to generate the Xarchive, and it is failing, not generating anything and giving error: xcodebuild -workspace Project.xcworkspace -scheme "Release Ads" -xcconfig Project/Custom.xcconfig PROVISIONING_PROFILE_SPECIFIER=realidentifier CODE_SIGN_IDENTITY=realsignidentity CODE_SIGN_ENTITLEMENTS=/Users/user/project/Project/Project.entitlements archive This is the content of Custom.xcconfig file: OTHER_SWIFT_FLAGS = -Onone -DCOCOAPODS -DRELEASE -DADS -DFIREBASE -DPUSH This is the content of Project.entitlements file: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>aps-environment</key> <string>production</string> <key>application-identifier</key> <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string> <key>beta-reports-active</key> <true/> </dict> </plist> I can see this on the error log of the console: 2024-05-08 18:38:55.527 --- xcodebuild: WARNING: Using the first of multiple matching destinations: 2024-05-08 18:38:55.527 { platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00008103-001904CE1EC3001E } 2024-05-08 18:38:55.527 { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device } 2024-05-08 18:38:55.527 { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device } 2024-05-08 18:38:55.527 { platform:iOS Simulator, id:588FF55F-AFE3-4201-883D-AA074825765E, OS:17.2, name:iPad (10th generation) } 2024-05-08 18:38:55.527 { platform:iOS Simulator, id:588FF55F-AFE3-4201-883D-AA074825765E, OS:17.2, name:iPad (10th generation) } 2024-05-08 18:38:55.527 { platform:iOS Simulator, id:E7D3BE01-626C-4448-AD07-9B72E8D59778, OS:17.2, name:iPad Air (5th generation) } 2024-05-08 18:38:55.527 { platform:iOS Simulator, id:E7D3BE01-626C-4448-AD07-9B72E8D59778, OS:17.2, name:iPad Air (5th generation) } 2024-05-08 18:38:55.527 { platform:iOS Simulator, id:CE0E7741-9872-4903-95D3-DA86730D8D91, OS:17.2, name:iPad Pro (11-inch) (4th generation) } 2024-05-08 18:38:55.527 { platform:iOS Simulator, id:CE0E7741-9872-4903-95D3-DA86730D8D91, OS:17.2, name:iPad Pro (11-inch) (4th generation) } 2024-05-08 18:38:55.527 { platform:iOS Simulator, id:23DEF9D6-7B62-4829-A2F0-9C4356F7CB22, OS:17.2, name:iPad Pro (12.9-inch) (6th generation) } 2024-05-08 18:38:55.527 { platform:iOS Simulator, id:23DEF9D6-7B62-4829-A2F0-9C4356F7CB22, OS:17.2, name:iPad Pro (12.9-inch) (6th generation) } 2024-05-08 18:38:55.527 { platform:iOS Simulator, id:00F68979-CC31-4FDA-BD44-6AE3E41EEC3A, OS:17.2, name:iPad mini (6th generation) } 2024-05-08 18:38:55.527 { platform:iOS Simulator, id:00F68979-CC31-4FDA-BD44-6AE3E41EEC3A, OS:17.2, name:iPad mini (6th generation) } 2024-05-08 18:38:55.527 { platform:iOS Simulator, id:5396905C-A343-4D94-95DD-23FE0ADDDCEB, OS:17.2, name:iPhone 15 } 2024-05-08 18:38:55.527 { platform:iOS Simulator, id:5396905C-A343-4D94-95DD-23FE0ADDDCEB, OS:17.2, name:iPhone 15 } 2024-05-08 18:38:55.527 { platform:iOS Simulator, id:F713CFB0-8617-424D-BE03-51B506931BFD, OS:17.2, name:iPhone 15 Plus } 2024-05-08 18:38:55.527 { platform:iOS Simulator, id:F713CFB0-8617-424D-BE03-51B506931BFD, OS:17.2, name:iPhone 15 Plus } 2024-05-08 18:38:55.527 { platform:iOS Simulator, id:594E330B-252D-4728-955C-B508E70AD20A, OS:17.2, name:iPhone 15 Pro } 2024-05-08 18:38:55.527 { platform:iOS Simulator, id:594E330B-252D-4728-955C-B508E70AD20A, OS:17.2, name:iPhone 15 Pro } 2024-05-08 18:38:55.527 { platform:iOS Simulator, id:B7551687-D9C6-46E9-BA26-D0CC70AC134D, OS:17.2, name:iPhone 15 Pro Max } 2024-05-08 18:38:55.527 { platform:iOS Simulator, id:B7551687-D9C6-46E9-BA26-D0CC70AC134D, OS:17.2, name:iPhone 15 Pro Max } 2024-05-08 18:38:55.527 { platform:iOS Simulator, id:E5D6C1EA-81B1-49D5-BF55-673258AE1227, OS:17.2, name:iPhone SE (3rd generation) } 2024-05-08 18:38:55.527 { platform:iOS Simulator, id:E5D6C1EA-81B1-49D5-BF55-673258AE1227, OS:17.2, name:iPhone SE (3rd generation) } 2024-05-08 18:39:24.105 ** ARCHIVE FAILED ** 2024-05-08 18:39:24.105 2024-05-08 18:39:24.105 2024-05-08 18:39:24.105 The following build commands failed: 2024-05-08 18:39:24.105 PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/user/Library/Developer/Xcode/DerivedData/Project-bdyzwdcujggpnmedzctlookvtuwv/Build/Intermediates.noindex/ArchiveIntermediates/Release/IntermediateBuildFilesPath/Project.build/Release-iphoneos/Project.build/Script-FEF05C244C47CB5438EC384B.sh (in target 'Project' from project 'Project')
Posted
by abouza.
Last updated
.
Post not yet marked as solved
0 Replies
17 Views
When I build my product for the simulator or for direct install from Xcode to my device, all works fine. When I archive>distribute, the app is missing modules when it starts. "Runtime error module 'network' not found:resource (network.lu) does not exist in archive... And then a list of al the places it looked. Xcode 15.3 Solar2d 2024.3706 (latest) Macbook Pro M3 Sonoma 14.4.1 Programming in Lua on Solar2d "native" (includes Objective-C and Swift code) I have had a related (I think) problem with the simulator and device builds missing other modules (all includes) -- but only after working fine for maybe a dozen builds. I then explicitly add them in, one by one. There is no way I can manually add in network, because it is built into the Solar2d environment. I am pretty sure this is an Xcode bug, not a Solar2d bug. But also likely I have a setting wrong.
Posted Last updated
.
Post not yet marked as solved
3 Replies
1.4k Views
Since the macOS 14.4 and Xcode 15.3 update, I'm getting these message posted in the Xcode log when I run a Mac app, even for template apps. BOOL _NSPersistentUIDeleteItemAtFileURL(NSURL *const __strong) Failed to stat item: file:///Users/***/Library/Containers/***/Data/Library/Saved%20Application%20State/***.savedState/restorecount.plist I've already reported this to Apple. I just wanted to know if I was the only one affected (it happens on all my development Macs).
Posted
by jeanlain.
Last updated
.
Post not yet marked as solved
2 Replies
60 Views
After our upgrade to Xcode 15.3, our app compiles and builds, but when we run it on an iPhone it crashes with EXC_BAD_ACCESS (code=1, address=0x15b) upon starting. We're using Qt and the crash occurs when we try to access our app's sqlite file with QSqlQuery::exec(). The EXC_BAD_ACCESS occurs when trying to run a SELECT or PRAGMA statement to read from the sqlite. Running an INSERT or DELETE with the exec() method does not result in an exception; we just get an error saying that the table in the command does not exist. exec() crashes when it gets to sqlite3VdbeMemGrow in the sqlite3VdbeMemStringify call. We're using a "solid" QSqlQuery object variable in our code, not a pointer to a QSqlQuery object, so it's not like our code is using an uninitialized pointer. We tried the suggestion in this post that references this project's bug tracker and changed our iOS Minimum Deployment setting in Xcode from 11.0 to 13.0, but this didn't resolve the issue. I hypothesized that perhaps the Xcode update prohibits the main thread from doing file access, but after preventing our main thread from doing any accessing of the sqlite file, we still get EXC_BAD_ACCESS (code=1, address=0x15b) from a separate thread that tries to access the sqlite file. I hypothesized that perhaps it was a file access permission issue when I saw the app trying to use the sqlite file out of the "Documents" folder /var/mobile/Containers/Data/Application/AAC50B3C-4DCF-4122-B88A-FC631E6BB9A0/Documents. I changed the app to use a different container sub folder but that gave different errors: QIODevice::write (QFile, "/var/mobile/Containers/Data/Application/E64A08B4-5F59-433E-9111-D503F190383F/Library/Application Support/ELD/log.txt"): device not open which would be our app's log file. The sqlite commands all give database not open responses. Another thread suggested downgrading Xcode, but we also got the EXC_BAD_ACCESS with Xcode 15.0.1. Thanks for your time!
Posted
by criegel.
Last updated
.
Post not yet marked as solved
0 Replies
25 Views
Hi all, i am setting up my MacBook Pro and cant install Xcode. I downloaded it through the app store. On click it starts up and asks me what platform I would like to develop for. (The window where you have to select When continue is clicked it asks for admin permissions then quits and starts the process over again. I tried running this /Applications/Xcode.app/Contents/MacOS/Xcode -installComponents in the CMD and this opens the same window but still doesnt run but now i get an error when it closes Xcode[837:10271] [MT] IDEFirstLaunch: Cannot continue without relaunching because of already-loaded bundles: [NSBundle </Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework> (loaded)] Specs: MacBook Pro M1 Pro macOS 14.1
Posted
by Denonono.
Last updated
.
Post not yet marked as solved
1 Replies
57 Views
when using Xcode15, we found that using Xcode 15 to access keychain may fail. Although using Xcode earlier than 15 may have same question, but the probability is higher on Xcode15. Anyone has the same question and how to fix it?
Posted Last updated
.
Post not yet marked as solved
1 Replies
56 Views
I'm trying to use rvictl but here's what I run into > rvictl Could not get list of devices > sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.rpmuxd.plist Load failed: 5: Input/output error Try running `launchctl bootstrap` as root for richer errors. > ls /System/Library/LaunchDaemons/com.apple.rpmuxd.plist ls: /System/Library/LaunchDaemons/com.apple.rpmuxd.plist: No such file or directory XCode version 15.3 MacOS Sonoma 14.4.1 Apple M1 Max
Posted
by k29sMJ.
Last updated
.
Post not yet marked as solved
0 Replies
53 Views
Hello, I'm experiencing a sad BUG. I am deaf, blind, in a wheelchair. I program in XCode via Braille display. I compile any APP in XCode, including the APP test "Hello world!" and I transfer this APP to my iPhone via USB cable or Wi-Fi. So, when I try to enter the APP, VoiceOver suddenly deactivates itself and no longer activates. I always have to turn off my iPhone and turn it on again. He only reacts with someone he sees as helping. I'm not programming in XCode, because I can't test APPS on my iPhone anymore. Help me. Software in Mac: XCode 15.4 beta Software MacOS: latest version; Software in iPhone:iOS 17.5 Hardware: iPhone 14 Pro Max The BUG happens always.
Posted Last updated
.
Post not yet marked as solved
1 Replies
75 Views
My application runs smoothly in our local environment. however, we consistently encounter errors upon launch in TestFlight. Despite our efforts to update our libraries and address these issues, the problem still persists. For more detailed insight, I have attached the crash log here.
Posted Last updated
.
Post not yet marked as solved
3 Replies
1.9k Views
I have chronic problems with the connection between Xcode and my phone. I plug the phone in and Xcode says "Waiting for phone to unlock", but the phone is already unlocked. I try locking and unlocking it, but nothing happens. If I can get past this problem by disconnection and reconnecting the phone a couple of times, it gets into the "downloading symbols" phase and never gets out of it. Finally, even though I have checked the "Connect via network" option, it never works, and I can never connect unless I plug in the phone with a USB cord (yes, the phone and the computer are on the same Wifi network). Some days this is just an annoyance, but some days (like today) I really need to test something on my phone for a customer who's waiting for it, and I cannot. The thing I'm trying to test involves sending text messages so I can't use the simulator or even an iPad. What can I do to debug this problem?
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
0 Replies
62 Views
This bundle is invalid. The value for key CFBundleVersion [1.0.1] in the Info.plist file must contain a higher version than that of the previously uploaded version [5]. Please find more information about CFBundleVersion at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleversion (ID: 978303b8-eb71-4d71-9169-b0b0860fd8ec) The issue is an error while uploading macOS version 1.0.1 to the App store. If I want to solve it simply and quickly now, do I have to skip 1.0.1 and upload version 5.0.1 right away? I made an inquiry to Apple, but they only asked me to ask the forum or provide technical support. I would appreciate it if you could reply even if it's not accurate. I don't know if the problem is mine or Apple's problem, so I can't solve it for a long time.
Posted Last updated
.
Post not yet marked as solved
0 Replies
41 Views
if I want to document my color asset with DocC to help the development team use colors correctly in app development, how can I do it? p.s. think about when you have to work in a team but there isn't a graphic repository, like Figma or Zeplin
Posted
by Rufy.
Last updated
.
Post not yet marked as solved
2 Replies
79 Views
with the latest Xcode that runs with Mac OS 14.5 Developer Beta has messages with a time and date in them There are also some other fields of an indeterminate origin/type. "2024-05-06 15:37:32.383996-0500 RoomPlanExampleApp[24190:1708576] [CAMetalLayerDrawable texture] should not be called after already presenting this drawable. Get a nextDrawable instead." specifically I need to know how the string [24190:1708576] relates to a location in my application so I can act on the message. I certainly can't find the text in the "[CAMetalLayerDrawable texture]". field anywhere in the user documentation OR the Development documentation. In order for a diagnostic message to be Actionable and remedied by a user it must identify the module and source line of the initiating code and there must be accessible documentation for users to access to get an explanation of potential remedies.. This interface fails to supply enough information to diagnose the problem. The label in [CAMetalLayerDrawable texture] cannot even be found in a search of the package information attached to the Xcode Release paired with the IOS and Mac OS system releases.
Posted
by mfstanton.
Last updated
.
Post not yet marked as solved
1 Replies
50 Views
No metrics data found for the latest app versions with sufficient usage. What is sufficient usage ? Can we define sufficient usage ourself ? if Yes then how ? https://developer.apple.com/videos/play/wwdc2020/10076/ wwwdc200 does mention factor of 5, but 5 of what ? and when where is the definition ? Organizer -> Metrics is useless if there is no data. If someone knows the fix please suggest.
Posted Last updated
.
Post not yet marked as solved
1 Replies
51 Views
I'm trying to get my iOS app ready for distribution, but after running Product->Archive and clicking Validate App, XCode does a few steps of validation and then crashes without finishing. Here's the top of the crash log, I can reproduce easily and get the full report if needed. This is a blocker for me and I really need a solution. Translated Report (Full Report Below) ------------------------------------- Process: Xcode [93086] Path: /Applications/Xcode.app/Contents/MacOS/Xcode Identifier: com.apple.dt.Xcode Version: 15.3 (22618) Build Info: IDEApplication-22618000000000000~2 (15E204a) App Item ID: 497799835 App External ID: 863955376 Code Type: ARM-64 (Native) Parent Process: launchd [1] User ID: 501 Date/Time: 2024-05-07 09:20:28.9493 +0200 OS Version: macOS 14.4.1 (23E224) Report Version: 12 Anonymous UUID: 3BF4943C-9199-C215-F9AB-59223913BAC9 Sleep/Wake UUID: 0AFCFDE1-E734-4B4D-88F6-72BC777F81CB Time Awake Since Boot: 650000 seconds Time Since Wake: 2935 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: archive info plist lock Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6 Terminating Process: Xcode [93086] Application Specific Information: com.apple.main-thread abort() called Application Specific Signatures: NSInvalidArgumentException Application Specific Backtrace 0: 0 CoreFoundation 0x000000019d59eccc __exceptionPreprocess + 176 1 DVTFoundation 0x00000001044dcbc4 DVTFailureHintExceptionPreprocessor + 388 2 libobjc.A.dylib 0x000000019d086788 objc_exception_throw + 60 3 CoreFoundation 0x000000019d4b67d0 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 728 4 CoreFoundation 0x000000019d4b64cc +[NSDictionary dictionaryWithObjects:forKeys:count:] + 52 5 IDEFoundation 0x0000000109a58a34 -[IDEArchiveDistributionRecord dictionaryRepresentation] + 296 6 IDEFoundation 0x0000000109a3a21c __31-[IDEArchive setDistributions:]_block_invoke + 16 7 DVTFoundation 0x00000001044d4700 -[NSArray(DVTFoundationClassAdditions) dvt_arrayByApplyingBlock:] + 224 8 IDEFoundation 0x0000000109a3a1ac -[IDEArchive setDistributions:] + 84 9 Foundation 0x000000019e624370 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] + 608 10 Foundation 0x000000019e64da24 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] + 64 11 Foundation 0x000000019e667688 _NSSetObjectValueAndNotify + 284 12 IDEFoundation 0x0000000109a39fa4 __36-[IDEArchive addDistribution:error:]_block_invoke + 156 13 libdispatch.dylib 0x000000019d29a3e8 _dispatch_client_callout + 20 14 libdispatch.dylib 0x000000019d2a98d8 _dispatch_lane_barrier_sync_invoke_and_complete + 56 15 DVTFoundation 0x000000010452127c DVTDispatchBarrierSync + 148 16 DVTFoundation 0x00000001044fd024 -[DVTDispatchLock performLockedBlock:] + 60 17 IDEFoundation 0x0000000109a39dcc -[IDEArchive addDistribution:error:] + 200 18 IDEFoundation 0x00000001099e05f4 __41-[IDEDistributionValidationStep validate]_block_invoke + 116 19 DVTFoundation 0x0000000104520598 __DVT_CALLING_CLIENT_BLOCK__ + 16 20 DVTFoundation 0x0000000104520d70 __DVTSyncPerformBlock_block_invoke + 68 21 CoreFoundation 0x000000019d529a48 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 28 22 CoreFoundation 0x000000019d52995c __CFRunLoopDoBlocks + 356 23 CoreFoundation 0x000000019d528dec __CFRunLoopRun + 2440 24 CoreFoundation 0x000000019d527e0c CFRunLoopRunSpecific + 608 25 HIToolbox 0x00000001a7cc3000 RunC
Posted
by hrydgard.
Last updated
.
Post not yet marked as solved
0 Replies
49 Views
My project was working fine on xcode 14 for ios 16 simulators and real devices with all setup and pods, recently i updated system for xcode 15, and sicne then on build getting this error for simulator and real devices - Driver threw unknown argument: '-bvvutkjqcsvcmlfdhxkrjtgqdzeg/Build/Intermediates.noindex/' without emitting errors. i did everyting - clean ,deep clean, restart, update cocoapod, all pods update, deintegrate - install again, delete cache, delete derived data btw - this- bvvutkjqcsvcmlfdhxkrjtgqdzeg/Build/Intermediates.noindex/ is a file getting generated in derived data - and in log getting this also - error: Driver threw unknown argument: '-bvvutkjqcsvcmlfdhxkrjtgqdzeg/Build/Intermediates.noindex/' without emitting errors. (in target 'fabfinance' from project ' ') this is my pod file - # Uncomment the next line to define a global platform for your project # platform :ios, '13.0' target 'fabfinance' do # Comment the next line if you don't want to use dynamic frameworks use_frameworks! # Pods for fabfinance pod 'Alamofire' pod 'SwiftyJSON' pod 'PopupDialog' pod 'JMImageCache' #pod 'Firebase/Analytics' #pod 'Firebase/Messaging' #pod 'Firebase/Crashlytics' #pod 'Firebase/Core' #pod 'Firebase/Auth' pod 'SOTabBar' pod 'MaterialComponents' pod 'IQKeyboardManagerSwift' pod 'DropDown' pod 'DLRadioButton', '~> 1.4' pod 'ADCountryPicker', '~> 2.1.0' pod 'MDFInternationalization' pod 'SDWebImage' pod 'ProgressHUD' pod 'DatePickerDialog' pod 'PhoneNumberKit' pod 'Charts' target 'fabfinanceTests' do inherit! :search_paths # Pods for testing end target 'fabfinanceUITests' do # Pods for testing end end post_install do |installer| installer.generated_projects.each do |project| project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' end end end end
Posted Last updated
.