Anilkumar iOS Developer
Anilkumar iOS Developer

Reputation: 3755

Getting No such module 'AWSS3' in Swift

I have installed AWS for uploading documents from my iOS app. So, I have followed Swift-Amazon-S3-Uploading-Tutorial and it's installed successfully by pods, but, after imported the framework into my class, it's throwing as "No such module 'AWSS3'", even I removed derived data as few forums suggested, and I have done all possible ways like clean, build, but, nothing helped me.

I followed this tutorial

https://github.com/maximbilan/Swift-Amazon-S3-Uploading-Tutorial

Can anyone suggest to fix this?

Upvotes: 2

Views: 2672

Answers (2)

Anilkumar iOS Developer
Anilkumar iOS Developer

Reputation: 3755

I got answer finally, after recheck my pod file, I was added the pod files at

  target 'projectname' do
    inherit! :search_paths

instead of under

use_frameworks!

finally fixed and the added the version number too for that pod files as following suggested link

platform :ios, '9.0'

   target :'YOUR-APP-NAME' do
      use_frameworks!

      pod 'AWSS3', '~> 2.6.13'   # For file transfers
      pod 'AWSCognito', '~> 2.6.13'   #For data sync

      # other pods . . .

   end

https://docs.aws.amazon.com/aws-mobile/latest/developerguide/add-aws-mobile-user-data-storage.html

Upvotes: 0

Andrew WC Brown
Andrew WC Brown

Reputation: 2260

When I get no such module using cocoapods it because I opened the project with the .xcodeproj instead of with .xcworkspace

Also you may need to ensure the framework path is correct. This has happen to me before with Cocoapods

Getting error "No such module" using Xcode, but the framework is there

Upvotes: 1

Related Questions