16

I'm trying to rename an XCode5 project that has an attached CocoaPods (Pods project).
(I've attached the CocoaPods using the following tutorial: http://www.raywenderlich.com/12139/introduction-to-cocoapods)

I've tried the standard renaming technique: https://stackoverflow.com/a/19442868/173623
But it breaks the build, since the rename only takes place for App project.

How can I accomplish this task?


Thank you.

Community
  • 1
  • 1
thedp
  • 8,350
  • 16
  • 53
  • 95

5 Answers5

7

After viewing your provided tutorial, I would like to suggest you the following:

  • First follow the standard renaming technique that you got in another post
  • Now if you have enough time and patience, then it'd be best to start over from the section Installing Your First Dependency

If you don't do that, then you may follow the next steps, but I can't guarantee for success.

  • Replace all the occurrence of CocoaPodsExample.xcworkspace with <NEW_PROJ_NAME>.xcworkspace in the Pods folder and possible places
  • Close the Xcode project (if you had it open) and open <NEW_PROJ_NAME>.xcworkspace to continue and test if it worked
  • Now, switch to ViewController.m and replace CocoaPodsExample with <NEW_PROJ_NAME> if exists

Thats it! The project should now build successfully.

Wasif Hossain
  • 3,900
  • 1
  • 18
  • 20
4

I found the easy way to do it:

  1. change inside podfile project name.
  2. pod install
  3. open generated file xcworkspace reload red files

Done!

gilV
  • 41
  • 1
3

I have just written a blog post on how to go about this. The most sure-fire procedure looks like:

  1. remove CocoaPods
  2. rename project
  3. re-add CocoaPods to your project

Consult the post for details.

Stunner
  • 12,025
  • 12
  • 86
  • 145
2

I removed all cocoapods from my project with this GEM

https://github.com/kylef/cocoapods-deintegrate

then renamed my app in standard way and after fixing this issue with tests:

https://stackoverflow.com/a/27558736/1237542

everything worked OK.

Community
  • 1
  • 1
kraag22
  • 3,340
  • 3
  • 29
  • 37
1

I had this issue and used Wassif's answer, however it didn't work until I also selected the new executable (.app) file in Products > Scheme > Edit Scheme > Info

Also I couldn't find "Installing Your First Dependency" on CocoaPods.

Ford Davis
  • 343
  • 4
  • 13