I just created a new project in the newest version of Xcode as a sample project for a feedback.
Bug 1
So simply what I do in every new project is create a "Supporting Files" group (not a folder because I don't want to move these files on the file system). I put the following files in this group:
.entitlements file
-the Info.plist (which apparently new projects don't create anymore because I don't see one).
main.m
Assets.xcassets
In previous version of Xcode this was done with the "New Group without Folder" action (though back in the day I believe you'd get yellow folders in "New Group" and blue folder with 'New Folder" and they were separate actions.... which was actually better and much less insane IMO but that's not really important to this).
In any case, "New Group without Folder" is nowhere to be found in the context menu. I finally was able to get "New Group" to appear as long as I wasn't right clicking underneath any directory. But.... New Group actually creates a New Folder, just like New Folder. So I put the .entitlements in the Supporting Files group (which is not a group, but a directory) and the app won't compile unless I fix the path in project settings because I moved the file which is most definitely not what I wanted.
So we can no longer group files in the project navigator without moving them to new directories? Is this intentional behavior? It can't be, right?
Bug 2
I noticed dragging and dropping to reorder files in the project navigator no longer seems to work? In previous versions of Xcode I could drag and drop to reorder files (in groups and in folders, this would work). This appears to no longer work. I just have to accept the way Xcode orders my project files?
Dive into the vast array of tools, services, and support available to developers.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
Hi,
I recently updated to Xcode 16. Since then I successfully built my app and sent an update to the App Store.
But suddenly, after an exception I've experienced while working on my code, the app is crashing on launch, without showing the stack trace, and showing only one warning in the console:
warning: (arm64) /Users/myuser/Library/Developer/Xcode/DerivedData/myapp-bglvscamatwthwbfqmtzmbvxeewc/Build/Products/Debug-iphonesimulator/myapp.app/MyApp empty dSYM file detected, dSYM was created with an executable with no debug info.
Tried deleting derived data
Erasing all simulator data
Reseting my computer
No change yet. Any idea what am I missing?
Thank you..
Hello. In the Xcode 15 we were using this command in the terminal to run our tests on the Rosetta Simulator:
xcodebuild -workspace CoreLibraries.xcworkspace -scheme CoreLibraries -destination 'platform=iOS Simulator,name=iPhone 15,arch=x86_64' test`
In the Xcode 16 the same command doesn't work anymore. It produces the error:
xcodebuild: error: Unable to find a device matching the provided destination specifier:
{ platform:iOS Simulator, arch:x86_64, OS:latest, name:iPhone 16 }
Unsupported device specifier option.
The device “iPhone 16” does not support the following options: arch
Please supply only supported device specifier options.
Running test directly from the Xcode UI using iPhone 16 (Rosetta) still works fine.
Does anyone know how to modify the xcodebuild command to make it work again?
There is a significant regression in Xcode 16.0 and 16.1 (16B5014f) in that it no longer allows asset files other than .SCN files to be added to a .scnasset group and folder. This really wrecks our ability to maintain our app since we heavily depend on additional assets like .USDZ, .JPEG, .PNG, etc. files to be able to be included in the group for on-demand resource tagging and loading.
I filed FB15239224 but I'm wondering if this is intentional and if anyone knows of a workaround.
I am using the latest version of Xcode 16, and I have created a GPX file in my project. However, I am unable to see or select the file to simulate the GPS location. I have attempted to uninstall and reinstall Xcode completely, but the issue persists. Has anyone encountered a similar problem? How can I resolve this? Thank you.
Since upgrading to Xcode 16, I've noticed that when I add new files to my local Swift packages, the "Update Package" option is no longer available when I right-click on my local package.
In previous versions of Xcode, I used this feature to make Xcode recognize newly added files without any issues.
Now, with Xcode 16, the only way I've found to get Xcode to recognize new files is to remove and re-add the entire package, which is obviously not ideal.
I've tried cleaning the build folder and rebuilding the project, but it doesn't seem to help.
Is there a new workflow or method in Xcode 16 to refresh or update local Swift packages without needing to remove and re-add them every time?
Any suggestions or workarounds would be greatly appreciated!
What I’ve tried so far:
Cleaning and rebuilding the project
Looking for any options under "File > Packages" menu
Environment:
Xcode 16
Local Swift Package
Thanks in advance!
I am able to setup and schedule a background refresh task as well as manually trigger it via Xcode and the simulator tied to my iPhone 11 Pro test phone using the e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier: However, it won't execute on the app on it's own. And yes, the pinfo.list entries are correct and match!
I know the scheduler is not exact on timing but it's just not executing on its own. Since I can trigger manually it I'm pretty sure the code is good but I must be missing something.
I created an observable object for this code and the relevant parts look like this:
class BackgroundTaskHandler: ObservableObject {
static let shared = BackgroundTaskHandler()
var taskState: BackgroundTaskState = .idle
let backgroundAppRefreshTask = "com.opexnetworks.templateapp.shell.V1.appRefreshTask"
func registerBackgroundTask() {
BGTaskScheduler.shared.register(forTaskWithIdentifier: backgroundAppRefreshTask, using: nil) { task in
self.handleAppRefresh(task: task as! BGAppRefreshTask)
}
self.updateTaskState(to: .idle, logMessage: "✅ Background app refresh task '\(backgroundAppRefreshTask)' registered.")
BGTaskScheduler.shared.register(forTaskWithIdentifier: backgroundTaskIdentifier, using: nil) { task in
self.handleProcessingTask(task: task as! BGProcessingTask)
}
self.updateTaskState(to: .idle, logMessage: "✅ Background task identifier '\(backgroundTaskIdentifier)' registered.")
}
// Handle the app refresh task
private func handleAppRefresh(task: BGAppRefreshTask) {
self.updateTaskState(to: .running, logMessage: "🔥 app refresh task is now running.")
PostNotification.sendNotification(title: "Task Running", body: "App refresh task is now running.")
let queue = OperationQueue()
queue.maxConcurrentOperationCount = 1
let operation = BlockOperation {
self.doSomeShortTaskWork()
}
task.expirationHandler = {
self.updateTaskState(to: .expired, logMessage: "💀 App refresh task expired before completion.")
PostNotification.sendNotification(title: "Task Expired", body: "App refresh task expired before completion \(self.formattedDate(Date())).")
operation.cancel()
}
operation.completionBlock = {
if !operation.isCancelled {
self.taskState = .completed
}
task.setTaskCompleted(success: !operation.isCancelled)
let completionDate = Date()
UserDefaults.standard.set(completionDate, forKey: "LastBackgroundTaskCompletionDate")
self.updateTaskState(to: .completed, logMessage: "🏁 App refresh task completed at \(self.formattedDate(completionDate)).")
PostNotification.sendNotification(title: "Task Completed", body: "App refresh task completed at: \(completionDate)")
self.scheduleAppRefresh() // Schedule the next one
}
queue.addOperation(operation)
}
func scheduleAppRefresh() {
// Check for any pending task requests
BGTaskScheduler.shared.getPendingTaskRequests { taskRequests in
let refreshTaskIdentifier = self.backgroundAppRefreshTask
let refreshTaskAlreadyScheduled = taskRequests.contains { $0.identifier == refreshTaskIdentifier }
if refreshTaskAlreadyScheduled {
self.updateTaskState(to: .pending, logMessage: "⚠️ App refresh task '\(refreshTaskIdentifier)' is already pending.")
// Iterate over pending requests to get details
for taskRequest in taskRequests where taskRequest.identifier == refreshTaskIdentifier {
let earliestBeginDate: String
if let date = taskRequest.earliestBeginDate {
earliestBeginDate = self.formattedDate(date)
} else {
earliestBeginDate = "never"
}
self.updateTaskState(to: .pending, logMessage: "⚠️ Pending Task: \(taskRequest.identifier), Earliest Begin Date: \(earliestBeginDate)")
}
// Optionally, show a warning message to the user in your app
PostNotification.sendNotification(title: "Pending Tasks", body: "App refresh task is already pending. Task scheduling cancelled.")
return
} else {
// No pending app refresh task, so schedule a new one
let request = BGAppRefreshTaskRequest(identifier: refreshTaskIdentifier)
request.earliestBeginDate = Date(timeIntervalSinceNow: 15 * 60) // Earliest in 15 minutes
do {
try BGTaskScheduler.shared.submit(request)
self.taskState = .scheduled
self.updateTaskState(to: .scheduled, logMessage: "✅ App refresh task '\(refreshTaskIdentifier)' successfully scheduled for about 15 minutes later.")
PostNotification.sendNotification(title: "Task Scheduled", body: "App refresh task has been scheduled to run in about 15 minutes.")
} catch {
print("Could not schedule app refresh: \(error)")
self.taskState = .failed
self.updateTaskState(to: .failed, logMessage: "❌ Failed to schedule app refresh task.")
}
}
}
}
// Short task work simulation
private func doSomeShortTaskWork() {
print("Doing some short task work...")
// Simulate a short background task (e.g., fetching new data from server)
sleep(5)
print("Short task work completed.")
}
In my AppDelegate I trigger the registerBackground task in the didFinishLaunchingWithOptions here:
BackgroundTaskHandler.shared.registerBackgroundTask()
And I scheduled it here in the launch view under a task when visible:
.task {
BackgroundTaskHandler.shared.scheduleAppRefresh()
}
I've also tried the last in the AppDelegate after registering. either way the task schedules but never executes.
So I have a MacOS application that was working just fine before Xcode 16. The Widgets are not working anymore.
The main application and the widgets share a file in a common App Group.
The widget app now get a permission error when accessing the file.
Also, the Widget Kit simulator keeps crashing.
I also try to start a new project in Xcode, add a target with a Widget extension with an App Intent and run it, and it also crashes.
Sometimes, it doesn't crash but just display the error: "Failed to load widget. The operation couldn't be completed. (WidgetKit_Simulator.WidgetDocument.Error error 2.).
Edited to attach WidgetKit error log
widgetKitError.txt
I installed xcode 16 and both Predictive Code Completion Model and iOS 18.0 Simulator Failed Download.
I can live without the code completion, but I can not get any Simulator to install.
I clicked of the info button and it shows the following:
Download failed.
Domain: DVTDownloadableErrorDomain
Code: 41
User Info: {
DVTErrorCreationDateKey = "2024-09-30 15:57:24 +0000";
}
Download failed.
Domain: DVTDownloadableErrorDomain
Code: 41
Failed fetching catalog for assetType (com.apple.MobileAsset.iOSSimulatorRuntime), serverParameters ({
RequestedBuild = 22A3351;
})
Domain: DVTDownloadsUtilitiesErrorDomain
Code: -1
Download failed as the server said authentication failed. (Catalog download for com.apple.MobileAsset.iOSSimulatorRuntime)
Domain: com.apple.MobileAssetError.Download
Code: 41
User Info: {
checkServer = 1;
}
System Information
macOS Version 15.0 (Build 24A335)
Xcode 16.0 (23051) (Build 16A242d)
Timestamp: 2024-09-30T10:57:24-05:00
The Account Holder is no longer able to log into apple (regardless of web-based or device based attempts). The membership will expire soon without access to the account holder.
Both workflows "iforgot.apple.com" and "iforgot.apple.com/unlock" did not lead to an answer email within several days. I tried several times.
So we are almost out of store without any option. Hotline did not show other options.
Any ideas?
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:)
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?
I’ve noticed a strange bug in Xcode 16 and Swift. When a preview is rendering and hasn’t finished yet and you run an app to debug, Xcode is launching two instances of the app. Has anyone else noticed this issue? If you let the preview finish rendering before running the app, this doesn’t happen. Very odd.
I am trying to fix a bug in my iOS app that is dependent upon date and time. Is there any way to set the actual time on the iOS Simulator to a specific date and time? I know that you can set one for the status bar, but that doesn't affect the actual date and time that is reported by the system to apps.
Dear
We try to generate IPA with Xcode Cloud but this task fail in Export archive phase (Export archive for app-store distribution).
The error that appear in the archive logs is:
error: exportArchive Provisioning profile "iOS Team Store Provisioning Profile: cl.app.myapp" doesn't include the com.apple.CommCenter.fine-grained entitlement.
Any idea about to resolve this problem ?
king regards
Topic:
Developer Tools & Services
SubTopic:
Xcode Cloud
Tags:
Xcode Cloud
Entitlements
Provisioning Profiles
until previous version of the Xcode, I can see the backtrace of view by edit scheme -> Diagnostics -> Logging -> check Malloc Stack and select All Allocation and Free History` but the option just gone in Xcode 16.
Hi,
i have met error below when i tried to po one attributes of an instance in my Xcode lldb:
error: type for self cannot be reconstructed: type for typename "$xxxxx" was not found (cached)
error: Couldn't realize Swift AST type of self. Hint: using `v` to directly inspect variables and fields may still work.
Is there anybody met the same error before? I urgently want to know why this happen and how to fix this issue.
My macOS Version is Sequoia v15.0.1, Xcode16.0. This problem showed after i upgraded my macOS and Xcode version.
Initially, I had some issues enrolling in the individual Apple developer program. Then, I contacted support via email, and they finally requested that I verify my identity. I submitted my national ID for verification and then received an email stating that my identity was verified. After that, I tried to enroll in the Apple developer program, but the issue persisted even after they instructed me to proceed. Subsequently, I received an email stating that my identity was not verified. Here is the exact wording from the email: "We can’t verify your identity with the Apple Developer app or provide further assistance with the Apple Account for Apple developer programs." After that, I tried to reach support several times, but there has been no response from them.
Topic:
Developer Tools & Services
SubTopic:
Apple Developer Program
Tags:
App Store
App Store Connect
Developer Program
I am trying to update my AboutView.xib file (https://git.callpipe.com/AccelerateNetworks/an-mobile-ios/-/blob/main/Classes/Base.lproj/AboutView.xib) through the xcode interface builder, and the changes that I make are correctly reflected in the wysiwyg, as well as in the file itself. However, I whenever the app is built and installed, it shows an older version of the about page.
Things I have tried to resolve this are (not listed in order):
Product > Clean Build Folder
Uninstall and reinstall the app
Restart the phone
Restart xcode
Restart the computer
Test a build created through xcode cloud
rm -rv ~/Library/Developer/Xcode/DerivedData
rm -rf ~/Library/Caches/com.apple.dt.Xcode
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
Changing something in the xib file (hoping it will recognize a change)
The only time the about page has shown something different is when I deleted the xib entirely. The project still built and deployed to the test device, but the about page was completely blank. This tells me I am working with the correct file, and when I look at the xml contents of the file, I can't find any of the old strings that are showing up.
What the editor shows:
What the app shows:
Topic:
Developer Tools & Services
SubTopic:
Xcode
Xcode Preview is not working.
Successed to build Preview but error message displays like below:
I think it's maybe related with loader path followed by error details below.
I created xcproj file using tuist 4.19.0.
How can I fix this issue?
Error Details