Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Tools & Utilities

Reply
 
LinkBack Thread Tools Display Modes
Old 11-15-2011, 11:01 PM   #1 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 245
samurle is on a distinguished road
Default Fixing broken resource links?

Let's say I rename a project subdirectory through Finder. Then, when I open the project in Xcode 4, all the
source code and resource links are now colored red.

Is there an easy way to fix these broken links without having to include every single file again by hand?
samurle is offline   Reply With Quote
Old 11-16-2011, 10:22 PM   #2 (permalink)
Dr. Touch Cocoa Helpdesk
iPhone Dev SDK Supporter
 
Join Date: Sep 2008
Location: Vienna, Austria
Posts: 537
Oliver Drobnik is on a distinguished road
Send a message via AIM to Oliver Drobnik Send a message via MSN to Oliver Drobnik Send a message via Skype™ to Oliver Drobnik
Default

Quote:
Originally Posted by samurle View Post
Let's say I rename a project subdirectory through Finder. Then, when I open the project in Xcode 4, all the
source code and resource links are now colored red.

Is there an easy way to fix these broken links without having to include every single file again by hand?
It depends how you linked the files. In Xcode there are no folders, only groups (yellow) and folder references (blue). For each resource you can specify how the path is constructed. Ideally you have those set up relative to the group they are in. In that case all you need to do is fix the path of the group and that will correct the resources.

But you probably didn't think as much ahead ...

So the easiest way possible is to open the project file in the xcodeproj bundle and string-replace the folder name to the new one.
__________________
regards

Oliver Drobnik
Cocoanetics - Our DNA is programmed in Objective-C.

Linguan – makes localizing strings file fun!

Cocoanetics Parts Store – easy to use yet professionally looking components that you can use to spruce up your own apps. Augmented Reality, Calendar Control, Pin Lock or Purchase Button are only some examples. You get full source code, no static library crap, and lifetime support. Check it out today!
Oliver Drobnik is offline   Reply With Quote
Old 11-17-2011, 04:59 PM   #3 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 245
samurle is on a distinguished road
Default

Quote:
Originally Posted by Oliver Drobnik View Post
So the easiest way possible is to open the project file in the xcodeproj bundle and string-replace the folder name to the new one.
Thanks, but I'm not sure what you mean by opening a file in the xcodeproj bundle?
You mean the package contents?

I was thinking about opening some of the files in xcodeproj withTextEdit,
but I don't know how deeply embedded some of these paths are.

Or can I somehow search the entire package in all files at once?

Last edited by samurle; 11-17-2011 at 05:22 PM.
samurle is offline   Reply With Quote
Old 11-18-2011, 12:58 AM   #4 (permalink)
Dr. Touch Cocoa Helpdesk
iPhone Dev SDK Supporter
 
Join Date: Sep 2008
Location: Vienna, Austria
Posts: 537
Oliver Drobnik is on a distinguished road
Send a message via AIM to Oliver Drobnik Send a message via MSN to Oliver Drobnik Send a message via Skype™ to Oliver Drobnik
Default

Quote:
Originally Posted by samurle View Post
Thanks, but I'm not sure what you mean by opening a file in the xcodeproj bundle?
You mean the package contents?

I was thinking about opening some of the files in xcodeproj withTextEdit,
but I don't know how deeply embedded some of these paths are.

Or can I somehow search the entire package in all files at once?

In finder, right click on your app.xcodeproj, reveal package contents.
There is a project.pbx in there that's an xml file
This you can edit with a text editor
__________________
regards

Oliver Drobnik
Cocoanetics - Our DNA is programmed in Objective-C.

Linguan – makes localizing strings file fun!

Cocoanetics Parts Store – easy to use yet professionally looking components that you can use to spruce up your own apps. Augmented Reality, Calendar Control, Pin Lock or Purchase Button are only some examples. You get full source code, no static library crap, and lifetime support. Check it out today!
Oliver Drobnik is offline   Reply With Quote
Reply

Bookmarks

Tags
xcode4

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 407
10 members and 397 guests
7twenty7, gwelmarten, markuschow, mer10, QuantumDoja, Retouchable, RobTaku, SLIC, tim0504, yys
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,679
Threads: 94,129
Posts: 402,925
Top Poster: BrianSlick (7,990)
Welcome to our newest member, xzoonxoom
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:37 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0