{ "id": "137820", "key": "TIMOB-17831", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "16586", "description": "Release 3.4.2", "name": "Release 3.4.2", "archived": false, "released": true, "releaseDate": "2017-03-11" }, { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" }, { "id": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-10-14T18:06:40.000+0000", "created": "2014-10-08T18:55:41.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "module_database", "qe-manualtest" ], "versions": [], "issuelinks": [], "assignee": { "name": "mdadu", "key": "mdadu", "displayName": "Muhammad Dadu", "active": false, "timeZone": "Europe/London" }, "updated": "2014-11-26T07:06:40.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": null, "attachment": [], "flagged": false, "summary": "iOS - SQLite module throws warnings about deprecated API usage", "creator": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 230, "state": "closed", "name": "2014 Sprint 21 SDK", "startDate": "2014-10-13T22:00:57.270Z", "endDate": "2014-10-25T00:00:00.000Z", "completeDate": "2014-10-27T16:33:06.432Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "327323", "author": { "name": "mdadu", "key": "mdadu", "displayName": "Muhammad Dadu", "active": false, "timeZone": "Europe/London" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/6207\r\n\r\nRemoved warnings by implementing 'sqlite3_open_v2'. Tested using Kitchen SInk.", "updateAuthor": { "name": "mdadu", "key": "mdadu", "displayName": "Muhammad Dadu", "active": false, "timeZone": "Europe/London" }, "created": "2014-10-08T19:02:37.000+0000", "updated": "2014-10-08T20:29:52.000+0000" }, { "id": "328009", "author": { "name": "marek", "key": "marek", "displayName": "Marek Zwick", "active": true, "timeZone": "Europe/Berlin" }, "body": "This change crashes a newly installed app (without existing database) on IOS. Instead of creating a new database, Titanium.Database.open() causes an error. To reproduce, just run a\r\n\r\nTi.Database.open('_alloy_');\r\n\r\nin a newly installed app, you will get\r\n\r\n[ERROR] : message = \"couldn't open database\";\r\n[ERROR] : nativeLocation = \"-[TiDatabaseProxy open:] (TiDatabaseProxy.m:112)\";\r\n\r\nIf I add the removed line \r\n\r\nsqlite3_enable_shared_cache(TRUE);\r\n\r\nin the iphone/Classes/DatabaseModule.m, everything works as expected.\r\n", "updateAuthor": { "name": "marek", "key": "marek", "displayName": "Marek Zwick", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-10-14T11:55:01.000+0000", "updated": "2014-10-14T11:55:01.000+0000" }, { "id": "328016", "author": { "name": "marek", "key": "marek", "displayName": "Marek Zwick", "active": true, "timeZone": "Europe/Berlin" }, "body": "found the problem: in the sqlite3_open_v2 there must be an additional SQLITE_OPEN_CREATE flag, so the database will be created if not existing (which seemed to be a default behaviour of sqlite3_open) \r\n\r\nin PLSqliteDatabase.m openAndReturnError:\r\n\r\n/* Open the database */\r\n err = sqlite3_open_v2([_path fileSystemRepresentation], &_sqlite, SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);\r\n\r\nSo the removed sqlite3_enable_shared_cache(TRUE); in iphone/Classes/DatabaseModule.m wasn't problematic at all.\r\n\r\n\r\n\r\n", "updateAuthor": { "name": "marek", "key": "marek", "displayName": "Marek Zwick", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-10-14T12:54:00.000+0000", "updated": "2014-10-14T12:54:00.000+0000" }, { "id": "328065", "author": { "name": "mdadu", "key": "mdadu", "displayName": "Muhammad Dadu", "active": false, "timeZone": "Europe/London" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/6218\r\n\r\nThank you for the help [~marek].", "updateAuthor": { "name": "mdadu", "key": "mdadu", "displayName": "Muhammad Dadu", "active": false, "timeZone": "Europe/London" }, "created": "2014-10-14T17:57:25.000+0000", "updated": "2014-10-14T17:57:25.000+0000" }, { "id": "329372", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Backport to 3_4_X done as part of https://github.com/appcelerator/titanium_mobile/pull/6271", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-10-24T18:18:17.000+0000", "updated": "2014-10-24T18:18:17.000+0000" }, { "id": "333833", "author": { "name": "kagrawal", "key": "kagrawal", "displayName": "Khushbu Agrawal", "active": true, "timeZone": "Asia/Shanghai" }, "body": "The database is created without crash when it doesn't exist. Verified with the Xcode=>Devices=>Installed Apps .\r\nClosing the ticket.\r\nTested with the below Environment: \r\n1. Mac OSX Yosemite 10.10\r\n2. Appcelerator Studio, build: 3.4.1.201410281743\r\n3. Titanium SDK, build: 3.5.0.v20141125154115\r\n4. Titanium CLI, build: 3.4.1\r\n5. Alloy: 1.5.1\r\n6. Xcode 6.1\r\n7. iOS SDK 8.1\r\n8. iPhone 5s with iOS 8.1\r\n", "updateAuthor": { "name": "kagrawal", "key": "kagrawal", "displayName": "Khushbu Agrawal", "active": true, "timeZone": "Asia/Shanghai" }, "created": "2014-11-26T07:06:40.000+0000", "updated": "2014-11-26T07:06:40.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }