Search code examples
iosswiftxcodeamazon-web-servicesaws-mobilehub

No such module 'AWSMobileClient' error inside AppDelegate.swift


I'm trying to link aws frameworks with a native app. I'm using cocoapods and I have included and installed the dependencies I'll need as such inside my Podfile

platform :ios, '9.0'
use_frameworks!

target 'auth' do

    inherit! :search_paths

    pod 'AWSMobileClient'
    pod 'AWSUserPoolsSignIn'
    pod 'AWSAuthUI'
  # Pods for auth

  target 'authTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

target 'auth-tvOS' do

  # use_frameworks!

  # Pods for auth-tvOS

  target 'auth-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

At this time, when I import AWSMobileClient in my AppDelegate.swift file I received this error.

No such module 'AWSMobileClient'

I'm not sure what's causing this error when yet I have other AWS frameworks that do not yield any error. This might also explain why the app build keeps failing when ran in xcode. Any thoughts on this?


Solution

  • After installing the pods you need to open the .xcworkspace You cannot access them from your .xcodeproj

    Here is a good summary of the difference between Xcode project and Xcode Workspace.