Reputation: 672
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.
Type 'org.gradle.api.tasks.Copy' property 'sign' doesn't have a configured value.
Reason: This property isn't marked as optional and no value has been configured.
Possible solutions:
Please refer to https://docs.gradle.org/7.4.1/userguide/validation_problems.html#value_not_set for more details about this problem.
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
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.
Upvotes: 2
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