Recently, I'm trying AWS Mobile Hub to "click-to-create-app". It's amazing, as a sample or quick start, definitely should consider it.
But, what's the next? You're going to start your own one, like me. Then I occur something boring, to rename the project.
also AWS also share a link from Apple of how to rename project, but Mobile Hub has something more need to be handled. Personally, After I fixed my project, I feel maybe Mobile Hub guys need to improve their way.
I'm sharing my issues and how I work through them here. Any better ideas are welcome.
0, I try to add my "project name" as Mobile Hub prompt me, but just to me MySampleProject project when I download, I think that's not good enough. Giving me the exact project name as I specify "project name" is perfect I think.
1, Rename as Apple recommend, and also the bundle ID
https://developer.apple.com/library/ios/recipes/xcode_help-project_editor/RenamingaProject/RenamingaProject.html
2, But that's far not enough for developer to start their own one, for we're very "straight" sometimes. There are still too much "MySampleApp" existing in this project and that's unacceptable even you can run it already. Code need to be beautiful enough so we can have a good mood :)
3, So, Rename the physical folder name to "xxx" (e.g.), and open .proj file and remove the "MySampleApp" and add your need folder name. (for after you rename the physical folder, reference are broken, so you need to delete the old one and add the new one)
4, Do a search of "MySampleApp", and fix the search framework path etc.
5, Go to build phrases, to check script and embedded frameworks to fix them
6, This part is not that obvious to notice until your run and your app crashed. The sample project enabled the "module" function, and this remain the old "MySampleApp" as module name for each controller and some cells, so you need to open storyboard and check every controller and cells or others to remove the module name. (enable module is maybe not a good way, hope Mobile Hub guys and have a better or improved solutions)
Finally, you got there, run and no crash, everything is fine.
Good Luck!
No comments:
Post a Comment