{"action":"created","issue":{"url":"https://api.github.com/repos/Moya/Moya/issues/215","labels_url":"https://api.github.com/repos/Moya/Moya/issues/215/labels{/name}","comments_url":"https://api.github.com/repos/Moya/Moya/issues/215/comments","events_url":"https://api.github.com/repos/Moya/Moya/issues/215/events","html_url":"https://github.com/Moya/Moya/pull/215","id":106193902,"number":215,"title":"Carthage Support","user":{"login":"ashfurrow","id":498212,"avatar_url":"https://avatars.githubusercontent.com/u/498212?v=3","gravatar_id":"","url":"https://api.github.com/users/ashfurrow","html_url":"https://github.com/ashfurrow","followers_url":"https://api.github.com/users/ashfurrow/followers","following_url":"https://api.github.com/users/ashfurrow/following{/other_user}","gists_url":"https://api.github.com/users/ashfurrow/gists{/gist_id}","starred_url":"https://api.github.com/users/ashfurrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashfurrow/subscriptions","organizations_url":"https://api.github.com/users/ashfurrow/orgs","repos_url":"https://api.github.com/users/ashfurrow/repos","events_url":"https://api.github.com/users/ashfurrow/events{/privacy}","received_events_url":"https://api.github.com/users/ashfurrow/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-09-13T01:23:58Z","updated_at":"2015-09-13T12:59:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Moya/Moya/pulls/215","html_url":"https://github.com/Moya/Moya/pull/215","diff_url":"https://github.com/Moya/Moya/pull/215.diff","patch_url":"https://github.com/Moya/Moya/pull/215.patch"},"body":"This pull requests adds Carthage support to Moya, including its two extensions, RxMoya and ReactiveMoya. It builds off of @justinmakaila's work in #169 to include Carthage support, but works using a different solution that @orta and I implemented this afternoon. Let me explain.\r\n\r\nIn #154, we discussed a solution that involved splitting up Moya into several repositories to generate separate `.framework` files for each Moya, ReactiveMoya, and RxMoya. The solution in this PR instead uses thin podspecs _solely_ for the ReactiveCocoa and RxSwift extensions. This lets the `Pods` Xcode project build separately-named targets, which compile into the frameworks that Carthage needs.\r\n\r\nThe benefits of this approach are that we keep all of our code in _one_ repository instead of having to synchronize version numbers, tags, pull requests, and so on between three or four repositories. This would be a significant challenge.\r\n\r\nThe downsides are that we need to keep versions synced between the three podspecs (I've written a `rake` task to automate this). Additionally, if the public APIs to RxSwift or ReactiveCocoa change, Carthage users will need to continue to use the versions required by the CocoaPods builds. I actually kind of like the idea of one Moya existing in parallel on two dependency managers.\r\n\r\n## Work Done\r\n\r\n- We switched from a `Makefile` to a `Rakefile`.\r\n- Automated releases.\r\n- Re-added `Pods/` directory for Carthage support.\r\n- Duplicated the RxMoya and ReactiveMoya subspecs into their own standalone podspecs, and trimmed them down.\r\n- Removes unnecessary `Box` dependency from the Demo's `Podfile`.\r\n- Updated documentation.\r\n\r\n## Next Steps\r\n\r\nThe [ReactiveMoya](https://github.com/Moya/ReactiveMoya) and [RxMoya](https://github.com/Moya/RxMoya) repositories are no longer needed and should be deleted after this pull request is merged. Any existing Carthage users will need to update their Cartfiles.\r\n\r\n## Notes\r\n\r\n`MoyaResponse.swift` is included in both Carthage-specific podspecs, but it only appears once in the `Pods` project's file pane. The file is a member of both targets, but only appears once. The ambiguity between the files referenced in both frameworks led me to split up the unit tests into distinct files (to avoid having both `MoyaResponse`s in scope). I also tidied them up a bit.\r\n\r\nFixes #204.\r\nFixes #154.\r\nFixes #184."},"comment":{"url":"https://api.github.com/repos/Moya/Moya/issues/comments/139872551","html_url":"https://github.com/Moya/Moya/pull/215#issuecomment-139872551","issue_url":"https://api.github.com/repos/Moya/Moya/issues/215","id":139872551,"user":{"login":"orta","id":49038,"avatar_url":"https://avatars.githubusercontent.com/u/49038?v=3","gravatar_id":"","url":"https://api.github.com/users/orta","html_url":"https://github.com/orta","followers_url":"https://api.github.com/users/orta/followers","following_url":"https://api.github.com/users/orta/following{/other_user}","gists_url":"https://api.github.com/users/orta/gists{/gist_id}","starred_url":"https://api.github.com/users/orta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orta/subscriptions","organizations_url":"https://api.github.com/users/orta/orgs","repos_url":"https://api.github.com/users/orta/repos","events_url":"https://api.github.com/users/orta/events{/privacy}","received_events_url":"https://api.github.com/users/orta/received_events","type":"User","site_admin":false},"created_at":"2015-09-13T12:59:35Z","updated_at":"2015-09-13T12:59:35Z","body":"So you want the behaviour where you would always do `@import Moya;` and it would work fine regardless of which framework you've imported? This is totally doable using [module_name](https://guides.cocoapods.org/syntax/podspec.html#module_name) in the other Podspecs. I *think* it would generate three differently named frameworks for drag & drop but they would all all work with `@import Moya;`. Can't guarantee that Xcode allows the generation of the three frameworks with the same module name, but can be tested. "}}