socket.io-client-swift icon indicating copy to clipboard operation
socket.io-client-swift copied to clipboard

Build error on Xcode 8.1

Open TaoistKing opened this issue 10 years ago • 3 comments

I use cocoapods and Xcode 8.1. My pod file: pod 'Socket.IO-Client-Swift', '~> 8.0.2'

When I build my project, error was:

“Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.

Then I follow the instruction and Convert to Current Swift Syntax, then build again, now error was:

ld: warning: Auto-Linking supplied '/Users/xiaoming/Library/Developer/Xcode/DerivedData/Chatchat-cbljmmhhqfbdjoeqrkgtasbkniad/Build/Products/Debug-iphoneos/Socket.IO-Client-Swift/SocketIOClientSwift.framework/SocketIOClientSwift', file was built for arm64 which is not the architecture being linked (armv7): /Users/xiaoming/Library/Developer/Xcode/DerivedData/Chatchat-cbljmmhhqfbdjoeqrkgtasbkniad/Build/Products/Debug-iphoneos/Socket.IO-Client-Swift/SocketIOClientSwift.framework/SocketIOClientSwift Undefined symbols for architecture armv7: "OBJC_CLASS$__TtC19SocketIOClientSwift14SocketIOClient", referenced from: objc-class-ref in ContactsTableViewController.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

TaoistKing avatar Sep 28 '16 02:09 TaoistKing

More Information:

When a iPhone 6Plus is connected to my Mac, the building will succeed, but will crash upon launch:

dyld: Library not loaded: @rpath/SocketIOClientSwift.framework/SocketIOClientSwift Referenced from: /var/containers/Bundle/Application/0398A438-1B83-4F89-AA83-EDFE6E38C4EF/Chatchat.app/Chatchat Reason: image not found

When a iPhone 5c is connected to my Mac, the building will fail with errors above:

ld: warning: Auto-Linking supplied '/Users/xiaoming/Library/Developer/Xcode/DerivedData/Chatchat-cbljmmhhqfbdjoeqrkgtasbkniad/Build/Products/Debug-iphoneos/Socket.IO-Client-Swift/SocketIOClientSwift.framework/SocketIOClientSwift', file was built for arm64 which is not the architecture being linked (armv7): /Users/xiaoming/Library/Developer/Xcode/DerivedData/Chatchat-cbljmmhhqfbdjoeqrkgtasbkniad/Build/Products/Debug-iphoneos/Socket.IO-Client-Swift/SocketIOClientSwift.framework/SocketIOClientSwift Undefined symbols for architecture armv7: "OBJC_CLASS$__TtC19SocketIOClientSwift14SocketIOClient", referenced from: objc-class-ref in ContactsTableViewController.o ld: symbol(s) not found for architecture armv7

TaoistKing avatar Sep 28 '16 08:09 TaoistKing

Sorry about this issue, seems there is API changes from older versions , these errors no longer exist after I adapt to new APIs.

TaoistKing avatar Sep 28 '16 09:09 TaoistKing

@TaoistKing Getting the same Error.

mohangslab083 avatar Nov 16 '16 10:11 mohangslab083