How to build Cocos2d-x project on Apple M1 mac simulator

Hello has anyone encountered this error before ? I am using Xcode 15.0.1, cocos2d-x version 3.17.1 on an Apple M1 mac

Building for 'iOS-simulator', but linking in object file (/Users/Im/Library/Developer/Xcode/DerivedData/BipolarBall-bshaqqtsxprdrffegizaqaqjqsve/Build/Products/Debug-iphonesimulator/libcocos2d iOS.a[743](btCollisionAlgorithm.o)) built for 'iOS'

I’ve got the same error. Have you managed to fix it?