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

Xcode Documentation

Pinned Posts

Posts under Xcode tag

3,046 Posts
Sort by:
Post marked as solved
12 Replies
27k Views
In Xcode 10, there was a button for the Object Library located left of the "inspector" buttons. After the upgrade to Xcode 11 occurred, this button no logner exists. Where did it go?
Posted
by
Post not yet marked as solved
34 Replies
35k Views
I downloaded new XCode 11 today and when I am trying to open my project, XCode will always crash. Does anyone else experience this problem ? I have provided part of crash log. It's IDE related problem, but I would be really glad, someone has a solution to this.Crashed Thread: 25 Dispatch queue: ConcurrentQueue: -[IDEProvisioningMechanic _executeNextRepairIfNeeded]_block_invokeException Type: EXC_CRASH (SIGABRT)Exception Codes: 0x0000000000000000, 0x0000000000000000Exception Note: EXC_CORPSE_NOTIFYApplication Specific Information:ProductBuildVersion: 11A420aASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-14936/IDEFoundation/Provisioning/Mechanic/IDEProvisioningRepairStepGenerator.m:252Details: Didn't find a single primary certificate type from {()}Object: <IDEProvisioningRepairStepGenerator_Automatic: 0x7fdc55061ef0>Method: -_evaluateCertificatesWithSession:context:repairable:steps:userAction:error:Thread: <NSThread: 0x7fdc44944ca0>{number = 20, name = (null)}Hints: Backtrace: 0 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit) 1 _DVTAssertionHandler (in DVTFoundation) 2 _DVTAssertionFailureHandler (in DVTFoundation) 3 -[IDEProvisioningRepairStepGenerator_Automatic _evaluateCertificatesWithSession:context:repairable:steps:userAction:error:] (in IDEFoundation) 4 -[IDEProvisioningRepairStepGenerator_Automatic stepsWithSession:context:userAction:error:] (in IDEFoundation) 5 -[IDEProvisioningRepair execute] (in IDEFoundation) 6 __53-[IDEProvisioningMechanic _executeNextRepairIfNeeded]_block_invoke_2 (in IDEFoundation) 7 __DVT_CALLING_CLIENT_BLOCK__ (in DVTFoundation) 8 __DVTDispatchAsync_block_invoke (in DVTFoundation) 9 _dispatch_call_block_and_release (in libdispatch.dylib) 10 _dispatch_client_callout (in libdispatch.dylib) 11 _dispatch_continuation_pop (in libdispatch.dylib) 12 _dispatch_async_redirect_invoke (in libdispatch.dylib) 13 _dispatch_root_queue_drain (in libdispatch.dylib) 14 _dispatch_worker_thread2 (in libdispatch.dylib) 15 _pthread_wqthread (in libsystem_pthread.dylib) 16 start_wqthread (in libsystem_pthread.dylib)I have deleted caches in library, derivated data, even disabled automati signing, but none of these work, also /Library/Caches/com.apple.xbs does not exist. I have asked this question on SO - https://stackoverflow.com/questions/58052418/xcode-11-crashes-when-opening-the-project
Posted
by
Post not yet marked as solved
25 Replies
57k Views
Ever since updating (against my will) to Xcode 11, I'm getting this error when I try to build my project:"Command CodeSign failed with a nonzero exit code"I've tried cleaning my project, resetting my login keychain, and restarting my computer, but I still get this error... what to do?xcode
Posted
by
Post not yet marked as solved
38 Replies
222k Views
Running Mojave 10.14.6Xcode 11.0 (11A420a)iOS 13.1.2iPhone 6s PlusI cannot seem to find the solution here or on Stack Overflow.When compiling, I keep getting this error:Command PhaseScriptExecution failed with a nonzero exit codeI tried in XcodeXcode > Preferences > Accountssigning in and outI have created a new Dev Cert, Distribution Cert, new PUSH certs, new provisional profilesI have tried pod updatesI have tried changing the Build Phase info with chmod +xas recommended by this posthttps://forums.developer.apple.com/thread/122796?start=0&tstart=0I have tried rebooting my phone. I have tried rebooting the computer. rebooting xcode (obviously)Don't know what else to do.
Posted
by
Post not yet marked as solved
13 Replies
15k Views
In Xcode 11.1, I created a 'README.md' markdown file, but it always renders as its raw text (yet font size changes depending on header level). For example, in Xcode's editor I see:# AppName ## Version 1.0Where the first line is in a larger font size than the lines 3 and 4.Anyhow, if I open up a project from Apple (e.g. BuildingCustomViewsInSwiftUI), it's README renders correctly.If I paste my project's contents into Apple's sample project README, it then renders a-ok. The reverse though (taking the contents from Apple's sample and pasting into my project; even dragging in the original project) won't render it (I then see all the markup symbols such as #.I've checked every possible setting between the two projects and cannot figure out why this is happening. The type of file (markdown), encoding, etc. are identical.However, one item I have noticed is that in Apple's sample project, when I view the README.md file, the Editor | Minimap menu choice is disabled and unchecked. Whereas in my project, the menu choice is enabled. Toggling that on/off though has no effect in my project.Thus, there must be some reason why Apple's sample has the Minimap option disabled. And my guess is this is the reason why Apple's sample in then rendering the markdown file correctliy in the editor.Anyone know how to fix this?Note: I also viewed the contents of the various files under the .xcodeproj package and couldn't find anything useful (i.e.. I was hoping to find some settings difference regarding the readme file, but couldn't find any).
Posted
by
Post not yet marked as solved
21 Replies
48k Views
After I updated to Mac OS Catalina I'm no more able to run the simulator. I always get this: "Unable to boot the Simulator - launchd failed to respond".I'm runningMac OS 10.15 CatalinaXcode 10.3I can't update to Xcode 11 (anyway my collegue installed Xcode 11 and he's getting the same error too)I already try these:- Simulator/Hardware/Erase all contents and services... (the result was a black screen on simulator and nothing happened)- Delete all simulators and download them again- /private/tmp directorysudo mkdir /private/tmp sudo chmod 1777 /private/tmp- I tried thisxcrun simctl shutdown all xcrun simctl delete $(xcrun simctl list | grep -o '[0-9A-F]\{8\}-[0-9A-F]\{4\}-[0-9A-F]\{4\}-[0-9A-F]\{4\}-[0-9A-F]\{12\}' | xargs) xcrun simctl delete unavailableNothing seems working... The simulator looks working in the morning, than after few builds it stop working.Ideas?
Posted
by
Post not yet marked as solved
14 Replies
28k Views
Hi. I have some trouble while on connecting latest Python 3.8 on the Xcode 11. I have been fighting with the problem almost couple of days, and I finally concluded I must get help from the masters. I'm new to Xcode and other programming stuff, please forgive me on being clumsy;)I first type on google Xcode, Python and read some posts about bringing Python on the Xcode. Though they're bit outdated (mostly on 2016, 2017) but still the format was similar, so I decided to follow them step by step.First, open the Xcode and create the new Project. Add product name 'pythons', and fill other blank below. On Build Tool, I pasted/Library/Frameworks/Python.framework/Versions/3.8/bin/python3which is the address of Python3 I found by typing 'which python3' on Terminal. Than I pressed Next, and create project folder on Desktop, checked on options: 'Source Control: Create Git repository on my Mac'.Secondly, create the new file. I went to 'File-New-File' at the menu and found 'Empty' template at 'macOS-Other' category. Click Next, save asFile.py, checked on 'Group: pythons, Targets: pythons'. And created the file at the folder 'pythons'.Third, edit scheme on the created file. I brought scheme edit page by 'Product-Scheme-Edit Scheme'. At the Info tab, I changed 'Exexutable' on 'other' choosing python38, which I made it newly by opening the Terminal on the '~bin' folder which I mentioned on Build Tool, and typing on Terminalln python3.8 python38By the procedure, I could choose python38 instead of python3, which was non-selectable with gray shade on it. Than I un-checked the 'Debug executable'.Move to Arguments tab and click + of 'Arguments Passed On Launch'. Than I typed in $(SRCROOT)/File.pyMove to Options tab, there is Working Directory option, and I checked on 'Use custom working directory' to the project path on Desktop.Finally, close the scheme editing page and write 'print("Hello world")' on the canvas. Run it.And there are errors, which I couldn't solve out./Library/Frameworks/Python.framework/Versions/3.8/bin/python38: can't open file '$(SRCROOT)/File.py': [Errno 2] No such file or directoryProgram ended with exit code: 2How can I solve this errors and get back on working Python with Xcode?Many people on the net say that build python with other tools such as pycharm, IDLE or other stuff, I guess I should. But I really want to know at least what was worng with the steps I took and just wanna see 'Hello world' on the output.Please help me.. This problem keeps tangling like an fishbone on my neck every time. Welcomes precise feedbacks. Thanks.
Posted
by
Post not yet marked as solved
9 Replies
49k Views
I'm trying to install Xcode on High Sierra 10.13.6 and I'm having problems doing so. I'm getting error that I need to upgrade to 10.14 or higher but I don't want to upgrage my Mac OS. Is there and older version of Xcode that can be installed on my version of Mac (10.13.6)?
Posted
by
Post not yet marked as solved
3 Replies
1.4k Views
Hey there,I want a macOS app to use a login item. I found this here, but it's a quite old document, difficult to understand, and not executable because of some errors.So do you know a suitable way to implement a login item? Preferably it should be installed itself when the user install the application.Thanks a lot!
Posted
by
Post not yet marked as solved
2 Replies
2.8k Views
Strange issue, just updated my macbook to 10.15.4 and got the new Xcode 11.4 release. The actool errors on this hardware compiling texture sets as data with the macos target.Reproduction steps:New macOS projectAdd to asset catalogadd new texture set to catalogadd image to catalog (set type to data)CompileHardwareGraphics: Intel Iris Plus Graphics 645 (1536MB)Proc: 1.4 Ghz Quad Core i5Macbook pro (13in 2019 Two TB ports)RAM: 16GBcd /Users/apaxson/dev/projects/metal_by_tutorial/TestAssetCompiler /Applications/Xcode-beta.app/Contents/Developer/usr/bin/actool --output-format human-readable-text --notices --warnings --export-dependency-info /Users/apaxson/Library/Developer/Xcode/DerivedData/TestAssetCompiler-ebhvtxoncxawpvdhxnmbieogjjqd/Build/Intermediates.noindex/TestAssetCompiler.build/Debug/TestAssetCompiler.build/assetcatalog_dependencies --output-partial-info-plist /Users/apaxson/Library/Developer/Xcode/DerivedData/TestAssetCompiler-ebhvtxoncxawpvdhxnmbieogjjqd/Build/Intermediates.noindex/TestAssetCompiler.build/Debug/TestAssetCompiler.build/assetcatalog_generated_info.plist --app-icon AppIcon --enable-on-demand-resources NO --sticker-pack-identifier-prefix com.paxsonsa.TestAssetCompiler.sticker-pack. --development-region en --target-device mac --minimum-deployment-target 10.15 --platform macosx --product-type com.apple.product-type.application --compile /Users/apaxson/Library/Developer/Xcode/DerivedData/TestAssetCompiler-ebhvtxoncxawpvdhxnmbieogjjqd/Build/Products/Debug/TestAssetCompiler.app/Contents/Resources /Users/apaxson/dev/projects/metal_by_tutorial/TestAssetCompiler/TestAssetCompiler/Textures.xcassets /Users/apaxson/dev/projects/metal_by_tutorial/TestAssetCompiler/TestAssetCompiler/Preview\ Content/Preview\ Assets.xcassets /Users/apaxson/dev/projects/metal_by_tutorial/TestAssetCompiler/TestAssetCompiler/Assets.xcassets 2020-03-26 14:04:54.297 ibtoold[9514:367395] NSFileCoordinator is doing nothing. Assertion failed: (maxCountIncludingZeroTerminator > 0 && tokenCount < maxCountIncludingZeroTerminator), function CUIRenditionKeyCopy, file /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreUI/CoreUI-609.4/CoreTheme/ThemeStorage/CUIThemeRendition_Support.m, line 849. Command CompileAssetCatalog failed with a nonzero exit code
Posted
by
Post not yet marked as solved
6 Replies
16k Views
Hello, Just starting to learn Xcode and I can test the first chapter's app on my iPhone if it's conncted via USB-C. The book walks me through the part where I can allow Xcode to connect to the iPhone via WiFi, just checking "Connect via Network."Yet Xcode cannot find my phone unless it's connected via USB. When I go to Devices that checkbox stays checked, unless I unplug the phone it which case that box doesn't even appear.And yes, they are both on the same WiFi, it's the only one I have and it's up and running.Any thoughs?
Posted
by
Post not yet marked as solved
4 Replies
1.1k Views
I just downloaded Xcode 11.5 and it’s 8.1 GB for download and then expands even more after downloading utilities and simulators etc. On the other hand Android Studio, VS Code etc and evening IntelliJ are not even half the size yet so powerful. Why there is so much bloat, sounds like software debt that Apple needs to get rid off.
Posted
by
Post not yet marked as solved
22 Replies
11k Views
I'm trying out Xcode 12 (beta) and encountered an issue with TextField when viewing it in a live Preview. Although the view is interactive (scrolling vertically seems to be OK) and a cursor appears in the TextField view when it is clicked on, keyboard input is ignored. The same code works as expected in Xcode 11.5. Simulator in both 11.5 and 12 exhibits expected behaviour. Is this a bug? I know there is an issue with interactivity in Preview with multiple views inside PreviewProvider but I'd assumed this is if you'd added multiple Views to the same body of this struct.
Posted
by
Post not yet marked as solved
9 Replies
6.8k Views
I'm unable to run my app with ASAN enabled when targeting a physical iOS device. Simulator targets do work. With Xcode 12 and an iPad mini 4 running iOS 14 beta 1 I get the following error during app launch ==750==ERROR: AddressSanitizer failed to allocate 0xffffffffff9fc000 (-6307840) bytes at address 2db624000 (errno: 22) ==750==ReserveShadowMemoryRange failed while trying to map 0xffffffffff9fc000 bytes. Perhaps you're using ulimit -v With Xcode 11.5 and an iPad Air 2 running OS 12.4.1 the error is ==2177==Unable to find a memory range after restricting VM. ==2177==AddressSanitizer CHECK failed: /BuildRoot/Library/Caches/com.apple.xbs/Sources/clangcompilerrt/clang-1103.0.32.62/compiler-rt/lib/asan/asanmac.cc:92 "((0 && "cannot place shadow after restricting vm")) != (0)" (0x0, 0x0) <empty stack>==2177==AddressSanitizer CHECK failed: /BuildRoot/Library/Caches/com.apple.xbs/Sources/clangcompilerrt/clang-1103.0.32.62/compiler-rt/lib/asan/../sanitizercommon/sanitizermallocmac.inc:143 "((!asaninitisrunning)) != (0)" (0x0, 0x0) warning: could not execute support code to read Objective-C class data in the process. This may reduce the quality of type information available. AddressSanitizer report breakpoint hit. Use 'thread info -s' to get extended information about the report. (lldb) thread info -s thread #1: tid = 0x1076c2, 0x000000011531e984 libclangrt.asaniosdynamic.dylib`__asan::AsanDie() My coworker is able to use ASAN with the same App using iPad Pro 10.5, iPadOS 13.5.1, Xcode 11.5 Are there any configuration changes I need to make to be able to use ASAN on my devices?
Posted
by
Post marked as solved
30 Replies
17k Views
I keep getting a Xcode Previews error in Xcode 12 from a package that imports other packages. As soon as I remove the dependency I'm able to see the SwiftUI preview. I'm only able to use previews in packages that have no dependencies The error I get is: "LoadingError: failed to load library at path...Library not loaded " then it point to the dependency that it could not load in the current package. How can I access Xcode Previews from a package that depends on other packages?
Posted
by
Post not yet marked as solved
17 Replies
24k Views
I've got an iOS framework that I've had around for ages. It's a mixture of Objective-C and Swift. Since installing Xcode 12, I'm now getting a bunch of warnings of the type: 'Double-quoted include in framework header, expected angle-bracketed instead' If I go to the various source files and say change: #import "Place.h" to #import <VegasKit/Place.h> then I get an error saying it can't find the file. If I try this: #import <Place.h> then I get an error telling me to go back to double-quotes, i.e. undo the change. Any idea what I can do to get this all setup correctly? Thanks.
Posted
by
Post not yet marked as solved
11 Replies
53k Views
Hi, I was trying to build my app on Apple Silicon on a DTK, but it fails, because the RubyGems is having some issues. This is what happens when I run "pod install" in the terminal. Log - https://developer.apple.com/forums/content/attachment/9e19f030-fac9-42af-a88c-10b3e11aba56
Posted
by
Post not yet marked as solved
1 Replies
634 Views
I hope the pending antitrust suits force Apple to allow us to sign and provision our own apps for more than a week. For the price paid I should be able to write my own apps and use them without restriction outside of Apple services such as iCloud and so on. I understand distribution restrictions but please kill that 1 week annoyance, give me some level of freedom over my own apps on my own device. Or I hope it’s forced. Cheers and Thanks in advance.
Posted
by