Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Disable StoreKit testing by default
Browse files Browse the repository at this point in the history
  • Loading branch information
mvanbeusekom committed Apr 7, 2021
1 parent 0f70f40 commit 237d984
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
19 changes: 14 additions & 5 deletions packages/in_app_purchase/in_app_purchase/example/README.md
Expand Up @@ -60,18 +60,27 @@ below.

### iOS

When using Xcode 12 and iOS 14 or higher you can run the example in the simulator without having to
configure an App in App Store Connect. The example app is set up to use StoreKit Testing configured
When using Xcode 12 and iOS 14 or higher you can run the example in the simulator or on a device without
having to configure an App in App Store Connect. The example app is set up to use StoreKit Testing configured
in the `example/ios/Runner/Configuration.storekit` file (as documented in the article [Setting Up StoreKit Testing in Xcode](https://developer.apple.com/documentation/xcode/setting_up_storekit_testing_in_xcode?language=objc)).
To run the application take the following steps (note that it will only work when running from Xcode):

1. Open the example app with Xcode, `File > Open File` `example/ios/Runner.xcworkspace`;

2. Select the device you want to run the example App on;
2. Within Xcode edit the current scheme, `Product > Scheme > Edit Scheme...` (or press `Command + Shift + ,`);

3. Run the application using `Product > Run` (or hit the run button).
3. Enable StoreKit testing:
a. Select the `Run` action;
b. Click `Options` in the action settings;
c. Select the `Configuration.storekit` for the StoreKit Configuration option.

When testing on pre-iOS 14 you will need to take the following steps:
4. Click the `Close` button to close the scheme editor;

5. Select the device you want to run the example App on;

6. Run the application using `Product > Run` (or hit the run button).

When testing on pre-iOS 14 you can't run the example app on a simulator and you will need to configure an app in App Store Connect. You can do so by following the steps below:

1. Follow ["Workflow for configuring in-app
purchases"](https://help.apple.com/app-store-connect/#/devb57be10e7), a
Expand Down
Expand Up @@ -69,9 +69,6 @@
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<StoreKitConfigurationFileReference
identifier = "../Runner/Configuration.storekit">
</StoreKitConfigurationFileReference>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down

0 comments on commit 237d984

Please sign in to comment.