jimmyt
10/19/2021, 3:26 AMGenerating workspace in `shared/build/cocoapods/synthetic/IOS/shared`
[!] The following Swift pods cannot yet be integrated as static libraries:
The Swift pod `web3swift.pod` depends upon `secp256k1.c`, `keccak.c`, and `scrypt.c`, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
[!] Automatically assigning platform `iOS` with version `13.0` on target `App-iOS` because no platform was specified. Please specify a platform for this target in your Podfile. See `<https://guides.cocoapods.org/syntax/podfile.html#platform>`.
The CocoaPods section of my build.gradle.kts file (which is located in "Project/shared") looks like this:
version = "1.0"
ios()
cocoapods {
summary = "A summary to make CocoaPods happy"
homepage = "A page to make CocoaPods happy"
ios.deploymentTarget = "13.0"
pod("web3swift.pod") {
}
useLibraries()
podfile = project.file("../iosApp/Podfile")
}
And my Podfile (which is located in "Project/iosApp") looks like:
source '<https://cdn.cocoapods.org>'
use_modular_headers!
target 'App-iOS' do
platform :ios, '13.0'
end
Any idea why I am still getting this error and warning, even though I have clearly implemented the fix in the Podfile? Any help is much appreciated.Matti MK
10/19/2021, 6:51 AMuse_modular_headers
and instead use the use_frameworks!
under the target in which you consume the pod?use_modular_headers
jimmyt
10/19/2021, 12:53 PMuse_frameworks!
in place of use_modular_headers!
. I also tried them both together, since the first error message says I need to enable modular headers. I continue to get the same error and warning.Matti MK
10/19/2021, 12:53 PMjimmyt
10/19/2021, 12:57 PMIgor Maric
10/19/2021, 2:35 PMjimmyt
10/19/2021, 4:19 PMExecuting of 'pod gen --use-libraries --platforms=ios --gen-directory=/Users/username/Project/shared/build/cocoapods/synthetic/IOS --sources=<https://cdn.cocoapods.org> /Users/username/Project/shared/shared.podspec' failed with code 1 and message:
[!] Automatically assigning platform `iOS` with version `13.0` on target `App-iOS` because no platform was specified. Please specify a platform for this target in your Podfile. See `<https://guides.cocoapods.org/syntax/podfile.html#platform>`.
As you can see, I have clearly implemented the fix for this issue in my Podfile and included a reference to the Podfile in build.gradle.kts
, but I continue to get this warning.--use-podfile --podfile-path=/Users/username/Project/iosApp/Podfile
and I also updated that Podfile to implement the fix for the modular-headers-related error in my original post:
source '<https://cdn.cocoapods.org>'
target 'App-iOS' do
pod 'web3swift.pod'
use_frameworks!
use_modular_headers!
platform :ios, '13.0'
end
When I run the modified "pod gen" command, instead of the error and warning in my original post, I get:
`Generating workspace in `shared/build/cocoapods/synthetic/IOS/shared``
`Open shared/build/cocoapods/synthetic/IOS/shared/shared.xcworkspace
to work on it!`
So my hunch was correct: Gradle isn't properly passing the Podfile to the "pod" command. Is there something I can do to correct this?