cocoapods-binary 0.4.0 → 0.4.1

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: 7b06937c124b45ca9bdd9c343d3a5a095dbeca45812129bc6df581d1af9e44a9
4
- data.tar.gz: bee354ccb5c8519da830b0bf74fc2975db7df7cbad38ebff01f2a15eadc35dd1
3
+ metadata.gz: c8b8187b94eb261901bdf3928c51898d18cf5311b4982df4b8f32f3f55503979
4
+ data.tar.gz: 0d7c322deb6c7d748d4baa1984bc35998667223a1bb01551384de1e66f1e8d99
5
5
  SHA512:
6
- metadata.gz: f5e0abb86ec640703f922a5898f546876321d031e4dd02567a5890d2b6714ed4791d04915e8e3eb4e8ed25ada5ea9fcbdfd38fec7b3ccbd9465c8af437075c9f
7
- data.tar.gz: 17717118fdc62c3e8e602ef45fbd9e190e91cb751ada20cb51d67dbe74a2a40150aae45bfa72ede45a19733db61e1b28852644161000f2d0c3a2a061684fd897
6
+ metadata.gz: 389815bb325e9d6552d47d719e371e5da8aa87d461dd43c5044cfa42e9d948539beeb4e422f7d87550448b99a4731fa7807586f683846b6036fa716f477cbca5
7
+ data.tar.gz: 6516ee84a6669411f0f2351afed475959249b76c82fb5718b90d74d441801980cd60b5c9b42de693f35ab3e857558efed7cb6ae74e7065b44b7be4293a2ee09e
@@ -1,3 +1,3 @@
1
1
  module CocoapodsBinary
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
@@ -29,24 +29,34 @@ def build_for_iosish_platform(sandbox,
29
29
  xcodebuild(sandbox, target_label, device, deployment_target, other_options)
30
30
  xcodebuild(sandbox, target_label, simulator, deployment_target, other_options + ['ARCHS=x86_64', 'ONLY_ACTIVE_ARCH=NO'])
31
31
 
32
+ # paths
32
33
  root_name = target.pod_name
33
34
  module_name = target.product_module_name
34
-
35
- executable_path = "#{build_dir}/#{root_name}"
36
- device_lib = "#{build_dir}/#{CONFIGURATION}-#{device}/#{root_name}/#{module_name}.framework/#{module_name}"
37
- device_framework_lib = File.dirname(device_lib)
38
- simulator_lib = "#{build_dir}/#{CONFIGURATION}-#{simulator}/#{root_name}/#{module_name}.framework/#{module_name}"
39
-
40
- return unless File.file?(device_lib) && File.file?(simulator_lib)
35
+ device_framwork_path = "#{build_dir}/#{CONFIGURATION}-#{device}/#{root_name}/#{module_name}.framework"
36
+ simulator_framwork_path = "#{build_dir}/#{CONFIGURATION}-#{simulator}/#{root_name}/#{module_name}.framework"
41
37
 
42
- lipo_log = `lipo -create -output #{executable_path} #{device_lib} #{simulator_lib}`
43
- puts lipo_log unless File.exist?(executable_path)
38
+ device_binary = device_framwork_path + "/#{module_name}"
39
+ simulator_binary = simulator_framwork_path + "/#{module_name}"
40
+ return unless File.file?(device_binary) && File.file?(simulator_binary)
41
+
42
+ # the device_lib path is the final output file path
43
+ # combine the bianries
44
+ tmp_lipoed_binary_path = "#{build_dir}/#{root_name}"
45
+ lipo_log = `lipo -create -output #{tmp_lipoed_binary_path} #{device_binary} #{simulator_binary}`
46
+ puts lipo_log unless File.exist?(tmp_lipoed_binary_path)
47
+ FileUtils.mv tmp_lipoed_binary_path, device_binary, :force => true
48
+
49
+ # collect the swiftmodule file for various archs.
50
+ device_swiftmodule_path = device_framwork_path + "/Modules/#{module_name}.swiftmodule"
51
+ simulator_swiftmodule_path = simulator_framwork_path + "/Modules/#{module_name}.swiftmodule"
52
+ if File.exist?(device_swiftmodule_path)
53
+ FileUtils.cp_r simulator_swiftmodule_path + "/.", device_swiftmodule_path
54
+ end
44
55
 
45
- FileUtils.mv executable_path, device_lib, :force => true
56
+ # output
46
57
  output_path.mkpath unless output_path.exist?
47
- FileUtils.mv device_framework_lib, output_path, :force => true
48
- FileUtils.rm simulator_lib if File.file?(simulator_lib)
49
- FileUtils.rm device_lib if File.file?(device_lib)
58
+ FileUtils.mv device_framwork_path, output_path, :force => true
59
+
50
60
  end
51
61
 
52
62
  def xcodebuild(sandbox, target, sdk='macosx', deployment_target=nil, other_options=[])
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-binary
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - leavez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-16 00:00:00.000000000 Z
11
+ date: 2018-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods