Cannot select individual view in selectable mode in Xcode preview, it only show the whole blue device border.
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
My app has extensions, including a share extension. When I upgraded to Sonoma and Xcode 16, the share extension compiles but it does not show up as an share option in any apps. The other extensions are working correctly.
So I then created a blank project from scratch and created a new share extension using the included wizard. I added the appropriate extension options, and no matter what I tried, even TRUEPREDICATE, the share extension will not show. I confirmed the target deployment matches the main project and went through every possible check. No matter what I do, the share extension will not show (tested on ios 15, 16,17, and 18. I am pretty certain that there is a bug in either X code 16 or in X code 16 with Sonoma. Please verify - try to create a share extension and see if it works.
Help is appreciated.
Hello, Developer team! Does anyone have an idea about the problem I'm facing with the simulator ? I'm learning how to code in SwiftUI and my simulator was working just fine but yesterday I close my laptop the other day and open today and see the code :
import SwiftUI
import SwiftData
@main
struct first_projectApp: App {
var sharedModelContainer: ModelContainer = {
let schema = Schema([
Item.self,
])
let modelConfiguration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: false)
do {
return try ModelContainer(for: schema, configurations: [modelConfiguration])
} catch {
fatalError("Could not create ModelContainer: \(error)")
}
}()
var body: some Scene {
WindowGroup {
ContentView()
}
.modelContainer(sharedModelContainer)
}
}
I don't know where it comes from . I used IOS 17.5 I try to upgrade to IOS 18 but that didn't fix the problem. Currently I'm seeing 3 errors :
Showing Recent Errors Only
Build target first project of project first project with configuration Debug
Ld /Users/amedekatamatode/Library/Developer/Xcode/DerivedData/first_project-ebsglpjmgwtgzpflkvloohzydjuf/Build/Products/Debug-iphonesimulator/first\ project.app/first\ project.debug.dylib normal (in target 'first project' from project 'first project')
cd /Users/amedekatamatode/Desktop/calculator/first\ project
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Xlinker -reproducible -target arm64-apple-ios17.5-simulator -dynamiclib -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk -O0 -L/Users/amedekatamatode/Library/Developer/Xcode/DerivedData/first_project-ebsglpjmgwtgzpflkvloohzydjuf/Build/Intermediates.noindex/EagerLinkingTBDs/Debug-iphonesimulator -L/Users/amedekatamatode/Library/Developer/Xcode/DerivedData/first_project-ebsglpjmgwtgzpflkvloohzydjuf/Build/Products/Debug-iphonesimulator -F/Users/amedekatamatode/Library/Developer/Xcode/DerivedData/first_project-ebsglpjmgwtgzpflkvloohzydjuf/Build/Intermediates.noindex/EagerLinkingTBDs/Debug-iphonesimulator -F/Users/amedekatamatode/Library/Developer/Xcode/DerivedData/first_project-ebsglpjmgwtgzpflkvloohzydjuf/Build/Products/Debug-iphonesimulator -filelist /Users/amedekatamatode/Library/Developer/Xcode/DerivedData/first_project-ebsglpjmgwtgzpflkvloohzydjuf/Build/Intermediates.noindex/first\ project.build/Debug-iphonesimulator/first\ project.build/Objects-normal/arm64/first\ project.LinkFileList -install_name @rpath/first\ project.debug.dylib -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/amedekatamatode/Library/Developer/Xcode/DerivedData/first_project-ebsglpjmgwtgzpflkvloohzydjuf/Build/Intermediates.noindex/first\ project.build/Debug-iphonesimulator/first\ project.build/Objects-normal/arm64/first\ project_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -Xlinker -debug_variant -fobjc-link-runtime -fprofile-instr-generate -L/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/amedekatamatode/Library/Developer/Xcode/DerivedData/first_project-ebsglpjmgwtgzpflkvloohzydjuf/Build/Intermediates.noindex/first\ project.build/Debug-iphonesimulator/first\ project.build/Objects-normal/arm64/first_project.swiftmodule -Xlinker -alias -Xlinker _main -Xlinker ___debug_main_executable_dylib_entry_point -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/amedekatamatode/Library/Developer/Xcode/DerivedData/first_project-ebsglpjmgwtgzpflkvloohzydjuf/Build/Intermediates.noindex/first\ project.build/Debug-iphonesimulator/first\ project.build/Objects-normal/arm64/first\ project_dependency_info.dat -o /Users/amedekatamatode/Library/Developer/Xcode/DerivedData/first_project-ebsglpjmgwtgzpflkvloohzydjuf/Build/Products/Debug-iphonesimulator/first\ project.app/first\ project.debug.dylib
ld: warning: Could not parse or use implicit file '/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/SwiftUICore.framework/SwiftUICore.tbd': cannot link directly with 'SwiftUICore' because product being built is not an allowed client of it
Undefined symbols for architecture arm64:
"_main", referenced from:
___debug_main_executable_dylib_entry_point in command-line-aliases-file
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Undefined symbol: _main
Linker command failed with exit code 1 (use -v to see invocation)
I hope someone helps me how to figure it out. Thank you!
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
Swift Packages
Swift Student Challenge
Swift
Xcode
I have an app on the App Store for many years enabling users to post text into clouds in augmented reality. Yet last week abruptly upon installing the app on the iPhone the screen started going totally dark and a list of little comprehensible logs came up of the kind:
ARSCNCompositor <0x300ad0e00>: ARSCNCompositor (0, 0) initialization failed. Matting is not set up properly.
many times, then
RWorldTrackingTechnique <0x106235180>: Unable to update pose [PredictorFailure] for timestamp 870.392108
ARWorldTrackingTechnique <0x106235180>: Unable to predict pose [1] for timestamp 870.392108
again several times and then:
ARWorldTrackingTechnique <0x106235180>: SLAM error callback: Error Domain=Slam Error Code=7 "Non fatal error occurred due to significant drop in a IMU data" UserInfo={NSDescription=Non fatal error occurred due to significant drop in a IMU data, NSLocalizedFailureReason=SlamEngineNodeGroup Failure: IMU issue: gyro data stream verification failed [Significant data drop]. Failed on timestamp: 870.413247, Last known timestamp: 865.350198, Delta: 5.063049, System timestamp: 870.415781, Delta between system and frame: 0.002534. }
and then again the pose issues several times.
I hoped the new beta version would have solved the issue, but it was not the case. Unfortunately I do not know if that depends on the beta version or some other issue, given the app may be not installed on the Mac simulator.
Hello everyone, We are seeing some warnings in Xcode 16 when I archive my iOS app for distribution. During the upload phase (either via Xcode Organizer ), I get an error like:
WARNING: Upload Symbols Failed
The archive did not include a dSYM for MyFramework.framework with the UUIDs: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
Ensure that the archive’s dSYM folder includes a DWARF file for MyFramework.framework with the expected UUIDs.
Question:
How can these warnings be fixed?
Is this warning safe to ignore if I know the vendor does not supply a dSYM for their framework?
If I do need a proper dSYM for full symbolication, how should I request it from the vendor or generate it myself from an XCFramework?
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
Frameworks
App Store Connect
Xcode
TestFlight
Hi there,
I successfully created an AppIntent for our app, and when I had it in the same target as our main app it showed up fine in the shortcuts app.
Then I realized that many of the new System Control widgets introduced in iOS 18 (e.g. lockscreen, control center) live in the widget extension target, but they also need to reference that same AppIntent. So to fix this, I thought I'd migrate out the code into it's own SPM package that both the WidgetExtension and the Main App processes can reference. However, after doing that and rebuilding, the intent no longer shows up in the Shortcuts app. Furthermore, my AppShortcutsProvider class now has this error when trying to define the list of appShortcuts:
App Intent <name> should be in the same target as AppShortcutsProvider
Is this intended, and if so, how do we reference the same AppIntent across multiple targets?
I'm trying to copy some files from the Finder on macOS 14 to several Simulator instances running iOS 16 and 17. When I right-click the file in the Finder, I can select Share > Simulator, then a share dialog pops up where I select the relevant Simulator and click on Send. According to this official help topic, the Files app should open allowing me to choose the destination, but instead nothing happens and the shared file is nothing to be seen. What's the issue?
I'm currently setting up a new build environment.
Our old build server was a small M1 Mac Mini set up to build our, up-to-now, only app.
Since we now have a second app (and probably more to come) and have some issues building all on the same mac (gem versions, flutter versions, etc.) I now set up a virtualized build environment.
I'm currently running a MacOS 15 beta 3 VM on a M2 Mac Mini also on MacOS 15 beta 3.
The VM has all basic tools inside, including Xcode 16 beta 3 and is logged in with our AppleID for our build server.
The VM is spun up with a non-persistent storage before the build, installs the gem's/flutter in the correct version, checks out the code and builds it.
Now I'm getting an error on the build, that I have to select a development team, but he team is already selected and the build is working fine on the old M1 Mac Mini.
It is suggested to login to Xcode, so I logged in to Xcode in the VM, which itself was successful, but when loading the teams I'm getting the following error:
Decoding Error
There was a failure decoding response: (HTTP 401, 60 bytes)
The data couldn't be read because it isn't in the correct format..
The account info is correct, it's the same account that is logged in to MacOS and it's the same account from the old build system.
I guess this somehow has to do with the MacOS VM (before MacOS 15 it was not possible to signin to an apple id, this is also the reason why I use the beta).
Is there any chance to fix this and get it working?
We are not able to use Xcode cloud builds (or any other cloud services) due to corporate policies.
We are also not able to buy a dedicated Mac Mini for every app (too expensive and too much time needed for maintenance).
I'm pulling my hair out here with this new Xcode 16, it complains that my app's dSYM is empty though it's clearly not, it's about 25MB.
I'm working on a project using an internal static library, everything is built inhouse using swift, we own all the source code. It worked just fine until the other week, when I updated the Xcode, and now I can't debug anything. I keep getting "type for self cannot be reconstructed" when I run "po self.some_property". Why is that?
The Debug information Format is set to DWARF with dSYM File for both the executable and lib projects.
I've been a Unix guy since before I knew myself and I enjoy fixing things myself, down to bare metal, but man, this bug is driving me crazy. Is it even a bug??
It's the first time in more than 15 years since I started coding on Mac and iPhone when a bug has defeated me. I was always able to fix things using just the documentation and google, but the Apple toolchain is getting worse and worse nowadays.
I remember the time when Apple made the complicated things simple, now they make the simple things complicated :(
I just split the static lib from the main project one year ago, because of the ridiculously long build time. Should I merge back all the code in a single project? Something seems wrong to me.
So I created this account to ask the masters. How can I get back my debug info (and sanity)? Using Xcode 15 is not an option because it doesn't run on Sequoia.
I am getting this error in a couple of places in my code with Task closure after setting Swift 6 as Language version in XCode.
Passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure
Below is minimally reproducible sample code.
import Foundation
final class Recorder {
var writer = Writer()
func startRecording() {
Task {
await writer.startRecording()
print("started recording")
}
}
func stopRecording() {
Task {
await writer.stopRecording()
print("stopped recording")
}
}
}
actor Writer {
var isRecording = false
func startRecording() {
isRecording = true
}
func stopRecording() {
isRecording = false
}
}
While making the class Recorder as Actor would fix the problem, I fear I will have to make too many classes as Actors in the class and in my scenario, there could be performance implications where real time audio and video frames are being processed. Further, I don't see any race condition in the code above. Does the error talk about possible race conditions that could arise if I were to call other functions on the self in future, or the current code itself is not safe?
It has been like this for a few hours by now. The line has not even moved a little. It is also like this for the watchOS and the tvOS too. Any suggestions? I quit Xcode but do I have to have Xcode open and running for them to "verify"?
Topic:
Developer Tools & Services
SubTopic:
Xcode
Build functions on simulator but when I select run on connected iPhone (12 Pro Max, latest iOS 18 beta) I am given a prompt window that says:
Preparing Tom's iPhone
Xcode will continue when the operation is complete
with a loading icon. I have let it sit on this screen for over an hour with no change.
Running Xcode 16 Beta 4 on M3 MacBook Pro
Topic:
Developer Tools & Services
SubTopic:
Xcode
Latest version of Xcode 16.1.
I have an existing package dependency which is sitting on a git@ssh.dev.azure.com account.
So, now whenever I remove that package dependency, I can no longer add it within the Xcode UI. Just no possible way to add it or find it in the Search or Enter Package URL text field.
How on earth are we meant to add SSH packages now?
Anyone else have this issue? If so, have you found a work-around without having to manually edit the package dependencies in the project?
When overriding the following seek functions in a custom subclass of AVPlayerItem, a "method does not override method from its superclass" error occurs, causing the build to fail. This issue only happens after updating to Xcode 16. Do you have any suggestions on how to fix it?
https://developer.apple.com/documentation/avfoundation/avplayeritem/seek(to:completionhandler:)-91gnw
https://developer.apple.com/documentation/avfoundation/avplayeritem/seek(to:tolerancebefore:toleranceafter:completionhandler:)
(This error disappears 3 seconds after the build fails or temporarily disappears when the function's position in the file is changed.)
When I open the "devices and simulators" window now I only see "No selection" in the center. No sidebar pane, and no detail pane. I was able to set up some simulators up to last week or so, and now this. I've no idea how to create a new simulator or inspect the ones I have.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Why is Apple not releasing Swift Assist?
In developing a new MacOS app in Xcode I set up a Storekit configuration file so I could test 2 non-consumable purchases locally. I've been successfully testing them for the past couple of weeks, but suddenly yesterday I found I was unable to make purchases. I can successfully fetch products, but when I try to purchase either of them, I get the following error:
Error handling payment sheet request: Error
Domain=NSCocoaErrorDomain Code=4099 "The connection to service
created from an endpoint was invalidated from this process." UserInfo=
{NSDebugDescription=The connection to service created from an
endpoint was invalidated from this process.}
Purchase did not return a transaction: Error Domain=ASDErrorDomain
Code=5115 "Received failure in response from Xcode" UserInfo=
{NSDebugDescription=Received failure in response from Xcode,
NSUnderlyingError=0x600002d44ae0 {Error
Domain=NSCocoaErrorDomain Code=4099 "The connection to service
created from an endpoint was invalidated from this process." UserInfo=
{AMSDescription=An unknown error occurred. Please try again.,
AMSURL=http://localhost:51482/WebObjects/MZBuy.woa/wa/inAppBuy,
NSDebugDescription=The connection to service created from an
endpoint was invalidated from this process., AMSStatusCode=200,
AMSServerPayload={
"app-list" = (
);
dialog = {
cancelButtonString = Cancel;
defaultButton = Buy;
explanation = "Do you want to buy one App Registration for $2.99?\n\n[Environment: Xcode]";
initialCheckboxValue = 1;
"m-allowed" = 0;
message = "Confirm Your In-App Purchase";
okButtonAction = {
buyParams = "bid=com.airlinemates.backup&bvrs=1.4&offerName=EIBREG&quantity=1&deviceVerification=5084f98e-ab99-5846-827e-048d00d9fac3";
itemName = EIBREG;
kind = Buy;
};
okButtonString = Buy;
paymentSheetInfo = {
caseControl = true;
confirmationTitle = Pay;
countryCode = US;
currency = USD;
designVersion = 2;
displayPrice = "$2.99";
flexList = (
{
value = (
{
style = priceMain;
value = "$2.99";
},
{
style = priceSub;
value = "One-time charge";
}
);
},
{
header = "$null";
value = "For testing purposes only. You will not be charged for confirming this purchase.";
}
);
price = "2.99";
requestor = AppStore;
salableIcon = "http://localhost:53078/StoreKit/AppIcon?bid=com.airlinemates.backup";
salableIconType = app;
salableInfo = (
"App Registration %%image_0%%",
backup,
"In-App Purchase"
);
styles = (
{
bold = true;
name = priceMain;
size = large;
},
{
color = gray;
name = priceSub;
},
{
bold = true;
name = priceMainSpaceBefore;
size = large;
spacingBefore = medium;
}
);
title = {
type = text;
value = Xcode;
};
};
};
"download-queue-item-count" = 0;
dsid = 17322632127;
failureType = 5115;
jingleAction = inAppBuy;
jingleDocType = inAppSuccess;
pings = (
);
}}}}
I've Googled & can't find any reference to this specific error, or even anything that points me in a direction to find the root cause. It's very strange because I haven't made any changes to the code & I hadn't changed the configuration file prior to this error appearing. I've since deleted the configuration file & created a new one - but it's still not working. If I create a transaction in Storekit transaction manager, the app picks it up as having been purchased - so the issue is only isolated to purchases initiated from the app.
If I stop using the configuration file when I run the app, it works fine through sandbox testing the real items in App Store Connect.
I've got a macOS app with a Widget Extension. When I try to run the scheme attached to this extension, WidgetKit Simulator "unexpectedly quits" and I get plenty of errors such as the ones below, that do not seem to be at all linked with the purpose nor the functionalities explicitly used by the app (nor the extension).
That's what I get in Xcode's console:
com.apple.siri.AssistantSettingsControls failed to find valid container bundle for file:///System/Library/ExtensionKit/Extensions/AssistantSettingsControlsExtension.appex/ at /System/Library/ExtensionKit/Extensions/AssistantSettingsControlsExtension.appex
com.apple.settings-intents.LoginItemsIntents failed to find valid container bundle for file:///System/Library/ExtensionKit/Extensions/LoginItemsIntentsExtension.appex/ at /System/Library/ExtensionKit/Extensions/LoginItemsIntentsExtension.appex
com.apple.SoftwareUpdate.SoftwareUpdateSettingsWidget failed to find valid container bundle for file:///System/Library/ExtensionKit/Extensions/SoftwareUpdateSettingsWidgetExtension.appex/ at /System/Library/ExtensionKit/Extensions/SoftwareUpdateSettingsWidgetExtension.appex
com.apple.settings-intents.PrinterScannerIntents failed to find valid container bundle for file:///System/Library/ExtensionKit/Extensions/PrinterScannerIntentsExtension.appex/ at /System/Library/ExtensionKit/Extensions/PrinterScannerIntentsExtension.appex
com.apple.settings-intents.WallpaperIntents failed to find valid container bundle for file:///System/Library/ExtensionKit/Extensions/WallpaperIntentsExtension.appex/ at /System/Library/ExtensionKit/Extensions/WallpaperIntentsExtension.appex
com.apple.settings-intents.ScreenSaverIntents failed to find valid container bundle for file:///System/Library/ExtensionKit/Extensions/ScreenSaverIntentsExtension.appex/ at /System/Library/ExtensionKit/Extensions/ScreenSaverIntentsExtension.appex
In the error log (Console crash logs), the error description:
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x000000010428507c
Termination Reason: Namespace SIGNAL, Code 5 Trace/BPT trap: 5
Terminating Process: exc handler [31252]
I have observed that even if I try creating a new blank project and add a Widget Extension (keeping everything default) and try to run the scheme, I end up (after setting IDEPreferLogStreaming to YES in the environment variables) with the exact same errors.
What is the issue? How can I fix it?
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
I have an M2 Mac Mini with Apple Clang 16.0.0. Under certain circumstances, the SIMD code generated by an unrolled loop is incorrect.
I have a short example program which reproduces the bug, on my machine and someone else's with the same Clang version. The core operation is this:
for (size_t i = 0; i < count; ++i) {
c[i] = a[i]*std::conj(b[i]);
}
This loop gets unrolled to process 4 elements at once, and when count=15, the first 12 results have the wrong sign for the imaginary part. The final 3 elements are correct, since those are processed in a different code path.
Is this an known error? I suspect it might be present in other Apple Clang versions as well (because I found this while chasing down an extremely unpredictable bug) but so far this is the only setup where I've cleanly reproduced it.
Minimal test program (43 lines): https://signalsmith-audio.co.uk/tmp/argh.git/ - just run make.
The expected output is a bunch of error=0, or small values from floating-point errors.
I'm getting results like error=0.229711, and you can see it's because the "actual" results have a ± error.