Xcode 8.3 破坏了我的应用程序

Xcode 8.3 breaks my app

Xcode 8.3 的正式发布导致我的应用程序在明显随机的时间后完全冻结。它还会导致网络连接永远无法完成(这可能是最终冻结的原因?可能是等待释放某些资源的死锁?)。

完全相同的代码在使用 Xcode 8.2.1.

编译时工作正常

有人遇到同样的问题吗?

Xcode 8.3.1 现已可用。

https://developer.apple.com/news/?id=04062017a

Due to the resolved app archives issue listed below, we will soon be deprecating Xcode 8.3, at which time app archives built with Xcode 8.3 will no longer be accepted by the App Store.

尝试更新 xcode,因为以前的版本中存在许多问题。

看来问题与使用这种结构有关:

@discardableResult func synchronized<T>(_ lock: Any, closure: () throws -> T) rethrows -> T {
    objc_sync_enter(lock)
    defer {
        objc_sync_exit(lock)
    }
    return try closure()
}

将其替换为 Matt Gallagher 的 PThreadMutex (https://github.com/mattgallagher/CwlUtils) 可解决此问题。

我希望这不是 Apple 故意将人们赶出 Obj-C 运行时的举动,因为如果是的话,这绝对是一种偷偷摸摸的方式,而且考虑到使用上面的构造可能是。如果他们不想让人们使用那些,那么他们应该在 Swift 中提供线程同步服务,而不是完全忽略这种需求。很郁闷。

我昨天也遇到了这个问题

4 月 25 日在 Apple Developer Forms 上发布的消息称,使用 Xcode 8.3 构建的应用程序存档将不再被 App Store 接受。

标题:请从 Xcode 8.3 更新到 Xcode 8.3.1 或更高版本 https://forums.developer.apple.com/message/225571#225571