RaghavPai
RaghavPai

Reputation: 672

Kotlin Multiplatform issue : Type 'org.gradle.api.tasks.Copy' property 'sign' doesn't have a configured value

I am trying to build a KMM project everything works fine in Android also in iOS simulator but when I connect an iOS device I get the below error .

FAILURE: Build failed with an exception.

My gradle wrapper properties has 7.4.1, I have used 7.2 version as well same issue.

If anyone can tell me how to resolve this gradle issue to get the framework library ready for iOS project it will be very helpful thanks.

Meanwhile I ll try to figure out myself will update if I find any solution.

Upvotes: 3

Views: 1390

Answers (2)

Matt.M
Matt.M

Reputation: 1148

The answer is that you need go to 'Build Settings' -> 'Code Signing Identify' and make sure that you have a signing certificate set. You'll need to make sure you have a Team selected in 'Signing & Capabilities' as well.

Xcode Build Settings

Upvotes: 2

user3296773
user3296773

Reputation: 61

Looks like you are missing EXPANDED_CODE_SIGN_IDENTITY. Xcode sets this variable if you select an iOS device. For a simulator In my case, it sets it to -. Kotlin multiplatform plugin requires this variable to be set for embedAndSignAppleFrameworkForXcode to work properly here.

I think updating Xcode may help. alternatively, you can set EXPANDED_CODE_SIGN_IDENTITY to - if it is not defined.

To do this just update your run script phase:

: "${EXPANDED_CODE_SIGN_IDENTITY:=-}"
./gradlew :shared:embedAndSignAppleFrameworkForXcode

Hopefully, it will help.

Upvotes: 2

Related Questions