Skip to content

Commit d02a042

Browse files
committed
3.4-beta1
1 parent 7082ff0 commit d02a042

File tree

9 files changed

+106
-35
lines changed

9 files changed

+106
-35
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
3131
- name: Compile Plugins
3232
run: |
33-
./scripts/release_xcframework.sh 3.3
33+
./scripts/release_xcframework.sh 3.x
3434
ls -l bin/release
3535
3636
- uses: actions/upload-artifact@v2

CHANGELOG.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,42 @@
22

33
All notable changes to this project will be documented in this file.
44

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+
523
## 2021-03-19
624

725
## Fixes
826

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)
1028

1129
## 2021-02-05
1230

1331
## Added
1432

1533
- `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)
1735

1836
## 2021-02-03
1937

2038
## Added
2139

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)
2341

2442
## 2021-01-31
2543

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Godot iOS plugins
22

33
`master` branch is current development branch and can introduce breaking changes to plugin's public interface.
4-
`3.2` branch aim is to provide same public interface as it was before switch to new iOS plugin system.
4+
`3.3` branch aim is to provide same public interface as it was before switch to new iOS plugin system.
55

66
## Instructions
77

@@ -33,7 +33,7 @@
3333

3434
* Running
3535
```
36-
scons target=<debug|release|release_debug> arch=<arch> simulator=<no|yes> plugin=<plugin_name> version=<3.3|4.0>
36+
scons target=<debug|release|release_debug> arch=<arch> simulator=<no|yes> plugin=<plugin_name> version=<3.x|4.0>
3737
```
3838
will generate `.a` static library for chosen target.
3939
Do note, that Godot's default `debug` export template is compiled with `release_debug` target.
@@ -49,3 +49,7 @@
4949
* 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.
5050

5151
* 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.

SConstruct

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ opts.Add(BoolVariable('simulator', "Compilation platform", 'no'))
2525
opts.Add(BoolVariable('use_llvm', "Use the LLVM / Clang compiler", 'no'))
2626
opts.Add(PathVariable('target_path', 'The path where the lib is installed.', 'bin/'))
2727
opts.Add(EnumVariable('plugin', 'Plugin to build', '', ['', 'apn', 'arkit', 'camera', 'icloud', 'gamecenter', 'inappstore', 'photo_picker']))
28-
opts.Add(EnumVariable('version', 'Godot version to target', '', ['', '3.3', '4.0']))
28+
opts.Add(EnumVariable('version', 'Godot version to target', '', ['', '3.x', '4.0']))
2929

3030
# Updates the environment with the option variables.
3131
opts.Update(env)
@@ -93,7 +93,7 @@ env.Append(LINKFLAGS=["-arch", env['arch'], '-isysroot', sdk_path, '-F' + sdk_pa
9393
if env['arch'] == 'armv7':
9494
env.Prepend(CXXFLAGS=['-fno-aligned-allocation'])
9595

96-
if env['version'] == '3.3':
96+
if env['version'] == '3.x':
9797
env.Prepend(CFLAGS=['-std=gnu11'])
9898
env.Prepend(CXXFLAGS=['-DGLES_ENABLED', '-std=gnu++14'])
9999

godot

Submodule godot updated 2793 files

plugins/apn/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ Values: `PUSH_ALERT`, `PUSH_BADGE`, `PUSH_SOUND`, `PUSH_SETTINGS`
2727

2828
## Methods
2929

30-
`register_push_notifications(PushOptions options)` - Registers device to receive remote notifications through Apple Push Notification service.
31-
`set_badge_number(int value)` - Sets the badge value of the app icon on the Home screen.
30+
`register_push_notifications(PushOptions options)` - Registers device to receive remote notifications through Apple Push Notification service.
31+
`set_badge_number(int value)` - Sets the badge value of the app icon on the Home screen.
3232
`get_badge_number()` - Returns the badge value of the app icon on the Home screen.
3333

3434
## Properties

plugins/arkit/README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
# Godot iOS ARKit plugin
22

3-
Uses Godot's `XRInterface`/`ARVRInterface` to handle iOS AR functionality.
3+
Uses Godot's `XRInterface`/`ARVRInterface` to handle iOS AR functionality.
4+
5+
## Example
6+
7+
https://github.com/BastiaanOlij/godot3_test_projects/tree/master/ARKit
48

59
## Methods
610

711
`set_light_estimation_is_enabled(bool flag)` - Sets a value responsible for usage of estimation of lighting conditions based on the camera image.
812
`get_light_estimation_is_enabled()` - Returns a value responsible for usage of estimation of lighting conditions based on the camera image.
913
`get_ambient_intensity()` - Returns a value used for intensity, in lumens, of ambient light throughout the scene.
1014
`get_ambient_color_temperature()` - Return a value used for color temperature of ambient light throughout the scene.
11-
`raycast(Vector2 screen_coords)` - Performs a raycast to search for real-world objects or AR anchors in the captured camera image.
15+
`raycast(Vector2 screen_coords)` - Performs a raycast to search for real-world objects or AR anchors in the captured camera image.
1216

1317
## Properties
1418

15-
`light_estimation: bool` - Returns or sets a value responsible for usage of estimation of lighting conditions based on the camera image.
19+
`light_estimation: bool` - Returns or sets a value responsible for usage of estimation of lighting conditions based on the camera image.
1620

1721
## Events reporting

plugins/inappstore/README.md

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,61 @@
11
# Godot iOS InAppStore plugin
22

3+
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+
348
## Methods
449

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.
651
`restore_purchases()` - Asks App Store payment queue to restore previously completed purchases. Generates new event with `restore` type.
752
`purchase(Dictionary product_dictionary)` - Adds a product payment request to the App Store payment queue. Generates new event with `purchase` type.
853
`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.
1055

1156
## Properties
1257

1358
## Events reporting
1459

1560
`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.

plugins/photo_picker/README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,29 @@ func _image_picked(image):
1212
1313
func _permission_updated(target, status):
1414
match (target):
15-
apns.PERMISSION_TARGET_PHOTO_LIBRARY:
15+
_picker.PERMISSION_TARGET_PHOTO_LIBRARY:
1616
print("photo library")
17-
apns.PERMISSION_TARGET_CAMERA:
17+
_picker.PERMISSION_TARGET_CAMERA:
1818
print("camera")
1919
2020
match (status):
21-
apns.PERMISSION_STATUS_UNKNOWN:
21+
_picker.PERMISSION_STATUS_UNKNOWN:
2222
print("unknown")
23-
apns.PERMISSION_STATUS_ALLOWED:
23+
_picker.PERMISSION_STATUS_ALLOWED:
2424
print("allowed")
25-
apns.PERMISSION_STATUS_DENIED:
25+
_picker.PERMISSION_STATUS_DENIED:
2626
print("denied")
2727
2828
func _on_Button_button_down():
29-
apns.present(apns.SOURCE_SAVED_PHOTOS_ALBUM);
30-
apns.present(apns.SOURCE_CAMERA_REAR);
31-
apns.present(apns.SOURCE_CAMERA_FRONT);
29+
_picker.present(_picker.SOURCE_SAVED_PHOTOS_ALBUM);
30+
_picker.present(_picker.SOURCE_CAMERA_REAR);
31+
_picker.present(_picker.SOURCE_CAMERA_FRONT);
3232
33-
print(apns.permission_status(apns.PERMISSION_TARGET_CAMERA))
34-
print(apns.permission_status(apns.PERMISSION_TARGET_PHOTO_LIBRARY))
33+
print(_picker.permission_status(_picker.PERMISSION_TARGET_CAMERA))
34+
print(_picker.permission_status(_picker.PERMISSION_TARGET_PHOTO_LIBRARY))
3535
36-
apns.request_permission(apns.PERMISSION_TARGET_CAMERA)
37-
apns.request_permission(apns.PERMISSION_TARGET_PHOTO_LIBRARY)
36+
_picker.request_permission(_picker.PERMISSION_TARGET_CAMERA)
37+
_picker.request_permission(_picker.PERMISSION_TARGET_PHOTO_LIBRARY)
3838
3939
...
4040
@@ -50,24 +50,24 @@ func _ready():
5050

5151
## Enum
5252

53-
Type: `PhotoPickerSourceType`
53+
Type: `PhotoPickerSourceType`
5454
Values: `SOURCE_PHOTO_LIBRARY`, `SOURCE_CAMERA_FRONT`, `SOURCE_CAMERA_REAR`, `SOURCE_SAVED_PHOTOS_ALBUM`
5555

56-
Type: `PhotoPickerPermissionTarget`
56+
Type: `PhotoPickerPermissionTarget`
5757
Values: `PERMISSION_TARGET_PHOTO_LIBRARY`, `PERMISSION_TARGET_CAMERA`
5858

59-
Type: `PhotoPickerPermissionStatus`
59+
Type: `PhotoPickerPermissionStatus`
6060
Values: `PERMISSION_STATUS_UNKNOWN`, `PERMISSION_STATUS_ALLOWED`, `PERMISSION_STATUS_DENIED`
6161

6262
## Methods
6363

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.
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.
6666
`present(PhotoPickerSourceType source)` - Presents a photo picker with specific source type that allows to select an image or take a picture from camera.
6767

6868
## Properties
6969

7070
## Signals
7171

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.
7373
`permission_updated(PhotoPickerPermissionTarget image)` - Called when user changes permission status after `request_permission` is called.

0 commit comments

Comments
 (0)