-3

I have a developed and published an app for a client and it is now in the App Store. Now a new client would like a similar app so I wanna use the same code after some modifications to develope the new app and publish with a new name to the App Store.

What is the best way to do that in xcode?

Ali
  • 4,205
  • 4
  • 25
  • 40

2 Answers2

2

You can set up a new 'Target' and use the same code base. You may also want to create a Settings.h / .m for each Target to control the differences between the two. (Including the appropriate .h/.m pair with the appropriate Target)

egarlock
  • 559
  • 3
  • 11
  • I'll try that. But is the end result going to be a completely different app with a different bundle ID to be published to the app store? – Ali Oct 29 '14 at 15:12
  • Right! Each Target will have their own -info.plist files as well to handle the settings of bundle ID / etc etc. – egarlock Oct 29 '14 at 15:23
  • I was gonna do that but then I guess I have some big modifications that I will need to use the preprocessor macros a lot. So, I ended up following this answer and it worked great for me (http://stackoverflow.com/questions/17744319/duplicate-and-rename-xcode-project-associated-folders). Thanks anyways. – Ali Oct 30 '14 at 16:13
1

I don't really know if this helps you but couldn't you just go to File -> Add Files ... and then add the classes or whatever from the other project? When adding, don't forget to tick the "Copy Items If Needed" button - otherwise the code will change in your other project, too, if you change something.

borchero
  • 5,562
  • 8
  • 46
  • 72
  • Well, that didn't work. – Ali Oct 29 '14 at 15:11
  • Why didn't that work? Just add the .swift or .h .m files (Objective-C) to your project and afterwards you can use them. Can't think of any problem why it shouldn't work at all. – borchero Oct 29 '14 at 15:48
  • I guess because when I created an empty project there were some missing stuff like targets. I dunno I ended up following this answer and it worked great for me (http://stackoverflow.com/questions/17744319/duplicate-and-rename-xcode-project-associated-folders). Thanks anyways. – Ali Oct 30 '14 at 16:12