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: succes/error callbacks #11

Closed
rchovan opened this issue Feb 14, 2017 · 3 comments
Closed

iOS: succes/error callbacks #11

rchovan opened this issue Feb 14, 2017 · 3 comments

Comments

@rchovan
Copy link

rchovan commented Feb 14, 2017

Hi,
I have my project in cordova for Android. Now I want to build it for iOS, but DB on iOS won't open. I have discovered, that success or error callbacks are not fired on iOS. Same code on Android is running without problem.

var db = window.sqlitePlugin.openDatabase({name: 'NoCache/test.db', iosDatabaseLocation: 'Documents'}, 
function() {
   alert("opened");
}, 
function(error) {
   alert ("error: " + error);
});
@brodycj
Copy link
Owner

brodycj commented Feb 14, 2017

I already documented that it is not supported to open a database in a subdirectory.

The newer location: 'default' setting will store the database in a location with no cloud backup. This is also documented.

@brodycj brodycj closed this as completed Feb 14, 2017
@rchovan
Copy link
Author

rchovan commented Feb 14, 2017

Hi, sorry, missed it.
According to docs:

default: Library/LocalDatabase subdirectory - NOT visible to iTunes and NOT backed up by iCloud

I need:

  1. that my database is visible to iTunes (to copy from/to Windows PC), and not backed up to cloud.
  2. import database from import subfolder and export to export subfolder

is there any workaround for that ?

Thank You.

@brodycj
Copy link
Owner

brodycj commented Feb 14, 2017

that my database is visible to iTunes (to copy from/to Windows PC), and not backed up to cloud

According to https://github.com/apache/cordova-plugin-file#ios-file-system-layout this would be the Documents/NoCloud directory.

I am thinking the best way to support this is to adapt the iOS version to use an arbitrary database location. I am thinking to do this at some point in the future not have not decided when. For priority fixes and features please contact sales@litehelpers.net for an estimate.

import database from import subfolder and export to export subfolder

I do not really understand what you want to achieve with this. I think this should be possible with support of cordova-plugin-file. For priority support please contact sales@litehelpers.net for rates.

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

No branches or pull requests

2 participants