Arduino on Xcode Project — Official Thread

So I have a little more info, maybe it will help. I removed all the libraries from my \library\ folder and tried to rebuild my project xcode and it worked, no errors. Then I started adding libraries back, and re-built. Sometimes it build successfully, and sometimes I got errors. For example, when I added a twitter.h library in, I got errors (see screenshot). Another library that gave me errors was EthernetDHCP.

Thank you for your investigation.

Does the header of the libraries always include the statement

#include "Arduino.h

I looked at 3 libraries that had errors and none of them have arduino.h

As recommended at Writing a Library for Arduino,

You need a couple of other things in the header file. One is an #include statement that gives you access to the standard types and constants of the Arduino language (this is automatically added to normal sketches, but not to libraries). It looks like this (and goes above the class definition given previously):

#include "Arduino.h"

Have you followed the procedure detailed in section 7.2. Solution to Most Common Issues

Q: Does the sketch compiles normally on the standard IDE?
A: If the sketch doesn’t compile on the standard IDE, then the error isn’t generated by Xcode or embedXcode alone.

I'll try including Arduino.h to the libraries and see if that helps. If that's the problem I would think lots of other people would have come across this before me.

I do check to see if the sketch compiles in the Arduino IDE. Right now my sketch is empty, I'm just trying to create an empty project.

For your user manual in slideshere.net, the hyperlinks to outside sites work, but the links to other sections in the pdf do not. Can you enable the save option so users like me can just download the PDF from slideshare.

Thanks for your help with getting this to work for me. I hope I get it figured out, I look forward to using XCode with my Arduino.

I still haven't figured out all my compile error problems on a new install; maybe #include "Arduino.h" will fix it. But I can compile okay if I remove all the libraries from my library folder, which I've done for the time being. But I seem to be having a problem with the Automatic Procedure. I Created a new project (test4) as described in step 3.1 and select Build as my target then Run.
I didn't get any build errors, but when I compared my project to step 3.1.2, I see that the identity and type for test4.ino is still plain text. It didn't change the settings in the External Build Tool Configuration and didn't add the Arduino directories under sketchbook. It's like the Automatic Procedure isn't running.

Thank you for answering this two questions survey.

The answers will help me to focus on the most popular platforms.

Survey: http://rei-vilo.polldaddy.com/s/using-embedxcode-with

ScottG:
I seem to be having a problem with the Automatic Procedure. I Created a new project (test4) as described in step 3.1 and select Build as my target then Run.
I didn't get any build errors, but when I compared my project to step 3.1.2, I see that the identity and type for test4.ino is still plain text. It didn't change the settings in the External Build Tool Configuration and didn't add the Arduino directories under sketchbook. It's like the Automatic Procedure isn't running.

Any suggestions for me? I'd really like to get this working. It seems like the Automatic Procedure isn't running.

ScottG:

ScottG:
I seem to be having a problem with the Automatic Procedure. I Created a new project (test4) as described in step 3.1 and select Build as my target then Run.
I didn't get any build errors, but when I compared my project to step 3.1.2, I see that the identity and type for test4.ino is still plain text. It didn't change the settings in the External Build Tool Configuration and didn't add the Arduino directories under sketchbook. It's like the Automatic Procedure isn't running.

Any suggestions for me? I'd really like to get this working. It seems like the Automatic Procedure isn't running.

Could you please send me a copy of the log navigator when you launch the Build? Feel free to use the contact form at http://embedxcode.weebly.com/contact.html.

What's the log navigator?

ScottG:
What's the log navigator?

Please find the screen capture attached.

Sorry, but I can't provide support for Xcode.

I strongly recommend you to refer to the book Xcode 4 Unleashed by Fritz F. Anderson I purchased thanks to contributions.

If I can get this working, I'll definitely get the book and learn xcode. Arduinos are the only thing I program, so I don't want to invest time in learning xcode if I can't get this working.

Attached is a screenshot of the log and also I cut and pasted it into a text file.

xcode build log.txt (136 KB)

The build log you sent me is successful.

As detailed in §3.1. Automatic Procedure,

However, as the automatic procedure can only be launched once, they are detailed in the next section.

Please create a new project and send me the build log of the very first build.

avenue33:
Please create a new project and send me the build log of the very first build.

See attached

Xcode Log for test7.txt (122 KB)

The light is green so compilation is successful.

avenue33:
The light is green so compilation is successful.

I know, but EmbedXCode didn't do any of the stuff described in step 3.1.2. The automatic procedure is supposed to prepare the project by adding setting the file type for .ino files to C++, setting click to error , adding core libraries etc. It didn't do any of those things.

Ok. Create a new project and then go inside

folder_for_Xcode_projects/embed1/embed1/Utilities

and check if embedXcode_prepare is inside.

Once you have launched the first compilation, embedXcode_prepare is used and then deleted.

Capture d’écran 2013-04-08 à 18.25.59.png

avenue33:
Ok. Create a new project and then go inside

folder_for_Xcode_projects/embed1/embed1/Utilities

and check if embedXcode_prepare is inside.

Once you have launched the first compilation, embedXcode_prepare is used and then deleted.

I created Test8 and I do see embedXcode_prepare. It's also in my previous project (test7), but it's colored red, maybe that means it's deleted. Attached are screen shots for both.

For test8, could you please launch Build and send me the history log.

avenue33:
For test8, could you please launch Build and send me the history log.

see attached

embedxcode test8 log.txt (135 KB)