Use dyld to link in frameworks at runtime. Use ld to make your programs and link archive libraries at build time.

Linker Documentation

Pinned Posts

Posts under Linker tag

162 Posts
Sort by:
Post not yet marked as solved
2 Replies
81 Views
The documentation about the Disable Library Validation Entitlement mentioned that the macOS dynamic linker (dyld) provides a detailed error message when the system prevents code from loading due to library validation. You can find more information here: https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_cs_disable-library-validation I need assistance in locating the dynamic linker (dyld) on macOS Ventura 13.0. What are the various methods available to locate it? How can I access or open it for reading? Additionally, do I need any external tools to facilitate this process? My ultimate goal is to examine the detailed error message to identify any issues I am encountering with my application. Additionally, I have found one at /usr/lib/dyld, but it's not human-readable, nor does it have timestamps for whatever is logged. Based on my findings, I should be able to locate dyld at System/Library, but I can't find it there either.
Posted Last updated
.
Post not yet marked as solved
0 Replies
5.1k Views
Apple’s library technology has a long and glorious history, dating all the way back to the origins of Unix. This does, however, mean that it can be a bit confusing to newcomers. This is my attempt to clarify some terminology. If you have any questions or comments about this, start a new thread and tag it with Linker so that I see it. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" An Apple Library Primer Apple’s tools support two related concepts: Platform — This is the platform itself; macOS, iOS, iOS Simulator, and Mac Catalyst are all platforms. Architecture — This is a specific CPU architecture used by a platform. arm64 and x86_64 are both architectures. A given architecture might be used by multiple platforms. The most obvious example of this arm64, which is used by all of the platforms listed above. Code built for one platform will not work on another platform, even if both platforms use the same architecture. Code is usually packaged in either a Mach-O file or a static library. Mach-O is used for executables, dynamic libraries, bundles, and object files. These can have a variety of different extensions; the only constant is that .o is always used for a Mach-O containing an object file. Use otool and nm to examine a Mach-O file. Use vtool to quickly determine the platform for which it was built. Use size to get a summary of its size. Use dyld_info to get more details about a dynamic library. IMPORTANT All the tools mentioned here are documented in man pages; for information on how to access that documentation, see Reading UNIX Manual Pages. The term Mach-O image refers to a Mach-O that can be loaded and executed without further processing. That includes executables, dynamic libraries, and bundles, but not object files. A dynamic library has the extension .dylib. You may also see this called a shared library. A framework is a bundle structure with the .framework extension that has both compile-time and run-time roles: At compile time, the framework combines the library’s headers and its stub library (stub libraries are explained below). At run time, the framework combines the library’s code, as a Mach-O dynamic library, and its associated resources. The exact structure of a framework varies by platform. For the details, see Placing Content in a Bundle. macOS supports both frameworks and standalone dynamic libraries. Other Apple platforms support frameworks but not standalone dynamic libraries. Historically these two roles were combined, that is, the framework included the headers, the dynamic library, and its resources. These days Apple ships different frameworks for each role. That is, the macOS SDK includes the compile-time framework and macOS itself includes the run-time one. Most third-party frameworks continue to combine these roles. A static library is an archive of one or more object files. It has the extension .a. Use ar, libtool, and ranlib to inspect and manipulate these archives. The static linker, or just the linker, runs at build time. It combines various inputs into a single output. Typically these inputs are object files, static libraries, dynamic libraries, and various configuration items. The output is most commonly a Mach-O image, although it’s also possible to output an object file. The linker may also output metadata, such as a link map (see Using a Link Map to Track Down a Symbol’s Origin). The linker has seen three major implementations: ld — This dates from the dawn of Mac OS X. ld64 — This was a rewrite started in the 2005 timeframe. Eventually it replaced ld completely. If you type ld, you get ld64. ld_prime — This was introduced with Xcode 15. This isn’t a separate tool. Rather, ld now supports the -ld_classic and -ld_new options to select a specific implementation. Note During the Xcode 15 beta cycle these options were -ld64 and -ld_prime. I continue to use those names because the definition of new changes over time (some of us still think of ld64 as the new linker ;–). The dynamic linker loads Mach-O images at runtime. Its path is /usr/lib/dyld, so it’s often referred to as dyld, dyld, or DYLD. Personally I pronounced that dee-lid, but some folks say di-lid and others say dee-why-el-dee. IMPORTANT Third-party executables must use the standard dynamic linker. Other Unix-y platforms support the notion of a statically linked executable, one that makes system calls directly. This is not supported on Apple platforms. Apple platforms provide binary compatibility via system dynamic libraries and frameworks, not at the system call level. Note Apple platforms have vestigial support for custom dynamic linkers (your executable tells the system which dynamic linker to use via the LC_LOAD_DYLINKER load command). This facility originated on macOS’s ancestor platform and has never been a supported option on any Apple platform. The dynamic linker has seen 4 major revisions. See WWDC 2017 Session 413 (referenced below) for a discussion of versions 1 through 3. Version 4 is basically a merging of versions 2 and 3. The dyld man page is chock-full of useful info, including a discussion of how it finds images at runtime. One of the most common points of confusion with dynamic linker is the way that the dynamic linker identifies dynamic libraries. There are two standard approaches to this, as described in Dynamic Library Identification. Xcode 15 introduced the concept of a mergeable library. This a dynamic library with extra metadata that allows the linker to embed it into the output Mach-O image, much like a static library. Mergeable libraries have many benefits. For all the backstory, see WWDC 2023 Session 10268 Meet mergeable libraries. For instructions on how to set this up, see Configuring your project to use mergeable libraries. If you put a mergeable library into a framework structure you get a mergeable framework. Xcode 15 also introduced the concept of a static framework. This is a framework structure where the framework’s dynamic library is replaced by a static library. Note It’s not clear to me whether this offers any benefit over creating a mergeable framework. Earlier versions of Xcode did not have proper static framework support. That didn’t stop folks trying to use them, which caused all sorts of weird build problems. A universal binary is a file that contains multiple architectures for the same platform. Universal binaries always use the universal binary format. Use the file command to learn what architectures are within a universal binary. Use the lipo command to manipulate universal binaries. A universal binary’s architectures are either all in Mach-O format or all in the static library archive format. The latter is called a universal static library. A universal binary has the same extension as its non-universal equivalent. That means a .a file might be a static library or a universal static library. Most tools work on a single architecture within a universal binary. They default to the architecture of the current machine. To override this, pass the architecture in using a command-line option, typically -arch or --arch. An XCFramework is a single document package that includes libraries for any combination of platforms and architectures. It has the extension .xcframework. An XCFramework holds either a framework, a dynamic library, or a static library. All the elements must be the same type. Use xcodebuild to create an XCFramework. For specific instructions, see Xcode Help > Distribute binary frameworks > Create an XCFramework. Historically there was no need to code sign libraries in SDKs. If you shipped an SDK to another developer, they were responsible for re-signing all the code as part of their distribution process. Xcode 15 changes this. You should sign your SDK so that a developer using it can verify this dependency. For more details, see WWDC 2023 Session 10061 Verify app dependencies with digital signatures and Verifying the origin of your XCFrameworks. A stub library is a compact description of the contents of a dynamic library. It has the extension .tbd, which stands for text-based description (TBD). Apple’s SDKs include stub libraries to minimise their size; for the backstory, read this post. Stub libraries currently use YAML format, a fact that’s relevant when you try to interpret linker errors. Use the tapi tool to create and manipulate these files. In this context TAPI stands for a text-based API, an alternative name for TBD. Oh, and on the subject of tapi, I’d be remiss if I didn’t mention tapi-analyze! Mach-O uses a two-level namespace. When a Mach-O image imports a symbol, it references the symbol name and the library where it expects to find that symbol. This improves both performance and reliability but it precludes certain techniques that might work on other platforms. For example, you can’t define a function called printf and expect it to ‘see’ calls from other dynamic libraries because those libraries import the version of printf from libSystem. To help folks who rely on techniques like this, macOS supports a flat namespace compatibility mode. This has numerous sharp edges — for an example, see the posts on this thread — and it’s best to avoid it where you can. If you’re enabling the flat namespace as part of a developer tool, search the ’net for dyld interpose to learn about an alternative technique. WARNING Dynamic linker interposing is not documented as API. While it’s a useful technique for developer tools, do not use it in products you ship to end users. Apple platforms use DWARF. When you compile a file, the compiler puts the debug info into the resulting object file. When you link a set of object files into a executable, dynamic library, or bundle for distribution, the linker does not include this debug info. Rather, debug info is stored in a separate debug symbols document package. This has the extension .dSYM and is created using dsymutil. Use symbols to learn about the symbols in a file. Use dwarfdump to get detailed information about DWARF debug info. Use atos to map an address to its corresponding symbol name. Over the years there have been some really good talks about linking and libraries at WWDC, including: WWDC 2023 Session 10268 Meet mergeable libraries WWDC 2022 Session 110362 Link fast: Improve build and launch times WWDC 2022 Session 110370 Debug Swift debugging with LLDB WWDC 2021 Session 10211 Symbolication: Beyond the basics WWDC 2019 Session 416 Binary Frameworks in Swift — Despite the name, this covers XCFrameworks in depth. WWDC 2018 Session 415 Behind the Scenes of the Xcode Build Process WWDC 2017 Session 413 App Startup Time: Past, Present, and Future WWDC 2016 Session 406 Optimizing App Startup Time Note The older talks are no longer available from Apple, but you may be able to find transcripts out there on the ’net. Historically Apple published a document, Mac OS X ABI Mach-O File Format Reference, or some variant thereof, that acted as the definitive reference to the Mach-O file format. This document is no longer available from Apple. If you’re doing serious work with Mach-O, I recommend that you find an old copy. It’s definitely out of date, but there’s no better place to get a high-level introduction to the concepts. The Mach-O Wikipedia page has a link to an archived version of the document. For the most up-to-date information about Mach-O, see the declarations and doc comments in <mach-o/loader.h>. Revision History 2024-04-30 Clarified the requirement to use the standard dynamic linker. 2024-03-02 Updated the discussion of static frameworks to account for Xcode 15 changes. Removed the link to WWDC 2018 Session 415 because it no longer works )-: 2024-03-01 Added the WWDC 2023 session to the list of sessions to make it easier to find. Added a reference to Using a Link Map to Track Down a Symbol’s Origin. Made other minor editorial changes. 2023-09-20 Added a link to Dynamic Library Identification. Updated the names for the static linker implementations (-ld_prime is no more!). Removed the beta epithet from Xcode 15. 2023-06-13 Defined the term Mach-O image. Added sections for both the static and dynamic linkers. Described the two big new features in Xcode 15: mergeable libraries and dependency verification. 2023-06-01 Add a reference to tapi-analyze. 2023-05-29 Added a discussion of the two-level namespace. 2023-04-27 Added a mention of the size tool. 2023-01-23 Explained the compile-time and run-time roles of a framework. Made other minor editorial changes. 2022-11-17 Added an explanation of TAPI. 2022-10-12 Added links to Mach-O documentation. 2022-09-29 Added info about .dSYM files. Added a few more links to WWDC sessions. 2022-09-21 First posted.
Posted
by eskimo.
Last updated
.
Post not yet marked as solved
1 Replies
69 Views
Hi Everyone, This is my first post here. I am a student looking for answers, and I would like to know how to use libraries such as the ones mentioned in the title. How do I link them? I have tried every method under the sun, but I cannot get Xcode to find the file I am trying to include.
Posted
by Ccervera.
Last updated
.
Post not yet marked as solved
2 Replies
111 Views
I'm doing the python dynamic module loading dance. As you likely know, this is not the typical shared library scenario described on all the docs, where an executable is linked against an existing shared lib. Instead cythonized python modules need to call back to the interpreter that loaded them for various functions. Thus, when creating the interpreter, some manner of symbol export must happen, which can then later be linked into a module's dynamic lib to resolve interpreter symbols. With GNU/GCC this is all magic with the -shared flag (perhaps GNU's weak symbol feature, unsupported on macOS, helps out?). With a MingW GCC variant on Windows -Wl,--output-def python.def is required, followed by dlltool -d python.def -l python.dll.a, which creates some object thingy that can be linked into the subsequent module .so files. I played with lipo python -create -output libpython.dylib on macOS, but saw that no one else uses this and abandoned it. The python3 on Darwin uses clang -bundle -undefined dynamic_lookup, but when I roll my own custom interpreter, building a module by hand with the above gives: ld: warning: -undefined dynamic_lookup may not work with chained fixups ... whatever that means. Link args of -bundle -bundle_loader ../python result in NO errors or warnings, but my interpreter cannot load these module .so files either, probably due to some error I have not yet unmasked. I am hoping to find a solution that works for both Xcode and Homebrew, and that will last for a decade or so, but for now would be happy getting something to work today.
Posted
by duanev.
Last updated
.
Post marked as Apple Recommended
567 Views
I am using #canImport(JournalingSuggestions), but something is going wrong and my app is attempting to import the framework on iPad, and crashing on launch. How can I ensure that it's properly filtered out from everything except iPhone? import SwiftUI #if canImport(JournalingSuggestions) import JournalingSuggestions #endif struct JournalingSuggestionsView: View { var body: some View { #if canImport(JournalingSuggestions) JournalingSuggestionsPicker { Text("Open Journaling Suggestions") } onCompletion: { suggestion in print(suggestion) } #else Text("Journaling suggestions not available on this platform.") #endif } } Error: dyld[8689]: Library not loaded: /System/Library/Frameworks/JournalingSuggestions.framework/JournalingSuggestions Referenced from: <A656E6BC-4883-3245-BE71-3F84C2F41119> /private/var/containers/Bundle/Application/C6C11F57-AFAA-442A-B726-7AADDDB50D79/Catalog.app/Catalog Reason: tried: '/System/Library/Frameworks/JournalingSuggestions.framework/JournalingSuggestions' (no such file), '/private/preboot/Cryptexes/OS/System/Library/Frameworks/JournalingSuggestions.framework/JournalingSuggestions' (no such file), '/System/Library/Frameworks/JournalingSuggestions.framework/JournalingSuggestions' (no such file, not in dyld cache) System info: Xcode 15.2 iPadOS 17.3.1
Posted
by aenewton.
Last updated
.
Post marked as solved
4 Replies
227 Views
It's not possible to merge a framework with resource into an iOS app target because the resource are not included in the app bundle. Steps to reproduce: Create an Xcode Project with iOS App Template Add a Framework Target (make sure to "Embed in Application") Add an Asset Catalog to Framework Target Add an Color Resource (or Image Set, or any other Resource) Reference the Resource in App Target (I have used a SwiftUI View) Run on Device (!) to make sure everything works as expected Change "Create Merged Binary (MERGED_BINARY_TYPE)" build setting of app target to "Automatic (automatic)" Change app target settings to link, but not embed framework target (e.g. change from "Embed and Sign" to "Do Not Embed" in "Frameworks, Libraries and Embedded Content" section in "General" tab) Run again (on Device!) and observe how the resources framework resource cannot be found anymore (using SwiftUI you will see a "No image/color named '...' in asset catalog for ..." error message in console logs) Note: Everything works fine in Simulator Same behavior for Release and Debug configuration Same behavior for manual and automatic merging Same behavior for resources which are not bundled in Asset Catalog When archiving the app, an "Assets.car" file is never present (even when creating archiving for Simulator target, when "Allow archiving for Simulator" is enabled) Reported as FB13716505 Test Project: https://github.com/iteracticman/MergeableResources/
Posted
by peweone.
Last updated
.
Post not yet marked as solved
1 Replies
186 Views
Xcode 15.2 linker error (Assertion failed: (rebasePtr->target == low56), function writeChainEntry, file ChainedFixups.cpp, line 1218) The same project builds fine on Xcode 14.3.1. It also builds fine when building a debug build to device. Any ideas on what we might be doing wrong?
Posted
by jacck.
Last updated
.
Post not yet marked as solved
1 Replies
268 Views
Hello everyone, Our iOS app is taking too long to launch. On checking the launch profile, we are seeing that most of the launch time is being spent in applying fixups which is taking more than a second and at times even more to complete. Our deployment target is iOS 15+. We have checked using dyld_info that our binary uses chained fixups. Since chained fixups are enabled, page-in linking should also be enabled for our app as per this WWDC session. Can someone please help us understand why the fixups application is taking this long and how can we improve it? Thanks.
Posted Last updated
.
Post not yet marked as solved
0 Replies
274 Views
I am wondering where the source code of ld-prime is on Github. There are references to it in the github for dyld, but I can't find it anywhere. I have a suspicion that it uses LLVM for linking. I'm looking out of curiosity to see if Apple is slowly closing down its compile toolchain and maybe learn how Apple sped up the linking stage.
Posted Last updated
.
Post not yet marked as solved
1 Replies
183 Views
Hi, I am splitting my iOS app into smaller components, the natural way of doing this is to create static libraries that I can link with the main binary. I did succeed at making small static libraries (.a) and link them, but I was struggling with static framework where I have color assets. Finally I was able to make it work by going to the app target > Build Phases > Copy Bundle Resources and add there the .xcassets from the static framework I created. The confusion on my side is that the assets are accessed from the Framework code not from the app target code, and the guidance I am asking for is: How to create and link a static framework on iOS so that the framework can load and use it's own defined assets without having to do the Copy Bundle Resources step. Best Regards, Ion
Posted
by iostafi.
Last updated
.
Post not yet marked as solved
1 Replies
199 Views
Hi everyone, Our app runs on iOS deployment target 15.0. As per the WWDC 2022 session, page-in linking should be enabled for apps where chained-fixups is enabled. Since chained fixups are enabled from iOS deployment target 13.4+ which is true for our app, will page-in linking be applied to it? Is there some flag which we can use to confirm if it is applied for our app or not? We have tried using dyld_info tool but could not find a command which can provide this information.
Posted Last updated
.
Post not yet marked as solved
3 Replies
539 Views
I have a React-Native App that I am trying to build to iOS using Xcode. When I build to my iPhone 12 Mini (iOS 17.4.1), the app works perfectly. When I build to my iPhone 7 Plus (iOS 15.8.2), the app pauses running immediately, and Xcode displays the following in the log: dyld[935]: Symbol not found: (_JSGlobalContextSetInspectable) Referenced from: '/private/var/containers/Bundle/Application/2579192B-74C5-4B54-AA59-948C49A4A7CA/MANHUNT2.app/MANHUNT2' Expected in: '/System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore' The app used to work perfectly on both phones, but this error has been happening recently, and I am unsure of the cause. Cleaning build folder and deleting derived data has not fixed the issue. Xcode: Version 15.3 React-Native: 0.73.6 Working Phone: iOS 17.4.1 Non-Working Phone: iOS 15.8.2
Posted Last updated
.
Post not yet marked as solved
1 Replies
249 Views
I have the XCode Version 15.3 (15E204a). When I try to compile my application, the following errors occur: Undefined symbol: _GDTCCTConstructiOSClientInfo Undefined symbol: _GDTCCTNetworkConnectionInfoNetworkMobileSubtype Linker command failed with exit code 1 (use -v to see invocation) Any solution to fix this issue?
Posted Last updated
.
Post not yet marked as solved
1 Replies
164 Views
I am building a unit test. The target of this unit test is my framework. My framework linked with couple of static libraries. When the test is running in simulator with host app it works fine. But when I try to test without host app I get following error from linker. PS: My test's xcconfig is similar to the host app's, and I can build the host app successfully. Undefined symbols for architecture arm64: "__mh_execute_header", referenced from: So what is __mh_execute_header and what framework/library it is defined in? Thanks for any help!
Posted
by jialiang.
Last updated
.
Post not yet marked as solved
0 Replies
230 Views
This is a major issue. My iPad app is crashing in the App Store. In order to fix it, I found a post that recommended making the framework optional. I did so. Now I can't compile on simulator and besides, it did not fix the iPad App Store crash. ld: framework 'JournalingSuggestions' not found
Posted Last updated
.
Post not yet marked as solved
1 Replies
320 Views
With XCode 14 and below, our macOS application is building and running fine. The application depends on some third-party .dylibs and also a couple of .frameworks that we make in-house, all of which are happily in the .app bundle and working. When compiled under XCode 15, the application crashes because one of our .frameworks now tries to load these dylibs which cannot be found if run on a machine that didn't build it. Note that previously, this framework never depended on these dylibs before, but the application does. The rpaths for these dylibs are pointing to the build dependencies folder, which would only exist on a build machine. Also, the dependencies are now looking for versioned dylib filenames, while the application itself depends on the un-versioned dylib filenames. So to recap, that's 3 new problems when building with the new linker: The framework is now dependent on dylibs that normally only the application depends on The new dependency is on versioned dylibs, where the original application dependency is on un-versioned dylibs The framework's rpaths now include intermediate build folders Running otool -L on the framework binary shows a clear difference between ld_prime and ld_classic. The dependencies on the third-party dylibs are only showing up when the framework is built with the new linker. We have a couple of workarounds: Using ld_classic to build our application with the old linker Using post-build commands (install_name_tool) to change the dependencies and remove the build folders from the rpaths Though ultimately, workaround 1) could only be temporary and 2) is hacky. We'd like to understand why the linker is exhibiting this new behaviour, so we can make the proper adjustments to fix this the correct way. Any insight would be greatly appreciated. Thanks in advance. Note: this is a cross-platform product, and CMake is used to generate the .xcodeproj project file.
Posted
by Jeffrey_B.
Last updated
.
Post not yet marked as solved
7 Replies
592 Views
Hi, I have a unity game which i am trying to export to iOS. The build was working fine until i had to integrate the following SDKs into my project. Facebook SDK Firebase (firestore, messaging, auth) Google ads My Xcode version is: 15.1 Build target: 12 i'm getting the following error in the logs while trying to build: Any help would be appreciated The error is Undefined symbols and linker command failed with exit code 1 (use -v to see invocation) with output ld: Undefined symbols: absl::lts_20220623::variant_internal::ThrowBadVariantAccess(), referenced from: firebase::firestore::nanopb::SharedMessage&lt;firebase::firestore::_google_firestore_v1_Value&gt;&amp; absl::lts_20220623::variant_internal::TypedThrowBadVariantAccess&lt;firebase::firestore::nanopb::SharedMessage&lt;firebase::firestore::_google_firestore_v1_Value&gt;&amp;&gt;() in libFirebaseCppFirestore.a[arm64][37](field_value_main.cc.o) firebase::firestore::DocumentReference const&amp; absl::lts_20220623::variant_internal::TypedThrowBadVariantAccess&lt;firebase::firestore::DocumentReference const&amp;&gt;() in libFirebaseCppFirestore.a[arm64][37](field_value_main.cc.o) std::__1::vector&lt;firebase::firestore::FieldValue, std::__1::allocator&lt;firebase::firestore::FieldValue&gt;&gt; const&amp; absl::lts_20220623::variant_internal::TypedThrowBadVariantAccess&lt;std::__1::vector&lt;firebase::firestore::FieldValue, std::__1::allocator&lt;firebase::firestore::FieldValue&gt;&gt; const&amp;&gt;() in libFirebaseCppFirestore.a[arm64][37](field_value_main.cc.o) std::__1::unordered_map&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt;&gt;, firebase::firestore::FieldValue, std::__1::hash&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt;&gt;&gt;, std::__1::equal_to&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt;&gt;&gt;, std::__1::allocator&lt;std::__1::pair&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt;&gt; const, firebase::firestore::FieldValue&gt;&gt;&gt; const&amp; absl::lts_20220623::variant_internal::TypedThrowBadVariantAccess&lt;std::__1::unordered_map&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt;&gt;, firebase::firestore::FieldValue, std::__1::hash&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt;&gt;&gt;, std::__1::equal_to&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt;&gt;&gt;, std::__1::allocator&lt;std::__1::pair&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt;&gt; const, firebase::firestore::FieldValue&gt;&gt;&gt; const&amp;&gt;() in libFirebaseCppFirestore.a[arm64][37](field_value_main.cc.o) firebase::firestore::nanopb::SharedMessage&lt;firebase::firestore::_google_firestore_v1_Value&gt; const&amp; absl::lts_20220623::variant_internal::TypedThrowBadVariantAccess&lt;firebase::firestore::nanopb::SharedMessage&lt;firebase::firestore::_google_firestore_v1_Value&gt; const&amp;&gt;() in libFirebaseCppFirestore.a[arm64][37](field_value_main.cc.o) absl::lts_20220623::optional_internal::throw_bad_optional_access(), referenced from: absl::lts_20220623::optional&lt;firebase::firestore::_google_firestore_v1_Value&gt;::value() &amp;&amp; in libFirebaseCppFirestore.a[arm64][35](document_snapshot_main.cc.o) absl::lts_20220623::optional&lt;firebase::firestore::model::Document&gt;::value() const &amp; in libFirebaseCppFirestore.a[arm64][40](query_main.cc.o) absl::lts_20220623::optional&lt;std::__1::vector&lt;firebase::firestore::DocumentChange, std::__1::allocator&lt;firebase::firestore::DocumentChange&gt;&gt;&gt;::value() &amp; in libFirebaseCppFirestore.a[arm64][41](query_snapshot_main.cc.o) absl::lts_20220623::optional&lt;std::__1::vector&lt;firebase::firestore::DocumentSnapshot, std::__1::allocator&lt;firebase::firestore::DocumentSnapshot&gt;&gt;&gt;::value() &amp; in libFirebaseCppFirestore.a[arm64][41](query_snapshot_main.cc.o) absl::lts_20220623::optional&lt;std::__1::unordered_set&lt;firebase::firestore::FieldPath, std::__1::hash&lt;firebase::firestore::FieldPath&gt;, std::__1::equal_to&lt;firebase::firestore::FieldPath&gt;, std::__1::allocator&lt;firebase::firestore::FieldPath&gt;&gt;&gt;::value() const &amp; in libFirebaseCppFirestore.a[arm64][43](user_data_converter_main.cc.o) firebase::firestore::api::AggregateQuery::Get(std::__1::function&lt;void (firebase::firestore::util::StatusOr&lt;long long&gt; const&amp;)&gt;&amp;&amp;), referenced from: firebase::firestore::AggregateQueryInternal::Get(firebase::firestore::AggregateSource) in libFirebaseCppFirestore.a[arm64][29](aggregate_query_main.cc.o) firebase::firestore::api::operator==(firebase::firestore::api::AggregateQuery const&amp;, firebase::firestore::api::AggregateQuery const&amp;), referenced from: firebase::firestore::operator==(firebase::firestore::AggregateQueryInternal const&amp;, firebase::firestore::AggregateQueryInternal const&amp;) in libFirebaseCppFirestore.a[arm64][29](aggregate_query_main.cc.o) firebase::firestore::operator==(firebase::firestore::AggregateQuerySnapshotInternal const&amp;, firebase::firestore::AggregateQuerySnapshotInternal const&amp;) in libFirebaseCppFirestore.a[arm64][30](aggregate_query_snapshot_main.cc.o) firebase::firestore::api::Query::Count() const, referenced from: firebase::firestore::QueryInternal::Count() in libFirebaseCppFirestore.a[arm64][40](query_main.cc.o) firebase::firestore::core::Query::normalized_order_bys() const, referenced from: firebase::firestore::QueryInternal::ToBound(firebase::firestore::QueryInternal::BoundPosition, firebase::firestore::DocumentSnapshot const&amp;) const in libFirebaseCppFirestore.a[arm64][40](query_main.cc.o) firebase::firestore::QueryInternal::ToBound(firebase::firestore::QueryInternal::BoundPosition, firebase::firestore::DocumentSnapshot const&amp;) const in libFirebaseCppFirestore.a[arm64][40](query_main.cc.o) firebase::firestore::QueryInternal::ToBound(firebase::firestore::QueryInternal::BoundPosition, firebase::firestore::DocumentSnapshot const&amp;) const in libFirebaseCppFirestore.a[arm64][40](query_main.cc.o) vtable for firebase::firestore::api::AggregateQuery, referenced from: firebase::firestore::api::AggregateQuery::AggregateQuery(firebase::firestore::api::AggregateQuery const&amp;) in libFirebaseCppFirestore.a[arm64][2](aggregate_query.cc.o) firebase::firestore::api::AggregateQuery::~AggregateQuery() in libFirebaseCppFirestore.a[arm64][2](aggregate_query.cc.o) clang: error: linker command failed with exit code 1 (use -v to see invocation)
Posted Last updated
.
Post not yet marked as solved
4 Replies
2.3k Views
Second attempt to publish the Mac version of my App, but it was rejected again due to the same error: 'Library missing'. The library IS included with the build. The extracted .app from .xcarchive runs without a problem on different machines, both M1 and Intel. So, I don't know what's wrong. Can somebody please help me? I can provide the complete .ips from Apple if needed. { "code": 1, "flags": 518, "namespace": "DYLD", "indicator": "Library missing", "details": [ "(terminated at launch; ignore backtrace)" ], "reasons": [ "Library not loaded: @rpath/TitaniumKit.framework/Versions/A/TitaniumKit", "Referenced from: &lt;85BA8613-0157-3B28-99AF-E73F1E579B72&gt; /Applications/TiDesigner.app/Contents/MacOS/TiDesigner", "Reason: tried: '/usr/lib/swift/TitaniumKit.framework/Versions/A/TitaniumKit' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/TitaniumKit.framework/Versions/A/TitaniumKit' (no such file), '/usr/lib/swift/TitaniumKit.framework/Versions/A/TitaniumKit' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/TitaniumKit.framework/Versions/A/TitaniumKit' (no such file), '/System/Library/Frameworks/TitaniumKit.framework/Versions/A/TitaniumKit' (no such file, not in dyld cache), (security policy does not allow @ path expansion)" ] }
Posted
by macCesar.
Last updated
.
Post not yet marked as solved
1 Replies
253 Views
After reading An Apple Library Primer and watching Meet mergeable libraries (both really good resources) I'm sold on mergeable libraries. In my company we're working with static libraries as much as possible (both for precompiled dependencies and for our own Xcode projects). I can see that switching to mergeable libraries would (at least) improve iteration time because mergeable libraries would only be merged in release configs by default. You made it sound like it's "the holy grail of libraries". However, before starting the migration process I'd like to know: Is there any drawback to (merged) mergeable libraries when compared to using static libraries? I got the idea that mergeable libraries behave "almost" like static libraries after being linked "statically" with the app. What differences can I expect? Is there any situation where it's better to use static libraries instead of mergeable libraries? Thank you!
Posted Last updated
.