小编72A*_*F4E的帖子

如何在Xcode中归档/导出Framework?

我有一个带有框架目标的项目,但是当我存档时,框架不会出现在组织者中.我检查了苹果的文档,但只找到了静态库的参考.

有谁之前经历过这个吗?

以下是我当前方案设置的屏幕截图 建设方案 发布计划

xcode frameworks ios

22
推荐指数
1
解决办法
7523
查看次数

iOS Universal Links NSURLAuthenticationMethodServerTrust kAuthenticationErr

我在我们的应用程序中设置了Universal Links,我无法在应用安装上从我的服务器检索apple-app-site-association文件.设备控制台在安装过程中尝试检索文件时出现以下错误:

Rejecting URL 'https://example.com/apple-app-site-association' for auth method 'NSURLAuthenticationMethodServerTrust': -6754/0xFFFFE59E kAuthenticationErr
Run Code Online (Sandbox Code Playgroud)

我可以使用相同的设备在Safari中成功检索文件.它通过https托管,并带有标准的verisign颁发的EV证书.在app install之外检索文件时,我没有收到任何SSL错误,因此我确信在服务器端正确配置了证书.

可能导致此错误的原因是什么?

ssl ios ios-universal-links

8
推荐指数
1
解决办法
616
查看次数

PDFKit 的 PDFDocument init(url: URL) 不适用于 HTTPS

当我尝试使用 时PDFDocument.init(url: ),我注意到它可以与 URL 一起使用http,但不能与httpsURL 一起使用。有谁知道为什么?

import PDFKit

let httpURL = URL(string: "http://www.axmag.com/download/pdfurl-guide.pdf")!
let doc1 = PDFDocument(url: httpURL) //makes a PDFDocument

let httpsURL = URL(string: "https://www.gnu.org/s/libmicrohttpd/tutorial.pdf")!
let doc2 = PDFDocument(url: httpsURL) //nil
Run Code Online (Sandbox Code Playgroud)

ios swift ios11

5
推荐指数
2
解决办法
6751
查看次数

在swift枚举中访问值

我无法找出访问枚举原始值的语法.下面的代码应该澄清我想要做的事情.

enum Result<T, U> {
    case Success(T)
    case Failure(U)
}

struct MyError: ErrorType {
    var status:  Int = 0
    var message: String = "An undefined error has occured."

    init(status: Int, message: String) {
        self.status = status
        self.message = message
    }
}

let goodResult: Result<String, MyError> = .Success("Some example data")
let badResult:  Result<String, MyError> = .Failure(MyError(status: 401, message: "Unauthorized"))

var a: String  = goodResult //<--- How do I get the string out of here?
var b: MyError = badResult  //<--- How …
Run Code Online (Sandbox Code Playgroud)

enums ios swift

3
推荐指数
1
解决办法
138
查看次数

Swift构建error_if_any_output_files_are_specified_they_all_must_be

转换为在Xcode 10上使用新的构建系统时,我的输出中的几个扩展目标出现以下错误.

<unknown>:0: error: if any output files are specified, they all must be Command CompileSwift failed with a nonzero exit code

我在网上寻找了一个解决方案,但我能找到的唯一参考是这个错误是在Swift编译器源代码本身.

有谁知道这个错误是如何实际触发的,或者我可以做些什么来修复它?

compiler-errors build swift xcode10

2
推荐指数
1
解决办法
679
查看次数