Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

Cocoapods alert for objc project #30

Closed
qiaoyan opened this issue May 10, 2015 · 10 comments
Closed

Cocoapods alert for objc project #30

qiaoyan opened this issue May 10, 2015 · 10 comments

Comments

@qiaoyan
Copy link

qiaoyan commented May 10, 2015

Hi,
is there any configuration in pod's file can define version for objc?
From Cocoapods:

[!] Pods written in Swift can only be integrated as frameworks; this feature is still in beta. Add `use_frameworks!` to your Podfile or target to opt into using it.
@bre7
Copy link
Collaborator

bre7 commented May 10, 2015

There is a way using subspecs like QueryKit.podspec for example. The current solution would be to use Chameleon 1.1.2

@qiaoyan
Copy link
Author

qiaoyan commented May 10, 2015

Thanks bre7, the following line resolve this issue temporarily:
pod 'ChameleonFramework', :git => "https://github.com/VAlexander/Chameleon.git", :tag => "1.1.2"

@vicc
Copy link
Owner

vicc commented May 10, 2015

@qiaoyan @bre7 Let me look into this. I'll post any updates here.

@vicc vicc closed this as completed May 10, 2015
@vicc vicc reopened this May 10, 2015
@bre7
Copy link
Collaborator

bre7 commented May 10, 2015

@qiaoyan Or pod 'ChameleonFramework', '1.1.2'

@vicc
Copy link
Owner

vicc commented May 10, 2015

@bre7 is right, you could simply use:

pod 'ChameleonFramework', '1.1.2'

In the mean time I'm going to see what I can do. @bre7 What would be the best way to approach this? Would you recommend creating a new swift branch and drop the swift files there and using subspecs? Or would using subspecs alone do the job?

@bre7
Copy link
Collaborator

bre7 commented May 10, 2015

I think they would both do the trick. There's a third option: two separate specs and single branch like Realm does realm-cocoa

@vicc
Copy link
Owner

vicc commented May 11, 2015

So I decided that the best thing to do for now is pursue the third option suggested by @bre7. I've separated objective-c and swift files into different folders, and plan on creating a separate spec for swift installations. At the moment the latest version (1.2.0) should install without a problem for Objective-C projects.

You can go back to simply using:

pod 'ChameleonFramework'

Later tonight I'll look into creating one for Swift.

@vicc
Copy link
Owner

vicc commented May 11, 2015

On second thought, it seems a bit premature to create a pod spec for Swift when pod 'ChameleonFramework' works just as well for both. Perhaps if the library was completely ported over to Swift, would it make more sense. Maybe it's something that can happen if people truly want this once 2.0 is out, but I can't see much added benefit.

With that said, installation and usage should be just as easy for both languages at the moment. I updated the Installation section to cover both Objective-C and Swift, and even added Swift examples throughout the rest of the documentation as well.

@bre7
Copy link
Collaborator

bre7 commented May 11, 2015

I was gonna ask if you wanted swift examples :) Extension for "UIStatusBarStyle Methods" would be another way, I'll push it in a sec.

@vicc
Copy link
Owner

vicc commented May 11, 2015

Thanks @bre7! I'll look at the pull request in a bit.

@vicc vicc closed this as completed May 17, 2015
@bre7 bre7 mentioned this issue Jul 5, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants