Recently the company because of business increased, and recruit an iOS small partner, the heart is extremely happy. But one more person, the daily code development must unify the specification, facilitates the future maintenance and the search. The bottom line is that I use some code specifications everyday.
(i), SVN specification
1, code submission.
"People" "action" "Action content"
If the code add, modify the file, to write clearly add that module, that folder, do what function.
If the code is deleted, make sure that the file is useless with PM and then delete the file, and remember to delete the file on the server.
If you move the files, write a clear picture of where the files are moved from, and remember to move the files on the server.
eg
"Stone Intelligence" "Add" "Home-Life Add Carousel Map ... Sdcyclescrollview "
"Stone Intelligence" "Modify" "Home-Life Add Carousel Map ... 】
"Stone Intelligence" "Delete" "Home-Life Add Carousel Map ... Sdcyclescrollview "
"Stone Intelligence" "mobile" "Home-Life Add Carousel Map ... Sdcyclescrollview move from A to B"
(b) Code development specifications
First, the engineering structure aspect
1, the new project directory must have only 4 folders (the first three are the entity folder, the last is the virtual folder of group), Threelib (place all imported third-party packages), network (put all the Web requests in the app), CodeClass ( Place the entire app's function module code), ConfigFile (App profile: Assets,info,pch,header).
2, Threelib third party nothing to say, if use Pod management third party also have to build this file.
3. All network requests are put here, the prefix of all requests, written in the request of the head, the requested address, comments, methods, followed by the bottom;
Connect is the encapsulation of other network components such as AF, request time-out macro definition here, if you want to do encryption, decryption unified here to do it;
At the same time the bottom of the network request failed and the result of the request is temporarily no data and other related pages.
IOS Code Development Specification