I have an xcodeproj file which was generated by Cmake. Xcode generates an executable but not an app. What do I need to do in order to get Xcode to create an app containing the executable? Gene
Getting Xcode to create an app bundle
You need to add an App target to the project to build an app bundle.
Choose File > New > Target in Xcode to create the App target.
When I do that, it sets up a pair of swift files. I have C code that I want to use which currently compiles and runs on the command line in macOS. I am trying to get this "function" to run in iPadOS. I have destinations, etc set up for iOS and it compiles the code for iOS but does not wrap it up as an app. I have seen C++ used in an app target. Do you have any suggestions for how to include the code into an app for iOS?
I have not developed an iOS app in C++ so I can't give you a specific solution.
I know that you need an App target to build an app bundle. When adding the App target in Xcode, choose Objective-C from the Language menu instead of Swift. Objective-C works better with C++ than Swift does.
You have to add the C++ files to the App target to get them to build. Open Xcode's file inspector by choosing View > Inspectors > File. The file inspector has a Target Membership section. Make sure the checkbox is selected for the App target.
One other thing you might have to do is change the extension of the Objective-C files to .mm
to make them Objective-C++ files.