Skip to content

Commit

Permalink
Merge pull request #18 from nrako/carthage
Browse files Browse the repository at this point in the history
Add support for Carthage
  • Loading branch information
diegosanchezr committed Jan 14, 2016
2 parents fef8a20 + fc3fb10 commit fa4d839
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 67 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ language: objective-c
osx_image: xcode7.1

script:
- xcodebuild clean build test -workspace ./ChattoApp/ChattoApp.xcworkspace -scheme ChattoApp -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.1' -configuration Debug | xcpretty
- xcodebuild clean build test -workspace ./Chatto.xcworkspace -scheme Chatto -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.1' -configuration Debug | xcpretty
- rm -rf ~/Library/Developer/Xcode/DerivedData
- xcodebuild clean build test -project ./Chatto/Chatto.xcodeproj -scheme Chatto -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.1' -configuration Debug | xcpretty
- xcodebuild clean build test -workspace ./Chatto.xcworkspace -scheme Chatto -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.1' -configuration Debug | xcpretty
- (curl -s https://codecov.io/bash) | bash
- rm -rf ~/Library/Developer/Xcode/DerivedData
- xcodebuild clean build test -project ./ChattoAdditions/ChattoAdditions.xcodeproj -scheme ChattoAdditions -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.1' -configuration Debug | xcpretty
- xcodebuild clean build test -workspace ./Chatto.xcworkspace -scheme ChattoAdditions -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.1' -configuration Debug | xcpretty
- (curl -s https://codecov.io/bash) | bash
10 changes: 10 additions & 0 deletions Chatto.xcworkspace/contents.xcworkspacedata

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

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
BlueprintIdentifier = "C32BB71F1BE0504D0069EC50"
BuildableName = "Chatto.framework"
BlueprintName = "Chatto"
ReferencedContainer = "container:Chatto.xcodeproj">
ReferencedContainer = "container:Chatto/Chatto.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
Expand All @@ -36,7 +36,7 @@
BlueprintIdentifier = "C32BB7291BE0504D0069EC50"
BuildableName = "ChattoTests.xctest"
BlueprintName = "ChattoTests"
ReferencedContainer = "container:Chatto.xcodeproj">
ReferencedContainer = "container:Chatto/Chatto.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
Expand All @@ -46,7 +46,7 @@
BlueprintIdentifier = "C32BB71F1BE0504D0069EC50"
BuildableName = "Chatto.framework"
BlueprintName = "Chatto"
ReferencedContainer = "container:Chatto.xcodeproj">
ReferencedContainer = "container:Chatto/Chatto.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
Expand All @@ -68,7 +68,7 @@
BlueprintIdentifier = "C32BB71F1BE0504D0069EC50"
BuildableName = "Chatto.framework"
BlueprintName = "Chatto"
ReferencedContainer = "container:Chatto.xcodeproj">
ReferencedContainer = "container:Chatto/Chatto.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
Expand All @@ -86,7 +86,7 @@
BlueprintIdentifier = "C32BB71F1BE0504D0069EC50"
BuildableName = "Chatto.framework"
BlueprintName = "Chatto"
ReferencedContainer = "container:Chatto.xcodeproj">
ReferencedContainer = "container:Chatto/Chatto.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
BlueprintIdentifier = "C3C0CBB71BFE49320052747C"
BuildableName = "ChattoAdditions.framework"
BlueprintName = "ChattoAdditions"
ReferencedContainer = "container:ChattoAdditions.xcodeproj">
ReferencedContainer = "container:ChattoAdditions/ChattoAdditions.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
Expand All @@ -36,7 +36,7 @@
BlueprintIdentifier = "C3C0CBC11BFE49320052747C"
BuildableName = "ChattoAdditionsTests.xctest"
BlueprintName = "ChattoAdditionsTests"
ReferencedContainer = "container:ChattoAdditions.xcodeproj">
ReferencedContainer = "container:ChattoAdditions/ChattoAdditions.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
Expand All @@ -46,7 +46,7 @@
BlueprintIdentifier = "C3C0CBB71BFE49320052747C"
BuildableName = "ChattoAdditions.framework"
BlueprintName = "ChattoAdditions"
ReferencedContainer = "container:ChattoAdditions.xcodeproj">
ReferencedContainer = "container:ChattoAdditions/ChattoAdditions.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
Expand All @@ -68,7 +68,7 @@
BlueprintIdentifier = "C3C0CBB71BFE49320052747C"
BuildableName = "ChattoAdditions.framework"
BlueprintName = "ChattoAdditions"
ReferencedContainer = "container:ChattoAdditions.xcodeproj">
ReferencedContainer = "container:ChattoAdditions/ChattoAdditions.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
Expand All @@ -86,7 +86,7 @@
BlueprintIdentifier = "C3C0CBB71BFE49320052747C"
BuildableName = "ChattoAdditions.framework"
BlueprintName = "ChattoAdditions"
ReferencedContainer = "container:ChattoAdditions.xcodeproj">
ReferencedContainer = "container:ChattoAdditions/ChattoAdditions.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
Expand Down
54 changes: 4 additions & 50 deletions ChattoAdditions/ChattoAdditions.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
C35FE3C51C0331CF00D42980 /* TextMessagePresenterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C35FE3C41C0331CF00D42980 /* TextMessagePresenterTests.swift */; };
C35FE3C81C033E7800D42980 /* PhotoMessagePresenterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C35FE3C71C033E7800D42980 /* PhotoMessagePresenterTests.swift */; };
C36F9C4B1BFE4A89001E9D8F /* ChattoAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = C3C0CC961BFE4A2A0052747C /* ChattoAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
C37015501C0631EB0068180E /* Chatto.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C370154D1C0631DF0068180E /* Chatto.framework */; };
C3815D001C036B3000DF95CA /* PhotoMessagePresenterBuilderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3815CFF1C036B3000DF95CA /* PhotoMessagePresenterBuilderTests.swift */; };
C3815D021C036D1700DF95CA /* TextMessagePresenterBuilderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3815D011C036D1700DF95CA /* TextMessagePresenterBuilderTests.swift */; };
C38658B21BFE55620012F181 /* AnimationUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = C38658B11BFE55620012F181 /* AnimationUtils.swift */; };
Expand Down Expand Up @@ -78,23 +77,10 @@
C3C0CC8C1BFE49700052747C /* TextChatInputItemTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3C0CC7E1BFE49700052747C /* TextChatInputItemTests.swift */; };
C3C0CC8D1BFE49700052747C /* ObservableTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3C0CC7F1BFE49700052747C /* ObservableTests.swift */; };
C3EFA6B01C03607A0063CE22 /* BaseMessagePresenterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3EFA6AF1C03607A0063CE22 /* BaseMessagePresenterTests.swift */; };
CA073E791C47F5B9009D5EBF /* Chatto.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA073E781C47F5B9009D5EBF /* Chatto.framework */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
C370154C1C0631DF0068180E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = C37015471C0631DF0068180E /* Chatto.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = C32BB7201BE0504D0069EC50;
remoteInfo = Chatto;
};
C370154E1C0631DF0068180E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = C37015471C0631DF0068180E /* Chatto.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = C32BB72A1BE0504D0069EC50;
remoteInfo = ChattoTests;
};
C3C0CBC41BFE49320052747C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = C3C0CBAF1BFE49320052747C /* Project object */;
Expand All @@ -107,7 +93,6 @@
/* Begin PBXFileReference section */
C35FE3C41C0331CF00D42980 /* TextMessagePresenterTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TextMessagePresenterTests.swift; path = "Tests/Chat Items/TextMessages/TextMessagePresenterTests.swift"; sourceTree = SOURCE_ROOT; };
C35FE3C71C033E7800D42980 /* PhotoMessagePresenterTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PhotoMessagePresenterTests.swift; sourceTree = "<group>"; };
C37015471C0631DF0068180E /* Chatto.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Chatto.xcodeproj; path = ../Chatto/Chatto.xcodeproj; sourceTree = "<group>"; };
C3815CFF1C036B3000DF95CA /* PhotoMessagePresenterBuilderTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PhotoMessagePresenterBuilderTests.swift; sourceTree = "<group>"; };
C3815D011C036D1700DF95CA /* TextMessagePresenterBuilderTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextMessagePresenterBuilderTests.swift; sourceTree = "<group>"; };
C38658B11BFE55620012F181 /* AnimationUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnimationUtils.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -179,14 +164,15 @@
C3C0CC7F1BFE49700052747C /* ObservableTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ObservableTests.swift; sourceTree = "<group>"; };
C3C0CC961BFE4A2A0052747C /* ChattoAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChattoAdditions.h; sourceTree = "<group>"; };
C3EFA6AF1C03607A0063CE22 /* BaseMessagePresenterTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseMessagePresenterTests.swift; sourceTree = "<group>"; };
CA073E781C47F5B9009D5EBF /* Chatto.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Chatto.framework; path = "../../../../Library/Developer/Xcode/DerivedData/Chatto-gyrilfusfbpmohajjvmmctphuabr/Build/Products/Debug-iphoneos/Chatto.framework"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
C3C0CBB41BFE49320052747C /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
C37015501C0631EB0068180E /* Chatto.framework in Frameworks */,
CA073E791C47F5B9009D5EBF /* Chatto.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -219,19 +205,10 @@
path = PhotoMessages;
sourceTree = "<group>";
};
C37015481C0631DF0068180E /* Products */ = {
isa = PBXGroup;
children = (
C370154D1C0631DF0068180E /* Chatto.framework */,
C370154F1C0631DF0068180E /* ChattoTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
C3C0CBAE1BFE49320052747C = {
isa = PBXGroup;
children = (
C37015471C0631DF0068180E /* Chatto.xcodeproj */,
CA073E781C47F5B9009D5EBF /* Chatto.framework */,
C3C0CBB91BFE49320052747C /* Products */,
C3C0CBD21BFE496A0052747C /* Source */,
C3C0CC6E1BFE49700052747C /* Tests */,
Expand Down Expand Up @@ -532,12 +509,6 @@
mainGroup = C3C0CBAE1BFE49320052747C;
productRefGroup = C3C0CBB91BFE49320052747C /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = C37015481C0631DF0068180E /* Products */;
ProjectRef = C37015471C0631DF0068180E /* Chatto.xcodeproj */;
},
);
projectRoot = "";
targets = (
C3C0CBB71BFE49320052747C /* ChattoAdditions */,
Expand All @@ -546,23 +517,6 @@
};
/* End PBXProject section */

/* Begin PBXReferenceProxy section */
C370154D1C0631DF0068180E /* Chatto.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = Chatto.framework;
remoteRef = C370154C1C0631DF0068180E /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
C370154F1C0631DF0068180E /* ChattoTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = ChattoTests.xctest;
remoteRef = C370154E1C0631DF0068180E /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */

/* Begin PBXResourcesBuildPhase section */
C3C0CBB61BFE49320052747C /* Resources */ = {
isa = PBXResourcesBuildPhase;
Expand Down
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Chatto [![Build Status](https://travis-ci.org/badoo/Chatto.svg?branch=master)](https://travis-ci.org/badoo/Chatto) [![codecov.io](https://codecov.io/github/badoo/Chatto/coverage.svg?branch=master)](https://codecov.io/github/badoo/Chatto?branch=master) [![Cocoapods Compatible](https://img.shields.io/cocoapods/v/Chatto.svg)](https://img.shields.io/cocoapods/v/Chatto.svg)
# Chatto [![Build Status](https://travis-ci.org/badoo/Chatto.svg?branch=master)](https://travis-ci.org/badoo/Chatto) [![codecov.io](https://codecov.io/github/badoo/Chatto/coverage.svg?branch=master)](https://codecov.io/github/badoo/Chatto?branch=master) [![Cocoapods Compatible](https://img.shields.io/cocoapods/v/Chatto.svg)](https://img.shields.io/cocoapods/v/Chatto.svg) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)


`Chatto` is a Swift lightweight framework to build chat applications. It's been designed to be extensible and performant. Along with `Chatto` there is `ChattoAdditions`, a companion framework which includes cells for messages and an extensible input component. You can find more details about how it was implemented in our [blog](https://techblog.badoo.com/blog/2015/12/04/how-we-made-chatto/). See them in action!
Expand Down Expand Up @@ -64,7 +64,7 @@ public protocol ChatDataSourceProtocol: class {
func loadPrevious(completion: () -> Void)
func adjustNumberOfMessages(preferredMaxCount preferredMaxCount: Int?, focusPosition: Double, completion:(didAdjust: Bool) -> Void) // If you want, implement message count contention for performance, otherwise just call completion(false)
}
```
```
If you want to handle smooth loading of new pages, or more challenging, smooth rotation with thousands of messages (calculating 10K text message sizes can take ~15s on iPhone 4s) you should opt-in for adjustNumberOfMessages(preferredMaxCount:focusPosition:completion:). See how it's done in ChattoApp!

### Presenters
Expand Down Expand Up @@ -146,12 +146,15 @@ If you like to live on the bleeding edge, you can use the `master` branch with:
3. Add `Chatto` and/or `ChattoAdditions` to Embedded binaries

### Carthage
Seems like at this moment Carthage doesn't support building two frameworks from the same repository :(

Or, if you’re using [Carthage](https://github.com/Carthage/Carthage#if-youre-building-for-ios-tvos-or-watchos), simply add Chatto to your Cartfile:
```
github "badoo/Chatto"
```

## License
Source code is distributed under MIT license.

<h2></h2>

Discover other [open source projects](https://github.com/badoo) and [ideas](https://techblog.badoo.com)

0 comments on commit fa4d839

Please sign in to comment.