cocoapods-static-swift-framework 0.4 → 0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5028de843fcb60ce24293a10ce36307f27c9f8d084e4954f7d0f179b611d5c1
|
4
|
+
data.tar.gz: d53c11afeb1b4ca999d86a449a6a3ac22c7eb7981cde15f7d25ee9a31584044c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
-
|
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,8 +1,26 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
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
|
+
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:
|
11
|
+
date: 2019-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods
|