Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attachment missing on iOS 13 Beta #337

Closed
BKHines opened this issue Sep 6, 2019 · 7 comments
Closed

Attachment missing on iOS 13 Beta #337

BKHines opened this issue Sep 6, 2019 · 7 comments

Comments

@BKHines
Copy link

BKHines commented Sep 6, 2019

Is anyone else experiencing an issue with passing a photo as an attachment in iOS 13 Beta 2? It works on iOS12 (and Android 9), I've updated the iOS platform, camera plugin and the email composer plugin. The file string I'm sending in as an attachment comes from the getPicture method on the camera module and looks like the following:

file:///var/mobile/Containers/Data/Application/[GUID]/tmp/cdv_photo_002.jpg.

The email opens fine, no errors, the image saves to the photo album (I have that set to true) but no matter what, the image doesn't get attached to the email. Anyone else having this issue?

constructor(private email: EmailComposer) { }
...
let _email: EmailComposerOptions = {
  to: siteToEmail.email,
  subject: _subject,
  body: photodata.message,
  isHtml: true,
  app: 'mailto'
};

if (photodata.picurl) {
  console.log('app.component.ts', photodata.picurl);
  _email.attachments = [photodata.picurl];
}

  this.email.open(_email).then((res: any) => {
    this.alerts.messageAlert('Email opened fine: ${photodata.picurl}');
  }).catch((err) => {
    this.alerts.messageAlert('An email app could not be opened.  Is a default email app installed?');
  });
@BKHines BKHines changed the title Attachment missing on iOS 13 Beta 2 Attachment missing on iOS 13 Beta Sep 6, 2019
@katzer
Copy link
Owner

katzer commented Sep 24, 2019

@BKHines I've tested it with iPadOS 13.1 and its working fine.

@BKHines
Copy link
Author

BKHines commented Sep 24, 2019

@katzer Hmm, is that with the attachment URL format above: file:///var/mobile...? Or a different format? I also tried data URL and then a hard coded, base64 image data but those were not attached either.

@katzer
Copy link
Owner

katzer commented Sep 25, 2019

I've used the camera plugin. So it's file:///var/mobile...

@BKHines
Copy link
Author

BKHines commented Sep 25, 2019

I just had another developer test it on their iPad with 13.1 and it didn't work for them. However, on the 12.4 devices with the same code, it works fine.

Is it possible the app doesn't have permission to access file system? I noticed a section in the readme about Permissions on Android, but didn't notice anything related to iOS. Could iOS13 require external storage permission?

I'll be able to try it in a few hours when I work on it, but I'm just curious if your test required any extra permissions.

@BKHines
Copy link
Author

BKHines commented Sep 26, 2019

Okay, I think this can be closed because it appears the camera plugin is providing an invalid FILE_URI on iOS13, similar to this issue: apache/cordova-plugin-camera#492

Out of curiosity, @katzer you were able to get it to work using the camera plugin. Are you using this plugin? Latest version, 4.1.0?

@BKHines BKHines closed this as completed Sep 26, 2019
@katzer
Copy link
Owner

katzer commented Sep 26, 2019

Are you using this plugin? Latest version, 4.1.0?

Yes, latest plugin and platform version.

@BKHines
Copy link
Author

BKHines commented Sep 26, 2019

Okay, thanks for the information @katzer; I appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants