{"action":"created","issue":{"url":"https://api.github.com/repos/amplitude/Amplitude-iOS/issues/65","labels_url":"https://api.github.com/repos/amplitude/Amplitude-iOS/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/amplitude/Amplitude-iOS/issues/65/comments","events_url":"https://api.github.com/repos/amplitude/Amplitude-iOS/issues/65/events","html_url":"https://github.com/amplitude/Amplitude-iOS/pull/65","id":123057444,"number":65,"title":"Remove fmdb","user":{"login":"djih","id":4776584,"avatar_url":"https://avatars.githubusercontent.com/u/4776584?v=3","gravatar_id":"","url":"https://api.github.com/users/djih","html_url":"https://github.com/djih","followers_url":"https://api.github.com/users/djih/followers","following_url":"https://api.github.com/users/djih/following{/other_user}","gists_url":"https://api.github.com/users/djih/gists{/gist_id}","starred_url":"https://api.github.com/users/djih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djih/subscriptions","organizations_url":"https://api.github.com/users/djih/orgs","repos_url":"https://api.github.com/users/djih/repos","events_url":"https://api.github.com/users/djih/events{/privacy}","received_events_url":"https://api.github.com/users/djih/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"curtisliu","id":3248421,"avatar_url":"https://avatars.githubusercontent.com/u/3248421?v=3","gravatar_id":"","url":"https://api.github.com/users/curtisliu","html_url":"https://github.com/curtisliu","followers_url":"https://api.github.com/users/curtisliu/followers","following_url":"https://api.github.com/users/curtisliu/following{/other_user}","gists_url":"https://api.github.com/users/curtisliu/gists{/gist_id}","starred_url":"https://api.github.com/users/curtisliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/curtisliu/subscriptions","organizations_url":"https://api.github.com/users/curtisliu/orgs","repos_url":"https://api.github.com/users/curtisliu/repos","events_url":"https://api.github.com/users/curtisliu/events{/privacy}","received_events_url":"https://api.github.com/users/curtisliu/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-12-19T03:01:37Z","updated_at":"2015-12-20T20:44:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/amplitude/Amplitude-iOS/pulls/65","html_url":"https://github.com/amplitude/Amplitude-iOS/pull/65","diff_url":"https://github.com/amplitude/Amplitude-iOS/pull/65.diff","patch_url":"https://github.com/amplitude/Amplitude-iOS/pull/65.patch"},"body":"Tested in demo app, was able to reload same database file, and load existing values (like the deviceId, and lastEventId).\r\n\r\nSqlite is not threadsafe, so needed to schedule queries on a synchronous background thread, implementation borrowed from FMDBQueue: https://github.com/ccgus/fmdb/blob/master/src/fmdb/FMDatabaseQueue.m\r\n\r\nThis should simplify the implementation process for people who aren't using Cocoapods, although they might also need to add -lsqlite3 as a build flag (need to test this and update readme).\r\n\r\nUpdated build settings (ex remove Frameworks that were causing warning messages)"},"comment":{"url":"https://api.github.com/repos/amplitude/Amplitude-iOS/issues/comments/166152871","html_url":"https://github.com/amplitude/Amplitude-iOS/pull/65#issuecomment-166152871","issue_url":"https://api.github.com/repos/amplitude/Amplitude-iOS/issues/65","id":166152871,"user":{"login":"curtisliu","id":3248421,"avatar_url":"https://avatars.githubusercontent.com/u/3248421?v=3","gravatar_id":"","url":"https://api.github.com/users/curtisliu","html_url":"https://github.com/curtisliu","followers_url":"https://api.github.com/users/curtisliu/followers","following_url":"https://api.github.com/users/curtisliu/following{/other_user}","gists_url":"https://api.github.com/users/curtisliu/gists{/gist_id}","starred_url":"https://api.github.com/users/curtisliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/curtisliu/subscriptions","organizations_url":"https://api.github.com/users/curtisliu/orgs","repos_url":"https://api.github.com/users/curtisliu/repos","events_url":"https://api.github.com/users/curtisliu/events{/privacy}","received_events_url":"https://api.github.com/users/curtisliu/received_events","type":"User","site_admin":false},"created_at":"2015-12-20T20:44:58Z","updated_at":"2015-12-20T20:44:58Z","body":"LGTM, though a little wary of the repeated prepare/bind/finalize patterns, is there any easy abstraction that ensures that statements properly go through that sequence? Should also update the README so that it works for people not using cocoapods."}}