mmine 0.13.2 → 1.0.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 +2 -5
- data/lib/mmine/notification_extension_integrator.rb +2 -15
- data/lib/mmine/version.rb +1 -1
- data/resources/NotificationService.swift +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e410c06713dd46ba8c8958608f5dfdd96a1b008026a601c726658b9d6f85d7a
|
4
|
+
data.tar.gz: 9876b8a1d61f1f0b59adc402770eedf951c13263f733990d5b7af4c80d05a9e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22485f6a5cad7dbdbd5c825943652a0b2f0ba87372a7620de18f8a3ace7995f7bed5ce887b01031e707d4b0923e43aa609115dc632406163ca0f76a5e4436d2d
|
7
|
+
data.tar.gz: 233bbf687258665dbddeeb37718e670e63e16c92e78dc99c26d3c8c167094e642f990acd7e2368057ecdb7c76f4e15aa2ed9b96ad28a1eb6c071ba7fcfdb590a
|
data/bin/mmine
CHANGED
@@ -8,9 +8,6 @@ first_arg, *the_rest = ARGV
|
|
8
8
|
options = {}
|
9
9
|
integrate_parse = OptionParser.new do |opts|
|
10
10
|
opts.banner = "Usage: mmine [command] [parameters]"
|
11
|
-
opts.on("-a", "--application-code APP_CODE", "Your Push Application Code from Infobip Portal") do |app_code|
|
12
|
-
options[:"application-code"] = app_code
|
13
|
-
end
|
14
11
|
opts.on("-p", "--project XCODE_PROJECT", "Path for your Xcode project file (.xcodeproj)") do |project|
|
15
12
|
options[:project] = project
|
16
13
|
end
|
@@ -54,12 +51,12 @@ case first_arg
|
|
54
51
|
when "integrate"
|
55
52
|
begin
|
56
53
|
integrate_parse.parse!
|
57
|
-
mandatory = [:"
|
54
|
+
mandatory = [:"project", :"app-group", :"target"]
|
58
55
|
missing = mandatory.select{ |param| options[param].nil? }
|
59
56
|
unless missing.empty?
|
60
57
|
raise OptionParser::MissingArgument.new(missing.join(', '))
|
61
58
|
end
|
62
|
-
integrator = NotificationExtensionIntegrator.new(options[:
|
59
|
+
integrator = NotificationExtensionIntegrator.new(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)
|
63
60
|
integrator.logger = Logger.new(STDOUT)
|
64
61
|
integrator.logger.formatter = proc do |severity, datetime, progname, msg|
|
65
62
|
"#{severity}: #{msg}\n"
|
@@ -14,7 +14,7 @@ module Mmine
|
|
14
14
|
end
|
15
15
|
|
16
16
|
class NotificationExtensionIntegrator
|
17
|
-
def initialize(
|
17
|
+
def initialize(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
|
@@ -22,7 +22,6 @@ class NotificationExtensionIntegrator
|
|
22
22
|
@cordova = cordova
|
23
23
|
@xcframework = xcframework
|
24
24
|
@swift_version = swift_ver
|
25
|
-
@application_code = application_code
|
26
25
|
@override_signing = override_signing
|
27
26
|
@static_linkage = static_linkage
|
28
27
|
@react_native = react_native
|
@@ -51,7 +50,7 @@ class NotificationExtensionIntegrator
|
|
51
50
|
|
52
51
|
def setup_notification_extension
|
53
52
|
puts "🏎 Integration starting... ver. #{Mmine::VERSION}"
|
54
|
-
@logger.debug("Integration with parameters: \n
|
53
|
+
@logger.debug("Integration with parameters: \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}")
|
55
54
|
@logger.debug("\n@main_target_build_configurations_debug #{@main_build_configurations_debug}\n@main_target_build_configurations_release #{@main_build_configurations_release}")
|
56
55
|
@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)}")
|
57
56
|
create_notification_extension_target
|
@@ -226,18 +225,6 @@ class NotificationExtensionIntegrator
|
|
226
225
|
filereference = get_notification_extension_group_reference.new_reference(@extension_code_destination_filepath)
|
227
226
|
@extension_target.add_file_references([filereference])
|
228
227
|
end
|
229
|
-
put_application_code_in_source_code
|
230
|
-
end
|
231
|
-
|
232
|
-
def put_application_code_in_source_code
|
233
|
-
source_code = File.read(@extension_code_destination_filepath)
|
234
|
-
modified_source_code = source_code.gsub(/<# put your Application Code here #>/, "\"#{@application_code}\"")
|
235
|
-
unless source_code == modified_source_code
|
236
|
-
File.open(@extension_code_destination_filepath, "w") do |file|
|
237
|
-
@logger.info("\tWriting application code to source code at #{@extension_code_destination_filepath}")
|
238
|
-
file.puts modified_source_code
|
239
|
-
end
|
240
|
-
end
|
241
228
|
end
|
242
229
|
|
243
230
|
def setup_development_team
|
data/lib/mmine/version.rb
CHANGED
@@ -15,7 +15,6 @@ class NotificationService: UNNotificationServiceExtension {
|
|
15
15
|
|
16
16
|
// Check if notification is from Infobip
|
17
17
|
if MM_MTMessage.isCorrectPayload(request.content.userInfo) {
|
18
|
-
MobileMessagingNotificationServiceExtension.startWithApplicationCode(<# put your Application Code here #>)
|
19
18
|
MobileMessagingNotificationServiceExtension.didReceive(request, withContentHandler: contentHandler)
|
20
19
|
} else {
|
21
20
|
// Pass through non-Infobip notifications
|
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: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey Kadochnikov
|
@@ -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.2.33
|
77
77
|
signing_key:
|
78
78
|
specification_version: 4
|
79
79
|
summary: Mobile Messaging iOS Notification Extension Integration Tool made at Infobip
|