StoreView Plugin

The Store View plugin presents a store that allows the user to purchase other media from the Apple App Store. For example, your app might display the store view to allow the user to purchase another app, a book, etc. This is all done via a popup, so your users don't need to leave your app.

Platforms:

supports iOS devices running iOS 7 or later. It does not work on the iOS simulator.

Functions:

storeView.init(listener)

listener(function)-- returns the following events

  • Init(Dispatched upon the plugin successfully initialising): event.phase = "init", event.name = "store", and event.type = "storeView"
  • loaded(Dispatched upon the StoreView popup loading successfully. This means that the StoreView is ready to be displayed instantly via storeView.show()):
  • event.phase = "loaded", event.name = "store", and event.type = "storeView"
  • Hidden(Dispatched upon the StoreView popup hiding successfully after previously being displayed. This means that the StoreView is closed and ready to be loaded again via storeView.load()):
  • event.phase = "hidden", event.name = "store", and event.type = "storeView"
  • Failed(Dispatched upon the StoreView popup failing to load. Potential reasons for failure: Lack of internet connectivity, incorrect app id, and/or incorrect tokens):
  • event.phase = "hidden", event.name = "store", and event.type = "storeView"

Example:

storeView.load(appId, [tokens])

appId(string)(required) This is the iTunes app id for your app. You can retrieve your iTunes app id via iTunes connect, or by snipping it from the iTunes store url for your app. For example this is Angry Birds store url https://itunes.apple.com/ie/app/angry-birds/id343200656?mt=8 - The app id is every character after id and before the ? symbol. In this example, the app id is: "343200656".

tokens(table) This is an optional set of tokens used for tracking purposes. In order to get your tokens, you need to join the iTunes App Store Affiliate Program.

Contains the following key values

  • campaign(string) This is your campaign token. This token allows you to track the effectiveness of your Affiliate Program link and your App Analytics campaign. For more information about the Affiliate Program, see the Affiliate Program. For more information about iTunes Connect Analytics, see Viewing App Analytics in iTunes Connect Developer Guide.
  • affiliate(string) This is your affiliate token. You receive an affiliate identifier when you sign up for the Affiliate Program. The affiliate associated with this view controller is paid a commission for any items purchased using the controller.
  • provider(string) This is your provider token. Use your own provider token when cross promoting your own apps. This token lets you track the effectiveness of the cross promotion effort separate from any affiliate campaign that shares the same campaign token. When promoting apps for other developers, use their provider token instead. In this case, the token lets the developer track the effectiveness of your App Analytics campaign for their apps. The key must be used in combination with your advertisingPartner token (see below). For more information, see Viewing App Analytics in the iTunes Connect Developer Guide.
  • event.phase = "hidden", event.name = "store", and event.type = "storeView"
  • advertisingPartner(string) This is your advertisingPartner token. This must be set if using the provider token above.

Example:

storeView.show()

This function is responsible for showing the StoreView popup that was previously loaded via storeView.load().

Example:

Build Settings:

Credits:

this plugin was made and created by Infuse Dreams aka Danny Glover

Helpful Links:

Example

Support

Get Plugin