How to compile framework for Mac Catalyst on Xcode 12?

819 views Asked by At

I have been trying to compile the aws-sdk-ios for Mac Catalyst but I wasn't successful yet. Below there is the script that I use to compile for armv7 and x86_64 (simulator).

# Build .a files
xcodebuild ARCHS="i386 x86_64" \
    ONLY_ACTIVE_ARCH=NO \
    -configuration Debug \
    -project "${project_path}" \
    -target "${project_name}" \
    -sdk iphonesimulator \
    SYMROOT=$(PWD)/builtFramework 

xcodebuild ARCHS="armv7  arm64" \
    ONLY_ACTIVE_ARCH=NO \
    -configuration Release \
    -project "${project_path}" \
    -target "${project_name}" \
    -sdk iphoneos  \
    SYMROOT=$(PWD)/builtFramework 

This correctly compiles the project and results into these folders:

Folders

I tried to compile the project for Mac Catalyst with multiple variations of the code below (based in multiple examples on the internet):

xcodebuild ONLY_ACTIVE_ARCH=NO \
    -project "${project_path}" \
    -target "${project_name}" \
    -destination "generic/platform=macOS,variant=Mac Catalyst,name=Any Mac"
    SYMROOT=$(PWD)/builtFramework

This seems to not create any Release-maccatalyst folder or anything else, even adding these flags:

SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES SUPPORTS_MACCATALYST=YES

Or these:

ARCHS="x86_64" VALID_ARCHS="x86_64"

(Also tried with x86_64h, no luck)

With the ARCHS flags above, the compilation fails with these errors:

enter image description here

I am not sure what I need to do to compile the project, anyone could please help me to find the correct script to create the .framework for Catalyst?

Regards, Pedro

0

There are 0 answers