Sqlite.swift: Fix sqlite3_trace is deprecated warning

Created on 9 Apr 2017  路  11Comments  路  Source: stephencelis/SQLite.swift

With the latest version of 0.11.3 from cocoapods and Xcode 8.3.1, I'm getting a deprecation warning for the c function sqlite3_trace. Going to the docs, it recommends using sqlite3_trace_v2 instead.

Most helpful comment

If you're using Pod , you can add inhibit_all_warnings! to the Podfile file to ignore all of the warnings in the pod project.

All 11 comments

It's a harmless warning. To make it disappear you'll have to set your deployment target to iOS 10.0.

First of all, thank you for this great library. It's really amazing!

My deployment target is 9.0, which I think most of the apps are always supporting at least one major version back, so it would be nice to have this fixed.

As a workaround, I'm using :inhibit_warnings => true in my podfile.

If you target an older platform the deprecated method will have to be called in any case (the _v2 only exists on 10.x). However in theory this shouldn't issue a warning. I think this stems from the fact that the deprecation is done via

__attribute__((deprecated))

and not with the standard @available attribute.

Oh, I see your point.

I'm targeting to iOS 10+ and it still shows the warning of deprecation, which I don't give much attention since it will be called anyway since as @jberkel said it's not a @available check

iOS 10+ and it still shows the warning...

If you're using Pod , you can add inhibit_all_warnings! to the Podfile file to ignore all of the warnings in the pod project.

iOS 13+ and it still shows the warning...

iOS 14 with iOS13.1 as target deployment level is also showing the same warning.
image

iOS 14 with iOS13.1 as target deployment level is also showing the same warning.
image

Bro I just moved away from this lol Use Core Data and that's it.

@afern247 what do you mean by Core Data?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hansrajgavali picture hansrajgavali  路  3Comments

arnoldschmid picture arnoldschmid  路  4Comments

Tchoupinax picture Tchoupinax  路  8Comments

pgawlowski picture pgawlowski  路  6Comments

WDDong picture WDDong  路  7Comments