Running macOS 15.4.1, Simulator 16.0 (1042.1), various iOS devices (iPhone 16, iPad 13" M4)
I log into iCloud and enable iCloud Drive. Running the Files app, I noticed that I can click on "flat" documents (PDF, JPEG, etc) and they work. However, when I click on "package" documents (e.g. represented by a directory behind the scenes), I get a normal download progress, but then an alert "The operation could not be completed. No such file or directory".
This seems to happen with all package documents, e.g. Keynote documents or Reality Composer objcap documents. It does not happen on actual devices logged into the same account.
I've tried completely deleting and rebuilding the simulator instances in question, with no success.
Xcode
RSS for tagBuild, test, and submit your app using Xcode, Apple's integrated development environment.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
At the last place I worked it took roughly 5 minutes to do an application build. Which in turn made doing any sort of TDD or ever just regular Unit Tests extremely painful to do as the cycle time was simply too long.
But that got me thinking.
In recent versions of Xcode, Apple added Previews for SwiftUI Views that basically showed code changes to the View in real time. And Previews were made possible by extremely targeted compilation of the view in question.
So... what if instead of a Preview pane in the Xcode IDE there was a Test pane the could be displayed such that Tests for a piece of code could be created and run almost immediately?
Perhaps by adding a #Testing section to your code
#Testing(MyService.self) // Define the entity to be tested.
If you could drop the turnaround time AND provide a test playground for service level code that could speed development of such code greatly... and encourage interactive test development at the same time.
What do you think?
This is a continuation of https://developer.apple.com/forums/thread/771287. Please help with Another View.
Topic:
Developer Tools & Services
SubTopic:
Xcode
I am creating an xcframework for a static library for iOS, but I am encountering a perplexing issue with Xcode 16.3.
When I build an xcframework using C++ in one project and import it into another project, the application runs with corrupted memory. In the framework project, I use os_unfair_lock, but when attempting to lock, the app crashes due to a state error. This suggests that memory corruption is occurring.
When the xcframework is built with Xcode 16.2, a proper binary is generated, and the app runs without any problems.
Since I do not want to disclose the source code, I am trying to construct a minimal project that reproduces the issue, but so far I have not been successful.
Fundamentally, I feel that the compiler in Xcode 16.3 cannot be trusted.
Hi,
I am using xcode build that receive it's configuration using xcconfig files, those add some new definitions to the project, like the location of openssl library.
If xcode environment variable include prefix that matches one of the fields in the project settings, it is automatically referred to as if you added it to that field.
for example : the var HEADER_SEARCH_PATHS_openssl_libopenssl has value (openssl headers' path) that should be automatically added to the field Headers Search Paths under project settings.
For some reason it stopped working for me and i'm not sure why (i've tried to release the xcconfig files). any idea why ?
Thanks !
I can use devicectl to copy single files from a device fine using:
xcrun devicectl --verbose device copy from --user mobile --domain-identifier <BUNDLE_ID> --domain-type appDataContainer --device <DEVICE_ID> --source Documents/Screenshots/0001.png --destination Screeshots/0001.png
but when there are many files this can get pretty slow.
Is there a way of recursively copying an entire directory? I've tried this:
xcrun devicectl --verbose device copy from --user mobile --domain-identifier <BUNDLE_ID> --domain-type appDataContainer --device <DEVICE_ID> --source Documents/Screenshots --destination Screeshots
but nothing is transferred and it times out eventually with the error:
ERROR: The specified file could not be transferred. (com.apple.dt.CoreDeviceError error 7000 (0x1B58))
ERROR: The operation couldn’t be completed. The file service client failed to read data from the network socket because we timed out when waiting for data to become available. (NSPOSIXErrorDomain error 60 (0x3C))
NSLocalizedFailureReason = The file service client failed to read data from the network socket because we timed out when waiting for data to become available.
Xcode itself can do it with the "download container..." option, but I'd like to be able to automate it.
Topic:
Developer Tools & Services
SubTopic:
Xcode
When testing Energy Impact on Xcode, it shows zero, and other data is normal
Topic:
Developer Tools & Services
SubTopic:
Xcode
After developing the IOS app using XCode, I https://developer.apple.com/account/resources/identifiers/list Created Identifiers (HanBaoAI) and locally created Certificate SigningRequest.certSigningRequest https://developer.apple.com/account/resources/certificates/list Created Certificates (Expiry Date 2026/04/21) and also created profiles (HanBaoAI, Expires 2026/04/21), and then https://appstoreconnect.apple.com/apps I created an app (HanBaoAI) and uploaded it to the official website using Product Archive in xcode. The upload was successful, but the official website's testflight showed 1 (processing). When I refreshed the page, there was no information in testflight. May I ask what the reason is? How to solve it? Please provide complete and detailed solution steps.
Topic:
Developer Tools & Services
SubTopic:
Xcode
I am currently using Xcode 16 (16A242d) and testing on an iPhone 7 running iOS 12.1.3. However, when I try to launch the app on the device, it crashes immediately. Below are the crash logs from the iPhone 7:
错误 11:54:55.731858+0800 kernel Sandbox: assertiond(62) System Policy: deny(1) file-read-metadata /private/var/mobile/Library/DuetExpertCenter/caches/ATXCacheFile-_ATXAppPredictor-TotalScore
错误 11:54:55.731897+0800 kernel Sandbox: assertiond(62) System Policy: deny(1) file-read-metadata /private/var/mobile/Library/DuetExpertCenter/caches
错误 11:54:55.754498+0800 kernel Sandbox: duetexpertd(132) deny(1) mach-lookup com.apple.proactive.ActionPrediction.predictions
错误 11:54:55.756102+0800 duetexpertd Unable to remove recent engagement cache file. Error: Error Domain=NSCocoaErrorDomain Code=4 UserInfo={NSFilePath=, NSUserStringVariant=, NSUnderlyingError=0x100db60a0 {Error Domain=NSPOSIXErrorDomain Code=2}}
错误 11:54:56.571640+0800 symptomsd Attempt to add an app with insufficient id, info {
BKSApplicationStateAppIsFrontmost = 1;
BKSApplicationStateExtensionKey = 0;
SBApplicationStateDisplayIDKey = "com.igetcool.app";
SBApplicationStateKey = 8;
SBApplicationStateProcessIDKey = 696;
SBApplicationStateRunningReasonsKey = (
{
SBApplicationStateRunningReasonAssertionIdentifierKey = UIApplicationLaunch;
SBApplicationStateRunningReasonAssertionReasonKey = 10000;
}
);
SBMostElevatedStateForProcessID = 8;
}
错误 11:54:56.829372+0800 assertiond [IGCProject:696] SyscallError: setpriority(PRIO_DARWIN_ROLE, 696, 3): No such process
错误 11:54:56.944833+0800 dasd Activity not tracked as being started, ignoring it
错误 11:55:06.153790+0800 symptomsd Attempt to add an app with insufficient id, info {
BKSApplicationStateAppIsFrontmost = 1;
BKSApplicationStateExtensionKey = 0;
SBApplicationStateDisplayIDKey = "com.igetcool.app";
SBApplicationStateKey = 8;
SBApplicationStateProcessIDKey = 697;
SBMostElevatedStateForProcessID = 8;
}
错误 11:55:06.430433+0800 assertiond [IGCProject:697] SyscallError: setpriority(PRIO_DARWIN_ROLE, 697, 3): No such process
错误 11:55:13.158889+0800 symptomsd Attempt to add an app with insufficient id, info {
BKSApplicationStateAppIsFrontmost = 1;
BKSApplicationStateExtensionKey = 0;
SBApplicationStateDisplayIDKey = "com.igetcool.app";
SBApplicationStateKey = 8;
SBApplicationStateProcessIDKey = 699;
SBMostElevatedStateForProcessID = 8;
}
错误 11:55:13.416290+0800 assertiond [IGCProject:699] SyscallError: setpriority(PRIO_DARWIN_ROLE, 699, 3): No such process
I am trying to understand what is causing this issue. Even after archiving and installing the app, it still crashes. According to the official documentation, Xcode 16 is supposed to support iOS 12, but this issue persists. I would like to know the possible reasons for this behavior.
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=station%20bab%20saadoun&key=GOOGLE_API_KEY&components=country:TN
func googleAutocomplete(for query: String, completion: @escaping ([GooglePlaces]) -> Void) {
let apiKey = GoogleMapAPIs.shared.apiKey
let baseURL = "https://maps.googleapis.com/maps/api/place/autocomplete/json"
guard let url = URL(string: "\(baseURL)?input=\(query)&key=\(apiKey)&components=country:TN") else {
print("Invalid URL")
completion([])
return
}
print(url)
let task = URLSession.shared.dataTask(with: url) { data, response, error in
if let error = error {
print("Error fetching data: \(error.localizedDescription)")
completion([])
return
}
guard let data = data else {
print("No data received")
completion([])
return
}
do {
let decodedResponse = try JSONDecoder().decode(GooglePlacesResponse.self, from: data)
completion(decodedResponse.predictions)
} catch {
print("Decoding error: \(error)")
completion([])
}
}
task.resume()
}
struct GooglePlaces: Codable {
let title: String?
let region: StructuredFormatting?
let placeID: String?
enum CodingKeys: String, CodingKey {
case title = "description"
case region = "structured_formatting"
case placeID = "place_id"
}
}
struct StructuredFormatting: Codable {
let main_text: String
let secondary_text: String?
}
struct GooglePlacesResponse: Codable {
let predictions: [GooglePlaces]
}
Error fetching data: The network connection was lost.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Like the title says, I'll commit some changes no problem with my Git name and email displayed properly, then work for a while longer and when use the integrate menu to stage and commit I find the git name/email are empty.
My credentials are properly entered in settings.
The only fix i've found is quitting and restarting. Any less frustrating option?
Topic:
Developer Tools & Services
SubTopic:
Xcode
Our business is to scan the code to open App Clip, but then App Clip will appear in App Library and Siri Suggestions. This can be opened quickly, but the URL of the last scan will be included. This will cause a problem, for example: if the previous scan was code A, but the user does not scan code B when going to place B and directly opens it through App Library or Siri Suggestions, the code I get is still code A, so the result I want is that I want to know where it was opened from, and then if it is opened quickly, I will clear the URL and remind the user to scan the code again. Or if it is opened by quick opening, do not include the URL
Topic:
Developer Tools & Services
SubTopic:
Xcode
I have created two different apps using ADEP, and they were working on iPad with iOS 14.6 and 14.7.1. The environments are as follows:
Environment:
1.Mac mini (Mac OS X 10.7.5)
Xcode 8.3.2
2.iMac (OS X El Capitan 10.11.6)
Xcode 7.3
The certificates were exported from the environment in 1 and imported into 2.
When I tried to switch from ADEP to AdHoc for app creation, I encountered an error. Specifically, the app worked fine on an iPad running iOS 12.5.7 in environment 1, but on devices with iOS 14.6, 14.7.1, and 17.7, the installation was successful, but when I tried to open the app, the following error message appeared:
“XXXXX” needs to be updated
To run this app on this version of iOS, the developer needs to update the app.
Additionally, in environment 2, I’m unable to archive the app.
Is it possible to create a working app by simply switching from ADEP to AdHoc without making any other changes to the environment?
Topic:
Developer Tools & Services
SubTopic:
Xcode
I updated the icons in Xcode to customize the appearance of my app icons to be light, dark, or tinted. The app is allowed to be downloaded and run on iPadOS. The app icon behaves as expected on iOS however the app icon does not change on the iPad. Am I missing a step for the iPad? To be clear the app does not target iPadOS rather it is just running the iOS version.
Thanks
kof
Topic:
Developer Tools & Services
SubTopic:
Xcode
I have Xcode on my mac. I am iOS Dev. I do not know what version of Xcode was before I did next steps, but I could say that I had iOS Simulator 18.3.1.
So I update my Xcode to Version 16.3 (16E140). At this version is available iOS Simulator 18.4. But from some time before Xcode separate downloading components and actual Xcode itself. So i make update and do not download latest iOS simulator.
What i have:
in Xcode -> Settings -> Components under " Other Installed Platforms" i have iOS 18.3.1 and 17.5
in Choose Destination dropdown menu i have nothing. And Xcode say me that i need install iOS Simulator.
After some time with ChatGPT I could not do nothing from this. I try go to : Window -> Device and Simulators and here create new simulator with 18.3.1 and make it appear Always. But it didn't help.
Solution I did: I download latest version 18.4 because i could not wait because i need fix bug only 1 hour shift and it was this hour so i fast download the simulator.
After downloading 18.4 in Choose Destination dropdown it appears all versions of simulaors and 18.3.1 and that i created and 17.5
Question:
Does Xcode force to install latest version of iOS simulator?
What is the sense of this upgrade that now Xcode is updating faster because it download 8 GB not 16 if eventually I need download 8 GB again ? The new what i could do download Xcode in the evening and Simulator in the morning?
When I use Xcode to develop the apps, the connection to my own Apple Watch is failed. The simulator has been downloaded, but it still displayed"watchOS10.0 Not Installed". The developer options were opened, I click the"trust this computer" but it always display"Connecting to *** Apple Watch". My iPhone can be connected normally.
Xcode 16.3 simulator slow to load - unusable
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!
Topic:
Developer Tools & Services
SubTopic:
Xcode
Hello everyone, I have the problem at the moment that when I create a new project in a new empty repository, the files are always opened the old project.
I have already deleted all caches and also deleted Xcode 16.2 and reinstalled.
Does anyone of you know the problem?
Best regards
Joerg
Hi,
This maybe somewhat confusing, but please bear with me.
I currently have an app in the App Store that supports iOS and tvOS. But the tvOS version was a separate app during the development process. I'd like to combine the iOS and tvOS app into one project so its easier to handle and keep track of internally.
Can I upload the new Apple TV version to the same place where the current one is, or would I have to delete the current Apple TV version before uploading the newly combined version?
I hope I made that clear enough :-)
Thank you,
Dan Uff