Dive into the vast array of tools and services available to developers.

Posts under General subtopic

Post

Replies

Boosts

Views

Activity

Immediate crash of Apple Watch simulator when typing a key
I get a crash in Apple Watch simulator (Series 9 45mm 18.0) as soon as the app launch if I type anything on external keyboard (just hitting command key for instance to capture a screenshot). Same crash on series 7 (45mm, OS 18.1) But app works normally when I use mouse to interact with the app on simulator. App does not crash on real device (Watch 4 OS 10.4.1). Nor does it crash on Series 6 simulator (44 mm OS 17.4). Here are the log I could collect (apparently, they contain sensitive language !!! so I attach as a file.: Attached logs
2
0
401
Mar ’25
Ionic Cordova onesignal Asset validation failed iOS upload issue
What happened? facing issue to upload on ios TestFlight xcode version 16 macOS 15.0 xcrun bitcode_strip -r platforms/ios/YourApp/Plugins/YourFramework.framework/YourFramework -o platforms/ios/YourApp/Plugins/YourFramework.framework/YourFramework already tried bitcode_strip command but also that didn't work. The following issues occurred while distributing your application. Asset validation failed Invalid Executable. The executable 'Lynch Syndrome.app/Frameworks/OneSignal.framework/ OneSignal' contains bitcode. (ID: fda6a528-a835-4b16-8252-893d8d16acbd) Steps to reproduce? create build , upload it on testflight and you'll get error OneSignal Cordova SDK version Release 3.3.1 Which platform(s) are affected? iOS
2
0
964
Dec ’24
lldb: argument starting with hash disappears.
Here's a simple C++ program that echoes its arguments... #include <stdio.h> int main(int argc, char* argv[]) { for (int i=0; i<argc; ++i) printf("%d %s\n", i, argv[i]); } This works as expected... > ./test arg1 #arg2 arg3 0 ./test 1 arg1 2 #arg2 3 arg3 Running under lldb gives this... > lldb ./test arg1 #arg2 arg3 (lldb) target create "./test" Current executable set to '/Users/richard/Work/test' (arm64). (lldb) settings set -- target.run-args "arg1" "#arg2" "arg3" (lldb) run Process 6138 launched: '/Users/richard/Work/test' (arm64) 0 /Users/richard/Work/test 1 arg1 Process 6138 exited with status = 0 (0x00000000) I get the same if I quote the arguments, or if I add them to the run line. Stepping into main() we see the argv and args values are as though we only had the first argument. If I quote the second argument and add an initial space " #arg1" then it works. I first saw this on an M1 running Sequoia 13.1. It am now on OS 13.3. lldb --version lldb-1600.0.39.109 Apple Swift version 6.0.3 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)
2
1
373
Feb ’25
libclang_rt.profile_driverkit.a' not found
Hi guys! I have gone through an absolute nightmare, trying to solve the issue that I am about to tell you about. As the title says, I am getting the error: Library '/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/17/lib/darwin/libclang_rt.profile_driverkit.a' not found I trimmed off part of that directory as I did not want to reveal that information about my computer. From what I can tell, the file in question is no longer even a part of Xcode. I have searched, it is not on my computer anywhere. I have also downloaded older versions of Xcode to search with it. None of them have it. I have literally tried everything under the Son to solve this issue. I have been stuck on it for two days. I have even resorted to doing something I hate, which is asking for ChatGPT to assist me with solving the issue. No help there. I am at my wits end. So I am coming to you guys, have you seen this error? Any ideas at all? The odds are pretty good whatever you recommend I have probably already tried 200 times over. But I am still open to hearing anything. Have any of you had this error? Any ideas? I am on the latest version of macOS. The project is for a macOS app. M4 Mac mini. Any additional information I can provide, that will be helpful? At this point, I am leaning more towards this being a bug with Xcode than anything.
2
0
101
Aug ’25
Gnu Fortran and Mac OS Sequoia
I observed the following problem: A scientific code to perform Reverse Monte Carlo simulations (‘rmcxas’) compiled with the most up to date version of gcc/gfortran and Xcode including command line tools on Mac OS Sequoia 15.4 on a Macbook air with M4 processor generates the following problem upon starting it in a terminal: dyld[10154]: dyld cache '(null)' not loaded: syscall to map cache into shared region failed dyld[10154]: Library not loaded: /usr/lib/libSystem.B.dylib Referenced from: <0144F82E-003C-37A9-A544-9AE6336E549B> /Users/markuswinterer/bin/rmcxas Reason: tried: '/usr/lib/libSystem.B.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/libSystem.B.dylib' (no such file), '/usr/lib/libSystem.B.dylib' (no such file, no dyld cache), '/usr/local/lib/libSystem.B.dylib' (no such file) zsh: abort rmcxas This occurs only about every 5th time the code is started. Help would be highly appreciated.
2
0
117
May ’25
The Unity application crashes due to KERN_PROTECTION_FAILURE and GC_clear_stack_inneb why?
Crash dump: `Crashed Thread: 0 tid_103 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGILL) Exception Codes: KERN_PROTECTION_FAILURE at 0x000000016d3bfea0 Exception Codes: 0x0000000000000002, 0x000000016d3bfea0 Termination Reason: Namespace SIGNAL, Code 4 Illegal instruction: 4 Terminating Process: Unity [7873] VM Region Info: 0x16d3bfea0 is in 0x169bbc000-0x16d3c0000; bytes after start: 58736288 bytes before end: 351 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL mapped file 169b00000-169ba8000 [ 672K] rw-/rwx SM=PRV Object_id=4d22156e GAP OF 0x14000 BYTES ---&gt; STACK GUARD 169bbc000-16d3c0000 [ 56.0M] ---/rwx SM=NUL stack guard for thread 0 Stack 16d3c0000-16dbbc000 [ 8176K] rw-/rwx SM=SHM thread 0 Thread 0 Crashed:: tid_103 Dispatch queue: com.apple.main-thread 0 libsystem_platform.dylib 0x1932ee7ac _platform_memset + 108 1 libmonobdwgc-2.0.dylib 0x33977abdc GC_clear_stack_inner + 60 2 libmonobdwgc-2.0.dylib 0x33977abf8 GC_clear_stack_inner + 88 3 libmonobdwgc-2.0.dylib 0x33977abf8 GC_clear_stack_inner + 88 4 libmonobdwgc-2.0.dylib 0x33977abf8 GC_clear_stack_inner + 88 5 libmonobdwgc-2.0.dylib 0x33977abf8 GC_clear_stack_inner + 88 6 libmonobdwgc-2.0.dylib 0x33977abf8 GC_clear_stack_inner + 88 7 libmonobdwgc-2.0.dylib 0x33977abf8 GC_clear_stack_inner + 88 8 libmonobdwgc-2.0.dylib 0x33977abf8 GC_clear_stack_inner + 88 9 libmonobdwgc-2.0.dylib 0x33977abf8 GC_clear_stack_inner + 88 10 libmonobdwgc-2.0.dylib 0x33977abf8 GC_clear_stack_inner + 88 11 libmonobdwgc-2.0.dylib 0x33977abf8 GC_clear_stack_inner + 88 12 libmonobdwgc-2.0.dylib 0x33976b518 GC_clear_stack + 76 13 libmonobdwgc-2.0.dylib 0x33973c074 mono_gc_alloc_obj + 112 14 libmonobdwgc-2.0.dylib 0x3396e0db4 mono_object_new_specific_checked + 72 15 libmonobdwgc-2.0.dylib 0x3396e116c ves_icall_object_new_specific + 28`
2
0
388
Feb ’25
MetricKit Metric Payload Split
In MetricKit, a metric payload comes in with a time range which usually means it contains multiple launches/sessions. How can we relate things that will change between launches or sessions such as pid and lowPowerModeEnabled from the metadata. Will there be multiple payloads for each unique value or is there some other way to use this?
2
0
49
4d
dlopen problems with debug build, macOS SDK 15, and ASAN
Hello, There seems to be a regression with macOS SDK 15 and dynamically loading libraries if Address Sanitizer is turned on. Seems to only affect Debug builds, and .frameworks. I've also reported this via the Feedback Assistant: FB16513866 Here's a minimal repro, if anyone is interested: https://gist.github.com/peter-esik/6b00432e411be85333e14ae7d953966e I thought I'd post this here, as according to my web searches, this isn't a very well-known bug at this point.
2
0
293
Feb ’25
SF Symbols 7: Hundreds of SF Symbols missing 'Availability' info
In SF Symbols 7 (115), there are 458 symbols missing Availability info. I only discovered this after using one that didn’t appear in iOS 18 but does in iOS 26. Questions: Are there plans to add Availability info for all symbols? If the field is blank, is there a safe latest-OS version we can assume? I realize managing 7,000+ icons is tough, but missing info like this makes development frustrating. It doesn't help that there's no build warning when a named image isn't found, it just defaults to the text label. Screenshot Screenshot of SF Symbols 7 showing three symbols missing Availability info. The symbol ellipsis.circle.badge is selected and its properties pane also shows no Availability info.
2
0
104
2w
Swift Compiler Issue?
I've encountered a strange issue with Swift and I wonder if this is a compiler error or if I didn't understand something correctly. The following sample code shows a weird issue (please ignore that the demo code itself would not make that much sense in this form, it's just the version from a big and more complicated project, where this would make more sense): class Test { var data: [String:[String:String]] = [:] func test() { let setValue: ((String, String, String) -> Void) = { [weak self] key, id, value in if self!.data[key] == nil { self!.data[key] = [:] } let oldValue = self!.data[key]![id] if oldValue == nil { self!.data[key]![id] = value } } setValue("0", "1", "2") } } When changing the "data" dictionary through the closure within the "test()" function, everything works as expected until the "if" condition where the oldValue is checked against nil. If I set a break point to this condition, the Xcode debugger tells me that oldValue is nil (which is expected), but the code within the if condition is NOT executed. The comparison oldValue == nil should be be true (because oldValue is actually nil), but the compiler seems to assume something else. But If I do not user "self!" but instead "self?" then it does work as expected and the code within the if condition is executed. What I am missing here? Is this the correct behavior or a compiler bug?
2
0
305
Dec ’24
Issue with Custom element
Hi, We are seeing the below error in our angular application where we use the custom elements. Can you please help us to resolve the issue? [Error] TypeError: new.target does not define a custom element. The same code works fine in other browsers.
2
0
216
Feb ’25
How to package a static library and headers into an XCFramework?
I have static libraries and headers of a C++ project that I believe are correctly built for iOS and iOS Simulator destinations. The C++ project is built via CMake with something like: cmake dirName \ -G "Unix Makefiles" \ -B buildDir \ -DCMAKE_INSTALL_PREFIX=installDir \ -DCMAKE_SYSTEM_NAME=iOS \ -DCMAKE_SYSTEM_PROCESSOR=arm64 \ -DCMAKE_OSX_ARCHITECTURES=arm64 \ -DCMAKE_OSX_SYSROOT=$(xcrun --sdk iphonesimulator --show-sdk-path) \ -DCMAKE_OSX_DEPLOYMENT_TARGET=15.0 ... cmake --build buildDir --config Release --target install I believe those are all the important parameters. This gives me a static library (.a) and headers that I believe should be compatible with arm64 iOS simulators, and I do this same thing for x86_64 architecture with simulators and for actual iOS non-simulator via the iphoneos SDK path. I'm pretty sure this gives me the correct static lib and headers. Let's assume it does because I'm not able actually create the XCFramework to know if they're right. This does work with a macOS lib and headers, but I need iOS for this library. How do I package this into an XCFramework now? This Apple developer articles says I should be a able to create an xcframework via xcodebuild -create-xcframework -library libName.a -headers include but when I try to do this with my my iOS arm64 simulator static lib I get: error: binaries with multiple platforms are not supported '/Users/.../install/ios-arm64-simulator/libName.a But, when I run: lips -info libName.a I get Non-fat file libName.a is architecture arm64, so, I'm not sure what to do here. Trying to extract arm64 from that static library also produces an error as it it is just an arm64 lib. I'm not really sure what's going on, but from reading online this specific command, xcodebuild -create-xcframework is a consistent pain point in the process of trying to get an XCFramework, and the seemingly only workaround is to archive a framework project and then create the xcframework via xcodebuild -create-xcframework -archive MyFramework.xcarchive -framework[or -library]. However, how am I supposed to get this static lib and headers into a suitable xcodeproj so that I can archive it correctly? Everytime I try to copy the headers and static lib into the Framework xcodeproj and set what I believe are all the correct settings, my .xcarchive is always empty. Does anyone have any advice here on how to get this to work? The main impetus for trying to get this C++ static lib and headers into an XCFramework as that seems like the only valid way to link a 3rd party C++ lib to an SPM package and have the C++ package be interfaceable with Swift.
2
0
530
Feb ’25
Background Assets Directory Collision
Hello, I'm trying to use multiple Background Assets Packs to host map tiles. This is problematic for a few reasons. MKTileOverlay requires a method that returns a URL. AssetPackManager.shared.url() throws, but it's unrelated to the url. It will return a URL even if it points to nothing. There's no name-spacing. Everything appears to be flattened. (See Error below) Simultaneously, this also is not the case as the documentation states: if there’s a path collision across multiple asset packs, then it’s undefined from which asset pack an individual file will be resolved. AssetPackManager.shared.url() doesn't have an optional parameter to explicitly declare the asset pack you want to access, like AssetPackManager.shared.contents(at: FilePath) does For example, I have multiple different tiles I'm trying to overlay for z: 10, x: 239, and y: 414. Foo/10/239/414.png Bar/10/239/414.png And even when explicitly stating the fold directory, it appears that the assets are flattened down. As I'm receiving this error. The URL for “Foo/10/239/414.png” couldn’t be retrieved: “414.png” couldn’t be copied to “239” because an item with the same name already exists.
2
0
179
2w
Linker nondeterminism (ld_new) involving branch islands
Hi, I'm investigating what looks like possibly nondeterministic behavior when linking large iOS app binaries. I do not have a concise reproduction of the issue yet, but am trying to hunt down possible leads. In particular, the problem appears to surface when invoking clang to link a binary and the resulting order of the 'branch island' instructions appears to be random each time the binary is linked (as shown by the link map output). I was wondering if anyone with insight into the linker's current implementation could shed light on whether that is expected, and if there is anything that can be done to prevent it. FWIW, it seems like it might be size-dependent as smaller app binaries don't appear to exhibit the same behavior. I'd be glad to share more specifics and hopefully a reproduction if I can ever find one eventually. Some environment info (Xcode 16.4 toolchain): clang -v: Apple clang version 17.0.0 (clang-1700.0.13.5) Target: arm64-apple-darwin24.6.0 Thread model: posix InstalledDir: /Applications/Xcode-16.4.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin ld -v: @(#)PROGRAM:ld PROJECT:ld-1167.5 BUILD 01:45:05 Apr 30 2025 configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em will use ld-classic for: armv6 armv7 armv7s i386 armv6m armv7k armv7m armv7em LTO support using: LLVM version 17.0.0 (static support for 29, runtime is 29) TAPI support using: Apple TAPI version 17.0.0 (tapi-1700.0.3.5)
2
0
154
2d
Attach a debugger to app launched via `devicectrl`
With the latest (26) version of Apple's developer tools, is there a way to manually attach a debugger (other than lldb) to an iOS app launched with "devicectl device process launch --start-stopped"? In the past, this was possible via the ios-deploy third-party tool (now defunct), which provided a debugserver port. This information is notably missing when using devicectrl – although the process ID of the launch process is provided, and the tool is clearly aimed at letting you launch and attach to processes from the command line. lldb can, of course, attach via its built-in support for this using the device set of commands. But I'm explicitly looking for a way to attach my own debugger via the GDB-compatible debug proxy.
2
0
81
2w
Simulate Background Fetch Not Working on Real Device, Works on Simulator
Hello Apple Support, I’m facing an issue with Background Fetch in my React Native project. When I click on Simulate Background Fetch in Xcode, everything works as expected on the iOS Simulator—background tasks run smoothly, and data is fetched without issues. However, on a real device, the app goes to the background but doesn’t execute any of the scheduled background tasks, and it also remains in the background without terminating. Here’s some additional context: React Native Project: I’m using React Native to develop this app, and the background tasks involve: Getting User Location: Fetching the user’s location in the background. API Calls: Calling an API to fetch necessary information based on the user’s location. Scheduling Notifications and Alarms: Scheduling notifications and alarms based on the API response data. Simulator vs. Real Device: In the iOS Simulator, all these background tasks trigger and function correctly when I simulate Background Fetch. On the real device, however, none of these tasks are triggered when I try to simulate Background Fetch. The app only moves to the background without performing any tasks or getting terminated. Device and Configuration Details: iOS Version: 17 Device Model: Iphone xs, Iphone 11, iphone 7 Background Modes: Background Fetch is enabled in Capabilities, and I’ve set the fetch interval to the minimum for testing. I’ve verified that all configurations are correctly set, and I’ve tried restarting the device and Xcode, but the issue persists. Is there something specific about Background Fetch that could prevent it from functioning as expected on physical devices? Any guidance on troubleshooting or additional steps would be highly appreciated. Thank you!
2
0
969
May ’25
Command Line Tool Embedding in SwiftUI App
I have added 2 command line tools in my swiftUI app for macOS, it was working fine locally, but it gives error when i try to make archive of it. I am not sure about the reason, but it was related to sandboxing the command line tools, after this i have tried multiple solutions but i am unable to resolve this issue, how should i handle the helper command line tools
2
0
405
Feb ’25