Steps to Integrate

Follow these steps to add and initialize the SpyneAutomobile SDK in your iOS application.

1. Add the SDK Package Dependency

The SpyneAutomobile SDK is distributed through Swift Package Manager (SPM).

  1. Open your project in Xcode, Navigate to: Project Settings → Package Dependencies

  2. Click the + button to add a new package.

  3. Add the following package dependencies:

    SpyneAutomobileSDK

    https://github.com/spyne-ai-tech/SpyneAutomobileSDK

    AWS SDK for iOS

    https://github.com/aws-amplify/aws-sdk-ios-spm

  4. Select the latest SDK version & Add the package to your application target.

    • AWSAuthCore
    • AWSCognitoAuth
    • AWSCognitoIdentityProvider
    • AWSCognitoIdentityProviderASF
    • AWSCore
    • AWSMobileClientXCF
    • AWSS3

2. Verify Framework Integration

After adding the package, ensure the SDK is linked correctly to your application target.

  1. Select your project in the Project Navigator & Select your main application target.
  2. Open the General tab & Navigate to Frameworks, Libraries, and Embedded Content.
  3. Verify that SpyneAutomobileSDK appears in the list.
  4. If it is not listed, click + and add it manually & Set the embed option to: Embed & Sign
  5. Review the embed settings for each framework:
ProductEmbed setting
SpyneAutomobileSDKEmbed & Sign

Once completed, the SDK is ready for initialization.


3. Configure Info.plist

Camera permission (required)

The shoot flow will terminate immediately without a camera usage description:

<key>NSCameraUsageDescription</key>
<string>This app needs camera access to capture vehicle photos using the Spyne SDK.</string>
<key>NSMicrophoneUsageDescription</key>
<string>$(APP_NAME) requires microphone access for voice-enabled VIN creation, VIN search, and feature video recording.</string>
<key>NSLocalNetworkUsageDescription</key>
<string>$(APP_NAME) Used for Connect RicohThetha Camera</string>
<key>NSMotionUsageDescription</key>
<string>$(APP_NAME) Used Your motion for Feature Video Capture direction</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>$(APP_NAME) Uses this to provide the user with better shooting experience based on our AI model and also for analytics purposes to serve better experience.</string>

4. Initialize the Spyne SDK

📘

Take the SDK API key from your Spyne's POC.

Before using any Spyne SDK functionality, initialize the SDK during your application's launch process.

//in: application(_:didFinishLaunchingWithOptions:)

SpyneAutomobile.SpyneAutomobileSDK.initialize(apiKey: your_api_key)

5. Configure AWS S3 Transfer Utility

The SDK uses AWS S3 Transfer Utility for image and media uploads. Configure AWS before launching any Spyne workflows

//in: application(_:didFinishLaunchingWithOptions:)

let transferUtilityConfiguration = AWSS3TransferUtilityConfiguration()
transferUtilityConfiguration.isAccelerateModeEnabled = true

// Create the AWS service configuration
guard let serviceConfiguration = AWSServiceManager.default().defaultServiceConfiguration else {
    print("AWS defaultServiceConfiguration is nil after AWSMobileClient initialization")
    return
}

AWSS3TransferUtility.register(
    with: serviceConfiguration,
    transferUtilityConfiguration: transferUtilityConfiguration,
    forKey: "transferUtilityKey"
) { error in
    if let error = error {
        print("Error registering Transfer Utility: \(error.localizedDescription)")
    }
}



Did this page help you?