cocoapods-static-swift-framework 0.4 → 0.5

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: 4a0a147e0343fe762a49602ef46e9a904399cb1b83155655230a016bf588d21b
4
- data.tar.gz: 2feed3ab270df7717ad2baaea6a8c6b8566b669c204f0579f45fdca920fdc206
3
+ metadata.gz: e5028de843fcb60ce24293a10ce36307f27c9f8d084e4954f7d0f179b611d5c1
4
+ data.tar.gz: d53c11afeb1b4ca999d86a449a6a3ac22c7eb7981cde15f7d25ee9a31584044c
5
5
  SHA512:
6
- metadata.gz: 129c6ced27e8a07177f430d5cc13adf1ccc739e17faefbed59fd30b4f60bd47f5ed7b77d4ee5aeded3dda2b8ae6c8e7cba2ddcea277ff4fae0b5ad9bc6eaac40
7
- data.tar.gz: 037af411d5ae3220f76d48ebc31399d029e7948ea83f00cf07c0c98dd178e9fbae88b8d060872908364308fe1b86020501cc67dfe09f106e2a40b7dc15c4123c
6
+ metadata.gz: ccbb357cdd7c291256e215c9f4c7c6059ae2885d456b89713bf7d61da49015393c758a9d447ac5ed7ad98d25d91a54a9843cf1dba08b58c44cb26b1a29879166
7
+ data.tar.gz: f3de05f9899c8c13cc0d48f5c43f5e4eac72ee62097fb27bb435b7144cebc52e0ac94968d926ef49c1fcd7c0ee02e83f12efbade4ce5e03a622d3701ad7c6723
data/README.md CHANGED
@@ -22,6 +22,8 @@ plugin 'cocoapods-static-swift-framework'
22
22
 
23
23
  NOTE: Static frameworks is still using framework, not static library. So don't forget to add `use_frameworks!`
24
24
 
25
+ NOTE: From cocoapods 1.7, the generated resource bundle specified with `s.resource_bundle` in podspec, will not be copied to the .framework folder. It's a default behavior of cocoapods.
26
+
25
27
  ## About Static framework
26
28
 
27
29
  ### Why
@@ -30,17 +32,19 @@ Too many dynamic frameworks will increase app boot time dramatically, also the `
30
32
 
31
33
  ### What is a static framework
32
34
 
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.
35
+ 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 bianry and copy resources.
36
+
37
+ Static framework, or precisely static-linking framework, has no official defination. There's only (dynamic) framework. "When linking, it found that the binary in the framework is static-linking, then it will link the binary staticaly. There's no special handling." an Apple engineer answered me at WWDC.
34
38
 
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.
39
+ Resources in static 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.
36
40
 
37
41
  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
42
 
39
43
 
40
44
  ## requirement
41
45
 
42
- - Xcode 9
43
- - cocoapods 1.5
46
+ - Xcode 9+
47
+ - cocoapods 1.5+ (v1.7 tested)
44
48
 
45
49
  ## License
46
50
  MIT
@@ -1,3 +1,3 @@
1
1
  module CocoapodsStaticSwiftFramework
2
- VERSION = "0.4"
2
+ VERSION = "0.5"
3
3
  end
@@ -1,8 +1,26 @@
1
- module Pod
2
- class PodTarget
3
- def static_framework?
4
- return true
1
+
2
+ if Gem::Version.new(Pod::VERSION) < Gem::Version.new('1.7')
3
+
4
+ module Pod
5
+ class PodTarget
6
+ def static_framework?
7
+ return true
8
+ end
5
9
  end
6
10
  end
7
- end
8
11
 
12
+ else
13
+
14
+ # cocoapods 1.7 change the implementation of :static_framework?
15
+ # The 'BuildType' contain all related things.
16
+ module Pod
17
+ class Target
18
+ class BuildType
19
+ def linkage
20
+ :static
21
+ end
22
+ end
23
+ end
24
+ end
25
+
26
+ end
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.4'
4
+ version: '0.5'
5
5
  platform: ruby
6
6
  authors:
7
7
  - leavez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-04 00:00:00.000000000 Z
11
+ date: 2019-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods