With the advent of cross-end frameworks such as Flutter, business development students often need to cross-end business development, problem location, etc., on Android/IOS. The construction of new and unfamiliar environment will always encounter a variety of problems, leading to the failure of the construction, especially the IOS development environment, which is the most complex, not only the construction of the environment is tedious, but also the packaging speed after cutting branches is very slow, so we designed and implemented two tools to optimize the IOS development experience of Xianyu.
Problems with the IOS development experience
The development environment is difficult to set up
-
Development environments depend on specific software versions and are complex to configure
-
Maintenance difficult
-
Pod relies on large downloads
APP packaging is slow after sharding
IOS Environment Setup
Completely Docker,
In-host development (partial Docker-ization)
APP packaging speed problem after branch cutting
Pod operation acceleration
XCode compilation speed optimization
- Cocopods relies on compilation acceleration:
- Distributed compilation: such as distcc
- Cache the intermediate results of compilation: CCache, BUCK
-
Cache the current branch’s Pods Project, Flutter Project, compiled intermediates, podfile. lock, linkmap, and other related files before shard.
-
Switch branch
-
An intermediate cached before a new branch is restored
-
Repackage the IOS APP. Through these two steps of optimization, we reduced the packaging time of Xianyu IOS project after branch cutting from the original 30-40 minutes to less than five minutes, and the efficiency was increased by nearly six times.