When trying to run a KMM iOS app from AppCode on an iPhone 13 simulator I get this in idea.log: Caus...
c
When trying to run a KMM iOS app from AppCode on an iPhone 13 simulator I get this in idea.log: Caused by: com.intellij.execution.ExecutionException: Unable To Install โ€œTestโ€ Failed to get FD to bundle executable at /Users/user/Library/Developer/CoreSimulator/Devices/83507766-1C3A-411B-807B-DB39447FCF06/data/Library/Caches/com.apple.mobile.installd.staging/temp.WuhDKR/extracted/Test.app/Test at com.jetbrains.cidr.execution.simulatorSupport.SimulatorProcessHandler.getException(SimulatorProcessHandler.java:437) ... 8 more
Prior to that error there is:
2022-04-06 12:01:32,193 [3164245]   INFO - s.plugins.gradle.GradleManager - Instructing gradle to use java from /Library/Java/JavaVirtualMachines/jdk-15.0.2.jdk/Contents/Home
2022-04-06 12:01:32,206 [3164258]   INFO - xecution.GradleExecutionHelper - Passing command-line args to Gradle Tooling API: --init-script /private/var/folders/18/6w3qbxs54js1qz5j9g2xl8xh0000gp/T/ijmapper.gradle --init-script /private/var/folders/18/6w3qbxs54js1qz5j9g2xl8xh0000gp/T/ijresolvers.gradle
2022-04-06 12:01:32,738 [3164790]   INFO -                         STDERR - Exception in thread "DisconnectableInputStream source reader" org.gradle.api.UncheckedIOException: java.nio.channels.AsynchronousCloseException
d
Hi @clhols did you ever resolve this? I encountered the same issue. It seems strange this isn't mentioned in the Gradle DSL guidance here, when it's a mandatory setting for running anything on device...
@Vyacheslav Karpukhin [JB] sorry to ping you directly but it's my last resort. I can't find any support pages specifically for this Apple Gradle Plugin DSL. Specific problem is the same as @clhols experienced above - is there a way to set the 'Team' and other code-signing parameters? These are mandatory for running on device, so it seems incomplete without.
v
@darkmoon_uk The "Failed to get FD to bundle executable" error was caused by incompatibility with a newer Xcode version. Please update the plugin to the latest version. Regarding the build settings: you can set them using
buildSettings.CODE_SIGN_*
. If a required build setting is not available via completion, you can use
buildSettings.custom()
to define an arbitrary buildsetting.
d
Perfect, thank you ๐Ÿ™
@Vyacheslav Karpukhin [JB] Sorry just one more: Is there any way to define flags to pass to
xcodebuild
? I'm exploring the API now but can't see it. It would enable use of Automatic Provisioning:
Copy code
error: No profiles for 'TestDevice.iosApp.TestDevice' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'TestDevice.iosApp.TestDevice'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'iosApp' from project 'iosApp')
v
No, this is not supported, unfortunately
d
I see from exploring API that this Gradle model of Apple projects can be very powerful; it would be great to see it have more documentation or exposure. Nice work. Hopefully it is planned...
Ok then, I will create a Provisioning Profile manually.
v
106 Views