From 2fac5f52ff63bb27b37cc7163c21e49464efc27e Mon Sep 17 00:00:00 2001 From: Evan Cummack Date: Thu, 17 Dec 2015 10:20:50 -0800 Subject: [PATCH 1/7] removed pod frameworks --- VideoQuickStart.xcodeproj/project.pbxproj | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/VideoQuickStart.xcodeproj/project.pbxproj b/VideoQuickStart.xcodeproj/project.pbxproj index a6f7975c..c1d5c136 100644 --- a/VideoQuickStart.xcodeproj/project.pbxproj +++ b/VideoQuickStart.xcodeproj/project.pbxproj @@ -13,12 +13,9 @@ 8B79D4711C2252A100489AA5 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8B79D4701C2252A100489AA5 /* Assets.xcassets */; }; 8B79D4741C2252A100489AA5 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8B79D4721C2252A100489AA5 /* LaunchScreen.storyboard */; }; 8B9921771C225C1E00DC3BCA /* SwiftyJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B9921761C225C1E00DC3BCA /* SwiftyJSON.swift */; }; - A4ADB4CC9C5A87B18F6CBEC0 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7CC661054F23B83854509E6B /* libPods.a */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 7CC661054F23B83854509E6B /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 7F14455A0C0F97E4136AE1F4 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; 8B79D4661C2252A100489AA5 /* VideoQuickStart.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VideoQuickStart.app; sourceTree = BUILT_PRODUCTS_DIR; }; 8B79D4691C2252A100489AA5 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 8B79D46B1C2252A100489AA5 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; @@ -28,7 +25,6 @@ 8B79D4751C2252A100489AA5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 8B9921761C225C1E00DC3BCA /* SwiftyJSON.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftyJSON.swift; sourceTree = ""; }; 8B9921781C225C6700DC3BCA /* VideoQuickStartBridgingHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VideoQuickStartBridgingHeader.h; sourceTree = ""; }; - F9D8095B8EA04DE69649CF03 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -36,26 +32,15 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A4ADB4CC9C5A87B18F6CBEC0 /* libPods.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 51D6D47CB8ECCEA1EB9AC69B /* Pods */ = { - isa = PBXGroup; - children = ( - F9D8095B8EA04DE69649CF03 /* Pods.debug.xcconfig */, - 7F14455A0C0F97E4136AE1F4 /* Pods.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; 5A82245B3CA8AD8931FA33E9 /* Frameworks */ = { isa = PBXGroup; children = ( - 7CC661054F23B83854509E6B /* libPods.a */, ); name = Frameworks; sourceTree = ""; @@ -65,7 +50,6 @@ children = ( 8B79D4681C2252A100489AA5 /* VideoQuickStart */, 8B79D4671C2252A100489AA5 /* Products */, - 51D6D47CB8ECCEA1EB9AC69B /* Pods */, 5A82245B3CA8AD8931FA33E9 /* Frameworks */, ); sourceTree = ""; @@ -352,7 +336,6 @@ }; 8B79D4791C2252A100489AA5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F9D8095B8EA04DE69649CF03 /* Pods.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ENABLE_BITCODE = NO; @@ -367,7 +350,6 @@ }; 8B79D47A1C2252A100489AA5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7F14455A0C0F97E4136AE1F4 /* Pods.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ENABLE_BITCODE = NO; From 73c2c71543a088b4e83c410f849300c75f5d309c Mon Sep 17 00:00:00 2001 From: Evan Cummack Date: Thu, 17 Dec 2015 10:21:28 -0800 Subject: [PATCH 2/7] changed deployment target to match sdk --- VideoQuickStart.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VideoQuickStart.xcodeproj/project.pbxproj b/VideoQuickStart.xcodeproj/project.pbxproj index c1d5c136..415686db 100644 --- a/VideoQuickStart.xcodeproj/project.pbxproj +++ b/VideoQuickStart.xcodeproj/project.pbxproj @@ -340,7 +340,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ENABLE_BITCODE = NO; INFOPLIST_FILE = VideoQuickStart/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.twilio.VideoQuickStart; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -354,7 +354,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ENABLE_BITCODE = NO; INFOPLIST_FILE = VideoQuickStart/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.twilio.VideoQuickStart; PRODUCT_NAME = "$(TARGET_NAME)"; From 77c0b5c1184b7ed20d31652b76c4a0eb240963a6 Mon Sep 17 00:00:00 2001 From: Evan Cummack Date: Thu, 17 Dec 2015 10:22:18 -0800 Subject: [PATCH 3/7] removed pod build phases --- VideoQuickStart.xcodeproj/project.pbxproj | 51 ------------------- .../AppIcon.appiconset/Contents.json | 5 ++ 2 files changed, 5 insertions(+), 51 deletions(-) diff --git a/VideoQuickStart.xcodeproj/project.pbxproj b/VideoQuickStart.xcodeproj/project.pbxproj index 415686db..2cb9b07f 100644 --- a/VideoQuickStart.xcodeproj/project.pbxproj +++ b/VideoQuickStart.xcodeproj/project.pbxproj @@ -108,12 +108,9 @@ isa = PBXNativeTarget; buildConfigurationList = 8B79D4781C2252A100489AA5 /* Build configuration list for PBXNativeTarget "VideoQuickStart" */; buildPhases = ( - B8D55EAC0011CE88DE441569 /* Check Pods Manifest.lock */, 8B79D4621C2252A100489AA5 /* Sources */, 8B79D4631C2252A100489AA5 /* Frameworks */, 8B79D4641C2252A100489AA5 /* Resources */, - 55ACB98550C2314B7A6C5CF3 /* Embed Pods Frameworks */, - AA03B70BF437B8F404ED8F1A /* Copy Pods Resources */, ); buildRules = ( ); @@ -170,54 +167,6 @@ }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - 55ACB98550C2314B7A6C5CF3 /* Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - AA03B70BF437B8F404ED8F1A /* Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - B8D55EAC0011CE88DE441569 /* Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ 8B79D4621C2252A100489AA5 /* Sources */ = { isa = PBXSourcesBuildPhase; diff --git a/VideoQuickStart/Assets.xcassets/AppIcon.appiconset/Contents.json b/VideoQuickStart/Assets.xcassets/AppIcon.appiconset/Contents.json index 36d2c80d..eeea76c2 100644 --- a/VideoQuickStart/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/VideoQuickStart/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -59,6 +59,11 @@ "idiom" : "ipad", "size" : "76x76", "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" } ], "info" : { From 3eb435018f5b65ebeecfdefd47825673b29c745d Mon Sep 17 00:00:00 2001 From: Evan Cummack Date: Thu, 17 Dec 2015 10:24:54 -0800 Subject: [PATCH 4/7] added linked frameworks manually --- VideoQuickStart.xcodeproj/project.pbxproj | 34 +++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/VideoQuickStart.xcodeproj/project.pbxproj b/VideoQuickStart.xcodeproj/project.pbxproj index 2cb9b07f..65a209b6 100644 --- a/VideoQuickStart.xcodeproj/project.pbxproj +++ b/VideoQuickStart.xcodeproj/project.pbxproj @@ -7,6 +7,14 @@ objects = { /* Begin PBXBuildFile section */ + 304A80C11C23350000CB8C03 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 304A80C01C23350000CB8C03 /* libc++.tbd */; }; + 304A80C31C23350500CB8C03 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 304A80C21C23350500CB8C03 /* AudioToolbox.framework */; }; + 304A80C51C23350A00CB8C03 /* VideoToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 304A80C41C23350A00CB8C03 /* VideoToolbox.framework */; }; + 304A80C71C23351000CB8C03 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 304A80C61C23351000CB8C03 /* AVFoundation.framework */; }; + 304A80C91C23351600CB8C03 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 304A80C81C23351600CB8C03 /* CoreTelephony.framework */; }; + 304A80CB1C23351B00CB8C03 /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 304A80CA1C23351B00CB8C03 /* GLKit.framework */; }; + 304A80CD1C23352100CB8C03 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 304A80CC1C23352100CB8C03 /* CoreMedia.framework */; }; + 304A80CF1C23352700CB8C03 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 304A80CE1C23352700CB8C03 /* SystemConfiguration.framework */; }; 8B79D46A1C2252A100489AA5 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B79D4691C2252A100489AA5 /* AppDelegate.swift */; }; 8B79D46C1C2252A100489AA5 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B79D46B1C2252A100489AA5 /* ViewController.swift */; }; 8B79D46F1C2252A100489AA5 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8B79D46D1C2252A100489AA5 /* Main.storyboard */; }; @@ -16,6 +24,14 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 304A80C01C23350000CB8C03 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; + 304A80C21C23350500CB8C03 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + 304A80C41C23350A00CB8C03 /* VideoToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = VideoToolbox.framework; path = System/Library/Frameworks/VideoToolbox.framework; sourceTree = SDKROOT; }; + 304A80C61C23351000CB8C03 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + 304A80C81C23351600CB8C03 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; + 304A80CA1C23351B00CB8C03 /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; }; + 304A80CC1C23352100CB8C03 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; + 304A80CE1C23352700CB8C03 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; 8B79D4661C2252A100489AA5 /* VideoQuickStart.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VideoQuickStart.app; sourceTree = BUILT_PRODUCTS_DIR; }; 8B79D4691C2252A100489AA5 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 8B79D46B1C2252A100489AA5 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; @@ -32,6 +48,14 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 304A80CF1C23352700CB8C03 /* SystemConfiguration.framework in Frameworks */, + 304A80CD1C23352100CB8C03 /* CoreMedia.framework in Frameworks */, + 304A80CB1C23351B00CB8C03 /* GLKit.framework in Frameworks */, + 304A80C91C23351600CB8C03 /* CoreTelephony.framework in Frameworks */, + 304A80C71C23351000CB8C03 /* AVFoundation.framework in Frameworks */, + 304A80C51C23350A00CB8C03 /* VideoToolbox.framework in Frameworks */, + 304A80C31C23350500CB8C03 /* AudioToolbox.framework in Frameworks */, + 304A80C11C23350000CB8C03 /* libc++.tbd in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -41,6 +65,14 @@ 5A82245B3CA8AD8931FA33E9 /* Frameworks */ = { isa = PBXGroup; children = ( + 304A80CE1C23352700CB8C03 /* SystemConfiguration.framework */, + 304A80CC1C23352100CB8C03 /* CoreMedia.framework */, + 304A80CA1C23351B00CB8C03 /* GLKit.framework */, + 304A80C81C23351600CB8C03 /* CoreTelephony.framework */, + 304A80C61C23351000CB8C03 /* AVFoundation.framework */, + 304A80C41C23350A00CB8C03 /* VideoToolbox.framework */, + 304A80C21C23350500CB8C03 /* AudioToolbox.framework */, + 304A80C01C23350000CB8C03 /* libc++.tbd */, ); name = Frameworks; sourceTree = ""; @@ -291,6 +323,7 @@ INFOPLIST_FILE = VideoQuickStart/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_LDFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = com.twilio.VideoQuickStart; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = VideoQuickStart/VideoQuickStartBridgingHeader.h; @@ -305,6 +338,7 @@ INFOPLIST_FILE = VideoQuickStart/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_LDFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = com.twilio.VideoQuickStart; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = VideoQuickStart/VideoQuickStartBridgingHeader.h; From 7a5d35a3764658d3d0cbd21b5ed218f83560b5d1 Mon Sep 17 00:00:00 2001 From: Evan Cummack Date: Thu, 17 Dec 2015 10:49:49 -0800 Subject: [PATCH 5/7] inherit other linker flags --- VideoQuickStart.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VideoQuickStart.xcodeproj/project.pbxproj b/VideoQuickStart.xcodeproj/project.pbxproj index 65a209b6..bf01dd5c 100644 --- a/VideoQuickStart.xcodeproj/project.pbxproj +++ b/VideoQuickStart.xcodeproj/project.pbxproj @@ -323,7 +323,7 @@ INFOPLIST_FILE = VideoQuickStart/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - OTHER_LDFLAGS = ""; + OTHER_LDFLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = com.twilio.VideoQuickStart; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = VideoQuickStart/VideoQuickStartBridgingHeader.h; @@ -338,7 +338,7 @@ INFOPLIST_FILE = VideoQuickStart/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - OTHER_LDFLAGS = ""; + OTHER_LDFLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = com.twilio.VideoQuickStart; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = VideoQuickStart/VideoQuickStartBridgingHeader.h; From e09662bb41aa97765b25f179346ba2011a048ca5 Mon Sep 17 00:00:00 2001 From: Evan Cummack Date: Thu, 17 Dec 2015 10:56:15 -0800 Subject: [PATCH 6/7] Re-adding placeholder access token --- VideoQuickStart/ViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VideoQuickStart/ViewController.swift b/VideoQuickStart/ViewController.swift index c9e5b50f..e35fc9c4 100644 --- a/VideoQuickStart/ViewController.swift +++ b/VideoQuickStart/ViewController.swift @@ -13,7 +13,7 @@ class ViewController: UIViewController { // Configure access token manually for testing, if desired! Create one manually in the console // at https://www.twilio.com/user/account/video/dev-tools/testing-tools - var accessToken = "" + var accessToken = "TWILIO_ACCESS_TOKEN" // Configure remote URL to fetch token from var tokenUrl = "http://localhost:8000/token.php" From 78b798546484aceaab064f677587f95a243e0f91 Mon Sep 17 00:00:00 2001 From: Kevin Whinnery Date: Thu, 17 Dec 2015 13:42:26 -0600 Subject: [PATCH 7/7] check for default value --- VideoQuickStart/ViewController.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/VideoQuickStart/ViewController.swift b/VideoQuickStart/ViewController.swift index e35fc9c4..2792209f 100644 --- a/VideoQuickStart/ViewController.swift +++ b/VideoQuickStart/ViewController.swift @@ -49,7 +49,8 @@ class ViewController: UIViewController { super.viewDidLoad() // Configure access token either from server or manually - if self.accessToken.isEmpty { + // If the default wasn't changed, try fetching from server + if self.accessToken == "TWILIO_ACCESS_TOKEN" { // If the token wasn't configured manually, try to fetch it from server let config = NSURLSessionConfiguration.defaultSessionConfiguration() let session = NSURLSession(configuration: config, delegate: nil, delegateQueue: nil)