Configure the StoreClient
masterTo use the library, you must initialize a StoreConfig and pass it to appstore.NewStoreClient.
Required configuration fields in StoreConfig:
KeyContent: The byte slice of your private key (generated from App Store Connect).KeyID: Your API Key ID.BundleID: Your app's bundle identifier.Issuer: Your API Key Issuer ID.Sandbox: A boolean to toggle between the production and sandbox environments.
import(
"github.com/richzw/appstore"
)
c := &appstore.StoreConfig{
KeyContent: []byte(ACCOUNTPRIVATEKEY),
KeyID: "FAKEKEYID",
BundleID: "fake.bundle.id",
Issuer: "xxxxx-xx-xx-xx-xxxxxxxxxx",
Sandbox: false,
}
a := appstore.NewStoreClient(c)