[ad_1]
There seems to be a conflict with using Amplify and aws-sdk-ios-spm with SPM so Amplify package was added with SPM and aws sdk added with CocoaPods.
My Podfile is defined as such:
source 'https://github.com/CocoaPods/Specs.git'
PLATFORM = '14.0'
platform :ios, PLATFORM
use_frameworks!
inhibit_all_warnings!
def common_pods
# AWS
pod 'AWSCore'
pod 'AWSIoT'
pod 'AWSMobileClient'
end
target 'App' do
common_pods
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["IPHONEOS_DEPLOYMENT_TARGET"] = PLATFORM
end
end
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
I ran pod install
and pod update
and everything seems to have installed correctly however when I then try and use it:
import AWSCore
import AWSIoT
class ExampleClass {
private var iotDataManager: AWSIoTDataManager?
init() {
self.iotDataManager = AWSIoTDataManager(forKey: "iotKey")
}
}
I just receive the error Cannot find type 'AWSIoTDataManager' in scope
when declaring private var iotDataManager
but XCode finds it fine when I Jump to Definition
.
Any reason why this maybe the case?
Thaks
[ad_2]