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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

Xcode messes up the MacBook Screen Size
Hi everyone, I’ve been experiencing a persistent issue with my MacBook Pro (M2 Pro, macOS 15.2) when using Xcode (version 16.2). If Xcode is open and my Mac goes into sleep mode, the screen size changes upon waking. Specifically, I notice 3mm bezels appear on each side of the screen, making the display slightly smaller, and everything scales down to fit this reduced size. This issue happens multiple times a day and has been ongoing for over a year. It’s quite disruptive to my workflow. Here is a video to illustrate the problem: Has anyone encountered this before? If so, do you have any suggestions for fixing it or steps I can take to debug the issue? Thanks in advance for your help and support!
0
0
167
Jan ’25
Slow bundle copy build phase from dependency
We have a dependency, Apollo iOS, that is managed by SwiftPM in an internal module Swift Package. That internal Swift Package is then linked and included in our iOS target. The iOS target has an associated WidgetKit extension app. When archiving the app, we're seeing extremely long "Copy Apollo_Apollo.bundle" build steps, on the magnitude of 15 minutes. This is only happening when copying the bundle for the Widget extension app. Builds are done with Xcode 15.2, but we've tried on 15.4 and 16.2, seeing a few minutes shaved off. How can we begin to debug this issue?
0
0
268
Dec ’24
Xcode 16 „forgetting“ package in subfolder to root package
Xcode 16 seems to „forget“ a swift package within a subfolder of a root package after restart or shut-down. I have the following project structure, which also resembles the directory structure on disc: MyPackage - Package.swift - README.md - Sources - MyPackage - Tests - MyPackageTests - Tools - MyGenerator // <- after restart this folder is not visible in the Xcode project navigator - Package.swift - Sources - main.swift - Tests MyGenerator is a standalone package which is used during development of MyPackage to generate source code files for MyPackage based on text file input. Essentially an executable target script which I can run within its folder with: swift run MyGenerator someInputFile.txt MyPackage does NOT use MyGenerator as a dependency, nor do I want this tool listed as a dependency in MyPackage Package.swift file. Yet MyGenerator is part of the same Git repo, as it documents the changes to the tool on how to generate source code for MyPackage. Both packages are developed in tandem. MyGenerator itself defines dependencies in its Package.swift file, which are unrelated to the functionality of MyPackage. After restart of Xcode or even just a longer shut-down period the MyGenerator subfolder is not visible in the Xcode project navigator, the /Tools folder is empty. I have to manually add the sub package via Add files to "MyPackage" -> Move files to destination every time. How can I solve that Xcode remembers the sub package unter /Tools? Edit: I am using Xcode 16.2
0
0
238
Mar ’25
Which extension use
Hi, I want to block incoming calls using my backend server, like the unwantend sms using message filter extension. I saw that Call Directory Extension can block numbers, but you need update the list, is not in real time. I was reading the Live Caller ID Look up extension documentation, and it seems that with this extension is possible send the number to backend and retrieve a value to know if the call should be block or not. Am I right? Or is not possible this feature with this extension? Thanks!
0
1
278
Mar ’25
My app stops at 90% on testfight and doesn't download
I am creating an imessage sticker pack and I am having an issue with an update of my app. It publishes to test flight but I can't download it to test. My app has an extension of imessage. I have tried: Checking the size of the animated stickers. All are below 500kb My version number is 4.1.1. so no 0 I am really no sure what to do. Any suggestions would be appreciated.
0
0
212
Jan ’25
Xcode completion binding not working in 16.2
I'm wondering why 'Select Previous Completion' and 'Select Next Completion' aren't working. I'm using Ctrl-K and Ctrl-J but only my arrow keys work to navigation the completion list. 'Show Completion List' works just fine with Ctrl-Esc. There are no conflicts with any Xcode bindings, and I've checked my system settings for keyboard shortcuts as well.. I've completely disabled copilot, etc.. Is there another setting I'm missing? Or, is this a known issue?
0
0
31
Apr ’25
Assistance Required for Accessing Non-Secure HTTP API in Ionic Build App
Dear Team, I was previously able to access a non-secure HTTP API in my Ionic-built app. However, I am now encountering an error where the API requests are being rejected. Interestingly, this API works perfectly on Android and web platforms without any issues. As part of my troubleshooting, I have already added the following lines to my Info.plist file: <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict> Could you kindly suggest any alternative solutions or additional settings required to access this HTTP API? Your help would be greatly appreciated. Thank you, Mozib
0
0
164
Jan ’25
Xcode 16.2: build fails with errors from another project
When I thought Xcode could not get any worse, here's the most absurd thing I have ever seen developing software in almost 20 years of work. When building a project, which I haven't touched lately, and last time it was building just fine, it raised errors on a class that doesn't even belong in any way to such project, it only exists in another one. To clarify, we're talking of a project written in C++ which runs only on mac, which is failing due to linker errors, where the linker can not find symbols of a class living in a different project and that is not referenced in any way inside this project. I mean, really? how does Apple manage to make Xcode more and more unstable by the minute? Starting from Xcode 15.1 I was already experiencing much longer building times, due to the fact that it doesn't manage the cache properly and is rebuilding lots of stuff every time..
0
0
39
Apr ’25
"No such module" error when trying to create module
Am running Xcode 16.1 on Sequoia and am getting "No such module" error. Here are my steps: Create workspace in Xcode and name it AccessControl2 Create Project named OrangeInc and add it to AccessControl2 group. Create blank playground named AccessControl and add it to AccessControl2 group Error message in playground after I add "import OrangeInc" reads "No such module" Have tried repeating this several times; get same error message.
0
0
300
Dec ’24
Any way to automate adding libraries in Xcode from Swift Package Manager (SPM)?
Hi all, I’m looking for a way to automate the process of adding Swift Package dependencies (SPM) into an Xcode project. Right now, I’m doing this manually via: Xcode → Project → Swift Packages → Add Package Dependency... But I’d like to script this step — ideally as part of a CI/CD pipeline or a setup script. I explored the xcodeproj Ruby gem, but it doesn’t support adding SPM packages, and there's no official support for editing the .xcodeproj structure related to Swift Packages. So my question is: Is there any Apple-supported or community-supported way to programmatically add Swift Package dependencies to an Xcode project or workspace? Would love to know if anyone has: Used xcodebuild, xcodegen, or other tools for this Explored editing project files directly (like project.pbxproj or Package.resolved) Found any API or CLI hooks from Apple for this Thanks in advance!
0
0
34
Apr ’25
new rsync version not working as expected
after upgrade macos version to 15.4 the rsync start failing that cause the xcodebuild fail and not generate ipa rsync: on remote machine: --extended-attributes: unknown option rsync error: syntax or usage error (code 1) at main.c(1802) [server=3.4.1] rsync(73444): error: unexpected end of file rsync(73444): error: io_read_nonblocking rsync(73444): error: io_read_buf rsync(73444): error: io_read_int rsync(73444): warning: child 73445 exited with status 1
0
0
209
Apr ’25
Why can't Xcode find symbols in scope, but still compiles?
My swiftUI project has started to constantly display "Cannot find 'symbol' in scope" errors in code i haven't touched, and the project still compiles fine. Neither cleaning build folder or compiling fix the errors, but if I right click the symbol, select "jump to definition" it will find it without problem and then when I return to the original file the error will be cleared. What can I do to stop these from happening?
0
1
179
Feb ’25
Can't transfer CSV file to iPhone simulator
I'm trying to transfer a CSV file to my iPhone 16 simulator to use for testing my application, but it keeps failing. See the image below. That occurs when I try to drag the file into the simulator. I also tried to use the Share option for the file, but nothing happens with that. It doesn't transfer but it also doesn't fail. I'm assuming it's failing in the background. Anyone know what I can do?
0
0
288
Dec ’24
Need Help Updating a Custom WireGuard SPM for Xcode 16 & Swift 6
Hey iOS Dev's, I’m currently working on a Swift Package Manager (SPM) for WireGuard, originally developed by a previous team member. It was working fine in Xcode 15.2, but after upgrading to Xcode 16 and Swift 6, I need to update the SPM to ensure compatibility with my base projects and other projects relying on it. With Apple making Xcode 16 mandatory for app submissions starting April 24, this has become an urgent issue. I’ve searched extensively but haven’t found a working solution yet. Has anyone faced similar challenges with Swift 6 migration and SPM updates? Any insights, best practices, or debugging tips would be greatly appreciated! Let’s connect and collaborate—I’d love to discuss possible solutions! 😊 #iOSDevelopment #Swift6 #Xcode16 #SPM #WireGuard #iOS #Swift #SoftwareEngineering #AppStore
0
0
89
Apr ’25
iOS xcode app, During "Distribute app" get error The archive contains nothing that can be signed
I had successfully distributed my app months ago and trying same today and get "The archive contains nothing that can be signed. Verify that your build process has compiled binaries and copied in bundled resources." message when I click the "Distribute app" button. My project is a simple iOS xcode project that I had success in same operation back on Feb 8, 2024, same project code and settings. Verbose log: 2025-01-22 00:49:43 +0000 [MT] Rejected distribution method <IDEDistributionMethodWatchOSAdHoc: 0x600004700d70> because it doesn't support distributing archive 2025-01-22 00:49:43 +0000 [MT] Rejected distribution method <IDEDistributionMethodWatchOSEnterprise: 0x600004700c30> because it doesn't support distributing archive 2025-01-22 00:49:43 +0000 [MT] Rejected distribution method <IDEDistributionMethodTVOSEnterprise: 0x600004700c90> because it doesn't support distributing archive 2025-01-22 00:49:43 +0000 [MT] Accepted distribution method <IDEDistributionMethodiOSEnterprise: 0x600004700c70> 2025-01-22 00:49:43 +0000 [MT] Accepted distribution method <IDEDistributionMethodDevelopmentSigned: 0x600004700c80> 2025-01-22 00:49:43 +0000 [MT] Rejected distribution method <IDEDistributionMethodTVOSDevelopmentSigned: 0x600004700d30> because it doesn't support distributing archive 2025-01-22 00:49:43 +0000 [MT] Rejected distribution method <IDEDistributionMethodWatchOSDevelopmentSigned: 0x600004700d90> because it doesn't support distributing archive 2025-01-22 00:49:43 +0000 [MT] Rejected distribution method <IDEDistributionMethodDeveloperIDNotarizedApp: 0x600004700d40> because it doesn't support distributing archive 2025-01-22 00:49:43 +0000 [MT] Rejected distribution method <IDEDistributionMethodDeveloperID: 0x600004700cf0> because it doesn't support distributing archive 2025-01-22 00:49:43 +0000 [MT] Rejected distribution method <IDEDistributionMethodSaveBuiltProducts: 0x600004700ca0> because it doesn't support distributing archive 2025-01-22 00:49:43 +0000 [MT] Rejected distribution method <IDEDistributionMethodDevelopmentSignedMac: 0x600004700d60> because it doesn't support distributing archive 2025-01-22 00:49:43 +0000 [MT] Rejected distribution method <IDEDistributionMethodExportArchive: 0x600004700c60> because it doesn't support distributing archive 2025-01-22 00:49:43 +0000 [MT] Rejected distribution method <IDEDistributionMethodMacApplication: 0x600004700d80> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodTVOSAppStoreDistribution: 0x600004700cd0> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Accepted distribution method <IDEDistributionMethodiOSAppStoreDistribution: 0x600004700d10> 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodiOSAppStoreValidation: 0x600004700d20> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodTVOSAppStoreValidation: 0x600004700cc0> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodMacAppStoreDistribution: 0x600004700c40> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodMacAppStoreValidation: 0x600004700c50> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodInAppPurchaseContentPackage: 0x600004700d50> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodMacAdHoc: 0x600004700d00> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Accepted distribution method <IDEDistributionMethodiOSAdHoc: 0x600004700cb0> 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodTVOSAdHoc: 0x600004700ce0> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodWatchOSAdHoc: 0x600004700d70> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodWatchOSEnterprise: 0x600004700c30> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodTVOSEnterprise: 0x600004700c90> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Accepted distribution method <IDEDistributionMethodiOSEnterprise: 0x600004700c70> 2025-01-22 00:49:45 +0000 Accepted distribution method <IDEDistributionMethodDevelopmentSigned: 0x600004700c80> 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodTVOSDevelopmentSigned: 0x600004700d30> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodWatchOSDevelopmentSigned: 0x600004700d90> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodDeveloperIDNotarizedApp: 0x600004700d40> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodDeveloperID: 0x600004700cf0> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodSaveBuiltProducts: 0x600004700ca0> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodDevelopmentSignedMac: 0x600004700d60> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodExportArchive: 0x600004700c60> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodMacApplication: 0x600004700d80> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Available distribution methods: {( <IDEDistributionMethodiOSAppStoreDistribution: 0x600004700d10>, <IDEDistributionMethodiOSAdHoc: 0x600004700cb0>, <IDEDistributionMethodiOSEnterprise: 0x600004700c70>, <IDEDistributionMethodDevelopmentSigned: 0x600004700c80> )} 2025-01-22 00:49:45 +0000 Step failed: <IDEDistributionAnalyzeArchiveStep: 0x6000084ddd40>: Error Domain=IDEDistributionErrorDomain Code=5 "The archive contains nothing that can be signed." UserInfo={NSLocalizedDescription=The archive contains nothing that can be signed., NSLocalizedRecoverySuggestion=Verify that your build process has compiled binaries and copied in bundled resources.}
0
0
285
Jan ’25