0

I've been working on a chat app application for quite some time, and this was my first ever mobile application I developed, so I'm all new in Swift, xCode and generally on Apple OS's and environments. What I didn't think too much when I started was the name of project/application, so now I'm trying to change it, but I'm kind of scared of breaking anything.

I read other posts here and generally on the internet, but there are many options, and mostly seem very superficial for a quite complicated project that mine has become at this point. I've already included Cocoapods, I've integrated push notifications with OneSignal, Sinch as a calling service, and many other frameworks. I'm more concerned about these frameworks integration and renaming process.

What would be the best way to try and rename the project, so even if something goes wrong during the process, I can somehow get back to the previous version? I thought about using git, maybe renaming in a different branch, but some posts online take that option down. Another option was creating a copy of the project, but it opens the same directory even from different paths, so that was concerning to me. What would be the best way to achieve this?

Swift Dev Journal
  • 19,282
  • 4
  • 56
  • 66
  • You can quite easily reinstall cocoapods. I'd say remove the cocoapods dependencies, then rename the project and reinstall them. Didn't try that, so it's just an idea:) – Antoni Silvestrovič May 09 '20 at 16:27

1 Answers1

-3

I’ve found the best way to rename a project is to create a new one from scratch. It sounds more horrific than it is. Once you created the new project, drag files, including storyboards from the old Xcode project to the new one.

Copy the pod file over as well. You will to change two lines in the pod file to show your new app name.

Then reinstall cocoapods, via the terminal. Try it and see how much you have to clean up.

Oh, before you do all this, make sure you have captured the new app name in iTunesConnect?

I’ve never been satisfied with a “simple” app name change in Xcode. The info.plist can be funky, directory names are not changed. Your project will be harder to debug, and maintain. Let me know if you have specific questions.

ICL1901
  • 7,632
  • 14
  • 90
  • 138
  • This doesn't seem like the best option, but thanks. Anyways, this question has been "closed" by someone, giving me a reference to a "similar" question, that has little or nothing to do with this one, and above all, is a 5-year-old question. Way to go! – Harry Stocks May 10 '20 at 12:35
  • Thanks for responding. My answer, while not taken very well, is my preferred method. Good luck anyway. – ICL1901 May 10 '20 at 13:11