Carthage is not considering… Skip),
Jane (fei) interface (hua)
With more and more convenient third-party components, developing apps now basically rely on more than a dozen third parties above. When the cache is not built or formal packets are made, each time takes more than 10 minutes.
The main reason is that a large number of source files need to be compiled (roughly divided into app and Cocoapods dependent libraries), so compiling and referencing removable code can reduce source compilation time
It’s not clear if there will be any more advanced gameplay
Ideas (From a variety of methods from the Web)
Simple civilian solution: Create a private binary REPO
-
app
- Extract and encapsulate to a library, package to binary, and save to private
Cocoapods repo
- Extract and encapsulate to a library, package to binary, and save to private
-
Cocoapods rely on
- The source code for each component version is packaged as binary and stored privately
Cocoapods repo
- The source code for each component version is packaged as binary and stored privately
If your company or you have enough resources, you can have two private sources (two private repOs, one binary, one source), or you can simply have a private binary REPO
Train of thought
Because there is no machine and resources, only the practice behind the simple (DIAO) single (SI) version. Conditions are best to do a set of automation, I am no machine and resources, packaging or all kinds of scripts on their own machine manual packaging, miserable…
Simple version of the idea:
-
Package third-party source code
- Each tag packs the binary
framework
Don’t know anyone else’sstatic framework
How to make it, tried and failed)
- Each tag packs the binary
-
Private repo
- It’s really just a
git
Warehouse, private attributes can be (although the public line, but others can see), generalgithub
.gitlab
.gitee
orSelf-built git
Create a repository
- It’s really just a
-
Binary file storage
- Packaged binary files, need to find a place to provide download, conditional words can save CDN management, no words in the Intranet put a static file server to save also line, there can be saved
git
(need to havehttp(s)
Download address)…
- Packaged binary files, need to find a place to provide download, conditional words can save CDN management, no words in the Intranet put a static file server to save also line, there can be saved
practice
Some of the ancillary tools you need
- Github.com/tripleCC/co…
- Github.com/tripleCC/bi…
steps
-
Package third-party source code
git clone
Various component source libraries-
The script package
tag
Pull the branch, and switch (pack it, delete it, and go backmaster
)- use
pod gen
According to thepodsec
Create a project xcodebuild
packagingframework
(Real and simulator)- Merge real machine and emulator
framework
- It seems so simple, but in practice you’ll find that some libraries just don’t work with a script
- upload
framework
(use thebinary-server
Management)
-
The binary podsec is uploaded to the private REPO
-
Create a binary version of Podsec using pod bin Spec Create
- There are
subsec
Will ask for ittemplate
- Some platforms require a version lower than 8 because it is used
framework
The platform version needs to be changed to 8 or above
- There are
- Uploaded generated
podsec
-
-
use
- in
Podfile
addSource {your private repo}
And then add an official REPO (for example:source 'https://cdn.cocoapods.org/'
). - Official must be added in the back, there will be the same library according to
source
Order to get dependencies. If you want to cut back to the line in the source comments private library, it is good (because it is only a simple one)Private binary REPO
)
- in
Some of the pit
- I don’t know what the impact will be,
AppStore
Package or honest use of source code build modulemap
Remember to combine the real machine with the simulator- Real and simulator
DSYM
File retention (in case you need it someday) - Some third-party libraries are
*.podsec
And some of them are*.podsec.json
pod bin spec create
Binary createdpodsec
The file name is addedbinary
, need to be removed, otherwise andpodsec
thename
andThe file name
It doesn’t fit. It won’t passpod spec lint
pod repo push
Upload privatespec
Remember to add--use-json --allow-warnings
- There may be others…