Reputation: 715
I upgraded to Xcode 7/Swift 2.0 today. My project is using CocoaPods and I am importing all AWS related files in the POD-file, I have set up my bridging-header and I import all the files Amazon tells me to. Before upgrading to Swift 2.0, everything AWS related was working fine (namely uploading images into an S3 bucket)
Now after upgrading, I can not create an instance of AWSS3TransferManagerUploadRequest in my project anymore. The line:
let uploadRequest = AWSS3TransferManagerUploadRequest()
produces and error.
(Use of unresolved identifier 'AWSS3TransferManagerUploadRequest')
Any ideas why this is happening? The AWSCognitoCredentialsProvider/AWSServiceConfiguration code is working fine in my AppDelegate.Swift
Upvotes: 3
Views: 1762
Reputation: 715
Found a solution - Since I'm using "use_frameworks!", CocoaPods converts all pods from static libraries to framerworks.
"Normally when you’re importing Objective-C code into Swift, you do so by including the header of the file containing that code in the “Bridging Header” for your project. And that is indeed how you include code from a static library (which your pods used to be.)
But it is not how your import Objective-C code from a Framework."
So I simply added
import AWSS3
to my controller, and everything worked fine again.
Found the solution here: http://rogueleaderr.com/post/115372471213/unresolved-identifier-in-swift-when-importing
Upvotes: 3