Reputation: 691
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?
Upvotes: 3
Views: 4080
Reputation: 69
On top of the answer above me of @Stephen Kwan [https://stackoverflow.com/a/48572298/3941896]
My problem was when I copied+pasted redundant target in the podfile. it looked like this:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target :'RM1' do
use_frameworks!
# other pods
pod 'AWSMobileClient', '~> 2.6.6'
end
target 'RM1' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for RM1
target 'RM1Tests' do
inherit! :search_paths
# Pods for testing
end
target 'RM1UITests' do
inherit! :search_paths
# Pods for testing
end
end
Once I combined the 2 target: 'RM1'
, run pod install
and it worked.
Upvotes: 0
Reputation: 21
I am using Xcode 9.2, with Swift 3.2. At first I would gain the same "No such module 'AWSMobileClient'" error in AppDelegate.swift file.
My Solution:
Upvotes: 2