AWS SDK for iOS. For more information, see our web site:

Overview

AWS SDK for iOS

Release CocoaPods Carthage compatible CircleCI Discord

The AWS SDK for iOS provides a library and documentation for developers to build connected mobile applications using AWS.

Features / APIs

  • Authentication: APIs and building blocks for developers who want to create user authentication experiences.
  • Analytics: Easily collect analytics data for your app. Analytics data includes user sessions and other custom events that you want to track in your app.
  • API: Provides a simple solution when making HTTP requests. It provides an automatic, lightweight signing process which complies with AWS Signature Version 4.
  • Storage: Provides a simple mechanism for managing user content for your app in public, protected or private storage buckets.
  • Push Notifications: Allows you to integrate push notifications in your app with Amazon Pinpoint targeting and campaign management support.
  • PubSub: Provides connectivity with cloud-based message-oriented middleware.
  • Generated AWS Service Interfaces: Provides direct interaction with any AWS service.

Visit our Web Site to learn more about Amplify Framework.

Setup

To get started with the AWS SDK for iOS, check out the Developer Guide for iOS. You can set up the SDK and start building a new project, or you integrate the SDK in an existing project. You can also run the samples to get a sense of how the SDK works.

To use the AWS SDK for iOS, you will need the following installed on your development machine:

  • Xcode 11.0 or later
  • iOS 9 or later

Include the SDK for iOS in an Existing Application

We have a couple samples applications which showcase how to use the AWS SDK for iOS. Please note that the code in these sample applications is not of production quality, and should be considered as exactly what we called them: samples.

There are several ways to integrate the AWS Mobile SDK for iOS into your own project:

You should use ONE and only one of these ways to import the AWS Mobile SDK. Importing the SDK in multiple ways loads duplicate copies of the SDK into the project and causes compiler/linker errors.

Note: If you are using XCFrameworks (i.e., either Swift Package Manager, Carthage, or Dynamic Frameworks), some modules are named with the XCF suffix to work around a Swift issue. AWSMobileClient is named as AWSMobileClientXCF and AWSLocation is named as AWSLocationXCF. To use the AWSMobileClient or AWSLocation SDKs, import them as:

import AWSMobileClientXCF
import AWSLocationXCF

and use it your app code without the XCF suffix.

AWSMobileClient.default().initialize() 
let locationClient = AWSLocation.default()

Swift Package Manager

  1. Swift Package Manager is distributed with Xcode. To start adding the AWS SDK to your iOS project, open your project in Xcode and select File > Swift Packages > Add Package Dependency.

    Add package dependency

  2. Enter the URL for the AWS SDK for iOS Swift Package Manager GitHub repo (https://github.com/aws-amplify/aws-sdk-ios-spm) into the search bar and click Next.

    Search for repo

    NOTE: This URL is not the main URL of the SDK. We maintain the Swift Package Manager manifest (Package.swift) file for this library in a separate repo so that apps that use the SDK do not have to download the entire source repository in order to consume the binary targets.

  3. You'll see the repository rules for which version of the SDK you want Swift Package Manager to install. Choose the first rule, Version, and select Up to Next Minor as it will use the latest compatible version of the dependency that can be detected from the main branch, then click Next.

    Dependency version options

    NOTE: The AWS Mobile SDK for iOS does not use Semantic Versioning, and may introduce breaking API changes on minor version releases. We recommend setting your Version rule to Up to Next Minor and evaluating minor version releases to ensure they are compatible with your app.

  4. Choose which of the libraries you want added to your project. Always select the AWSCore SDK. The remaining SDKs to install will vary based on which SDK you're trying to install. Most SDKs rely only on AWSCore, but for a full dependency list, see the README-spm-support file.

    Note: AWSLex is not currently supported for the arm64 architecture through Swift Package Manager due to conflicts with a packaged binary dependency.

    Select dependencies

    Select all that are appropriate, then click Finish.

    You can always go back and modify which SPM packages are included in your project by opening the Swift Packages tab for your project: Click on the Project file in the Xcode navigator, then click on your project's icon, then select the Swift Packages tab.

CocoaPods

  1. The AWS Mobile SDK for iOS is available through CocoaPods. If you have not installed CocoaPods, install CocoaPods by running the command:

     $ gem install cocoapods
     $ pod setup
    

    Depending on your system settings, you may have to use sudo for installing cocoapods as follows:

     $ sudo gem install cocoapods
     $ pod setup
    
  2. In your project directory (the directory where your *.xcodeproj file is), run the following to create a Podfile in your project.

     $ pod init
    
  3. Edit the podfile to include the pods you want to integrate into your project. For example, if you need auth, you can use AWSMobileClient, and if you need analytics, you add AWSPinpoint. As a result, your podfile might look something like this:

target 'YourTarget' do
    pod 'AWSMobileClient'
    pod 'AWSPinpoint'
end

For a complete list of our pods, check out the .podspec files in the root directory of this project.

  1. Then run the following command:

     $ pod install --repo-update
    
  2. To open your project, open the newly generated *.xcworkspace file in your project's directory with XCode. You can do this by issuing the following command in your project folder:

     $ xed .
    

    Note: Do NOT use *.xcodeproj. If you open up a project file instead of a workspace, you may receive the following error:

     ld: library not found for -lPods-AWSCore
     clang: error: linker command failed with exit code 1 (use -v to see invocation)
    

Carthage

XCFrameworks (recommended)

Carthage supports XCFrameworks in Xcode 12 or above. Follow the steps below to consume the AWS SDK for iOS using XCFrameworks:

  1. Install Carthage 0.37.0 or greater.

  2. Add the following to your Cartfile:

     github "aws-amplify/aws-sdk-ios"
    
  3. Then run the following command:

     $ carthage update --use-xcframeworks --no-use-binaries
    

As of Carthage 0.37.0, prebuilt binaries using XCFrameworks are not supported, as mentioned in the Carthage release notes - https://github.com/Carthage/Carthage/releases/tag/0.37.0

  1. On your application targets’ General settings tab, in the Embedded Binaries section, drag and drop each xcframework you want to use from the Carthage/Build folder on disk.

Frameworks with "fat libraries" (not recommended)

To build platform-specific framework bundles with multiple architectures in the binary, (Xcode 11 and below)

  1. Install the latest version of Carthage.

  2. Add the following to your Cartfile:

     github "aws-amplify/aws-sdk-ios"
    
  3. Then run the following command:

     $ carthage update
    
  4. With your project open in Xcode, select your Target. Under General tab, find Frameworks, Libraries, and Embedded Content and then click the + button.

  5. Click the Add Other... button, then "Add Files..." in the popup menu, then navigate to the AWS<#ServiceName#>.framework files under Carthage > Build > iOS and select them. Do not check the Destination: Copy items if needed checkbox if prompted. Add the frameworks that you need for you specific use case. For example, if you are using AWSMobileClient and AWSPinpoint, you will want to add the following frameworks:

    • AWSAuthCore.framework
    • AWSCognitoIdentityProvider.framework
    • AWSCognitoIdentityProviderASF.framework
    • AWSCore.framework
    • AWSMobileClient.framework
    • AWSPinpoint.framework
  6. Under the Build Phases tab in your Target, click the + button on the top left and then select New Run Script Phase. Then setup the build phase as follows. Make sure this phase is below the Embed Frameworks phase.

     Shell /bin/sh
     
     bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/AWSCore.framework/strip-frameworks.sh"
     
     Show environment variables in build log: Checked
     Run script only when installing: Not checked
     
     Input Files: Empty
     Output Files: Empty
    

Note: Currently, the AWS SDK for iOS builds the Carthage binaries using the latest released version of Xcode. To consume the pre-built binaries your Xcode version needs to be the same, else you have to build the frameworks on your machine by passing --no-use-binaries flag to carthage update command.

Frameworks

XCFramework setup

Starting AWS SDK iOS version 2.22.1, SDK binaries are released as XCFrameworks. Follow the steps below to install XCFramework.

  1. Download the latest SDK. Older SDK versions can be downloaded from https://releases.amplify.aws/aws-sdk-ios/aws-ios-sdk-#.#.#.zip, where #.#.# represents the version number. So for version 2.23.3, the download link is https://releases.amplify.aws/aws-sdk-ios/aws-ios-sdk-2.23.3.zip.

Note1: If you are using version < 2.22.1 please refer to the "Legacy framework setup" section below. Note2: To download version < 2.23.3 use this link https://sdk-for-ios.amazonwebservices.com/aws-ios-sdk-#.#.#.zip

  1. Uncompress the ZIP file
  2. On your application targets’ General settings tab, in the Embedded Binaries section, drag and drop each xcframework you want to use from the downloaded folder.

Legacy framework setup

  1. Download the required SDK using https://sdk-for-ios.amazonwebservices.com/aws-ios-sdk-#.#.#.zip, where #.#.# represents the version number. So for version 2.10.2, the download link is https://sdk-for-ios.amazonwebservices.com/aws-ios-sdk-2.10.2.zip.

Note: If you are using version > 2.22.0 please refer to the "XCFramework setup" section above.

  1. With your project open in Xcode, select your Target. Under General tab, find Embedded Binaries and then click the + button.

  2. Click the Add Other... button, navigate to the AWS<#ServiceName#>.framework files and select them. Check the Destination: Copy items if needed checkbox when prompted. Add the frameworks that you need for you specific use case. For example, if you are using AWSMobileClient and AWSPinpoint, you will want to add the following frameworks:

    • AWSAuthCore.framework
    • AWSCognitoIdentityProvider.framework
    • AWSCognitoIdentityProviderASF.framework
    • AWSCore.framework
    • AWSMobileClient.framework
    • AWSPinpoint.framework
  3. Under the Build Phases tab in your Target, click the + button on the top left and then select New Run Script Phase. Then setup the build phase as follows. Make sure this phase is below the Embed Frameworks phase.

     Shell /bin/sh
     
     bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/AWSCore.framework/strip-frameworks.sh"
     
     Show environment variables in build log: Checked
     Run script only when installing: Not checked
     
     Input Files: Empty
     Output Files: Empty
    

Update the SDK to a Newer Version

When we release a new version of the SDK, you can pick up the changes as described below.

CocoaPods

  1. Run the following command in your project directory. CocoaPods automatically picks up the new changes.

     $ pod update
    

    Note: If your pod is having an issue, you can delete Podfile.lock and Pods/ then run pod install to cleanly install the SDK.

    image

Carthage

  1. Run the following command in your project directory. Carthage automatically picks up the new changes.

     $ carthage update
    

Frameworks

  1. In Xcode's Project Navigator, type "AWS" to find the AWS Frameworks or XCFrameworks that you manually added to your project. Select all of the AWS Frameworks and hit Delete on your keyboard. Then select Move to Trash.

  2. Follow the installation process above to include the new version of the SDK.

Getting Started with Swift

  1. Import the AWSCore header in the application delegate.

    import AWSCore
  2. Create a default service configuration by adding the following code snippet in the application:didFinishLaunchingWithOptions: application delegate method.

    let credentialsProvider = AWSCognitoCredentialsProvider(
        regionType: CognitoRegionType,
        identityPoolId: CognitoIdentityPoolId)
    let configuration = AWSServiceConfiguration(
        region: DefaultServiceRegionType,
        credentialsProvider: credentialsProvider)
    AWSServiceManager.default().defaultServiceConfiguration = configuration
  3. In Swift file you want to use the SDK, import the appropriate headers for the services you are using. The header file import convention is import AWSServiceName, as in the following examples:

    import AWSS3
    import AWSDynamoDB
    import AWSSQS
    import AWSSNS
  4. Make a call to the AWS services.

    let dynamoDB = AWSDynamoDB.default()
    let listTableInput = AWSDynamoDBListTablesInput()
    dynamoDB.listTables(listTableInput!).continueWith { (task:AWSTask<AWSDynamoDBListTablesOutput>) -> Any? in
        if let error = task.error as? NSError {
        print("Error occurred: \(error)")
            return nil
        }
    
        let listTablesOutput = task.result
    
        for tableName in listTablesOutput!.tableNames! {
            print("\(tableName)")
        }
    
        return nil
    }

Note: Most of the service client classes have a singleton method to get a default client. The naming convention is + defaultSERVICENAME (e.g. + defaultDynamoDB in the above code snippet). This singleton method creates a service client with defaultServiceConfiguration, which you set up in step 5, and maintains a strong reference to the client.

Getting Started with Objective-C

  1. Import the AWSCore header in the application delegate.

    @import AWSCore;
  2. Create a default service configuration by adding the following code snippet in the application:didFinishLaunchingWithOptions: application delegate method.

    AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:CognitoRegionType
                                                                                                    identityPoolId:CognitoIdentityPoolId];
    AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:DefaultServiceRegionType
                                                                         credentialsProvider:credentialsProvider];
    AWSServiceManager.defaultServiceManager.defaultServiceConfiguration = configuration;
  3. Import the appropriate headers for the services you are using. The header file import convention is @import AWSServiceName;, as in the following examples:

    @import AWSS3;
    @import AWSDynamoDB;
    @import AWSSQS;
    @import AWSSNS;
  4. Make a call to the AWS services.

    AWSSNS *sns = [AWSSNS defaultSNS];
    AWSSNSListTopicsInput *listTopicsInput = [AWSSNSListTopicsInput new];
    [[sns listTopics:listTopicsInput] continueWithBlock:^id(AWSTask *task) {
        // Do something with the response
        return nil;
    }];

Note: Most of the service client classes have a singleton method to get a default client. The naming convention is + defaultSERVICENAME (e.g. + defaultS3SNS in the above code snippet). This singleton method creates a service client with defaultServiceConfiguration, which you set up in step 5, and maintains a strong reference to the client.

Working with AWSTask

The SDK returns AWSTask objects when operating on asynchronous operations to avoid blocking the UI thread.

The AWSTask class is a renamed version of BFTask from the Bolts framework. For complete documentation on Bolts, see the Bolts-iOS repo

Logging

As of version 2.5.4 of this SDK, logging utilizes CocoaLumberjack, a flexible, fast, open source logging framework. It supports many capabilities including the ability to set logging level per output target, for instance, concise messages logged to the console and verbose messages to a log file.

CocoaLumberjack logging levels are additive such that when the level is set to verbose, all messages from the levels below verbose are logged. It is also possible to set custom logging to meet your needs. For more information, see CocoaLumberjack

Changing Log Levels

Swift

AWSDDLog.sharedInstance.logLevel = .verbose

The following logging level options are available:

  • .off
  • .error
  • .warning
  • .info
  • .debug
  • .verbose

Objective-C

[AWSDDLog sharedInstance].logLevel = AWSDDLogLevelVerbose;

The following logging level options are available:

  • AWSDDLogLevelOff
  • AWSDDLogLevelError
  • AWSDDLogLevelWarning
  • AWSDDLogLevelInfo
  • AWSDDLogLevelDebug
  • AWSDDLogLevelVerbose

We recommend setting the log level to Off before publishing to the Apple App Store.

Targeting Log Output

CocoaLumberjack can direct logs to file or used as a framework that integrates with the Xcode console.

To initialize logging to files, use the following code:

Swift

let fileLogger: AWSDDFileLogger = AWSDDFileLogger() // File Logger
fileLogger.rollingFrequency = TimeInterval(60*60*24)  // 24 hours
fileLogger.logFileManager.maximumNumberOfLogFiles = 7
AWSDDLog.add(fileLogger)

Objective-C

AWSDDFileLogger *fileLogger = [[AWSDDFileLogger alloc] init]; // File Logger
fileLogger.rollingFrequency = 60 * 60 * 24; // 24 hour rolling
fileLogger.logFileManager.maximumNumberOfLogFiles = 7;
[AWSDDLog addLogger:fileLogger];

To initialize logging to your Xcode console, use the following code:

Swift

AWSDDLog.add(AWSDDTTYLogger.sharedInstance) // TTY = Xcode console

Objective-C

[AWSDDLog addLogger:[AWSDDTTYLogger sharedInstance]]; // TTY = Xcode console

Open Source Contributions

We welcome any and all contributions from the community! Make sure you read through our contribution guide here before submitting any PR's. Thanks! <3

Talk to Us

Visit our GitHub Issues to leave feedback and to connect with other users of the SDK.

Author

Amazon Web Services

License

See the LICENSE file for more info.

Comments
  • 2.4.0 breaks custom login provider?

    2.4.0 breaks custom login provider?

    So I spent ages getting a custom login provider to work. I have a class BYOIProvider extending AWSAbstractCognitoIdentityProvider based on some AWS sample. This was all working fine. However, upgrading to 2.4.0 the AWSAbstractCognitoIdentityProvider is no longer available? Do I have to rewrite this code now?

    question 
    opened by helloniklas 137
  • Support federated

    Support federated "Sign In With Apple"

    Which AWS Services is the feature request for? AWS SDK iOS, Cognito

    Is your feature request related to a problem? Please describe. We are offering Federated Sign In via AWSGoogleSignInProvider and AWSFacebookSignInProvider. Later this year Apple will force us to support "Sign in with Apple" see https://developer.apple.com/news/?id=06032019j

    Describe the solution you'd like We would like to see something like an AWSAppleIDSignInProvider

    Describe alternatives you've considered Can't see an alternative to AWS Amplify supporting "Sign in with Apple" on iOS, Android and Web.

    Additional context https://developer.apple.com/sign-in-with-apple/

    See also feature request for amplify-js: https://github.com/aws-amplify/amplify-js/issues/3395

    feature-request work in progress cognito mobile client follow up 
    opened by cornr 70
  • Best practice for pausing upload in AWSS3TransferManger and AWSS3TransferUtility on network loss?

    Best practice for pausing upload in AWSS3TransferManger and AWSS3TransferUtility on network loss?

    • What service are you using? AWSS3TransferManger
    • In what version of SDK are you facing the problem? 2.6.6
    • Is the issue limited to Simulators / Actual Devices? I'm testing on an actual device
    • Can your problem be resolved if you bump to a higher version of SDK? There is none higher.
    • Is this problem related to specific iOS version? Does not appear to be.
    • How are you consuming the SDK? CocoaPods / Carthage / Prebuilt frameworks? CocoaPods
    • Can you give us steps to reproduce with a minimal, complete, and verifiable example? Please include any specific network conditions that might be required to reproduce the problem.

    I start a large upload with TransferManager and part way through I turn on airplane mode to kill the wifi connection. This gives a "The Internet connection appears to be offline." error as expected since it does not appear that TransferManager handles network drops on its own like TransferUtility does.

    To combat this I'm trying to catch the network loss myself and pause the uploads before TransferManager errors. I'm using the Reachability cocoapod https://github.com/ashleymills/Reachability.swift to detect network loss and it seems like it's a race to see if I can pause before TransferManager errors. Usually I lose.

    I have not seen any official sdk documentation on how to handle pausing on a network loss so I wanted to see if someone could point to another source. Or possibly I should be handling this in a different manner?

    Also, please don't tell me to use TransferUtility because TransferManger is "old". TransferUtility does not support multipart uploads so whenever the network is lost it just restarts from the beginning and my app will be uploading large (100+ mb) files on less than ideal networks and I can't force users to keep restarting. I don't understand why multi-part wasn't a priority for the new code base but that's the way it is so it appears I'm stuck with the old TransferManager.

    Thanks

    question pending-response s3 connectivity 
    opened by jeffjvick 68
  • AWSMobileClient does not refresh tokens for federated sign in

    AWSMobileClient does not refresh tokens for federated sign in

    Describe the bug A call to AWSMobileClient.default.federatedSignIn with an Sign in With Apple, Facebook or Google token works. But after a while (in case of Apple 10 mins, Facebook or Google take a bit longer) AWSMobileClient changes state to signedOutFederatedTokensInvalid. At least for Apple there is no API to refresh a token (In the implementation of AWSGoogleSignInProvider and AWSFacebookSignInProvider you can see some sort of silent log in). The only thing one can do is to present the "Sign In with Apple" Sheet again which is a no go after just 10 minutes.

    Expected Behavior As the (enhanced) simple authentication flow suggests (see first diagram: https://docs.aws.amazon.com/cognito/latest/developerguide/authentication-flow.html) there is one activity with the login provider at the very beginning and a validation done by Cognito. After that credentials are issued by Cognito which are used for API Requests to AWS. Those credentials expiry time is set by Cognito (in our case 3650 days). (Please correct me if I missed something.)

    I expect after calling AWSMobileClient.default.federatedSignIn with a valid token (e.g. from Apple) that all credentials als are handled automatically in AWSMobileClient in conjunction with Cognito. And AWSMobileClient only switches to the signedOutFederatedTokensInvalid state if I suspend access to the app in my appleid settings or the cognito expiry time has elapsed.

    I also expect this behavior for other the login providers.

    Environment(please complete the following information):

    • SDK Version: 2.13.0
    • Dependency Manager: Carthage
    • Swift Version : 5
    • Xcode Version: 11.4.1
    question cognito mobile client service 
    opened by cornr 64
  • AWSS3TransferUtility upload - single 9

    AWSS3TransferUtility upload - single 9

    Describe the bug in my app, I upload all my files from the iPhone to the cloud: photos, videos, audio if I have a big amount of files for example 5000 image and the app is in the background what happens is after a while it could be 10 mins or 7 hours the app gets killed and I can see: “Message from debugger: Terminated due to signal 9”

    Which AWS service(s) are affected? TransferUtility

    Screenshots If applicable, add screenshots to help explain your problem.

    Environment(please complete the following information):

    • SDK Version:2.8.0
    • Dependency Manager: Cocoapods

    Device Information (please complete the following information):

    • Device: all
    • iOS Version: > 12
    • Specific to simulators:
    question s3 
    opened by rivkiG 57
  • Mac OS X Support?

    Mac OS X Support?

    We'd like to be able to use the SDK on iOS and Mac OS X

    Are there any plans to support the desktop as well as mobile?

    From a very brief review of the source, it looks like almost all of the UIKit dependencies are actually in the unit tests.

    feature-request 
    opened by mildm8nnered 51
  • PhaseScriptExecution failed with a nonzero exit code

    PhaseScriptExecution failed with a nonzero exit code

    I have recently updated the Xcode to 10.0 and after that I'm unable to create archive. This is log I get

    PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/muhammadsajad/Library/Developer/Xcode/DerivedData/ySkolar-cizrgcsvnlwnczdicazrfqwbihhi/Build/Intermediates.noindex/ySkolar.build/Debug-iphoneos/ySkolar.build/Script-9E682694EA2C01ECB09BB0EB.sh (in target: ySkolar) cd /Developer/yskolar /bin/sh -c /Users/muhammadsajad/Library/Developer/Xcode/DerivedData/ySkolar-cizrgcsvnlwnczdicazrfqwbihhi/Build/Intermediates.noindex/ySkolar.build/Debug-iphoneos/ySkolar.build/Script-9E682694EA2C01ECB09BB0EB.sh

    mkdir -p /Users/muhammadsajad/Library/Developer/Xcode/DerivedData/ySkolar-cizrgcsvnlwnczdicazrfqwbihhi/Build/Products/Debug-iphoneos/ySkolar.app/Frameworks rsync --delete -av --filter P .*.?????? --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "/Users/muhammadsajad/Library/Developer/Xcode/DerivedData/ySkolar-cizrgcsvnlwnczdicazrfqwbihhi/Build/Products/Debug-iphoneos/AWSCore/AWSCore.framework" "/Users/muhammadsajad/Library/Developer/Xcode/DerivedData/ySkolar-cizrgcsvnlwnczdicazrfqwbihhi/Build/Products/Debug-iphoneos/ySkolar.app/Frameworks" building file list ... done deleting AWSCore.framework/_CodeSignature/CodeResources deleting AWSCore.framework/_CodeSignature/ AWSCore.framework/

    sent 142 bytes received 26 bytes 336.00 bytes/sec total size is 4594021 speedup is 27345.36 Code Signing /Users/muhammadsajad/Library/Developer/Xcode/DerivedData/ySkolar-cizrgcsvnlwnczdicazrfqwbihhi/Build/Products/Debug-iphoneos/ySkolar.app/Frameworks/AWSCore.framework with Identity iPhone Developer: Azaz Mahmood (3QUCUQH7A8) /usr/bin/codesign --force --sign DD64EAF55BA0B1B97950184C53316C4D74D569C7 --preserve-metadata=identifier,entitlements '/Users/muhammadsajad/Library/Developer/Xcode/DerivedData/ySkolar-cizrgcsvnlwnczdicazrfqwbihhi/Build/Products/Debug-iphoneos/ySkolar.app/Frameworks/AWSCore.framework' /Users/muhammadsajad/Library/Developer/Xcode/DerivedData/ySkolar-cizrgcsvnlwnczdicazrfqwbihhi/Build/Products/Debug-iphoneos/ySkolar.app/Frameworks/AWSCore.framework: errSecInternalComponent Command PhaseScriptExecution failed with a nonzero exit code

    question pending-response core 
    opened by sajadkhan 50
  • SDK v2 - Resume uploads after close the app no longer working

    SDK v2 - Resume uploads after close the app no longer working

    We have just updated to the Amazon SDK v2 and now uploads wont resume after closing the app.

    The amazon SDK v1 used to allow resuming uploads after the app was closed. This was a very useful feature for us. However, SDK v2 doesn't have it. Are there any plans to enable this feature? Or is there a way to get this to work?

    It used to work as the SDK checked file URL to resume uploads (which remained constant), now SDK v2 uses the instance to see if this is a new one or not, so when you close the app you have a new instance so the upload doesn't resume from the last complete chunk but restarts from 0.

    Links to this ticket https://github.com/aws/aws-sdk-ios/issues/154

    pending-response s3 
    opened by simeondrage 50
  • Cannot compile for UIKit for Mac

    Cannot compile for UIKit for Mac

    Describe the bug With the new UIKit for Mac support in Xcode 11 and macOS Catalina, this library is currently unable to compile the My Mac target. There are unavailable keychain APIs preventing the SDK from being compiled.

    To Reproduce

    • install the SDK into an iPad Xcode 11 project
    • enable Mac support
    • compile the app for the My Mac target

    Which AWS service(s) are affected?

    Expected behavior The SDK should compile

    Screenshots image

    Environment(please complete the following information):

    • SDK Version: 2.9.3
    • Dependency Manager: Cocoapods
    • Swift Version : 5.0

    Device Information (please complete the following information):

    • Device: macOS Catalina
    • iOS Version: n/a
    • Specific to simulators:

    Additional context Add any other context about the problem here.

    feature-request platform support follow up 
    opened by colinhumber 44
  • NSURLSession background upload support for s3

    NSURLSession background upload support for s3

    Hi I want to confirm that does aws-sdk-v2 supports background upload for files on amazon s3. Because I see that's a very basic requirement as users won't stay in app until a long download finished.

    If its not there please let me know how I could achive this, still using this SDK. I'll be happy to contribute.

    btw: Implemention with NSURLSession looks really nice. Thanks

    feature-request 
    opened by rahulgautam 42
  • S3TransferUtility Upload failed. SSL Error

    S3TransferUtility Upload failed. SSL Error

    To help us solve your problem better, please answer the following list of questions.

    • What service are you using? AWSS3/Transferutility(including MultipartUpload)

    • In what version of SDK are you facing the problem? 2.6.18 ~ 2.6.21

    • Is the issue limited to Simulators / Actual Devices? Actual Devices

    • Can your problem be resolved if you bump to a higher version of SDK? No

    • Is this problem related to specific iOS version? No

    • How are you consuming the SDK? CocoaPods / Carthage / Prebuilt frameworks? CocoaPods

    • Can you give us steps to reproduce with a minimal, complete, and verifiable example? Please include any specific network conditions that might be required to reproduce the problem.

    small size files are almost working. big size files are not working.

    error screenshot: error_screenshot

    If you need help with understanding how to implement something in particular then we suggest that you first look into our developer guide. You can also simplify your process of creating an application by using Mobile Hub.

    pending-response s3 
    opened by mpirogov 38
  • Unable to Build AWSMobileClientXCF error. XCode 14.2 + SPM

    Unable to Build AWSMobileClientXCF error. XCode 14.2 + SPM

    Hi! I added Added AWSMobileClient as dependency in SPM

    However i got the following message Failed to build module 'AWSMobileClientXCF'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)', while this compiler is 'Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)'). Please select a toolchain which matches the SDK.

    • SDK Version: 2.29.1
    • Dependency Manager: SPM
    • Swift Version : 5.7.2

    I checked previous issues and see that this one is not new. And possible fix for it will be recompiling it. :/

    opened by nickgavrilov 0
  • crash in AWSMobileClient.getTokens

    crash in AWSMobileClient.getTokens

    Describe the bug

    A clear and concise description of what the bug is. Please be as detailed as possible and help us help you.

    Crashlytics reported crash on iOS device

    Stack Trace

    Fatal Exception: NSInternalInconsistencyException
    *** -[NSHashTable NSHashTable { [0] <AWSMobileClientXCF.FetchUserPoolTokensOperation: 0x103c09570> } ] count underflow
    
    Fatal Exception: NSInternalInconsistencyException
    0  CoreFoundation                 0x9e88 __exceptionPreprocess
    1  libobjc.A.dylib                0x178d8 objc_exception_throw
    2  Foundation                     0x555d60 -[NSConcreteHashTable rehash]
    3  Foundation                     0xc680 hashProbe
    4  Foundation                     0x129f4 -[NSConcreteHashTable addObject:]
    5  AWSMobileClientXCF             0x3ae68 specialized AWSMobileClient.getTokens(_:)
    6  AWSMobileClientXCF             0x20538 AWSMobileClient.logins() (<compiler-generated>)
    7  AWSMobileClientXCF             0x20ce4 @objc AWSMobileClient.logins() (<compiler-generated>)
    8  AWSCore                        0x3192c -[AWSCognitoCredentialsProviderHelper getIdentityId] + 301 (AWSIdentityProvider.m:301)
    9  AWSCore                        0x31558 -[AWSCognitoCredentialsProviderHelper logins] + 274 (AWSIdentityProvider.m:274)
    10 AWSCore                        0x55fb4 -[AWSCognitoCredentialsProvider credentialsWithCancellationToken:] + 630 (AWSCredentialsProvider.m:630)
    11 AWSMobileClientXCF             0x252a8 closure #1 in AWSMobileClient.getAWSCredentials(_:) + 30 (AWSMobileClient+Credentials.swift:30)
    12 AWSMobileClientXCF             0x1c0a4 @objc AWSAsyncBlockOperation.main() (<compiler-generated>)
    13 AWSMobileClientXCF             0x489c0 @objc AWSAsyncOperation.start() (<compiler-generated>)
    14 Foundation                     0x3c50c __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__
    15 Foundation                     0x41c20 __NSOQSchedule_f
    16 libdispatch.dylib              0x13114 _dispatch_block_async_invoke2
    17 libdispatch.dylib              0x3fdc _dispatch_client_callout
    18 libdispatch.dylib              0x746c _dispatch_continuation_pop
    19 libdispatch.dylib              0x6ad4 _dispatch_async_redirect_invoke
    20 libdispatch.dylib              0x15a6c _dispatch_root_queue_drain
    21 libdispatch.dylib              0x16284 _dispatch_worker_thread2
    22 libsystem_pthread.dylib        0xdbc _pthread_wqthread
    23 libsystem_pthread.dylib        0xb98 start_wqthread
    

    while another thread:

    com.apple.root.default-qos
    0  libsystem_kernel.dylib         0xb48 mach_msg2_trap + 8
    1  libsystem_kernel.dylib         0x13008 mach_msg2_internal + 80
    2  libsystem_kernel.dylib         0x13248 mach_msg_overwrite + 388
    3  libsystem_kernel.dylib         0x108c mach_msg + 24
    4  libdispatch.dylib              0x1f364 _dispatch_mach_send_and_wait_for_reply + 540
    5  libdispatch.dylib              0x1f6ec dispatch_mach_send_with_result_and_wait_for_reply + 60
    6  libxpc.dylib                   0x102e4 xpc_connection_send_message_with_reply_sync + 240
    7  Security                       0x79b4 securityd_message_with_reply_sync + 124
    8  Security                       0x11aa4 securityd_send_sync_and_do + 88
    9  Security                       0xb8598 cftype_to_bool_cftype_error_request + 160
    10 Security                       0x1d4c __SecItemCopyMatching_block_invoke_2 + 200
    11 Security                       0x4dc4 __SecItemAuthDoQuery_block_invoke + 532
    12 Security                       0x3898 SecItemAuthDoQuery + 1236
    13 Security                       0x4a94 __SecItemCopyMatching_block_invoke + 140
    14 Security                       0xa99c SecOSStatusWith + 56
    15 Security                       0x495c SecItemCopyMatching + 400
    16 AWSCore                        0x459c0 -[AWSUICKeyChainStore dataForKey:error:] + 457 (AWSUICKeyChainStore.m:457)
    17 AWSCore                        0x45550 -[AWSUICKeyChainStore stringForKey:error:] + 377 (AWSUICKeyChainStore.m:377)
    18 AWSCognitoIdentityProvider     0x8c48 -[AWSCognitoIdentityUser getSession] + 235 (AWSCognitoIdentityUser.m:235)
    19 AWSMobileClientXCF             0x164a8 protocol witness for CognitoIdentityUserBehavior.getUserPoolToken(completion:) in conformance AWSCognitoIdentityUser + 26 (CognitoIdentityUserBehavior.swift:26)
    20 AWSMobileClientXCF             0x3628c FetchUserPoolTokensOperation.fetchToken() + 3688 (<compiler-generated>:3688)
    21 AWSMobileClientXCF             0x36f80 partial apply for closure #1 in closure #1 in FetchUserPoolTokensOperation.acceptEvent(_:) + 88 (<compiler-generated>:88)
    22 AWSMobileClientXCF             0x1f0fc thunk for @escaping @callee_guaranteed () -> () + 6748 (<compiler-generated>:6748)
    23 libdispatch.dylib              0x24b4 _dispatch_call_block_and_release + 32
    24 libdispatch.dylib              0x3fdc _dispatch_client_callout + 20
    25 libdispatch.dylib              0x70c8 _dispatch_queue_override_invoke + 788
    26 libdispatch.dylib              0x15a6c _dispatch_root_queue_drain + 396
    27 libdispatch.dylib              0x16284 _dispatch_worker_thread2 + 164
    28 libsystem_pthread.dylib        0xdbc _pthread_wqthread + 228
    29 libsystem_pthread.dylib        0xb98 start_wqthread + 8
    

    Code Snippet Please provide a snippet of the code causing the issue or how you are using the service that has the bug.

    Unique Configuration Cognito with user pools standard configuration:

    AWSMobileClient(
          configuration: [
            "Version": "1.0",
            "CredentialsProvider": [
              "CognitoIdentity": [
                "Default": [
                  "PoolId": <REDACTED>,
                  "Region": "us-east-1"
                ]
              ]
            ],
            "IdentityManager": [
              "Default": [:]
            ],
            "CognitoUserPool": [
              "Default": [
                "PoolId": <REDACTED>,
                "AppClientId": <REDACTED>,
                "Region": "us-east-1"
              ]
            ]
          ]
        )
    

    where real id have been replaced with fake.

    Areas of the SDK you are using (AWSMobileClient, Cognito, Pinpoint, IoT, etc)?

    AWSMobileClient

    Environment(please complete the following information):

    • SDK Version: 2.27.12
    • Dependency Manager: SPM
    • Swift Version : 5.0
    • Xcode Version: 14.2

    Device Information (please complete the following information): Model:iPad (10.9-inch, 10th generation) Orientation: Landscape RAM free: 329.19 MB Disk free: 171.67 GB Operating System Version:16.1.1 Orientation: Landscape Jailbroken:No

    Additional context App likely be refreshing token

    pending-triage auth 
    opened by paulz 1
  • Does not contain bitcode when using AWSCognito

    Does not contain bitcode when using AWSCognito

    I got this error after update Xcode 14. If I switch Enable Bitcode to "No" it is working but I don't want to do it. Is there a solution to this problem? Do we have to use Enable Bitcode as a no?

    '/Users/-/Library/Developer/Xcode/DerivedData/HotelApp-dvxyavtulfukemaexmfxgwnnlstw/Build/Products/Debug-iphoneos/AWSCognito/AWSCognito.framework/AWSCognito' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. file '/Users/-/Library/Developer/Xcode/DerivedData/HotelApp-dvxyavtulfukemaexmfxgwnnlstw/Build/Products/Debug-iphoneos/AWSCognito/AWSCognito.framework/AWSCognito' for architecture arm64

    AWSCognito

    Screenshot 2022-12-26 at 23 09 45

    Environment(please complete the following information):

    • SDK Version: 2.19.1
    • Dependency Manager: Cocoapods
    • Swift Version : 4.0

    Device Information (please complete the following information):

    • Device: iPhone 8 plus
    • iOS Version: iOS 16.2

    Could you help me? Thank you.

    opened by halilpostaci 0
  • AWSS3TransferUtility URL of public uploaded file

    AWSS3TransferUtility URL of public uploaded file

    State your question

    How do I get the URL of the uploaded file to S3 on completion? Reconstructing the correct URL is hit or miss depending on bucket configuration it seems. I'm using AWSS3TransferUtility.uploadFile() which works as expected. I need the URL itself, since it needs to be shared. I understand that this isn't the typical use case, since public access is not common. Nonetheless, this is required for my issue.

    Which AWS Services are you utilizing?

    S3

    Environment(please complete the following information):

    • SDK Version: Main branch - d0667b076a3411d097d3194418713ee98356a967
    • Dependency Manager: Swift Package Manager
    • Swift Version : 5

    Device Information (please complete the following information):

    • Device: iPhone 13
    • iOS Version: iOS 16.1
    question 
    opened by e1block 0
  • Crash in AWSIoTMQTTClient.m line 635 -[AWSIoTMQTTClient openStreams:]

    Crash in AWSIoTMQTTClient.m line 635 -[AWSIoTMQTTClient openStreams:]

    Describe the bug I'm seeing a lot of crash reports in Crashlytics which all point to the same line: AWSIoTMQTTClient.m line 635 -[AWSIoTMQTTClient openStreams:].

    We are currently using AWS v2.27.13

    Steps to reproduce the behavior: Very difficult to reproduce - only seen intermittently on device when resuming from background.

    Environment SDK Version: [2.27.13] Dependency Manager: Cocoapods

    Device Information

    • Device: iPhone 14 Pro Max, iPhone 12 Pro
    • iOS Version: iOS 16.1.1

    Stack Trace Crashed: Thread #1 EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x000000000000012e

    Crashed: Thread 0 libobjc.A.dylib 0x6cf0 objc_opt_respondsToSelector + 52 1 CoreFoundation 0x13b14c _inputStreamCallbackFunc + 48 2 CoreFoundation 0x105fb4 _signalEventSync + 216 3 CoreFoundation 0x117e84 _cfstream_solo_signalEventSync + 224 4 CoreFoundation 0x10e42c _CFStreamSignalEvent + 304 5 CFNetwork 0x147eb8 _CFNetworkErrorGetLocalizedDescription + 180236 6 CFNetwork 0x1533e4 _CFNetworkErrorGetLocalizedDescription + 226616 7 CoreFoundation 0x11a41c __CFSocketPerformV0 + 648 8 CoreFoundation 0xd5f54 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28 9 CoreFoundation 0xe232c __CFRunLoopDoSource0 + 176 10 CoreFoundation 0x66210 __CFRunLoopDoSources0 + 244 11 CoreFoundation 0x7bba8 __CFRunLoopRun + 836 12 CoreFoundation 0x80ed4 CFRunLoopRunSpecific + 612 13 Foundation 0x42334 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 14 AWSIoT 0x5a728 -[AWSIoTMQTTClient openStreams:] + 759 (AWSIoTMQTTClient.m:759) 15 Foundation 0x5b808 NSThread__start + 716 16 libsystem_pthread.dylib 0x16cc _pthread_start + 148 17 libsystem_pthread.dylib 0xba4 thread_start + 8

    I see a very similar issue was previously report at https://github.com/aws-amplify/aws-sdk-ios/issues/1209 however this was reported resolved in a prior build - we are still seeing it in 2.27.13.

    bug iot 
    opened by gadget-man 0
Releases(2.29.1)
Alter SDK is a cross-platform SDK consisting of a real-time 3D avatar system, facial motion capture, and an Avatar Designer component built from scratch for web3 interoperability and the open metaverse.

Alter SDK is a cross-platform SDK consisting of a real-time 3D avatar system, facial motion capture, and an Avatar Designer component built from scratch for web3 interoperability and the open metaverse.

Alter 45 Nov 29, 2022
Native iOS implementation of RadarCOVID tracing client using DP3T iOS SDK

RadarCOVID iOS App Introduction Native iOS implementation of RadarCOVID tracing client using DP3T iOS SDK Prerequisites These are the tools used to bu

Radar COVID 146 Nov 24, 2022
TelegramStickersImport — Telegram stickers importing SDK for iOS

TelegramStickersImport — Telegram stickers importing SDK for iOS TelegramStickersImport helps your users import third-party programaticaly created sti

null 35 Oct 26, 2022
Muxer used on top of Feed iOS SDK for airplay

FeedAirplayMuxer Muxer used on top of Feed iOS SDK for airplay purposes. Demo Project --> https://github.com/feedfm/AirplayDemo Feed Airplay Muxer is

Feed Media 0 May 6, 2022
Basispay IOS SDK Version 2

BasisPay-IOS-KIT BasisPay IOS Payment Gateway kit for developers INTRODUCTION This document describes the steps for integrating Basispay online paymen

null 0 Oct 21, 2021
Release repo for Gini Bank SDK for iOS

Gini Bank SDK for iOS The Gini Bank SDK provides components for capturing, reviewing and analyzing photos of invoices and remittance slips. By integra

Gini GmbH 1 Dec 6, 2022
Da Xue Zhang Platform Lvb iOS SDK

Cloud_Lvb_SDK iOS API Reference Dxz Meeting iOS SDK是为 iOS 平台用户音视频服务的开源 SDK。通过大学长开放平台自研RTC,RTM系统,为客户提供质量可靠的音视频服务。 类 类名 描述 CLS_PlatformManager SDK的音视频主要

null 8 Jan 10, 2022
PayPal iOS SDK

PayPal iOS SDK Welcome to PayPal's iOS SDK. This library will help you accept card, PayPal, Venmo, and alternative payment methods in your iOS app. Su

PayPal 25 Dec 14, 2022
Unofficial Notion API SDK for iOS & macOS

NotionSwift Unofficial Notion SDK for iOS & macOS. This is still work in progress version, the module interface might change. API Documentation This l

Wojciech Chojnacki 59 Jan 8, 2023
150,000+ stickers API & SDK for iOS Apps.

English | 한국어 Stipop UI SDK for iOS Stipop SDK provides over 150,000 .png and .gif stickers that can be easily integrated into mobile app chats, comme

Stipop, Inc. 19 Dec 20, 2022
Spotify SDK for iOS

Spotify iOS SDK Overview The Spotify iOS framework allows your application to interact with the Spotify app running in the background on a user's devi

Spotify 522 Jan 6, 2023
Headless iOS/Mac SDK for saving stuff to Pocket.

This SDK is deprecated Howdy all! ?? Thanks for checking out this repo. Your ?? mean a lot to us. ?? Unfortunately, this project is deprecated, and th

Pocket 230 Mar 18, 2022
Evernote Cloud SDK for iOS

Evernote Cloud SDK 3.0 for iOS This is the official Evernote SDK for iOS. To get started, follow the instructions bellow. Additional information can b

Evernote 256 Oct 6, 2022
iOS SDK for the Box Content API

Box iOS SDK Getting Started Docs: https://developer.box.com/guides/mobile/ios/quick-start/ NOTE: The Box iOS SDK in Objective-C (prior to v3.0.0) has

Box 112 Dec 19, 2022
OneDrive SDK for iOS

Get started with the OneDrive SDK for iOS Integrate the OneDrive API into your iOS app! 1. Installation Install via Cocoapods Install Cocoapods - Foll

OneDrive 101 Dec 19, 2022
Stripe iOS SDK

Stripe iOS SDK The Stripe iOS SDK makes it quick and easy to build an excellent payment experience in your iOS app. We provide powerful and customizab

Stripe 1.8k Jan 5, 2023
Zendesk Mobile SDK for iOS

⚠️ This Repository has been deprecated, please go to here for the Zendesk Support SDK ⚠️ Zendesk Mobile SDK for iOS Zendesk SDK for mobile is a quick,

Zendesk 113 Dec 24, 2022
PlayKit: Kaltura Player SDK for iOS

Kaltura Player SDK Demo: Demo repo. If you are a Kaltura customer, please contact your Kaltura Customer Success Manager to help facilitate use of this

Kaltura 77 Jan 3, 2023
Uber Rides iOS SDK (beta)

Uber Rides iOS SDK This Swift library allows you to integrate the Uber Rides API into your iOS app. Requirements iOS 8.0+ Xcode 10.0+ Swift 4.2+ Insta

Uber Open Source 343 Jan 4, 2023