Can't compile for iOS in xcode now

Apple did something with xcode in the Fall, and I’ve unable to run in the simulator ever since. Mac project still works great, but I’ve tried and tried to get the iOS simulator to work (or my device in debug mode), to no avail.

Today, I’ve followed some suggestions (there are tons of suggestions online, but lots of people are having no luck), and now I’m getting a linking error:

clang: error: no such file or directory: ‘/path/to/my/Products/Debug-iphonesimulator/libcocos2d iOS.a’

If anyone has any suggestions, please let me know, as I keep trying to resolve this. Sometimes I hate Apple.

Hi,
Not sure it is related but I had the same kind of issue after a Big Sur installation, using Cocos v3.
If it can help:
Check in your Build Settings > User-Defined > VALID_ARCHS, try to change
arm64 armv7
by
arm64 armv7 x86_64

Thanks much, I’m giving that a try, still struggling. Can you tell me what you have set for

  • Build Active Architect Only
  • Excluded Architectures

thanks again

@dogwalker I am able to run on iOS using 3.17.2 with latest xcode.

I have to delete this VALID_ARCHS, after that i am able to run on simulator.


By this two steps I am able to run on iOS simulator successfully.

Thanks, smipatel88. Unfortunately, when I do that, I get a different error - a linking error saying that “libcocos2d iOS.a” cannot be found.

Other settings I have:

  • Architectures: $(ARCHS_STANDARD)
  • Build Active Architecture Only: No (I think I’ve also tried Yes)

On the right side, my Project Format is Xcode 3.2-compatible. I’ve also tried 9.3.

Thanks,
Dogwalker

I’m working with the last version of Xcode (12.3). If I well remember I had success with a new project generated by cocos (just changing the User-Defined value as written in my first post). Else I have $(ARCHS_STANDARD) is arm64 armv7 and Build Active Architecture Only was YES in debug and NO in release but I’m not sure about those values.