Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode 6 / Swift incompatibility #36

Closed
amayasov opened this issue Sep 11, 2014 · 9 comments
Closed

Xcode 6 / Swift incompatibility #36

amayasov opened this issue Sep 11, 2014 · 9 comments
Labels

Comments

@amayasov
Copy link

Hi Petr,

I don't know if it is a real issue or perhaps i'm doing something wrong, but I was not able to integrate this cocoapod with my swift project. Basically after you install a pod to the project and add reference to the bridge header of the project, it fails to compile on all the UI (eg. UIView) class references inside .h files within a pod, complaining that it is unknown type. Do you know what could cause such a behavior, is it a bug in podspec? It there anything you can suggest for me to look at?

PS> I didn't find a place to post questions, so posting it as an issue which very well could turn not to be

Thanks,
Artem

@skywinder
Copy link
Owner

Hi.
Shame of me, I don't test Swift compatibility yet. I'll try to research it soon.

Anyway, it will be useful, if you provide more information about your issue:
Some logged errors? Version of Xcode (- GM already?)

p.s.
Github don't have special place to questions, so it's right place to put any questions.

@schmatz
Copy link

schmatz commented Sep 16, 2014

I am seeing the same bug. I'm able to compile if I insert "#import <UIKit/UIKit.h>" into the files that throw this error. However, when I do something like

let languages = NSArray(array: ["English","German","Swahili"])
ActionSheetStringPicker.showPickerWithTitle("Select language", rows: languages, initialSelection: 0, doneBlock: nil, cancelBlock: nil, origin: self.view)
println("Should have shown picker!")

The code runs without an error but doesn't show the view. I have checked that the self.view has bounds equal to the size of the screen. I'm still debugging, but thought I should share this.

@skywinder
Copy link
Owner

@schmatz Thanks for info. Get in touch with updates of your research!

@skywinder
Copy link
Owner

Hey, guys. I implement test project on Swift. You can check it out in branch xcode6-swift-support.

@schmatz Indeed, on iPhones swift code works well. But on iPads picker doesn't shows (only in swift project).

@amayasov according your topic question - I think the problem is lack of import UIKit string in the header. Did you found solution for this issue?

@skywinder
Copy link
Owner

@amayasov I fix import problem. Now you can use this project in swift

@skywinder
Copy link
Owner

Now Swift example merged to master. And all fixes available in latest pods version.
Fell free to reopen issue, if you still need help with swift integration.

@amayasov
Copy link
Author

amayasov commented Oct 6, 2014

@skywinder, Thanks. We've downgraded to objective-c, so it is not a problem for us any more :) But thank you anyway for your support.

@artworkad
Copy link

Can you make one single .h file which imports all relevant files? In swift you have to use a bridging header to import .h files and I would have to import each single file of your library. @skywinder

skywinder added a commit that referenced this issue Dec 4, 2014
@skywinder
Copy link
Owner

I update header ActionSheetPicker.h you can use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants