leetal / ios-cmake

A CMake toolchain file for iOS/iPadOS, visionOS, macOS, watchOS & tvOS C/C++/Obj-C++ development
BSD 3-Clause "New" or "Revised" License
1.91k stars 450 forks source link

fix: broken code signing #208

Closed okwasniewski closed 4 months ago

okwasniewski commented 4 months ago

I've integrated ios-cmake from the latest commit into https://github.com/BabylonJS/BabylonNative Playground app generation and after this commit: b65d89496c1cbd53b194fbfb13ac44157f9850d4 code signing stoped working on real devices. Unsettling this makes the app work as expected again.

This is the error I was getting: https://github.com/BabylonJS/BabylonNative/issues/1404

I couldn't find any reason this change was introduced (it was just pushed to main) maybe I'm missing something but I think it shouldn't be the default option as it breaks the builds.

kambala-decapitator commented 4 months ago

this change is needed to build libs / frameworks or e.g. to build app without signing

in your case you should set the same property on your app target to YES

leetal commented 4 months ago

As @kambala-decapitator said, the reason for adding this to the toolchain was that it fixes more issues than it creates. If you need code signing, just add it to your own CMakeLists.txt or as an argument -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=YES to your build.

okwasniewski commented 4 months ago

Thanks for the explanation! I think it might be worth mentioning in the release notes (once you release the next version).