# Ionic 4, Angular 8, SQlite plugin IOS App

**URL:** <https://forum.ionicframework.com/t/ionic-4-angular-8-sqlite-plugin-ios-app/185192>\
**Category:** Ionic Native\
**Created:** [March 16, 2020, 6:15am UTC](https://forum.ionicframework.com/t/ionic-4-angular-8-sqlite-plugin-ios-app/185192 "2020-03-16T06:15:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rdbhagat999](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@rdbhagat999](https://forum.ionicframework.com/u/rdbhagat999)\
**Post date:** [March 16, 2020, 6:15am UTC](https://forum.ionicframework.com/t/ionic-4-angular-8-sqlite-plugin-ios-app/185192/1 "2020-03-16T06:15:13Z")

</div>

Dependencies

```auto
"@angular/core": "^8.2.0",
"@ionic-native/sqlite": "^5.21.6",
"@ionic-native/sqlite-db-copy": "^5.21.6",
"cordova-plugin-dbcopy": "^2.1.2",
"cordova-sqlite-storage": "^4.0.0",

```

1. Create Sqlite connection

```auto
dbName = 'Admin_1.db';

  options = {
    name: this.dbName,
    location: 'default',
    createFromLocation: 1,
  };

try {

      const db = await this.sqlite.create({...this.options, name: this.dbName});

      if(db !== null) {
        this.database = db;
        this.dbReady.next(true);
      }

    } catch (error) {
      console.log('db_err');
      console.log(error);

    }

```

1. Copy existing database to default db location

```auto
let copyDb_location = 0;

if(this.platform.is('ios')) {
  copyDb_location = 2;
}

this.sqliteDbCopy.copyDbFromStorage(dbName, copyDb_location, this.file.dataDirectory + 6, true)

```

1. Works perfectly on Android but does not work on IOS.

What is the default location of SQlite database in IOS App?

I think the problem is that I’m not being able to copy existing database to correct location in IOS app but I’m not sure about it.

Thanks for helping in advance.
