Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 278 lines (185 sloc) 20.646 kb
8cee1869 » Jesus Fernandez
2012-09-28 version bump
1 PlayHaven SDK 1.12.1
f9e35ff5 » Jesus Fernandez
2011-10-07 updates README
2 ====================
f902a343 » Jesus Fernandez
2012-04-23 Consolidating 'Cross Promotion Widget' section into the rest of the A…
3 PlayHaven is a mobile game LTV-maximization platform to help you take control of the business of your games.
0c94df7b » Jesus Fernandez
2011-04-25 initial source release
4
e7eeec8c » Jesus Fernandez
2011-08-18 first stab at documentation update
5 Acquire, retain, re-engage, and monetize your players with the help of PlayHaven's powerful marketing platform. Integrate once and embrace the flexibility of the web as you build, schedule, deploy, and analyze your in-game promotions and monetization in real-time through PlayHaven's easy-to-use, web-based dashboard.
6
f902a343 » Jesus Fernandez
2012-04-23 Consolidating 'Cross Promotion Widget' section into the rest of the A…
7 An API token and secret is required to use this SDK. These tokens uniquely identify your app to PlayHaven and prevent others from making requests to the API on your behalf. To get a token and secret, please visit the [PlayHaven Dashboard](https://dashboard.playhaven.com).
8
9 If you have any questions, visit the [Help Center](http://help.playhaven.com) or contact us at [support@playhaven.com](mailto:support@playhaven.com). We also recommend reviewing our [Optimization Guides](http://help.playhaven.com/customer/portal/topics/113947-optimization-guides/articles) to learn the best practices and get the most out of your PlayHaven integration.
0c94df7b » Jesus Fernandez
2011-04-25 initial source release
10
8cee1869 » Jesus Fernandez
2012-09-28 version bump
11 What's new in 1.12.1
a46e31b7 » Jesus Fernandez
2012-03-20 updates to documentation, explicitly sets value of PH_USE_STOREKIT fo…
12 ====================
8cee1869 » Jesus Fernandez
2012-09-28 version bump
13 * iOS 6 compatibility improvements
8eaea3d1 » Jesus Fernandez
2012-10-01 updates README to add notes about testing in-app purchase flows
14 * In-app iTunes purchases support for content units, see (See note about this feature in the "Links to the App Store" section below.)
8cee1869 » Jesus Fernandez
2012-09-28 version bump
15 * fixes for crashes affecting devices running iOS versions below 5.0
16
17 1.12.0
18 ======
e05a4c19 » Jesus Fernandez
2012-08-28 version bump
19 * The SDK will now automatically record the number of game sessions and the length of game sessions. This depends on a proper open request implementation. See "Recording game opens" in the "API Reference"
20
21 1.11.0
22 ======
056325de » Jesus Fernandez
2012-07-13 updating version and README for upcoming release
23 * App Store launches now properly preserve affiliate link tokens
826ea0d4 » Jesus Fernandez
2012-07-09 Removes THUMB instructions from static library builds. This only affe…
24 * A change in build settings to remove THUMB instructions from static library builds. This change only affects publishers using this SDK as a static library from the Unity plugin.
25
26 1.10.4
27 ======
8d717bac » Jesus Fernandez
2012-05-14 IAP tracking requests now send accurate price and price_locale inform…
28 * IAP tracking requests now report accurate price information
29
30 1.10.3
31 ======
51e6442e » Jesus Fernandez
2012-05-07 bumps version to 1.10.3
32 * DNS resolution for API servers happens in a background thread
33
34 1.10.2
35 ======
86d3cd77 » Jesus Fernandez
2012-04-23 actually updates the readme
36 * Bugfixes for issues with canceling requests and a rare crash involving precaching.
37
38 1.10.1
39 ======
b211b851 » Jesus Fernandez
2012-04-10 Sets up new opt-out UDID tracking and safe mode unity sdks. Note: all…
40 * Ability to opt out of user data collection at runtime.
41
42 1.10.0
43 ======
b99d4537 » Jesus Fernandez
2012-03-12 updates README to include information on IAP/VGP integration
44 * In App Purchase tracking and Virtual Good Promotion support. See "Triggering in-app purchases" and "Tracking in-app purchases" in the API Reference section for information on how to integrate this into your app.
8f44f3eb » Jesus Fernandez
2012-03-20 corrects some verbiage in README
45 * Adds documentation for disabling StoreKit-based features in the SDK.
a46e31b7 » Jesus Fernandez
2012-03-20 updates to documentation, explicitly sets value of PH_USE_STOREKIT fo…
46
0c94df7b » Jesus Fernandez
2011-04-25 initial source release
47 Integration
48 -----------
d237cd1f » rrhoover
2011-08-19 Added link to the Unity SDK for those that need it.
49 If you are using Unity for your game, please integrate the Unity SDK located here: https://github.com/playhaven/sdk-unity/
50
409e28e4 » Jesus Fernandez
2011-06-23 Updates README with XCode4-compatible instructions
51 1. Add the following from the sdk-ios directory that you downloaded or cloned from github to your project:
322ec13d » Jesus Fernandez
2012-01-05 updating version in README and PHConstants
52 * src directory
71852ec7 » Jesus Fernandez
2012-01-23 updates README with Cache directory
53 * Cache directory
f8a34320 » Jesus Fernandez
2012-04-23 remove stale 'NEW' flags
54 1. (optional) Unless you are already using SBJSON, also add the following to your project:
a46e31b7 » Jesus Fernandez
2012-03-20 updates to documentation, explicitly sets value of PH_USE_STOREKIT fo…
55 * JSON directory
dbb97df5 » Jesus Fernandez
2012-03-21 adds OpenUDID library
56 If your project is already using SBJSON, then you may continue to use those classes or exchange them for the classes included with this SDK. Multiple copies of these classes in the same project may cause errors at compile time.
f8a34320 » Jesus Fernandez
2012-04-23 remove stale 'NEW' flags
57 1. (optional) Unless you are already using OpenUDID, also add the following to your project:
dbb97df5 » Jesus Fernandez
2012-03-21 adds OpenUDID library
58 * OpenUDID directory
59 If your project is already using OpenUDID, then you may continue to use those classes or exchange them for the classes included with this SDK. Multiple copies of these classes in the same project may cause errors at compile time.
409e28e4 » Jesus Fernandez
2011-06-23 Updates README with XCode4-compatible instructions
60 1. Ensure the following frameworks are included with your project, add any missing frameworks in the Build Phases tab for your application's target:
61 * UIKit.framework
62 * Foundation.framework
63 * CoreGraphics.framework
b72cb8ac » Jesus Fernandez
2011-10-24 resolves conflicts, updates README and PHConstants.h
64 * SystemConfiguration.framework
ab5cac90 » Jesus Fernandez
2012-01-13 fixes analyzer issues with hostname lookup
65 * CFNetwork.framework
510c61fc » Jesus Fernandez
2012-09-17 updates to use AdSupport.framework
66 * AdSupport.framework
a46e31b7 » Jesus Fernandez
2012-03-20 updates to documentation, explicitly sets value of PH_USE_STOREKIT fo…
67 * StoreKit.framework (**see next bullet**)
f8a34320 » Jesus Fernandez
2012-04-23 remove stale 'NEW' flags
68 1. (optional) If you are not using StoreKit.framework in your project, you may disable IAP Tracking and VGP by setting the following preproccessor macro in your project or target's Build Settings.
a46e31b7 » Jesus Fernandez
2012-03-20 updates to documentation, explicitly sets value of PH_USE_STOREKIT fo…
69 PH_USE_STOREKIT=0
70 This will make it possible to build the SDK without StoreKit linked to your project.
f7c0e83c » Jesus Fernandez
2012-09-18 updates README with compatibility instructions
71 1. (optional) If your project needs to be compatible with iOS 5.1 - iOS 4.0, make sure set "AdSupport.framework" to "Optional" in the Build Phases' Link Binary With Libraries section for your application's target.
0c94df7b » Jesus Fernandez
2011-04-25 initial source release
72 1. Include the PlayHavenSDK headers in your code wherever you will be using PlayHaven request classes.
73
e7eeec8c » Jesus Fernandez
2011-08-18 first stab at documentation update
74 \#import "PlayHavenSDK.h"
db5cc15c » Jesus Fernandez
2012-08-30 Updates README with requested changes:
75 1. Send a game open each time a game session starts: when your game is first launched as well as each time it is foregrounded. See the "Recording game opens" section of the API Reference
f902a343 » Jesus Fernandez
2012-04-23 Consolidating 'Cross Promotion Widget' section into the rest of the A…
76 1. For each of your placements, you will need to send a content request and implement content request delegate methods. See the "Requesting content for your placements" section of the API Reference
25675445 » Jesus Fernandez
2012-04-23 improved Notification View enticement
77 1. If you are planning on using a More Games Widget in your game, we recommend also implementing a notification view for any placements that you plan on using More Games Widgets with to improve chart opens by up to 300%! See the "Add a Notification View (Notifier Badge)" of the API Reference
0c94df7b » Jesus Fernandez
2011-04-25 initial source release
78
f902a343 » Jesus Fernandez
2012-04-23 Consolidating 'Cross Promotion Widget' section into the rest of the A…
79 API Reference
80 -------------
81 ### Device tracking
4f4ed48e » Jesus Fernandez
2012-03-29 updates README for new optional OpenUDID collection
82 This release introduces the use of OpenUDID in addition to our own proprietary identification system for the purposes of authenticating API requests and tracking conversions across applications. OpenUDID is a collaborative open-source effort to create a tracking token that can be shared across the device as well as allow for user-initiared opt out of tracking. There is no additional implementation to take advantage of these changes but it does introduce the following pre-processor macros you may choose to use.
83
f902a343 » Jesus Fernandez
2012-04-23 Consolidating 'Cross Promotion Widget' section into the rest of the A…
84 NOTE: The "test device" feature of the PlayHaven Dashboard will only work with games that send either OpenUDID or UDIDs.
85
4f4ed48e » Jesus Fernandez
2012-03-29 updates README for new optional OpenUDID collection
86 By default PH_USE_OPENUDID=1 is set, which will send the OpenUDID value for the current device with the open request. If you would like to opt out of OpenUDID collection, set PH_USE_OPENUDID=0 instead. If you opt out of OpenUDID collection, you may also remove the OpenUDID classes from your project.
6d9f3bfa » Jesus Fernandez
2012-03-23 adds targets and schemes for additional unity builds
87
f902a343 » Jesus Fernandez
2012-04-23 Consolidating 'Cross Promotion Widget' section into the rest of the A…
88 By default PH_USE_MAC_ADDRESS=1 is set, which will send the device's wifi MAC address alongside these new tokens.
b211b851 » Jesus Fernandez
2012-04-10 Sets up new opt-out UDID tracking and safe mode unity sdks. Note: all…
89
f902a343 » Jesus Fernandez
2012-04-23 Consolidating 'Cross Promotion Widget' section into the rest of the A…
90 #### User Opt-Out
b211b851 » Jesus Fernandez
2012-04-10 Sets up new opt-out UDID tracking and safe mode unity sdks. Note: all…
91 To comply with Apple policies for the use of device information, we've provided a mechanism for your app to opt-out of collection of UDID and MAC addresses. To set the opt out status for your app, use the following method:
92
93 [PHAPIRequest setOptOutStatus:(BOOL)yesOrNo];
94
95 You are responsible for providing an appropriate UI for user opt-out. User data is sent by default.
6d9f3bfa » Jesus Fernandez
2012-03-23 adds targets and schemes for additional unity builds
96
f902a343 » Jesus Fernandez
2012-04-23 Consolidating 'Cross Promotion Widget' section into the rest of the A…
97 ### Recording game opens
98 Your app must report each time your application comes to the foreground. PlayHaven uses these events to measure the click-through rate of your content units to help optimize the performance of your implementation. This request is asynchronous and may run in the background while your game is loading.
6d9f3bfa » Jesus Fernandez
2012-03-23 adds targets and schemes for additional unity builds
99
db5cc15c » Jesus Fernandez
2012-08-30 Updates README with requested changes:
100 Consider putting an open request in _both_ of these application delegate methods:
101 * -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions This will record a game open when the application is first launched
102 * -(void)applicationWillEnterForeground:(UIApplication *)application This will record a game open each time the app is foregrounded after being launched
103
104 An open request may be sent using the following code:
e7eeec8c » Jesus Fernandez
2011-08-18 first stab at documentation update
105
f902a343 » Jesus Fernandez
2012-04-23 Consolidating 'Cross Promotion Widget' section into the rest of the A…
106 [[PHPublisherOpenRequest requestForApp:(NSString *)token secret:(NSString *)secret] send]
e7eeec8c » Jesus Fernandez
2011-08-18 first stab at documentation update
107
f902a343 » Jesus Fernandez
2012-04-23 Consolidating 'Cross Promotion Widget' section into the rest of the A…
108 **NEW**: If you are using an internal identifier to track individual devices in this game, you may use the customUDID
109 parameter to pass this identifier along to PlayHaven with the open request.
110 Asynchronously reports a game open to PlayHaven.
e7eeec8c » Jesus Fernandez
2011-08-18 first stab at documentation update
111
df29e054 » Jesus Fernandez
2012-03-22 tabs to spaces in README
112 PHPublisherOpenRequest *request = [PHPublisherOpenRequest requestForApp:MYTOKEN secret:MYSECRET];
55f578db » Jesus Fernandez
2012-03-22 adds mac address and custom udid token parameters to the open request
113 request.customUDID = @"CUSTOM_UDID" //optional, see below.
114 [request send];
e7eeec8c » Jesus Fernandez
2011-08-18 first stab at documentation update
115
20d59228 » Jesus Fernandez
2012-03-12 moves precaching documentation to a more appropriate section
116 #### Precaching content templates
117 PlayHaven will automatically download and store a number of content templates after a successful PHPublisherOpenRequest. This happens automatically in the background after each open request, so there's no integration required to take advantage of this feature.
118
0c94df7b » Jesus Fernandez
2011-04-25 initial source release
119 ### Requesting content for your placements
3f3409aa » rrhoover
2011-08-19 Updated copy
120 You may request content for your app using your API token, secret, as well as a placement tag to identify the placement you are requesting content for. Implement PHPublisherContentRequestDelegate methods to receive callbacks from this request. Refer to the section below as well as *example/PublisherContentViewController.m* for a sample implementation.
0c94df7b » Jesus Fernandez
2011-04-25 initial source release
121
f1dabcbd » Jesus Fernandez
2011-07-12 makes blockquotes actually blockquotes
122 PHPublisherContentRequest *request = [PHPublisherContentRequest requestForApp:(NSString *)token secret:(NSString *)secret placement:(NSString *)placement delegate:(id)delegate];
e7eeec8c » Jesus Fernandez
2011-08-18 first stab at documentation update
123 request.showsOverlayImmediately = YES; //optional, see below.
f1dabcbd » Jesus Fernandez
2011-07-12 makes blockquotes actually blockquotes
124 [request send];
0c94df7b » Jesus Fernandez
2011-04-25 initial source release
125
3643ec4c » Jesus Fernandez
2011-08-04 updates README and sets PH_BASE_URL to api2.playhaven.com
126 *NOTE:* You may set placement_ids through the PlayHaven Developer Dashboard.
409e28e4 » Jesus Fernandez
2011-06-23 Updates README with XCode4-compatible instructions
127
3f3409aa » rrhoover
2011-08-19 Updated copy
128 Optionally, you may choose to show the loading overlay immediately by setting the request object's *showsOverlayImmediately* property to YES. This is useful if you would like keep users from interacting with your UI while the content is loading.
698f3d0f » Jesus Fernandez
2011-07-12 Does two things, allows for the developer to choose to show the loadi…
129
b99d4537 » Jesus Fernandez
2012-03-12 updates README to include information on IAP/VGP integration
130 #### Preloading requests (optional)
3ba21471 » Jesus Fernandez
2011-11-18 Updates documentation and bumps version constant
131 To make content requests more responsive, you may choose to preload a content unit for a given placement. This will start a request for a content unit without displaying it, preserving the content unit until you call -(void)send on a content request for the same placement in your app.
132
133 [[PHPublisherContentRequest requestForApp:(NSString *)token secret:(NSString *)secret placement:(NSString *)placement delegate:(id)delegate] preload];
134
135 You may set a delegate for your preload if you would like to be informed when a content request is ready to display. See the sections below for more details.
136
137 *NOTE:* Preloading only affects the next content request for a given placement. If you are showing the same placement multiple times in your app, you will need to make additional preload requests after displaying that placement's content unit for the first time.
138
0c94df7b » Jesus Fernandez
2011-04-25 initial source release
139 #### Starting a content request
140 The request is about to attempt to get content from the PlayHaven API.
141
006baffd » Jesus Fernandez
2011-07-12 more README fixes
142 -(void)requestWillGetContent:(PHPublisherContentRequest *)request;
0c94df7b » Jesus Fernandez
2011-04-25 initial source release
143
3ba21471 » Jesus Fernandez
2011-11-18 Updates documentation and bumps version constant
144 #### Receiving content
145 The request received some valid content from the PlayHaven API. This will be the last delegate method a preloading request will receive, unless there is an error.
146
147 -(void)requestDidGetContent:(PHPublisherContentRequest *)request;
148
149
0c94df7b » Jesus Fernandez
2011-04-25 initial source release
150 #### Preparing to show a content view
151 If there is content for this placement, it will be loaded at this point. An overlay view will appear over your app and a spinner will indicate that the content is loading. Depending on the transition type for your content your view may or may not be visible at this time. If you haven't before, you should mute any sounds and pause any animations in your app.
152
006baffd » Jesus Fernandez
2011-07-12 more README fixes
153 -(void)request:(PHPublisherContentRequest *)request contentWillDisplay:(PHContent *)content;
0c94df7b » Jesus Fernandez
2011-04-25 initial source release
154
155 #### Content view finished loading
156 The content has been successfully loaded and the user is now interacting with the downloaded content view.
157
006baffd » Jesus Fernandez
2011-07-12 more README fixes
158 -(void)request:(PHPublisherContentRequest *)request contentDidDisplay:(PHContent *)content;
0c94df7b » Jesus Fernandez
2011-04-25 initial source release
159
b99d4537 » Jesus Fernandez
2012-03-12 updates README to include information on IAP/VGP integration
160 #### Content view dismissing
0c94df7b » Jesus Fernandez
2011-04-25 initial source release
161 The content has successfully dismissed and control is being returned to your app. This can happen as a result of the user clicking on the close button or clicking on a link that will open outside of the app. You may restore sounds and animations at this point.
162
6004ccb5 » Jesus Fernandez
2011-12-06 Cleaning up new delegate methods for release, updated documentation w…
163 -(void)request:(PHPublisherContentRequest *)request contentDidDismissWithType:(PHPublisherContentDismissType *)type;
164
165 Type may be one of the following constants:
6eb7a2e2 » Jesus Fernandez
2011-09-16 [UPDATE] Documentation for new content request behavior
166
6004ccb5 » Jesus Fernandez
2011-12-06 Cleaning up new delegate methods for release, updated documentation w…
167 1. PHPublisherContentUnitTriggeredDismiss: a user or a content unit dismissed the content request
168 1. PHPublisherNativeCloseButtonTriggeredDismiss: the user used the native close button to dismiss the view
169 1. PHPublisherApplicationBackgroundTriggeredDismiss: iOS 4.0+ only, the content unit was dismissed because the app was sent to the background
170 1. PHPublisherNoContentTriggeredDismiss: the content unit was dismissed because there was no content assigned to this placement id
0c94df7b » Jesus Fernandez
2011-04-25 initial source release
171
172 #### Content request failing
45a65874 » Jesus Fernandez
2011-09-29 Deprecates -request:contentDidFailWithError delegate method, all erro…
173 If for any reason the content request does not successfully return some content to display or fails to load after the overlay view has appears, the request will stop any any visible overlays will be removed.
0c94df7b » Jesus Fernandez
2011-04-25 initial source release
174
006baffd » Jesus Fernandez
2011-07-12 more README fixes
175 -(void)request:(PHPublisherContentRequest *)request didFailWithError:(NSError *)error;
0c94df7b » Jesus Fernandez
2011-04-25 initial source release
176
45a65874 » Jesus Fernandez
2011-09-29 Deprecates -request:contentDidFailWithError delegate method, all erro…
177 NOTE: -(void)request:contentDidFailWithError: is now deprecared in favor of request:didFailWithError: please update implementations accordingly.
448df026 » Jesus Fernandez
2011-05-03 adds documentation for close button replacement
178
b99d4537 » Jesus Fernandez
2012-03-12 updates README to include information on IAP/VGP integration
179 ### Cancelling requests
1538be04 » Jesus Fernandez
2011-11-09 [ADDED] Cancel method documentation to README
180 You may now cancel any API request at any time using the -(void)cancel method. This will also cancel any open network connections and clean up any views in the case of content requests. Canceled requests will not send any more messages to their delegates.
181
182 Additionally you may cancel all open API requests for a given delegate. This can be useful if you are not keeping references to API request instances you may have created. As with the -(void)cancel method, canceled requests will not send any more messages to delegates. To cancel all requests:
183
184 [PHAPIRequest cancelAllRequestsWithDelegate:(id)delegate];
185
448df026 » Jesus Fernandez
2011-05-03 adds documentation for close button replacement
186 ### Customizing content display
187 #### Replace close button graphics
188 Use the following request method to replace the close button image with something that more closely matches your app. Images will be scaled to a maximum size of 40x40.
189
006baffd » Jesus Fernandez
2011-07-12 more README fixes
190 -(UIImage *)request:(PHPublisherContentRequest *)request closeButtonImageForControlState:(UIControlState)state content:(PHContent *)content;
c68faee5 » Jesus Fernandez
2011-06-22 Adds PHNotificationView as well as updates documentation to show how …
191
2c43011c » Jesus Fernandez
2011-07-11 documentation and fixes
192 ### Unlocking rewards with the SDK
3f3409aa » rrhoover
2011-08-19 Updated copy
193 PlayHaven allows you to reward users with virtual currency, in-game items, or any other content within your game. If you have configured unlockable rewards for your content units, you will receive unlock events through a delegate method. It is important to handle these unlock events in every placement that has rewards configured.
2c43011c » Jesus Fernandez
2011-07-11 documentation and fixes
194
195 > \-(void)request:(PHPublisherContentRequest *)request unlockedReward:(PHReward *)reward;
196
197 The PHReward object passed through this method has the following helpful properties:
198
199 * __name__: the name of your reward as configured on the dashboard
200 * __quantity__: if there is a quantity associated with the reward, it will be an integer value here
9afe9a2e » Jesus Fernandez
2011-07-29 [DOCS] Updates documentation to indicate that additional placement id…
201 * __receipt__: a unique identifier that is used to detect duplicate reward unlocks, your app should ensure that each receipt is only unlocked once
2c43011c » Jesus Fernandez
2011-07-11 documentation and fixes
202
f902a343 » Jesus Fernandez
2012-04-23 Consolidating 'Cross Promotion Widget' section into the rest of the A…
203 ### Triggering in-app purchases
b99d4537 » Jesus Fernandez
2012-03-12 updates README to include information on IAP/VGP integration
204 Using the Virtual Goods Promotion content unit, PlayHaven can now be used to trigger in app purchase requests in your app. You will need to support the new
205
206 > \-(void)request:(PHPublisherContentRequest *)request makePurchase:(PHPurchase *)purchase;
207
208 The PHPurchase object passed through this method has the following properties:
209
210 * __productIdentifier__: the product identifier for your purchase, used for making a
211 * __quantity__: if there is a quantity associated with this purchase, it will be an integer value here
212 * __receipt__: a unique identifier
213
f902a343 » Jesus Fernandez
2012-04-23 Consolidating 'Cross Promotion Widget' section into the rest of the A…
214 **Note:** You must retain this purchase object throughout your IAP process. You are responsible for making a SKProduct request before initiating the purchase of this item so as to comply with IAP requirements. Once the item has been purchased you will need to inform the content unit of that purchase using the following:
b99d4537 » Jesus Fernandez
2012-03-12 updates README to include information on IAP/VGP integration
215
216 [purchase reportResolution:(PHPurchaseResolution)resolution];
217
218 **This step is important!** Without a call to reportResolution: the content unit will stall, and your users may not be able to come back to your game. Resolution **must** be one of the following values:
219
220 * PHPurchaseResolutionBuy - the item was purchased and delivered successfully
221 * PHPurchaseResolutionCancel - the user was prompted for an item, but the user elected to not buy it
222 * PHPurchaseResolutionError - an error prevented the purchase or delivery of the item
223
8eaea3d1 » Jesus Fernandez
2012-10-01 updates README to add notes about testing in-app purchase flows
224 ### Links to the App Store
225 As of 1.12.1, links that open in the App Store will instead launch Apple's in-app iTunes view controller as a modal popup. This view controller is independent of any content request so you will not receive delegate events from it.
226
227 NOTE: As in-app iTunes purchases follow the same paths as other in-app purchases, you will not be able to test these in-app purchases in non-App Store signed builds.
228
229
f902a343 » Jesus Fernandez
2012-04-23 Consolidating 'Cross Promotion Widget' section into the rest of the A…
230 ### Tracking in-app purchases
b99d4537 » Jesus Fernandez
2012-03-12 updates README to include information on IAP/VGP integration
231 By providing data on your In App Purchases to PlayHaven, you can track your users' overall lifetime value as well as track conversions from your Virtual Goods Promotion content units. This is done using the PHPublisherIAPTrackingRequest class. To report successful purchases use the following either in your SKPaymentQueueObserver instance or after a purchase has been successfully delivered.
232
233 PHPublisherIAPTrackingRequest *request = [PHPublisherIAPTrackingRequest requestForApp:TOKEN secret:SECRET product:PRODUCT_IDENTIFIER quantity:QUANTITY resolution:PHPurchaseResolutionBuy];
234 [request send];
235
236 Purchases that are canceled or encounter errors should be reported using the following:
237
238 PHPublisherIAPTrackingRequest *request = [PHPublisherIAPTrackingRequest requestForApp:TOKEN secret:SECRET product:PRODUCT_IDENTIFIER quantity:QUANTITY error:ERROR_OBJECT];
239 [request send];
240
241 If the error comes from an SKPaymentTransaction instance's error property, the SDK will automatically select the correct resolution (buy/cancel) based on the NSError object passed in.
242
f902a343 » Jesus Fernandez
2012-04-23 Consolidating 'Cross Promotion Widget' section into the rest of the A…
243 ### Add a Notification View (Notifier Badge)
244 Adding a notification view to your "More Games" button will greatly increase the number of More Games Widget opens for your game, by up to 300%. To create a notification view:
245
246 PHNotificationView *notificationView = [[PHNotificationView alloc] initWithApp:MYTOKEN secret:MYSECRET placement:@"more_games"];
247 [myView addSubview:notificationView];
248 [notificationView release];
249
250 Add the notification view as a subview somewhere in your view controller's view. Notification views will remain anchored to the center of the position they are placed in the view, even as the size of the badge changes. Adjust the position of the badge by setting the notificationView's center property.
251
252 notificationView.center = CGPointMake(10,10);
c68faee5 » Jesus Fernandez
2011-06-22 Adds PHNotificationView as well as updates documentation to show how …
253
f902a343 » Jesus Fernandez
2012-04-23 Consolidating 'Cross Promotion Widget' section into the rest of the A…
254 The notification view will query and update itself when its -(void)refresh method is called.
c68faee5 » Jesus Fernandez
2011-06-22 Adds PHNotificationView as well as updates documentation to show how …
255
86d3cd77 » Jesus Fernandez
2012-04-23 actually updates the readme
256 [notificationView refresh];
409e28e4 » Jesus Fernandez
2011-06-23 Updates README with XCode4-compatible instructions
257
f902a343 » Jesus Fernandez
2012-04-23 Consolidating 'Cross Promotion Widget' section into the rest of the A…
258 We recommend refreshing the notification view each time it will appear in your UI. See examples/PublisherContentViewController.m for an example.
c68faee5 » Jesus Fernandez
2011-06-22 Adds PHNotificationView as well as updates documentation to show how …
259
260 You will also need to clear any notification view instances when you successfully launch a content unit. You may do this using the -(void)clear method on any notification views you wish to clear.
261
a25687c8 » Jesus Fernandez
2011-08-19 updated readme
262 #### Testing PHNotificationView
9cbe3a0a » rrhoover
2011-07-11 Edited README.markdown via GitHub
263 Most of the time the API will return an empty response, which means a notification view will not be shown. You can see a sample notification by using -(void)test; wherever you would use -(void)refresh. It has been marked as deprecated to remind you to switch all instances of -(void)test in your code to -(void)refresh;
c68faee5 » Jesus Fernandez
2011-06-22 Adds PHNotificationView as well as updates documentation to show how …
264
a25687c8 » Jesus Fernandez
2011-08-19 updated readme
265 #### Customizing notification rendering with PHNotificationRenderer
c68faee5 » Jesus Fernandez
2011-06-22 Adds PHNotificationView as well as updates documentation to show how …
266 PHNotificationRenderer is a base class that draws a notification view for a given notification data. The base class implements a blank notification view used for unknown notification types. PHNotificationBadgeRenderer renders a iOS default-style notification badge with a given "value" string. You may customize existing notification renderers and register new ones at runtime using the following method on PHNotificationView
267
006baffd » Jesus Fernandez
2011-07-12 more README fixes
268 +(void)setRendererClass:(Class)class forType:(NSString *)type;
c68faee5 » Jesus Fernandez
2011-06-22 Adds PHNotificationView as well as updates documentation to show how …
269
270 Your PHNotificationRenderer subclass needs to implement the following methods to draw and size your notification view appropriately:
271
006baffd » Jesus Fernandez
2011-07-12 more README fixes
272 -(void)drawNotification:(NSDictionary *)notificationData inRect:(CGRect)rect;
c68faee5 » Jesus Fernandez
2011-06-22 Adds PHNotificationView as well as updates documentation to show how …
273
274 This method will be called inside of the PHNotificationView instance -(void)drawRect: method whenever the view needs to be drawn. You will use specific keys inside of notificationData to draw your badge in the view. If you need access to the graphics context you may use the UIGraphicsGetCurrentContext() function.
275
006baffd » Jesus Fernandez
2011-07-12 more README fixes
276 -(CGSize)sizeForNotification:(NSDictionary *)notificationData;
c68faee5 » Jesus Fernandez
2011-06-22 Adds PHNotificationView as well as updates documentation to show how …
277
20d59228 » Jesus Fernandez
2012-03-12 moves precaching documentation to a more appropriate section
278 This method will be called to calculate an appropriate frame for the notification badge each time the notification data changes. Using specific keys inside of notificationData, you will need to calculate an appropriate size.
Something went wrong with that request. Please try again.