Used In Capacitor Plugin, Get "App Transport Security Has Blocked A ...

Skip to content Dismiss alert {{ message }} / socket.io-client-swift Public
  • Notifications You must be signed in to change notification settings
  • Fork 862
  • Star 5.3k
  • Code
  • Issues 244
  • Pull requests 16
  • Actions
  • Projects
  • Wiki
  • Security
  • Insights
Additional navigation options used in Capacitor plugin, get "App Transport Security has blocked a cleartext HTTP" #1369New issueNew issueClosedClosedused in Capacitor plugin, get "App Transport Security has blocked a cleartext HTTP"#1369@sdetweil

Description

@sdetweilsdetweilopened on Aug 6, 2021

App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Use HTTPS instead or add Exception Domains to your app's Info.plist.

but I have those keys in Info.plist for app and plugin

<key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoadsForMedia</key> <true/> <key>NSAllowsArbitraryLoads</key> <true/> <key>NSAllowsArbitraryLoadsInWebContent</key> <true/> </dict>

my code

server = "http://192.168.2.106:3001" manager = SocketManager(socketURL: URL(string:server)!); socket=manager?.socket(forNamespace: "/"); socket?.connect(); call.resolve(["socket":socket!]);

this is on IOS 14.7, iphone, Version 13.0 beta (13A5154h)

the server side is nodejs, and has cors for allow anyone. and accepts connection from mac to ubuntu on same network. node client

let socket = io('http://192.168.2.106:3001');

Metadata

Metadata

Assignees

No one assigned

Labels

No labelsNo labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You can’t perform that action at this time.

Tag » App Transport Security Has Blocked A Cleartext Http Info.plist