Skip to content

Import an existing project

The manual procedure for importing an existing project from a standard IDE into embedXcode consists on four steps:

Create a new project

To import an existing project,

  • Create a new project with Xcode as described in the procedure Create a new project .

  • Call the menu Product > Build or press Cmd+B or click on the Run icon to perform the preparation of the project as described in the procedure Prepare the project .

  • Ensure Xcode shows the Project Navigator.

  • If necessary, select the Project Navigator.

Drag-and-drop headers and code files

  • Open the folder with the existing project from a standard IDE.

  • Select all the files except the .ino main sketch, drag-and-drop them on the left pane on top of the .ino main sketch.

  • Check Copy items if needed to make a copy and select the target Index to ensure code-sense.

Copy-paste the main sketch

  • Open the .ino main sketch with Arduino, select all the code and paste it on the main sketch on Xcode, in this example embed.ino.

  • Make sure to keep the pre-processing statements #include, as they are required by embedXcode.

For more information,

Check additional parameters

Depending on the project, some additional steps might be required.

  • If functions are called before they are defined, declare prototypes for them.

For more information on prototypes,

Finally, if the sketch calls libraries,

  • List them in the main Makefile.

For more information on libraries,

A special section is dedicated to compatibility between standard IDEs and embedXcode. For more information,