Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Swift Package Manager support #143

Merged
merged 1 commit into from
Jan 13, 2021
Merged

Conversation

ejensen
Copy link
Contributor

@ejensen ejensen commented Dec 18, 2020

Adds support for using SwiftTweaks through the Swift Package Manager.

@@ -65,8 +65,7 @@ import UIKit

self.tweakStore = tweakStore

// 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
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

@@ -25,7 +25,11 @@ internal extension UIImage {
// NOTE (bryan): if we just used UIImage(named:_), we get crashes when running in other apps!
// (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
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
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

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.

None yet

3 participants