i have a weird problem .. maybe the solution is simple but i'm just a newbie in iPhone app development
the problem is:
i have created xcode iphone project , tested is and it was running well.
copied the project folder to my desktop . opened the project from the new location . tried to run the app, the simulator opens and the application crashes!!
any solution ? is there anything i need to clean in the project
files ?
Maybe you're using absolute paths in your code ?
Maybe something with additional resources you added before.
Try to look first for those kind of things.
In xcode, Go through every file in your project that resides within your project folder, right click on them in the hierarchy tree to the left, select get info, go to the general tab and change the Path Type to "Relative to Project"
What sort of project did you create?
I created a simple View-based application in my Documents folder. I built and ran it in the simulator successfully. I then quit Xcode, dragged the project folder to the desktop. I reopened the project and ran it successfully in the simulator again.
Did you make any changes at all to the project? I can't repeat what you've experienced. Is there anything different between what we did?
How about creating your project on the desktop in the first place? Does that work?
Are you running as an administrator account? Sometimes there are problems with Xcode if you run in an account where the user isn't a member of the Dev group.
Related
I am almost ready to release my iphone app. I use restkit for consuming my webservice. When I archive, it fails with this error:
cp: /Users/myusername/Library/Developer/Xcode/DerivedData/project-name-/ArchiveIntermediates/project-name/IntermediateBuildFilesPath/UninstalledProducts/include/RestKit: No such file or directory
I dragged & dropped restkit into the project. It builds and works fine in debug mode. I am guessing it is unable to locate restkit dir while archiving. But I am not sure why. Any thoughts?
I've had trouble linking with my own framework in the past, but I have a procedure that works. Even though I don't understand it, it works so I follow it like voodoo, and I don't risk angering the gods by asking too many questions.
Here's what I'd try on your project (again, partly voodoo here):
Navigate to the Frameworks folder in the project nav, select the RestKit and delete it with the delete key. Just delete references.
Using Finder, option-drag (copy) the framework from wherever you first got it
(~/Downloads, or another project or wherever) into your project directory, replacing files if prompted.
Back in your project, select the project, then the target, then build phases.
Open the link binary section, hit "+", then the "Add Other.." button on the bottom of the dialog
Browse to the framework you copied in in step 2.
See if you can clean, build, archive. Easy enough to try, and no livestock are harmed. Hope it works for you.
Since moving to XCode4, I have been getting errors like:
/VERSION: No such file or directory
cp: /javascripts/phonegap..js: No such file or directory
cp: /javascripts/phonegap..min.js: No such file or directory
error: /VERSION: No such file or directory
for projects that were working under XCode3.
Open XCodes Preferences, and navigate to Source Trees. If there is no PhoneGapLib entry there, try adding a new setting with the following values:
Setting Name: PHONEGAPLIB
Display Name: Phone Gap Lib
Path: /Users//Documents/PhoneGapLib
Note that the path should be to the location of your PhoneGapLib folder, and that it may not be in your documents folder, depending on how you installed PhoneGap.
I just learned about a great web service recently made available by Nitobi (makes of PG), which will automatically generate the necessary PhoneGap files you need for use in Xcode 4.
Just enter your project name, hit a button and they'll generate a zip file for you to download. This lets you set up a new project without messing with the command line.
You could set up a new project, then migrate your older project files over.
Did you search Google for this error?
I'm a bit of a noob with PhoneGap and Xcode still, but I know there have been recent issues with PG and Xcode 4. Perhaps you're experiencing the same issues as the commenters to this post: PhoneGap + XCode4 (and more specifically, here).
Today I started xcode and opened my project and the code is different, it have lost its colors, for each variable, nsstring ect..
when i build my project into my iphone, i dont get the GUI im making.. no matter what changes im making in xcode, im getting the GUI as when i builded it here in the morning..
What chould have happend and what can i do?
Thanks.
Delete your build folder and retry.
If you don't know where to find your Build folder got to:
/Users/%USERNAME%/Library/Developer/Xcode/DerivedData/%projectname*/
That is the default folder for XCode 4 to place the projects buildfolders in.
Edit***
Sorry, forgot one folder.
I created an app with Appcelerator's Titanium Mobile on my home machine. The path was /Users/[myusername]/Projects/ProjectName.
I checked my code into Mercurial.
The next day, at my office computer, I cloned the Mercurial repo, and then added the existing app. I tried to run it in the simulator and received the error:
could not find the file app.js.
I looked at the log and noticed that the path it was looking for was the path on my home computer, not the path on my office computer.
What can I do to make my app run on two different computers? I imagine that if I created a new app and then copied my code into it, it would probably work on the office machine. But if I checked my code in, and got latest at home it would probably be broken there.
Open tiapp.xml
Remove the line. f01a795a-46e7-4627-8558-465e5998c99d
Do a full rebuild
Bring guid tag back (just to make sure you still have it on tiapp.xml)
Do a full rebuild again.
Here's the source:
http://www.limechalk.com/blog/fix-runtime-error-when-running-appcelerator-app-on-android-emulator/
Can you re-create a new project? copy your files tiapp.xml as well as folder Resources to your new project and build again.
This issue mainly caused by JavaScript minification,either you have syntax error in one or more js files or which is hard to predict may you have some other files in you project that are not js files and cause this failure to build and then this common error .
my two cents open up you project files and look carefully for any file or files that are not supposed to be in it.
I always use one folder on my filesystem for an Xcode project. It contains all project files. When I zip it and send it to a friend, she can't just ipen the xcodeproj file. It opens, but all paths are broken and build fails because all the classes don't find the #include'd files. But when I download i.e. some example projects from apple, these work perfectly. What am I doing wrong?
UPDATE:
I'm doing it like this:
1) I create a project and specify an directory on my desktop
2) In that directory I create an "images" directory and add images to it
3) I pull this images directory out and drag it into the Resources Groups&Files. Xcode asks if I want to copy it to destination folder, I click no. Because it's already there. All other things are set to default.
4) all other things are just created within xcode, and xcode just puts all classes in the Classes directory of my project.
5) when I want to add images, I first put them in the directory of the project, and from there drag them into the Images group in xcode. That's to make sure xcode doesn't mess them up with everything else. Otherwise it would just copy them to the root of my project directory rather than inside the Images directory, which doesn't make sense. In fact, the whole Groups&Files filesystem doesn't make sense at all, it's one big mess. Apple's biggest mistake in Xcode so far. That's why I have to do such stupid things.
We don't really know exactly what you're doing so it's hard to see what you're doing wrong.
Perhaps inspect the xcode project files directly, see if you have hardcoded paths. That's a sure fire problem. Make sure you copy resources into the project instead of referencing them externally, etc.
I expect that you have "search path" build setting set to an absolute path on your machine, rather than a path relative to the project. Best way to tell is to post a portion of the build transcript from the failed build and look at the -I directives. If those paths don't exist on your friend's machine, then they should be changed from absolute paths to paths that start with ${SRCROOT}.
Are you just trying to build on the second machine or are you trying to deploy to a device on the second machine? If you are trying to deploy to a device (iPhone or iPod Touch) then it probably has something to do with Code Signing and Certificates.