Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting SSL Error when trying to download files from firebase storage - iOS

I've uploaded video file to firebase manually. Now I want to download this video from my ios app. I've also added below code inside info.plist file.

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

At first for few requests it is possible to download files properly from app. But now I'm getting error:

An SSL error has occurred and a secure connection to the server cannot be made

I've checked that download Url link is opened from Chrome but is not opened from Safari.

Here my Xcode console shows NSErrorFailingURLStringKey=https://firebasestorage.googleapis.com....

Thus I've also added below code inside my info.plist file

<key>NSAppTransportSecurity</key>
<dict>
  <key>NSAllowsArbitraryLoads</key>
  <true/>
  <key>NSExceptionDomains</key>
  <dict>
    <key>firebasestorage.googleapis.com</key>
    <dict>
        <key>NSIncludesSubdomains</key>
        <true/>
        <key>NSExceptionAllowInsecureHTTPSLoads</key>
        <true/>
        <key>NSExceptionMinimumTLSVersion</key>
        <string>TLSv1.1</string>
    </dict>
  </dict>
</dict>

But I've still got error

An SSL error has occurred and a secure connection to the server cannot be made

Any Idea?

like image 772
Symon Avatar asked Jan 18 '26 05:01

Symon


1 Answers

For passing 2 frustrating days and giving a lot of time for R&D, Finally I've got this link . "This might be caused by networking conditions in some particular territories, rather than Google's firebase infrastructure."

I've tested my app using VPN and now all the files are downloaded from firebase storage perfectly.

like image 86
Symon Avatar answered Jan 20 '26 20:01

Symon