Open martinezguillaume opened 1 month ago
If someone finds a proper solution for this that this pod could implement, I'd love to hear about it. As a workaround, I believe you can stop other pods from linking the system's sqlite3 like this:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
xcconfig_path = config.base_configuration_reference.real_path
xcconfig = File.read(xcconfig_path)
new_xcconfig = xcconfig.sub(' -l"sqlite3"', '')
File.open(xcconfig_path, "w") { |file| file << new_xcconfig }
end
end
end
I think the pods should still work since sqlite3 does end up being linked in your application thanks to the sqlite3
pod.
Other packages such as SQLite.swift
come with a standalone
subspec that doesn't declare sqlite3
as a library but instead depends on the pod as well. Maybe the other pods should do this as well, but it's annoying that there's no proper solution.
I'll try to see what we can do but yeah, this issue seems very common in my opinion. I'll try to investigate more
Your solution can be a great workaround but it doesn't work in my case, here is the content of the problematic pod config
Pods/Target Support Files/AmazonChimeSDK/AmazonChimeSDK.release.xcconfig
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/AmazonChimeSDK
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/AmazonChimeSDK" "${PODS_ROOT}/AmazonChimeSDKMedia" "${PODS_XCFRAMEWORKS_BUILD_DIR}/AmazonChimeSDK" "${PODS_XCFRAMEWORKS_BUILD_DIR}/AmazonChimeSDKMedia"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -import-underlying-module -Xcc -fmodule-map-file="${SRCROOT}/${MODULEMAP_FILE}"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/AmazonChimeSDK
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AmazonChimeSDKMedia"
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
there is no occurence of sqlite3
in that, not sure how this pod is functioning.
It is importing iOS system SQLite3 like this
Thanks for the help, I was so stuck in my side 🙏
My other solution was to fork it and remove the system SQLite3 and instead using this lib. But I have so much trouble linking this forked pod dependency in my project.
Hi ! It seems that when using this lib and using another lib that is using the SQLite3 from iOS SDK, the build produces an error:
In my case, I'm using this pod called EXUpdates and this pod called AmazonChimeSDK resulting in this error.
I already fill an issue in the EXUpdates repo but maybe it belongs more to this repo I don't know. Thanks for the help 🙏