# App code was invalid

**URL:** <https://community.particle.io/t/app-code-was-invalid/11012>\
**Category:** Getting Started\
**Created:** [April 1, 2015, 4:06am UTC](https://community.particle.io/t/app-code-was-invalid/11012 "2015-04-01T04:06:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bendrix](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bendrix/32/5001_2.png) [@Bendrix](https://community.particle.io/u/Bendrix)\
**Post date:** [April 1, 2015, 4:06am UTC](https://community.particle.io/t/app-code-was-invalid/11012/1 "2015-04-01T04:06:08Z")

</div>

When I attempt to compile a program in Spark Dev on my Mac, I get the error App Code was invalid. I developed the code on the Web IDE so I know it compiles, loads and runs. Copied and pasted that code to the Spark Dev. Saved it to folder Documents \> Spark \> TempLight1 \> TempLight.ino Also did a save to \>TempLight2 \> TempLight.cpp

Neither program will compile. Have quit and restarted Spark Dev, re-opening files, and still will not compile.

Is there some black magic to the directory structure, the file naming? Am I missing files because I cut and pasted the code?

Trying to File \> New does not create a helpful directory either, as it does in the Arduino IDE.

Explicit help on directory structure required and exactly how to start a new project in the Spark Dev IDE would be much appreciated.

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [April 1, 2015, 6:47am UTC](https://community.particle.io/t/app-code-was-invalid/11012/2 "2015-04-01T06:47:38Z")

</div>

Possibly there is an answer for you already in some of the other threads with this or similar titles.

[In one of them you’ve parallel posted already.](http://community.spark.io/t/spark-dev-app-code-was-invalid/8289/24)

---

<div class="post-metadata">

**Author:** ![Moors7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/moors7/32/588_2.png) [@Moors7](https://community.particle.io/u/Moors7)\
**Post date:** [April 1, 2015, 8:26am UTC](https://community.particle.io/t/app-code-was-invalid/11012/3 "2015-04-01T08:26:03Z")

</div>

Since this is just a repost of the question you asked in the topic @ScruffR pointed out, I’m going to close this topic in order not to flood the forum with reposts. This topic will be closed automatically 6 hours after the last reply. Should you feel this topic needs to remain open, even though it’s a repost, let me know.

---

<div class="post-metadata">

**Author:** ![Moors7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/moors7/32/588_2.png) [@Moors7](https://community.particle.io/u/Moors7)\
**Post date:** [April 1, 2015, 2:26pm UTC](https://community.particle.io/t/app-code-was-invalid/11012/4 "2015-04-01T14:26:11Z")

</div>

This topic was automatically closed 6 hours after the last reply. New replies are no longer allowed.
