gonative-cli 0.9.0 → 0.9.1

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: 209c566d675f24e9d390dc519042c8e0e4ae7d34106cc11554420645dec7059e
4
+ data.tar.gz: d64745af6c9013723754bf43e3ad5741d157ab108f9f9257cb6d37bc466873e7
5
5
  SHA512:
6
- metadata.gz: 446b75f6fd9d62edb92c3ba57ef32837e64fcb02834dcbb26c2abe146eebe083fce59bf34fcf3f90f1d2f4db2256d59bc0232a2ae36a4263344c192293650793
7
- data.tar.gz: b0732cacf207e93be3b22cec558a6cb87307ef7b627cd68f2b1b63bf1363c0fce6c48f4baa2d7e4bb8d712053440fed962fec065f0074a1b20b5a7a34f07ec59
6
+ metadata.gz: c7d09ae152c411ca063d5285d112aa7fd3f62672b0847d24e72c01ef0729402899e82e7e7f98fda7f6909fcfb518676418dc078abbb198d9272c4e12721bfbad
7
+ data.tar.gz: 2d510fa5fb4f2d1ad93b4a52033870eb3bf52a56a3987567133a7c550c8cc87e3ac9282da0a823e8415fa22b6639191f4b6d24bfe95527c1cb4dfea93cf3bc97
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.0)
5
5
  activesupport (~> 6.0)
6
6
  cocoapods (~> 1.10)
7
7
  colorize (~> 0.8.0)
@@ -13,6 +13,7 @@ module GoNative
13
13
  attr_reader :extensions
14
14
 
15
15
  def call
16
+ FileUtils.cd('/Users/hunaidhassan/Projects/gonative/gonative-ios')
16
17
  prepare_extensions
17
18
  embed_in_project
18
19
  modify_podfile
@@ -32,6 +33,7 @@ module GoNative
32
33
 
33
34
  def embed_in_project
34
35
  proj = Xcodeproj::Project.open('GoNativeIOS.xcodeproj')
36
+ app_target = proj.native_targets.first
35
37
  extensions.each do |extension|
36
38
  target = proj.new_target(:app_extension,
37
39
  extension['name'],
@@ -46,9 +48,14 @@ module GoNative
46
48
  extension_group.new_file(extension['info'])
47
49
  extension_group.new_file(extension['entitlements']) if extension['entitlements']
48
50
  target.build_configurations.each do |config|
51
+ config.build_settings['PRODUCT_NAME'] = "$(TARGET_NAME)"
49
52
  config.build_settings['INFOPLIST_FILE'] = "#{extension['name']}/#{extension['info']}"
50
53
  config.build_settings['CODE_SIGN_ENTITLEMENTS'] = "#{extension['name']}/#{extension['entitlements']}" if extension['entitlements']
51
54
  end
55
+ app_target.add_dependency(target)
56
+ extension_file = proj.files.find{|f| f.path == "#{extension['name']}.appex" }
57
+ embed_phase = app_target.build_phases.find { |phase| phase.class.method_defined?(:name) && phase.name == 'Embed App Extensions' }
58
+ embed_phase.add_file_reference(extension_file, true)
52
59
  end
53
60
 
54
61
  proj.save
@@ -60,7 +67,7 @@ module GoNative
60
67
  f.puts "target '#{extension['name']}' do"
61
68
  f.puts "\tuse_frameworks!"
62
69
  extension['dependencies'].each do |dep|
63
- f.puts "\tpod #{dep['name']}, #{dep['requirement']}"
70
+ f.puts "\tpod '#{dep['name']}', '#{dep['requirement']}'"
64
71
  end
65
72
  f.puts "end"
66
73
  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.1"
5
5
  end
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.1
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-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli