I am trying to build a Swift framework containing cocoapods, using the below universal framework script got from here: Swift universal framework depending on pod
The build fails when using Xcode 12 and -UseModernBuildSystem=NO
:
The Legacy Build System will be removed in a future release. You can configure the selected build system and this deprecation message in File > Workspace Settings.
Command PhaseScriptExecution failed with a nonzero exit code
error when using Xcode 12 and modern build system:
error: accessing build database
"/Users/user/Library/Developer/Xcode/DerivedData/SnapKit-gldcozqrglacwhcqsctatmsoiouc/Build/Intermediates.noindex/XCBuildData/build.db": disk I/O error
Does anyone know the right solution for this problem or a workaround?
Universal XC Framework using pods : https://github.com/deepesh259nitk/PaymentsKit
Client App using the same pods : https://github.com/deepesh259nitk/PaymentClient
Adding below script to end of pod file of the client app. ( to fix a known crash like : Custom Framework : dyld: Symbol not found: _$s11CryptoSwift7PaddingO5pkcs7yA2CmFWC)
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
end
and then run the pod commands
pod deintegrate
pod install