livechat / chat-window-ios

Embeding LiveChat mobile chat window in iOS application
MIT License
24 stars 31 forks source link

swift build error #35

Closed jackson-zhipeng-chang closed 5 years ago

jackson-zhipeng-chang commented 5 years ago

Hi, I'm running into a build error:

the error message is: "Value of type 'CustomVariables' (aka 'Array<(String, String)>') has no member 'firstIndex'"

from this line of code: https://github.com/livechat/chat-window-ios/blob/70c846185998d574a7c95b67e68ea77cb1a6fd1f/Sources/LiveChat.swift#L132

kamil-szostakowski commented 5 years ago

What are the Xcode and Swift versions you are using in your project? How did you embed the widget in your app? Cocoapods or Carthage?

jackson-zhipeng-chang commented 5 years ago

Hi @kamil-szostakowski ! Thank you for getting back! I have found the reason for that, I was using Swift 4.0, for some reasons, it doesn't support function "firstIndex", after I changed to "index", it works!