Posts

Post not yet marked as solved
1 Replies
923 Views
I have 2 frameworks, which are both Swift Statically-linked frameworks. This means that my Mach-O Type is Static Library for both of the targets. One of the targets (A) depends on another target (B). I successfully archive A, and then I successfully archive B, linking against A. Embedding is enabled, however I don't seem to find any mentions of A in the exported build artifacts. However, when I import archived and exported B in another target, it gives me a compilation error: ld: warning: Could not find or use auto-linked framework 'A' Undefined symbols for architecture x86_64: "A.someMethodInsideA() -> Swift.Int", referenced from: B.someMethodInsideB() -> Swift.Int in B(B.o) ld: symbol(s) not found for architecture x86_64 You see, I set the A's Mach-O Type to Static Library, so I expect A's binaries to be completely embedded into B with static linkage, but this doesn't happen for some reason. How can I embed a static framework inside a static framework?
Posted Last updated
.
Post not yet marked as solved
1 Replies
562 Views
My situation: I am developing a dynamically linked framework called A, wrapped into .xcframework I depend upon other frameworks B and C that are linked statically However, I don't want the consumers of A to learn about the existence of B and C And because of this, I would like to perform single object pre-link during the linkage of A so that B and C are totally consumed by A and are to be never seen again. This task would be relatively easy if instead of static frameworks (.framework), I used static libraries (.a). In this case, I would be able to easily plop the path to the .a into the Prelink Libraries setting, set Perform Single-Object Prelink to YES, disable the embedding - and the goal would be accomplished. However, I am facing the linkage against frameworks, not libs. The problem is that it has resources and bundles inside of it. If I put a path to the .xcframework or .framework into the Prelink Libraries Build Setting, the build fails: Command MasterObjectLink failed with a nonzero exit code can't map file, errno=22 file '/Users/*****/B/B.xcframework/ios-arm64/B.framework' And if I put a path to the actual executable inside the framework (B.xcframework/ios-arm64/B.framework/B), the build succeeds. However, none of the resources of B.framework are present in the resulting output. Is there a way to automatically copy resources during Single-Object Prelink?
Posted Last updated
.
Post marked as solved
2 Replies
1.4k Views
I am developing an SDK that other apps will be integrating. In the SDK code base, I provide a billing user interface that features calls to the ApplePay. I would like to use my merchantId so that the payments get billed to my benefit. This is intended behavior and the integrators of the SDK will be fully aware of circumstance. At the same time, the integrators of my SDK also might have Apple Pay integrated into their own app. And they might have their own merchantId's that they created in their Apple Developer portal. Can they use my merchaintId, putting it into the entitlement so that my SDK integrated into their app will be using my merchantId to create Apple Pay payments while being a part of an app signed under a different Apple Development team?
Posted Last updated
.
Post marked as solved
1 Replies
1.4k Views
I have a family of questions related to the new async/await and structured concurrency features in Swift. If we make an async let declaration, the Xcode reports the type of the declaration as the type that the object will have after it's been awaited for. I.E.: If we async let image = downloadImage() then if we inspect image, its type will be UIImage. Question #1: Is there a way to pass an async let declaration to a function as a parameter? I would like to have a function that accepts an async let declaration and transforms it somehow. The obvious way that comes to mind is to wrap the declaration into an async closure that includes an await of this declaration inside, but I wonder if there is a way to reference a type like Async<UIImage>, Task<UIImage> or something else so that an instance of this type could be declared as an async let Question #2: Why does the Xcode report the type of an async let as the type of value after an await instead of some metaphysical type representing the presence of "awaitable" context? Why isn't the type of async let displayed as Task<UIImage>? Why didn't the language go the ECMAScript path where an async function is supposed to return a Promise that can be both subscribed to and awaited?
Posted Last updated
.
Post not yet marked as solved
1 Replies
517 Views
What is the rationale behind this decision, why have they done that? How comes constant is read-and-write while, while multiplier isn't? Original SO question: https://stackoverflow.com/questions/63111894/why-is-nslayoutconstraint-multiplier-read-only
Posted Last updated
.