You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+21-3Lines changed: 21 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,24 +2,42 @@
2
2
3
3
All notable changes to this project will be documented in this file.
4
4
5
+
## 2021-07-14
6
+
7
+
## Added
8
+
9
+
-`PhotoPicker` plugin allows to take a photo from camera or select it from photo library. [#19](https://github.com/godotengine/godot-ios-plugins/pull/19)
10
+
11
+
## 2021-07-13
12
+
13
+
## Fixes
14
+
15
+
- Replaced `copymem` usage with `memcpy`. [#20](https://github.com/godotengine/godot-ios-plugins/pull/20)
16
+
17
+
## 2021-05-16
18
+
19
+
## Added
20
+
21
+
-`InAppStore` plugin now returns a receipt for restored transactions. [#11](https://github.com/godotengine/godot-ios-plugins/pull/11)
22
+
5
23
## 2021-03-19
6
24
7
25
## Fixes
8
26
9
-
-`GameCenter` plugin now returns correct `player_id` value for iOS versions between 13.0 and 13.5.
27
+
-`GameCenter` plugin now returns correct `player_id` value for iOS versions between 13.0 and 13.5.[#4](https://github.com/godotengine/godot-ios-plugins/pull/4)
10
28
11
29
## 2021-02-05
12
30
13
31
## Added
14
32
15
33
-`badge_number` property, `set_badge_number`, `get_badge_number` methods to `PushNotifications` plugin.
16
-
-`GodotUserNotificationDelegate` and `UserNotificationService` can be used by as a single interface to process incoming notifications (both remote and local).
34
+
`GodotUserNotificationDelegate` and `UserNotificationService` can be used by as a single interface to process incoming notifications (both remote and local).[1e8c302](https://github.com/godotengine/godot-ios-plugins/commit/1e8c302b871e1e19ff907223e7e92b16884e32f7)
17
35
18
36
## 2021-02-03
19
37
20
38
## Added
21
39
22
-
-`PushNotifications` plugin that enables Apple Remote Notifications support for Godot projects.
40
+
-`PushNotifications` plugin that enables Apple Remote Notifications support for Godot projects.[b3e308a](https://github.com/godotengine/godot-ios-plugins/commit/b3e308a868274e29f62de92d22fd9ebdb703207c)
will generate `.a` static library for chosen target.
39
39
Do note, that Godot's default `debug` export template is compiled with `release_debug` target.
@@ -49,3 +49,7 @@
49
49
* Run `./scripts/generate_xcframework.sh <plugin_name> <debug|release|release_debug> <godot_version>` to generate `xcframework` with specific configuration. `xcframework` allows plugin to support both `arm64` device and `arm64` simulator.
50
50
51
51
* The result `.xcframework` will be stored in `bin` folder as well as intermidiate `.a` binaries.
52
+
53
+
## Documentation
54
+
55
+
Each plugin provides a `README.md` file which contains a documentation and examples.
To use this plugin you will have to manually setup Apple's App Store Purchases for your project at [Apple developer console](https://appstoreconnect.apple.com). For more information follow official Apple documentation: [StoreKit documentation](https://developer.apple.com/documentation/storekit/original_api_for_in-app_purchase), [App Store Connect Help](https://help.apple.com/app-store-connect/)
4
+
5
+
## Example
6
+
7
+
```
8
+
var _appstore = null
9
+
10
+
func check_events():
11
+
while _appstore.get_pending_event_count() > 0:
12
+
var event = inappstore.pop_pending_event()
13
+
match event.type:
14
+
'product_info':
15
+
...
16
+
'purchase':
17
+
...
18
+
'restore':
19
+
...
20
+
21
+
func _on_Button_button_down():
22
+
var result = _appstore.restore_purchases()
23
+
...
24
+
25
+
var result = _appstore.purchase({'product_id': "product_1"})
26
+
...
27
+
...
28
+
29
+
func _ready():
30
+
if Engine.has_singleton("InAppStore"):
31
+
_appstore = Engine.get_singleton('InAppStore')
32
+
var result = _appstore.request_product_info( { "product_ids": ["product_1", "product_2"] } )
33
+
if result == OK:
34
+
print("Successfully started product info request")
35
+
_appstore.set_auto_finish_transaction(true)
36
+
37
+
var timer = Timer.new()
38
+
timer.wait_time = 1
39
+
timer.connect("timeout", self, 'check_events')
40
+
add_child(timer)
41
+
timer.start()
42
+
else:
43
+
print("failed requesting product info")
44
+
else:
45
+
print("no app store plugin")
46
+
```
47
+
3
48
## Methods
4
49
5
-
`request_product_info(Dictionary products_dictionary)` - Loads the unique identifiers for your in-app products in order to retrieve products information. Generates new event with `product_info` type.
50
+
`request_product_info(Dictionary products_dictionary)` - Loads the unique identifiers for your in-app products in order to retrieve products information. Generates new event with `product_info` type. Identifiers should be the same as the ones used to setup your App Store purchases.
6
51
`restore_purchases()` - Asks App Store payment queue to restore previously completed purchases. Generates new event with `restore` type.
7
52
`purchase(Dictionary product_dictionary)` - Adds a product payment request to the App Store payment queue. Generates new event with `purchase` type.
8
53
`set_auto_finish_transaction(bool flag)` - Sets a value responsible for enabling automatic transaction finishing.
9
-
`finish_transaction(String product_id)` - Notifies the App Store that the app finished processing the transaction.
54
+
`finish_transaction(String product_id)` - Notifies the App Store that the app finished processing the transaction.
10
55
11
56
## Properties
12
57
13
58
## Events reporting
14
59
15
60
`get_pending_event_count()` - Returns number of events pending from plugin to be processed.
16
-
`pop_pending_event()` - Returns first unprocessed plugin event.
61
+
`pop_pending_event()` - Returns first unprocessed plugin event.
`permission_status(PhotoPickerPermissionTarget target): PhotoPickerPermissionStatus` - Returns a permissions status for specific photo picker target.
65
-
`request_permission(PhotoPickerPermissionTarget target)` - Performs a permission request for photo picker permission target if needed.
64
+
`permission_status(PhotoPickerPermissionTarget target): PhotoPickerPermissionStatus` - Returns a permissions status for specific photo picker target.
65
+
`request_permission(PhotoPickerPermissionTarget target)` - Performs a permission request for photo picker permission target if needed.
66
66
`present(PhotoPickerSourceType source)` - Presents a photo picker with specific source type that allows to select an image or take a picture from camera.
67
67
68
68
## Properties
69
69
70
70
## Signals
71
71
72
-
`image_picked(Ref<Image> image)` - Called whenever user selects an image from a library or takes a photo.
72
+
`image_picked(Ref<Image> image)` - Called whenever user selects an image from a library or takes a photo.
73
73
`permission_updated(PhotoPickerPermissionTarget image)` - Called when user changes permission status after `request_permission` is called.
0 commit comments