![]() * chore: Fixing SwiftLint warnings in Amplify project * chore: Fixing SwiftLint warnings in APICategoryPlugin project * chore: Fixing SwiftLint warnings in AnalyticsCategoryPlugin project * chore: Fixing SwiftLint warnings in AWSCognitoAuthPlugin project * chore: Fixing SwiftLint warnings in DataStoreCategoryPlugin project * chore: Fixing SwiftLint warnings in PredictionsCategoryPlugin project * chore: Fixing SwiftLint warnings in StoragePlugin project |
||
---|---|---|
.. | ||
Resources | ||
AWSPredictionsPluginTestBase.swift | ||
ConvertBasicIntegrationTests.swift | ||
IdentifyBasicIntegrationTests.swift | ||
InterpretBasicIntegrationTests.swift | ||
README.md |
README.md
AWSPredictionsPluginIntegrationTests
The following steps demonstrate how to set up DataStore with a conflict resolution enabled API through amplify CLI, with API key authentication mode.
Set-up
-
amplify init
and chooseiOS
for type of app you are building -
amplify add predictions
to addIdentify Labels
function
? Please select from one of the categories below `Identify`
? You need to add auth (Amazon Cognito) to your project in order to add storage
for user files. Do you want to add auth now? `Yes`
? Do you want to use the default authentication and security configuration? `Default configuration`
? How do you want users to be able to sign in? `Username`
? Do you want to configure advanced settings? `No, I am done`
? What would you like to identify? `Identify Labels`
? Provide a friendly name for your resource `yourResourceName`
? Would you like use the default configuration? `Default configuration`
? Who should have access? `Auth and Guest users`
amplify add predictions
to addIdentify Entities
function
? Please select from one of the categories below `Identify`
? What would you like to identify? `Identify Entities`
? Provide a friendly name for your resource `yourResourceName`
? Would you like use the default configuration? `Default configuration`
? Who should have access? `Auth and Guest users`
amplify add predictions
to addIdentify Text
function
? Please select from one of the categories below `Identify`
? What would you like to identify? `Identify Text`
? Provide a friendly name for your resource `yourResourceName`
? Would you also like to identify documents? `Yes`
? Who should have access? `Auth and Guest users`
amplify add predictions
to addinterpret text
function
? Please select from one of the categories below `Interpret`
? What would you like to interpret? `Interpret Text`
? Provide a friendly name for your resource `yourResourceName`
? What kind of interpretation would you like? `All`
? Who should have access? `Auth and Guest users`
amplify add predictions
to addconvert speech to text
function
? Please select from one of the categories below `Convert`
? What would you like to convert? `Transcribe text from audio`
? Provide a friendly name for your resource `yourResourceName`
? What is the source language? `US English`
? Who should have access? `Auth and Guest users`
Notice when provisioning resource for speech conversion, we are using Amazon Transcribe (real-time streaming)
which is not supported on every region.
You can simply change the region
inside convert
block to the supported region code
Example: eu-west-2
doesn't support Amazon Transcribe (real-time streaming)
so that you can change it to eu-west-1
where supports the service
You can find the information in Region Table
-
amplify push
-
Copy
amplifyconfiguration.json
over to theConfiguration
folder
You should now be able to run all of the tests
Images used for integration tests:
- testImageText.jpg sketchbook-comp-4-text-and-image by Ana Curado e Silva is licensed under CC BY-NC-ND 4.0
- testImageCeleb.jpg celebrities and politicians by William Coupon is licensed under CC BY-NC-ND 4.0
- testimageTextAll.jpg amazon-textract-code-samples-files