• Stars
    star
    346
  • Rank 122,430 (Top 3 %)
  • Language
    Swift
  • License
    MIT License
  • Created over 3 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

macOS utility for converting fat-frameworks to SPM-compatible XCFramework with arm64-simulator support

xcframework-maker

swift 5.4 platform macOS SPM supported

macOS utility for converting fat-frameworks to SPM-compatible XCFramework with arm64-simulator support.

πŸ“ Description

make-xcframework is a simple command-line utility written in Swift that creates XCFramework file from fat framework files. The resulting XCFramework file can be added as a dependency to your Swift Package, using .binaryTarget (read more in official documentation).

Optionally, arm64-simulator support can be included in the resulting XCFramework to allow development on a computer with Apple Silicon (M1) processor without a need to run Xcode through Rosetta.

The xcframework-maker Swift Package contains make-xcframework that can be used from the command line and XCFrameworkMaker library that you can integrate with your Swift Package and use programmatically.

Note: arm64-to-sim is used to "hack" the native (device) arm64 architecture slice so it can be used in a simulator running on Apple Silicon. This is an experimental feature, and it can fail for many reasons. It was tested and proved to be working with the GoogleInteractiveMediaAds dynamic fat framework, but your experience may vary.

πŸ›  Build

Use Swift 5.4 for building the utility on macOS:

swift build -c release

You can copy the executable or run it directly from the build directory:

.build/release/make-xcframework

▢️ Usage

OVERVIEW: Utility for creating XCFramework from legacy fat-framework files.

Use this tool to create XCFramework from legacy fat-framework files. Resulting XCFramework can be
added as a dependency to your Swift Package. Optionally arm64-simulator support can be included in
the resulting XCFramework, so it can be used on M1 Mac without the need to run Xcode through
Rosetta.

USAGE: make-xcframework [-ios <path>] [-tvos <path>] [-arm64sim] -output <path> [-verbose]

OPTIONS:
  -ios <path>             iOS input framework path.
        Provide a path to the iOS fat framework that should be included in the resulting
        XCFramework. Eg "path/to/iOS/Framework.framework"
  -tvos <path>            tvOS input framework path.
        Provide a path to the tvOS fat framework that should be included in the resulting
        XCFramework. Eg "path/to/tvOS/Framework.framework"
  -arm64sim               Add support for arm64 simulator.
        Use device-arm64 architecture slice as a simulator-arm64 architecture slice and include it
        the resulting XCFramework. This makes development possible on M1 Mac without using Rosetta.
  -output <path>          Output directory path.
        Provide a path to a directory where the resulting XCFramework should be created. Eg
        "path/to/output/directory"
  -verbose                Log detailed info to standard output.
        When this flag is provided, detailed information about each performed action is logged to
        standard output.
  -help, -h               Show help information.

Example - GoogleInteractiveMediaAds

  1. Download GoogleInteractiveMediaAds fat-frameworks from Google website:

  2. Unzip downloaded files.

  3. Run make-xcframework:

    make-xcframework \
      -ios path/to/ios/GoogleInteractiveMediaAds.framework \
      -tvos path/to/tvos/GoogleInteractiveMediaAds.framework \
      -arm64sim \
      -output output/path
  4. Resulting XCFramework will be created in the provided output directory:

    output/path/GoogleInteractiveMediaAds.xcframework

β˜•οΈ Do you like the project?

Buy Me A Coffee

πŸ“„ License

Copyright Β© 2021 Dariusz Rybicki Darrarski

License: MIT

More Repositories

1

tca-swift-log

Swift
93
star
2

tca-swiftui-navigation-demo

Demo project that shows how to implement navigation in SwiftUI iOS application using Swift Composable Architecture
91
star
3

swift-composable-app-example

Example iOS app built with module composition in mind.
Swift
85
star
4

swiftui-app-icon-creator

Create iOS and macOS application icon in Xcode with SwiftUI
Swift
79
star
5

DRCollectionViewTableLayout-iOS

UICollectionView 2d-table / grid / spreadsheet layout
Objective-C
74
star
6

swift-composable-presentation

Navigation helpers for SwiftUI applications built with ComposableArchitecture
Swift
73
star
7

darrarski-app

iOS & macOS SwiftUI application about my work and services
Swift
68
star
8

GoogleSignIn-Swift

Minimalistic Google Sign In oAuth 2.0 client written in Swift
Swift
44
star
9

WallpapersStudio-iOS

Convert photos into wallpapers - iOS application build with SwiftUI and ComposableArchitecture
Swift
42
star
10

darrarski

Dariusz Rybicki - Software Engineer, iOS Developer, Scrum Master, Mentor
35
star
11

DRCircularProgress-iOS

Circular progress view for iOS apps
Objective-C
32
star
12

Messages-iOS

Messages app prototype for iOS
Swift
31
star
13

swift-google-drive-client

Basic Google Drive HTTP API client that does not depend on Google's SDK.
Swift
27
star
14

ScrollViewController

Wraps your custom view and presents it on the screen in the way it fills visible area
Swift
25
star
15

swiftui-simple-table

SwiftUI table view for iOS and macOS
Swift
19
star
16

tca-navigation-stack-poc

Swift
18
star
17

github-status-bar

GitHub notifications in macOS status bar. Written in Swift and unidirectional data flow architecture.
Swift
17
star
18

DRForms-iOS

iOS Objective-C library for implementing dynamic forms.
Objective-C
16
star
19

swiftui-tabs-view

SwiftUI tabbed interface. Customizable replacement for `SwiftUI.TabView`.
Swift
13
star
20

SwipeToReveal-iOS

Customizable swipe-to-reveal view for iOS apps
Swift
11
star
21

DRSwipeMenu-iOS

Customizable swipe-to-reveal menu for iOS apps
Objective-C
10
star
22

sort-swift-imports

Sort import statements in your Swift source code.
Swift
10
star
23

DRTableViewManager-iOS

Object-oriented UITableViewDataSource and UITableViewDelegate protocols proxy
Objective-C
10
star
24

SwiftUI-iOS-components

iOS Team Tech Stack showcased
Swift
9
star
25

ScrollViewKeyboardAvoider

Adjust insets in UIScrollView so the keyboard does not cover content
Swift
6
star
26

SwiftUIMKMapView

SwiftUI wrapper for MapKit's MKMapView (UIKit).
Swift
6
star
27

TotalHours-app

Measure your events time. iPhone / iPad / Mac app.
6
star
28

alfred_workflow_eject_disk

Workflow for Alfred app that ejects a disk
AppleScript
5
star
29

TableViewDemo

DRTableViewManager example app
Objective-C
5
star
30

tca-ifletstore-effect-cancellation-demo

5
star
31

DocumentBrowser-iOS

Convenient wrapper for UIDocumentBrowserViewController for use in document-based iOS applications.
Swift
5
star
32

SwiftEndpoint

Lightweight library providing higher level of abstraction for implementing networking in iOS and macOS applications
Swift
5
star
33

SideMenuTransition-iOS

Swift
5
star
34

tca-swiftui-navigation

Navigation helpers for ComposableArchitecture to be used in SwiftUI applications
Swift
5
star
35

spm-platform-specific-dependecy-demo

Demo of multi-platform Swift Package with platform-specific dependency
Swift
5
star
36

KeyboardFrameChangeListener

iOS helper that notifies you when on-screen keyboard changes its frame
Swift
5
star
37

store-navigation-controller

Swift
5
star
38

swift-dropbox-client

Basic Dropbox HTTP API client that does not depend on Dropbox's SDK
Swift
5
star
39

tca-frameworks

Experimental script for building binary XCFrameworks of Composable Architecture and its dependencies.
Shell
4
star
40

DRDateHelpers-iOS

Date manipulation helpers for iOS
Objective-C
3
star
41

TCACoordinatorDemo

Swift
3
star
42

DRGlyphLabel-iOS

A simple library that allows you to create labels with bitmap fonts in UIKit.
Objective-C
3
star
43

CITest-iOS

Continuous Integration test project
Shell
3
star
44

DRURLParametersParser-iOS-OSX

Helper class for retrieving parameters values from url
Objective-C
2
star
45

iOS-State-Restoration

State restoration in iOS app that does not use storyboards
Swift
2
star
46

CustomIntensityVisualEffectView

UIVisualEffectView-alike view that allows to customise effect intensity
Swift
2
star
47

DRRxObservableArray

Generic observable array for RxSwift
Swift
2
star
48

BNRCoreDataStackConvenienceUpdates

BNRCoreDataStack ConvenienceUpdates Add On
Swift
2
star
49

DRNet

iOS / OS X networking library written in Swift
Swift
1
star
50

UnderControl

Apple's GameController framework wrapper for RxSwift
Swift
1
star
51

SharedShopping-iOS

Swift
1
star
52

ScrollViewLayout

Customise layout of UIScrollView's subviews
Swift
1
star
53

SwiftUI_Playground

SwiftUI playground project
Swift
1
star
54

DRScreenshot-iOS-OSX

Helpful categories for taking screenshots
Objective-C
1
star
55

carthage-playground

Sandbox for playing with Carthage frameworks.
Swift
1
star
56

UDFExamples

Swift
1
star
57

ScrollingBackgrounds

UIScrollView backgrounds with dynamic layout
Swift
1
star
58

SwiftUI-navigation-demo

Swift
1
star
59

swift-shell

Library for running shell scripts and other executables from swift code.
Swift
1
star
60

DRLaunchAtLogin-OSX

Utility for enabling app launch at login under OS X
Objective-C
1
star