2

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

Pedro Paulo Amorim
  • 1,838
  • 2
  • 27
  • 50
  • Catalyst is an emulator of iOS on macOS - you just build framework as for iOS and it will be used by iOS application in Catalyst environment. – Asperi Nov 26 '20 at 04:55
  • @Asperi Shoudn't the framework be inside a folder like `Release-maccatalyst`? How I will be able to create the fat lib with this configuration? – Pedro Paulo Amorim Nov 26 '20 at 10:09
  • 1
    No dedicated binary. Just iOS+macOS, as usual. – Asperi Nov 26 '20 at 10:16
  • Thanks for the answer! You are helping a lot so far. I have the script here in hands, could you please check if this is correct? You might want to copy it and paste as the answer so I can close this issue: https://github.com/T-Pro/aws-sdk-ios/blob/master/Scripts/package_sdk.sh#L57-L64 – Pedro Paulo Amorim Nov 26 '20 at 10:23
  • @PedroPauloAmorim hey, did you found a solution/working script? thanks – Radu Ursache Sep 19 '21 at 15:01

0 Answers0