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

iOS Google Takeout file Download Fixes #77 #315

Closed
wants to merge 3 commits into from

Conversation

popofibo
Copy link
Contributor

@popofibo popofibo commented Apr 2, 2020

Fixes #77

This existing react-native-webview bug will be auto-fixed in their next release with this PR. This fix will be a workaround to handle file downloads for iOS by:

  • Intercepting WebView call to check for iOS and if url equates to takeout download url (onShouldStartLoadWithRequest)
  • Creates a directory within AppData documents
  • Saves the takeout file and unzips as normal

Tested on iOS and Android

@penrods penrods added For next release Do Not Merge (yet) Hold off on merging! This can be used for various reasons, Work in Progress, outside legal review... High Priority High importance / High value ios Bug / Feature specific to ios labels Apr 4, 2020
@kenpugsley
Copy link
Collaborator

We need to review this to determine if it's required for the v1.0 release. @popofibo - do you know if iOS export is fundamentally broken without this change?

@popofibo
Copy link
Contributor Author

popofibo commented Apr 5, 2020

We need to review this to determine if it's required for the v1.0 release. @popofibo - do you know if iOS export is fundamentally broken without this change?

iOS import with react native webview is definitely broken w/o this change; I referenced to the link in my comment above of the PR to core react native webview package that fixes it more gracefully. The core webview change essentially adds an optional callback onFileDownload, my code above takes a similar approach but uses available onShouldStartLoadWithRequest to intercept and create a downloads folder within the application, and saves the file to be utilized.

@popofibo
Copy link
Contributor Author

popofibo commented Apr 7, 2020

cc: @kenpugsley @tremblerz if this is to be merged before it starts to conflict

@kenpugsley
Copy link
Collaborator

Leaving this PR, but moving to "next next" the version right after v1.0. Since final translations are already underway, I think the best plan is to merge this in to develop right after the rc-1.0 branch is created. That will put this functionality into the first update after v1.0.

@tstirrat
Copy link
Contributor

This will be superseded by #410 as we will remove the webview.

@sergesemashko
Copy link
Contributor

I think this PR can be closed in favor of #410 as it also takes care of issue #77.

@tstirrat tstirrat closed this Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Do Not Merge (yet) Hold off on merging! This can be used for various reasons, Work in Progress, outside legal review... High Priority High importance / High value ios Bug / Feature specific to ios
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Import Locations from Google on iOS: Browser opens the Zip file in the Webview.
5 participants