gonative-cli 0.9.0 → 0.9.3

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: 392a2b4ff0ecb66ee524f2b0843f2aa334c22c0bd2723bb28a569e9318bdb111
4
- data.tar.gz: efce28573e1fd80d0a408ad0c62fd48d687c791efa05ea90dd096fc2fc748d0a
3
+ metadata.gz: 60d5a81cb59b20b9fe0b83a7bc367ba04f2f68b200d12e4039022dcf3f803ac8
4
+ data.tar.gz: a57d10494beb2c2048721d428f50da4e9bc54676c55e1d15237a48689e98d359
5
5
  SHA512:
6
- metadata.gz: 446b75f6fd9d62edb92c3ba57ef32837e64fcb02834dcbb26c2abe146eebe083fce59bf34fcf3f90f1d2f4db2256d59bc0232a2ae36a4263344c192293650793
7
- data.tar.gz: b0732cacf207e93be3b22cec558a6cb87307ef7b627cd68f2b1b63bf1363c0fce6c48f4baa2d7e4bb8d712053440fed962fec065f0074a1b20b5a7a34f07ec59
6
+ metadata.gz: 640fb9f0703d5749abecd5be57e5b532141d37ee096046c08ae388c91d68cc5d1cce51cacfef470a1a1525347f964cbf46a94fad4bf91dbcc6b99ea5e7a7f1b5
7
+ data.tar.gz: 0c5f6aeed1bedea560aa0f198a71909bc6731a78feac2f81884495bbf3566accebd5c5574756c069daf44617a41fb4248bd43117afd33dd3ef5507719962d865
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gonative-cli (0.8.1)
4
+ gonative-cli (0.9.2)
5
5
  activesupport (~> 6.0)
6
6
  cocoapods (~> 1.10)
7
7
  colorize (~> 0.8.0)
@@ -32,23 +32,31 @@ module GoNative
32
32
 
33
33
  def embed_in_project
34
34
  proj = Xcodeproj::Project.open('GoNativeIOS.xcodeproj')
35
+ app_target = proj.native_targets.first
35
36
  extensions.each do |extension|
36
- target = proj.new_target(:app_extension,
37
+ extension_target = proj.new_target(:app_extension,
37
38
  extension['name'],
38
39
  :ios,
39
40
  '11.0')
40
41
  extension_group = proj.new_group(extension['name'], extension['name'])
41
42
 
42
43
  extension['headers'].each { |path| extension_group.new_file(path) }
43
- target.add_file_references(extension['source_files'].map { |path| extension_group.new_file(path) })
44
- target.add_resources(extension['resources'].map { |path| extension_group.new_file(path) })
45
- target.add_system_frameworks(extension['system_frameworks'])
44
+ extension_target.add_file_references(extension['source_files'].map { |path| extension_group.new_file(path) })
45
+ extension_target.add_resources(extension['resources'].map { |path| extension_group.new_file(path) })
46
+ extension_target.add_system_frameworks(extension['system_frameworks'])
46
47
  extension_group.new_file(extension['info'])
47
48
  extension_group.new_file(extension['entitlements']) if extension['entitlements']
48
- target.build_configurations.each do |config|
49
+ extension_target.build_configurations.each do |config|
50
+ config.build_settings['PRODUCT_NAME'] = "$(TARGET_NAME)"
49
51
  config.build_settings['INFOPLIST_FILE'] = "#{extension['name']}/#{extension['info']}"
50
52
  config.build_settings['CODE_SIGN_ENTITLEMENTS'] = "#{extension['name']}/#{extension['entitlements']}" if extension['entitlements']
51
53
  end
54
+ app_target.add_dependency(extension_target)
55
+ extension_file = proj.files.find{|f| f.path == "#{extension['name']}.appex" }
56
+ embed_phase = app_target.build_phases.find { |phase| phase.class.method_defined?(:name) && phase.name == 'Embed App Extensions' }
57
+ embed_phase.add_file_reference(extension_file, true)
58
+ app_config = proj.files.find{|f| f.path == 'appConfig.json' }
59
+ extension_target.resources_build_phase.add_file_reference(app_config, true)
52
60
  end
53
61
 
54
62
  proj.save
@@ -60,7 +68,7 @@ module GoNative
60
68
  f.puts "target '#{extension['name']}' do"
61
69
  f.puts "\tuse_frameworks!"
62
70
  extension['dependencies'].each do |dep|
63
- f.puts "\tpod #{dep['name']}, #{dep['requirement']}"
71
+ f.puts "\tpod '#{dep['name']}', '#{dep['requirement']}'"
64
72
  end
65
73
  f.puts "end"
66
74
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GoNative
4
- VERSION = "0.9.0"
4
+ VERSION = "0.9.3"
5
5
  end
@@ -14,16 +14,17 @@ TODO: Add long description of the pod here.
14
14
 
15
15
  s.ios.deployment_target = '10.0'
16
16
  s.swift_versions = '5.0'
17
- s.preserve_paths = ['plist/*.{plist}', 'Extensions/**/*']
18
17
 
19
18
  s.subspec 'Source' do |cs|
20
19
  cs.source_files = '#{plugin_name}/Classes/**/*.{h,m,swift}'
21
20
  cs.resource_bundle = { '#{plugin_name}JS' => 'js/*.{js,json}' }
21
+ cs.preserve_paths = ['plist/*.{plist}', 'Extensions/**/*']
22
22
  end
23
23
 
24
24
  s.subspec 'Binary' do |cs|
25
25
  cs.ios.vendored_frameworks = 'XCFramework/#{plugin_name}.xcframework'
26
26
  cs.resource_bundle = { '#{plugin_name}JS' => 'js/*.{js,json}' }
27
+ cs.preserve_paths = ['plist/*.{plist}', 'Extensions/**/*']
27
28
  end
28
29
 
29
30
  s.default_subspec = 'Source'
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: 0.9.0
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hunaid Hassan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-01 00:00:00.000000000 Z
11
+ date: 2022-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli