cordova-plugin-camera icon indicating copy to clipboard operation
cordova-plugin-camera copied to clipboard

[iOS18, Xcode16] In the app built with Xcode 16 and running on iOS 18, the “Settings” button does not work.

Open bnosuke opened this issue 8 months ago • 2 comments

Bug Report

Problem

What is expected to happen?

open Settings

What does actually happen?

NOP

Information

openURL at CDVCamera.m not work

https://github.com/apache/cordova-plugin-camera/blame/7f33ef4add0a3a8ef3f2c3500f090711c1266dbf/src/ios/CDVCamera.m#L196

Environment, Platform, Device

Xcode16 iOS 18

Version information

cordova-plugin-camera: 8.0.0

Checklist

  • [x] I searched for existing GitHub issues
  • [x] I updated all Cordova tooling to most recent version
  • [x] I included all the necessary information above

bnosuke avatar Apr 15 '25 06:04 bnosuke

The current code is using this method:

  • https://developer.apple.com/documentation/uikit/uiapplication/openurl(_:)

To make it work correctly, replace the code with this method.

  • https://developer.apple.com/documentation/uikit/uiapplication/open(_:options:completionhandler:)

bnosuke avatar Apr 15 '25 06:04 bnosuke

PR is welcome.

Given that the newer API was implemented in iOS 10 and cordova-ios framework has a min ios of 11, we can simply replace the deprecated method.

The plugin callback can probably be invoked within the completionHandler block.

breautek avatar Apr 18 '25 15:04 breautek