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 privateCocoapods repo
  • Cocoapods rely on

    • The source code for each component version is packaged as binary and stored privatelyCocoapods repo

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 binaryframeworkDon’t know anyone else’sstatic frameworkHow to make it, tried and failed)
  • Private repo

    • It’s really just agitWarehouse, private attributes can be (although the public line, but others can see), generalgithub.gitlab.giteeorSelf-built gitCreate a repository
  • 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 savedgit(need to havehttp(s)Download address)…

practice

Some of the ancillary tools you need

  • Github.com/tripleCC/co…
  • Github.com/tripleCC/bi…

steps

  • Package third-party source code

    1. git cloneVarious component source libraries
    2. The script package

      • tagPull the branch, and switch (pack it, delete it, and go backmaster)
      • usepod genAccording to thepodsecCreate a project
      • xcodebuildpackagingframework(Real and simulator)
      • Merge real machine and emulatorframework
      • It seems so simple, but in practice you’ll find that some libraries just don’t work with a script
    3. uploadframework(use thebinary-serverManagement)
  • The binary podsec is uploaded to the private REPO

    1. Create a binary version of Podsec using pod bin Spec Create

      • There aresubsecWill ask for ittemplate
      • Some platforms require a version lower than 8 because it is usedframeworkThe platform version needs to be changed to 8 or above
    2. Uploaded generatedpodsec
  • use

    • inPodfileaddSource {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 tosourceOrder 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)

Some of the pit

  • I don’t know what the impact will be,AppStorePackage or honest use of source code build
  • modulemapRemember to combine the real machine with the simulator
  • Real and simulatorDSYMFile retention (in case you need it someday)
  • Some third-party libraries are*.podsecAnd some of them are*.podsec.json
  • pod bin spec createBinary createdpodsecThe file name is addedbinary, need to be removed, otherwise andpodsecthenameandThe file nameIt doesn’t fit. It won’t passpod spec lint
  • pod repo pushUpload privatespecRemember to add--use-json --allow-warnings
  • There may be others…