Skip to content
12 changes: 12 additions & 0 deletions Examples/ios-math-solver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions Examples/ios-math-solver/Sources/MathSolverViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions Examples/ios-math-solver/Sources/changeme.swift
Original file line number Diff line number Diff line change
@@ -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