Huanzhi Zhang
07/25/2023, 6:06 PMJeff Lockhart
07/25/2023, 6:44 PMassembleLibNameXCFramework gradle task to build the XCFramework. It will be located in the build/XCFrameworks directory.Huanzhi Zhang
07/25/2023, 6:55 PMJeff Lockhart
07/25/2023, 7:06 PMXCFramework() in the build.gradle.kts as you are. But this mechanism conflicts with the CocoaPods plugin, which has its own mechanism to build an XCFramework.
Try removing the code you shared and replace with just declaring the iOS targets:
iosX64()
iosArm64()
iosSimulatorArm64()
Then run the podPublishXCFramework gradle task.Huanzhi Zhang
07/25/2023, 7:46 PMHuanzhi Zhang
07/25/2023, 7:49 PMJeff Lockhart
07/25/2023, 7:53 PMJeff Lockhart
07/25/2023, 7:55 PMassembleXCFramework task won't work when using the CocoaPods plugin, as it configures conflicting tasks. So you should use podPublishXCFramework if using the CocoaPods plugin.Huanzhi Zhang
07/25/2023, 8:00 PMJeff Lockhart
07/25/2023, 8:36 PMpodPublishXCFramework publishes the XCFramework to build/cocoapods/publish.