{"action":"created","issue":{"url":"https://api.github.com/repos/badoo/Chatto/issues/17","labels_url":"https://api.github.com/repos/badoo/Chatto/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/badoo/Chatto/issues/17/comments","events_url":"https://api.github.com/repos/badoo/Chatto/issues/17/events","html_url":"https://github.com/badoo/Chatto/issues/17","id":125130046,"number":17,"title":"Example code doesn't work","user":{"login":"aexmachina","id":261804,"avatar_url":"https://avatars.githubusercontent.com/u/261804?v=3","gravatar_id":"","url":"https://api.github.com/users/aexmachina","html_url":"https://github.com/aexmachina","followers_url":"https://api.github.com/users/aexmachina/followers","following_url":"https://api.github.com/users/aexmachina/following{/other_user}","gists_url":"https://api.github.com/users/aexmachina/gists{/gist_id}","starred_url":"https://api.github.com/users/aexmachina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aexmachina/subscriptions","organizations_url":"https://api.github.com/users/aexmachina/orgs","repos_url":"https://api.github.com/users/aexmachina/repos","events_url":"https://api.github.com/users/aexmachina/events{/privacy}","received_events_url":"https://api.github.com/users/aexmachina/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-06T07:51:18Z","updated_at":"2016-01-28T15:05:50Z","closed_at":null,"body":"The example code in the README doesn't cover all the required steps to get a Chatto implementation working. I think it would be good to have a minimal implementation to help people get started, and ChattoApp (inside the Chatto repo) doesn't seem to be minimal.\r\n\r\nI had to copy a whole lot of things from the ChattoApp in order to get the example code to work. Here's a list of some of the errors.\r\n\r\n- `TextMessageHandler` is not defined\r\n- `TextMessageModel.chatItemType` is not defined\r\n- `FakeMessageSender` is not defined\r\n- `ViewController' has no member 'baseMessageHandler'`\r\n- `ViewController' has no member 'configureChatInputBar'`: removed\r\n- `ViewController' has no member 'chatInputPresenter'`: removed\r\n\r\nSolution to get it to build and run was as follows:\r\n\r\n- Copied `FakeDataSource.swift SlidingDatasSource.swift Source/FakeMessageFactory.swift` into my project.\r\n- Added the following to configure the `messageSender` and `dataSource` and `baseMessageHandler`:\r\n\r\n```swift\r\n\tvar messageSender: FakeMessageSender!\r\n\tvar dataSource: FakeDataSource! {\r\n\t\tdidSet {\r\n\t\t\tself.chatDataSource = self.dataSource\r\n\t\t}\r\n\t}\r\n\tprivate var baseMessageHandler: BaseMessageHandler\r\n\r\n\trequired init?(coder aDecoder: NSCoder) {\r\n\t\tdataSource = FakeDataSource(count: 0, pageSize: 0)\r\n\t\tmessageSender = dataSource.messageSender\r\n\t\tbaseMessageHandler = BaseMessageHandler(messageSender: messageSender)\r\n\t\tsuper.init(coder: aDecoder)\r\n\t}\r\n```"},"comment":{"url":"https://api.github.com/repos/badoo/Chatto/issues/comments/176227462","html_url":"https://github.com/badoo/Chatto/issues/17#issuecomment-176227462","issue_url":"https://api.github.com/repos/badoo/Chatto/issues/17","id":176227462,"user":{"login":"ogezue","id":2361031,"avatar_url":"https://avatars.githubusercontent.com/u/2361031?v=3","gravatar_id":"","url":"https://api.github.com/users/ogezue","html_url":"https://github.com/ogezue","followers_url":"https://api.github.com/users/ogezue/followers","following_url":"https://api.github.com/users/ogezue/following{/other_user}","gists_url":"https://api.github.com/users/ogezue/gists{/gist_id}","starred_url":"https://api.github.com/users/ogezue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ogezue/subscriptions","organizations_url":"https://api.github.com/users/ogezue/orgs","repos_url":"https://api.github.com/users/ogezue/repos","events_url":"https://api.github.com/users/ogezue/events{/privacy}","received_events_url":"https://api.github.com/users/ogezue/received_events","type":"User","site_admin":false},"created_at":"2016-01-28T15:05:50Z","updated_at":"2016-01-28T15:05:50Z","body":"A simplified example would be very appreciated. I looking at your example and have to figure out what to implement to make it work for me. "}}