davidstump / SwiftPhoenixClient

Connect your Phoenix and iOS applications through WebSockets!
MIT License
507 stars 147 forks source link

Support iOS 13 min #178

Closed jonesrajee closed 3 years ago

jonesrajee commented 3 years ago

Is there a way to get this to work with iOS 13 as the min target?

Starscream currently has deprecations for iOS 13, and I can not get this library to work

https://github.com/daltoniam/Starscream/issues/857 https://github.com/daltoniam/Starscream/issues/868

dsrees commented 3 years ago

I don't see an issue here. I was able to create an xcode project, target iOS 13, add the library and create a socket without any warnings. Can you be more clear in what issue you're having?

dsrees commented 3 years ago

If you want to try targeting the 2.x branch as your dependency, then you can do that. It supports URLSession's websocket by default which has a minimum of iOS 13.

jonesrajee commented 3 years ago

You can install SwiftPhoenix Client via CocoaPods by adding the following to your Podfile. Keep in mind that in order to use Swift Phoenix Client, the minimum iOS target must be '9.0'

jonesrajee commented 3 years ago

@dsrees when do you expect the 2.x branch to release?

This error is thrown from trying your branch:

Module 'SwiftPhoenixClient' was not compiled with library evolution support; using it means binary compatibility for '{My Framework Name}' can't be guaranteed
dsrees commented 3 years ago

That sentence is worded poorly. You can target any iOS version >= 9.0. SwiftPhoenixClient does not require you set your minimum to 9.0, it requires that you don't set it to anything prior to 9.0, such as 8.x (which at this point, basically no one is using)

Are you actually having any warnings or errors in Xcode when attempting to intall SwiftPhoenixClient?

jonesrajee commented 3 years ago

@dsrees Yes, your master branch does not work if the minimum target is iOS 13 which you advised to use the unreleased 2.x branch.

If I use that branch, via Cocoapods or SPM, it’s not working because of the error I mentioned here:

https://github.com/davidstump/SwiftPhoenixClient/issues/178#issuecomment-813588260

My question is; when should we expect the 2.x branch to be released and supported so that projects that target iOS 13 as a minimum version can use this framework?

dsrees commented 3 years ago

are you using SwiftPhoenixClient in an app or are you using it as a dependency for another library?

jonesrajee commented 3 years ago

are you using SwiftPhoenixClient in an app or are you using it as a dependency for another library?

Yes, I am trying to use it as a dependency for a internal framework

dsrees commented 3 years ago

The 2.x branch does not support library evolution yet. I dont know if RxSwift or Starscream do either. If they do not, then I cannot either.

There's nothing I can change currently until I verify this more.

jonesrajee commented 3 years ago

Going to close this as I wait for 2.x release

I reformatted my .framework into a Swift Package which has a dependency on this repo. This allowed me to pull it into my apps without the library evolution issue and iOS 13 is working on this branch.

(I cant figure out why my server handshake won't work without using StarscreamsTransport but ill figure that out another time)