Ability to use moor_ffi on iOS

This commit is contained in:
Simon Binder 2019-09-20 10:55:06 +02:00
parent 4e166f189c
commit a38e883282
2 changed files with 9 additions and 5 deletions

View File

@ -12,10 +12,12 @@ A new flutter plugin project.
s.license = { :file => '../LICENSE' }
s.author = { 'Your Company' => 'email@example.com' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
#s.source_files = 'Classes/**/*'
#s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.ios.deployment_target = '8.0'
end
# when we run on Dart 2.6, we should use this library and also use DynamicLibrary.executable()
# s.dependency 'sqlite3'
s.ios.deployment_target = '8.0'
end

View File

@ -14,7 +14,9 @@ DynamicLibrary _defaultOpen() {
if (Platform.isLinux || Platform.isAndroid) {
return DynamicLibrary.open('libsqlite3.so');
}
if (Platform.isMacOS) {
if (Platform.isMacOS || Platform.isIOS) {
// todo when we use a dev version of Dart 2.6, we can (and should!!) use DynamicLibrary.executable() here
// return DynamicLibrary.executable();
return DynamicLibrary.open('libsqlite3.dylib');
}
if (Platform.isWindows) {