IOS build failed on Xcode 10 Update
Command xcodebuild failed with exit code 65
Build system information error: unexpected duplicate task: CodeSign /Users/user/Desktop/sourcecode/srs/client/platforms/ios/build/emulator/client.app/Frameworks/TNSCore.framework (in target 'client')
Build system information error: Multiple commands produce '/Users/user/Desktop/sourcecode/srs/client/platforms/ios/build/emulator/client.app/Frameworks/TNSCore.framework/TNSCore':
- Target 'client' has copy command from '/Users/user/Desktop/sourcecode/srs/client/node_modules/nativescript-ui-core/platforms/ios/TNSCore.framework' to '/Users/user/Desktop/sourcecode/srs/client/platforms/ios/build/emulator/client.app/Frameworks/TNSCore.framework'
- Target 'client' has copy command from '/Users/user/Desktop/sourcecode/srs/client/node_modules/nativescript-ui-listview/node_modules/nativescript-ui-core/platforms/ios/TNSCore.framework' to '/Users/user/Desktop/sourcecode/srs/client/platforms/ios/build/emulator/client.app/Frameworks/TNSCore.framework'
Build system information error: Multiple commands produce '/Users/user/Desktop/sourcecode/srs/client/platforms/ios/build/emulator/client.app/Frameworks/TNSCore.framework':
- Target 'client' has copy command from '/Users/user/Desktop/sourcecode/srs/client/node_modules/nativescript-ui-core/platforms/ios/TNSCore.framework' to '/Users/user/Desktop/sourcecode/srs/client/platforms/ios/build/emulator/client.app/Frameworks/TNSCore.framework'
- Target 'client' has copy command from '/Users/user/Desktop/sourcecode/srs/client/node_modules/nativescript-ui-listview/node_modules/nativescript-ui-core/platforms/ios/TNSCore.framework' to '/Users/user/Desktop/sourcecode/srs/client/platforms/ios/build/emulator/client.app/Frameworks/TNSCore.framework'
Hi @divyachandana ,
There seem to be two plugins/packages that depend on different versions of nativescript-ui-core. This leads to two native frameworks with the same name that should be included during the build. The old build system, before Xcode 10, just picked one of the packages, but the new one doesn't tolerate this and errors the build.
Try executing this steps to fix it:
1 rm -rf node_modules
2 rm -rf platforms
3 rm package-lock.json
4 Bring all nativescript packages up to date in package.json (for example "nativescript-ui-listview", "nativescript-ui-sidedrawer")
5 npm i
6 tns run
hi @KristianDD Updated all nativescript packages still could not able to build app in IOS Xcode build... /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/StarscreamSocketIO/Source/WebSocket.swift:668:37: warning: 'characters' is deprecated: Please use String or Substring directly if headerSecKey.characters.count > 0 { ^ /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/StarscreamSocketIO/Source/WebSocket.swift:668:37: warning: 'characters' is deprecated: Please use String or Substring directly if headerSecKey.characters.count > 0 { ^ /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Util/SocketClientManager.swift:50:21: warning: static declarations are implicitly 'final'; use 'public' instead of 'open' open static let sharedManager = SocketClientManager() ~~~~ ^ public /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Engine/SocketEngine.swift:520:27: warning: 'init' is deprecated: Please use String or Substring directly handleMessage(String(message.characters.dropFirst())) ^ /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Engine/SocketEngine.swift:520:42: warning: 'characters' is deprecated: Please use String or Substring directly handleMessage(String(message.characters.dropFirst())) ^ /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Engine/SocketEngine.swift:526:34: warning: 'init' is deprecated: Please use String or Substring directly handleOpen(openData: String(message.characters.dropFirst())) ^ /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Engine/SocketEngine.swift:526:49: warning: 'characters' is deprecated: Please use String or Substring directly handleOpen(openData: String(message.characters.dropFirst())) ^ /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Util/SocketClientManager.swift:50:21: warning: static declarations are implicitly 'final'; use 'public' instead of 'open' open static let sharedManager = SocketClientManager() ~~~~ ^ public /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Engine/SocketEngine.swift:520:27: warning: 'init' is deprecated: Please use String or Substring directly handleMessage(String(message.characters.dropFirst())) ^ /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Engine/SocketEngine.swift:520:42: warning: 'characters' is deprecated: Please use String or Substring directly handleMessage(String(message.characters.dropFirst())) ^ /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Engine/SocketEngine.swift:526:34: warning: 'init' is deprecated: Please use String or Substring directly handleOpen(openData: String(message.characters.dropFirst())) ^ /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Engine/SocketEngine.swift:526:49: warning: 'characters' is deprecated: Please use String or Substring directly handleOpen(openData: String(message.characters.dropFirst())) ^ /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Engine/SocketEnginePollable.swift:188:19: warning: 'characters' is deprecated: Please use String or Substring directly guard str.characters.count != 1 else { return } ^ /Users/user/Desktop/sourcecode/srs/client/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/user/Desktop/sourcecode/srs/client/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/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Util/SocketStringReader.swift:62:20: warning: 'init' is deprecated return String(substring)! ^ /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Util/SocketStringReader.swift:67:16: warning: 'init' is deprecated return String(substring[substring.startIndex..<foundIndex])! ^ /Users/user/Desktop/sourcecode/srs/client/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/user/Desktop/sourcecode/srs/client/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/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Util/SocketStringReader.swift:62:20: warning: 'init' is deprecated return String(substring)! ^ /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Util/SocketStringReader.swift:67:16: warning: 'init' is deprecated return String(substring[substring.startIndex..<foundIndex])! ^ /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/AWSS3/AWSS3/AWSS3TransferUtility.m:1270:39: warning: implicit conversion loses integer precision: 'unsigned long long' to 'NSUInteger' (aka 'unsigned int') [-Wshorten-64-to-32] ...dataLength = fileSize - ( (i-1) * AWSS3TransferUtilityMultiPartSize); ~ ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/AWSS3/AWSS3/AWSS3TransferUtility.m:1355:164: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'NSUInteger' (aka 'unsigned int') [-Wshorten-64-to-32] ...[self createTemporaryFileForPart:transferUtilityMultiPartUploadTask.file partNumber:[subTask.partNumber integerValue] dataLength:subTask.totalBytesExpectedToSend... ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 warnings generated. /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Util/SocketClientManager.swift:50:21: warning: static declarations are implicitly 'final'; use 'public' instead of 'open' open static let sharedManager = SocketClientManager() ~~~~ ^ public /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Engine/SocketEngine.swift:520:27: warning: 'init' is deprecated: Please use String or Substring directly handleMessage(String(message.characters.dropFirst())) ^ /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Engine/SocketEngine.swift:520:42: warning: 'characters' is deprecated: Please use String or Substring directly handleMessage(String(message.characters.dropFirst())) ^ /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Engine/SocketEngine.swift:526:34: warning: 'init' is deprecated: Please use String or Substring directly handleOpen(openData: String(message.characters.dropFirst())) ^ /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Engine/SocketEngine.swift:526:49: warning: 'characters' is deprecated: Please use String or Substring directly handleOpen(openData: String(message.characters.dropFirst())) ^ /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Util/SocketClientManager.swift:50:21: warning: static declarations are implicitly 'final'; use 'public' instead of 'open' open static let sharedManager = SocketClientManager() ~~~~ ^ public /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Engine/SocketEngine.swift:520:27: warning: 'init' is deprecated: Please use String or Substring directly handleMessage(String(message.characters.dropFirst())) ^ /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Engine/SocketEngine.swift:520:42: warning: 'characters' is deprecated: Please use String or Substring directly handleMessage(String(message.characters.dropFirst())) ^ /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Engine/SocketEngine.swift:526:34: warning: 'init' is deprecated: Please use String or Substring directly handleOpen(openData: String(message.characters.dropFirst())) ^ /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Engine/SocketEngine.swift:526:49: warning: 'characters' is deprecated: Please use String or Substring directly handleOpen(openData: String(message.characters.dropFirst())) ^ /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Engine/SocketEnginePollable.swift:188:19: warning: 'characters' is deprecated: Please use String or Substring directly guard str.characters.count != 1 else { return } ^ /Users/user/Desktop/sourcecode/srs/client/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/user/Desktop/sourcecode/srs/client/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/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Util/SocketStringReader.swift:62:20: warning: 'init' is deprecated return String(substring)! ^ /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Util/SocketStringReader.swift:67:16: warning: 'init' is deprecated return String(substring[substring.startIndex..<foundIndex])! ^ /Users/user/Desktop/sourcecode/srs/client/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/user/Desktop/sourcecode/srs/client/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/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Util/SocketStringReader.swift:62:20: warning: 'init' is deprecated return String(substring)! ^ /Users/user/Desktop/sourcecode/srs/client/platforms/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Util/SocketStringReader.swift:67:16: warning: 'init' is deprecated return String(substring[substring.startIndex..<foundIndex])! ^ ld: targeted OS version does not support use of thread local variables in l1862 for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) note: Using new build systemnote: Planning buildnote: Constructing build description ** BUILD FAILED **
Unable to apply changes on device: 70C7A1CB-1359-484C-9500-5352B4641CD8. Error is: Command xcodebuild failed with exit code 65.
Hi @divyachandana ,
It seems that the deployment target of the project is too low for the use of thread local variables(most probably 8.0). Can you try adding IPHONEOS_DEPLOYMENT_TARGET = 9.0; in .../app/App_Resources/iOS/build.xcconfig file of your project and see if that solves the issue.
The nativescript-cli is not good at ignoring subdirectory node_modules. If you delete the node_modules from any of the modules included in your project's node_modules and then delete your platforms/ios folder, that should fix your issue.
This comes up frequently if you are developing a plugin and have built locally, then referenced the local repo in your package.json.
Lock this thread as it contains multiple issues and most of them are resolved in a different way. In case you hit some of them, please open new issue with as much details as possible.