mmine 0.9.9 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/mmine +8 -2
- data/lib/mmine/notification_extension_integrator.rb +37 -6
- 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: f2df763dc9da60a896e89d1a9e53a0f66c2d60850516a6a911410f317ea9132f
|
4
|
+
data.tar.gz: 8af6b1c3b0c93e6e3ff3480ce19264578ac940a9eb2266459dd597b75bac7dfc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7357b67048f8ae3411b99e07642835574d5c75343258ea2671b5c0dd9d30d042b3575d436f0adfba7b5fd7dd41e7c7d2c3673ad05a151daf2d37db18808912f1
|
7
|
+
data.tar.gz: 31ca531428c2f79f1e47826d6f199e013027e70837cb97791db75f07523a3e805408d1dd909c32c7fc86882f1df0f226d9e92dc19f06807e5651f9f0c0225651
|
data/bin/mmine
CHANGED
@@ -33,7 +33,13 @@ integrate_parse = OptionParser.new do |opts|
|
|
33
33
|
options[:"swift-version"] = ver
|
34
34
|
end
|
35
35
|
opts.on("-s", "--override-signing", "Override parameters for MobileMessagingNotificationExtension signing using build flags") do |override|
|
36
|
-
|
36
|
+
options[:"override-signing"] = override
|
37
|
+
end
|
38
|
+
opts.on("-sl", "--static-linkage", "If cocoapods static linkage used for MobileMessaging pods") do |static_linkage|
|
39
|
+
options[:"static-linkage"] = static_linkage
|
40
|
+
end
|
41
|
+
opts.on("-rn", "--react-native", "Provide React-Native specific settings") do |react_native|
|
42
|
+
options[:"react-native"] = react_native
|
37
43
|
end
|
38
44
|
opts.on("-h", "--help", "Prints this help") do
|
39
45
|
puts opts
|
@@ -50,7 +56,7 @@ when "integrate"
|
|
50
56
|
unless missing.empty?
|
51
57
|
raise OptionParser::MissingArgument.new(missing.join(', '))
|
52
58
|
end
|
53
|
-
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)
|
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)
|
54
60
|
integrator.logger = Logger.new(STDOUT)
|
55
61
|
integrator.logger.formatter = proc do |severity, datetime, progname, msg|
|
56
62
|
"#{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)
|
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)
|
18
18
|
@project_file_path = project_file_path
|
19
19
|
@app_group = app_group
|
20
20
|
@main_target_name = main_target_name
|
@@ -24,6 +24,8 @@ class NotificationExtensionIntegrator
|
|
24
24
|
@swift_version = swift_ver
|
25
25
|
@application_code = application_code
|
26
26
|
@override_signing = override_signing
|
27
|
+
@static_linkage = static_linkage
|
28
|
+
@react_native = react_native
|
27
29
|
|
28
30
|
@project_dir = Pathname.new(@project_file_path).parent.to_s
|
29
31
|
@project = Xcodeproj::Project.open(@project_file_path)
|
@@ -35,6 +37,7 @@ class NotificationExtensionIntegrator
|
|
35
37
|
@main_build_configurations_release = @main_target.build_configurations.select { |config| config.type == :release }
|
36
38
|
@main_build_settings_debug = @main_build_configurations_debug.map(&:build_settings)
|
37
39
|
@main_build_settings_release = @main_build_configurations_release.map(&:build_settings)
|
40
|
+
|
38
41
|
end
|
39
42
|
|
40
43
|
def logger=(_logger)
|
@@ -86,23 +89,50 @@ class NotificationExtensionIntegrator
|
|
86
89
|
setup_copy_framework_script
|
87
90
|
end
|
88
91
|
else
|
89
|
-
setup_entitlements(@main_build_configurations_debug.map { |config| config.
|
90
|
-
@main_build_configurations_release.map { |config| config.
|
92
|
+
setup_entitlements(@main_build_configurations_debug.map { |config| config.build_settings['CODE_SIGN_ENTITLEMENTS'] },
|
93
|
+
@main_build_configurations_release.map { |config| config.build_settings['CODE_SIGN_ENTITLEMENTS'] },
|
91
94
|
@main_target_name,
|
92
95
|
@main_build_settings_debug,
|
93
96
|
@main_build_settings_release)
|
94
97
|
|
95
|
-
setup_entitlements(@extension_build_configurations_debug.map { |config| config.
|
96
|
-
@extension_build_configurations_release.map { |config| config.
|
98
|
+
setup_entitlements(@extension_build_configurations_debug.map { |config| config.build_settings['CODE_SIGN_ENTITLEMENTS'] },
|
99
|
+
@extension_build_configurations_release.map { |config| config.build_settings['CODE_SIGN_ENTITLEMENTS'] },
|
97
100
|
@extension_target_name,
|
98
101
|
@extension_build_settings_debug,
|
99
102
|
@extension_build_settings_release)
|
100
103
|
end
|
101
104
|
|
105
|
+
if @static_linkage
|
106
|
+
setup_extension_lib_link('libMobileMessaging.a')
|
107
|
+
unless @react_native
|
108
|
+
setup_extension_lib_link('libCocoaLumberjack.a')
|
109
|
+
end
|
110
|
+
setup_library_search_paths
|
111
|
+
end
|
112
|
+
|
102
113
|
@project.save
|
103
114
|
puts "🏁 Integration has been finished successfully!"
|
104
115
|
end
|
105
116
|
|
117
|
+
def setup_library_search_paths
|
118
|
+
@logger.debug("Setup library search path")
|
119
|
+
set_notification_extension_build_settings('LIBRARY_SEARCH_PATHS', '"${BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/CocoaLumberjack" "${BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/MobileMessaging"')
|
120
|
+
end
|
121
|
+
|
122
|
+
def setup_extension_lib_link(lib_name)
|
123
|
+
if @extension_target.frameworks_build_phase.files_references.select { |ref| ref.path == lib_name }.first
|
124
|
+
@logger.info("Notification Extension target already has "+ lib_name + " linked.")
|
125
|
+
else
|
126
|
+
@logger.info("Adding "+ lib_name + " to Notification Extension target...")
|
127
|
+
ref = @project['Frameworks'].new_file(lib_name);
|
128
|
+
if ref
|
129
|
+
@extension_target.frameworks_build_phase.add_file_reference(ref)
|
130
|
+
else
|
131
|
+
@logger.error("Unable to add "+ lib_name + " to Notification Extension target!")
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
106
136
|
def setup_extension_target_signing(override_signing)
|
107
137
|
@logger.info("Overriding extension target signing: #{override_signing}")
|
108
138
|
|
@@ -204,7 +234,7 @@ class NotificationExtensionIntegrator
|
|
204
234
|
end
|
205
235
|
|
206
236
|
def setup_deployment_target
|
207
|
-
set_notification_extension_build_settings('IPHONEOS_DEPLOYMENT_TARGET', "
|
237
|
+
set_notification_extension_build_settings('IPHONEOS_DEPLOYMENT_TARGET', "12.0")
|
208
238
|
end
|
209
239
|
|
210
240
|
def setup_notification_extension_info_plist
|
@@ -212,6 +242,7 @@ class NotificationExtensionIntegrator
|
|
212
242
|
@logger.info("Notification extension info plist already exists on path: #{@extension_info_plist_path}")
|
213
243
|
else
|
214
244
|
@logger.info("Copying extension plist file to path: #{@extension_info_plist_path}")
|
245
|
+
|
215
246
|
FileUtils.cp(@extension_plist_source_filepath, @extension_info_plist_path)
|
216
247
|
get_notification_extension_group_reference.new_reference(@extension_info_plist_path) #check if additional plist manipulations needed (target membership?)
|
217
248
|
end
|
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.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey Kadochnikov
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.13.4
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
40
|
+
version: 1.13.4
|
41
41
|
description: Use this tool to automatically integrate your Xcode project with Infobips
|
42
42
|
(https://www.infobip.com) Notification Service Extension
|
43
43
|
email: andrey.kadochnikov@infobip.com
|
@@ -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.1.
|
76
|
+
rubygems_version: 3.1.6
|
77
77
|
signing_key:
|
78
78
|
specification_version: 4
|
79
79
|
summary: Mobile Messaging iOS Notification Extension Integration Tool made at Infobip
|