naderio / nativescript-socket.io

Fully-featured Socket.IO client implementation for NativeScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iOS Build Fail

zoeitsolutions opened this issue · comments

Hi,

I created a fresh NG app and then added this plugin.

I ran pod repo update to update an pod files.

I tried building it for iOS using tns build ios and I get this error:

=== BUILD TARGET StarscreamSocketIO OF PROJECT Pods WITH CONFIGURATION Debug ===
“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.
“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.

I get this error before or after the pod update.

I am using the latest CLI / TNS versions and latest version of the plugin.

I am using xCode 8.2.1 on El Capitan.

Anyway to fix this?

I'm having the same issue, can you share the fix?

Hi. Unfortunately I don't have a clear answer. I just kept removing the platforms/hooks folders and kept rebuilding. At one point it "just worked".

If you don't come right, pls share your package.json and I will see if I can build it.

Also, I switched back to 0.5.0. And mine is building fine.

Thanks! I don't encounter the issue using 0.5.0 but the app is not running also it's kinda odd to use that one since currently, the latest version is 0.8.0. I think we should reopen the issue.

Specs:
{N} 3.3.0
xCode: 9.1
OS: Sierra

I am glad it helped. Yeah, it's the last version that I remember working with my app when I was still using 2.5.x

Currently using:
{N} 3.2.1
xCode 8.3.1
OS: El Capitan

Do you have a test repo I can clone and see if I can get it building? Will most likely only be over the weekend.

Or at least a package.json file which I can replicate.

commented

I'm Having this issue on IOS with nativescript-socket.io 0.9.0 and Nativescript "tns-core-modules": 3.3

However, when i use nativescript-socket.io 0.5.1 ,it works without issue

The error looks something like this.

“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.
“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.

this is a common issue due to multiple Swift versions being used and 2.3 being the default.
you need to force Swift to version 3 in all plugins
this is done by adding a custom plugin that does just that
@zoeitsolutions @kaurag007ph @rsaf please refer to demo app

otherwise, you can fix this with installing nativescript-swift-3.0

npm install --save nativescript-swift-3.0

Please let me know if this remains an issue

Sorry, may I ask is it supporting swift 4.0 now?
It keeps conflicting with other plugins which had already upgraded to swift 4.0

@b02505048 Swift 4.0 support require upgrading the native dependencies (https://github.com/socketio/socket.io-client-swift) which contain some breaking changes (https://nuclearace.github.io/Socket.IO-Client-Swift/12to13.html)
frankly I do not plan to upgrade for now

@naderio, I see, thanks for quick reply!