ios - Swift - iOS - 引用字符串文字时找不到 XCode 6.1 dyld fatal error 符号

标签 ios iphone xcode swift

<分区>

将 Xcode 更新到版本 6.1 (6A1052d) 后,应用程序在 iPhone 5s (iOS8.1) 上不断崩溃。然而,一切都在 XCode 上运行得很好。手机永不越狱

Dyld Error Message:
  Symbol not found: __TFE10FoundationCSo8NSStringCfMS0_FT13stringLiteralVSs12StaticString_S0_
  Referenced from: /private/var/mobile/Containers/Bundle/Application/5BBECE8A-1A62-44A7-90A2-24B9D295F471/Wikasa.app/Wikasa
  Expected in: /private/var/mobile/Containers/Bundle/Application/5BBECE8A-1A62-44A7-90A2-24B9D295F471/Wikasa.app/Frameworks/libswiftFoundation.dylib
  Dyld Version: 353.5

错误发生在以下部分(AppDelegate.swift 文件)

import UIKit
import Foundation

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, UIAlertViewDelegate {

var window: UIWindow?

var firebaseURL: NSString! = "https://our-url.firebaseio.com" // Breakpoint: EXC_BREAKPOINT (code=EXC_ARM_BREAKPOINT, subcode=0xe7ffdefe)

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {

    self.window!.makeKeyAndVisible()

    return true
}

断点在“var firebaseURL”行。我尝试删除它,但它会在分配给变量的每个字符串文字上中断。我尝试将变量设为可选和展开,但它不起作用,同时尝试了 String 和 NSString。

下面是更详细版本的crash log

Incident Identifier: 3434A3AD-F265-4488-8E4C-D89F7C85ABA0
CrashReporter Key:   833ec60342fb35c4d7bd633966af6b495301776b
Hardware Model:      iPhone5,2
Process:             Wikasa [1147]
Path:                /private/var/mobile/Containers/Bundle/Application/5BBECE8A-1A62-44A7-90A2-24B9D295F471/Wikasa.app/Wikasa
Identifier:          com.wikasa.Wikasa
Version:              (1.0)
Code Type:           ARM (Native)
Parent Process:      launchd [1]

Date/Time:           2014-10-24 14:28:35.931 +0700
Launch Time:         2014-10-24 14:23:22.137 +0700
OS Version:          iOS 8.1 (12B411)
Report Version:      105

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000000e7ffdefe
Triggered by Thread:  0

Dyld Error Message:
  Symbol not found: __TFE10FoundationCSo8NSStringCfMS0_FT13stringLiteralVSs12StaticString_S0_
  Referenced from: /private/var/mobile/Containers/Bundle/Application/5BBECE8A-1A62-44A7-90A2-24B9D295F471/Wikasa.app/Wikasa
  Expected in: /private/var/mobile/Containers/Bundle/Application/5BBECE8A-1A62-44A7-90A2-24B9D295F471/Wikasa.app/Frameworks/libswiftFoundation.dylib
  Dyld Version: 353.5

谢谢!!

最佳答案

问题已解决,显然是 Swift beta 6 - Confusing linker error message 的副本, 归功于 Martin R为了找到这个!

关于ios - Swift - iOS - 引用字符串文字时找不到 XCode 6.1 dyld fatal error 符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26544109/

相关文章:

ios - 在 Swift 3/Xcode 8 (SharkORM) 中安装第三方 Objective-C 库

iphone - 守卫 Malloc 不起作用

iOS:CoreGraphics - 使用 CGContextClip 和 lineCap = .Round 剪切弧

ios - 与蜂窝网络相比,React-native 在 wifi 上的获取速度极慢。在开发和生产中,无论运行/不调试器

iphone - 在 iPhone 或模拟器上保留文本文件并从 Mac 读取它

iphone - MapKit 无法在设备上运行,但可以在模拟器中运行

ios - 我可以在我的 iPhone 上安装由 release(appstore) 配置文件签名的 ipa

ios - 如何在后台跟踪用户位置?

ios - swift ,如何使表格 View 单元格具有动态高度

ios - Xcode swift : How to change button font size dynamically according to the size of the button?