mmine 0.9.11 → 0.10.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 +5 -2
- data/lib/mmine/notification_extension_integrator.rb +34 -6
- data/lib/mmine/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d120f4519d83f2b9d20285ebb9576ee4d2e57bcf4d0e13522d017b48cda3264
|
4
|
+
data.tar.gz: b98a2fa77b4fbdb6aaf8db620b0395abf4fb322fa4821b46fb8f27d93f4403e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2d1965b045b7986ed53f91a34a5b5cee6bcf03d22646ad137c5197223d150b2a34ae0a75ae99645b554546322eae384205653e41d223d275e5e7310a0faf9e7
|
7
|
+
data.tar.gz: 5baaeef187da9f3153b80c00c7c444767f342467cba204aceb5af139c454f24edd688375a9a386a5ebe5b8bd3915388474e7697a21f061c1ba3159d0bef0d14d
|
data/bin/mmine
CHANGED
@@ -33,7 +33,10 @@ 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
|
37
40
|
end
|
38
41
|
opts.on("-h", "--help", "Prints this help") do
|
39
42
|
puts opts
|
@@ -50,7 +53,7 @@ when "integrate"
|
|
50
53
|
unless missing.empty?
|
51
54
|
raise OptionParser::MissingArgument.new(missing.join(', '))
|
52
55
|
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)
|
56
|
+
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)
|
54
57
|
integrator.logger = Logger.new(STDOUT)
|
55
58
|
integrator.logger.formatter = proc do |severity, datetime, progname, msg|
|
56
59
|
"#{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)
|
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,7 @@ 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
|
27
28
|
|
28
29
|
@project_dir = Pathname.new(@project_file_path).parent.to_s
|
29
30
|
@project = Xcodeproj::Project.open(@project_file_path)
|
@@ -35,6 +36,7 @@ class NotificationExtensionIntegrator
|
|
35
36
|
@main_build_configurations_release = @main_target.build_configurations.select { |config| config.type == :release }
|
36
37
|
@main_build_settings_debug = @main_build_configurations_debug.map(&:build_settings)
|
37
38
|
@main_build_settings_release = @main_build_configurations_release.map(&:build_settings)
|
39
|
+
|
38
40
|
end
|
39
41
|
|
40
42
|
def logger=(_logger)
|
@@ -86,23 +88,48 @@ class NotificationExtensionIntegrator
|
|
86
88
|
setup_copy_framework_script
|
87
89
|
end
|
88
90
|
else
|
89
|
-
setup_entitlements(@main_build_configurations_debug.map { |config| config.
|
90
|
-
@main_build_configurations_release.map { |config| config.
|
91
|
+
setup_entitlements(@main_build_configurations_debug.map { |config| config.build_settings['CODE_SIGN_ENTITLEMENTS'] },
|
92
|
+
@main_build_configurations_release.map { |config| config.build_settings['CODE_SIGN_ENTITLEMENTS'] },
|
91
93
|
@main_target_name,
|
92
94
|
@main_build_settings_debug,
|
93
95
|
@main_build_settings_release)
|
94
96
|
|
95
|
-
setup_entitlements(@extension_build_configurations_debug.map { |config| config.
|
96
|
-
@extension_build_configurations_release.map { |config| config.
|
97
|
+
setup_entitlements(@extension_build_configurations_debug.map { |config| config.build_settings['CODE_SIGN_ENTITLEMENTS'] },
|
98
|
+
@extension_build_configurations_release.map { |config| config.build_settings['CODE_SIGN_ENTITLEMENTS'] },
|
97
99
|
@extension_target_name,
|
98
100
|
@extension_build_settings_debug,
|
99
101
|
@extension_build_settings_release)
|
100
102
|
end
|
101
103
|
|
104
|
+
if @static_linkage
|
105
|
+
setup_extension_lib_link('libMobileMessaging.a')
|
106
|
+
setup_extension_lib_link('libCocoaLumberjack.a')
|
107
|
+
setup_library_search_paths
|
108
|
+
end
|
109
|
+
|
102
110
|
@project.save
|
103
111
|
puts "🏁 Integration has been finished successfully!"
|
104
112
|
end
|
105
113
|
|
114
|
+
def setup_library_search_paths
|
115
|
+
@logger.debug("Setup library search path")
|
116
|
+
set_notification_extension_build_settings('LIBRARY_SEARCH_PATHS', '"${BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/CocoaLumberjack" "${BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/MobileMessaging"')
|
117
|
+
end
|
118
|
+
|
119
|
+
def setup_extension_lib_link(lib_name)
|
120
|
+
if @extension_target.frameworks_build_phase.files_references.select { |ref| ref.path == lib_name }.first
|
121
|
+
@logger.info("Notification Extension target already has "+ lib_name + " linked.")
|
122
|
+
else
|
123
|
+
@logger.info("Adding "+ lib_name + " to Notification Extension target...")
|
124
|
+
ref = @project['Frameworks'].new_file(lib_name);
|
125
|
+
if ref
|
126
|
+
@extension_target.frameworks_build_phase.add_file_reference(ref)
|
127
|
+
else
|
128
|
+
@logger.error("Unable to add "+ lib_name + " to Notification Extension target!")
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
106
133
|
def setup_extension_target_signing(override_signing)
|
107
134
|
@logger.info("Overriding extension target signing: #{override_signing}")
|
108
135
|
|
@@ -204,7 +231,7 @@ class NotificationExtensionIntegrator
|
|
204
231
|
end
|
205
232
|
|
206
233
|
def setup_deployment_target
|
207
|
-
set_notification_extension_build_settings('IPHONEOS_DEPLOYMENT_TARGET', "
|
234
|
+
set_notification_extension_build_settings('IPHONEOS_DEPLOYMENT_TARGET', "12.0")
|
208
235
|
end
|
209
236
|
|
210
237
|
def setup_notification_extension_info_plist
|
@@ -212,6 +239,7 @@ class NotificationExtensionIntegrator
|
|
212
239
|
@logger.info("Notification extension info plist already exists on path: #{@extension_info_plist_path}")
|
213
240
|
else
|
214
241
|
@logger.info("Copying extension plist file to path: #{@extension_info_plist_path}")
|
242
|
+
|
215
243
|
FileUtils.cp(@extension_plist_source_filepath, @extension_info_plist_path)
|
216
244
|
get_notification_extension_group_reference.new_reference(@extension_info_plist_path) #check if additional plist manipulations needed (target membership?)
|
217
245
|
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.10.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
|