Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5be7c0a
Intial add of country code, no tests
reidbaker Jan 19, 2024
5d6f1cc
Add tests for getBillingConfig
reidbaker Jan 19, 2024
e19b644
Formating
reidbaker Jan 19, 2024
3f5a4e3
Manipulate data in translator class instead of impl
reidbaker Jan 24, 2024
337a7d7
Add dart side code to call getBillingConfig and conversion tests
reidbaker Jan 24, 2024
99af529
Correct null test to include empty country code, fix non null billing…
reidbaker Jan 25, 2024
fdc42cd
move buildBillingConfigMap to the class that uses it
reidbaker Jan 25, 2024
88ccd2a
Merge branch 'main' into i141627-country-code-api
reidbaker Jan 25, 2024
036e2f2
Write documentation and remove todos, remove unused import
reidbaker Jan 25, 2024
91950f3
Analyzer warnings
reidbaker Jan 25, 2024
7d4af42
Merge branch 'main' into i141627-country-code-api
reidbaker Jan 25, 2024
5cd0acb
java format warnings
reidbaker Jan 25, 2024
894473c
Version code change
reidbaker Jan 25, 2024
e33f22c
Restore in app purchase instructions in example readme from bad PR ht…
reidbaker Jan 26, 2024
1dc004b
Update packages/in_app_purchase/in_app_purchase_android/android/src/m…
reidbaker Jan 26, 2024
319ffe7
Add example app code that shows country code in UI rename addition ap…
reidbaker Jan 26, 2024
28e95ad
Remove "Demonstrates how to use" verbiage since that is confusing whi…
reidbaker Jan 29, 2024
3c263a8
Merge branch 'main' into i141627-country-code-api
reidbaker Jan 29, 2024
4cd74ec
Merge branch 'main' into i141627-country-code-api
reidbaker Jan 30, 2024
d7934fc
Remove changes to ios readme
reidbaker Jan 30, 2024
5252d6e
Readme link to signing docs and changelog verbiage update
reidbaker Jan 30, 2024
5e363fc
Restore getCountryCode tests
reidbaker Jan 30, 2024
62477c4
Use run with client since BillingConfigWrapper uses a billing result
reidbaker Jan 30, 2024
a514dc1
Merge branch 'main' into i141627-country-code-api
reidbaker Jan 30, 2024
f047aac
Use run with client since BillingConfigWrapper uses a billing result
reidbaker Jan 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove changes to ios readme
  • Loading branch information
reidbaker authored Jan 30, 2024
commit d7934fc8a6f89ad9af29c36507d10dde5805d73c
Original file line number Diff line number Diff line change
Expand Up @@ -7,75 +7,3 @@ package.

Unless you are making changes to this implementation package, this example is
very unlikely to be relevant.

# In App Purchase iOS Example

### Preparation

There's a significant amount of setup required for testing in app purchases
successfully, including registering new app IDs and store entries to use for
testing in App Store Connect. The App Store requires developers to configure
an app with in-app items for purchase to call their in-app-purchase APIs.
The App Store has extensive documentation on how to do this, and we've also
included a high level guide below.

* [In-App Purchase (App Store)](https://developer.apple.com/in-app-purchase/)

### iOS

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. Within Xcode edit the current scheme, `Product > Scheme > Edit Scheme...` (or press `Command + Shift + ,`);

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.

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
detailed guide on all the steps needed to enable IAPs for an app. Complete
steps 1 ("Sign a Paid Applications Agreement") and 2 ("Configure in-app
purchases").

For step #2, "Configure in-app purchases in App Store Connect," you'll want
to create the following products:

- A consumable with product ID `consumable`
- An upgrade with product ID `upgrade`
- An auto-renewing subscription with product ID `subscription_silver`
- An non-renewing subscription with product ID `subscription_gold`

2. In XCode, `File > Open File` `example/ios/Runner.xcworkspace`. Update the
Bundle ID to match the Bundle ID of the app created in step #1.

3. [Create a Sandbox tester
account](https://help.apple.com/app-store-connect/#/dev8b997bee1) to test the
in-app purchases with.

4. Use `flutter run` to install the app and test it. Note that you need to test
it on a real device instead of a simulator. Next click on one of the products
in the example App, this enables the "SANDBOX ACCOUNT" section in the iOS
settings. You will now be asked to sign in with your sandbox test account to
complete the purchase (no worries you won't be charged). If for some reason
you aren't asked to sign-in or the wrong user is listed, go into the iOS
settings ("Settings" -> "App Store" -> "SANDBOX ACCOUNT") and update your
sandbox account from there. This procedure is explained in great detail in
the [Testing In-App Purchases with Sandbox](https://developer.apple.com/documentation/storekit/in-app_purchase/testing_in-app_purchases_with_sandbox?language=objc) article.


**Important:** signing into any production service (including iTunes!) with the
sandbox test account will permanently invalidate it.