Without the setting enabled for the *Simulator target, I was getting errors like Sandbox: cp(17543) deny(1) file-read-data ~/Library/Developer/Xcode/DerivedData/HelloWorldSimulator-faoqtafrajfltffcshyvcyuorads/Build/Products/Debug/libHelloWorldSimulator.dylib. I figured out the issue when I found a stackoverflow post (that I can't seem to link here) that pointed me to that setting.
Also it shouldn't be necessary to create a whole new HelloWorldSimulator project - just a new target + scheme in the xcodeproj created by cmake .. -G "Xcode". Also makes me wonder, where does that code live and can I edit that to create this *Simulator target/scheme for me automatically? Or at least the bones.
There are no user scripts with the sample projects so enabling ENABLE_USER_SCRIPT_SANDBOXING should have no effect. I have seen Xcode get confused occasionally when trying to open a built dylib but quitting or cleaning the project usually resolves the issue. EDIT: I take that back, CMake is creating build scripts on our behalf. That said, I can build without script sandboxing disabled.
I'm not 100% sure what you mean about creating a "whole new project", could you explain what you mean a bit more? CMake is generating the Xcode project from scratch based on the CMake files in the C_API/buildsupport folder and the per example CMakeLists.txt files.
Sorry I should have been more clear. I was specifically referring to the documentation that described how to set up an Xcode IDE with the Simulator. It seems to work well for simple plain C games, but I couldn't get the example games with Lua to work yet. Here's a link to the documentation that needs updating: 2.6.2/Inside%20Playdate%20with%20C.html#_xcodemake
Noticed there's a similar thread here: t/compile-on-xcode-15/14296
also strange I can't seem to post a link to the playdate website. Is that an intentional security feature?
OK, you're specifically talking about manual Xcode configuration with Make, not using CMake. I'll add that note to our documentation, this security feature was added to Xcode after we wrote our docs so we need to update them. Thanks for the note!
Also I tried but I’m a total newbie to CMake. It seems like the simulator target and scheme should be able to be automatically generated too, though not sure how to set some of the scheme specific things. I’ll keep learning and working on this unless someone else beats me to it!