This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| platforms: [ .iOS(.v12) ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| swift package init --type library |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SDKROOT = iphoneos | |
| SUPPORTED_PLATFORMS = iphonesimulator iphoneos | |
| IPHONEOS_DEPLOYMENT_TARGET = 12.0 | |
| ARCHS = $(ARCHS_STANDARD) | |
| VALID_ARCHS = $(ARCHS_STANDARD) | |
| VALIDATE_PRODUCT = YES | |
| LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks | |
| TARGETED_DEVICE_FAMILY = 1, 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| swift package generate-xcodeproj --xcconfig-overrides ./Sources/ios.xcconfig |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| spm-tutorial/Tests/spm-tutorialTests/XCTestManifests.swift:4:28: error: \ | |
| use of undeclared type 'XCTestCaseEntry' | |
| public func allTests() -> [XCTestCaseEntry] { | |
| ^~~~~~~~~~~~~~~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public typealias XCTestCaseEntry = | |
| (testCaseClass: XCTestCase.Type, allTests: [(String, XCTestCaseClosure)]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import XCTest | |
| #if !os(macOS) && !os(iOS) | |
| public func allTests() -> [XCTestCaseEntry] { | |
| return [ | |
| testCase(spm_tutorialTests.allTests), | |
| ] | |
| } | |
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| public final class FrameworkPackage { | |
| public init () { } | |
| public func randomColor() -> UIColor { | |
| return UIColor.random | |
| } | |
| } | |
| public extension UIColor { | |
| public static var random: UIColor { | |
| return UIColor(red: .random(in: 0...1), green: .random(in: 0...1), blue: .random(in: 0...1), alpha: 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| import class ios_framework_package.FrameworkPackage | |
| class ViewController: UIViewController { | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| self.view.backgroundColor = FrameworkPackage().randomColor() | |
| } | |
| @IBAction func pressed(_ button: UIButton) { | |
| self.view.backgroundColor = FrameworkPackage().randomColor() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Compile Swift Module 'ios_framework_package' (1 sources) | |
| ./spm-ios-example/ios-framework-package/Sources/ios-framework-package/ios_framework_package.swift:1:8: | |
| error: no such module 'UIKit' | |
| import UIKit | |
| ^ | |
| error: terminated(1): /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build-tool | |
| -f./spm-ios-example/ios-framework-package/.build/debug.yaml main output: ... |