Linked Questions

Popular Questions

How to fix Socket.IO-Client-Swift build error

Asked by At

I'm very new to Nativescript. I followed the the installation procedure for macOS and have been able to install it and created my first app. However I am unable to build the app and preview it in a simulator.

When I try the command tns run iOS I get the following error:

=== 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 **

Please help!

Related Questions