【问题标题】:Swift - iOS - XCode 6.1 dyld fatal error symbol not found when referencing string literal [duplicate]Swift - iOS - 引用字符串文字时未找到 XCode 6.1 dyld 致命错误符号 [重复]
【发布时间】:2014-10-24 16:42:16
【问题描述】:

将 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。

以下是更详细的崩溃日志版本

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

谢谢!!

【问题讨论】:

  • 确实你是对的,问题解决了,谢谢马丁!!!

标签: ios iphone xcode swift


【解决方案1】:

问题已解决,显然是 Swift beta 6 - Confusing linker error message 的副本,感谢 Martin R 找到这个!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-05-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-03-20
    • 2021-09-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多