Compare commits

...
20 Commits
Author SHA1 Message Date
Florian Gabach aa41530d47 4.1.1 release 2020-01-29 15:59:50 +01:00
Florian Gabach 1ac46a4859 Changelog 2020-01-29 15:59:22 +01:00
Florian Gabach 2c02475a49 Bump swift version & fix build 2020-01-29 15:59:01 +01:00
Florian Gabach 752558b420 4.1.0 release 2020-01-29 15:52:39 +01:00
Florian Gabach 1af6fa81f0 SwiftUI readme exemple 2020-01-29 15:51:46 +01:00
Florian Gabach 37c07f099a Prepare v4.1.0 2020-01-29 15:49:51 +01:00
Florian Gabach 612bb4ca11 Merge pull request #5 from SambaTV/master
SwiftUI support
2020-01-29 15:46:20 +01:00
Doron Katz e6fcda22fc Added SwiftUI support 2020-01-28 10:39:04 -08:00
Doron Katz f9282dcef2 Made init for struct public accessible 2020-01-28 10:21:38 -08:00
Doron Katz 8e47206f83 Made classes open instead of public, to access via SwiftUI 2020-01-28 10:21:17 -08:00
Florian Gabach aca50feac8 4.0.2 release 2019-11-22 17:55:05 +01:00
Florian Gabach bdc6b5b6dd Fix typo 2019-11-22 17:52:29 +01:00
Florian Gabach 846edcd8c1 Trigger scan on every push 2019-11-22 17:51:13 +01:00
Florian Gabach e9192698e9 Fix lane's name 2019-11-22 17:46:47 +01:00
Florian Gabach 226b1e3219 Fix build & Actions workflow 2019-11-22 17:43:59 +01:00
Florian Gabach 0f4a0dc5ad Add Github Action config file 2019-11-22 17:10:39 +01:00
Florian Gabach 7eb1e95fd6 README Cleanup 2019-11-21 17:20:39 +01:00
Florian Gabach b38c71af0b Changelog 2019-11-11 17:28:17 +01:00
Florian Gabach 4a34866bfc 4.0.1 release 2019-11-11 17:25:02 +01:00
Florian Gabach dca1bd740d Fix SMP file 2019-11-11 17:19:43 +01:00
24 changed files with 278 additions and 79 deletions
+15
View File
@@ -0,0 +1,15 @@
name: Build
on: [push]
jobs:
build:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- name: Fastlane Action
uses: maierj/fastlane-action@v1.0.0
with:
lane: scan_project
+1
View File
@@ -40,4 +40,5 @@ Carthage/
# Cocoapods
Pods/
fastlane/report.xml
+17
View File
@@ -1,6 +1,23 @@
Changelog
==========
### 4.1.1
- Fix build
### 4.1.0
- Add SwiftUI support (thanks to doronkatz)
### 4.0.2
- Fix pod release
- Add Github workflow
### 4.0.1
- Fix SPM
### 4.0.0
- Swift 5.1
+1
View File
@@ -6,4 +6,5 @@ Contributors to the codebase :
| Name | Github handle | Mail |
| ------------- |------------- | ----- |
| David Lari | DavidLari | / |
| Doron Katz | | David Lari | DavidLari | / |
+1 -1
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'OpenSourceController'
s.version = '4.0.0'
s.version = '4.1.1'
s.summary = 'Display all the librarys licence used in your application. Enjoy !'
s.description = 'Display a screen with all licence used in your apply can be painful to maintain. OpenSourceController was built to respond to this problem. OpenSourceController is a simple parser to display the licences which are used in your application.'
s.homepage = 'https://github.com/floriangbh/OpenSourceController'
+11 -7
View File
@@ -8,7 +8,6 @@
/* Begin PBXBuildFile section */
52D6D9871BEFF229002C0205 /* OpenSourceController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52D6D97C1BEFF229002C0205 /* OpenSourceController.framework */; };
76229B722180AD8400A61697 /* LicenceLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76229B712180AD8400A61697 /* LicenceLoader.swift */; };
76229B7D2180AD9F00A61697 /* HTTPDataLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76229B7C2180AD9F00A61697 /* HTTPDataLoader.swift */; };
76229B802180ADA800A61697 /* OpenSourceControllerConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76229B7E2180ADA800A61697 /* OpenSourceControllerConfig.swift */; };
76229B812180ADA800A61697 /* OpenSourceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76229B7F2180ADA800A61697 /* OpenSourceController.swift */; };
@@ -16,6 +15,8 @@
769FD9D221871DEC00FB5A53 /* LicenceListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 769FD9CE21871DEC00FB5A53 /* LicenceListViewController.swift */; };
769FD9D321871DEC00FB5A53 /* LoadingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 769FD9CF21871DEC00FB5A53 /* LoadingViewController.swift */; };
769FD9D421871DEC00FB5A53 /* OpenSourceTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 769FD9D021871DEC00FB5A53 /* OpenSourceTableViewCell.swift */; };
76B7980F238844F300009193 /* LicenceLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76B7980E238844F300009193 /* LicenceLoader.swift */; };
76B79811238845D300009193 /* Style.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76B79810238845D300009193 /* Style.swift */; };
76D7F24521BEB18A004B74CB /* UITableView+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76D7F24021BEB18A004B74CB /* UITableView+Extensions.swift */; };
76D7F24621BEB18A004B74CB /* Reusable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76D7F24121BEB18A004B74CB /* Reusable.swift */; };
76D7F24721BEB18A004B74CB /* UIViewController+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76D7F24221BEB18A004B74CB /* UIViewController+Extensions.swift */; };
@@ -37,7 +38,6 @@
/* Begin PBXFileReference section */
52D6D97C1BEFF229002C0205 /* OpenSourceController.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OpenSourceController.framework; sourceTree = BUILT_PRODUCTS_DIR; };
52D6D9861BEFF229002C0205 /* OpenSourceController-iOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "OpenSourceController-iOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
76229B712180AD8400A61697 /* LicenceLoader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LicenceLoader.swift; path = Sources/Model/LicenceLoader.swift; sourceTree = "<group>"; };
76229B7C2180AD9F00A61697 /* HTTPDataLoader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = HTTPDataLoader.swift; path = Sources/Loader/HTTPDataLoader.swift; sourceTree = "<group>"; };
76229B7E2180ADA800A61697 /* OpenSourceControllerConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = OpenSourceControllerConfig.swift; path = Sources/OpenSourceControllerConfig.swift; sourceTree = "<group>"; };
76229B7F2180ADA800A61697 /* OpenSourceController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = OpenSourceController.swift; path = Sources/OpenSourceController.swift; sourceTree = "<group>"; };
@@ -45,6 +45,8 @@
769FD9CE21871DEC00FB5A53 /* LicenceListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LicenceListViewController.swift; path = Sources/Controller/LicenceListViewController.swift; sourceTree = "<group>"; };
769FD9CF21871DEC00FB5A53 /* LoadingViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LoadingViewController.swift; path = Sources/Controller/LoadingViewController.swift; sourceTree = "<group>"; };
769FD9D021871DEC00FB5A53 /* OpenSourceTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = OpenSourceTableViewCell.swift; path = Sources/Controller/OpenSourceTableViewCell.swift; sourceTree = "<group>"; };
76B7980E238844F300009193 /* LicenceLoader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LicenceLoader.swift; path = Sources/Loader/LicenceLoader.swift; sourceTree = "<group>"; };
76B79810238845D300009193 /* Style.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Style.swift; path = Sources/Utils/Style.swift; sourceTree = "<group>"; };
76D7F24021BEB18A004B74CB /* UITableView+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "UITableView+Extensions.swift"; path = "Sources/Utils/UITableView+Extensions.swift"; sourceTree = "<group>"; };
76D7F24121BEB18A004B74CB /* Reusable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Reusable.swift; path = Sources/Utils/Reusable.swift; sourceTree = "<group>"; };
76D7F24221BEB18A004B74CB /* UIViewController+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "UIViewController+Extensions.swift"; path = "Sources/Utils/UIViewController+Extensions.swift"; sourceTree = "<group>"; };
@@ -104,7 +106,6 @@
76229B702180AD7700A61697 /* Model */ = {
isa = PBXGroup;
children = (
76229B712180AD8400A61697 /* LicenceLoader.swift */,
76EAA84C1E93EDCD009A41DA /* LicenceFile.swift */,
);
name = Model;
@@ -114,6 +115,7 @@
isa = PBXGroup;
children = (
76229B7C2180AD9F00A61697 /* HTTPDataLoader.swift */,
76B7980E238844F300009193 /* LicenceLoader.swift */,
);
name = Loader;
sourceTree = "<group>";
@@ -125,6 +127,7 @@
76D7F24121BEB18A004B74CB /* Reusable.swift */,
76D7F24021BEB18A004B74CB /* UITableView+Extensions.swift */,
76D7F24421BEB18A004B74CB /* UIView+Extensions.swift */,
76B79810238845D300009193 /* Style.swift */,
76D7F24221BEB18A004B74CB /* UIViewController+Extensions.swift */,
);
name = Utils;
@@ -238,7 +241,7 @@
52D6D9851BEFF229002C0205 = {
CreatedOnToolsVersion = 7.1;
DevelopmentTeam = XEHEC9B46E;
LastSwiftMigration = "";
LastSwiftMigration = 1130;
};
};
};
@@ -287,15 +290,16 @@
76229B7D2180AD9F00A61697 /* HTTPDataLoader.swift in Sources */,
76D7F24621BEB18A004B74CB /* Reusable.swift in Sources */,
769FD9D221871DEC00FB5A53 /* LicenceListViewController.swift in Sources */,
76B79811238845D300009193 /* Style.swift in Sources */,
769FD9D121871DEC00FB5A53 /* OpenSourceViewController.swift in Sources */,
76D7F24721BEB18A004B74CB /* UIViewController+Extensions.swift in Sources */,
76EAA84F1E93EDCD009A41DA /* LicenceFile.swift in Sources */,
76229B722180AD8400A61697 /* LicenceLoader.swift in Sources */,
76D7F24521BEB18A004B74CB /* UITableView+Extensions.swift in Sources */,
769FD9D421871DEC00FB5A53 /* OpenSourceTableViewCell.swift in Sources */,
76D7F24821BEB18A004B74CB /* Array+Extensions.swift in Sources */,
76229B812180ADA800A61697 /* OpenSourceController.swift in Sources */,
769FD9D321871DEC00FB5A53 /* LoadingViewController.swift in Sources */,
76B7980F238844F300009193 /* LicenceLoader.swift in Sources */,
76229B802180ADA800A61697 /* OpenSourceControllerConfig.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -495,7 +499,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.OpenSourceController.OpenSourceController-iOS-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
@@ -510,7 +514,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.OpenSourceController.OpenSourceController-iOS-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
+9 -19
View File
@@ -1,28 +1,18 @@
// swift-tools-version:5.1
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "OpenSourceController",
platforms: [.iOS(.v10)],
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "OpenSourceController",
targets: ["OpenSourceController"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.library(name: "OpenSourceController", targets: ["OpenSourceController"])
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "OpenSourceController",
dependencies: []),
.testTarget(
name: "OpenSourceControllerTests",
dependencies: ["OpenSourceController"]),
]
.target(
name: "OpenSourceController",
path: "",
sources: ["Sources"]
)
],
swiftLanguageVersions: [.v4, .v5]
)
+51 -31
View File
@@ -10,10 +10,10 @@
<p align="center">
<a href="#features">Features</a>
• <a href="#installation">Installation</a>
• <a href="#usage">Usage</a>
• <a href="#translation">Translation</a>
• <a href="#customisation">Customisation</a>
• <a href="#installation">Installation</a>
• <a href="#license">License</a>
</p>
@@ -28,39 +28,11 @@ Display a screen with all licences used in your application can be painful to ma
- [x] Display tableView with licences used in your app
- [x] Download licence from an URL
## Todo (feel free to make PR)
- [ ] Download licence from Podfile (https://github.com/terflogag/OpenSourceController/issues/1)
- [ ] Download licence from Cartfile (https://github.com/terflogag/OpenSourceController/issues/2)
- [ ] Download licence from local file
## Requirements
* Xcode 9
* Xcode 11
* iOS 9.0+ target deployment
* Swift 3, Swift 4 or Swift 4.2 project
## Installation
- To integrate OpenSourceController into your Xcode project using [CocoaPods](http://cocoapods.org), specify it in your Podfile :
```ruby
pod "OpenSourceController", '~> 3.0.0' # Swift 4.2 Version
pod "OpenSourceController", '~> 2.0' # Swift 4.0 Version
pod "OpenSourceController", '~> 1.0.8' # Swift 3.1 version
```
- To integrate OpenSourceController into your Xcode project using [Carthage](https://github.com/Carthage/Carthage), specify it in your Cartfile :
```ruby
github "floriangbh/OpenSourceController" ~> 3.0.0 # Swift 4.2 version
github "floriangbh/OpenSourceController" ~> 2.0 # Swift 4.0 version
github "floriangbh/OpenSourceController" ~> 1.0.8 # Swift 3.1 version
```
* Swift 3, Swift 4 or Swift 5.1 project
## Usage
@@ -89,6 +61,30 @@ openSourceVC.presentOpenSourceController(from: self)
openSourceVC.pushOpenSourceController(from: self)
```
With SwiftUI :
```swift
struct OpenSourceView: UIViewControllerRepresentable {
@available(iOS 13, *)
public func updateUIViewController(_ uiViewController: OpenSourceViewController, context: UIViewControllerRepresentableContext<OpenSourceView>) {
//
}
@available(iOS 13, *)
public func makeUIViewController(context: UIViewControllerRepresentableContext<OpenSourceView>) -> OpenSourceViewController {
let openSourceVC = OpenSourceViewController(licences:
[LicenceFile(title: "FacebookImagePicker",
url: "https://raw.githubusercontent.com/terflogag/FacebookImagePicker/master/LICENSE"),
LicenceFile(title: "JSQMessagesViewController",
url: "https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/develop/LICENSE")],
showCloseButton: true,
configuration: OpenSourceControllerConfig(),
licenceLoader: LicenceLoader())
return openSourceVC
}
}
```
## Customisation
You can apply some customisation. To do it you can use the OpenSourceControllerConfig structure like this :
@@ -124,6 +120,30 @@ OpenSourceController is currently write in english. If you need translation for
"Unable to load this licence." = "<your_translation>";
```
## Installation
- To integrate OpenSourceController into your Xcode project using [Swift Packet Manager](https://github.com/apple/swift-package-manager), specify this url in Xcode : `https://github.com/floriangbh/OpenSourceController`
- To integrate OpenSourceController into your Xcode project using [CocoaPods](http://cocoapods.org), specify it in your Podfile :
```ruby
pod "OpenSourceController", '~> 3.0.0' # Swift 4.2 Version
pod "OpenSourceController", '~> 2.0' # Swift 4.0 Version
pod "OpenSourceController", '~> 1.0.8' # Swift 3.1 version
```
- To integrate OpenSourceController into your Xcode project using [Carthage](https://github.com/Carthage/Carthage), specify it in your Cartfile :
```ruby
github "floriangbh/OpenSourceController" ~> 3.0.0 # Swift 4.2 version
github "floriangbh/OpenSourceController" ~> 2.0 # Swift 4.0 version
github "floriangbh/OpenSourceController" ~> 1.0.8 # Swift 3.1 version
```
## Author
Florian Gabach, florian.gabach@gmail.com
@@ -6,9 +6,13 @@
// Copyright © 2018 OpenSourceController. All rights reserved.
//
#if !os(macOS)
import UIKit
#else
import AppKit
#endif
final class LicenceListViewController: UITableViewController {
open class LicenceListViewController: UITableViewController {
// MARK: - Var
@@ -24,11 +28,11 @@ final class LicenceListViewController: UITableViewController {
super.init(style: .plain)
}
required init?(coder aDecoder: NSCoder) {
required public init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func viewDidLoad() {
override open func viewDidLoad() {
super.viewDidLoad()
self.prepareTableView()
@@ -50,22 +54,22 @@ extension LicenceListViewController {
// MARK: - Table View Data Source
override func numberOfSections(in tableView: UITableView) -> Int {
override open func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
override open func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return self.downloadedLicence.count
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
override open func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell: OpenSourceTableViewCell = tableView.dequeueReusableCell(for: indexPath)
guard let licence = self.downloadedLicence.get(at: indexPath.row) else { return cell }
cell.configure(licence: licence, config: self.config)
return cell
}
override func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat {
override open func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
}
@@ -8,7 +8,7 @@
import UIKit
final class LoadingViewController: UIViewController {
open class LoadingViewController: UIViewController {
// MARK: - Var
@@ -32,11 +32,11 @@ final class LoadingViewController: UIViewController {
super.init(nibName: nil, bundle: nil)
}
required init?(coder aDecoder: NSCoder) {
required public init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func viewDidLoad() {
override open func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor = self.config.uiConfig.backgroundColor
@@ -6,7 +6,7 @@
import UIKit
final class OpenSourceTableViewCell: UITableViewCell, Reusable {
open class OpenSourceTableViewCell: UITableViewCell, Reusable {
// MARK: - Lifecycle
@@ -15,7 +15,7 @@ final class OpenSourceTableViewCell: UITableViewCell, Reusable {
self.prepareCellComponent()
}
required init?(coder aDecoder: NSCoder) {
required public init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
@@ -6,7 +6,7 @@
import UIKit
final class OpenSourceViewController: UIViewController {
open class OpenSourceViewController: UIViewController {
// MARK: - Var
@@ -30,7 +30,7 @@ final class OpenSourceViewController: UIViewController {
// MARK: - Lifecyle
init(licences: [LicenceFile],
public init(licences: [LicenceFile],
showCloseButton: Bool,
configuration: OpenSourceControllerConfig,
licenceLoader: LicenceLoader) {
@@ -42,11 +42,11 @@ final class OpenSourceViewController: UIViewController {
super.init(nibName: nil, bundle: nil)
}
required init?(coder aDecoder: NSCoder) {
required public init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func viewDidLoad() {
override open func viewDidLoad() {
super.viewDidLoad()
self.title = self.config.title
+1 -1
View File
@@ -8,7 +8,7 @@
import Foundation
final class HTTPDataLoader {
open class HTTPDataLoader {
func loadData(fromUrl url: String, completion: @escaping (Data?) -> Void) {
if let url = URL(string: url) {
let task = URLSession.shared.dataTask(with: url) { (data, _, error) in
+3 -1
View File
@@ -6,7 +6,7 @@
import UIKit
final class LicenceLoader {
open class LicenceLoader {
/// Download every licence
///
@@ -32,4 +32,6 @@ final class LicenceLoader {
completion()
}
}
public init() {
}
}
+1 -1
View File
@@ -6,7 +6,7 @@
import UIKit
public final class LicenceFile {
open class LicenceFile {
// MARK- Var
+4
View File
@@ -5,6 +5,9 @@
// Created by Florian Gabach on 05/02/2017.
import UIKit
#if canImport(SwiftUI)
import SwiftUI
#endif
open class OpenSourceController: NSObject {
@@ -43,3 +46,4 @@ open class OpenSourceController: NSObject {
navigationController.pushViewController(licenceController, animated: true)
}
}
+3
View File
@@ -35,5 +35,8 @@ public struct OpenSourceControllerConfig {
public var verbose: Bool = false
/// UI-specific configuration.
public init() {
}
public var uiConfig = UIConfig()
}
+2 -2
View File
@@ -9,12 +9,12 @@
import UIKit
extension UITableView {
final func register<T: UITableViewCell>(cellType: T.Type)
open func register<T: UITableViewCell>(cellType: T.Type)
where T: Reusable {
self.register(cellType.self, forCellReuseIdentifier: cellType.reuseIdentifier)
}
final func dequeueReusableCell<T: UITableViewCell>(for indexPath: IndexPath, cellType: T.Type = T.self) -> T
open func dequeueReusableCell<T: UITableViewCell>(for indexPath: IndexPath, cellType: T.Type = T.self) -> T
where T: Reusable {
guard let cell = self.dequeueReusableCell(withIdentifier: cellType.reuseIdentifier, for: indexPath) as? T else {
fatalError(
+5
View File
@@ -18,6 +18,11 @@ platform :ios do
release("major")
end
desc "Scan the project"
lane :scan_project do
scan(scheme: "OpenSourceController-iOS")
end
def release(type)
podspec_name = "OpenSourceController.podspec"
pod_lib_lint(use_bundle_exec: false)
+5
View File
@@ -31,6 +31,11 @@ Release a new version with a minor bump_type
fastlane ios major
```
Release a new version with a major bump_type
### ios buildproject
```
fastlane ios buildproject
```
Build the project
----
+126
View File
@@ -0,0 +1,126 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Test Results | xcpretty</title>
<style type="text/css">
body { font-family:Avenir Next, Helvetica Neue, sans-serif; color: #4A4A4A; background-color: #F0F3FB; margin:0;}
h1 { font-weight: normal; font-size: 24px; margin: 10px 0 0 0;}
h3 { font-weight: normal; margin: 2px; font-size: 1.1em;}
header { position: fixed;width: 100%;background: rgba(249, 254, 255, 0.9);margin: 0;padding: 10px;}
header:before, header:after { content:""; display:table;}
header:after { clear:both;}
a:link { color: #A1D761;}
footer { clear: both;position: relative;z-index: 10;height: 40px;margin-top: -10px; margin-left:30px; font-size:12px;}
table { width:100%; border-collapse: collapse;}
tr td:first-child { width:7%}
.left { float: left; margin-left:30px;}
.right { float: right; margin-right: 40px; margin-top: 0; margin-bottom:0;}
.test-suite { margin: 0 0 30px 0;}
.test-suite > .heading { font-family:Menlo, Monaco, monospace; font-weight: bold; border-color: #A1D761; background-color: #B8E986; border-width: 1px;}
.test-suite.failing > .heading { border-color: #C84F5E; background-color: #E58591;}
.test-suite > .heading > .title { margin-top: 4px; margin-left: 10px;}
.tests { overflow: scroll;margin: 0 30px 0 60px;}
.test, .test-suite > .heading { height: 30px; overflow: hidden; margin: 0 30px;}
.test, .test-suite > .heading { border-width: 1px; border-collapse: collapse; border-style: solid; }
.test { margin-left: 30px; border-top:none;}
.test.failing { border-color: #C84F5E; background-color: #F4DDE0;}
.test.passing { border-color: #A1D761;}
.test.failing { background-color: #E7A1AA;}
.test.passing { background-color: #CAF59F;}
.test.failing.odd { background-color: #EEC7CC;}
.test.passing.odd { background-color: #E5FBCF;}
.details.failing { background-color: #F4DDE0; border: 1px solid #C84F5E;}
.details.passing { background-color: #E5F4DC; border: 1px solid #A1D761;}
.test .test-detail:last-child { padding-bottom: 8px;}
.test .title { float: left; font-size: 0.9em; margin-top: 8px; font-family: Menlo, Monaco, monospace;}
.test .time { float: left;margin: 4px 10px 0 20px;}
.test-detail { font-family:Menlo, Monaco, monospace; font-size: 0.9em; margin: 5px 0 5px 0px;}
.screenshots { height: auto; overflow: hidden; padding: 4px 4px 0 4px; background-color: #B8E986; border: #A1D761; border-width: 0 1px; border-style: solid; }
.screenshots.failing { border-color: #C84F5E; background-color: #E58591; }
.screenshot { max-height: 60px; float: left; transition: max-height 0.2s; margin: 0 4px 4px 0 }
.screenshot.selected { max-height: 568px; }
#test-suites { display: inline-block; width: 100%;margin-top:100px;}
#segment-bar { margin-top: 10px;margin-left: 14px;float:right;}
#segment-bar a:first-child { border-radius: 9px 0 0 9px; border-right: none;}
#segment-bar a:last-child { border-radius: 0 9px 9px 0; border-left: none;}
#segment-bar > a { color: #565656; border: 2px solid #7B7B7B; width: 80px; font-weight: bold; display:inline-block;text-align:center; font-weight: normal;}
#segment-bar > a.selected { background-color: #979797; color: #F0F3FB;}
#counters { float: left;margin: 10px;text-align: right;}
#counters h2 { font-size: 16px; font-family: Avenir, sans-serif; font-weight: lighter; display:inline;}
#counters .number { font-size: 20px;}
#fail-count { color: #D0021B; margin-left:10px;}
@media (max-width: 640px) {
h1, #counters, #segment-bar { margin: 5px auto; text-align:center;}
header, #segment-bar { width: 100%; position: relative; background:none;}
.left, .right { float:none; margin:0;}
#test-suites { margin-top: 0;}
#counters { float:none;}
}
</style>
<script type="text/javascript">
var hide = function(element) { element.style.display = 'none';}
var show = function(element) { element.style.display = '';}
var isHidden = function(element) { return element.style.display == 'none';}
var isSelected = function(element) { return element.classList.contains("selected");}
var deselect = function(element) { return element.classList.remove("selected");}
var select = function(element) { return element.classList.add("selected");}
var toggle = function(element) { isHidden(element) ? show(element) : hide(element);};
var toggleTests = function(heading) { toggle(heading.parentNode.children[1]);};
var toggleDetails = function(detailClass) {
var details = document.querySelectorAll('.' + detailClass);
for (var i = details.length - 1; i >= 0; i--) { toggle(details[i]);};
};
var hideAll = function(collection) {
for (var i = collection.length - 1; i >= 0; i--) { hide(collection[i]); };
}
var showAll = function(collection) {
for (var i = collection.length - 1; i >= 0; i--) { show(collection[i]); };
}
var selectSegment = function(segment) {
if (isSelected(segment)) return;
var segments = document.querySelectorAll('#segment-bar > a');
for (var i = segments.length - 1; i >= 0; i--) { deselect(segments[i]);};
select(segment);
if (segment.id == "all-segment") {
showAll(document.querySelectorAll('.test-suite'));
showAll(document.querySelectorAll('.test'));
} else if (segment.id == "failing-segment") {
hideAll(document.querySelectorAll('.test.passing'));
showAll(document.querySelectorAll('.test.failing'));
hideAll(document.querySelectorAll('.test-suite.passing'));
showAll(document.querySelectorAll('.test-suite.failing'));
} else if (segment.id == "passing-segment") {
hideAll(document.querySelectorAll('.test.failing'));
showAll(document.querySelectorAll('.test.passing'));
hideAll(document.querySelectorAll('.test-suite.failing'));
showAll(document.querySelectorAll('.test-suite.passing'));
}
}
var toggleScreenshot = function(suiteName, index) {
var screenshot = document.getElementById("screenshot-" + suiteName + "-" + index);
isSelected(screenshot) ? deselect(screenshot) : select(screenshot);
}
</script>
</head>
<body>
<header>
<section class="left">
<h1>Test Results</h1>
</section>
<section class="right">
<section id="counters">
<h2 id="test-count"><span class="number">0</span> tests</h2>
</section>
<section id="segment-bar">
<a id="all-segment" onclick="selectSegment(this);" class="selected">All</a><a id="failing-segment" onclick="selectSegment(this);">Failing</a><a id="passing-segment" onclick="selectSegment(this);">Passing</a>
</section>
</section>
</header>
<section id="test-suites">
</section>
<footer>Report generated with <a href="https://github.com/supermarin/xcpretty">xcpretty</a></footer>
</body>
</html>
+2
View File
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<testsuites tests='0' failures='0'/>