My app start up has became horrid. It takes 1 minute to open SQLlite database for my rust core. Impossible to work...
I have Address Sanitizer, Thread Perf Checker and Thread Sanitizer disabled...
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
Activity
I have an AppleTV app which I released in 2016. I've updated it and released a new version every year without much hassle.
This year, with tvOS 17.2, the layered app icon isn't working right. This is a two-layer image made with PNGs.
When it's selected, it looks right and the layers move correctly:
But when it's not selected, the background layer disappears:
Screenshots are from the simulator but it also happens on the device. It's inconsistent; sometimes it's the front layer that disappears. Occasionally both layers work, but I can't tell why.
I've spent a day trying everything. Very frustrated.
The icon previews correctly in Xcode and in Parallax Viewer.
The image sizes are correct: 400 x 240 for Small, 800 x 480 for Small@2x, 1280 x 768 for Large.
The back layer is a non-transparent PNG.
I tried adding a Large@2x set. Didn't help.
Originally I had a three-layer image with no middle layer PNG. I deleted the empty middle layer, but that didn't help.
All the PNG files are from GnuIMP. Same color space, even.
I was using the filenames tvicon-back-s.png and tvicon-back-s@2x.png. I tried taking out the @ sign in case that was confusing Xcode. (It never has before, but I am flailing here.)
Anybody have any clues? If it's an Apple bug and there's nothing I can do, I'm going to just push the release button and hope it fixes itself someday.
ITMS-90078: Missing potentially required entitlement - Your app, or a library that’s included in your app, uses Apple Push Notification service (APNs) registration APIs, but the APS Environment Entitlement isn’t included in the app signature’s entitlements. If your app uses APNs, make sure the App ID is enabled for push notifications in Certificates, Identifiers & Profiles, sign the app with a distribution provisioning profile that includes the APS Environment Entitlement, and upload a new build to ensure that push notifications function as intended. For details, visit: https://developer.apple.com/documentation/usernotifications/registering-your-app-with-apns.
I tried to post a reply to a thread. It seems to be posted, but does not appear in the thread once sent…
I'm currently exploring Instruments for profiling and tracing on macOS 15.6.1. I know there is the "network connections" instrument which records TCP/UDP information, however it seems to not include the "lo0" (loopback) interface.
Is there a way to configure it so that localhost traffic is included in the recording? as the application I'm tracing uses that and I want that information to be included in traces.
The documentation for network-interface-detection schema makes no mention of how it detects interfaces.
Thanks in advance.
At the Platform State of the Union, Apple demoed clicking a ✨ button in the Xcode toolbar to use Apple Intelligence in Xcode.
I don't see that button in Xcode Version 26.0 beta (17A5241e). Am I missing it? It's supposed to be in the upper-left corner, right?
Do I need to turn it on or something? I'm on macOS 15.5 Sequoia, on a 16-inch, 2021 MacBook Pro
Hello!
When launching/debugging on my iPad and iPhone I keep getting the following error:
“Previous preparation error: Failed to find a DDI … Run ‘devicectl list preferredDDI’ …”
I believe this was caused by a previously interrupted Xcode update around June due to low disk space, which may have left DeviceSupport/DDI/CoreDevice files incomplete. Even after finishing the update later, the error persists. I now use a new Mac with 4 TB of storage, but the issue still occurs.
Since then I have unfortunately been blocked from testing or presenting my app on devices. It seems that only a new, fully completed Xcode update might resolve the problem.
Tried so far:
– Cleared caches (CoreDevice/Devices)
– Reset trust on device and re-paired
– Checked devicectl list preferredDDI
I would really appreciate guidance, as at the moment I cannot present my app due to this blocking issue.
Thank you very much for your support!
Topic:
Developer Tools & Services
SubTopic:
Xcode
I'm getting EXC_BAD_ACCESS (code=2, address=0x7ff8a6e2fcce) when launching my app on the simulator with Address or Thread Sanitizer enabled. I'm running Xcode 16.3 (16E140) on macOS Sequoia 15.4.1 (24E263). The call stack looks like the following.
On the device, there is no crash, but this message is printed to the console:
malloc: nano zone abandoned due to inability to reserve vm space.
(Not sure if it's related.)
Does anybody know what is causing the crash?
Thread 1
#0 0x0000000103361f5b in __sanitizer::MemoryMappingLayout::Next ()
#1 0x000000010336034b in __sanitizer::MemoryRangeIsAvailable ()
#2 0x000000010334db77 in __asan::InitializeShadowMemory ()
#3 0x0000000103395069 in __asan::AsanInitInternal() (.cold.1) ()
#4 0x000000010334d352 in __asan::AsanInitInternal ()
#5 0x0000000103394f65 in __asan_init.cold.1 ()
#6 0x000000010334d325 in __asan::AsanInitFromRtl ()
#7 0x0000000103343289 in wrap_malloc_default_zone ()
#8 0x00007ff801b15f86 in __malloc_init ()
#9 0x00007ffa160080be in libSystem_initializer ()
#10 0x000000010306eb11 in invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const ()
#11 0x000000010308f364 in invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const ()
#12 0x00000001030aad7c in invocation function for block in mach_o::Header::forEachSection(void (mach_o::Header::SectionInfo const&, bool&) block_pointer) const ()
#13 0x00000001030a83c9 in mach_o::Header::forEachLoadCommand ()
#14 0x00000001030a98c8 in mach_o::Header::forEachSection ()
#15 0x000000010308ef62 in dyld3::MachOAnalyzer::forEachInitializer ()
#16 0x000000010306e9ac in dyld4::Loader::findAndRunAllInitializers ()
#17 0x0000000103074da1 in dyld4::JustInTimeLoader::runInitializers ()
#18 0x00000001030807c5 in dyld4::APIs::runAllInitializersForMain ()
#19 0x000000010305efac in dyld4::prepare ()
#20 0x000000010305e36e in _dyld_sim_prepare ()
#21 0x000000010993b2a0 in dyld4::prepareSim ()
#22 0x0000000109939963 in dyld4::prepare ()
#23 0x000000010993981f in dyld4::start(dyld4::KernelArgs*, void*, void*)::$_0::operator()() const ()
#24 0x00000001099394da in start ()
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
iOS
Xcode
Simulator
Xcode Sanitizers and Runtime Issues
Hi everyone, (you can answer in french)
I’m french-rookie in xcode, and I have a problem:
I’m trying to choice my custom font to add it in my Main.storyboard button, but it not works.
I have my « Font provided by application » line in my Info.plist, with the name of my font in [0]
(See images below)
When I’m on storyboard button, I chose « custom » in font selector, then display font list but my custom font doesn’t appear.
I already tried to install the font in my mac, but still stucked, nothing change 😭
Could you help me please?
Thanks a lot
(I specify that I scrupulously followed the way of doing explained on the Apple official page:
Adding a Custom Font to Your App )
I downloaded the latest version of Xcode 26 (beta). I'm running Max OS 15.5. How can I use Claude 4 Opus? I can't wait to try this out. Thanks in advance!
Topic:
Developer Tools & Services
SubTopic:
Xcode
Xcode 16.3 repeatedly logs a same message very frequently, as fast as a single thread can. I use Instruments and Console and find out the log is:
Needs flush!
by -[DNTBrotliDecoder decodeBytes:length:] in DNTDocumentationSupport.
The call is on a single non-main thread. I've tried to clear caches and it seems doesn't change. Yet I don't know exact point when the logging starts since launch.
Fortunately, this thread is dispatched at E cores, bringing approximately 2 watts of power load to my Mac.
Environments:
macOS 15.4 (24E248)
Xcode 16.3 (16E140)
M4 chip
I encountered this issue with an app I'm writing that accepts arguments. With some troubleshooting I've determined that this is an inherent behaviour in how Xcode 16 compiles SwiftUI apps and how macOS 15 launches them.
The issue:
Launching the app as open /Applications/AppName.app --args --arg1 --arg2 --arg3 etc should allow the app to process the arguments as CommandLine.arguments and this is still the case. How the app sees arguments is unchanged and doesn't matter if you use CommandLine.arguments or swift argument parser or don't have arguments at all. This will affect any SwiftUI app as I'll demonstrate below.
The problem is that if you use a mix of arguments as --arg value pairs or --arg as a flag, then depending on the order the arguments are provides, the app won't launch properly. The icon will appear in the dock but no window appears until you click the icon in the dock. (BTW, having "Application is agent (UIElement)" set to YES in the Info.plist makes this task rather difficult.)
In testing if you use all flags, it's fine. if the flags are in pairs, it's fine. if you have one flag and then a --arg value pair, you will see the issue. If you reverse the order so the flag is after then it works fine.
How to replicate:
On macOS 15 and Xcode 16
Open Xcode
Create a new macOS App (called demoapp in my example)
Select SwiftUI as the interface
Build
That it. Don't add anything and just build the boilerplate hello world app that Xcode makes for you. Once that's built, cd to your /Build/Products/Debug/ directory in terminal and try the following (this happens if you build for release as well):
note, the app window will display when you click the icon in the dock, just not on initial launch
# three single arguments
open ./demoapp.app --args --foo --bar --baz
# App window displays as expected
# one single argument, one arg value pair
open ./demoapp.app --args --foo --bar baz
# The app window will not appear.
# same arguments as before but the single argument is after the arg value pair
open ./demoapp.app --args --bar baz --foo
# App window displays as expected
# arg[1] without `-` or `--` prefix
open ./demoapp.app --args foo --bar --baz
# The app window will not appear.
# arg[1] and arg [2] without prefix
open ./demoapp.app --args foo bar --baz
# The app window will not appear.
# single - in front of the first two arguments
open ./demoapp.app --args -foo -bar baz
# The app window will not appear.
# single - in front of the first three arguments
open ./demoapp.app --args -foo -bar -baz bob
# App window displays as expected
No idea what is going on but I suspect macOS does some pre-processing before launching the app, for example you can do stuff like open /Applications/SomeApp.app --args -AppleLanguages '(de)' to run using a specific language. I presume the OS is pre-processing arguments before launching the app proper.
If I compile the app using Xcode 15.4 then this issue is not present. Also Apps compiled with Xcode 16 do not exhibit the issue on macOS 14 or earlier. It's a specific Xcode 16, macOS 15 thing in the way the app is compiled that makes it behave this way.
I hope I've explained it correctly, but it's very easy to replicate. I filed a feedback for it (under a different apple account), FB15577018.
Any insight into what's going on here would be helpful. Also if there's any compiler flags I could be setting. In my actual project, I'm not making any other changes. The same code compiled under Xcode 16 (.0 or .1RC) behaves differently to Xcode 15.4.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Hi everyone. I have the following code that I am trying to execute in Xcode. I then install it on my iPhone. It doesn't run at all and I don't know why. Any thoughts?
Thank you.
import CoreMotion
class MyViewController: UIViewController {
let motionManager = CMMotionManager()
func startAccelerometer() {
if motionManager.isAccelerometerAvailable {
motionManager.accelerometerUpdateInterval = 0.1 // 10 updates per second
motionManager.startAccelerometerUpdates(to: .main) { (data, error) in
guard let accelerometerData = data else { return }
let x = accelerometerData.acceleration.x
let y = accelerometerData.acceleration.y
let z = accelerometerData.acceleration.z
// Process the x, y, and z acceleration values here
print("X: \(x), Y: \(y), Z: \(z)")
}
}
}
}
Topic:
Developer Tools & Services
SubTopic:
Xcode
import SwiftUI
struct viewdetail: View {
@State var text1:String = ""
@State var tip1:String = ""
@State var text23:String = ""
@State var tip23:String = ""
var body: some View {
Text(text1);Text(tip1);Text(text23);Text(tip23)
}
}
func detailLine(costa:inout [Double],tipa:inout [Double]) {
print(costa,tipa)
text1 = "125" cannot find 'text1' in scope
print("detail")
}
func delete(costa:inout [Double],tipa:inout [Double],number: inout Int) {
print(costa,tipa)
tipa.removeLast()
costa.removeLast()
number -= 1
print(costa,tipa)
}
#Preview {
viewdetail()
}
Does anyone know why I'm getting "cannot find text1 in scope"?
Topic:
Developer Tools & Services
SubTopic:
Xcode
Hi folks,
I've been having this issue for the last few months, where Xcode Cloud fails to resolve Swift package dependencies while compiling my builds, seemingly at random.
Some of my Xcode Cloud builds will fail after several minutes, with an error log looking like that :
xcodebuild: error: Could not resolve package dependencies: failed downloading 'https://dl.google.com/firebase/ios/bin/grpc/1.62.2/rc0/grpcpp.zip' which is required by binary target 'grpcpp': downloadError("The request timed out.")
Whenever this happens, I have to manually restart an Xcode Cloud build process (or several builds, since the error can happen multiple times in a row), to the point it's becoming increasingly painful to rely on Xcode Cloud for my workflow.
The failing packages are mostly random (meaning, it's not always the same one that Xcode fails to resolve), but they are always publicly accessible, even though I have an environment variable set in my Xcode workflows to retrieve a single Github private dependency (maybe this has some kind of importance).
Could anyone tell me if this is an isolated issue, or if I could do anything on my end to resolve this ?
Thank you !
Topic:
Developer Tools & Services
SubTopic:
Xcode Cloud
Tags:
Swift Packages
Continuous Integration
Xcode Cloud
I use CMake for my builds not the XCode GUI.
I want to be able to build a single .app that contains both the GUI version and the command line version. I have seen products that ship both as part of the same .app (e.g. CMake) so this is clearly entirely possible, the 64k question is HOW?
Right now I am building them as separate apps - lets call them DSS and DSSCL (*).
The code base for each is in its own directory - each with its own CMakelists.txt file.
My initial thoughts are to change the build for DSSCL so it doesn't create a bundle and then simply copy the DSSCL command and related .qm files into DSS.app/.../MacOS.
However that's likely enough totally wrong, so how should I handle this please.
As much detail as possible please, I am very new to macOS development -please don't assume knowledge of stuff that's second nature to you
Many thanks
David
(*) Strictly they are DeepSkyStacker and DeepSkyStackerCL
Topic:
Developer Tools & Services
SubTopic:
General
Last week we received this e-mail from Apple, without any information about reasons. Our infrastructure builds on Apple infrastructure and contains more than 1000 iOS devices. We have paid enterprise account until April 2025. Why Apple cancelled our membership?
We are reaching out to inform you that your Apple Developer Enterprise Program ("ADEP") membership will be terminated, effective February 12, 2025.
Please be assured that this decision is not a result of any action or inaction on your part, and it is not subject to appeal.
As of February 12, 2025, you will no longer have access to your membership and account-related services for developing and distributing in-house, internal use software. Certificates, identifiers, and provisioning profiles will be revoked, and the apps associated with your account will no longer function.
In accordance with Section 11.3 of the ADEP Agreement, please immediately destroy all Apple Confidential Information that is in your possession or control and note your continuing obligations upon termination. Nothing in this letter should be construed as a waiver of any rights or remedies Apple may have, all of which are hereby reserved.
Topic:
Developer Tools & Services
SubTopic:
Apple Developer Program
Tags:
Enterprise
Business and Enterprise
Hello.
I'm working on an app which works on multiple platforms (iOS, macOS, watchOS, tvOS). It builds and runs fine on the simulator and a real device but when trying to create a Product > Archive on macOS, it fails.
Here's the error message I get:
Build target RailBoardMac
Project RailBoard | Configuration Debug | Destination Any Mac | SDK macOS 15.1
Link RailBoardMac (x86_64) 0.3 seconds
Could not parse or use implicit file '/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/SwiftUlCore.framework/
Versions/A/SwiftUlCore.tbd': cannot link directly with 'SwiftUlCore' because product being built is not an allowed client of it
less
Undefined symbol: _main
× Linker command failed with exit code 1 (use -v to see invocation)
Build failed 20/09/2024,
I know this used to work. I must have changed something somewhere and it no longer does.
I'd be grateful for any assistance.
Despite Xcode being the one and most used IDE for iOS, it is far from perfect. I have used many tools in my career and here are some features, that would make it much better or what I miss from other IDEs. I encourage others to chip in discussion and lets all hope, Apple starts to improve Xcode. Will put each issue in separate comment below.
Slow debugger: not sure what bloat Xcode has or what it is doing, but sometimes it can take more than 10 seconds from breakpoint firing to actually see values. Moreover when debugging SwiftUI or something objC I have to drill down to see value of property or use po and p command and hope it works. SwiftUI views and states are a big pain to debug, to see what is changing a value I have to always use didSet trick or some other black magic. Is it too hard to make it easier? Breakpoints with condition can take up to 1 minute to load and I have M1 Max MBP. Just tried cursor IDE few days ago and breakpoints are much faster and without too much bloat in variable inspector.
Topic:
Developer Tools & Services
SubTopic:
Xcode
why xcode has no option to fold all
Topic:
Developer Tools & Services
SubTopic:
Xcode