diff --git a/Examples/ios-math-solver/README.md b/Examples/ios-math-solver/README.md index 68e3347..4c94fc0 100644 --- a/Examples/ios-math-solver/README.md +++ b/Examples/ios-math-solver/README.md @@ -2,6 +2,18 @@ An iOS application that uses AWS Bedrock and Claude to solve math and physics problems from images. +## TODO: add your AWS account detail + +Before compiling or running this app, you must + +- Configure SignIn With Apple on your Apple developer account. +- Configure an IAM Identity Provider for SignIn With Apple and this application bundle. +- Create an AWS IAM role that has the necessary permissions to access AWS Bedrock. +- Replace the placeholder values in `changeme.swift` with your actual AWS account detail and IAM role name. +- Enable the access to Amazon Bedrock models in the Bedrock console. + +See [AWS Documentation](https://docs.aws.amazon.com/sdk-for-swift/latest/developer-guide/apple-integration.html#apple-sign-in) for more information. + ## Features - Take a photo or select an image from your photo library diff --git a/Examples/ios-math-solver/Sources/MathSolverViewModel.swift b/Examples/ios-math-solver/Sources/MathSolverViewModel.swift index 0374311..d301b4b 100644 --- a/Examples/ios-math-solver/Sources/MathSolverViewModel.swift +++ b/Examples/ios-math-solver/Sources/MathSolverViewModel.swift @@ -33,11 +33,6 @@ final class MathSolverViewModel: ObservableObject, @unchecked Sendable { /// Reference to the authentication manager private weak var authManager: AuthenticationManager? - // to integrate with Sign In With Apple (SIWA), you must prepare your AWS account - // Follow instructions at https://docs.aws.amazon.com/sdk-for-swift/latest/developer-guide/apple-integration.html#apple-sign-in - - private let awsAccountNumber = "486652066693" // TODO: Replace with your AWS account number - private let awsIAMRoleName = "ios-swift-bedrock" // TODO: Replace with your IAM role name private var logger = Logger(label: "MathSolverViewModel") /// Sets the authentication manager and initializes the Bedrock client diff --git a/Examples/ios-math-solver/Sources/changeme.swift b/Examples/ios-math-solver/Sources/changeme.swift new file mode 100644 index 0000000..921c930 --- /dev/null +++ b/Examples/ios-math-solver/Sources/changeme.swift @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift Bedrock Library open source project +// +// Copyright (c) 2025 Amazon.com, Inc. or its affiliates +// and the Swift Bedrock Library project authors +// Licensed under Apache License v2.0 +// +// See LICENSE.txt for license information +// See CONTRIBUTORS.txt for the list of Swift Bedrock Library project authors +// +// SPDX-License-Identifier: Apache-2.0 +// +//===----------------------------------------------------------------------===// + +// to integrate with Sign In With Apple (SIWA), you must prepare your AWS account +// Follow instructions at https://docs.aws.amazon.com/sdk-for-swift/latest/developer-guide/apple-integration.html#apple-sign-in + +private let awsAccountNumber = "0000000000" // TODO: Replace with your AWS account number +private let awsIAMRoleName = "your-iam-ios-swift-bedrock-role-name" // TODO: Replace with your IAM role name