cocoapods-static-swift-framework 0.3.1 → 0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c2bd3fdd0ab9c9caa374446e5b0a306df2ee042064e82eb78ea1abc47e19085b
4
- data.tar.gz: 48c81f56fe7daf71b161834bb6e1480b8b4b6a2a93a0be018756034853841b29
3
+ metadata.gz: 4a0a147e0343fe762a49602ef46e9a904399cb1b83155655230a016bf588d21b
4
+ data.tar.gz: 2feed3ab270df7717ad2baaea6a8c6b8566b669c204f0579f45fdca920fdc206
5
5
  SHA512:
6
- metadata.gz: 3cfc87d9967f7bd4ad847c93f36a9d8c69575e99a6332eb8e920a4788c44e0e8063e1b832cff86f009f8a8e3b8a3734edfed3b5149d490617b30da1cd18baeb6
7
- data.tar.gz: a17bc5cfb1bbec251af8825be64db0a584c0aec6d14338a5137c4998badc0bd4675d218332749f90b5dc2884a363c1ba0380f476801ce79d5a65a8007d1e4069
6
+ metadata.gz: 129c6ced27e8a07177f430d5cc13adf1ccc739e17faefbed59fd30b4f60bd47f5ed7b77d4ee5aeded3dda2b8ae6c8e7cba2ddcea277ff4fae0b5ad9bc6eaac40
7
+ data.tar.gz: 037af411d5ae3220f76d48ebc31399d029e7948ea83f00cf07c0c98dd178e9fbae88b8d060872908364308fe1b86020501cc67dfe09f106e2a40b7dc15c4123c
data/Gemfile.lock ADDED
@@ -0,0 +1,98 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ cocoapods-static-swift-framework (0.4)
5
+ cocoapods (>= 1.5.0.beta.1, < 2.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ CFPropertyList (3.0.0)
11
+ activesupport (4.2.10)
12
+ i18n (~> 0.7)
13
+ minitest (~> 5.1)
14
+ thread_safe (~> 0.3, >= 0.3.4)
15
+ tzinfo (~> 1.1)
16
+ atomos (0.1.2)
17
+ bacon (1.2.0)
18
+ claide (1.0.2)
19
+ cocoapods (1.5.3)
20
+ activesupport (>= 4.0.2, < 5)
21
+ claide (>= 1.0.2, < 2.0)
22
+ cocoapods-core (= 1.5.3)
23
+ cocoapods-deintegrate (>= 1.0.2, < 2.0)
24
+ cocoapods-downloader (>= 1.2.0, < 2.0)
25
+ cocoapods-plugins (>= 1.0.0, < 2.0)
26
+ cocoapods-search (>= 1.0.0, < 2.0)
27
+ cocoapods-stats (>= 1.0.0, < 2.0)
28
+ cocoapods-trunk (>= 1.3.0, < 2.0)
29
+ cocoapods-try (>= 1.1.0, < 2.0)
30
+ colored2 (~> 3.1)
31
+ escape (~> 0.0.4)
32
+ fourflusher (~> 2.0.1)
33
+ gh_inspector (~> 1.0)
34
+ molinillo (~> 0.6.5)
35
+ nap (~> 1.0)
36
+ ruby-macho (~> 1.1)
37
+ xcodeproj (>= 1.5.7, < 2.0)
38
+ cocoapods-core (1.5.3)
39
+ activesupport (>= 4.0.2, < 6)
40
+ fuzzy_match (~> 2.0.4)
41
+ nap (~> 1.0)
42
+ cocoapods-deintegrate (1.0.2)
43
+ cocoapods-downloader (1.2.1)
44
+ cocoapods-plugins (1.0.0)
45
+ nap
46
+ cocoapods-search (1.0.0)
47
+ cocoapods-stats (1.0.0)
48
+ cocoapods-trunk (1.3.0)
49
+ nap (>= 0.8, < 2.0)
50
+ netrc (~> 0.11)
51
+ cocoapods-try (1.1.0)
52
+ colored2 (3.1.2)
53
+ concurrent-ruby (1.0.5)
54
+ escape (0.0.4)
55
+ fourflusher (2.0.1)
56
+ fuzzy_match (2.0.4)
57
+ gh_inspector (1.1.3)
58
+ i18n (0.9.5)
59
+ concurrent-ruby (~> 1.0)
60
+ metaclass (0.0.4)
61
+ minitest (5.11.3)
62
+ mocha (1.5.0)
63
+ metaclass (~> 0.0.1)
64
+ mocha-on-bacon (0.2.3)
65
+ mocha (>= 0.13.0)
66
+ molinillo (0.6.5)
67
+ nanaimo (0.2.6)
68
+ nap (1.1.0)
69
+ netrc (0.11.0)
70
+ prettybacon (0.0.2)
71
+ bacon (~> 1.2)
72
+ rake (12.3.1)
73
+ ruby-macho (1.2.0)
74
+ thread_safe (0.3.6)
75
+ tzinfo (1.2.5)
76
+ thread_safe (~> 0.1)
77
+ xcodeproj (1.5.9)
78
+ CFPropertyList (>= 2.3.3, < 4.0)
79
+ atomos (~> 0.1.2)
80
+ claide (>= 1.0.2, < 2.0)
81
+ colored2 (~> 3.1)
82
+ nanaimo (~> 0.2.5)
83
+
84
+ PLATFORMS
85
+ ruby
86
+
87
+ DEPENDENCIES
88
+ bacon
89
+ bundler (~> 1.3)
90
+ cocoapods
91
+ cocoapods-static-swift-framework!
92
+ mocha
93
+ mocha-on-bacon
94
+ prettybacon
95
+ rake
96
+
97
+ BUNDLED WITH
98
+ 1.16.1
data/README.md CHANGED
@@ -4,11 +4,7 @@ A cocoapods plugin that enables static frameworks for all pods.
4
4
 
5
5
  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!
6
6
 
7
-
8
- NOTE:
9
-
10
- Please use cocoapods 1.5. Static framework support on cocoapods 1.4 is totally a disaster.
11
-
7
+ (There's 'swift' in the plugin name as it's originally built for swift. You can also use it for pure objc project too.)
12
8
 
13
9
  ## Usage
14
10
  Install via gem:
@@ -21,26 +17,32 @@ Add the following to your podfile:
21
17
 
22
18
  ```ruby
23
19
  plugin 'cocoapods-static-swift-framework'
24
- all_static!
25
20
 
26
21
  ```
27
22
 
28
23
  NOTE: Static frameworks is still using framework, not static library. So don't forget to add `use_frameworks!`
29
24
 
30
- ## Why use static framework
25
+ ## About Static framework
31
26
 
32
- 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.
27
+ ### Why
33
28
 
34
- 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.
29
+ 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.
35
30
 
31
+ ### What is a static framework
36
32
 
37
- #### requirement
38
- - Xcode 9
39
- - cocoapods 1.5 ( tested on 1.5.0.beta.1 )
33
+ 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.
40
34
 
35
+ 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.
41
36
 
37
+ 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.
38
+
39
+
40
+ ## requirement
41
+
42
+ - Xcode 9
43
+ - cocoapods 1.5
42
44
 
43
45
  ## License
44
46
  MIT
45
47
 
46
- Appreciate a 🌟 if you like it. Another cocoapods plugin made by me [cocoapod-developing-folder](https://github.com/leavez/cocoapods-developing-folder)
48
+ 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)
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ['lib']
20
20
 
21
- spec.add_dependency "cocoapods", ">= 1.5.0.beta.1", "< 2.0"
21
+ spec.add_dependency "cocoapods", ">= 1.5.0", "< 2.0"
22
22
 
23
23
  spec.add_development_dependency 'bundler', '~> 1.3'
24
24
  spec.add_development_dependency 'rake'
@@ -1,3 +1,3 @@
1
1
  module CocoapodsStaticSwiftFramework
2
- VERSION = "0.3.1"
2
+ VERSION = "0.4"
3
3
  end
@@ -0,0 +1,15 @@
1
+
2
+ Pod::HooksManager.register('cocoapods-static-swift-framework', :pre_install) do |installer_context|
3
+
4
+ # check user_framework is on
5
+ podfile = installer_context.podfile
6
+ podfile.target_definition_list.each do |target_definition|
7
+ next if target_definition.name == "Pods"
8
+ if not target_definition.uses_frameworks?
9
+ STDERR.puts "[!] Cocoapods-static-swift-framework requires `use_frameworks!`".red
10
+ exit
11
+ end
12
+ end
13
+
14
+ require_relative 'patch/static_pod'
15
+ end
@@ -1 +1 @@
1
- require 'cocoapods-static-swift-framework/command'
1
+ require 'cocoapods-static-swift-framework/main'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-static-swift-framework
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: '0.4'
5
5
  platform: ruby
6
6
  authors:
7
7
  - leavez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-28 00:00:00.000000000 Z
11
+ date: 2018-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 1.5.0.beta.1
19
+ version: 1.5.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '2.0'
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 1.5.0.beta.1
29
+ version: 1.5.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '2.0'
@@ -67,15 +67,15 @@ extra_rdoc_files: []
67
67
  files:
68
68
  - ".gitignore"
69
69
  - Gemfile
70
+ - Gemfile.lock
70
71
  - LICENSE.txt
71
72
  - README.md
72
73
  - Rakefile
73
74
  - cocoapods-static-swift-framework.gemspec
74
75
  - lib/cocoapods-static-swift-framework.rb
75
- - lib/cocoapods-static-swift-framework/command.rb
76
- - lib/cocoapods-static-swift-framework/command/framework.rb
77
- - lib/cocoapods-static-swift-framework/command/patch/static_pod.rb
78
76
  - lib/cocoapods-static-swift-framework/gem_version.rb
77
+ - lib/cocoapods-static-swift-framework/main.rb
78
+ - lib/cocoapods-static-swift-framework/patch/static_pod.rb
79
79
  - lib/cocoapods_plugin.rb
80
80
  - spec/command/framework_spec.rb
81
81
  - spec/spec_helper.rb
@@ -1 +0,0 @@
1
- require 'cocoapods-static-swift-framework/command/framework'
@@ -1,7 +0,0 @@
1
- module Pod
2
- class Podfile
3
- def all_static!
4
- require 'cocoapods-static-swift-framework/command/patch/static_pod.rb'
5
- end
6
- end
7
- end