'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.
- What went wrong:
A problem was found with the configuration of task ':shared:embedAndSignAppleFrameworkForXcode' (type 'Copy').
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:
- Assign a value to 'sign'.
- Mark property 'sign' as optional.
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.
Solution 1:[1]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | user3296773 |