atlantis icon indicating copy to clipboard operation
atlantis copied to clipboard

NetworkInjector+URLConnection.swift:20:99: error

Open cdoky opened this issue 1 year ago • 9 comments

/Pods/atlantis-proxyman/Sources/NetworkInjector+URLConnection.swift:20:99: error: cannot force unwrap value of non-optional type '(any NSURLConnectionDataDelegate) -> ((NSURLConnection, URLResponse) -> Void)?'
        let selector : Selector = #selector((NSURLConnectionDataDelegate.connection(_:didReceive:)!)
                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
                                                                                                  
/Pods/atlantis-proxyman/Sources/NetworkInjector+URLConnection.swift:55:99: error: cannot force unwrap value of non-optional type '(any NSURLConnectionDataDelegate) -> ((NSURLConnection, URLResponse) -> Void)?'
        let selector : Selector = #selector((NSURLConnectionDataDelegate.connection(_:didReceive:)!)
                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

Xcode: Version 15.0 (15A240d) macOS: 13.5.2

cdoky avatar Oct 27 '23 12:10 cdoky

Hi @cdoky what iOS version you're using? and is it Simulator or physical device?

NghiaTranUIT avatar Oct 27 '23 13:10 NghiaTranUIT

Hi @cdoky what iOS version you're using? and is it Simulator or physical device?

iPhone 15 Pro Max Simulator

and the main project is Objective-c...

cdoky avatar Oct 27 '23 14:10 cdoky

i am also have the same exact issue as @cdoky

mahmoudElfeel67 avatar Oct 28 '23 15:10 mahmoudElfeel67

@mahmoudElfeel67 @cdoky let's update Atlantis to the latest version v1.22.0. It will fix your issue.

Your library is really old v1.17.0 (Released on 2022) because we completely removed URLConnection class 👍


I tested again with Xcode 15.0.1, iOS 17.0, Atlantis v1.22.0 and It works as intended 👍

CleanShot 2023-10-29 at 08 32 05@2x

NghiaTranUIT avatar Oct 29 '23 01:10 NghiaTranUIT

very said

Specs satisfying the atlantis-proxyman (~> 1.22.0) dependency were found, but they required a higher minimum deployment target.

our project is support iOS11

cdoky avatar Oct 29 '23 13:10 cdoky

very said

Specs satisfying the atlantis-proxyman (~> 1.22.0) dependency were found, but they required a higher minimum deployment target.

our project is support iOS11

same question

pengshengsongcode avatar Jun 27 '24 07:06 pengshengsongcode

It's too old to support iOS 11 since it's 17 (6 years old).

May I ask:

  • What macOS and Xcode versions you're using to develop your iOS app?

NghiaTranUIT avatar Jun 27 '24 07:06 NghiaTranUIT

1、macOS 13.5.2 2、Xcode 15.2 our project is support iOS11+ 🙁

pengshengsongcode avatar Jun 27 '24 07:06 pengshengsongcode

Tried to support iOS 11, but it's deprecated but Swift Package Manager (https://developer.apple.com/documentation/packagedescription/supportedplatform/iosversion/v11)

  • URLSessionWebsocketTask is only available on iOS 13,
  • NWConnection is only available on iOS 12.

I can exclude it because it's too complicated : /

NghiaTranUIT avatar Jun 27 '24 08:06 NghiaTranUIT