diff --git a/gradle-plugin/src/main/kotlin/com/alecstrong/cocoapods/gradle/plugin/CocoapodsCompileTask.kt b/gradle-plugin/src/main/kotlin/com/alecstrong/cocoapods/gradle/plugin/CocoapodsCompileTask.kt index 5298a30..838b1c8 100644 --- a/gradle-plugin/src/main/kotlin/com/alecstrong/cocoapods/gradle/plugin/CocoapodsCompileTask.kt +++ b/gradle-plugin/src/main/kotlin/com/alecstrong/cocoapods/gradle/plugin/CocoapodsCompileTask.kt @@ -90,6 +90,18 @@ open class CocoapodsCompileTask : DefaultTask() { exec.executable = "/usr/libexec/PlistBuddy" exec.args = listOf("-c", "Delete :UIRequiredDeviceCapabilities", plistPath) }.rethrowFailure().assertNormalExitValue().exitValue + + // Clear supported platforms + project.exec { exec -> + exec.executable = "/usr/libexec/PlistBuddy" + exec.args = listOf("-c", "Delete :CFBundleSupportedPlatforms:0", plistPath) + }.rethrowFailure().assertNormalExitValue() + + // only add iPhoneOS as supported platform + project.exec { exec -> + exec.executable = "/usr/libexec/PlistBuddy" + exec.args = listOf("-c", "Add :CFBundleSupportedPlatforms:0 string iPhoneOS", plistPath) + }.rethrowFailure().assertNormalExitValue() } } } \ No newline at end of file