Skip to content

Add Swift Package Manager support#143

Merged
bryanjclark merged 1 commit intobryanjclark:masterfrom
kiva:swiftpm
Jan 13, 2021
Merged

Add Swift Package Manager support#143
bryanjclark merged 1 commit intobryanjclark:masterfrom
kiva:swiftpm

Conversation

@ejensen
Copy link
Copy Markdown
Contributor

@ejensen ejensen commented Dec 18, 2020

Adds support for using SwiftTweaks through the Swift Package Manager.


// Are we running on a Mac? If so, then we're in a simulator!
#if (arch(i386) || arch(x86_64))
#if targetEnvironment(simulator)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in Swift 4.1

// (Why? Because by default, iOS searches in your app's bundle, but we need to redirect that to the bundle associated with SwiftTweaks
private convenience init?(inThisBundleNamed imageName: String) {
#if SWIFT_PACKAGE
self.init(named: imageName, in: Bundle.module, compatibleWith: nil)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import XCTest
@testable import SwiftTweaks

class SwiftTweaksTests: XCTestCase { }
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This type was unused

@Kaspik
Copy link
Copy Markdown

Kaspik commented Jan 9, 2021

@bryanjclark Please, please! THIS needs to go in, we are trying to get rid of CocoaPods entirely. 🚀

@bryanjclark bryanjclark merged commit bbdcd13 into bryanjclark:master Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants