Fixes SQLite.swift compiler errors in Xcode 9
Adds post install action to Podfile to modify SQLite.swift source files.
This commit is contained in:
parent
a8176cb276
commit
7695a800c6
@ -766,7 +766,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
12
Podfile
12
Podfile
@ -10,3 +10,15 @@ target 'Delta' do
|
||||
pod 'Fabric', '~> 1.6.0'
|
||||
pod 'Crashlytics', '~> 3.8.0'
|
||||
end
|
||||
|
||||
post_install do |installer|
|
||||
Dir.glob('Pods/SQLite.swift/Sources/SQLite/**/*.swift').each { |path|
|
||||
begin
|
||||
text = File.read(path)
|
||||
text = text.gsub(/import CSQLite/, 'import SQLite3')
|
||||
File.open(path, 'w') { |file| file.puts text }
|
||||
rescue Exception
|
||||
puts "Unable to patch #{path}: #{$!}"
|
||||
end
|
||||
}
|
||||
end
|
||||
@ -24,6 +24,6 @@ SPEC CHECKSUMS:
|
||||
SDWebImage: '098e97e6176540799c27e804c96653ee0833d13c'
|
||||
SQLite.swift: 99b36c22084427f0abbeb957556ce1528cf10bb3
|
||||
|
||||
PODFILE CHECKSUM: 479289198dc1b6bdae32696a6946bca9352751db
|
||||
PODFILE CHECKSUM: de6e2bf57dcf8e9fe6b622b181fd87d3855641e6
|
||||
|
||||
COCOAPODS: 1.2.0
|
||||
COCOAPODS: 1.2.1
|
||||
|
||||
4
Pods/Manifest.lock
generated
4
Pods/Manifest.lock
generated
@ -24,6 +24,6 @@ SPEC CHECKSUMS:
|
||||
SDWebImage: '098e97e6176540799c27e804c96653ee0833d13c'
|
||||
SQLite.swift: 99b36c22084427f0abbeb957556ce1528cf10bb3
|
||||
|
||||
PODFILE CHECKSUM: 479289198dc1b6bdae32696a6946bca9352751db
|
||||
PODFILE CHECKSUM: de6e2bf57dcf8e9fe6b622b181fd87d3855641e6
|
||||
|
||||
COCOAPODS: 1.2.0
|
||||
COCOAPODS: 1.2.1
|
||||
|
||||
@ -29,7 +29,7 @@ import sqlite3
|
||||
#elseif SQLITE_SWIFT_SQLCIPHER
|
||||
import SQLCipher
|
||||
#elseif SWIFT_PACKAGE || COCOAPODS
|
||||
import CSQLite
|
||||
import SQLite3
|
||||
#endif
|
||||
|
||||
/// A connection to SQLite.
|
||||
|
||||
@ -27,7 +27,7 @@ import sqlite3
|
||||
#elseif SQLITE_SWIFT_SQLCIPHER
|
||||
import SQLCipher
|
||||
#elseif SWIFT_PACKAGE || COCOAPODS
|
||||
import CSQLite
|
||||
import SQLite3
|
||||
#endif
|
||||
|
||||
/// A single SQL statement.
|
||||
|
||||
2
Pods/SQLite.swift/Sources/SQLite/Helpers.swift
generated
2
Pods/SQLite.swift/Sources/SQLite/Helpers.swift
generated
@ -27,7 +27,7 @@ import sqlite3
|
||||
#elseif SQLITE_SWIFT_SQLCIPHER
|
||||
import SQLCipher
|
||||
#elseif SWIFT_PACKAGE || COCOAPODS
|
||||
import CSQLite
|
||||
import SQLite3
|
||||
#endif
|
||||
|
||||
public typealias Star = (Expression<Binding>?, Expression<Binding>?) -> Expression<Void>
|
||||
|
||||
@ -21,6 +21,9 @@ case "${TARGETED_DEVICE_FAMILY}" in
|
||||
3)
|
||||
TARGET_DEVICE_ARGS="--target-device tv"
|
||||
;;
|
||||
4)
|
||||
TARGET_DEVICE_ARGS="--target-device watch"
|
||||
;;
|
||||
*)
|
||||
TARGET_DEVICE_ARGS="--target-device mac"
|
||||
;;
|
||||
|
||||
@ -8,4 +8,5 @@ OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -l"z" -framework "Crashlytics" -frame
|
||||
OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
|
||||
PODS_BUILD_DIR = $BUILD_DIR
|
||||
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
|
||||
PODS_ROOT = ${SRCROOT}/Pods
|
||||
|
||||
@ -8,4 +8,5 @@ OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -l"z" -framework "Crashlytics" -frame
|
||||
OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
|
||||
PODS_BUILD_DIR = $BUILD_DIR
|
||||
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
|
||||
PODS_ROOT = ${SRCROOT}/Pods
|
||||
|
||||
Loading…
Reference in New Issue
Block a user