Implementing Xcode 4 External System Code

When I use Xcode 4 with an external build system like make, I lose code completion and syntax highlighting. Is there any way to fix this?

+6
source share
1 answer

The pretty ugly solution I used is to add an additional fictitious goal for iOS or Mac OS X, which I use only to complete the code and documentation.

Do something like this:

  • Add "Cocoa application" and specify its name <project name> -doc.
  • Add the files you want to edit to the new group, or use the newly created target group.
  • Make sure the files you want to edit are marked as members in the <project name> -doc target using the "Target Membership" section in the view on the right.

Now edit and create using your external build system.

If this is an iOS project, you can even take it one step further and add the optional "Empty Application" <project name> - the page target used to "cheat" Xcode to run your external application in the simulator or even on the device, if your external the build system knows how to sign and build universal or just normal binaries with the right architecture.

  • Add the target "Empty application" iOS and name it <project name> -run.
  • Edit the schema for <project name> -run and add the target of the external assembly as the target before the target <project name> -run.
  • Change the "Run ..." section for the <project name> -run scheme, indicating the executable path to the application package built by your external build system.

Now edit and create and run using the target <project name> -run, and it will call your external target and then run in the simulator or debugged on the device. I did this in conjunction with the target <project name> -doc, and it works great, just make sure you tag the files you are editing, only a member of the target <project name> -doc, or Xcode will try to create one for you things.

+8
source

Source: https://habr.com/ru/post/905089/


All Articles