Skip to content

Commit

Permalink
3.4-beta1
Browse files Browse the repository at this point in the history
  • Loading branch information
naithar committed Jul 14, 2021
1 parent 7082ff0 commit d02a042
Show file tree
Hide file tree
Showing 9 changed files with 106 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Compile Plugins
run: |
./scripts/release_xcframework.sh 3.3
./scripts/release_xcframework.sh 3.x
ls -l bin/release
- uses: actions/upload-artifact@v2
Expand Down
24 changes: 21 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,42 @@

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

## 2021-07-14

## Added

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

## 2021-07-13

## Fixes

- Replaced `copymem` usage with `memcpy`. [#20](https://github.com/godotengine/godot-ios-plugins/pull/20)

## 2021-05-16

## Added

- `InAppStore` plugin now returns a receipt for restored transactions. [#11](https://github.com/godotengine/godot-ios-plugins/pull/11)

## 2021-03-19

## Fixes

- `GameCenter` plugin now returns correct `player_id` value for iOS versions between 13.0 and 13.5.
- `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)

## 2021-02-05

## Added

- `badge_number` property, `set_badge_number`, `get_badge_number` methods to `PushNotifications` plugin.
- `GodotUserNotificationDelegate` and `UserNotificationService` can be used by as a single interface to process incoming notifications (both remote and local).
`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)

## 2021-02-03

## Added

- `PushNotifications` plugin that enables Apple Remote Notifications support for Godot projects.
- `PushNotifications` plugin that enables Apple Remote Notifications support for Godot projects. [b3e308a](https://github.com/godotengine/godot-ios-plugins/commit/b3e308a868274e29f62de92d22fd9ebdb703207c)

## 2021-01-31

Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Godot iOS plugins

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

## Instructions

Expand Down Expand Up @@ -33,7 +33,7 @@

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

* The result `.xcframework` will be stored in `bin` folder as well as intermidiate `.a` binaries.

## Documentation

Each plugin provides a `README.md` file which contains a documentation and examples.
4 changes: 2 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ opts.Add(BoolVariable('simulator', "Compilation platform", 'no'))
opts.Add(BoolVariable('use_llvm', "Use the LLVM / Clang compiler", 'no'))
opts.Add(PathVariable('target_path', 'The path where the lib is installed.', 'bin/'))
opts.Add(EnumVariable('plugin', 'Plugin to build', '', ['', 'apn', 'arkit', 'camera', 'icloud', 'gamecenter', 'inappstore', 'photo_picker']))
opts.Add(EnumVariable('version', 'Godot version to target', '', ['', '3.3', '4.0']))
opts.Add(EnumVariable('version', 'Godot version to target', '', ['', '3.x', '4.0']))

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

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

Expand Down
2 changes: 1 addition & 1 deletion godot
Submodule godot updated 2793 files
4 changes: 2 additions & 2 deletions plugins/apn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Values: `PUSH_ALERT`, `PUSH_BADGE`, `PUSH_SOUND`, `PUSH_SETTINGS`

## Methods

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

## Properties
Expand Down
10 changes: 7 additions & 3 deletions plugins/arkit/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
# Godot iOS ARKit plugin

Uses Godot's `XRInterface`/`ARVRInterface` to handle iOS AR functionality.
Uses Godot's `XRInterface`/`ARVRInterface` to handle iOS AR functionality.

## Example

https://github.com/BastiaanOlij/godot3_test_projects/tree/master/ARKit

## Methods

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

## Properties

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

## Events reporting
51 changes: 48 additions & 3 deletions plugins/inappstore/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,61 @@
# Godot iOS InAppStore plugin

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

## Example

```
var _appstore = null
func check_events():
while _appstore.get_pending_event_count() > 0:
var event = inappstore.pop_pending_event()
match event.type:
'product_info':
...
'purchase':
...
'restore':
...
func _on_Button_button_down():
var result = _appstore.restore_purchases()
...
var result = _appstore.purchase({'product_id': "product_1"})
...
...
func _ready():
if Engine.has_singleton("InAppStore"):
_appstore = Engine.get_singleton('InAppStore')
var result = _appstore.request_product_info( { "product_ids": ["product_1", "product_2"] } )
if result == OK:
print("Successfully started product info request")
_appstore.set_auto_finish_transaction(true)
var timer = Timer.new()
timer.wait_time = 1
timer.connect("timeout", self, 'check_events')
add_child(timer)
timer.start()
else:
print("failed requesting product info")
else:
print("no app store plugin")
```

## Methods

`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.
`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.
`restore_purchases()` - Asks App Store payment queue to restore previously completed purchases. Generates new event with `restore` type.
`purchase(Dictionary product_dictionary)` - Adds a product payment request to the App Store payment queue. Generates new event with `purchase` type.
`set_auto_finish_transaction(bool flag)` - Sets a value responsible for enabling automatic transaction finishing.
`finish_transaction(String product_id)` - Notifies the App Store that the app finished processing the transaction.
`finish_transaction(String product_id)` - Notifies the App Store that the app finished processing the transaction.

## Properties

## Events reporting

`get_pending_event_count()` - Returns number of events pending from plugin to be processed.
`pop_pending_event()` - Returns first unprocessed plugin event.
`pop_pending_event()` - Returns first unprocessed plugin event.
36 changes: 18 additions & 18 deletions plugins/photo_picker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,29 @@ func _image_picked(image):
func _permission_updated(target, status):
match (target):
apns.PERMISSION_TARGET_PHOTO_LIBRARY:
_picker.PERMISSION_TARGET_PHOTO_LIBRARY:
print("photo library")
apns.PERMISSION_TARGET_CAMERA:
_picker.PERMISSION_TARGET_CAMERA:
print("camera")
match (status):
apns.PERMISSION_STATUS_UNKNOWN:
_picker.PERMISSION_STATUS_UNKNOWN:
print("unknown")
apns.PERMISSION_STATUS_ALLOWED:
_picker.PERMISSION_STATUS_ALLOWED:
print("allowed")
apns.PERMISSION_STATUS_DENIED:
_picker.PERMISSION_STATUS_DENIED:
print("denied")
func _on_Button_button_down():
apns.present(apns.SOURCE_SAVED_PHOTOS_ALBUM);
apns.present(apns.SOURCE_CAMERA_REAR);
apns.present(apns.SOURCE_CAMERA_FRONT);
_picker.present(_picker.SOURCE_SAVED_PHOTOS_ALBUM);
_picker.present(_picker.SOURCE_CAMERA_REAR);
_picker.present(_picker.SOURCE_CAMERA_FRONT);
print(apns.permission_status(apns.PERMISSION_TARGET_CAMERA))
print(apns.permission_status(apns.PERMISSION_TARGET_PHOTO_LIBRARY))
print(_picker.permission_status(_picker.PERMISSION_TARGET_CAMERA))
print(_picker.permission_status(_picker.PERMISSION_TARGET_PHOTO_LIBRARY))
apns.request_permission(apns.PERMISSION_TARGET_CAMERA)
apns.request_permission(apns.PERMISSION_TARGET_PHOTO_LIBRARY)
_picker.request_permission(_picker.PERMISSION_TARGET_CAMERA)
_picker.request_permission(_picker.PERMISSION_TARGET_PHOTO_LIBRARY)
...
Expand All @@ -50,24 +50,24 @@ func _ready():

## Enum

Type: `PhotoPickerSourceType`
Type: `PhotoPickerSourceType`
Values: `SOURCE_PHOTO_LIBRARY`, `SOURCE_CAMERA_FRONT`, `SOURCE_CAMERA_REAR`, `SOURCE_SAVED_PHOTOS_ALBUM`

Type: `PhotoPickerPermissionTarget`
Type: `PhotoPickerPermissionTarget`
Values: `PERMISSION_TARGET_PHOTO_LIBRARY`, `PERMISSION_TARGET_CAMERA`

Type: `PhotoPickerPermissionStatus`
Type: `PhotoPickerPermissionStatus`
Values: `PERMISSION_STATUS_UNKNOWN`, `PERMISSION_STATUS_ALLOWED`, `PERMISSION_STATUS_DENIED`

## Methods

`permission_status(PhotoPickerPermissionTarget target): PhotoPickerPermissionStatus` - Returns a permissions status for specific photo picker target.
`request_permission(PhotoPickerPermissionTarget target)` - Performs a permission request for photo picker permission target if needed.
`permission_status(PhotoPickerPermissionTarget target): PhotoPickerPermissionStatus` - Returns a permissions status for specific photo picker target.
`request_permission(PhotoPickerPermissionTarget target)` - Performs a permission request for photo picker permission target if needed.
`present(PhotoPickerSourceType source)` - Presents a photo picker with specific source type that allows to select an image or take a picture from camera.

## Properties

## Signals

`image_picked(Ref<Image> image)` - Called whenever user selects an image from a library or takes a photo.
`image_picked(Ref<Image> image)` - Called whenever user selects an image from a library or takes a photo.
`permission_updated(PhotoPickerPermissionTarget image)` - Called when user changes permission status after `request_permission` is called.

0 comments on commit d02a042

Please sign in to comment.