CartoDB / mobile-sdk

CARTO Mobile SDK core project
https://carto.com/docs/carto-engine/mobile-sdk/
BSD 3-Clause "New" or "Revised" License
179 stars 65 forks source link

Could not build iOS using Xcode 14 #531

Closed teddichiiwa closed 1 year ago

teddichiiwa commented 1 year ago

Problem:

I encountered this issue "The C compiler is not able to compile a simple test program." when using latest code from master to build iOS xcframework with this command:

 python build-ios.py --profile standard+valhalla+nmlmodellodtree --use-metalangle --build-xcframework

Solution:

Remove 'i386' and 'armv7' from IOS_ARCHS (at scripts/build-ios.py).

Related

From Xcode 14 Release Notes, they said:

Building iOS projects with deployment targets for the armv7, armv7s, and i386 architectures is no longer supported. (92831716)

My clang version:

Apple clang version 14.0.0 (clang-1400.0.29.202) Target: arm64-apple-darwin22.3.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

mtehver commented 1 year ago

Thanks for reporting this. I have removed 32-bit architectures from default architectures, as Apple seems to have removed support for these in latest XCode. They can still be built on older XCode versions by manually adding --ios-arch=i386 --ios-arch=armv7 to command line.

teddichiiwa commented 1 year ago

Thank you @mtehver .