You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by zahra alsabah <za...@gmail.com> on 2023/05/30 11:47:30 UTC

urgen

I am using angular14 , cordova 11.0.0, and ios 6.2.0 I have two issues with
cordova plugins and I couldn't find documentations or solutions on the
weband the I need to solve these two issues as soon as possible since i
have a release in two days.


   1.  I installed Inappbrowser cordova plugin and then built and it works
   perfectly on my local application. Afterward, I deployed it using Jenkins
   but the plugin doesn't work on the deployed version, I took the deployed
   project folder and tested it on Xcode, it shows this error :

typeerror: undefined is not an object (evaluating
'cordova.inappbrowser.open')

knowing that the installation and configuration are the same as the local
one.

I tried :

   - removing and installing inappbrowser plugin\IOS platform\cordova and
   build afterward
   - building before and after updating the plugin
   - added <plugin name="cordova-plugin-inappbrowser" /> and <feature
   name="InAppBrowser"><param name="ios-package" value="CDVInAppBrowser"
   /></feature> in config.xml
   - removed the same configuration _ used deviceReady =
   fromEvent(document, 'deviceready'); to cordova.inappbrowser.openuse in it

none of that worked


2. the second problem is in the camera plugin , am using a slider to decide
the picture's resolution, it works on android, but on ios the resolutions
are always so big ! here's my code :

 const defaultHeight = '1080'; // set your default height here
    const defaultQuality = 50; // set your default quality here

    const options = {
      // Some common settings are 20, 50, and 100
      quality: this.sliderValueQuality || defaultQuality,
      destinationType: Camera.DestinationType.DATA_URL,
      sourceType: useGalery ? Camera.PictureSourceType.SAVEDPHOTOALBUM :
Camera.PictureSourceType.CAMERA,
      encodingType: Camera.EncodingType.JPEG,
      mediaType: Camera.MediaType.PICTURE,
      allowEdit: false,
      correctOrientation: true, //Corrects Android orientation quirks
      targetHeight: this.sliderValueResolution || defaultHeight,
    };

    navigator.camera.getPicture(
      (imageUri) => cameraCallback('.jpg', imageUri),
      (error) => {
        if (error && !error.toLowerCase().startsWith('no image')) {
          this.resAsync.then((resset) =>
alert(resset.get('Services-CordovaService-Camera-Error', error)));
        }
      },
      options
    );

I count on your comprehension and am waiting for your answer,

Thank you for your consideration

zahra,

Re: urgen

Posted by Norman Breau <no...@nbsolutions.ca>.
Hi Zahra,

I CC'ed you just in case you're not subscribed to the mailing list.

I'm just letting you know that this mailing list is for discussions 
regarding
the development of Apache Cordova and not for support.

For support, please use GitHub Discussions at
https://github.com/apache/cordova/discussions

Thank you,
Norman

On 2023-05-30 8:47 a.m., zahra alsabah wrote:
> I am using angular14 , cordova 11.0.0, and ios 6.2.0 I have two issues with
> cordova plugins and I couldn't find documentations or solutions on the
> weband the I need to solve these two issues as soon as possible since i
> have a release in two days.
>
>
>     1.  I installed Inappbrowser cordova plugin and then built and it works
>     perfectly on my local application. Afterward, I deployed it using Jenkins
>     but the plugin doesn't work on the deployed version, I took the deployed
>     project folder and tested it on Xcode, it shows this error :
>
> typeerror: undefined is not an object (evaluating
> 'cordova.inappbrowser.open')
>
> knowing that the installation and configuration are the same as the local
> one.
>
> I tried :
>
>     - removing and installing inappbrowser plugin\IOS platform\cordova and
>     build afterward
>     - building before and after updating the plugin
>     - added <plugin name="cordova-plugin-inappbrowser" /> and <feature
>     name="InAppBrowser"><param name="ios-package" value="CDVInAppBrowser"
>     /></feature> in config.xml
>     - removed the same configuration _ used deviceReady =
>     fromEvent(document, 'deviceready'); to cordova.inappbrowser.openuse in it
>
> none of that worked
>
>
> 2. the second problem is in the camera plugin , am using a slider to decide
> the picture's resolution, it works on android, but on ios the resolutions
> are always so big ! here's my code :
>
>   const defaultHeight = '1080'; // set your default height here
>      const defaultQuality = 50; // set your default quality here
>
>      const options = {
>        // Some common settings are 20, 50, and 100
>        quality: this.sliderValueQuality || defaultQuality,
>        destinationType: Camera.DestinationType.DATA_URL,
>        sourceType: useGalery ? Camera.PictureSourceType.SAVEDPHOTOALBUM :
> Camera.PictureSourceType.CAMERA,
>        encodingType: Camera.EncodingType.JPEG,
>        mediaType: Camera.MediaType.PICTURE,
>        allowEdit: false,
>        correctOrientation: true, //Corrects Android orientation quirks
>        targetHeight: this.sliderValueResolution || defaultHeight,
>      };
>
>      navigator.camera.getPicture(
>        (imageUri) => cameraCallback('.jpg', imageUri),
>        (error) => {
>          if (error && !error.toLowerCase().startsWith('no image')) {
>            this.resAsync.then((resset) =>
> alert(resset.get('Services-CordovaService-Camera-Error', error)));
>          }
>        },
>        options
>      );
>
> I count on your comprehension and am waiting for your answer,
>
> Thank you for your consideration
>
> zahra,
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org