# $cordovaOauth.facebook IOS 9 GM issue

**URL:** <https://forum.ionicframework.com/t/cordovaoauth-facebook-ios-9-gm-issue/32477>\
**Category:** cordova\
**Created:** [September 15, 2015, 8:44pm UTC](https://forum.ionicframework.com/t/cordovaoauth-facebook-ios-9-gm-issue/32477 "2015-09-15T20:44:15Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![wkande](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/wkande/32/13124_2.png) [@wkande](https://forum.ionicframework.com/u/wkande)\
**Post date:** [September 15, 2015, 8:44pm UTC](https://forum.ionicframework.com/t/cordovaoauth-facebook-ios-9-gm-issue/32477/1 "2015-09-15T20:44:15Z")

</div>

For **_Android and IOS 8_** everything still works but with **_IOS 9 GM_** the in app browser opens and yields a blank screen no matter how long one waits. Has anyone else seen this?  
Simple code that has not changed:

```
  $cordovaOauth.facebook("id-here", ["email"]
                ).then(function(result) {
                    console.log(result);
                }, function(error) {
                    console.log(error);
                });
```

---

<div class="post-metadata">

**Author:** ![wkande](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/wkande/32/13124_2.png) [@wkande](https://forum.ionicframework.com/u/wkande)\
**Post date:** [September 16, 2015, 11:57am UTC](https://forum.ionicframework.com/t/cordovaoauth-facebook-ios-9-gm-issue/32477/2 "2015-09-16T11:57:25Z")

</div>

The cordova-plugin-white plugin does not seem to work with IOS 9 and the Facebook login. Perhaps a TTL issue on the Facebook server, I don’t know. The fix is to update the .plist file for IOS.

```
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>NSAppTransportSecurity</key>
    <dict>
      <key>NSAllowsArbitraryLoads</key>
      <true/>
    </dict>
...
```

---

<div class="post-metadata">

**Author:** ![krittapaks](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/krittapaks/32/91455_2.png) [@krittapaks](https://forum.ionicframework.com/u/krittapaks)\
**Post date:** [September 21, 2015, 5:04pm UTC](https://forum.ionicframework.com/t/cordovaoauth-facebook-ios-9-gm-issue/32477/3 "2015-09-21T17:04:27Z")

</div>

Thanks it’s thanks it worked !! For IOS 9

---

<div class="post-metadata">

**Author:** ![nicraboy](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/nicraboy/32/6917_2.png) [@nicraboy](https://forum.ionicframework.com/u/nicraboy)\
**Post date:** [September 21, 2015, 8:31pm UTC](https://forum.ionicframework.com/t/cordovaoauth-facebook-ios-9-gm-issue/32477/4 "2015-09-21T20:31:19Z")

</div>

Yea I don’t think it is limited to just $cordovaOauth. I think the InAppBrowser all around is having issues. Thanks for reporting a temporary fix. Going to pass this on to other users of my library.

Best,

---

<div class="post-metadata">

**Author:** ![wkande](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/wkande/32/13124_2.png) [@wkande](https://forum.ionicframework.com/u/wkande)\
**Post date:** [September 21, 2015, 9:02pm UTC](https://forum.ionicframework.com/t/cordovaoauth-facebook-ios-9-gm-issue/32477/5 "2015-09-21T21:02:50Z")

</div>

I agree. $cordovaOauth is acting as it should in IOS 9 given the check for week TTL (I suspect TLTL) at a server. Giving a specific white list permissions may be better than the fix I show above.

Would like to point out that the facebook method of $cordovaOauth needs work however to better handle this error. Its call to the inappbrowser hangs and never returns. The facebook method should set the inappbrowser as hidden on its launch and then check it events when it is ready to display. This way it could show a working message and time it out should it hang due to the freeze up. I will try to post such a fix as we are forced to incorporate this into our app.

---

<div class="post-metadata">

**Author:** ![nicraboy](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/nicraboy/32/6917_2.png) [@nicraboy](https://forum.ionicframework.com/u/nicraboy)\
**Post date:** [September 21, 2015, 9:36pm UTC](https://forum.ionicframework.com/t/cordovaoauth-facebook-ios-9-gm-issue/32477/6 "2015-09-21T21:36:01Z")

</div>

Yea please open a ticket for me:

> **[nraboy/ng-cordova-oauth](https://github.com/nraboy/ng-cordova-oauth)**
>
> ng-cordova-oauth - AngularJS oauth library for use with Apache Cordova projects

Always open to improvement.

---

<div class="post-metadata">

**Author:** ![mrkhanaa](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@mrkhanaa](https://forum.ionicframework.com/u/mrkhanaa)\
**Post date:** [September 28, 2015, 12:56pm UTC](https://forum.ionicframework.com/t/cordovaoauth-facebook-ios-9-gm-issue/32477/7 "2015-09-28T12:56:12Z")

</div>

after adding this

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

```

i am getting “The redirect\_uri URL is not supported”… can you help me in this??? or did you find any permanent solution for this???

thanks

---

<div class="post-metadata">

**Author:** ![gregoiremotot](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gregoiremotot/32/69406_2.png) [@gregoiremotot](https://forum.ionicframework.com/u/gregoiremotot)\
**Post date:** [October 6, 2015, 9:10am UTC](https://forum.ionicframework.com/t/cordovaoauth-facebook-ios-9-gm-issue/32477/8 "2015-10-06T09:10:55Z")

</div>

Hi !

Edit : Project =\> Ressources =\> Info.plist (right click =\> open as =\> source code)

Add this :

```
<key>NSAppTransportSecurity</key>
    <dict>
      <key>NSExceptionDomains</key>
      <dict>
        <key>facebook.com</key>
        <dict>
            <key>NSIncludesSubdomains</key>
            <true/>
            <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
            <true/>
            <key>NSTemporaryExceptionMinimumTLSVersion</key>
            <string>TLSv1.1</string>
        </dict>
      </dict>
    </dict>

```

Your app can be rejected by Apple if you use :

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

---

<div class="post-metadata">

**Author:** ![wkande](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/wkande/32/13124_2.png) [@wkande](https://forum.ionicframework.com/u/wkande)\
**Post date:** [October 6, 2015, 12:55pm UTC](https://forum.ionicframework.com/t/cordovaoauth-facebook-ios-9-gm-issue/32477/9 "2015-10-06T12:55:55Z")

</div>

I tried this as it makes sense to declare a specific domain but it does not work. The loadstart event fires for the inappbrowser but loadstop does not. Seems no response comes back from facebook. NSAllowsArbitraryLoads does continue to work.

---

<div class="post-metadata">

**Author:** ![friendefi\_philippe](https://avatars.discourse-cdn.com/v4/letter/f/67e7ee/32.png) [@friendefi\_philippe](https://forum.ionicframework.com/u/friendefi_philippe)\
**Post date:** [October 7, 2015, 3:26pm UTC](https://forum.ionicframework.com/t/cordovaoauth-facebook-ios-9-gm-issue/32477/10 "2015-10-07T15:26:44Z")

</div>

Hi All,

Sorry for my question but i’m new in developping hybrid app 😉  
I need to know which file i need to update for Oauth work correctly in IOS9. Because i find a lot of Info.plist on my Mac ☹

Thank’s a lot !

---

<div class="post-metadata">

**Author:** ![gregoiremotot](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gregoiremotot/32/69406_2.png) [@gregoiremotot](https://forum.ionicframework.com/u/gregoiremotot)\
**Post date:** [October 9, 2015, 10:51pm UTC](https://forum.ionicframework.com/t/cordovaoauth-facebook-ios-9-gm-issue/32477/12 "2015-10-09T22:51:02Z")

</div>

I think you need to edit this file :

projectName =\> platforms =\> ios =\> projectName =\> projectName-Info.plist

(“projectName” will be the name of your project)

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/8/d/8ded70d87db00476295e41175421479d979e6958.png)

---

<div class="post-metadata">

**Author:** ![friendefi\_philippe](https://avatars.discourse-cdn.com/v4/letter/f/67e7ee/32.png) [@friendefi\_philippe](https://forum.ionicframework.com/u/friendefi_philippe)\
**Post date:** [October 16, 2015, 2:10pm UTC](https://forum.ionicframework.com/t/cordovaoauth-facebook-ios-9-gm-issue/32477/13 "2015-10-16T14:10:14Z")

</div>

@gregoiremotot Thank’s a lot !!! This is the good file 🙂

---

<div class="post-metadata">

**Author:** ![griffin](https://avatars.discourse-cdn.com/v4/letter/g/ad7895/32.png) [@griffin](https://forum.ionicframework.com/u/griffin)\
**Post date:** [November 13, 2015, 12:21am UTC](https://forum.ionicframework.com/t/cordovaoauth-facebook-ios-9-gm-issue/32477/14 "2015-11-13T00:21:07Z")

</div>

Hey, I’ve been unable to open the plist as source code. When I right click I only get the option to open with xcode. Please excuse the silly nature of the question. The answer might be staring right at me.

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/9/e/9eebcf20ea373228f9f6b1cbe3eda2da2d5627da.png)

---

<div class="post-metadata">

**Author:** ![gregoiremotot](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gregoiremotot/32/69406_2.png) [@gregoiremotot](https://forum.ionicframework.com/u/gregoiremotot)\
**Post date:** [November 13, 2015, 8:55am UTC](https://forum.ionicframework.com/t/cordovaoauth-facebook-ios-9-gm-issue/32477/15 "2015-11-13T08:55:19Z")

</div>

Hi !

- **Open the Xcode project** (double click on projectName.xcodeproj)

![image](https://global.discourse-cdn.com/ionicframework/original/3X/d/e/de3195a4174ac77ce7dc415a45a5311afbb78076.png)

- **Edit projectName-Info.plist**

![image](https://global.discourse-cdn.com/ionicframework/original/3X/9/9/99475e5c82ec8121937ff6fed6d71b40673503ff.png)

---

<div class="post-metadata">

**Author:** ![griffin](https://avatars.discourse-cdn.com/v4/letter/g/ad7895/32.png) [@griffin](https://forum.ionicframework.com/u/griffin)\
**Post date:** [November 13, 2015, 7:26pm UTC](https://forum.ionicframework.com/t/cordovaoauth-facebook-ios-9-gm-issue/32477/16 "2015-11-13T19:26:34Z")

</div>

You’re the bomb. Thank you. This solved all of my problems.
