fulldecent / FDTake

Easily take a photo or video or choose from library
MIT License
319 stars 121 forks source link

Swift support? #53

Closed danielgomezrico closed 8 years ago

danielgomezrico commented 9 years ago

Hi

I tried adding the library with pods and then #import "FDTakeController.h" in my bridging file but I get:

/Users/dgomez/Desktop/Swift - Camera/Swift - Camera/Swift - Camera-Bridging-Header.h:5:9: note: in file included from /Users/dgomez/Desktop/Swift - Camera/Swift - Camera/Swift - Camera-Bridging-Header.h:5:
#import "FDTakeController.h"
        ^
/Users/dgomez/Desktop/Swift - Camera/Pods/Headers/Public/FDTake/FDTakeController.h:29:65: error: expected a type
- (void)takeController:(FDTakeController *)controller gotPhoto:(UIImage *)photo withInfo:(NSDictionary *)info;
                                                                ^
/Users/dgomez/Desktop/Swift - Camera/Swift - Camera/Swift - Camera-Bridging-Header.h:5:9: note: in file included from /Users/dgomez/Desktop/Swift - Camera/Swift - Camera/Swift - Camera-Bridging-Header.h:5:
#import "FDTakeController.h"
        ^
/Users/dgomez/Desktop/Swift - Camera/Pods/Headers/Public/FDTake/FDTakeController.h:37:41: error: cannot find protocol declaration for 'UIImagePickerControllerDelegate'
@interface FDTakeController : NSObject <UIImagePickerControllerDelegate>
                                        ^
/Users/dgomez/Desktop/Swift - Camera/Swift - Camera/Swift - Camera-Bridging-Header.h:5:9: note: in file included from /Users/dgomez/Desktop/Swift - Camera/Swift - Camera/Swift - Camera-Bridging-Header.h:5:
#import "FDTakeController.h"
        ^
/Users/dgomez/Desktop/Swift - Camera/Pods/Headers/Public/FDTake/FDTakeController.h:59:42: error: unknown type name 'UIViewController'
@property (nonatomic, unsafe_unretained) UIViewController *viewControllerForPresentingImagePickerController;
                                         ^
/Users/dgomez/Desktop/Swift - Camera/Swift - Camera/Swift - Camera-Bridging-Header.h:5:9: note: in file included from /Users/dgomez/Desktop/Swift - Camera/Swift - Camera/Swift - Camera-Bridging-Header.h:5:
#import "FDTakeController.h"
        ^
/Users/dgomez/Desktop/Swift - Camera/Pods/Headers/Public/FDTake/FDTakeController.h:61:31: error: unknown type name 'UITabBar'
@property (strong, nonatomic) UITabBar *tabBar;
                              ^
/Users/dgomez/Desktop/Swift - Camera/Swift - Camera/Swift - Camera-Bridging-Header.h:5:9: note: in file included from /Users/dgomez/Desktop/Swift - Camera/Swift - Camera/Swift - Camera-Bridging-Header.h:5:
#import "FDTakeController.h"
        ^
/Users/dgomez/Desktop/Swift - Camera/Pods/Headers/Public/FDTake/FDTakeController.h:61:1: error: property with 'retain (or strong)' attribute must be of object type
@property (strong, nonatomic) UITabBar *tabBar;
^
<unknown>:0: error: failed to import bridging header '/Users/dgomez/Desktop/Swift - Camera/Swift - Camera/Swift - Camera-Bridging-Header.h'```
fulldecent commented 9 years ago

Sorry, I have not used bridging files yet. Can anyone else provide advice here?

praveenthames commented 9 years ago

Did you find an answer ?

fulldecent commented 9 years ago

Swift 0.36 is released with Swift support http://blog.cocoapods.org/CocoaPods-0.36/

fulldecent commented 9 years ago

If anyone is successfully using FDTake in a CocoaPods swift project, please let us know how you are now doing it

fulldecent commented 9 years ago

@danielgomezrico Just to confirm, are you using CocoaPods and are you using the latest version?

fulldecent commented 8 years ago

Related: #69

fulldecent commented 8 years ago

Actually, because #69 is happening I will close this to continue discussion there