mmine 0.12.0 → 0.12.2

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: f132bbc3d5d76e16424df401d6082e6a6804e25df28f11e78340ddd21cf178f5
4
- data.tar.gz: e4651cd79878f66d210628b6a5d52d528a346a80aba742126943ab6ecea4c564
3
+ metadata.gz: ec38684e72cc5f370931b4e24b49e9aeeb94426bc9a09870aa3d48627e4e3122
4
+ data.tar.gz: 5936702355e3d56b0ee3890e61b9ba670da70f96839718ed8504b05937d067ee
5
5
  SHA512:
6
- metadata.gz: fd9414de4a3510f9f6761fd1d6a138e7e7a69f52893ec7883421724edcd3f9052adfc5e5aac582c834c7e5349b4424f84909769070526c086b4c3064dc21f4eb
7
- data.tar.gz: 8713bc9396e9564a239f21e9f2d7936a8f1f08b7b739bec6651fc44cc432e4a52a62a83d0725aa6eb513073aa841f0f052daf3bd6324f8811cd8d0e1eff1875f
6
+ metadata.gz: 9497bfab57a269d5da68058e256b4c3983ec199a7325f1971eaf396bee2330547f608395746f10b215ce9bf3622b5f543fed74a2cfb18de0e436df1057983840
7
+ data.tar.gz: 9a4e2eb7999c3d4523565df455af032b16e236fc1f6a7614c67091cbba483401631e328aeb34ffcf625edd1a9d7726a3910c8e9d7417648629b8a0c327db75af
data/bin/mmine CHANGED
@@ -39,7 +39,10 @@ integrate_parse = OptionParser.new do |opts|
39
39
  options[:"static-linkage"] = static_linkage
40
40
  end
41
41
  opts.on("-r", "--react-native", "Provide React-Native specific settings") do |react_native|
42
- options[:"react-native"] = react_native
42
+ options[:"react-native"] = react_native
43
+ end
44
+ opts.on("--spm", "--spm", "If MobileMessaging is integrated using Swift Package Manager") do |spm|
45
+ options[:"spm"] = spm
43
46
  end
44
47
  opts.on("-h", "--help", "Prints this help") do
45
48
  puts opts
@@ -56,7 +59,7 @@ when "integrate"
56
59
  unless missing.empty?
57
60
  raise OptionParser::MissingArgument.new(missing.join(', '))
58
61
  end
59
- integrator = NotificationExtensionIntegrator.new(options[:"application-code"], options[:project], options[:"app-group"], options[:target], options[:cordova] || false, options[:xcframework] || false, options[:"swift-version"] || "5", options[:"override-signing"] || false, options[:"static-linkage"] || false, options[:"react-native"] || false)
62
+ integrator = NotificationExtensionIntegrator.new(options[:"application-code"], options[:project], options[:"app-group"], options[:target], options[:cordova] || false, options[:xcframework] || false, options[:"swift-version"] || "5", options[:"override-signing"] || false, options[:"static-linkage"] || false, options[:"react-native"] || false, options[:"spm"] || false)
60
63
  integrator.logger = Logger.new(STDOUT)
61
64
  integrator.logger.formatter = proc do |severity, datetime, progname, msg|
62
65
  "#{severity}: #{msg}\n"
@@ -14,7 +14,7 @@ module Mmine
14
14
  end
15
15
 
16
16
  class NotificationExtensionIntegrator
17
- def initialize(application_code, project_file_path, app_group, main_target_name, cordova = false, xcframework = false, swift_ver, override_signing, static_linkage, react_native)
17
+ def initialize(application_code, project_file_path, app_group, main_target_name, cordova = false, xcframework = false, swift_ver, override_signing, static_linkage, react_native, spm)
18
18
  @project_file_path = project_file_path
19
19
  @app_group = app_group
20
20
  @main_target_name = main_target_name
@@ -26,6 +26,7 @@ class NotificationExtensionIntegrator
26
26
  @override_signing = override_signing
27
27
  @static_linkage = static_linkage
28
28
  @react_native = react_native
29
+ @spm = spm
29
30
 
30
31
  @project_dir = Pathname.new(@project_file_path).parent.to_s
31
32
  @project = Xcodeproj::Project.open(@project_file_path)
@@ -50,6 +51,7 @@ class NotificationExtensionIntegrator
50
51
 
51
52
  def setup_notification_extension
52
53
  puts "🏎 Integration starting... ver. #{Mmine::VERSION}"
54
+ @logger.debug("Integration with parameters: \n application_code: #{@application_code} \n project_file_path: #{@project_file_path} \n app_group: #{@app_group} \n main_target_name: #{@main_target_name} \n cordova: #{@cordova} \n xcframework: #{@xcframework} \n swift_ver: #{@swift_ver} \n override_signing: #{@override_signing} \n static_linkage: #{@static_linkage} \n react_native: #{@react_native} \n spm: #{@spm}")
53
55
  @logger.debug("\n@main_target_build_configurations_debug #{@main_build_configurations_debug}\n@main_target_build_configurations_release #{@main_build_configurations_release}")
54
56
  @logger.debug("\n@main_target_build_configurations_debug #{JSON.pretty_generate(@main_build_settings_debug)}\n@main_target_build_configurations_release #{JSON.pretty_generate(@main_build_settings_release)}")
55
57
  create_notification_extension_target
@@ -110,6 +112,10 @@ class NotificationExtensionIntegrator
110
112
  setup_library_search_paths
111
113
  end
112
114
 
115
+ if @spm
116
+ setup_extension_spm_dependency('MobileMessaging')
117
+ end
118
+
113
119
  @project.save
114
120
  puts "🏁 Integration has been finished successfully!"
115
121
  end
@@ -119,6 +125,13 @@ class NotificationExtensionIntegrator
119
125
  set_notification_extension_build_settings('LIBRARY_SEARCH_PATHS', '"${BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/CocoaLumberjack" "${BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/MobileMessaging"')
120
126
  end
121
127
 
128
+ def setup_extension_spm_dependency(name)
129
+ product_dependency = @main_target.package_product_dependencies.find { |ref| ref.product_name == name }
130
+ unless product_dependency.nil? || @extension_target.package_product_dependencies.any? {|ref| ref.product_name == name}
131
+ @extension_target.package_product_dependencies.append(product_dependency)
132
+ end
133
+ end
134
+
122
135
  def setup_extension_lib_link(lib_name)
123
136
  if @extension_target.frameworks_build_phase.files_references.select { |ref| ref.path == lib_name }.first
124
137
  @logger.info("Notification Extension target already has "+ lib_name + " linked.")
data/lib/mmine/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mmine
2
- VERSION = "0.12.0"
2
+ VERSION = "0.12.2"
3
3
  end
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mmine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Kadochnikov
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2018-10-16 00:00:00.000000000 Z
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.20.0
19
+ version: 1.22.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 1.20.0
26
+ version: 1.22.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -58,7 +58,7 @@ licenses:
58
58
  - MIT
59
59
  metadata:
60
60
  source_code_url: https://github.com/infobip/mobile-messaging-mmine
61
- post_install_message:
61
+ post_install_message:
62
62
  rdoc_options: []
63
63
  require_paths:
64
64
  - lib
@@ -73,8 +73,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  requirements: []
76
- rubygems_version: 3.1.6
77
- signing_key:
76
+ rubygems_version: 3.0.3.1
77
+ signing_key:
78
78
  specification_version: 4
79
79
  summary: Mobile Messaging iOS Notification Extension Integration Tool made at Infobip
80
80
  (https://www.infobip.com)!!!