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

Xcode Documentation

Post

Replies

Boosts

Views

Activity

Xcode source editor scrolling speed
Heylo all,I've noticed an "issue" of sorts with scrolling through code that's really throwing me off. I don't think it was doing this before, but maybe I just never noticed? I'm not sure.The scrolling speed with the trackpad changes depending on how much scrollable content there is. That is to say, if the window only shows say 40% of the total file, scrolling speed feels like it does everywhere else in the OS. When it covers 80% or 90%, it slows way down so the same amount of physical scrolling translates to moving up or down fewer lines at a time. This change even happens live: if I open a source file in a separate window and shrink the window size, scrolling speeds up; expand it to be the full height of the monitor and it slows down again. (It's literally a difference of 3 lines vs 15 lines)It doesn't do this with a regular mouse wheel; just touch surfaces. I tried restarting, different projects, new projects, playing with the system scroll speed settings in accessibility, turning inertia off...nothing changes it.Has anyone else actively noticed this? Is there a setting to change or a "fix" for it?
4
0
2.7k
Jun ’16
No suitable application records were found. Verify your bundle Identifier ' ' os correct.
So this is very frustrating. My bundle ID is the same in the itunes connect store as it is in xcode. However, when I try and validate my archive for submission I am left with this prompt. My only thought is I had someone code this for me and I added a splash screen as well as changing the app name. I thought I made all the right corrections. Any ideas guys?
17
0
47k
Feb ’17
Xcode 9 - Can't Update Help Book
I "upgraded" to XCode 9 today, hoping that it would support the new ISO Appendix K safe string functions (it doesn't). It has always been difficult to get XCode to update a Mac application's Help Book. In the past I have been able to do it by following these instructions:Delete any other versions of the app and empty the trash.Update the Help.plistCreate a new Help.helpindex file using the Help IndexerRemove the help folder from project.Delete the system’s cached help folder using the terminal command: rm -rf ~/Library/Caches/com.apple.help*Sometimes it helps to restart your machine nowSometimes it helps to execute the termanal command rm -rf ~/Library/Caches/com.apple.help* againClean and rebuild the project without the Help folderAdd the new Help folder, clean and rebuildCheck to be sure that the new help book is addedNow this doesn't work. When I run my project with the new Help Book the Help Book window says:The selected topic is currently unavailable.The topic you were trying to view could not be found.XCode logs:2017-09-20 13:45:49.466114-0600 app[2349:187674] Entering AHRegisterHelpBookWithURL2017-09-20 13:45:49.466228-0600 app[2349:187674] Entering AHRegisterHelpBookWithURL: 0Can anyone tell me how to get XCode 9 to do this?
22
0
5.7k
Sep ’17
How do you delete a Signing Certificate from Xcode?
I have found multiple forum postings where people have asked for how they can delete or remove a Signing Certificate. Unfortunately none of them are helpful. Some respond with non-helpful questions like "Why do you want to delete your Signing Certificate?" I'll tell you why I want to delete it. It's mine and I don't want it any more. I want it gone! Others have responded to similar questions by saying to just create a new Apple ID. I don't want to do that either. I like my world clean and orderly without junk laying around, so that answer is not acceptable either. I want clear instructions on how to delete or remove a Signing Certificate. Interestingly, the option to delete it is there but it's grayed out. Why have it there if you can't delete it? Can someone please help me with this?
4
1
25k
Jun ’18
Xcode 10.0 diagnosticd high CPU w/iPhone XR Simulator
Hi All,I've got the new 2018 MacBook Pro 15" (15,1) running High Sierra 10.13.6 and the Xcode 10.0 (10A255) release version and am having the following recurring issue.I've got an iOS project that I'm running in the simulator. In this case I'm actually running XCTests. The total tests run for about 4 seconds.At this point, Xcode looks like it's idle, but my fans spin up to full speed and Activity Monitor shows me: diagnosticd 170% cpu diagnosticd 82% cpu notifyd 78% cpu SpringBoard 78% cpuSometimes it shows diagnosticd higher like 350% CPU, but always diagnosticd is the highest.The computer doesn't seem to be doing anything. Both Xcode and Simulator are responsive.If I close the simulator, these disappear and the fans spin back down.This happens 100% of the time with the iPhone XR simulator, but doesn't seem to happen at all with any of the others, including the XS and XS Max.Anyone else seeing this?
5
0
5.4k
Sep ’18
Can't type in input in Xcode 10.1 using C++
I'm new to Xcode and programming in general, and I'm having an issue with Xcode. After I made my code and built it successfully the first time, I can type in input in the bottom console no problem. But then I made a few tweaks and went ahead to build it again. It did successfully build but this time I can't type in anything in the bottom console. So I have to close Xcode and reopen it again everytime I want to make any tweaks and it's getting annoying. Would love to know how to fix this. Thank you in advance.
10
1
5.3k
Nov ’18
How do I downgrade the simulator in Xcode?
My app is working as expected in the simulator on iOS 12.1, but not on my iOS 11.x device, and it is just a layout issue. I'm not aware of any major changes in layout constraints from 11 to 12, so I'm perplexed... I upgraded an older device from iOS 10 to 12 and my app layout works on it, so it seems something changed between iOS 11 and 12 regarding layout, but I don't know what that is...How can I get a simulator running iOS 11.x to debug? I'll start debugging on my actual 11.x device, but I would also like to know how to get a simulator running older iOS versions? xcodebuild -showsdks says I only have 12.1 iphone/simulator 12.1 -- how do I run 11.x in the simulator, or older iOS versions in general in the simulator?
11
2
41k
Nov ’18
unable to boot the simulator launchd failed to respond
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?
21
3
52k
Oct ’19
Xcode 11 install to device fails, code -402620415
After the upgrade to Xcode 11, an existing app that once was debuggable on device can no longer be installed and debugged on device. It is failing with an unknown error. Same failure occurs on Xcode 11.2.1 and Xcode 11.3 beta. App debugging on SImulator works fine.This is not reporting a codesign or provisioning failure (I've seen those in the past). I'm hoping someone can help narrow down the culprits.DetailsUnable to install "NameOfMyApp"Domain: com.apple.dtdevicekitCode: -402620415--App installation failedDomain: com.apple.dtdevicekitCode: -402620415Failure Reason: An unknown error has occurred.User Info: { DVTRadarComponentKey = 487927; "com.apple.dtdevicekit.stacktrace" = ( 0 DTDeviceKitBase 0x000000012692a6e7 DTDKCreateNSError + 109 1 DTDeviceKitBase 0x000000012692ade9 DTDK_AMDErrorToNSError + 792 2 DTDeviceKitBase 0x000000012696a56a __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 164 3 DVTFoundation 0x000000010b4ea156 DVTInvokeWithStrongOwnership + 73 4 DTDeviceKitBase 0x000000012696a301 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1589 5 IDEiOSSupportCore 0x00000001267f2a25 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352 + 4523 6 DVTFoundation 0x000000010b61b3ba __DVT_CALLING_CLIENT_BLOCK__ + 7 7 DVTFoundation 0x000000010b61ca92 __DVTDispatchAsync_block_invoke + 809 8 libdispatch.dylib 0x00007fff590635f8 _dispatch_call_block_and_release + 12 9 libdispatch.dylib 0x00007fff5906463d _dispatch_client_callout + 8 10 libdispatch.dylib 0x00007fff5906a8e0 _dispatch_lane_serial_drain + 602 11 libdispatch.dylib 0x00007fff5906b396 _dispatch_lane_invoke + 385 12 libdispatch.dylib 0x00007fff590736ed _dispatch_workloop_worker_thread + 598 13 libsystem_pthread.dylib 0x00007fff592a4611 _pthread_wqthread + 421 14 libsystem_pthread.dylib 0x00007fff592a43fd start_wqthread + 13);}--
29
1
34k
Nov ’19
mac-to-mac remote debugging
There have been occasional questions about remote debugging. Unfortunately I see a couple of them which were reasonable basic questions got no answer at all. I will try this again. A couple questions had some mention of lldb server. In some cases clearly the people asking the questions already knew a bit about remote debugging. Yet I can find no documentation about it.Does XCode or other tools that will work with XCode support debugging over the internet? If so what are the reqirements re XCode version and macOS version, whether the client and server can have unmatched versions, etc.?My immediate need (without extra steps) is to debug a process running on Sierra (no XCode installed yet) from a development system running XCode 7.3.1 under El Capitan.The need for remote debugging is to be able to diagnose crashes that don't happen on my development systems. There have also been questions concerning crash logs, but crash logs are of limited use unless the crash can be opened into a debugger with full ability to examine the stack and local variables.Thanks in advance!
4
1
4.1k
Mar ’20
Previews doesn't work in package target's subdirectory
I'm trying to preview a view from a swift package which is located in one of the target's directory subdirectories: . ├── Package.swift ├── README.md └── Sources 		└── SatelitUI 				└── Views 						└── MenuBar.swift When I'm previewing a view from the MenuBar.swift file I'm getting following error: NoBuildableEntriesError: active scheme does not build this file Select a scheme that builds a target which contains the current file, or add this file to a target that is built by the current scheme. Which is unexpected because the file should be a part of the SatelitUI target. The thing is it works just fine if I move it into the root target's directory (SatelitUI).
9
0
3.9k
Jun ’20
Errors running with ASAN when targeting iOS Devices
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?
11
1
7.7k
Jun ’20
Unable to import local XCFramework module
Our project is split up into multiple Pods with CocoaPods and I'm currently trying to convert all of our podspecs to SPM. One of our projects has XCFramework dependencies that I'm trying to include from a local source, but my project files are complaining that the modules couldn't be found when I try to import them. Is there something I'm missing here? My Package.swift file looks something like this: // swift-tools-version:5.3 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package(     name: "MyPackage",     defaultLocalization: "en_us",     platforms: [         .iOS(.v12),         .watchOS(.v6),         .macOS(.v10_15)     ],     products: [         .library(             name: "MyPackage",             targets: [                 "MyPackage"             ]),     ],     dependencies: [     ],     targets: [         .target(             name: "MyPackage",             dependencies: [                 .byName(name: "LocalXCFramework")             ],             path: "Sources/"         ),                  .binaryTarget(             name: "LocalXCFramework",             path: "Frameworks/LocalXCFramework.xcframework"         )              ] ) In this example, if I try to import the modules from LocalXCFramework, I get an error saying it couldn't be found.
10
0
7.3k
Jun ’20
Local xcFrameworks in Swift Packages
In the talk, it was explained how to use a binaryTarget to add a .xcframework from a url, but what about a local path? Take the following Package and file structure, is this the correct way to structure and refer to the .xcFramework? | SamplePackage | - | Package.swift | - | README.swift | - | Sources | - | - | Sample | - | - | - | file.swift | - | - | SampleFramework | - | - | - | framework.xcframework | - | - | Tests | - | - | - | LinuxMain.swift | - | - | - | SampleTexts | - | - | - | - | sampleTests.swift // swift-tools-version:5.3 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package(     name: "Sample",     platforms: [         .iOS(.v13),         .macOS(.v10_12)     ],     products: [         // Products define the executables and libraries produced by a package, and make them visible to other packages.         .library(             name: "Sample",             targets: ["Sample", "SampleFramework"]),     ],     targets: [         // Targets are the basic building blocks of a package. A target can define a module or a test suite.         // Targets can depend on other targets in this package, and on products in packages which this package depends on.         .target( name: "Sample"),         .testTarget(             name: "SampleTests",             dependencies: ["Sample"]),         .binaryTarget(             name: "SampleFramework",             path: "framework.xcframework")     ] ) I am getting the following error(s): invalid custom path 'framework.xcframework' for target 'SampleFramework' target path '/framework.xcframework' is not supported; it should be relative to package root
4
0
8k
Jun ’20
An unknown error occurred. username does not match previous request (-1)
Hey people, I'm using (or rather trying to use) Swift Packages for my project. This is not about the countless other bumps I found along the road. (Xcode/SPM is still very beta with Xcode 12.0.1 but I'll reserve complaining about for another day). But one I did not even something vaguely useful when googling it. So I started out using file paths for my dependencies, like: .package(name: "BlaBla", path: "/Users/me/GitDev/BlaBla") for some reason that does not work when you want to chain dependencies (Another bug to fix, Apple!). So I wanted to change to versions using a git repo. I gave my repo a tag and put in: .package(url: "ssh://me@server.local/usr/home/me/GitDev/BlaBla", from: "0.0.1"), On the command line SPM has no problem resolving this:  % swift package resolve Fetching ssh://me@… Cloning ssh://me@… Resolving ssh://me@… at 0.0.1 In Xcode though, I get the line from the title: An unknown error occurred. username does not match previous request (-1) (by the way I have copied this by hand as the message could not even be copy & pasted) Any ideas how to solve this? Or even debug this any further? best Roddi
7
0
5.9k
Oct ’20