Skip to content

Instantly share code, notes, and snippets.

@afshin-hoseini
Created November 21, 2017 17:31
Show Gist options
  • Save afshin-hoseini/1b5779aa52e109c18a13ead4b09f1c24 to your computer and use it in GitHub Desktop.
Save afshin-hoseini/1b5779aa52e109c18a13ead4b09f1c24 to your computer and use it in GitHub Desktop.
FMDB pof file config for swift 3
pod 'FMDB'#, :git => 'https://github.com/ccgus/fmdb.git', :commit => '1b346b527179f8869d6e8332917c80ac83337ee8'
post_install do |installer|
Dir['Pods/*/**/*.h'].each { |file|
search_text = %q["sqlite3.h"]
replace_text = '<SQLCipher/sqlite3.h>'
oldFile = File.read(file)
if oldFile.include? search_text
puts "#{file} includes #{search_text}"
File.chmod(0604, file) # rw----r--
newFile = oldFile.gsub(/#{search_text}/, replace_text)
File.open(file, "w") { |file|
file << newFile
}
end
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment