Skip to content

Commit

Permalink
Hack the generated linker settings in the Podfile
Browse files Browse the repository at this point in the history
Inlcuding the system-provided sqlite3 library causes us to crash on older iOS versions, becase their version of sqlite3 is too old for us. We do provide our own modern sqlite3 implementation via a pod dependency, but the system one is taking precedence. Removing the system one from the linker flags allows the build to work correctly.
  • Loading branch information
swansontec committed Jun 6, 2024
1 parent 2a21dc5 commit bb5585d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@ target 'edge' do
:mac_catalyst_enabled => false
# :ccache_enabled => true
)

# Remove the -lsqlite3 linker flag.
# We already include our own sqlite3 implementation via a pod,
# so we don't want the system-provided one as well.
# Firebase seems to be the one adding this flag to the build,
# but that's a transitive dependency so we can't fix it there.
for target in installer.generated_aggregate_targets
target.xcconfigs.each do |name, config|
config.libraries.delete('sqlite3')
config.save_as(Pathname.new(target.xcconfig_relative_path(name)))
end
end
end

# --------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2262,6 +2262,6 @@ SPEC CHECKSUMS:
ZIPFoundation: b1f0de4eed33e74a676f76e12559ab6b75990197
ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5

PODFILE CHECKSUM: fd1f66553fc6391e0e0f5fbba088fe546b85d913
PODFILE CHECKSUM: ca2cb88873d21103f0238e7db902e9eeff628974

COCOAPODS: 1.15.2

0 comments on commit bb5585d

Please sign in to comment.