I have a project with a framework target, but when I archive, the framework does not show up in organizer. I checked apple for documentation, but only found reference for static libraries.
Has anyone experienced this before?
I have a project with a framework target, but when I archive, the framework does not show up in organizer. I checked apple for documentation, but only found reference for static libraries.
Has anyone experienced this before?
Go into your framework and build.
cmd+b
You will find in your products YOUR_FRAMEWORK.framework
Right click on "YourLibrary.framework" -> Show in Finder
Now you can share/import your library.
Attention: Don't link/reference to this path because the framework is stored in Derived Data.
The steps are documented by Apple here
Set up the project
To set up your project for creating an XCFramework, ensure your Xcode project has a scheme that builds only the framework target and its dependencies.
Configure these build settings on your target:
Set the Build Libraries for Distribution build setting to Yes. For Swift, this enables support for library evolution and generation of a module interface file.
Set the Skip Install build setting to No. If enabled, the built products aren‘t included in the archives.
Leave the Architectures build setting unset. The predefined value configures the target to build a universal binary for all the possible architectures the target platform uses.
Then you can use Archive to build your framework for Release.
Once built, the Organizer window will open. You can then click on Distribute Content -> Build Products and export your framework.
The only thing you should do is build the target,then show Products in finder ,you will see it.
Archive framework
Product -> Archive
//or
xcodebuild archive
Xcode v12 does not have such problem and when you try to archive a framework Xcode prompt you to corresponding Archives window
Archive
is an action from Scheme
[About] which is competitor for Build
action. Archive
includes Build
with additional logic. For example Archive
is used for XCFramework
[Example] which additionally can contains .dSYM
and .BCSymbolMap
files
For usual purposes you can just use Build
action, it creates a corresponding .framework
file in a Build location
[About]
© 2022 - 2024 — McMap. All rights reserved.