Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.11.0 release breaks app using cocoapods #336

Open
jordond opened this issue Feb 14, 2025 · 4 comments
Open

0.11.0 release breaks app using cocoapods #336

jordond opened this issue Feb 14, 2025 · 4 comments
Labels
Platform: KMP Type: Bug Something isn't working

Comments

@jordond
Copy link

jordond commented Feb 14, 2025

Platform

Apple

Installed

Swift Package Manager

Version

0.11.0

Steps to Reproduce

  • On 0.10.0, gradle sync and ios build works fine
  • Update to 0.11.0, no longer able to sync

Expected Result

Sync and build just fine.

Actual Result

I am no longer able to sync. There is an error message saying that I am missing a cocopod dependency in my project. The dependency is still there and hasn't changed. Downgrading to 0.10.0 fixes.

@jordond jordond added Platform: KMP Type: Bug Something isn't working labels Feb 14, 2025
@github-project-automation github-project-automation bot moved this to Needs Discussion in Mobile SDKs Feb 14, 2025
@buenaflor
Copy link
Contributor

hey can you paste the log?

@romtsn romtsn moved this from Needs Discussion to Needs More Information in Mobile SDKs Feb 27, 2025
@romtsn
Copy link
Member

romtsn commented Feb 27, 2025

hi @jordond have you had a chance to look into this? We'd appreciate if you can add the log output here, thanks!

@jordond
Copy link
Author

jordond commented Mar 6, 2025

Sorry for the delay.

Here is the error output from gradle:

* Exception is:
Caused by: java.lang.IllegalStateException: 'pod install' command failed with code 1.
Error message:

        Please, check that podfile contains following lines in header:
        source 'https://cdn.cocoapods.org'

        Please, check that each target depended on composeApp contains following dependencies:
        pod 'MediaPipeTasksVision'
pod 'Sentry'
        
	at org.jetbrains.kotlin.gradle.utils.ProcessUtilsKt.runCommandWithFallback(ProcessUtils.kt:76)
	at org.jetbrains.kotlin.gradle.targets.native.tasks.AbstractPodInstallTask.runPodInstall(AbstractPodInstallTask.kt:89)
	at org.jetbrains.kotlin.gradle.targets.native.tasks.AbstractPodInstallTask.access$runPodInstall(AbstractPodInstallTask.kt:26)
	at org.jetbrains.kotlin.gradle.targets.native.tasks.AbstractPodInstallTask$runPodInstall$1.invoke(AbstractPodInstallTask.kt:94)
	at org.jetbrains.kotlin.gradle.targets.native.tasks.AbstractPodInstallTask$runPodInstall$1.invoke(AbstractPodInstallTask.kt:89)
	at org.jetbrains.kotlin.gradle.utils.ProcessUtilsKt.runCommandWithFallback(ProcessUtils.kt:74)
	at org.jetbrains.kotlin.gradle.targets.native.tasks.AbstractPodInstallTask.runPodInstall(AbstractPodInstallTask.kt:89)
	at org.jetbrains.kotlin.gradle.targets.native.tasks.AbstractPodInstallTask.doPodInstall(AbstractPodInstallTask.kt:55)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
	at org.gradle.api.internal.tasks.execution.TaskExecution$3.run(TaskExecution.java:244)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:30)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:27)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:67)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:60)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:167)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:60)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:48)
	at org.gradle.api.internal.tasks.execution.TaskExecution.executeAction(TaskExecution.java:229)
	at org.gradle.api.internal.tasks.execution.TaskExecution.executeActions(TaskExecution.java:212)
	at org.gradle.api.internal.tasks.execution.TaskExecution.executeWithPreviousOutputFiles(TaskExecution.java:195)
	at org.gradle.api.internal.tasks.execution.TaskExecution.execute(TaskExecution.java:162)
	at org.gradle.internal.execution.steps.ExecuteStep.executeInternal(ExecuteStep.java:105)
	at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:44)
	at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:59)
	at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:56)
	...
BUILD FAILED in 29s

It seems to be complaining because of another pod dependency: pod 'MediaPipeTasksVision'. However if I downgrade to 0.10 this issue goes away.

Here is my cocoapod setup in build.gradle.kts:

cocoapods {
    // ...
    ios.deploymentTarget = "15.4"
    podfile = project.file("../iosApp/Podfile")
    framework {
        baseName = "composeApp"
        isStatic = true
    }

    pod("MediaPipeTasksVision")
}

@jordond
Copy link
Author

jordond commented Mar 6, 2025

In the generated .podspec file, both are in there:

Pod::Spec.new do |spec|
    spec.name                     = 'composeApp'
    spec.version                  = '0.1.5'
    spec.source                   = { :http=> ''}
    spec.authors                  = ''
    spec.license                  = ''
    spec.vendored_frameworks      = 'build/cocoapods/framework/composeApp.framework'
    spec.libraries                = 'c++'
    spec.ios.deployment_target    = '15.4'
    spec.dependency 'MediaPipeTasksVision'
    spec.dependency 'Sentry', '~> 8.44.0'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: KMP Type: Bug Something isn't working
Projects
Status: Needs More Information
Development

No branches or pull requests

3 participants