Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
In-App banner is showing in programs (#1154)
Browse files Browse the repository at this point in the history
* LEARNER-6308, fix to remove banner in programs.
  • Loading branch information
salman2013 committed Sep 3, 2018
1 parent 523dfcd commit c31592e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Source/AuthenticatedWebViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ private class WKWebViewContentController : WebContentController {
}

func loadURLRequest(request: NSURLRequest) {
// If the view initialize before registering userAgent the request goes without the required userAgent,
// to solve this we are setting customeUserAgent here.
if let userAgent = UserDefaults.standard.string(forKey: "UserAgent"), webView.customUserAgent?.isEmpty ?? false {
webView.customUserAgent = userAgent
}

webView.load(request as URLRequest)
}

Expand Down

0 comments on commit c31592e

Please sign in to comment.