Skip to content

Commit

Permalink
fix issues with ios version, upped to 12.0+
Browse files Browse the repository at this point in the history
  • Loading branch information
aposnovmati committed Dec 22, 2021
1 parent 2274191 commit e9de83c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion AposnovmatiMatiCapacitorPlugin.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Pod::Spec.new do |s|
s.author = package['author']
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
s.ios.deployment_target = '11.4'
s.ios.deployment_target = '12.0'
s.dependency 'Capacitor'
s.dependency 'Mati-Global-ID-SDK'
s.swift_version = '5.1'
Expand Down
14 changes: 7 additions & 7 deletions ios/Plugin/Plugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ public class MatiCapacitorPlugin: CAPPlugin {
@objc func showMatiFlow(_ call: CAPPluginCall) {
DispatchQueue.main.async { [weak self] in
guard let self = self else { return }
let metadata = call.getObject("metadata") ?? [:]
var metadata = call.getObject("metadata") ?? [:]
metadata["sdk_type"] = "ios_capacitor"
Mati.shared.showMatiFlow(clientId: call.getString("clientId") ?? "",
flowId: call.getString("flowId") ?? "",
metadata: )
metadata: metadata)
MatiButtonResult.shared.delegate = self
call.success()
}
}
}

extension MatiCapacitorPlugin: MatiButtonResultDelegate {
public func verificationSuccess(identityId: String) {
self.bridge.triggerWindowJSEvent(eventName: "verificationSuccess:", data: identityId)
public func verificationSuccess(identityId: String?, verificationID: String?) {
self.bridge?.triggerWindowJSEvent(eventName: "verificationSuccess:", data: identityId ?? "")
debugPrint("verificationSuccess: \(identityId)")
}

public func verificationCancelled() {
self.bridge.triggerWindowJSEvent(eventName: "verificationCancelled")
self.bridge?.triggerWindowJSEvent(eventName: "verificationCancelled")
debugPrint("verificationCancelled")
}
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aposnovmati/mati-capacitor-plugin",
"version": "2.3.4",
"version": "2.4.0",
"description": "Capacitor plugin for MatiSDK",
"main": "dist/plugin.js",
"module": "dist/esm/index.js",
Expand Down

0 comments on commit e9de83c

Please sign in to comment.