Paddy O'Brien
09/20/2022, 8:31 PMxcodebuild -create-xcframework -framework
But using the same config for an xcframework created using xcodebuild -create-xcframework -library
fails.
Get an error that there are undefined symbols for the target arch Undefined symbols for architecture arm64:
If I lipo -thin arm64
the .a and then search for the symbols using strings
the symbols are presentdarkmoon_uk
09/30/2022, 1:06 PMdarkmoon_uk
09/30/2022, 1:07 PMPaddy O'Brien
09/30/2022, 1:07 PMdarkmoon_uk
09/30/2022, 1:07 PMdarkmoon_uk
09/30/2022, 1:08 PMdarkmoon_uk
09/30/2022, 1:08 PMdarkmoon_uk
09/30/2022, 1:09 PMxcodebuild
for Device
â—¦ `xcodebuild`for Simulator
â—¦ `xcodebuild`to combine those two .frameworks
to an XCFrameworkdarkmoon_uk
09/30/2022, 1:10 PMPaddy O'Brien
09/30/2022, 1:10 PMxcodebuild -create-xcframework -library
unfortunately thats what we are being given by a third partydarkmoon_uk
09/30/2022, 1:10 PM.podspec
filedarkmoon_uk
09/30/2022, 1:11 PMvendored_frameworks
field to point to the XCFramework.darkmoon_uk
09/30/2022, 1:11 PMPaddy O'Brien
09/30/2022, 1:11 PMdarkmoon_uk
09/30/2022, 1:12 PMdarkmoon_uk
09/30/2022, 1:12 PMdarkmoon_uk
09/30/2022, 1:12 PMdarkmoon_uk
09/30/2022, 1:12 PMdarkmoon_uk
09/30/2022, 1:12 PMPaddy O'Brien
09/30/2022, 1:15 PMPaddy O'Brien
09/30/2022, 1:17 PMPaddy O'Brien
09/30/2022, 1:17 PMLandry Norris
09/30/2022, 3:08 PMPaddy O'Brien
09/30/2022, 3:55 PMLandry Norris
09/30/2022, 3:55 PMLandry Norris
09/30/2022, 3:57 PMlinkerOpts.linux = ...
linkerOpts.iosX64 = ...
linkerOpts.iosSimulatorArm64 = ...
linkerOpts.iosArm64 = ...
and it would look up the proper line based on the architecture/os at link time.Paddy O'Brien
09/30/2022, 4:21 PMLandry Norris
09/30/2022, 4:22 PMLandry Norris
09/30/2022, 4:23 PMPaddy O'Brien
09/30/2022, 4:24 PMLandry Norris
09/30/2022, 4:24 PMLandry Norris
09/30/2022, 4:24 PMcompilerOpts.ios = ...
compilerOpts.iosX64 = <more specific args>
if you have some args that don’t depend on architecture, but I haven’t thoroughly tested that.