https://github.com/adjust/aeproductcontroller
Small wrapper for SKStoreProductViewController that handles tracking links.
https://github.com/adjust/aeproductcontroller
Last synced: about 1 year ago
JSON representation
Small wrapper for SKStoreProductViewController that handles tracking links.
- Host: GitHub
- URL: https://github.com/adjust/aeproductcontroller
- Owner: adjust
- Archived: true
- Created: 2012-11-16T14:42:18.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-11-07T11:00:51.000Z (over 12 years ago)
- Last Synced: 2025-03-22T07:51:26.597Z (about 1 year ago)
- Language: Objective-C
- Homepage:
- Size: 113 KB
- Stars: 33
- Watchers: 82
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
AEProductController
===================
Small wrapper for `SKStoreProductViewController` that handles tracking links.
## Why?
Apple's `SKStoreProductViewController` doesn't allow the use of tracking links. This wrapper offers the convenient user experience of the new In-App App Store view while opening your tracking link in the background including all redirects.
## How?
Download or clone this repo and add the `AEProductController` subdirectory into your Xcode project by dragging it into the Project Navigator.
Open the source file of your view controller that should present the `SKStoreProductViewController` and add the following line at the top of the file:
#import "AEProductController.h"
In the private interface of your class add the following property:
@property (nonatomic) AEProductController *productController;
In the method that should trigger the presentation of the `SKStoreProductViewController` add the following lines:
self.productController = [AEProductController controllerWithProductId:@"" callbackUrl:@""];
[self.productController showInViewController:self];
Replace the placeholders `` and `` with your appId and your affiliate link. This appId is part of the iTunes URL: If this was your app `https://itunes.apple.com/us/app/spray-can/id315215396?mt=8`, then your appId would be `315215396`.
This presents the `SKStoreProductViewController` and calls the affiliate link including all redirects in the background.