xcframeworks | integrating xcframeworks and their co-op | iOS library
kandi X-RAY | xcframeworks Summary
kandi X-RAY | xcframeworks Summary
Demonstration of creating and integrating xcframeworks and their co-op with static libraries and Swift packages
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of xcframeworks
xcframeworks Key Features
xcframeworks Examples and Code Snippets
Community Discussions
Trending Discussions on xcframeworks
QUESTION
In the past we've used Objective-C to anonymously get the sharedInstance of a class this way:
...ANSWER
Answered 2022-Feb-23 at 08:47So, I assume you have something like this
QUESTION
I was trying to generate the XCFramework with Kotlin 1.5.31 containing the targets for iOSArm64 and iOSX64 . With the below build.gradle.kt , it generates a FatFrameworks . I’m failing to generate XCFrameworks .
...ANSWER
Answered 2022-Jan-24 at 13:23I think that following the documentation might help here.
Please set library name by the baseName
option and build the final XCFramework by running assembleXCFramework
Gradle task.
QUESTION
I just moved my Xcode project to use Carthage instead of CocoaPods as my dependency manager, so I am trying to update my GitHub Actions CI workflow to download the dependency binaries.
However, after running carthage bootstrap --platform iOS --use-xcframeworks
in my workflow, it eventually gives the output and error:
ANSWER
Answered 2021-Sep-27 at 22:39I figured it out! It turns out you need to specify the GITHUB_TOKEN
as an environment variable when running the carthage bootstrap
command. Here's the updated step in my workflow:
QUESTION
I have a project which needs to use Libcrypto - and I have two versions of Libcrypto (libcrypto.a (from OpenSSL 1.1.1) built for ARM64) and (lcrypto.a (from OpenSSL 1.0.2) for Intel). Leaving aside the issues of whether it's good practice or not to have two different versions, I can say that if I include libcrypto.a then I can build and run on M1 and it works fine on M1. If I include lcrypto.a then I can build and run on Intel and it works fine on Intel. What I can't do is include them both (linker error - The linked library 'lcrypto.a' is missing one or more architectures required by this target: arm64.
) - and if I can't include them both then I can't build a fat binary, and my app is less than entirely useful!
My question is How can I include both in my project - or where can I get (and how can I include) a fat version of Libcrypto? I've looked at this https://github.com/balthisar/openssl-xcframeworks/releases and this https://developer.apple.com/forums/thread/670631 but I'm none the wiser. I think I built a Fat Binary - but the Fat Binary I thought that I built doesn't work for either architecture!
...ANSWER
Answered 2021-Sep-02 at 11:56Use command lipo
to combine binaries
Compile Intel and ARM versions separately (arm version requires Xcode 12).
QUESTION
I am having an issue with GitHub Actions. When I call productsign
the job just hangs. When searching the internet it seems that the job tries to ask the user for a password but I do not get any errors or feedback from the logs. The job just hangs for ever. When run on my own computer everything works as expected and the .pkg is signed.
My step in the workflow is as follows
...ANSWER
Answered 2021-Jul-29 at 14:41Ok, we finally figured it out. The solution is to create tmp keychain, set its as default and configure some attributes. This makes sure codesign
and productsign
can access it without being prompted for a password.
Setup Tmp Keychain
QUESTION
I am trying to create a workflow_dispatch pipeline on Github actions and I want some jobs to be executed under certain circumstances but I am unable to achieve it.
Here is my full yaml file:
...ANSWER
Answered 2021-Jun-28 at 16:15It's not working because you forgot the word event
on your if condition
when using github.inputs.should_deploy_input
The correct syntax is github.event.inputs.should_deploy_input
I just tested it using this workflow:
QUESTION
Consider OpenSSL, the project itself has two products: libssl.a
and libcrypto.a
.
For the sake of simplicity, let's use the precompiled libraries stored in this repository and consider just iphonesimulator
platform.
When looking at the repository, each platform, e.g. iphonesimulator
or iphoneos
will have a set of static libraries for all of the architectures needed.
My goal is to create an XCFramework that bundles those two static libraries, so that it would be convenient to use with Swift Package Manager as a single package.
I definitely can create an XCFramework supporting multiple platforms: iOS Simulator (i386
, x86_64
, arm64
), iOS (arm64
, arm7
...) from static libraries with the following command:
ANSWER
Answered 2021-Jun-08 at 02:08You basically have two options:
- Create two separate XCFrameworks, one for
libcrypto.a
and one forlibssl.a
, or - Combine
libcrypto.a
andlibssl.a
into a single library, let's say,libOpenSSL.a
and use this combined library to create a single XCFramework.
It looks like you know how to do (1). So what do you need to do for (2)?
You can create a combined libOpenSSL.a by doing the following (best to copy the libraries to a clean tmp directory for this):
QUESTION
I'm using Carthage for setting up my project's RxSwift dependency. And recently, I tried to use XCFrameworks instead with the command carthage update --platform ios --use-xcframeworks
. I've set up all that is needed to be set (eg. changing the .frameworks to .xcframeworks in the Link Binary With Libraries
in the targets' Build Phase
, etc). It worked and I can run or test in the simulator, until today that is. When I was trying to do the tests this morning, all of a sudden it failed (although it worked fine before) with the error No such module 'RxBlocking'
. I've double-checked it and the xcframework has already been built in the Carthage/Build
folder, and the xcframework has already been added to the test target's settings.
I've tried all of these but it all failed:
- Setting the
$(PROJECT_DIR)/Carthage/Build
to theFramework Search Paths
for the target - Deleting
DerivedData/
and/orCarthage/
folders - Resetting the Mac
Can anybody help me to fix this? BTW, I'm on XCode 12.4 and Swift 5. Thanks.
...ANSWER
Answered 2021-May-20 at 08:22This is actually because of the Apple tools that can't search for the correct Frameworks Search Path
. The fix is in this link: https://github.com/ReactiveX/RxSwift/issues/2292#issuecomment-804045119
QUESTION
I want to have some XCFrameworks into an umbrella framework or umbrella xcframework using Xcode 12.4 for iOS. I tried all the approaches mentioned in these threads. However, I am not able to get it working for any of the swift classes in my client app.
Note that this works seamlessly with ObjC classes.
XCFramework with static frameworks sub dependencies
Approach 1 - Create .framework
When I build a .framework by adding sub xcframeworks to copy framework build phase, I see that xcframework subprojects are extracted to static libraries ".a" files. I import this .framework in my application which is ObjC + Swift, I get "No such modules" error for all the subprojects in all the swift classes which imports the umbrella framework
Approach 2 - Create .xcframework
When I create a .xcframework with all xcframework sub projects, I get No such module 'XXXX' error in x86_64-apple-ios-simulator.swiftinterface when I use the umbrella framework in the client app
Note that I am linking and embedding the umbrella / xcframework in client app.
Another Thought
Also, when I create a sample app with Xcode 12.4 and import the same umbrella framework/.xcframework, everything works fine. Is this something to do with the client app .xcodeproj created in older versions of XCode ?
...ANSWER
Answered 2021-May-18 at 11:42Some things to try:
Make sure to have
BUILD_LIBRARY_FOR_DISTRIBUTION
set.Link the sub frameworks statically. If you are including the other frameworks using CocoaPods, make sure you specify
use_frameworks! :linkage => :static
.In your source files where you use the sub-frameorks, write
@_implementationOnly import SomeFramework
.
QUESTION
I need to install with carthage the package https://github.com/socketio/socket.io-client-swift with a Xcode 12 project.
i have a CartFile :
...ANSWER
Answered 2021-Feb-25 at 21:57I found that Carthage doesn't set the FRAMEWORK_SEARCH_PATHS
correctly in many cases, which for me caused Socket.IO to be unable to find Starscream when compiling.
Here's a workaround script you can use to set the FRAMEWORK_SEARCH_PATHS
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install xcframeworks
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page