webim / webim-client-sdk-ios

Webim Mobile SDK for iOS (Swift)
MIT License
5 stars 25 forks source link

Demo project don't work #6

Closed fixique closed 5 years ago

fixique commented 5 years ago

Hello, I found some issues with your demo project.

  1. Don't work pod install because you use amonimo and this post install script don't work. Here log:
    
    Analyzing dependencies
    Fetching podspec for `WebimClientLibrary` from `../`
    Downloading dependencies
    Installing Cosmos (16.0.0)
    Installing Crashlytics (3.12.0)
    Installing Fabric (1.9.0)
    Installing PopupDialog (0.6.2)
    Installing SQLite.swift (0.11.5)
    Installing SlackTextViewController (1.9.6)
    Installing SnapKit (4.2.0)
    Installing WebimClientLibrary (3.24.2)
    Generating Pods project
    [Amimono] Pods target found: Pods-WebimClientLibrary_Example
    [Amimono] xcconfigs updated with filelist for target Pods-WebimClientLibrary_Example
    [!] An error occurred while processing the post-install hook of the Podfile.

undefined method `include_in_build_config?' for :Pod::PodTarget

/Library/Ruby/Gems/2.3.0/gems/cocoapods-amimono-0.0.10/lib/cocoapods-amimono/patcher.rb:73:in block (2 levels) in resources_by_config' /Library/Ruby/Gems/2.3.0/gems/cocoapods-amimono-0.0.10/lib/cocoapods-amimono/patcher.rb:72:ineach' /Library/Ruby/Gems/2.3.0/gems/cocoapods-amimono-0.0.10/lib/cocoapods-amimono/patcher.rb:72:in flat_map' /Library/Ruby/Gems/2.3.0/gems/cocoapods-amimono-0.0.10/lib/cocoapods-amimono/patcher.rb:72:inblock in resources_by_config' /Library/Ruby/Gems/2.3.0/gems/cocoapods-amimono-0.0.10/lib/cocoapods-amimono/patcher.rb:71:in each' /Library/Ruby/Gems/2.3.0/gems/cocoapods-amimono-0.0.10/lib/cocoapods-amimono/patcher.rb:71:ineach_with_object' /Library/Ruby/Gems/2.3.0/gems/cocoapods-amimono-0.0.10/lib/cocoapods-amimono/patcher.rb:71:in resources_by_config' /Library/Ruby/Gems/2.3.0/gems/cocoapods-amimono-0.0.10/lib/cocoapods-amimono/patcher.rb:51:inblock in patch_copy_resources_script' /Library/Ruby/Gems/2.3.0/gems/cocoapods-amimono-0.0.10/lib/cocoapods-amimono/patcher.rb:49:in each' /Library/Ruby/Gems/2.3.0/gems/cocoapods-amimono-0.0.10/lib/cocoapods-amimono/patcher.rb:49:inpatch_copy_resources_script' /Library/Ruby/Gems/2.3.0/gems/cocoapods-amimono-0.0.10/lib/cocoapods-amimono/patcher.rb:11:in patch!' /Users/krupenko/Downloads/webim-client-sdk-ios-master 2/Example/Podfile:51:inblock (3 levels) in from_ruby' /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.6.1/lib/cocoapods-core/podfile.rb:179:in post_install!' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:701:inrun_podfile_post_install_hook' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:689:in block in run_podfile_post_install_hooks' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/user_interface.rb:145:inmessage' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:688:in run_podfile_post_install_hooks' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:211:inblock in generate_pods_project' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/user_interface.rb:64:in section' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:208:ingenerate_pods_project' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:139:in install!' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command/install.rb:48:inrun' /Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in run' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:52:inrun' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/bin/pod:55:in <top (required)>' /usr/local/bin/pod:22:inload' /usr/local/bin/pod:22:in `

'

2. After fix every pod I font issue that demo chat don't work.
By default this code execute 
**WebimService.swift** line 78

```Swift
        if (Settings.shared.accountName == Settings.DefaultSettings.accountName.rawValue) {
            sessionBuilder = sessionBuilder.set(visitorFieldsJSONString: "{\"\(VisitorFields.id.rawValue)\":\"\(VisitorFieldsValue.id.rawValue)\",\"\(VisitorFields.name.rawValue)\":\"\(VisitorFieldsValue.name.rawValue)\",\"\(VisitorFields.crc.rawValue)\":\"\(VisitorFieldsValue.crc.rawValue)\"}") // Hardcoded values that work with "demo" account only!
        }

In android demo project this line commented by default.

webim commented 5 years ago

Hello! Thank for your issue.

  1. pod install works with pod version 1.5.3. We will fix the script for the latest pod version as soon as possible.
  2. Chat works with invalid visitor fields hash error. It happened after we changed server settings a few days ago. Now it works without error. Please check it.
Blyabtroi commented 5 years ago

Cocoapods 1.6.1. Getting same error. Still not working?

Blyabtroi commented 5 years ago

https://github.com/Blyabtroi/working-chat-ios

webim commented 5 years ago

Thank you @Blyabtroi and sorry we did not fix it as soon as wished! We'll make an update after dealing with some issues.

webim commented 5 years ago

Please find the release 3.24.3 with the fix for this problem.