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

Post

Replies

Boosts

Views

Activity

App compiles and run for Debug, but fails to link for Release on unused dependency
So I'm working on a large client app with lots of frameworks and modules which is is a mix of Xcode frameworks with 3rd party dependencies in CocoaPods and newer/converted SPM modules. Essentially CocoaPods is used to set the 3rd party dependencies on various Xcode frameworks, which also depend on each other via manual set dependencies, plus a bunch of SPM modules which are also manually added. It's a bit of a mess. The problem we encountered the other day started when I added a new protocol to one of the SPM modules. Nothing special about it, all types from Foundation and the app built and ran perfectly in simulator with a Debug build. However when we switched to building a Release build, it failed to link, logging an error indicating it could not resolve the new protocol in a number of the Xcode framework projects. The resolutions go like this: The Xcode app project has some manually added Xcode frameworks. Those frameworks have manually added dependencies on a second Xcode framework. That second framework has an SPM dependency on the module where my protocol lives. So Xcode App -> 1st Xcode framework -> 2nd Xcode framework -> SPM module. Now the 2nd Xcode framework directly uses my protocol from the SPM module. But the 1st Xcode framework neither uses or imports the SPM module. Yet the error we get when building for Release is that the 1st Framework is unable to resolve the protocol from the SPM module even though it's completely oblivious to it. My working theory is that something in the way a Release build works is insisting that when linking the 1st Xcode framework, it has to resolve the 2nd Xcode framework, which then has to resolve types from the SPM modules, but for some reason and only in a Release build, it's unable to. So our current workaround has been to add the SPM module as a dependency to all 1st level Xcode frameworks that have the 2nd Xcode framework as a dependency. That works because when linking the 1st Xcode framework, it has a direct reference to the module even though the code never imports anything from it. Does this should correct?
1
0
123
1w
/Users/USER/*/python3.8 is crashing
Every now and again, I see that Python 3.8 crashes. Now, I tried to get rid of all Python 3.8 interpreters on my system. But the crash log for this one gives a Path of /Users/USER/*/python3.8. What does that mean? That's not a real path on my filesystem. The crash is due to Python not finding a dylb it needs: Process: python3.8 [2946] Path: /Users/USER/*/python3.8 Identifier: python3.8 Version: ??? Code Type: X86-64 (Translated) Parent Process: launchd [1] User ID: 501 Date/Time: 2024-09-20 17:03:49.4230 -0700 OS Version: macOS 14.6.1 (23G93) Report Version: 12 Anonymous UUID: <redacted> Sleep/Wake UUID: <redacted> Time Awake Since Boot: 520000 seconds Time Since Wake: 43861 seconds System Integrity Protection: enabled Notes: PC register does not match crashing frame (0x0 vs 0x202E45A78) Crashed Thread: 0 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: Namespace DYLD, Code 1 Library missing Library not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib Referenced from: <redacted> /Users/USER/*/python3.8 Reason: tried: '/usr/local/opt/gettext/lib/libintl.8.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/gettext/lib/libintl.8.dylib' (no such file), '/usr/local/opt/gettext/lib/libintl.8.dylib' (no such file), '/usr/local/lib/libintl.8.dylib' (no such file), '/usr/lib/libintl.8.dylib' (no such file, not in dyld cache) (terminated at launch; ignore backtrace) Now, this only happens (I think) when I'm running VS Code, which I normally hate doing, but I’m trying to develop an Autodesk Fusion plug-in in Python, and that’s how it’s done. I don’t know if this Python was installed by Apple, or if I got via one of the dozens of SDKs I've installed over the years. VS Code has a way to search for Python interpreters, and I used that to delete all the old ones I could find. And I'm pretty sure macOS is on a more recent version.
0
0
102
1w
The iPhone needs to be prepared for development, and development services need to be enabled.
I downloaded a program from Stanford University and am trying to get it to work on my iPhone. The program works on my computer, but when I try to upload it to the App Store, I get all sorts of errors. I am running Xcode 16 on a Max Studio. When I run the compiler, I get a message: “The iPhone needs to be prepared for development, and development services need to be enabled. Ensure that the device is unlocked.” I am confused by the term “unlocked.” Is the message referring to a lock by carrier or an on-device lock? How do I enable development services? -Merwyn
0
1
191
1w
No iOS 18 simulators in Visual Studio for Mac
Xcode 16 does not display simulators. Problem running on physical device with iOS 18. error HE0004: Could not load the framework 'IDEDistribution' (path: /Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/IDEDistribution): dlopen(/Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/IDEDistribution, 0x0001): Library not loaded: @rpath/AppThinning.framework/Versions/A/AppThinning Referenced from: &lt;33FF2F3B-A96F-37B4-BA4E-887BD882BF9D&gt; /Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/IDEDistribution Reason: tried: '/Library/Frameworks/Xamarin.iOS.framework/Versions/16.4.0.23/lib/mlaunch/mlaunch.app/Contents/Frameworks/AppThinning.framework/Versions/A/AppThinning' (no such file), '/Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/Frameworks/AppThinning.framework/Versions/A/AppThinning' (no such file), '/Library/Frameworks/Xamarin.iOS.framework/Versions/16.4.0.23/lib/mlaunch/mlaunch.app/Contents/Frameworks/AppThinning.framework/Versions/A/AppThinning' (no such file), '/Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/Frameworks/AppThinning.framework/Versions/A/AppThinning' (no such file), '/Library/Frameworks/Xamarin.iOS.framework/Versions/16.4.0.23/lib/mlaunch/mlaunch.app/Contents/MonoBundle/AppThinning.framework/Versions/A/AppThinning' (no such file)
2
1
792
1w
Upgrade to XCode 16. Undefined symbol: nominal type descriptor for CoreGraphics.CGFloat
ld: symbol(s) not found for architecture arm64 clang++: error: linker command failed with exit code 1 (use -v to see invocation) Undefined symbol: nominal type descriptor for CoreGraphics.CGFloat Undefined symbol: type metadata for CoreGraphics.CGFloat Undefined symbol: protocol conformance descriptor for CoreGraphics.CGFloat : Swift.BinaryFloatingPoint in CoreGraphics Undefined symbol: protocol conformance descriptor for CoreGraphics.CGFloat : Swift.Encodable in CoreGraphics Undefined symbol: protocol conformance descriptor for CoreGraphics.CGFloat : Swift.FloatingPoint in CoreGraphics Undefined symbol: protocol conformance descriptor for CoreGraphics.CGFloat : Swift.Hashable in CoreGraphics Undefined symbol: protocol conformance descriptor for CoreGraphics.CGFloat : Swift.Comparable in CoreGraphics Undefined symbol: protocol conformance descriptor for CoreGraphics.CGFloat : Swift.Equatable in CoreGraphics Undefined symbol: protocol conformance descriptor for CoreGraphics.CGFloat : Swift.Decodable in CoreGraphics Undefined symbol: protocol conformance descriptor for CoreGraphics.CGFloat : Swift.SignedNumeric in CoreGraphics
3
2
498
1w
Do I need to down load iOS 18 for testing on iPhone 11 having iOS version 17.6.1 ?
I am using two iPhone11 devices, having iOS v17.6.1 for automation testing using Seleniumv4.X-Appium v2.x. Today I updated the mac to Sequoia15 version which updated the XCode to v16. Just after this update, I could not able to run the previously running automation script. The console message is "org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: Unable to launch WebDriverAgent. Original error: xcodebuild failed with code 70. This usually indicates an issue with the local Xcode setup or WebDriverAgent project configuration or the driver-to-platform version mismatch."
2
0
254
1w
Custom SF Symbols don't work on WatchOS 10 .accessoryInline
I'm trying to use a custom SVG as a SF Symbol for a .accessoryInline complication on Apple Watch but it only appear on WatchOS 11. I even tried a fresh project and exported one of the symbols from SF Symbols app to eliminate error with custom symbol creation. On WatchOS 11 it shows correctly and colored, on WatchOS 10.5, no symbol at all. Am I missing some setting or something? Tried different Render As options for the symbol with no luck. For corner complication, it shows it fine (Series 10 is WatchOS 11 here) What is more weird in kinda shows that it's loading in comlication preview: Overall can't use any image for inline complication unless I do it like this: Image(uiImage: UIImage(named: "ImageName") ?? UIImage()) .resizable() Which can't be colored also
1
0
159
2w
Apple Watch Missing Developer Mode Option
I have an iPhone 14 running iOS 16.1 and my series 5 watch running watchOS 9.1. I was able to turn on Developer Mode on the phone by going to Settings--> Privacy & Security --> Developer Mode. On the watch however (I'm doing this directly on the watch and not on the watch app on the phone) once I'm in Privacy & Security, there is no option to select Developer Mode. How do I get my watch in Developer Mode in order to get a successful build in xCode?
33
8
13k
Oct ’22
Application bundle is corrupted during installation
Hello, I'm facing a weird issue when application bundle is corrupted during installation. The corruption always look the same - a certain sequence of bytes is erased (zeroed) in the file at multiple places, which obviously breaks the bundle signature. It's a pkg built with productbuild, containing three component packages, up until recently no issue occurred. Everything is correctly signed and notarized and I don't do anything special in preinstall or postinstall scripts but I run gktool scan which reports "Scan completed, but failed because the software has been altered" which makes me believe that bundle is corrupted during installation or decompression. I'm using --compression latest for the bundle's component package. I don't have a reliable repro but I see it happen a lot to our customers. I was suspecting a deployment tool or "security software" but I've seen the issue for manually installed packages too. It seems it happens only on Sonoma, but that may be related to fact most users are on latest macOS. Is there any known issue with installer which could lead to bundle being corrupted this way? Did anyone faced anything similar?
4
0
311
4w
GRDB crash (iOS18 only)
The GRDBInternal private framework that ships with iOS 18 might well create conflicts for apps that use the regular GRDB. The symptom is a hard crash whenever one performs a database access through a DatabaseWriter or DatabaseReader existential - an action that almost all GRDB-powered apps have been doing, for many years. I'm not sure how to write an efficient feedback about this concerning issue. https://github.com/groue/GRDB.swift/issues/1619
5
0
484
2w
Symbol not found from libc++ on iOS
Hi, I've had one user report that, when trying to dlopen() a dynamic library embedded inside a framework, they are hit by an error that a symbol from /usr/lib/libc++.1.dylib is not found. To the best of my knowledge, that's a single user being hit (let's say the event has a low probability). Here's the full error message from dlopen(): dlopen(clang.framework/clang, 0x0009): Symbol not found: ZNSt3122_libcppverbose_abortEPKcz Referenced from: <> /private/var/containers/Bundle/Application/<UUID>/a-Shell.app/Frameworks/clang.framework/clang Expected in: <UUID> /usr/lib/libc++.1.dylib How can I fix that? What could be the reason for libc++.1.dylib having a different content on a specific machine?
2
0
231
Aug ’24
Xcode 16 beta 6 build crashes on iPadOS 17.6.1 due to 'libswift_Builtin_float.dylib'
Hello, During our app upgrades and backward compatibility tests, we've noticed that the app built on Xcode 16 beta 6 crashes on the iPads running iPadOS 17.6.1. Here is the full error log: Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: DYLD 1 Library missing Library not loaded: /usr/lib/swift/libswift_Builtin_float.dylib Referenced from: <5ABE5504-A64E-37F0-A7C9-D653A5755900> /Volumes/VOLUME/*/Decisions.app/Frameworks/LDCoreFramework.framework/LDCoreFramework Reason: tried: '/usr/lib/swift/libswift_Builtin_float.dylib' (no such file), '/private/preboot/Cryptexes/OS/usr/lib/swift/libswift_Builtin_float.dylib' (no such file), '/usr/lib/swift/libswift_Builtin_float.dylib' (no such file, not in dyld cache) I've tried to find any solution, but I've not come across anything that would solve this for us. Any ideas? Thank you in advance.
1
1
329
3w
Improving performance of Swift package
I have started to make a Swift package to better organize my project, but I have noticed that when I try to use code from my package, some code will run much slower than when I use the same code in the project. How could this be solved? I have tried using @inlinable for functions, and it works for most functions, but some functions still fail to meet the performance standards that I see when I use the code in my project.
0
0
184
3w
Debug with Xcode while connecting a usb device to iPad Pro
Hi We are developing a iPad accessory that connects to the USB-C port of an iPad Pro. For debugging, we are using iPad pro M4 and iPad Pro 12.9 (fifth gen). We are aware we can debug the app over wifi, but this process is slow and cumbersome. Is there a USB-C hub ( I guess that supports thunderbolt ) that would allow us to connect the iPad to both our Mac and to the iPad accessory simultaneously ? Thanks
0
0
186
3w
xcresulttool no longer publishes the format for test results
Until Xcode 16 xcresulttool had a 'formatDescription' subcommand and/or --format flag that output a schema for what to expect from 'get object' subcommands. With Xcode 16 all of the old format and utilities are apparently deprecated, and require a --legacy flag be passed to use the deprecated utilities and format. There are new utilities like 'xcrun xcresulttool get test-results --path ' however, no format us published as far as I can tell. If we are going to move forward with these new utilities we need a schema published so that we can reasonably track deltas as it evolves and so that we have the object of generating model objects from this schema. Any insight?
1
1
357
Aug ’24
Matter development - Matter Accessory - Apple Ecosystem
Apple developer support could not answer my question which is the following: How are Matter developers supposed to test accessory pairing, accessory communication and accessory discovery if the Console logs provided by Apple (iOS, MacOS, iPadOS) are encrypted, incomplete or straight up non-existent. Current issue is mDNS-SD discovery, pairing and PAKE requests initialisation. Impossible to figure out why X or Y stopped on the Apple Device. Chip-tool (provided by PROJECT-CHIP) acts 100% differently than iOS (Home) or iPadOS(Home). Thank you
0
0
202
4w