|
1 | 1 | /*
|
2 |
| - * Copyright (C) 2012 Soomla Inc. |
3 |
| - * |
4 |
| - * Licensed under the Apache License, Version 2.0 (the "License"); |
5 |
| - * you may not use this file except in compliance with the License. |
6 |
| - * You may obtain a copy of the License at |
7 |
| - * |
8 |
| - * http://www.apache.org/licenses/LICENSE-2.0 |
9 |
| - * |
10 |
| - * Unless required by applicable law or agreed to in writing, software |
11 |
| - * distributed under the License is distributed on an "AS IS" BASIS, |
12 |
| - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 |
| - * See the License for the specific language governing permissions and |
14 |
| - * limitations under the License. |
| 2 | + Copyright (C) 2012-2014 Soomla Inc. |
| 3 | + |
| 4 | + Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + you may not use this file except in compliance with the License. |
| 6 | + You may obtain a copy of the License at |
| 7 | + |
| 8 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + |
| 10 | + Unless required by applicable law or agreed to in writing, software |
| 11 | + distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + See the License for the specific language governing permissions and |
| 14 | + limitations under the License. |
15 | 15 | */
|
16 | 16 |
|
17 | 17 |
|
18 | 18 | /**
|
19 |
| - * This protocol represents a single game's metadata. |
20 |
| - * Use this protocol to create your assets class that will be transferred to StoreInfo |
21 |
| - * upon initialization. |
| 19 | + This protocol represents a single game's metadata. |
| 20 | + Use this protocol to create your assets class that will be transferred to |
| 21 | + StoreInfo upon initialization. |
22 | 22 | */
|
23 | 23 | @protocol IStoreAssets <NSObject>
|
24 | 24 |
|
25 | 25 | /**
|
26 |
| - * Retrieves the current version of your IStoreAssets. |
27 |
| - * |
28 |
| - * This value will determine if the saved data in the database will be deleted or not. |
29 |
| - * Bump the version every time you want to delete the old data in the DB. |
30 |
| - * |
31 |
| - * Real Game Example: |
32 |
| - * Suppose that your game has a VirtualGood called "Hat". |
33 |
| - * Let's say your game's IStoreAssets version is currently 0. |
34 |
| - * Now you want to change the name "Hat" to "Green Hat" - you will need to bump the version |
35 |
| - * from 0 to 1, in order for the new name, "Green Hat" to replace the old one, "Hat". |
36 |
| - * |
37 |
| - * Explanation: The local database on every one of your users' devices keeps your economy's metadata, such as the VirtualGood's name "Hat". When you change IStoreAssets, you must bump the version in order for the data to change in your users' local databases. |
38 |
| - * |
39 |
| - * You need to bump the version after ANY change in IStoreAssets for the local database to realize it needs to refresh its data. |
40 |
| - * |
41 |
| - * return: the version of your specific IStoreAssets. |
| 26 | + Retrieves the current version of your `IStoreAssets`. |
| 27 | + |
| 28 | + This value determines if the saved data in the database will be deleted or |
| 29 | + not. Bump the version every time you want to delete the old data in the DB. |
| 30 | + |
| 31 | + Real Game Example: |
| 32 | + Suppose that your game has a `VirtualGood` called "Hat". |
| 33 | + Let's say your game's `IStoreAssets` version is currently 0. |
| 34 | + Now you want to change the name "Hat" to "Green Hat" - you will need to |
| 35 | + bump the version from 0 to 1, in order for the new name, "Green Hat" to |
| 36 | + replace the old one, "Hat". |
| 37 | + |
| 38 | + Explanation: The local database on every one of your users' devices keeps |
| 39 | + your economy's metadata, such as the `VirtualGood`'s name "Hat". When you |
| 40 | + change `IStoreAssets`, you must bump the version in order for the data to |
| 41 | + change in your users' local databases. |
| 42 | + |
| 43 | + You need to bump the version after ANY change in `IStoreAssets` for the local |
| 44 | + database to realize it needs to refresh its data. |
| 45 | + |
| 46 | + @return The version of your specific `IStoreAssets`. |
42 | 47 | */
|
43 | 48 | - (int)getVersion;
|
44 | 49 |
|
45 | 50 | /**
|
46 |
| - * A representation of your game's virtual currency. |
| 51 | + Retrieves the array of your game's virtual currencies. |
| 52 | + |
| 53 | + @return All the virtual currencies in your game. |
47 | 54 | */
|
48 | 55 | - (NSArray*)virtualCurrencies;
|
49 | 56 |
|
50 | 57 | /**
|
51 |
| - * An array of all virtual goods served by your store (all kinds in one array). If you have UpgradeVGs, they must appear in the order of levels. |
| 58 | + Retrieves the array of all virtual goods served by your store (all kinds in |
| 59 | + one array). |
| 60 | + |
| 61 | + @return All virtual goods in your game. |
52 | 62 | */
|
53 | 63 | - (NSArray*)virtualGoods;
|
54 | 64 |
|
55 | 65 | /**
|
56 |
| - * An array of all virtual currency packs served by your store. |
| 66 | + Retrieves the array of all virtual currency packs served by your store. |
| 67 | + |
| 68 | + @return All virtual currency packs in your game. |
57 | 69 | */
|
58 | 70 | - (NSArray*)virtualCurrencyPacks;
|
59 | 71 |
|
60 | 72 | /**
|
61 |
| - * An array of all virtual categories served by your store. |
| 73 | + Retrieves the array of all virtual categories handled in your store. |
| 74 | + |
| 75 | + @return All virtual categories in your game. |
62 | 76 | */
|
63 | 77 | - (NSArray*)virtualCategories;
|
64 | 78 |
|
65 | 79 | /**
|
66 |
| - * You can define non-consumable items that you'd like to use for your needs. |
67 |
| - * CONSUMABLE items are usually just currency packs. |
68 |
| - * NON-CONSUMABLE items are usually used to let users purchase a "no-ads" token. |
| 80 | + Retrieves the array of all non-consumable items served by your store. |
| 81 | + |
| 82 | + @return All non-consumables served in your game. |
69 | 83 | */
|
70 | 84 | - (NSArray*)nonConsumableItems;
|
71 | 85 |
|
|
0 commit comments