Skip to content

Instantly share code, notes, and snippets.

View stefanalund's full-sized avatar

Stefan Ålund stefanalund

View GitHub Profile
@stefanalund
stefanalund / SimpleNativeDemoViewController.m
Created December 15, 2014 21:44
iOS native EventSource channel for demo.openwebrtc.io
//
// OWRDemoViewController.m
// OWRDemo
//
// Copyright (c) 2014, Ericsson AB.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
@stefanalund
stefanalund / gist:1b7a8a0f9a986827ecae
Created February 17, 2015 20:03
HTTPS in UIWebView
- (void)webViewDidStartLoad:(UIWebView *)webView
{
_isAuthenticated = NO;
}
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
{
if ([request.URL.scheme isEqualToString:@"https"]) {
// Handle HTTPS via separate request.
if (!_isAuthenticated) {