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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

iOS Build Availability in Xcode
When attempting to fix an issue that is only happening on a specific iOS build I noticed that I am not able to install that specific build on my simulator. Is there any way to get specific iOS builds that are not available through Xcode? Example: The bug I am trying to fix is only happening on 17.6.1 and 17.7.1. These specific builds are not available through Xcode. Attempted Resolution: I found a iPhone14,5_17.6.1_21G101_Restore.ipsw file but was not able to import it into Xcode for use nor was I able to use it on a physical device.
0
0
212
Nov ’24
Updating EditButton
I am trying to update the EditButton after deleting rows in a List, but its title doesn't change. I have sent an update event via a publisher that applies the mode change based on the number of items remaining in the list. Here's the update event handler: .onReceive(updateViewPublisher, perform: { _ in self.editMode?.wrappedValue = textFileData.textFiles.count == 0 ? .inactive : .active update += 1 })``` The edit mode is changed to inactive when the list is empty, but the button continues to display 'done'. If I adda new list item it remains set to 'done' and the delete control is displayed against the new item. I have seen loads of posts about this on various sites, but no solutions. I am trying this on Xcode 16.2 and IOS 18.2. If someone from Apple sees this, a reply would be most welcome.
2
0
295
Dec ’24
Watch OS - Complications settings not showing anywhere.
I have a fully functioning IOS / Watch App working on hardware and software test. But, I cannot figure out how to get complications to show up: Xcode itself does not show complication choices in the target settings. Can't find a clear simple explanation of the various choices in the settings. Complication choices in the IOS iPhone app settings never appear Not at all sure how complications get assigned to 'groups' etc. ...been a roadblock for weeks...very confusing area. Not new to Xcode ( 10+ years experience). But the basic certificate, settings, info list combination seems always to be a massive hurdle to navigate.
1
0
403
Dec ’24
Run test specific setup logic on different target
Our use case is that we need to run a CLI script (on Mac) to set up backend configuration before each test case (UI test on real iOS device). The setup logic is test specific, so using pre-build scripts is not an option. Is this support in any way or what are best practices around such a setup? Ideally, we would still be able to execute the tests from within Xcode.
0
0
350
Nov ’24
This app cannot be installed to apple watch
I recently added a new target for Apple Watch, which works fine on the simulator. However, I wasn't able to run it on real Apple watches. First, I don't see it in the list of devices, even after I click "trust" and connect to my Mac over charging cable. Second, I've always used automatic code signing, and everything seems OK here. Third, I also tried distributing it over TestFlight, but that build doesn't appear in the TF. I restarted my phone and relaunched the TF app. So, when I install the app to my iPhone over the cable, the watch app doesn't appear on Apple watches. Then, If I go to watch app and install my app manual (I see it at the bottom with the "install" button), it fails with the error "This app cannot be installed because its integrity could not be verified.". Also, there's an icon on the Apple watch, but it shows the same error when I click it. I unpaired and paired it again, but it didn't help. Also, I tried another pair of phones, and the same thing happened. I use an AppStore account (not enterprise), and the main app works fine. Is there a way how to fix it?
1
0
649
Nov ’24
xcodebuid failed at signing step although there is no issue building and distributing from Xcode GUI
Hi all, I have a host application to register and start network system extension. I created 2 provisional profiles that grant SystemExtension and NetworkExtension capabilities for the host app, and NetworkExtension for the network system extension. I'm able to archive and distribute (direct distribution) the app from XCode GUI. However, when I use xcodebuild command to build the project, it gave me this error: error: No profile for team 'TEAMID' matching 'Host APP Distribution Profile' found: Xcode couldn't find any provisioning profiles matching 'TEAMID/Host APP Distribution Profile'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the Signing & Capabilities tab of the target editor. error: No profile for team 'TEAMID' matching 'My NetworkExt Distribution Profile' found: Xcode couldn't find any provisioning profiles matching 'TEAMID/My NetworkExt Distribution Profile'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the Signing & Capabilities tab of the target editor. I already installed those 2 provisioning profiles assign them to my targets in XCode. There is no error from Xcode when building and distributing it. Does anyone have the same issue? How could you solve it. Thanks! An
0
0
235
Dec ’24
Code coverage problem with symbolic linked source files
Let's say I have a local package Foo, Bar and Baz. Foo has Bar and Baz as dependency and has test target,FooTests. Below is the Package.swift manifest that describes package Foo. import PackageDescription let packages: [Package.Dependency] = [ .package(path: "../Bar"), .package(path: "../Baz"), ] let products: [Target.Dependency] = [ .product(name: "Bar", package: "Bar"), .product(name: "Baz", package: "Baz"), ] let package = Package( name: "Foo", platforms: [ .iOS(.v16), ], products: [ .library( name: "Foo", targets: ["Foo"] ), ], dependencies: packages, targets: [ .target( name: "Foo", dependencies: products, path: "Sources" ), .testTarget( name: "FooTests", dependencies: [.target(name: "Foo")], path: "Tests", swiftSettings: swiftSettings ), ] ) Bar and Baz is also local packages. Due to the limitations of the project, Baz has sources with symbolic links instead of exact directories, and these sources are what FooTests will test. If I run FooTests, test succeed with proper logs indicating that all test methods are run correctly, but test coverage says that Baz's coverage is 0% and there is no executable lines unlike the Bar which is not what be tested. Is there any way to fix this problem?
0
0
316
Dec ’24
Struggling to add a test target to an existing project in Xcode
Sorry if this question is too vague, however I've tried this multiple times and see the same result. I'm pretty sure I'm doing something wrong, but don't know what. I have a Multiplatform (iOS and macOS) project that builds, and runs I add a new target of type Unit Test Bundle I click the diamond in the margin beside the XCTestCase declaration at the top of the new Test file The target project builds, then Xcode says 'Testing...' and it stays like this forever. I've also tried creating a new scheme that targets the target created in the above steps. attempting to run my tests behaves the same. The top status bar will get stuck saying 'Testing...' and never get anywhere. I'm pretty sure this is something basic. thanks, in advance for any guidance. Mike
2
0
1.3k
Nov ’24
WeatherKit in commandline app
I am trying to add WeatherKit support to a commandline app to fetch historical data. I've configured an app ID with the WeatherKit entitlement, but WeatherKit does not appear in the Capabilities list to add. When I try to access weather data, it fails with Code=4097 "connection to service named com.apple.weatherkit.authservice" suggesting it's not authorized. How do I add the WeatherKit entitlement to a commandline Swift app?
0
0
423
Dec ’24
Xcode 15 - Vim Mode set clipboard=unnamed
Hi, is there any way to set the clipboard to unnamed in Vim mode? For example, if there were a .vimrc file, I would add: set clipboard=unnamed I'd like to be able to use "y" to yank / copy selected sections of code and paste them in the search bar or external applications. Thanks!
0
0
215
Nov ’24
Provisioning profile doesn't match the entitlements file's values for the com.apple.developer.team-identifier and application-identifier entitlements.
Hi all. I have encountered an issue in which I failed to build the app on Xcode. It says "Provisioning profile doesn't match the entitlements file's values for the com.apple.developer.team-identifier and application-identifier entitlements". But I have checked these two values, they are exactly the same as expected.
1
0
1.5k
Nov ’24
OS 17 Disconnects from Xcode
Hello, Is anyone experiencing devices on OS 17 disconnecting from Xcode 15 and 16 Beta? I remember there were a lot of past conversations around the time when iOS 17 released but it seems to still be happening even after using Xcode 16 beta. Re-pairing devices and rebooting the hosts appear to fix it temporarily. I discovered that killing the remoted process also allows xcode to reconnect to the devices. Using Xcode 16's devicectl also doesn't work. I have my devices connected to a USB Hub and to multiple devices. The odd thing is I have iOS 16 devices connected and those don't disconnect. I believe iOS 17 introduced a new coredevice stack to connect but has anyone found a fix for it or have any recommendations? TN3158 isn't relevant in my situation because VPN and Packet filtering is not in use and I filed feedback with Apple but they have't responded in a long time.
5
0
442
Feb ’25