{"action":"created","issue":{"url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/3016","labels_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/3016/labels{/name}","comments_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/3016/comments","events_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/3016/events","html_url":"https://github.com/CocoaPods/CocoaPods/issues/3016","id":53635582,"number":3016,"title":"Feature request: Swift specific podspec","user":{"login":"basvankuijck","id":1327984,"avatar_url":"https://avatars.githubusercontent.com/u/1327984?v=3","gravatar_id":"","url":"https://api.github.com/users/basvankuijck","html_url":"https://github.com/basvankuijck","followers_url":"https://api.github.com/users/basvankuijck/followers","following_url":"https://api.github.com/users/basvankuijck/following{/other_user}","gists_url":"https://api.github.com/users/basvankuijck/gists{/gist_id}","starred_url":"https://api.github.com/users/basvankuijck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basvankuijck/subscriptions","organizations_url":"https://api.github.com/users/basvankuijck/orgs","repos_url":"https://api.github.com/users/basvankuijck/repos","events_url":"https://api.github.com/users/basvankuijck/events{/privacy}","received_events_url":"https://api.github.com/users/basvankuijck/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-01-07T14:11:16Z","updated_at":"2015-01-07T21:07:15Z","closed_at":null,"body":"Let's say I've got this class `ESRandom` which is an objective-c class.\r\nWhen swift became available we created a swift version of the same class. With the exact functionality and version code.\r\n\r\nNow when defining this pod in my `Podfile`:\r\n<code>\r\npod 'ESRandom', '~> 1.0'\r\n</code>\r\nIt both loads the obj-c and swift files and my swift project builds with an error saying it has duplicate symbols (or something like that).\r\nIf I remove the obj-c files my project runs perfectly.\r\n\r\nSo it would be great if I could tell the Podfile which filetype I want to use\r\n<code>\r\npod 'ESRandom', '~> 1.0' :lang => 'swift'\r\n</code> (or something like that)\r\n\r\nI have tried using subspecs, but these don't give the right result and I don't think they're used for this kind of setup.\r\n\r\nOr is there any other workaround / solution for this ?"},"comment":{"url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/comments/69092100","html_url":"https://github.com/CocoaPods/CocoaPods/issues/3016#issuecomment-69092100","issue_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/3016","id":69092100,"user":{"login":"kylef","id":44164,"avatar_url":"https://avatars.githubusercontent.com/u/44164?v=3","gravatar_id":"","url":"https://api.github.com/users/kylef","html_url":"https://github.com/kylef","followers_url":"https://api.github.com/users/kylef/followers","following_url":"https://api.github.com/users/kylef/following{/other_user}","gists_url":"https://api.github.com/users/kylef/gists{/gist_id}","starred_url":"https://api.github.com/users/kylef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylef/subscriptions","organizations_url":"https://api.github.com/users/kylef/orgs","repos_url":"https://api.github.com/users/kylef/repos","events_url":"https://api.github.com/users/kylef/events{/privacy}","received_events_url":"https://api.github.com/users/kylef/received_events","type":"User","site_admin":false},"created_at":"2015-01-07T21:07:15Z","updated_at":"2015-01-07T21:07:15Z","body":"Objective-C as the default subspec for QueryKit was only because this predated the Swift support in CocoaPods. I've [just amended this](https://github.com/QueryKit/QueryKit/commit/691dc86787d22b86da1c353bf135cec609f9c4a3) and now that is no longer true.\r\n\r\nQueryKit did start as a Swift-only code base, it makes heavy use of Swift features (Generics, Optionals, Tuples, operator overloading, etc). Which unfortunately meant you couldn't even bridge this to Objective-C. There are three areas of QueryKit, the original Swift only component. The Objective-C counter-part, this doesn't provide an interface as elegant as the Swift component. It unfortunately doesn't provide type-safety like the Swift one does. The Objective-C component introduces a class prefix of QK.\r\n\r\nThere third part is a [bridging component](https://github.com/QueryKit/QueryKit/blob/master/QueryKit/ObjectiveC/QKQuerySet.swift), which allows you to transform between the two types. This was crucial part of using the Swift QuerySet implementation from Objective-C. It simply offers methods on each object to convert it to the other variant.\r\n\r\nSo, Swift to Objective-C variant:\r\n\r\n```objective-c\r\n[querySet asQKQuerySet]\r\n```\r\n\r\nand Objective-C variant to the Swift variant:\r\n\r\n```swift\r\nqkQuerySet.asQuerySet()\r\n```\r\n\r\n---\r\n\r\nReactiveCocoa 3.0 has a similar design, it started off in Objective-C. A new native Swift interface has been introduced using generics to provide type safety of elements inside a signal (or whatever Justin is calling Signals these days). There are also methods to interchange the Swift/Objective-C types similar to QueryKit.\r\n\r\n---\r\n\r\nQueryKit's Objective-C implementation was purely done to ease bridging between the two languages. I do not see this implementation staying around forever and I expect once Swift matures and becomes a dominant language for development in OS X and iOS I will remove it.\r\n\r\nI'd expect the same would be true for ReactiveCocoa, however I don't actually know the truth."}}