{"action":"created","issue":{"url":"https://api.github.com/repos/Moya/Moya/issues/487","repository_url":"https://api.github.com/repos/Moya/Moya","labels_url":"https://api.github.com/repos/Moya/Moya/issues/487/labels{/name}","comments_url":"https://api.github.com/repos/Moya/Moya/issues/487/comments","events_url":"https://api.github.com/repos/Moya/Moya/issues/487/events","html_url":"https://github.com/Moya/Moya/issues/487","id":155796338,"number":487,"title":"Type X does not conform to protocol 'TargetType'","user":{"login":"mlvhub","id":3221007,"avatar_url":"https://avatars.githubusercontent.com/u/3221007?v=3","gravatar_id":"","url":"https://api.github.com/users/mlvhub","html_url":"https://github.com/mlvhub","followers_url":"https://api.github.com/users/mlvhub/followers","following_url":"https://api.github.com/users/mlvhub/following{/other_user}","gists_url":"https://api.github.com/users/mlvhub/gists{/gist_id}","starred_url":"https://api.github.com/users/mlvhub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlvhub/subscriptions","organizations_url":"https://api.github.com/users/mlvhub/orgs","repos_url":"https://api.github.com/users/mlvhub/repos","events_url":"https://api.github.com/users/mlvhub/events{/privacy}","received_events_url":"https://api.github.com/users/mlvhub/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-05-19T17:51:28Z","updated_at":"2016-05-23T22:39:00Z","closed_at":null,"body":"Hello,\r\n\r\nI'm having the exact same issue as #464.\r\n\r\nI posted a comment there but here the relevant information:\r\n\r\nI'm using Carthage to manage my dependencies. I've also used Cocoapods before, and this didn't happen.\r\n\r\nHere is my Cartfile:\r\n```\r\ngithub \"ReactiveX/RxSwift\" ~> 2.0\r\ngithub \"Moya/Moya\"\r\ngithub \"sunshinejr/Moya-ModelMapper\"\r\n```\r\n\r\nI'm using the following command to build the dependencies:\r\n```\r\ncarthage update --platform iOS\r\n```\r\nAnd then I'm just linking the frameworks that are in ``` Carthage/Build/iOS``` inside the project.\r\n\r\nI'm trying to create an endpoint for authentication:\r\n```\r\nimport Foundation\r\nimport Moya\r\n\r\nenum Auth {\r\n    case Login(email: String, password: String)\r\n    case Logout()\r\n}\r\n\r\nextension Auth: TargetType {\r\n    \r\n    var baseURL: NSURL { return NSURL(string: \"https://localhost/api\")! }\r\n    \r\n    var path: String {\r\n        switch self {\r\n        case .Login(_, _):\r\n            return \"/users\"\r\n        case .Logout(_):\r\n            return \"/users\"\r\n        }\r\n    }\r\n    \r\n    var method: Moya.Method {\r\n        switch self {\r\n        case .Login(_, _):\r\n            return .POST\r\n        case .Logout(_):\r\n            return .DELETE\r\n        }\r\n    }\r\n    \r\n    var parameters: [String: AnyObject]? {\r\n        switch self {\r\n        case .Login(let email, let password):\r\n            return [\"email\": email, \"password\": password]\r\n        case .Logout(_):\r\n            return nil\r\n        }\r\n    }\r\n    \r\n    var sampleData: NSData {\r\n        switch self {\r\n        case .Login(_, _):\r\n            return \"\".dataUsingEncoding(NSUTF8StringEncoding)!\r\n        case .Logout(_):\r\n            return \"\".dataUsingEncoding(NSUTF8StringEncoding)!\r\n        }\r\n    }\r\n}\r\n\r\nprivate extension String {\r\n    var URLEscapedString: String {\r\n        return self.stringByAddingPercentEncodingWithAllowedCharacters(NSCharacterSet.URLHostAllowedCharacterSet())!\r\n    }\r\n}\r\n```\r\n\r\nAnd I'm using it like so:\r\n```\r\nlet provider = RxMoyaProvider<Auth>()\r\n```\r\n\r\nThis throws the following error:\r\n```\r\nType 'Auth' does not conform to protocol 'TargetType'\r\n```\r\n\r\nI've used Cocoapods before and didn't get this error.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/Moya/Moya/issues/comments/221117124","html_url":"https://github.com/Moya/Moya/issues/487#issuecomment-221117124","issue_url":"https://api.github.com/repos/Moya/Moya/issues/487","id":221117124,"user":{"login":"mlvhub","id":3221007,"avatar_url":"https://avatars.githubusercontent.com/u/3221007?v=3","gravatar_id":"","url":"https://api.github.com/users/mlvhub","html_url":"https://github.com/mlvhub","followers_url":"https://api.github.com/users/mlvhub/followers","following_url":"https://api.github.com/users/mlvhub/following{/other_user}","gists_url":"https://api.github.com/users/mlvhub/gists{/gist_id}","starred_url":"https://api.github.com/users/mlvhub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlvhub/subscriptions","organizations_url":"https://api.github.com/users/mlvhub/orgs","repos_url":"https://api.github.com/users/mlvhub/repos","events_url":"https://api.github.com/users/mlvhub/events{/privacy}","received_events_url":"https://api.github.com/users/mlvhub/received_events","type":"User","site_admin":false},"created_at":"2016-05-23T22:39:00Z","updated_at":"2016-05-23T22:39:00Z","body":"I see, nice. Sure, let me know when it's up and I'll give it a try."}}
{"actor":{"display_login":"mlvhub"}}