Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Objective-C Basics (Retired) Introduction to Objective-C From Structs to Objects

rtprjct
rtprjct
30,548 Points

Build failed for the project download files in xcode 6.1... "could not read data... "

Source code won't run:

could not read data from '/Users/myloc/Documents/WebDev/Lessons:Source Code/sphere_class/MyFirstObjectiveCProgram/MyFirstObjectiveCProgramTests/MyFirstObjectiveCProgramTests-Info.plist': The file “MyFirstObjectiveCProgramTests-Info.plist” couldn’t be opened because there is no such file.

I tried looking on forums for people with same problem, and found quiete a few, however they said their issue was resolved when the TTH teachers updated the download to work for xcode 6.1?

Not sure what to do

5 Answers

Rami Ammoun
Rami Ammoun
7,468 Points

I had the same problem, I tried to fix the file path as following: Navigated to the project (select it in the Project navigator), select the application target in the list of targets, then click the Build Settings tab. Under the Packaging section, made sure the "Info.plist File" is properly set to the location/file name. But it didn't work.

I then downloaded the project templates, I placed a copy of the folder 'MyFirstObjectiveCProgram' on the Desktop. I created the sphere file in the project navigator, then pasted the same code to main.m Sphere.h Sphere.m

It worked but I have no clue about how and why.. hope this works with you as well

Margherita Serino
Margherita Serino
6,773 Points

I have the same problem... what's wrong?

I have the same problem...

Rami Ammoun
Rami Ammoun
7,468 Points

Make sure your project folder name has NO spaces and try building again

Confirmed no spaces in any folder.

The error msg is as below. But I do see the MyFirstObjectiveCProgramTests-Info.plist in the folder.

(null): could not read data from '/Users/.../.../Work/Coding/TreeHouse/Development/12_sphere_class/MyFirstObjectiveCProgram/MyFirstObjectiveCProgramTests/MyFirstObjectiveCProgramTests-Info.plist': The file “MyFirstObjectiveCProgramTests-Info.plist” couldn’t be opened because there is no such file.

Thanks for your help though.

Rami Ammoun
Rami Ammoun
7,468 Points

remove the underscores from the name of the project folder (12_sphere_class) and use the camel casing instead (12SphereClass), it should work then

I tried. Still doesn't works.

BTW, the lecturer in the video does use underscore in the file name.

Rami Ammoun
Rami Ammoun
7,468 Points

hmmmmm sorry for that, try using the project templates in the lecture or moving your current project folder to desktop. I wish i was more helpful

Jose Ramos
Jose Ramos
1,908 Points

Download the project templates (NOT the completed project) and build it out. You should not have the error.

And from a time-efficiency standpoint, when you download and open up the templates, run the program with the NSLog "hello world" to make sure your build succeeds before proceeding any further.

This is assuming you have Xcode 6+. I was getting the same error as OP mentioned.

Riley Strong
Riley Strong
1,332 Points

The problem is not that a file is in the wrong place, but that there are 2 targets for the Xcode project: the app and tests. You need to delete the test target. Stack overflow has good instructions: http://stackoverflow.com/questions/26324163/xcode-how-to-delete-target-in-xcode-6-1

Here is my video of how to delete the test target to get the project working again for 6.1 https://www.youtube.com/watch?v=LYtzCztcZQg