首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法使用流聊天iOS SDK构建项目

无法使用流聊天iOS SDK构建项目
EN

Stack Overflow用户
提问于 2019-07-17 01:45:52
回答 1查看 180关注 0票数 0

我正在尝试使用新的Stream iOS聊天软件开发工具包,但在通过Cocoapods安装后无法进行构建。在我们添加StreamChat之前,该项目是使用列出的其他pod构建的。我使用的是Xcode 10.2 (不适用于10.1)、Swift 4.2和Cocoapods版本1.7.4。我们使用了Stream网站上列出的pod install命令:

pod install --repo-update

我们的Podfile如下所示:

代码语言:javascript
复制
platform :ios, '11.0'
inhibit_all_warnings!

target 'Project-iOS' do
  use_frameworks!

  # Pods for Project-iOS
  pod 'ReachabilitySwift', '4.3.0'
  pod 'SwiftKeychainWrapper', '3.2.0'
  pod 'CropViewController'
  pod 'StreamChat'

  target 'Project-iOSTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'Project-iOSUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '4.2'
    end
  end
end

*请注意,我在最后尝试了使用和不使用post_install位-但必须手动将pods更改为4.2,因为许多人还不支持5.0。

以下是我在尝试构建时看到的错误:

编辑:我还试着在一个新的空白项目中运行它,只使用针对iOS 11的StreamChat pod (基本上就像ChatDemo的站点状态上的说明一样),但遇到了相同类型的问题。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-07-18 17:25:05

与您的第一个问题相关,请确保使用Xcode 10.2或更高版本和Swift 5。

不需要强制pods升级到Swift 4.2。尝试从您的Podfile中删除这些行,那么您的项目应该会编译而不会出现任何错误:

代码语言:javascript
复制
post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '4.2'
    end
  end
end
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57062853

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档