README.md in cocoapods-static-swift-framework-0.3.1 vs README.md in cocoapods-static-swift-framework-0.4
- old
+ new
@@ -2,16 +2,12 @@
A cocoapods plugin that enables static frameworks for all pods.
Cocoapods only supports static framework at pod level, which means an option in podspec and just valid for that pod. By using this plugin, we can make all pod to static framework with only one word!
+(There's 'swift' in the plugin name as it's originally built for swift. You can also use it for pure objc project too.)
-NOTE:
-
-Please use cocoapods 1.5. Static framework support on cocoapods 1.4 is totally a disaster.
-
-
## Usage
Install via gem:
```
$ gem install cocoapods-static-swift-framework
@@ -19,28 +15,34 @@
Add the following to your podfile:
```ruby
plugin 'cocoapods-static-swift-framework'
-all_static!
```
NOTE: Static frameworks is still using framework, not static library. So don't forget to add `use_frameworks!`
-## Why use static framework
+## About Static framework
-When turning on `use_framworks!` in podfile, libraries will be used in form of (dynamic) framework. App boot time will be affected dramatically when there're too many frameworks ( like 100 ), also a dyld [crash](https://github.com/Ruenzuo/cocoapods-amimono#why-would-you-want-this-plugin-in-your-podfile) and an obvious time in copy framework script.
+### Why
-There's no benefit from using dynamic framework on a private lib. So when static library for swift introduced in Xcode 9, we desperately want to adopt it for swift integration. Along with this plugin, cocoapods and xcode would statically link the libs and the problem is solved.
+Too many dynamic frameworks will increase app boot time dramatically, also the `Copy framework` build phase will expend unendurable time in the code-build-run loop. (There is also a dyld [crash](https://github.com/Ruenzuo/cocoapods-amimono#why-would-you-want-this-plugin-in-your-podfile)) Static framework have no these problems.
+### What is a static framework
-#### requirement
-- Xcode 9
-- cocoapods 1.5 ( tested on 1.5.0.beta.1 )
+First of all, what is a framework? Framework is just a bundle with specifications to organize files, for whom xcode provides convenient methods to link / copy resources.
+I haven't seen any word about static framework in the official documents. There is only (dynamic) framework. So xcode cannot handle it well like dynamic framework. Resources in the framework can't be copied to app's main bundle automatically. If you use cocoapods, it will handle it automatically, but not for the manual integration.
+The binary in the framework will be linked statically, as its name, to the main binary. There's no framework file in the `Framework` folder of the app bundle. Resources will copied to app bundle's root path. So there's a potential bug of conflict of resource file names.
+
+## requirement
+
+- Xcode 9
+- cocoapods 1.5
+
## License
MIT
-Appreciate a 🌟 if you like it. Another cocoapods plugin made by me [cocoapod-developing-folder](https://github.com/leavez/cocoapods-developing-folder)
\ No newline at end of file
+Appreciate a 🌟 if you like it. Another cocoapods plugin made by me to improve pod compile time: [cocoapods-binary](https://github.com/leavez/cocoapods-binary)