-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error by IOS, says Socket.IO-Client-Swift
does not specify a Swift version and none of the targets (testApp
) integrating it have the SWIFT_VERSION
attribute set.
#71
Comments
I don't set a swift version so if you ignore the |
Do you mean to remove the pod ‘Socket.IO-Client-Swift’, which one is with the cli: tns run ios automatically added in the Podfile? |
Forces all your pods to use swift version 4.2 that's not needed for the socket.io pod |
At first I just do tns run iOS, then I got this Error: |
Can you delete the platforms, node_modules and package-lock.json and try running the project again i'm using the package with xcode 10 and it works |
Thanks for the update |
I had all the others plugins removed, and successfully run up. I guess that would be a Problem with the plugins, some plugin may use the different swift_version and not declared. I’ll try the Kombination with different official-plugins. I’ll report later! |
I have changed to use another Macbook, and it passed. But with my IMAC is there always problems with the SWIFT_VERSION. I don't know why.... |
Hi, if you have the last version of Websocket.io (2.5.0) and you have updated to the latest take a look in your PodFile and chek if ther is no double declaration of swift ? |
I have same error, some fix for it?
|
No, I have not found a way to fix it, but it works on the Macbook, so I have easy change the Maschine. |
Hi,
|
If you have tow declarations of swift, keep rm -Rf platforms hooks node_modules
tns install |
@kefahB I have this in podfile |
Hi @maganius, you have just to comment this and add |
if the error still run rm -Rf platforms hooks node_modules
tns install |
I fixed it with a fresh installation of nativescript and put my files in the new installation. |
Both these answers on StackOverflow fixed my issue. I was having the same issue. I tried reinstalling Nativescript and updating brew etc.... Downgrading cocopods worked for me and also putting https://stackoverflow.com/questions/53009550/swift-version-nativescript |
It should be fixed now to use swift 4 you will need to nuke the project |
Everything works for me if I set
However if not set, or set to 4, the app will not run. Even with a fresh build after a new npm install. What do I need to pull a new version of, and what version, to get the fix for swift 4? |
@mmccaff u need to delete the platforms directory |
Fresh install today and I got the exact same problem. The stackoverflow link (cocoapods 1.6.0 to 1.5.3) fixe the problem. |
cocoapods 降低到1.5.3解决了我的问题 |
I am getting errors when following the stack overflow link. Minimum required version for cocoa pods is 1.6.0. |
Which platform(s) does your issue occur on?
Please, provide the following version numbers that your issue occurs with:
"tns-android": {
"version": "4.2.0"
},
"tns-ios": {
"version": "4.2.0"
}
"dependencies": {
"@angular/animations": "~6.1.0",
"@angular/common": "~6.1.0",
"@angular/compiler": "~6.1.0",
"@angular/core": "~6.1.0",
"@angular/forms": "~6.1.0",
"@angular/http": "~6.1.0",
"@angular/platform-browser": "~6.1.0",
"@angular/platform-browser-dynamic": "~6.1.0",
"@angular/router": "~6.1.0",
"nativescript-angular": "~6.1.0",
"nativescript-socketio": "^3.2.1",
"nativescript-theme-core": "~1.0.4",
"nativescript-ui-autocomplete": "^3.9.0",
"nativescript-ui-calendar": "^3.9.0",
"nativescript-ui-chart": "^3.9.0",
"nativescript-ui-gauge": "3.7.1",
"nativescript-ui-listview": "^3.7.1",
"nativescript-ui-sidedrawer": "~4.3.0",
"reflect-metadata": "~0.1.10",
"rxjs": "~6.2.0",
"tns-core-modules": "~4.2.0",
"zone.js": "~0.8.18"
},
"devDependencies": {
"@angular/compiler-cli": "~6.1.0",
"@nativescript/schematics": "~0.3.0",
"@ngtools/webpack": "~6.2.0",
"codelyzer": "~4.3.0",
"nativescript-dev-sass": "~1.6.0",
"nativescript-dev-typescript": "~0.7.0",
"nativescript-dev-webpack": "~0.16.0",
"nativescript-ui-dataform": "3.7.3",
"tslint": "~5.11.0",
"typescript": "~2.7.2"
},
Please, tell us how to recreate the issue in as much detail as possible.
tns plugin add nativescript-socketio
then i had platform unspecified Error. Then i change my Podfile to this:
use_frameworks!
platform :ios, '10.0'
target "testApp" do
Begin Podfile - /Users/mac/develop/gitstore/apps/testApp/node_modules/nativescript-socketio/platforms/ios/Podfile
pod 'Socket.IO-Client-Swift', '~> 12.0.0'
End Podfile
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.2'
end
end
end
But I got always another problem:
Socket.IO-Client-Swift
does not specify a Swift version and none of the targets (testApp
) integrating it have theSWIFT_VERSION
attribute set. Please contact the author or set theSWIFT_VERSION
attribute in at least one of the targets that integrate this pod.\n-Starscream
does not specify a Swift version and none of the targets (testApp
) integrating it have theSWIFT_VERSION
attribute set. Please contact the author or set theSWIFT_VERSION
attribute in at least one of the targets that integrate this pod.I had added the follows to my Podfile, but it still not work, even I change the SWIFT_VERSION = '3.0'.
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.2'
end
end
end
Is there any code involved?
I cannot open my project with Xcode 10 correctly, so I cannot set the SWIFT_VERSION with the Editor's build setting.
The text was updated successfully, but these errors were encountered: