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

Xcode Documentation

Post

Replies

Boosts

Views

Activity

Xcode randomly modifies my scheme content
I'm struggling with maintaining source-controlled collaboration when Xcode just cannot make up its mind about how to generate the schemes. I don't edit the scheme and I get these sort of changes in git. from: <BuildableProductRunnable &#9;&#9;&#9;&#9; runnableDebuggingMode = "0"> to: <RemoteRunnable &#9;&#9;&#9;&#9; runnableDebuggingMode = "2" &#9;&#9;&#9;&#9; BundleIdentifier = "com.apple.Carousel" &#9;&#9;&#9;&#9; RemotePath = "/$(PRODUCT_NAME)"> It's pretty incomprehensible to me, but has anyone run into similar?
18
2
11k
Oct ’20
iOS simulator scrolling on Apple Silicon
Hi I have an larger app with scrollable elements (table views, textviews, collection views, map .. ). I purchased a Mac mini with M1 processor, and with the latest Xcode, I can't swipe with the simulator. It lags, so I can drag with the Magic Mouse, but the swipe gesture is not recognised properly. For the system apps (settings for example) it works. For any simple app, it does not. Has anyone faced this issue?
20
9
20k
Dec ’20
xcrun: error: invalid active developer path
I have this problem: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun "make all" terminated with exit code 1. Build might be incomplete. Could someone help me? Two days ago I installed the last software update to MacOS: 12.2.1 but I haven't installed the command line for Xcode cause I'm not using Xcode for programming. Could this be the problem? Thanks for the support.
11
4
30k
Feb ’21
macOS app icon not updating. Cached?
Hi, If I change the AppIcon in Xcode's Assets.xcassets, and rerun my app, the image used in the dock and app switcher does not update. If I "Clean Build Folder", and re-run, then it updates. This is annoying when I keep tweaking the colors in the icon and want to see how they look. A full rebuild takes a while, because I have a few Swift Package dependencies. Anyone know a trick to get the AppIcon to stop caching (or whatever it's doing)? I tried killall Dock and killall Finder, but that didn't help. (macOS 11.2.3) Rob
4
0
3.5k
Mar ’21
Xcode 12.5 Multiple commands produce framework and ProcessXCFramework
Hi, I'm from the App Center SDKs team. After updating Xcode from 12.4 to 12.5 our team faced build issues similar to this: Multiple commands produce '/Users/user/Library/Developer/Xcode/DerivedData/AppCenter/Build/Products/Debug-iphonesimulator/AppCenter.framework': 1) Command: ProcessXCFramework /Users/user/appcenter-sdk-apple/AppCenter-SDK-Apple/XCFramework/AppCenter.xcframework /Users/user/Library/Developer/Xcode/DerivedData/AppCenter/Build/Products/Debug-iphonesimulator/AppCenter.framework ios simulator 2) Target 'AppCenter iOS Framework' has create directory command with output '/Users/user/Library/Developer/Xcode/DerivedData/AppCenter/Build/Products/Debug-iphonesimulator/AppCenter.framework' Repro steps: Build AppCenter iOS Framework target. Build AppCenter target which creates an xcframework for iOS, macOS, and tvOS platforms. Build AppCenter iOS Framework and/or AppCenter Analytics iOS Framework target. Build SasquatchPuppet target (it uses AppCenter iOS Framework and AppCenter Analytics Framework targets). After the issue happened only Product > Clean build folder can help. We've tried to automate cleaning the build artifacts (BUILD_DIR) etc, but it doesn't help. Also, we've tried to use separate Product Names for XCFramework and mere Frameworks, but it was not possible for us in the end because of the xcconfig variables visibility. Similar issue: https://developer.apple.com/forums/thread/679542
3
1
48k
Jun ’21
Xcode 13.0 can't pair to Apple TV 4K (tvOS 15.0)
On Xcode 13.0, I can no longer pair with an Apple TV 4K (tvOS 15.0). Until now it has always worked but since the new update to tvOS 15.0 and Xcode 13.0 I can no longer connect. I have gone through the following steps to connect: Open remote app and devices settings on Apple TV 4K (tvOS 15.0). Open Devices and Simulators in Xcode 13.0. Select Apple TV in the list and press "Pair". Code appears on the Apple TV and I can enter it in an Xcode window. After the code input, there is a short loading sign that a connection is being established. After a few seconds, the whole thing stops without an error message and the "Pair" button is visible again. Does anyone have the same problem? I would like to optimize my apps for tvOS 15 and test them on a physical device.
24
1
22k
Jun ’21
Unable to add Swift Package dependency URL in Xcode 13.0 beta
I'm working on a simple iOS app and am trying to add a Swift Package dependency to my project (in my case, Alamofire) and I'm getting an error when I paste their GitHub URL into the box asking for it. It reads The operation couldn't be completed. (PackageCollections.JSONPackageCollectionsProviderError error 3.). I also tried to see if the error was because Alamofire isn't updated for Xcode 13, but a package generated locally for development and pushed to GitHub also has the same error (That url is: here on Github). Any help would be great!
4
2
12k
Jun ’21
Xcode 13 beta | Failed to build module 'Network' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug
I have a project which has iOS 10.0 deployment target in which I import Network framework in some class and conditionally using it depending on the host app’s iOS version.   With Xcode 13 beta 4(13A5201i), I am able to compile and run the project successfully while debugging on iPhone device but it gives below error. This was working fine with Xcode 12.5.1 /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk/usr/lib/swift/Network.swiftmodule/armv7-apple-ios.swiftinterface:1254:19: 'NWConnection' is only available in iOS 12.0 or newer /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk/usr/lib/swift/Network.swiftmodule/armv7-apple-ios.swiftinterface:1254:1: Add @available attribute to enclosing extension /Application/NWBrowserManager.swift:10:8: Failed to build module 'Network' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug
12
0
11k
Aug ’21
Xcode 13 "Missing package product" using local Swift Packages
I have a project I've been working off of for a few years now that makes use of local Swift Packages. In my workspace, I have a "Kit" project that generates a framework using several local Swift Packages as dependencies. In Xcode 12, the local Swift packages resolve correctly and compiles, but each beta of Xcode 13 gives me the error: "[ProjectName].xcodeproj Missing package product '[LocalSwiftPackage]'" Clearing the package cache, derived data, or restarting the application does not resolve the issue. Only Swift Packages that are remotely loaded from a URL are compiled correctly. Using local packages to separate module code, while still being able to edit in the same project, has been essential to my workflow and would hate to see Xcode 13 release with these breaking changes, and I have not seen this issue listed in the known issues for the Xcode 13 release notes. Has anyone else experienced this issue or found a workaround?
18
13
69k
Aug ’21
Posting a Crash Report
If you need help investigating a crash, please include a crash report in your post. To smooth things along, follow these guidelines: For information on how to get a crash report, see Acquiring crash reports and diagnostic logs. Include the whole crash report as a text attachment (click the paperclip icon and then choose Add File). This avoids clogging up the timeline while also preserving the wealth of information in the crash report. If you’re not able to post your crash report as an attachment, see Can’t Post Crash Report as Attachment below. If you want to highlight a section of the report, include it in the main body of your post. Put the snippet in a code block so that it renders nicely. To create a code block, add a delimiter line containing triple backquotes before and after the block, or just click the Code Block button. If possible, post an Apple crash report. Third-party crash reporters are often missing critical information and have general reliability problems (for an explanation as to why, see Implementing Your Own Crash Reporter). Symbolicate your crash report before posting it. For information on how to do this, see Adding identifiable symbol names to a crash report. If you need to redact the crash report, do so consistently. Imagine you’re building the WaffleVarnish app whose bundle ID is com.example.wafflevarnish but you want to keep your new waffle varnishing technology secret. Replace WaffleVarnish with WwwwwwVvvvvvv and com.example.wafflevarnish with com.eeeeeee.wwwwwwvvvvvvv. This keeps the text in the crash report aligned while making it possible to distinguish the human-readible name of the app (WaffleVarnish) from the bundle ID (com.example.wafflevarnish). Finally, for information on how to use a crash report to debug your own problems, see Diagnosing issues using crash reports and device logs. Can’t Post Crash Report as Attachment Crash reports have two common extensions: .crash and .ips. DevForums lets you attach the first but not the second (r. 117468172). To work around this, change the extension to .txt. If DevForums complains that your crash report “contains sensitive language”, leave it out of your initial post and attach it to a reply. That often avoids this roadblock. If you still can’t post your crash report, upload it to a file sharing service and include the URL in your post. Post the URL in the clear, per tip 14 in Quinn’s Top Ten DevForums Tips. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" Revision History: 2024-05-21 Added some advice regarding the “contains sensitive language” message. 2023-10-25 Added the Can’t Post Crash Report as Attachment section. Made other minor editorial changes. 2021-08-26 First posted.
0
0
6.5k
Aug ’21
Why isn't an XCFramework's Info.plist "stable"?
(By "stable," I don't mean in a crashing or breaking sense; I mean it in the sense of a stable sorting algorithm, where duplicate elements will be kept in the same order in which they appeared in the unsorted collection.) I have a script that builds an XCFramework for iOS & tvOS, on simulator & device. It never changes the order in which the -framework arguments are passed to xcodebuild -create-xcframework. If I regenerate the XCFramework without any code or config changes, however, the order of entries in Info.plist always changes. Sample git diff: <string>x86_64</string> </array> <key>SupportedPlatform</key> - <string>tvos</string> + <string>ios</string> <key>SupportedPlatformVariant</key> <string>simulator</string> </dict> <dict> <key>LibraryIdentifier</key> - <string>ios-x86_64-simulator</string> + <string>ios-arm64</string> <key>LibraryPath</key> <string>Foo.framework</string> <key>SupportedArchitectures</key> <array> - <string>x86_64</string> + <string>arm64</string> </array> <key>SupportedPlatform</key> <string>ios</string> - <key>SupportedPlatformVariant</key> - <string>simulator</string> </dict> <dict> <key>LibraryIdentifier</key> - <string>ios-arm64</string> + <string>tvos-x86_64-simulator</string> <key>LibraryPath</key> <string>Foo.framework</string> <key>SupportedArchitectures</key> <array> - <string>arm64</string> + <string>x86_64</string> </array> <key>SupportedPlatform</key> - <string>ios</string> + <string>tvos</string> + <key>SupportedPlatformVariant</key> + <string>simulator</string> </dict> </array> <key>CFBundlePackageType</key> It doesn't affect the runtime in any way, as far as I know, but it's a minor irritation that I have to commit the changes to source control every time. Is there a way for xcodebuild -create-xcframework to either honor the order in which I passed the -framework arguments in, or at least keep the Info.plist file "stable" between script invocations? (This behavior is the same on Xcode 12.x & the XCode 13 beta versions.)
1
1
1.6k
Sep ’21
Color literal not displaying as Color Swatch?
Hi, should color literals work inside Views, I am sure this used to work? Xcode Version 13.0 (13A233) Note, myColor works, but the same literal in the fill does not. let myColor = Color(#colorLiteral(red: 0.292, green: 0.081, blue: 0.6, alpha: 255)) struct TestView: View {   var body: some View {     RoundedRectangle(cornerRadius: 25)       .fill(Color(#colorLiteral(red: 0.292, green: 0.081, blue: 0.6, alpha: 255)))       .frame(width: 100, height: 100)           } }
15
5
16k
Sep ’21
Xcode 13 app archiving is modifying framework plist
When archiving & exporting App with Xcode 13. The Frameworks of the created app will have their Info.plist modified. CFBundleShortVersionString is being changed to have the same value as the application version. Steps to reproduce: Create iOS App project with v1.0.0 Add dynamic framework dependencies. ex: Framework A v3.0.0, Framework B v12.0.0. Archive Project. Distribute app AppStore Connect Export Finish the rest of the process with default values. Investigate generated IPA file Investigate .app file inside IPA Investigate frameworks inside .app file. CFBundleShortVersionString of all the frameworks is 1.0.0
12
3
19k
Sep ’21
Xcode 13 / iOS 15 takes longer than expected to launch app
I am using Xcode 13 on a Macbook Pro (Intel/2019) with macOS Big Sur 11.6 I am building and launching the app on a connecting iPhone X running iOS 15.0, I am also running a UI test suite based on XCUITest while I do that. The app takes extremely long to launch (2+ minutes), then it sits on the splash screen for another 2-3 minutes. Meanwhile, Xcode shows the alert attached: I have 2 questions: Is this a widespread Xcode 13 / iOS 15 issue? Can someone please explain what the message in the alert means "LLDB is likely reading from device memory to resolve symbols"? Is there anything I can do to reduce or avoid this wait?
9
1
7.4k
Sep ’21
NSLocationTemporaryUsageDescriptionDictionary crashes Xcode 13
I just submitted a feedback for this (FB9662125) but in the spirit of “share and enjoy”… The cool new Generate Info.plist File feature in Xcode 13 crashes if you try to put an NSLocationTemporaryUsageDescriptionDictionary in your Info.plist file. Here’s a simple repro scenario: Create a minimal iOS app (no Core Data, no tests) Go to target settings → Info tab → Custom iOS Target Properties Click the (+) button on any row to begin inserting a new row Select Privacy - Location Temporary Usage Description Dictionary Click somewhere else or press Return to commit the selection Xcode crashes immediately More generally, it seems that Xcode crashes any time it tries to regenerate your Info.plist file if it contains an NSLocationTemporaryUsageDescriptionDictionary, even if (for example) you manually pasted that dictionary into the file earlier. In that case, merely tapping the (+) button in step 3 above is enough to crash it.
14
3
3.5k
Sep ’21
Open app review crashlog .txt file in Xcode 13
Got emailed three .txt crash files. Cannot for the life of me figure out how to get Xcode to do something with them. Tried: renaming .txt to .crash Dropping onto "devices and simulators" window Dropping on to "devices and simulators > select device > View device logs" "Download debug symbols" for the archive in Xcode (says "dowloaded debug symbols" so did it) ... and many other things Xcode 13 simply refuses to respond to the drag-and-drop of the file no matter the file extension and no matter where in Xcode's various windows/tools I drop it. Has anyone done this with a crash .txt file from app review and Xcode 13?
10
1
7.5k
Oct ’21