Skip to content
This repository has been archived by the owner on Jan 22, 2019. It is now read-only.

Commit

Permalink
Merge pull request #37 from Karumi/appkit-support
Browse files Browse the repository at this point in the history
Appkit support
  • Loading branch information
davideme committed Apr 4, 2016
2 parents 2052d2f + 4a036c5 commit 7422cd9
Show file tree
Hide file tree
Showing 36 changed files with 1,939 additions and 39 deletions.
8 changes: 3 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: objective-c
osx_image: xcode7.1
osx_image: xcode7.2

env:
- SCHEME="BothamUIProject"
Expand All @@ -9,10 +9,8 @@ before_install:
- brew install swiftlint
- gem install xcpretty
- gem install cocoapods

install:
- pod install
- gem install xcpretty-travis-formatter

script:
- swiftlint
- set -o pipefail && xcodebuild -workspace BothamUI.xcworkspace -scheme "$SCHEME" -destination 'platform=iOS Simulator,name=iPhone 6s Plus' build test CODE_SIGN_IDENTITY=- | xcpretty -c
- set -o pipefail && xcodebuild -workspace BothamUI.xcworkspace -scheme "$SCHEME" -destination 'platform=iOS Simulator,name=iPhone 6s Plus' build test CODE_SIGN_IDENTITY=- | xcpretty -f `xcpretty-travis-formatter`
263 changes: 262 additions & 1 deletion BothamUI.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

99 changes: 99 additions & 0 deletions BothamUI.xcodeproj/xcshareddata/xcschemes/BothamUICocoa.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6B2902521C6DE3300072E04D"
BuildableName = "BothamUICocoa.framework"
BlueprintName = "BothamUICocoa"
ReferencedContainer = "container:BothamUI.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6B29025B1C6DE3300072E04D"
BuildableName = "BothamUICocoaTests.xctest"
BlueprintName = "BothamUICocoaTests"
ReferencedContainer = "container:BothamUI.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6B2902521C6DE3300072E04D"
BuildableName = "BothamUICocoa.framework"
BlueprintName = "BothamUICocoa"
ReferencedContainer = "container:BothamUI.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6B2902521C6DE3300072E04D"
BuildableName = "BothamUICocoa.framework"
BlueprintName = "BothamUICocoa"
ReferencedContainer = "container:BothamUI.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6B2902521C6DE3300072E04D"
BuildableName = "BothamUICocoa.framework"
BlueprintName = "BothamUICocoa"
ReferencedContainer = "container:BothamUI.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
3 changes: 3 additions & 0 deletions BothamUI.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions BothamUICocoa/BothamUICocoa.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// BothamUICocoa.h
// BothamUICocoa
//
// Created by Davide Mendolia on 12/02/16.
// Copyright © 2016 GoKarumi S.L. All rights reserved.
//

#import <Cocoa/Cocoa.h>

//! Project version number for BothamUICocoa.
FOUNDATION_EXPORT double BothamUICocoaVersionNumber;

//! Project version string for BothamUICocoa.
FOUNDATION_EXPORT const unsigned char BothamUICocoaVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <BothamUICocoa/PublicHeader.h>


28 changes: 28 additions & 0 deletions BothamUICocoa/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2016 GoKarumi S.L. All rights reserved.</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
24 changes: 24 additions & 0 deletions BothamUICocoaTests/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions Example/Example/CharacterTableViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class CharacterTableViewCell: UITableViewCell, BothamViewCell {
let gradient: CAGradientLayer = CAGradientLayer(layer: thumbnailImage.layer)
gradient.frame = thumbnailImage.bounds
gradient.colors = [UIColor.gradientStartColor.CGColor, UIColor.gradientEndColor.CGColor]
gradient.startPoint = CGPointMake(0.0, 0.6)
gradient.endPoint = CGPointMake(0.0, 1.0)
gradient.startPoint = CGPoint(x: 0.0, y: 0.6)
gradient.endPoint = CGPoint(x: 0.0, y: 1.0)
thumbnailImage.layer.insertSublayer(gradient, atIndex: 0)
}

Expand Down
4 changes: 2 additions & 2 deletions Example/Example/CharactersViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import UIKit
import BothamUI

class CharactersViewController: ExampleViewController, BothamTableViewController, CharactersUI {

@IBOutlet var tableView: UITableView!
var dataSource: BothamTableViewDataSource<Character, CharacterTableViewCell>!
var delegate: UITableViewDelegate!
Expand All @@ -24,4 +24,4 @@ class CharactersViewController: ExampleViewController, BothamTableViewController
pullToRefreshHandler.addTo(tableView)
super.viewDidLoad()
}
}
}
2 changes: 1 addition & 1 deletion Example/Example/SeriesDetailPresenter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import Foundation
import BothamUI

class SeriesDetailPresenter : BothamPresenter {
class SeriesDetailPresenter: BothamPresenter {

private let seriesName: String
private weak var ui: SeriesDetailUI?
Expand Down
4 changes: 2 additions & 2 deletions Example/Example/SeriesDetailUI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import BothamUI
protocol SeriesDetailUI: BothamUI, BothamLoadingUI {

var title: String? { get set }

func configureHeader(series: Series)
func showItems(items: [Comic])

}
}
2 changes: 1 addition & 1 deletion Example/Example/SeriesDetailViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ private struct Config {
static let footerHeight = 20
static let cellMargin = 20
}
class SeriesDetailViewController : ExampleViewController, BothamCollectionViewController, SeriesDetailUI {
class SeriesDetailViewController: ExampleViewController, BothamCollectionViewController, SeriesDetailUI {

var dataSource: SeriesDetailCollectionViewDataSource!

Expand Down
4 changes: 2 additions & 2 deletions Example/Example/SeriesPresenter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation
import BothamUI

class SeriesPresenter: BothamPresenter, BothamNavigationPresenter {

private weak var ui: SeriesUI?
private let wireframe: SeriesWireframe

Expand Down Expand Up @@ -49,4 +49,4 @@ class SeriesPresenter: BothamPresenter, BothamNavigationPresenter {
func itemWasTapped(item: Series) {
wireframe.presentSeriesDetailViewController(item.name)
}
}
}
2 changes: 1 addition & 1 deletion Example/Example/ServiceLocator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ class ServiceLocator {
}

func provideSeriesDetailPresenter(ui: SeriesDetailUI, seriesName: String) -> SeriesDetailPresenter {
return SeriesDetailPresenter(ui: ui,seriesName: seriesName)
return SeriesDetailPresenter(ui: ui, seriesName: seriesName)
}
}
4 changes: 2 additions & 2 deletions Example/Example/UIColor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import UIKit
extension UIColor {

convenience init(rgba: String) {
var red: CGFloat = 0.0
var red: CGFloat = 0.0
var green: CGFloat = 0.0
var blue: CGFloat = 0.0
var blue: CGFloat = 0.0
var alpha: CGFloat = 1.0

if rgba.hasPrefix("#") {
Expand Down
4 changes: 2 additions & 2 deletions Example/ExampleAcceptanceTests/KIFTestActor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import Foundation
import KIF

extension KIFTestActor {
func tester(file : String = __FILE__, line : Int = __LINE__) -> KIFUITestActor {
func tester(file: String = __FILE__, line: Int = __LINE__) -> KIFUITestActor {
return KIFUITestActor(inFile: file, atLine: line, delegate: self)
}

func system(file : String = __FILE__, line : Int = __LINE__) -> KIFSystemTestActor {
func system(file: String = __FILE__, line: Int = __LINE__) -> KIFSystemTestActor {
return KIFSystemTestActor(inFile: file, atLine: line, delegate: self)
}
}
4 changes: 2 additions & 2 deletions Example/ExampleAcceptanceTests/XCTestCase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import Foundation
import KIF

extension XCTestCase {
func tester(file : String = __FILE__, line : Int = __LINE__) -> KIFUITestActor {
func tester(file: String = __FILE__, line: Int = __LINE__) -> KIFUITestActor {
return KIFUITestActor(inFile: file, atLine: line, delegate: self)
}

func system(file : String = __FILE__, line : Int = __LINE__) -> KIFSystemTestActor {
func system(file: String = __FILE__, line: Int = __LINE__) -> KIFSystemTestActor {
return KIFSystemTestActor(inFile: file, atLine: line, delegate: self)
}
}
4 changes: 2 additions & 2 deletions Example/ExampleTests/ExampleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import BothamUI
@testable import Example

class ExampleTests: XCTestCase {

func testShowListOfSeries() {
let expectation = expectationWithDescription("Covers will be shown")
let fakeSeriesUI = FakeSeriesUI(expectation: expectation)
Expand Down Expand Up @@ -46,4 +46,4 @@ class ExampleTests: XCTestCase {

expect(fakeSeriesWireframe.seriesDetailViewControllerWasPresented).to(beTrue())
}
}
}
2 changes: 1 addition & 1 deletion Example/ExampleTests/FakeCharactersUI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Foundation
import BothamUI

class FakeCharactersUI: CharactersUI, FakeBothamPullToResfreshUI {
var itemsShowed:[Example.Character] = []
var itemsShowed: [Example.Character] = []
var didRefresh = false

func showItems(items: [Example.Character]) {
Expand Down
2 changes: 1 addition & 1 deletion Example/ExampleTests/FakeSeriesUI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import XCTest
class FakeSeriesUI: SeriesUI, FakeBothamLoadingUI {
var loaderWasShowed = false
var loaderWasHided = false
var itemsShowed:[Series] = []
var itemsShowed: [Series] = []

var expectation: XCTestExpectation?

Expand Down
Loading

0 comments on commit 7422cd9

Please sign in to comment.