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

Xcode Documentation

Post

Replies

Boosts

Views

Activity

Xcode won't open
Have been using Xcode 16.0 on this Mac successfully but now Xcode won't open. The welcome screen appears but the rotating indicators run apparently forever. MacBook Air recently updated to Sequoia 15.0
3
0
42
6h
Xcode 16 Beta not recognizing Apple Vision Pro on devices
I downloaded the new Xcode 16 Beta and AVP OS 2.0, But I saw that in Windows --> Devices + Simulators, my Mac was not recognizing that I had updated the Vision Pro's OS. So, I disconnected the AVP and tried connecting it again, but the device is not showing up. I've tried going into Remote Devices within the headset, disabling/enabling Developer Mode, turning off/on Wifi, restarting both devices. Is this an issue with XCode 16 Beta and/or Vision OS 2.0?
6
1
682
Jun ’24
CreateML for Image recognition with a spreadsheet catalog
I want to use createML to generate an image recognition model. This works when I put the images in separate sub-folders. But my data consists of many images in one folder with a spreadsheet index of the photos according to several different attributes. I suppose I could write a script to move the images into the correct folders, and repeat this for each of the attributes. But I was hoping there’s a way of doing this directly in createML since I’m sure it’s a common requirement. Anyone know if createML can do this or does anyone know of an app that would save me writing the script?
1
0
38
12h
XCUITest target invalid config sets both USES_XCTRUNNER and either TEST_HOST or RUNTIME_TEST_HOST
I am trying to add an XCUITest target to an existing application. When I try to run the tests, I get the error "Invalid configuration: MyProjectUITests sets both USES_XCTRUNNER and either TEST_HOST or RUNTIME_TEST_HOST". I have seen information stating that it might be because I have multiple apps built from different build configurations in the same scheme, but I could not resolve the issue with any of the suggestions I saw. I've attached a screenshot of the error message and a link to a project stripped down to just the existing configuration to help with diagnosing this issue. I would really love to be able to get some UI tests running. My Project
0
0
32
3h
The iOS Simulator and preview in Xcode takes forever to load
I’ve recently begun learning how to utilize Xcode. I have an app in Xcode that closely resembles the iOS App template. Whenever I initiate a build, it successfully completes, but it never finishes installing views into the iOS Simulator. This issue is also present when I attempt to preview the app within the Xcode editor. I am currently using a 2020 MacBook Air (M1). Have you encountered a similar problem? If so, how did you resolve it? [Written using Apple Inteligence Writing Tools]
1
0
39
4h
Unable to obtain APNS token in xCode Swift after iOS 18 Upgrade
After upgrading to iOS 18, in my app development using xCode 16.0 (16A242d) and Swift, I am totally unable to obtain an APNS token from my own device using didRegisterForRemoteNotificationsWithDeviceToken The delegate simply won’t fire. I was able to do so repeatedly in the same app a week earlier, using iOS 17xx. That part of the code has not changed. I just now restored my phone and installed a clean version of iOS 18, but the issue has not changed. Have tried using WiFi and also cellular networks. It is a no-go.
2
0
73
1d
Selecting Metal 3.2 as language causes crash on iPhone 11 Pro (iOS 17.1.1)
XCode 16 seems to have an issue with stitchable kernels in Core Image which gives build errors as stated in this question. As a workaround, I selected Metal 3.2 as Metal Language Revision in XCode project. It works on newer devices like iPhone 13 pro and above but metal texture creation fails on older devices like iPhone 11 pro. Is this a known issue and is there a workaround? I tried selecting Metal language revision to 2.4 but the same build errors occur as reported in this question. Here is the code where assertion failure happens on iPhone 11 Pro. let vertexShader = library.makeFunction(name: "vertexShaderPassthru") let fragmentShaderYUV = library.makeFunction(name: "fragmentShaderYUV") let pipelineDescriptorYUV = MTLRenderPipelineDescriptor() pipelineDescriptorYUV.rasterSampleCount = 1 pipelineDescriptorYUV.colorAttachments[0].pixelFormat = .bgra8Unorm pipelineDescriptorYUV.depthAttachmentPixelFormat = .invalid pipelineDescriptorYUV.vertexFunction = vertexShader pipelineDescriptorYUV.fragmentFunction = fragmentShaderYUV do { try pipelineStateYUV = metalDevice?.makeRenderPipelineState(descriptor: pipelineDescriptorYUV) } catch { assertionFailure("Failed creating a render state pipeline. Can't render the texture without one.") return }
1
0
62
5d
Xcode 16 Objective-C Documentation Missing
In Xcode 16.0 and 16.1 beta 2, running on macOS 15.1 beta 4, Developer Documentation for Objective-C is (at least partially) missing in the Navigator. Many of the entries appear to be for Swift. In Xcode 16.1 beta (i.e. beta 1), the documentation is normal. I did not find any posts in this forum about this, which is surprising and makes me wonder if the issue is isolated to particular configurations. In any event, I would appreciate any information anyone may have about this.
4
0
148
1w
rvictl creates Link local connection.
When using rvictl, I notice that it creates 2 interfaces. One of which establishes a link local connection between the iPhone and the Mac. What is this connection for? Why is it so talkative? and why can I only bring one of the created interfaces down but not the other? When I try to bring down the interfaces with the ifconfig enX down command it stops the DHCP requests and several TCP DUP ACK, but the other interface is persistent and will not stop talking. Can someone explain what type of traffic is being transmitted between the Mac and the iPhone?
0
0
38
7h
Question with Message Filter Extension
Hi. I created a Message Filter Extension target to filter spam sms messages, deferring the request to my backend. The extension makes the call and send this payload: POST /server-endpoint HTTP/1.1 Accept: */* Content-Type: application/json; charset=utf-8 Content-Length: 148 { "_version": 1, "query": { "sender": "14085550001", "message": { "text": "This is a message" } }, "app": { "version": "1.1" } } My question is, is possible modify this payload to send the "receiver" number (is possible get the receiver number in this extension?), or use an identifier, to let my backend know which user number the filter was applied to. I think is impossible because the extension makes the call and create the payload, and I don't see anything in docs to add other prop, but there's other way to know the "receiver" number of the sms? Thanks:)
0
0
45
9h
App Not Appearing in "Available Apps" List in Watch App
I’ve developed an Apple Watch extension for an existing iOS app. When I run the app on the watch via Xcode using the simulator, everything works fine. However, when I try to install it on my iPhone, the Watch app doesn’t show it in the "Available Apps" list, so I can't install it on the watch. The Apple Watch is connected to my iPhone, and I can see other apps available for installation without any issues. I also created a brand new project with watchOS support to troubleshoot, but the same problem occurred. Any ideas on how to resolve this?
0
0
50
9h
CoreML not found anymore once I add C++ compile source
I have a small Swift command line tool for MacOS. I have added a small demo CoreML model to the project and can correctly load the model in Swift like let model = try! Matcher_512x256(). However, once I add a single C++ or Objective C file to the Compile Sources of my build target, the compilation fails with an error stating that the model cannot be found: "...ModelAndCpp/ModelAndCpp/main.swift:11:18 Cannot find 'Matcher_512x256' in scope". Please help me resolve this. Does XCode change into a different "compilation mode" once a C++ file is present which might cause this error? XCode version is 16A242d. I can reproduce the issue with a tiny repository (5 small files) which I have uploaded here on GitHub. To reproduce the issue, simply remove the .m and .cpp files from Compile Sources to compile correctly, or add one of them to get the error. Thank you and best regards, Manuel
0
0
18
15h
Code signature not valid when running on Simulator in Xcode 16
I just upgraded to Version 16.0 (16A242d) and unfortunately the App that used to run perfectly fine on Xcode 15 is now broken. It crashes right after showing the Launch Screen on the Simulator. Here's the formatted error message in the Console: dyld[80159]: Library not loaded: @rpath/AppName-iOS.debug.dylib Referenced from: <App ID> /path/to/AppName-iOS.app/AppName-iOS Reason: tried: '/path/to/DerivedData/AppName-iOS.debug.dylib' (no such file), '/path/to/CoreSimulator/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection/AppName-iOS.debug.dylib' (no such file), '/path/to/AppName-iOS.app/AppName-iOS.debug.dylib' (code signature not valid for use in process: Trying to load an unsigned library), '/path/to/DerivedData/PackageFrameworks/AppName-iOS.debug.dylib' (no such file), '/path/to/AppName-iOS.app/Frameworks/AppName-iOS.debug.dylib' (no such file), '/path/to/CoreSimulator/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/AppName-iOS.debug.dylib' (no such file) For some reason the Library is unsigned and I've checked all the settings with no luck.
9
0
188
1w
Unknown file type error in Xcode
Hello! I have been successfully building out my Xcode project in the past few months to my iPhone 15. I recently got a new iPhone 16 pro and have been having a hell of a time trying to figure out how to build to my new phone. Here's the error I am getting: Unknown file type in '/Users/username/Desktop/filename/Libraries/libiPhone-lib.a' please help! Any suggestions would be greatly appreciated. NOTE: I am using a M1 laptop with Sequoia OS
0
0
23
19h
tabview tabviewstyle sidebaradaptable in macos 15.1. beta 5 is non responsive
Whan using a tabview set with a tabviewstyle of sidebaradaptable on macOS 15.1 beta 5 the tabs are non responsive and is basically broken. Example code... If you click around on these tabs you will see it is not responsive. When you add a lot more tabs from a for loop for example you really get poor performance. But this is not the case with earlier beta releases. TabView {                 Tab("One", systemImage: "1.circle.fill") {                     Text("Test One")                 }                 Tab("Two", systemImage: "2.circle.fill") {                     Text("Test Two")                 }                 Tab("Three", systemImage: "3.circle.fill") {                     Text("Test Three")                 }             }             .tabViewStyle(.sidebarAdaptable)
2
0
94
6d
preparing iPad hangs
I have Xcode 16 and iPadOS 18.0 I am trying other connect the iPad to Xcode. It started with preparing iPad and Xcode will continue when the operation completes. It hangs now for 2 hours. What is wrong with it? There is lot of space at the iPad IOS 18.0 (22A3354) Pad Pro (11-inch) (2nd generation) It worked earlier with Xcode 15 and iPadOS 17
1
1
43
13h
Building documentation (Docc) gives error coming from `FirebaseCoreExtension` while building with Xcode 16
The project setup is as follows: Uses pods Has swift bridging header as it uses both Objc and Swift With Xcode Version 16.0 (16A242d), when building the project everything is fine but when I build the Documentation (Product > Build Documentation), I am getting this error via: /.../Project/Pods/FirebaseCore/FirebaseCore/Sources/Public/FirebaseCore/FIRLoggerLevel.h:23:28: redefinition of 'FIRLoggerLevel' ... Building the documentation of the same project with Xcode Version 15.4 works just fine, so the error must come from the new xcodebuild (Xcode 16.0 Build version 16A242d). Here are the pods in the project: pod 'Firebase/Crashlytics', '10.29.0' pod 'Firebase/Performance', '10.29.0' # (Recommended) Pod for Google Analytics pod 'FirebaseAnalytics', '10.29.0' pod 'GoogleAnalytics', '3.21' pod 'GoogleTagManager', '7.4.3' pod 'FirebaseRemoteConfig', '10.29.0' pod 'GoogleUtilities', '7.13.0' Tried with all latest, but the same issue persists. Any ideas, on how to resolve this? I read that it is not possible to disable the pods being build by docc as they are dependencies of the target which is being build by the docc process, if that is not true, maybe I can disable docc from building the Pods.
1
0
84
1d
Xcode Canvas preview connected to iPhone error
"Can not preview in this file" Xcode 16.0 iPhone 14 Pro , iOS 18.0 When I choose to start Preview on my iPhone, the canvas screen keeps showing loading circle animation. The iPhone enters the Xcode Previews App but only displays the default screen (Xcode icon& 'Preview from Xcode') I uploaded the some of diagnostics files previews_diagnostics_summary.txt remote_injection.json
2
0
79
1d
Automating import of distribution certificates for iOS builds
We build a number of iOS apps using different distribution certificates on a "headless" build machine in a data center. It is a burden to have to accept a newly imported certificate because codesign causes a dialog to pop up requesting to authorize the private key We have tried a number of suggestions in various posts, including deleting the certificate and re-importing with security import using the -T flag to allow codesign. After doing this, and even though the ACL shows a very similar picture to the post authorized state, keychain still requires a dialog to be "Allowed". What can be done, from the command line, to avoid this popup?
0
0
82
1d