Skip to content

Commit

Permalink
Merge branch 'main' into spm
Browse files Browse the repository at this point in the history
# Conflicts:
#	app/ios/Plugin/AppPlugin.m
  • Loading branch information
theproducer committed Nov 7, 2023
2 parents b3c5d8e + cbcaf25 commit 32a29fc
Show file tree
Hide file tree
Showing 11 changed files with 150 additions and 167 deletions.
1 change: 0 additions & 1 deletion app/ios/Sources/AppPlugin/AppPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public class AppPlugin: CAPPlugin, CAPBridgedPlugin {
CAPPluginMethod(name: "getLaunchUrl", returnType: CAPPluginReturnPromise),
CAPPluginMethod(name: "getState", returnType: CAPPluginReturnPromise),
CAPPluginMethod(name: "minimizeApp", returnType: CAPPluginReturnPromise),
CAPPluginMethod(name: "removeAllListeners", returnType: CAPPluginReturnPromise),
]
private var observers: [NSObjectProtocol] = []

Expand Down
1 change: 0 additions & 1 deletion browser/ios/Plugin/BrowserPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
CAP_PLUGIN(CAPBrowserPlugin, "Browser",
CAP_PLUGIN_METHOD(open, CAPPluginReturnPromise);
CAP_PLUGIN_METHOD(close, CAPPluginReturnPromise);
CAP_PLUGIN_METHOD(removeAllListeners, CAPPluginReturnPromise);
)
20 changes: 9 additions & 11 deletions camera/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,16 @@ Read about [Configuring `Info.plist`](https://capacitorjs.com/docs/ios/configura

## Android

This API requires the following permissions be added to your `AndroidManifest.xml`:
This API requires no permissions, unless using `saveToGallery: true`, in that case the following permissions should be added to your `AndroidManifest.xml`:

```xml
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
```

You can also specify those permissions only for the Android versions where they will be requested:

```xml
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="29"/>
```
Expand Down Expand Up @@ -258,14 +256,14 @@ Request camera and photo album permissions

#### GalleryImageOptions

| Prop | Type | Description | Default | Since |
| ------------------------ | -------------------------------------- | ---------------------------------------------------------------------------------------------------------- | --------------------------- | ----- |
| **`quality`** | <code>number</code> | The quality of image to return as JPEG, from 0-100 Note: This option is only supported on Android and iOS. | | 1.2.0 |
| **`width`** | <code>number</code> | The desired maximum width of the saved image. The aspect ratio is respected. | | 1.2.0 |
| **`height`** | <code>number</code> | The desired maximum height of the saved image. The aspect ratio is respected. | | 1.2.0 |
| **`correctOrientation`** | <code>boolean</code> | Whether to automatically rotate the image "up" to correct for orientation in portrait mode | <code>: true</code> | 1.2.0 |
| **`presentationStyle`** | <code>'fullscreen' \| 'popover'</code> | iOS only: The presentation style of the Camera. | <code>: 'fullscreen'</code> | 1.2.0 |
| **`limit`** | <code>number</code> | iOS only: Maximum number of pictures the user will be able to choose. | <code>0 (unlimited)</code> | 1.2.0 |
| Prop | Type | Description | Default | Since |
| ------------------------ | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | --------------------------- | ----- |
| **`quality`** | <code>number</code> | The quality of image to return as JPEG, from 0-100 Note: This option is only supported on Android and iOS. | | 1.2.0 |
| **`width`** | <code>number</code> | The desired maximum width of the saved image. The aspect ratio is respected. | | 1.2.0 |
| **`height`** | <code>number</code> | The desired maximum height of the saved image. The aspect ratio is respected. | | 1.2.0 |
| **`correctOrientation`** | <code>boolean</code> | Whether to automatically rotate the image "up" to correct for orientation in portrait mode | <code>: true</code> | 1.2.0 |
| **`presentationStyle`** | <code>'fullscreen' \| 'popover'</code> | iOS only: The presentation style of the Camera. | <code>: 'fullscreen'</code> | 1.2.0 |
| **`limit`** | <code>number</code> | Maximum number of pictures the user will be able to choose. Note: This option is only supported on Android 13+ and iOS. | <code>0 (unlimited)</code> | 1.2.0 |


#### PermissionStatus
Expand Down
Loading

0 comments on commit 32a29fc

Please sign in to comment.