Skip to content

Commit

Permalink
[ios] Update to Zendesk 3.0.2 to support Swift 5.1 (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
raldred authored and dcvz committed Nov 5, 2019
1 parent 27c840e commit 270b3cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions ios/RNZendesk/RNZendesk.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ import UIKit
import Foundation
import ZendeskSDK
import ZendeskCoreSDK
import CommonUISDK

@objc(RNZendesk)
class RNZendesk: RCTEventEmitter {

override open static func requiresMainQueueSetup() -> Bool {
override public static func requiresMainQueueSetup() -> Bool {
return false;
}

Expand Down Expand Up @@ -53,7 +54,7 @@ class RNZendesk: RCTEventEmitter {

@objc(identifyAnonymous:email:)
func identifyAnonymous(name: String?, email: String?) {
var identity = Identity.createAnonymous(name: name, email: email)
let identity = Identity.createAnonymous(name: name, email: email)
Zendesk.instance?.setIdentity(identity)
}

Expand All @@ -64,7 +65,7 @@ class RNZendesk: RCTEventEmitter {
DispatchQueue.main.async {
let hcConfig = HelpCenterUiConfiguration()
hcConfig.hideContactSupport = (options["hideContactSupport"] as? Bool) ?? false
let helpCenter = HelpCenterUi.buildHelpCenterOverview(withConfigs: [hcConfig])
let helpCenter = HelpCenterUi.buildHelpCenterOverviewUi(withConfigs: [hcConfig])

let nvc = UINavigationController(rootViewController: helpCenter)
UIApplication.shared.keyWindow?.rootViewController?.present(nvc, animated: true, completion: nil)
Expand Down
3 changes: 2 additions & 1 deletion react-native-zendesk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Pod::Spec.new do |s|

s.source = { :git => package['repository']['url'], :tag => "v#{s.version}" }
s.source_files = "ios/**/*.{h,m,swift}"
s.swift_version = '5.0'

s.dependency "React"
s.dependency "ZendeskSDK", "~> 2.3.1"
s.dependency "ZendeskSDK", "~> 3.0.0"
end

0 comments on commit 270b3cd

Please sign in to comment.