如何修复Socket.IO-客户端-Swift构建错误

时间:2019-02-11 15:17:44

标签: nativescript

我是Nativescript的新手。我遵循了macOS的安装过程,并且能够安装它并创建了我的第一个应用程序。但是我无法构建该应用程序并无法在模拟器中预览。

当我尝试使用命令tns run iOS时,出现以下错误:

=== BUILD TARGET Socket.IO-Client-Swift OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/fbsmith/Development/apps/nativescript-vue/firstApp/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Parse/SocketParsable.swift:116:25: warning: 'init' is deprecated
    var dataArray = String(message.utf16[message.utf16.index(reader.currentIndex, offsetBy: 1)..<message.utf16.endIndex])!
                    ^
/Users/fbsmith/Development/apps/nativescript-vue/firstApp/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Util/SocketStringReader.swift:49:26: warning: 'init' is deprecated
    let readString = String(message.utf16[currentIndex..<message.utf16.index(currentIndex, offsetBy: count)])!
                     ^
/Users/fbsmith/Development/apps/nativescript-vue/firstApp/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Util/SocketStringReader.swift:62:20: warning: 'init' is deprecated
        return String(substring)!
               ^
/Users/fbsmith/Development/apps/nativescript-vue/firstApp/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Util/SocketStringReader.swift:67:16: warning: 'init' is deprecated
    return String(substring[substring.startIndex..<foundIndex])!
           ^
=== BUILD TARGET Socket.IO-Client-Swift OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/fbsmith/Development/apps/nativescript-vue/firstApp/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Parse/SocketParsable.swift:116:25: warning: 'init' is deprecated
    var dataArray = String(message.utf16[message.utf16.index(reader.currentIndex, offsetBy: 1)..<message.utf16.endIndex])!
                    ^
/Users/fbsmith/Development/apps/nativescript-vue/firstApp/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Util/SocketStringReader.swift:49:26: warning: 'init' is deprecated
    let readString = String(message.utf16[currentIndex..<message.utf16.index(currentIndex, offsetBy: count)])!
                     ^
/Users/fbsmith/Development/apps/nativescript-vue/firstApp/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Util/SocketStringReader.swift:62:20: warning: 'init' is deprecated
        return String(substring)!
               ^
/Users/fbsmith/Development/apps/nativescript-vue/firstApp/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Util/SocketStringReader.swift:67:16: warning: 'init' is deprecated
    return String(substring[substring.startIndex..<foundIndex])!
           ^
=== BUILD TARGET Socket.IO-Client-Swift OF PROJECT Pods WITH CONFIGURATION Debug ===
ld: warning: directory not found for option '-F/Users/fbsmith/Library/Developer/Xcode/DerivedData/firstApp-doskpimhcitcpccohcskniwvalbu/Build/Products/Debug-iphonesimulator/StarscreamSocketIO'
ld: warning: directory not found for option '-F/Users/fbsmith/Library/Developer/Xcode/DerivedData/firstApp-doskpimhcitcpccohcskniwvalbu/Build/Products/Debug-iphonesimulator/StarscreamSocketIO'
ld: warning: directory not found for option '-F/Users/fbsmith/Library/Developer/Xcode/DerivedData/firstApp-doskpimhcitcpccohcskniwvalbu/Build/Products/Debug-iphonesimulator/Socket.IO-Client-Swift'
ld: warning: directory not found for option '-F/Users/fbsmith/Library/Developer/Xcode/DerivedData/firstApp-doskpimhcitcpccohcskniwvalbu/Build/Products/Debug-iphonesimulator/StarscreamSocketIO'
ld: warning: directory not found for option '-F/Users/fbsmith/Library/Developer/Xcode/DerivedData/firstApp-doskpimhcitcpccohcskniwvalbu/Build/Products/Debug-iphonesimulator/Toaster'
ld: warning: linking ObjC for iOS Simulator, but dylib (/Users/fbsmith/Development/apps/nativescript-vue/firstApp/platforms/ios/internal/NativeScript.framework/NativeScript) was compiled for MacOSX
ld: warning: ObjC dylib (/Users/fbsmith/Development/apps/nativescript-vue/firstApp/node_modules/tns-core-modules-widgets/platforms/ios/TNSWidgets.framework/TNSWidgets) was compiled for iOS Simulator, but dylibs others were compiled for MacOSX
ld: framework not found CoreServices for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **

请帮助!

0 个答案:

没有答案