Github exyte Macaw-示例快速编译器错误 [英] Github exyte Macaw-Examples swift compiler error
问题描述
Github exyte Macaw-Example生成以下Swift编译器错误:
The Github exyte Macaw-Example generates the following Swift compiler error:
我认为SWXMLHash.swift中的第457行可能是重新声明。
I assume line 457 in SWXMLHash.swift may be the redeclaration.
455 /// Returned from SWXMLHash, allows easy element lookup into XML data.
456 public enum XMLIndexer: Sequence {
457 case Element(XMLElement)
458 case List([XMLElement])
459 case Stream(IndexOps)
460 case XMLError(IndexingError)
推荐答案
我调查了这些金刚鹦鹉和 SWXMLHash 问题在Github上发布,同时也出现了 Swift 4 bug 。
长话短说:
I investigated these Macaw and SWXMLHash issues on Github and also this Swift 4 bug. Long story short:
Macaw正在使用依赖项SWXMLHash 3.1,它具有此错误。
的修复方法是使用最新版本的SWXMLHash(4.0或类似版本)。
Macaw is using the dependency SWXMLHash 3.1, which has this bug. The fix is to use the latest version of the SWXMLHash (4.0 or similar).
简易解决方案:使用Xcode 8.3.3
Easy solution: use Xcode 8.3.3
更改podspec :进入 Macaw.podspec
,并更改行 s.dependency'SWXMLHash','〜> 3.0.0 到
s.dependency SWXMLHash,〜> 4.1.0'
Change podspec: go into Macaw.podspec
, and change the line s.dependency 'SWXMLHash', '~> 3.0.0'
to s.dependency 'SWXMLHash', '~> 4.1.0'
否则:
-
下载最新的SWXMLHash框架版本
Download last SWXMLHash framework version
从以下位置复制 SWXMLHash.swift
和 SWXMLHash + TypeConversion.swift
将 Source
文件夹放入您的 / Pods / SWXMLHash / Source
文件夹中。
Copy SWXMLHash.swift
and SWXMLHash+TypeConversion.swift
from Source
folder into your /Pods/SWXMLHash/Source
folder.
但是,仍然应该选择最后一个解决方案-考虑Xcode的风险9,因为它仍处于测试阶段。
But still, should you choose the last solution - consider risks with Xcode 9, because it is still in beta.
这篇关于Github exyte Macaw-示例快速编译器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!