[GH-ISSUE #137] NetworkInjector+URLConnection.swift:20:99: error #84

Open
opened 2026-03-03 19:11:40 +03:00 by kerem · 9 comments
Owner

Originally created by @cdoky on GitHub (Oct 27, 2023).
Original GitHub issue: https://github.com/ProxymanApp/atlantis/issues/137

/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

Originally created by @cdoky on GitHub (Oct 27, 2023). Original GitHub issue: https://github.com/ProxymanApp/atlantis/issues/137 ```swift /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
Author
Owner

@NghiaTranUIT commented on GitHub (Oct 27, 2023):

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

<!-- gh-comment-id:1782964513 --> @NghiaTranUIT commented on GitHub (Oct 27, 2023): Hi @cdoky what iOS version you're using? and is it Simulator or physical device?
Author
Owner

@cdoky commented on GitHub (Oct 27, 2023):

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

<!-- gh-comment-id:1783042394 --> @cdoky commented on GitHub (Oct 27, 2023): > 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...
Author
Owner

@mahmoudElfeel67 commented on GitHub (Oct 28, 2023):

i am also have the same exact issue as @cdoky

<!-- gh-comment-id:1783856528 --> @mahmoudElfeel67 commented on GitHub (Oct 28, 2023): i am also have the same exact issue as @cdoky
Author
Owner

@NghiaTranUIT commented on GitHub (Oct 29, 2023):

@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

<!-- gh-comment-id:1783971110 --> @NghiaTranUIT commented on GitHub (Oct 29, 2023): @mahmoudElfeel67 @cdoky let's update Atlantis to the latest version [v1.22.0](https://github.com/ProxymanApp/atlantis/releases/tag/1.22.0). It will fix your issue. Your library is really old [v1.17.0](https://github.com/ProxymanApp/atlantis/releases/tag/1.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](https://github.com/ProxymanApp/atlantis/assets/5878421/94b57d8b-298d-44dd-9ac7-7cb4f2895234)
Author
Owner

@cdoky commented on GitHub (Oct 29, 2023):

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

<!-- gh-comment-id:1784120657 --> @cdoky commented on GitHub (Oct 29, 2023): 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
Author
Owner

@pengshengsongcode commented on GitHub (Jun 27, 2024):

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

<!-- gh-comment-id:2194018623 --> @pengshengsongcode commented on GitHub (Jun 27, 2024): > 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
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 27, 2024):

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?
<!-- gh-comment-id:2194021891 --> @NghiaTranUIT commented on GitHub (Jun 27, 2024): 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?
Author
Owner

@pengshengsongcode commented on GitHub (Jun 27, 2024):

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

<!-- gh-comment-id:2194028740 --> @pengshengsongcode commented on GitHub (Jun 27, 2024): 1、macOS 13.5.2 2、Xcode 15.2 our project is support iOS11+ 🙁
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 27, 2024):

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 : /

<!-- gh-comment-id:2194077036 --> @NghiaTranUIT commented on GitHub (Jun 27, 2024): 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 : /
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/atlantis#84
No description provided.