mmine 0.6.4 → 0.6.5
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/lib/mmine/notification_extension_integrator.rb +28 -0
- data/lib/mmine/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f2045b61641a12e8589ce89426cd8073c7d4cf53f1a5168cb39819156bbcaa4
|
4
|
+
data.tar.gz: 540a3ddc21c8b271c39cd4cb16313f7a3ef39151011a5d5462026bb425f07226
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aea5dcc25c0e993d5d8da8ff13d3b9654fc657dbcc149bb1b009294a7bcef4920e7b81b1c65fe4d1fabc040cf17b16602770c55811aefad8d05d4d1eeec3bdbc
|
7
|
+
data.tar.gz: 65517bb0840ce538f47ea6df617f6f66b74100257b810ca0355485d513b9e21013cf244a15bdc8d188cfe8f62a1220d599aca74b0966d4322cd487677cc35360
|
@@ -67,6 +67,9 @@ class NotificationExtensionIntegrator
|
|
67
67
|
setupMainTargetDependency()
|
68
68
|
setupSwiftVersion()
|
69
69
|
setupProductName()
|
70
|
+
setupBuilNumber()
|
71
|
+
|
72
|
+
# todo : remove MobileMessaging.framework from mains target Embed Frameworks
|
70
73
|
|
71
74
|
if @cordova
|
72
75
|
setupFrameworkSearchPaths()
|
@@ -219,6 +222,15 @@ class NotificationExtensionIntegrator
|
|
219
222
|
setNotificationExtensionBuildSettings('PRODUCT_NAME', @ne_target_name)
|
220
223
|
end
|
221
224
|
|
225
|
+
def setupBuilNumber
|
226
|
+
version_key = "CFBundleShortVersionString"
|
227
|
+
build_key = "CFBundleVersion"
|
228
|
+
main_version = getXMLStringValue(version_key, @main_target_release_plist)
|
229
|
+
main_build = getXMLStringValue(build_key, @main_target_release_plist)
|
230
|
+
putStringValueIntoXML(version_key, main_version, @extension_info_plist_path)
|
231
|
+
putStringValueIntoXML(build_key, main_build, @extension_info_plist_path)
|
232
|
+
end
|
233
|
+
|
222
234
|
def setupLibCordovaLink
|
223
235
|
lib_cordova_name = 'libCordova.a'
|
224
236
|
unless @ne_target.frameworks_build_phase.files_references.select { |ref| ref.path == lib_cordova_name }.first
|
@@ -392,6 +404,22 @@ class NotificationExtensionIntegrator
|
|
392
404
|
return ret
|
393
405
|
end
|
394
406
|
|
407
|
+
def getXMLStringValue(key, plist_path)
|
408
|
+
plist_path = resolveAbsolutePath(plist_path)
|
409
|
+
doc = Nokogiri::XML(IO.read(plist_path))
|
410
|
+
key_node = doc.search("//dict//key[text() = '#{key}']").first
|
411
|
+
if key_node == nil
|
412
|
+
return nil
|
413
|
+
else
|
414
|
+
existing_string_value_node = key_node.xpath("following-sibling::*").first
|
415
|
+
if existing_string_value_node.name == 'string'
|
416
|
+
return existing_string_value_node.content
|
417
|
+
else
|
418
|
+
return nil
|
419
|
+
end
|
420
|
+
end
|
421
|
+
end
|
422
|
+
|
395
423
|
def putStringValueIntoXML(key, value, plist_path)
|
396
424
|
plist_path = resolveAbsolutePath(plist_path)
|
397
425
|
@logger.info("\tConfiguring plist on path: #{plist_path}")
|
data/lib/mmine/version.rb
CHANGED