mmine 0.12.0 → 0.13.0
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 +4 -4
- data/bin/mmine +5 -2
- data/lib/mmine/notification_extension_integrator.rb +16 -4
- data/lib/mmine/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1987eaebb795a789663acee6d8f0baa1809dc20372035081fa732774cc5a988
|
4
|
+
data.tar.gz: af08d7e4c231a75d7bbec89e0e7275f509753169d7ac0db0cdcfe240ad886124
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4384c96a3394dd2ba46447437b81378fe34c5221bc078db8b7d08b81644b01fdbf37e93c15a26d1e43e562135592ed8bea8e53a47fc4924d73bdaef1e97e2083
|
7
|
+
data.tar.gz: 65c086406a02cdd1080912c7ab58bda7d164d574f52133a1b7d3ec5ddbfabf2141d5344f7ab4b00e056f6e0baa35639304ddbee9561d42e58a93e50a8c537979
|
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
|
-
|
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
|
@@ -84,9 +86,8 @@ class NotificationExtensionIntegrator
|
|
84
86
|
@extension_build_settings_debug,
|
85
87
|
@extension_build_settings_release)
|
86
88
|
#setup_extension_lib_cordova_link
|
87
|
-
|
88
|
-
|
89
|
-
setup_copy_framework_script
|
89
|
+
if @xcframework
|
90
|
+
setup_framework_search_paths
|
90
91
|
end
|
91
92
|
else
|
92
93
|
setup_entitlements(@main_build_configurations_debug.map { |config| config.build_settings['CODE_SIGN_ENTITLEMENTS'] },
|
@@ -110,6 +111,10 @@ class NotificationExtensionIntegrator
|
|
110
111
|
setup_library_search_paths
|
111
112
|
end
|
112
113
|
|
114
|
+
if @spm
|
115
|
+
setup_extension_spm_dependency('MobileMessaging')
|
116
|
+
end
|
117
|
+
|
113
118
|
@project.save
|
114
119
|
puts "🏁 Integration has been finished successfully!"
|
115
120
|
end
|
@@ -119,6 +124,13 @@ class NotificationExtensionIntegrator
|
|
119
124
|
set_notification_extension_build_settings('LIBRARY_SEARCH_PATHS', '"${BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/CocoaLumberjack" "${BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/MobileMessaging"')
|
120
125
|
end
|
121
126
|
|
127
|
+
def setup_extension_spm_dependency(name)
|
128
|
+
product_dependency = @main_target.package_product_dependencies.find { |ref| ref.product_name == name }
|
129
|
+
unless product_dependency.nil? || @extension_target.package_product_dependencies.any? {|ref| ref.product_name == name}
|
130
|
+
@extension_target.package_product_dependencies.append(product_dependency)
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
122
134
|
def setup_extension_lib_link(lib_name)
|
123
135
|
if @extension_target.frameworks_build_phase.files_references.select { |ref| ref.path == lib_name }.first
|
124
136
|
@logger.info("Notification Extension target already has "+ lib_name + " linked.")
|
data/lib/mmine/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mmine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey Kadochnikov
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
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.
|
26
|
+
version: 1.22.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: nokogiri
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0'
|
75
75
|
requirements: []
|
76
|
-
rubygems_version: 3.
|
76
|
+
rubygems_version: 3.3.26
|
77
77
|
signing_key:
|
78
78
|
specification_version: 4
|
79
79
|
summary: Mobile Messaging iOS Notification Extension Integration Tool made at Infobip
|