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

Xcode Documentation

Pinned Posts

Posts under Xcode tag

3,062 Posts
Sort by:
Post marked as solved
2 Replies
3.4k Views
Hi I am building a framework. In the past, if I create a framework project [myFrameworkName.framework] file was created in the 'Products' folder. But my xcode doesn't create 'Products' folder. It also doesn't create [myFrameworkName.framework]. Can I make [myFrameworkName.framework] file? I do not speak English well So I am using a translator. thanks.
Posted
by juh2.
Last updated
.
Post not yet marked as solved
2 Replies
94 Views
There is some new UI in Xcode for upgrading OS versions. I clicked the new Get button at the top of the screen. It went and got the new iOS 17.4. Great, but it is just sitting there. After much floundering around, I eventually found the UI that has the Install button. Clicked it. Nothing happens. I have restarted Xcode several times, went looking for an Xcode update, no joy. My development is now dead for two days. Really not happy.
Posted Last updated
.
Post not yet marked as solved
1 Replies
46 Views
I get warnings from Visual Studio saying that in order to run cross platform MAUI applications I need to reduce the xCode version to 14.3. The emulator appears but the app can't be interacted with, using the latest versions of both VS and XC. So I've decided to try downloading the earlier version of xCode, but there seem to be no active Apple sponsored links and I'm wary of trying an alternate website. All links suggest https://developer.apple.com/downloads/ but this redirects to https://developer.apple.com/account From the account page there is a download https://developer.apple.com/download/ but this only holds OS operating systems. The xCode page: https://developer.apple.com/xcode/ only has 15 available. https://developer.apple.com/xcode/resources/ which says it has a download for earlier versions of software, only points me back to the account page and we're back to square one. So someone please let me know if I'm insane or the 14 is too deprecated to download and VS is no longer compatible.
Posted
by jmnbcuni.
Last updated
.
Post not yet marked as solved
0 Replies
45 Views
Running Sonoma 14.4.1 and XCode 15.3 I'm unable to verify an app update. This app runs fine under Sonoma and the project has been verified many times before for earlier systems, but the new XCode crashes every time during the verification step. Of course this is stopping any further app updates. Is this known to anyone else? I've submitted the crash reports.
Posted Last updated
.
Post not yet marked as solved
0 Replies
35 Views
I'm seeing some weird behavior with conditional compilation when I use a build configuration other than "Debug" or "Release", and I'm wondering if I'm doing something wrong or if this is an Xcode bug. The setup Xcode version: 15.3 I have a simple SwiftUI view that takes in a model and displays an attribute of the model. struct ContentView: View { let model: Model var body: some View { VStack { Text("Name: \(model.name)") } .padding() } } In the model file, I have the struct definition, but also an extension that defines some sample data for use in SwiftUI previews: struct Model { let id: String let name: String } #if DEBUG extension Model { static let example = Model( id: "50fef362-f53d-4ded-9168-b887ff62e59d", name: "John Doe" ) } #endif And finally, I have a preview provider that uses this sample data: #Preview { ContentView(model: Model.example) } Normal behavior With the default "Debug" build configuration, this works just fine. There are no compilation errors, and the preview renders as expected. The issue Start off by changing the name of the build configuration to, e.g. "DebugDev" Now I start seeing seeing a mis-match between what happens and what Xcode tells me is happening. The code still compiles and runs, and the SwiftUI preview still works, but Xcode is displaying things as if it doesn't compile. Xcode formats the conditionally compiled code with a lower opacity color as if DEBUG isn't defined: In the view file, I now see a compilation error when referencing the conditionally-compiled code: Autocomplete doesn't work when trying to reference the conditionally compiled code Additional details/observations I have confirmed that the DEBUG active compilation condition is still defined in the build settings. All I've done is change the name of the build config I was initially thinking this might have something to do with the fact that this appears in a preview provider, since those are treated a bit differently, but the same thing happens if I reference the conditionally compiled code directly in the view class Another theory: since I was referencing conditionally compiled code from code that wasn't conditionally compiled, maybe Xcode was trying to tell me that wasn't valid. So, I tried placing the code that calls the conditionally compiled code (in this case, the view class) inside an #if DEBUG. This does get rid of the displayed compilation error, but auto-complete still doesn't work, and the whole class is displayed with the lower-opacity font. Help? I feel like I must be missing something. The only alternative I can think of is that Xcode has some logic hard-coded with the default "Debug" build config, and that would be...just silly.
Posted
by nivektric.
Last updated
.
Post not yet marked as solved
0 Replies
94 Views
I just bought a Vision Pro to build and run my app on it, but I'm encountering this error from Xcode: Developer Mode is enabled. Computer is paired. Device is paired, and it's connected to my Mac via the Developer Strap. In the "VPN & Device Management" setting it says to navigate to, there is no "Developer App certificate". Others have suggested clearing the ModuleCache in DerivedData, but that's also been fruitless. I've cleaned the build multiple times, and restarted both devices, and Xcode. I have no idea what else I can possibly do to resolve this. Does anyone have any other ideas?
Posted Last updated
.
Post not yet marked as solved
0 Replies
147 Views
Some Macs recently received a macOS system update which disabled the simulator runtimes used by Xcode 15, including the simulators for iOS, tvOS, watchOS, and visionOS. If your Mac received this update, you will receive the following error message and will be unable to use the simulator: The com.apple.CoreSimulator.SimRuntime.iOS-17-2 simulator runtime is not available. Domain: com.apple.CoreSimulator.SimError Code: 401 Failure Reason: runtime profile not found using "System" match policy Recovery Suggestion: Download the com.apple.CoreSimulator.SimRuntime.iOS-17-2 simulator runtime from the Xcode To resume using the simulator, please reboot your Mac. After rebooting, check Xcode Preferences → Platforms to ensure that the simulator runtime you would like to use is still installed. If it is missing, use the Get button to download it again. The Xcode 15.3 Release Notes are also updated with this information.
Posted
by edford.
Last updated
.
Post marked as Apple Recommended
685 Views
During last night, Apple allegedly pushed new XProtect antivirus signatures. After that, I think XProtect found the malware Pirrit in my Xcode Simulator files from Apple. I'm not kidding. This is an excerpt from the XProtect log (notice the NSFilePath!): 2024-05-01 07:54:12.951 Pirrit 👉 no status_message report time 0.0000000 {"action":"report","path":{"modificationDate":732892166.8634809,"path":"\/Library\/Developer\/CoreSimulator\/Images\/1944D6AF-4D6B-4877-8F87-924EB62FC984.dmg","creationDate":732892166.8634809},"status":{"description":"Error deleting path: \/Library\/Developer\/CoreSimulator\/Images\/1944D6AF-4D6B-4877-8F87-924EB62FC984.dmg: Error Domain=NSCocoaErrorDomain Code=513 \"“1944D6AF-4D6B-4877-8F87-924EB62FC984.dmg” couldn’t be removed because you don’t have permission to access it.\" UserInfo={NSUserStringVariant=(\n Remove\n), NSFilePath=\/Library\/Developer\/CoreSimulator\/Images\/1944D6AF-4D6B-4877-8F87-924EB62FC984.dmg, NSUnderlyingError=0x1247612a0 {Error Domain=NSPOSIXErrorDomain Code=1 \"Operation not permitted\"}}.","causedBy":[],"code":24}} 2024-05-01 07:54:13.197 Pirrit message not in JSON format 2024-05-01 07:54:41.125 Pirrit ⚠️ FailedToRemediate time 0.0000280 {"caused_by":[],"execution_duration":2.8014183044433594e-05,"status_code":24,"status_message":"FailedToRemediate"} XProtect also detects another threat on my machine: 2024-05-01 10:09:58.530 BadGacha ⚠️ ThreatDetected time 0.0000120 {"caused_by":[],"execution_duration":1.2040138244628906e-05,"status_message":"ThreatDetected","status_code":21} Please check your XProtect logs. There is an app that can display these logs out there. Or you can use the system logging facility. I have deleted the whole Developer folders (both at / and ~) and reinstalled Xcode (not Beta). But a new XProtect scan finds Pirrit in the Core Simulator file again! I have also attempted to install an anti virus solution (Malwarebytes), but it does not detect anything. I am wondering if we should get someone from Apple involved. I am also wondering if I should reset my whole machine… Is anyone else seeing these issues in the XProtect log? It is unclear at this time whether there really is a Pirrit malware in Apple's Xcode simulator files or if there is some issue with XProtect like a faulty signature. Don't panic.
Posted
by otacon85.
Last updated
.
Post marked as Apple Recommended
578 Views
Hi all. I have a problem related to Xcode. Xcode says "iOS 17.2 simulator" is not installed, but I have been using this simulator for a long time and have installed the necessary SDKs. The problem has also been occurring for my colleagues since May 1, 2024. Restarting the Mac helps (there is no problem in Xcode after restarting Mac), but after reopening Xcode this problem repeats again. macOS 14.3.1 (23D60) Xcode 15.2 (15C500b)
Posted Last updated
.
Post not yet marked as solved
16 Replies
2.1k Views
I got a new MacBook and set it up as a new one, not transferring any data from the old one. But now the Apple Watch (Series 6) paired with my iPhone (14 Pro Max) ist not shown in Xcode. iPhone and Watch are using the latest RC and also Xcode is the latest RC. But in Xcode I ca only see my iPhone, not the paired Watch. See Screenshots. The first shows the new MacBook and the second the old one. I already tried a lot, but nothing helps: Unpair Watch from Phone and then pair it again Plug the iPhone to different USB ports Restart Watch, iPhone and Mac Delete the iPhone from Xcode Enable and disable Developer Mode on iPhone and Watch What else can I try to get the Watch back?
Posted
by Urkman.
Last updated
.
Post not yet marked as solved
12 Replies
6.7k Views
I downloaded Xcode 15 beta 5 and I'm trying to work on my app, but it's having a problem with the simulator. It can't find the runtime I guess. This is the first time I've ran into this. When I try to run, this is what I get: The com.apple.CoreSimulator.SimRuntime.iOS-17-0 simulator runtime is not available. runtime profile not found using "System" match policy Download the com.apple.CoreSimulator.SimRuntime.iOS-17-0 simulator runtime from the Xcode Settings. Not sure what to do here. I also installed the latest iOS 17 developer beta on my device and Xcode doesn't work with that either. I can't help but think the development team forgot something here.
Posted Last updated
.
Post not yet marked as solved
0 Replies
63 Views
I'm trying to download artifacts from some recent Xcode Cloud builds. In both Xcode and App Store Connect I'm getting errors. Xcode says: "Error Fetching Test Results: API Invalid status code: 501. App Store Connect says: "artifacts could not be found." FB13773789 - Xcode Cloud: Service returning 501 in Xcode when trying to view artifacts of successful build from minutes ago I have tried several projects to rule out project specific issues and it is happening to all of my Xcode Cloud enabled projects. Both Xcode 15.3 and 15.4 beta exhibit this behavior. Is anyone else running into this issue? I noticed it yesterday, and it continues into this morning.
Posted
by edorphy.
Last updated
.
Post marked as solved
4 Replies
99 Views
In a feat of unmitigated disk cleaning, I removed who-knows-what, likely from ~/Library/Developer. Now I can't build apps that rely on watchOS (or likely tvOS/visionOS from the look of things). Run a try to build, Xcode tells me I should download watchOS, immediately shows me that it has, then does nothing. My Platforms window looks like this. If I tap Get next to watchOS 10.2 it looks like it succeeds immediately, but doesn't work (notice that 10.2 is already in the list). If I try to delete 10.2 from this list, it gives me an error that it can't find it on disk to delete it. I'm guessing there's a mismatch between some preference file and reality. Totally my fault I'm certain. Best way to recover?
Posted Last updated
.
Post not yet marked as solved
0 Replies
67 Views
I am using XCode on my Mac Book Pro M1 and trying to run the iOS app being developed on my iPad (5th generation, 12.9 inch) The devices are connected through USB-C cable. I have enabled developer mode on my iPad, trusted the M1 device, the developer, and the app. However the following appears on the iPad when trying to launch the app: Unable to Verify App An internet connection is required to verify trust of developer "Apple Development: ...". This app will not be available until verified This seems to be an issue with M1 specifically, as other people seem to have this problem, and the application successfully runs on other iOS devices
Posted Last updated
.
Post not yet marked as solved
11 Replies
735 Views
Our app is using SwiftData + SwiftUI. After upgrading to Xcode 15.3 Beta, RC1, RC2, we’ve experienced the same issue that the app is having 100% CPU activity even when left idle. This happens as long as the SwiftUI is using @Query to fetch SwiftData and the query does return at least 1 result (there is no issue if the query returns empty result). We’ve tried the following and therefore confirmed that this is a Xcode 15.3 beta issue: Xcode 15.3 Beta + iOS 17.2 -> 100% CPU activity when idle Xcode 15.3 Beta + iOS 17.4 beta -> 100% CPU activity when idle Xcode 15.2 Beta + iOS 17.2 -> normal This only happens during debug run. When profiling / using instrument, this doesn't happen.
Posted
by fanwgwg.
Last updated
.
Post not yet marked as solved
9 Replies
494 Views
I've reached a point where I can no longer make any progress diagnosing the issues that have popped up with Apple Watch development support. To hopefully help draw attention and focus to the severity of this problem, I'm gathering all related threads into this single thread. Summary of problems There are several, possibly related, issues at play: Xcode is not discovering Apple Watches. This means it's not possible to deploy apps to Apple Watches that aren't already provisioned with Xcode. I've confirmed this behavior with a watch running watchOS 10.0. The logging profile for watchOS has expired. It's no longer possible to pull logs via Console from Apple Watches. AppIntent-based complications on watchOS 10.5 no longer load, staying stuck in a "placeholder" state. This can be reproduced with the Backyard Birds demo app. It's no longer possible to debug widget extensions on Apple Watch hardware. Feedback submitted FB13758427: No longer able to connect to Apple Watch from Xcode I was attempting to test another regression related to AppIntents no longer working on watchOS 10.5. To confirm the behavior had regressed since earlier versions of watchOS, I set up one of my older Apple Watches that is still running watchOS 10.0. After wiping the watch and repairing it with one of my test devices (iPhone 11 Pro, iOS 17.4.1), I’m unable to get the Apple Watch to appear in Xcode’s Devices & Simulators manager. The phone is connected via USB cable, and the phone appears as a Connected phone, but the watch does not appear. My Apple Watch Ultra that I use as my daily driver does appear as a remote device (the globe icon is next to it), but the Apple Watch 10.0 does not appear. Details about the older watch: Version: 10.0 21R5341c Model: A2478 Not being able to test on other Apple Watches is severely limiting my ability to isolate and confirm the regression in AppIntent support that can be reproduced in the Backyard Birds demo app. Note that the 10.0 watch does actually appear in the Console app, but with a warning sign next to it. The 10.0 watch also appears twice. Clicking the warning sign does not reveal any information about why the warning is appearing, but after ~5 seconds I do get the following error in Console.app: “The user has not responded to the pairing request on 'Headless’ Respond to the Trust prompt on the device.” There is no trust prompt on the device. FB13756074: WatchOS logging profile is no longer valid https://developer.apple.com/bug-reporting/profiles-and-logs/?platform=watchos is no longer valid. See attached error that occurs when attempting to install the profile onto my Apple Watch Ultra. It seems that without this I’m unable to get any logs off of my Apple Watch, which is making testing/development quite difficult. FB13758450: AppIntent-based widgets no longer render on watchOS 10.5 AppIntent-based complications no longer get beyond a placeholder state on watchOS. This can be reproduced with the Backyard Birds demo app, which uses AppIntent-based widget configurations for the watchOS complications. AppIntent-based complications did appear to work in previous versions of watchOS 10, but I’m unable to confirm this with a 10.0 Watch I have due to FB13758427. To reproduce deploy the attached unmodified Backyard Birds app to a watch running watchOS 10.5. add a Backyard Birds complication to a watch face. Expected behavior: the widget shows live data Actual behavior: the complication never leaves a placeholder state. See the attached screenshot for the state the widget is stuck in. FB13758490: PacketLogger no longer logs packets PacketLogger used to log BTLE packets as they were received and transmitted on a macOS machine. Since updating to 14.5 Beta (23F5064f) however, PacketLogger no longer logs packets on macOS at all. Upon starting a new session, the interface remains empty. PacketLogger is still able to log packets from a connected iOS device. Related threads Apple Watch cannot reconnect WatchOS Sysdiagnose Profile is no longer XCode 15 can't run on iOS 17 devices. Previous preparation error: An error occurred while communicating with a remote process.. The connection was invalidated.
Posted Last updated
.
Post not yet marked as solved
0 Replies
72 Views
Hello, I've got a "other swift flag" set up for one of my schemes. It works when I build locally, but not when I try building using Xcode Cloud. My Other Swift Flags is set up like this: My code looks something like this: class Config { #if LIMITED static let configProperty = 1 #endif } However, Xcode Cloud says Config has no member 'configProperty', when I build my 'Limited' scheme.
Posted
by GBecker.
Last updated
.
Post not yet marked as solved
0 Replies
80 Views
Any ideas on this would be greatly appreciated. Is it a process error, set-up error or should I be raising a ticket for this? I continue to have 2 error messages when attempting push/pull to remote repository. Example: Create new project on Desktop using Xcode, File/New Project (tick 'create Git repository on my Mac'). Change 'ContentView' text to “Hello world!2”. Integrate/Commit, stage all, amend, commit. Create new remote repository (I have checked GitHub and a new repository has been added). Change 'ContentView' text to “Hello world!3” Integrate/Commit, stage all, amend, commit. - all looks fine so far Integrate/push to origin/main: Error message: “The local repository is out of date, make sure all changes have been pulled from the remote repository and try again”. There is now 1 up and 1 down arrow next to the branch. Integrate/pull Error message: "An unknown error has occurred. No merge base found". I have tried this several times with same response, using iMac with Xcode 15.3, also tried with Xcode 15.2.
Posted Last updated
.
Post not yet marked as solved
10 Replies
17k Views
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
Posted Last updated
.
Post not yet marked as solved
2 Replies
108 Views
So like the title says, when I start up Xcode the preview won;t work till I run a debug session using the simulator. Sometimes the debug session is unable to start the simulator, which I can start manually then run a debug session. Once all the above is done, preview works. Any idea what is causing this behavior?
Posted
by SergioDCQ.
Last updated
.