Titanium JIRA Archive
Appcelerator Modules (MOD)

[MOD-2398] Ti.WKWebView crash when selecting "Save Image"

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionNot Our Bug
Resolution Date2018-02-22T15:16:48.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterMatthew Delmarter
AssigneeHans Knöchel
Created2018-02-22T13:23:10.000+0000
Updated2018-08-06T17:52:08.000+0000

Description

When viewing a website in Ti.WKWebView, load any page with an image on it. You should be able to longpress on the image, and from the popup menu choose "Save Image" and it should save to the Camera Roll on the device. However it just crashes the app. For example load this url from the Appcelerator Blog into a Ti.WKWebView: https://www.appcelerator.com/blog/2018/02/building-titanium-apps-for-homepod/ Longpress on the "Tech Tip" image, and select "Save Image". The app will crash. The trace logs do not provide any clues. Here is some basic sample code:
var win = Ti.UI.createWindow();
var wkWebView = require('ti.wkwebview');
var webView = wkWebView.createWebView({
	url: 'https://www.appcelerator.com/blog/2018/02/building-titanium-apps-for-homepod/'
});
win.add(webView);
win.open();

Attachments

FileDateSize
Simulator_Screen_Shot_-_iPhone_8_Plus_-_2018-02-23_at_02_05_02.png2018-02-22T13:21:50.000+000077460

Comments

  1. Hans Knöchel 2018-02-22

    Saving photos inside WKWebView require the NSPhotoLibraryAddUsageDescription key in your tiapp.xml. I've [updated the docs](https://github.com/appcelerator-modules/Ti.WKWebView/blob/master/README.md#saving-images) to reflect that!
  2. Matthew Delmarter 2018-02-22

    Too easy! Thanks so much.
  3. Eric Merriman 2018-08-06

    Closing as "not our bug". If you disagree, please reopen.

JSON Source