So after I spend a bunch of time trying to make it work.. here’s how for future reference and in case anyone else is struggling..
- With XCode closed, copy the desired folder and rename it to the new project name. Double click on [oldprojectname].xcodeproj to start XCode.
- On the hierarchy tree on the left pane, rename the root file (the one with the blue paper icon). You’ll get a popup asking if you want to rename more files, accept the change.
- Next to the “play button” click on the old project name (this is the scheme) and select Manage schemes. On the next window, rename the scheme.
- On the left pane, click on the yellow root folder that still reads the old project name and rename it to the new project name.
- Select the folder on the left pane that you just renamed and open the right pane. On the right pane, there is a section identity and Type. Under Location, there is a folder icon, click on that and, on the finder window, select the inner root folder that still contains the old project name. Rename that file aswell, unselect it at reselect it. Now click on choose to go back to XCode.
- On the left pane, check for any files in red, like Imagex.xcassets and resources. Select them and again, in the right pane click on the folder icon once again to reselect the files under their new path. Another method is to delete the files and re add them by dragging from the finder.
- Click on the root file with the blue icon in the left pane and select the file under Project section. Click on the Build Settings tab and search for “Prefix Header”.
- Under Precompile Prefix Header select Yes and expand Prefix Header. Enter the following on Debug and Release:
9. Now on the left under Targets select your project name. Still on Build with Prefix Header searched, change Precompile Prefix Header to Yes and expand Prefix Header to fix the paths.
- Still in targets, search for “Info.plist” and fix the path.
- Finally, still in targets, select the tab General and change the package name.