sentry-cocoa icon indicating copy to clipboard operation
sentry-cocoa copied to clipboard

Specify better `-destination` in `build-xcframework.sh`

Open armcknight opened this issue 1 year ago • 1 comments

Description

currently we specify the -sdk to xcodebuild, but this is a fragile approach and should be replaced with -destination. Currently, it is warning that it will choose the first from a set of possible destinations, and this can sometimes lead to it choosing the wrong one. I've seen this happen when it chooses a macOS destination when building for iOS, and also choosing the wrong macOS architecture (x86_64 vs arm64).

https://github.com/getsentry/sentry-cocoa/actions/runs/9866174689/job/27244481851#step:3:3981

image

armcknight avatar Jul 10 '24 00:07 armcknight

For macOS catalyst we use -destination and the same warning appears. I believe the solution should involve a query for the specific SDK before compiling it, to ensure the desire destination exists.

brustolin avatar Jul 10 '24 06:07 brustolin

Closing this as not planned until we actually see issues coming from it. Seems fine now.

armcknight avatar Jul 18 '25 00:07 armcknight