Instead of using pre-created module maps, this script will generate them at build time if needed. Since Xcode 10 includes the module maps for CommonCrypto, these will not be generated if they already exist. Also, dynamically generating the module maps allows users of the library to build with beta versions of Xcode or on CI providers that may have Xcode in a non-standard location, since paths like the one below are no longer hardcoded:
https://github.com/ImKcat/CatCrypto/blob/4c3e6b389f80c3fb9d873e039b10cb69dbbde34e/Sources/ModuleMaps/CommonCrypto/iPhoneOS/module.modulemap#L2
This was tested on Xcode 10.2 beta and passes Travis CI tests for Xcode 10, but has not been tested on Xcode 9 (where these module maps are not already included in the SDK)
Added
Added script to dynamically generate
CommonCrypto
module maps if they don't exist.This is based on https://stackoverflow.com/a/42852743/3188334
Instead of using pre-created module maps, this script will generate them at build time if needed. Since Xcode 10 includes the module maps for
CommonCrypto
, these will not be generated if they already exist. Also, dynamically generating the module maps allows users of the library to build with beta versions of Xcode or on CI providers that may have Xcode in a non-standard location, since paths like the one below are no longer hardcoded: https://github.com/ImKcat/CatCrypto/blob/4c3e6b389f80c3fb9d873e039b10cb69dbbde34e/Sources/ModuleMaps/CommonCrypto/iPhoneOS/module.modulemap#L2This was tested on Xcode 10.2 beta and passes Travis CI tests for Xcode 10, but has not been tested on Xcode 9 (where these module maps are not already included in the SDK)