gonative-cli 1.2.4 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/gonative/plugins/ios/build_framework.rb +1 -1
- data/lib/gonative/plugins/ios/embed_extensions.rb +16 -14
- data/lib/gonative/plugins/ios/rename.rb +2 -2
- data/lib/gonative/plugins/ios/set_bundle_id.rb +1 -1
- data/lib/gonative/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3815dd0892c48ed02552fb5d2bb7aa2289f10923d933c0d7461476ed491ab6cc
|
4
|
+
data.tar.gz: 48333123b03e023fc7be0f5b54be33992d6ed94528b809a0591c1d15d4e0cb99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 124793fca3848ec9eb55f0b9a2f7dc079cd433dc11a313083909d6eb4f9ff81c944ed0d98d6d178365aaee997874cfab6ac059dc78104ed3b6be310022a260cd
|
7
|
+
data.tar.gz: 7a59efbcd0961691df92504a9a1bdcfbb6abc437c4d4a8029e69bf26f939606cbef9a0e28eca9af414c1b5cdd7248e9d2716bce789d1c9e97d5ab9ca3be34e36
|
data/Gemfile.lock
CHANGED
@@ -31,34 +31,36 @@ module GoNative
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def embed_in_project
|
34
|
-
proj = Xcodeproj::Project.open('
|
34
|
+
proj = Xcodeproj::Project.open('MedianIOS.xcodeproj')
|
35
35
|
app_target = proj.native_targets.first
|
36
36
|
extensions.each do |extension|
|
37
37
|
extension_target = proj.new_target(:app_extension,
|
38
38
|
extension['name'],
|
39
39
|
:ios,
|
40
|
-
'
|
40
|
+
'13.0')
|
41
41
|
extension_group = proj.new_group(extension['name'], extension['name'])
|
42
42
|
|
43
43
|
extension['headers'].each { |path| extension_group.new_file(path) }
|
44
|
-
extension_target.add_file_references(extension['source_files'].map
|
44
|
+
extension_target.add_file_references(extension['source_files'].map do |path|
|
45
45
|
extension_group.new_file(path)
|
46
|
-
|
46
|
+
end)
|
47
47
|
extension_target.add_resources(extension['resources'].map { |path| extension_group.new_file(path) })
|
48
48
|
extension_target.add_system_frameworks(extension['system_frameworks'])
|
49
49
|
extension_group.new_file(extension['info'])
|
50
50
|
extension_group.new_file(extension['entitlements']) if extension['entitlements']
|
51
51
|
extension_target.build_configurations.each do |config|
|
52
|
-
config.build_settings['PRODUCT_NAME'] =
|
53
|
-
config.build_settings['INFOPLIST_FILE'] = "#{extension[
|
54
|
-
|
55
|
-
|
52
|
+
config.build_settings['PRODUCT_NAME'] = '$(TARGET_NAME)'
|
53
|
+
config.build_settings['INFOPLIST_FILE'] = "#{extension["name"]}/#{extension["info"]}"
|
54
|
+
if extension['entitlements']
|
55
|
+
config.build_settings['CODE_SIGN_ENTITLEMENTS'] =
|
56
|
+
"#{extension["name"]}/#{extension["entitlements"]}"
|
57
|
+
end
|
56
58
|
end
|
57
59
|
app_target.add_dependency(extension_target)
|
58
|
-
extension_file = proj.files.find { |f| f.path == "#{extension[
|
59
|
-
embed_phase = app_target.build_phases.find
|
60
|
+
extension_file = proj.files.find { |f| f.path == "#{extension["name"]}.appex" }
|
61
|
+
embed_phase = app_target.build_phases.find do |phase|
|
60
62
|
phase.class.method_defined?(:name) && phase.name == 'Embed App Extensions'
|
61
|
-
|
63
|
+
end
|
62
64
|
embed_phase.add_file_reference(extension_file, true)
|
63
65
|
app_config = proj.files.find { |f| f.path == 'appConfig.json' }
|
64
66
|
extension_target.resources_build_phase.add_file_reference(app_config, true)
|
@@ -70,12 +72,12 @@ module GoNative
|
|
70
72
|
def modify_podfile
|
71
73
|
extensions.each do |extension|
|
72
74
|
open('Podfile', 'a') do |f|
|
73
|
-
f.puts "target '#{extension[
|
75
|
+
f.puts "target '#{extension["name"]}' do"
|
74
76
|
f.puts "\tuse_frameworks!"
|
75
77
|
extension['dependencies'].each do |dep|
|
76
|
-
f.puts "\tpod '#{dep[
|
78
|
+
f.puts "\tpod '#{dep["name"]}', '#{dep["requirement"]}'"
|
77
79
|
end
|
78
|
-
f.puts
|
80
|
+
f.puts 'end'
|
79
81
|
end
|
80
82
|
end
|
81
83
|
end
|
@@ -15,7 +15,7 @@ module GoNative
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def call
|
18
|
-
system("mv
|
18
|
+
system("mv MedianIOS.xcodeproj #{proj_path}")
|
19
19
|
@proj = Xcodeproj::Project.open(proj_path)
|
20
20
|
rename_target!
|
21
21
|
recreate_scheme!
|
@@ -44,7 +44,7 @@ module GoNative
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def fix_workspace_refs!
|
47
|
-
FileUtils.rm_rf('
|
47
|
+
FileUtils.rm_rf('MedianIOS.xcworkspace')
|
48
48
|
proj_ref = Xcodeproj::Workspace::FileReference.new(proj_path)
|
49
49
|
pods_ref = Xcodeproj::Workspace::FileReference.new('Pods/Pods.xcodeproj')
|
50
50
|
workspace = Xcodeproj::Workspace.new(nil, proj_ref, pods_ref)
|
@@ -22,7 +22,7 @@ module GoNative
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def update_project
|
25
|
-
proj = Xcodeproj::Project.open('./
|
25
|
+
proj = Xcodeproj::Project.open('./MedianIOS.xcodeproj')
|
26
26
|
proj.targets.each do |target|
|
27
27
|
case target.product_type
|
28
28
|
when Xcodeproj::Constants::PRODUCT_TYPE_UTI[:application]
|
data/lib/gonative/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gonative-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hunaid Hassan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-cli
|