Firebase Integration into unity built iOs Xcode project - NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9814)

592 views
Skip to first unread message

Kristan Halls

unread,
Mar 4, 2017, 11:38:09 AM3/4/17
to Firebase Google Group
I am trying to integrate Firebase and also Firebase/Admob into a Xcode (8.2.1) project that was exported from Unity (5.6b).

My podfile


platform :ios, ‘9.0’

target ‘my_app do
  pod 'Firebase/Core'
  pod 'Firebase/AdMob'
end

All ok frameworks are added.

Ive included my GoogleService-Info.plist

In my UnityAppCrontroller i have

#import "FirebaseCore/FirebaseCore.h"//;

#import "Firebase/Firebase.h"//;


- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions

{

::printf("-> applicationDidFinishLaunching()\n");

[FIRApp configure];

    [GADMobileAds configureWithApplicationID:@"ca-app-pub-******"];



and in my viewController i have


@implementation UnityPortraitOnlyViewController

- (NSUInteger)supportedInterfaceOrientations

{

return 1 << UIInterfaceOrientationPortrait;

}

- (void)viewWillAppear:(BOOL)animated

{

[GetAppController() updateAppOrientation:UIInterfaceOrientationPortrait];

[super viewWillAppear:animated];

    GADBannerView *adView = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner];

     adView.rootViewController = self;

      adView.adUnitID = @"ca-app-pub-********/4839119450";

    GADRequest *request = [GADRequest request];

    request.testDevices = @[ kGADSimulatorID ];

    request.testDevices = @[ @"e4022a2432e3186717781c4cf08318d0" ];


    ///   // Place the ad view onto the screen.

    [self.view addSubview:adView];

    ///   // Request an ad without any additional targeting information.

    [adView loadRequest:request];

    // [adView loadRequest:[GADRequest request]];

     }

- (void)adViewDidReceiveAd:(GADBannerView *)adView {

    [self.view addSubview:adView];

    adView.hidden = NO;

    NSLog( @"Google ad shown");

}

@end


my .plist includes

<key>NSAppTransportSecurity</key>

<dict>

<key>NSAllowsArbitraryLoads</key>

<true/>

<key>NSAllowsArbitraryLoadsForMedia</key>

<true/>

<key>NSAllowsArbitraryLoadsInWebContent</key>

<true/>

<key>NSExceptionDomains</key>

<dict>

<key>googleapis.com</key>

<dict>

<key>NSIncludesSubdomains</key>

<true/>

<key>NSExceptionMinimumTLSVersion</key>

<string>TLSv1.0</string>

<key>NSExceptionAllowsInsecureHTTPLoads</key>

<true/>

<key>NSExceptionRequiresForwardSecrecy</key>

<false/>

<key>NSThirdPartyExceptionMinimumTLSVersion</key>

<string>TLSv1.0</string>

<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>

<false/>

<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>

<true/>

</dict>

</dict>

</dict>



I receive the following errors

2016-10-27 14:11:37.651 com[2322:1744977] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9814)

2016-10-27 14:11:37.730 com[2322] <Error> [Firebase/Core][I-NET901017] <Firebase/Network/ERROR> Encounter network error. Code, error: -999, Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLKey=https://play.googleapis.com/log, NSErrorFailingURLStringKey=https://play.googleapis.com/log, NSLocalizedDescription=cancelled}

2016-10-27 14:11:37.759 com[2322:1745037] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9814)

2016-10-27 14:11:37.783 com[2322] <Error> [Firebase/Analytics][I-ACS901017] Encounter network error. Code, error: -999, Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLKey=https://app-measurement.com/config/app/1:871662309991:ios:7c633c48a9e59939?app_instance_id=13CD3CF5B68F44768F9AB618E4069B46&platform=ios&gmp_version=3700, NSErrorFailingURLStringKey=https://app-measurement.com/config/app/1:871662309991:ios:7c633c48a9e59939?app_instance_id=13CD3CF5B68F44768F9AB618E4069B46&platform=ios&gmp_version=3700, NSLocalizedDescription=cancelled}

2016-10-27 14:11:37.788 com[2322] <Error> [Firebase/Core][I-COR000020] Error posting to Clearcut: Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLKey=https://play.googleapis.com/log, NSErrorFailingURLStringKey=https://play.googleapis.com/log, NSLocalizedDescription=cancelled}



Plssssssssss Help Me


Thank You


Kristan Halls

Immacul8 Apps

Stewart Miles

unread,
Mar 6, 2017, 12:48:10 PM3/6/17
to fireba...@googlegroups.com
Are you using the Firebase Unity SDK https://firebase.google.com/docs/unity/setup?  If so, you do not need to customize your iOS app entry point.

Could you try the following?:
Cheers,
Stewart

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/9b7f5ddf-eefc-44ee-ad86-8ec4f86f0d50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages