summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SmartDeviceLink-iOS.podspec2
-rw-r--r--SmartDeviceLink-iOS.xcodeproj/project.pbxproj84
-rw-r--r--SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_down_white.imageset/Contents.json23
-rw-r--r--SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_down_white.imageset/lock_arrow_down_white.pngbin309 -> 0 bytes
-rw-r--r--SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_down_white.imageset/lock_arrow_down_white@2x.pngbin498 -> 0 bytes
-rw-r--r--SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_down_white.imageset/lock_arrow_down_white@3x.pngbin729 -> 0 bytes
-rw-r--r--SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_up_white.imageset/Contents.json23
-rw-r--r--SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_up_white.imageset/lock_arrow_up_white.pngbin308 -> 0 bytes
-rw-r--r--SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_up_white.imageset/lock_arrow_up_white@2x.pngbin503 -> 0 bytes
-rw-r--r--SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_up_white.imageset/lock_arrow_up_white@3x.pngbin726 -> 0 bytes
-rw-r--r--SmartDeviceLink/Assets/SDLAssets.xcassets/sdl_logo_white.imageset/Contents.json23
-rw-r--r--SmartDeviceLink/Assets/SDLAssets.xcassets/sdl_logo_white.imageset/sdl_logo_white.pngbin2282 -> 0 bytes
-rw-r--r--SmartDeviceLink/Assets/SDLAssets.xcassets/sdl_logo_white.imageset/sdl_logo_white@2x.pngbin4931 -> 0 bytes
-rw-r--r--SmartDeviceLink/Assets/SDLAssets.xcassets/sdl_logo_white.imageset/sdl_logo_white@3x.pngbin7137 -> 0 bytes
-rw-r--r--SmartDeviceLink/Info.plist2
-rw-r--r--SmartDeviceLink/SDLLockScreenViewController.m51
-rw-r--r--SmartDeviceLink/SDLProxy.m68
-rw-r--r--SmartDeviceLink/SDLURLRequestTask.h46
-rw-r--r--SmartDeviceLink/SDLURLRequestTask.m110
-rw-r--r--SmartDeviceLink/SDLURLSession.h57
-rw-r--r--SmartDeviceLink/SDLURLSession.m113
-rw-r--r--SmartDeviceLink/iOS 7 Assets/lock_arrow_down/white/lock_arrow_down_white.pngbin309 -> 0 bytes
-rw-r--r--SmartDeviceLink/iOS 7 Assets/lock_arrow_down/white/lock_arrow_down_white@2x.pngbin498 -> 0 bytes
-rw-r--r--SmartDeviceLink/iOS 7 Assets/lock_arrow_down/white/lock_arrow_down_white@3x.pngbin729 -> 0 bytes
-rw-r--r--SmartDeviceLinkTests/Info.plist2
-rw-r--r--SmartDeviceLinkTests/UtilitiesSpecs/HTTP Connection/SDLURLRequestTaskSpec.m140
-rw-r--r--SmartDeviceLinkTests/UtilitiesSpecs/HTTP Connection/SDLURLSessionSpec.m201
-rw-r--r--SmartDeviceLink_Example/Info.plist2
28 files changed, 77 insertions, 870 deletions
diff --git a/SmartDeviceLink-iOS.podspec b/SmartDeviceLink-iOS.podspec
index 7369776b1..7e6841020 100644
--- a/SmartDeviceLink-iOS.podspec
+++ b/SmartDeviceLink-iOS.podspec
@@ -6,7 +6,7 @@ s.summary = "Connect your app with cars!"
s.homepage = "https://github.com/smartdevicelink/SmartDeviceLink-iOS"
s.license = { :type => "New BSD", :file => "LICENSE" }
s.author = { "SmartDeviceLink Team" => "developer@smartdevicelink.com" }
-s.platform = :ios, "6.0"
+s.platform = :ios, "7.0"
s.source = { :git => "https://github.com/smartdevicelink/sdl_ios.git", :tag => s.version.to_s }
s.source_files = "SmartDeviceLink/*.{h,m}"
s.requires_arc = true
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
index 3bb5759c9..75ffff0a3 100644
--- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
+++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
@@ -846,10 +846,6 @@
5DBAE0AB1D3588AC00CE00BF /* SDLNotificationDispatcherSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DBAE0AA1D3588AC00CE00BF /* SDLNotificationDispatcherSpec.m */; };
5DBAE0AD1D368D1A00CE00BF /* SDLResponseDispatcherSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DBAE0AC1D368D1A00CE00BF /* SDLResponseDispatcherSpec.m */; };
5DC978261B7A38640012C2F1 /* SDLGlobalsSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DC978251B7A38640012C2F1 /* SDLGlobalsSpec.m */; };
- 5DCC19A01B8221F3004FFAD9 /* SDLURLSession.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DCC199E1B8221F3004FFAD9 /* SDLURLSession.h */; };
- 5DCC19A11B8221F3004FFAD9 /* SDLURLSession.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DCC199F1B8221F3004FFAD9 /* SDLURLSession.m */; };
- 5DCC19A41B822804004FFAD9 /* SDLURLRequestTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DCC19A21B822804004FFAD9 /* SDLURLRequestTask.h */; };
- 5DCC19A51B822804004FFAD9 /* SDLURLRequestTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DCC19A31B822804004FFAD9 /* SDLURLRequestTask.m */; };
5DCF76F51ACDBAD300BB647B /* SDLSendLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DCF76F31ACDBAD300BB647B /* SDLSendLocation.h */; settings = {ATTRIBUTES = (Public, ); }; };
5DCF76F61ACDBAD300BB647B /* SDLSendLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DCF76F41ACDBAD300BB647B /* SDLSendLocation.m */; };
5DCF76F91ACDD7CD00BB647B /* SDLSendLocationResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DCF76F71ACDD7CD00BB647B /* SDLSendLocationResponse.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -877,21 +873,12 @@
DA7515B11D95FAA000F29323 /* lock_arrow_down_black.png in Resources */ = {isa = PBXBuildFile; fileRef = DA7515981D95FAA000F29323 /* lock_arrow_down_black.png */; };
DA7515B21D95FAA000F29323 /* lock_arrow_down_black@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA7515991D95FAA000F29323 /* lock_arrow_down_black@2x.png */; };
DA7515B31D95FAA000F29323 /* lock_arrow_down_black@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA75159A1D95FAA000F29323 /* lock_arrow_down_black@3x.png */; };
- DA7515B41D95FAA000F29323 /* lock_arrow_down_white.png in Resources */ = {isa = PBXBuildFile; fileRef = DA75159C1D95FAA000F29323 /* lock_arrow_down_white.png */; };
- DA7515B51D95FAA000F29323 /* lock_arrow_down_white@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA75159D1D95FAA000F29323 /* lock_arrow_down_white@2x.png */; };
- DA7515B61D95FAA000F29323 /* lock_arrow_down_white@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA75159E1D95FAA000F29323 /* lock_arrow_down_white@3x.png */; };
DA7515B71D95FAA000F29323 /* lock_arrow_up_black.png in Resources */ = {isa = PBXBuildFile; fileRef = DA7515A11D95FAA000F29323 /* lock_arrow_up_black.png */; };
DA7515B81D95FAA000F29323 /* lock_arrow_up_black@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA7515A21D95FAA000F29323 /* lock_arrow_up_black@2x.png */; };
DA7515B91D95FAA000F29323 /* lock_arrow_up_black@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA7515A31D95FAA000F29323 /* lock_arrow_up_black@3x.png */; };
- DA7515BA1D95FAA000F29323 /* lock_arrow_up_white.png in Resources */ = {isa = PBXBuildFile; fileRef = DA7515A51D95FAA000F29323 /* lock_arrow_up_white.png */; };
- DA7515BB1D95FAA000F29323 /* lock_arrow_up_white@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA7515A61D95FAA000F29323 /* lock_arrow_up_white@2x.png */; };
- DA7515BC1D95FAA000F29323 /* lock_arrow_up_white@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA7515A71D95FAA000F29323 /* lock_arrow_up_white@3x.png */; };
DA7515BD1D95FAA000F29323 /* sdl_logo_black.png in Resources */ = {isa = PBXBuildFile; fileRef = DA7515AA1D95FAA000F29323 /* sdl_logo_black.png */; };
DA7515BE1D95FAA000F29323 /* sdl_logo_black@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA7515AB1D95FAA000F29323 /* sdl_logo_black@2x.png */; };
DA7515BF1D95FAA000F29323 /* sdl_logo_black@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA7515AC1D95FAA000F29323 /* sdl_logo_black@3x.png */; };
- DA7515C01D95FAA000F29323 /* sdl_logo_white.png in Resources */ = {isa = PBXBuildFile; fileRef = DA7515AE1D95FAA000F29323 /* sdl_logo_white.png */; };
- DA7515C11D95FAA000F29323 /* sdl_logo_white@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA7515AF1D95FAA000F29323 /* sdl_logo_white@2x.png */; };
- DA7515C21D95FAA000F29323 /* sdl_logo_white@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = DA7515B01D95FAA000F29323 /* sdl_logo_white@3x.png */; };
DA96C0661D4D4F730022F520 /* SDLAppInfoSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = DA96C0651D4D4F730022F520 /* SDLAppInfoSpec.m */; };
DA9F7E631DCBFAC800ACAE48 /* SDLDateTime.h in Headers */ = {isa = PBXBuildFile; fileRef = DA9F7E611DCBFAC800ACAE48 /* SDLDateTime.h */; settings = {ATTRIBUTES = (Public, ); }; };
DA9F7E641DCBFAC800ACAE48 /* SDLDateTime.m in Sources */ = {isa = PBXBuildFile; fileRef = DA9F7E621DCBFAC800ACAE48 /* SDLDateTime.m */; };
@@ -1874,10 +1861,6 @@
5DBAE0AA1D3588AC00CE00BF /* SDLNotificationDispatcherSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDLNotificationDispatcherSpec.m; path = DevAPISpecs/SDLNotificationDispatcherSpec.m; sourceTree = "<group>"; };
5DBAE0AC1D368D1A00CE00BF /* SDLResponseDispatcherSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDLResponseDispatcherSpec.m; path = DevAPISpecs/SDLResponseDispatcherSpec.m; sourceTree = "<group>"; };
5DC978251B7A38640012C2F1 /* SDLGlobalsSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDLGlobalsSpec.m; path = UtilitiesSpecs/SDLGlobalsSpec.m; sourceTree = "<group>"; };
- 5DCC199E1B8221F3004FFAD9 /* SDLURLSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLURLSession.h; sourceTree = "<group>"; };
- 5DCC199F1B8221F3004FFAD9 /* SDLURLSession.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLURLSession.m; sourceTree = "<group>"; };
- 5DCC19A21B822804004FFAD9 /* SDLURLRequestTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLURLRequestTask.h; sourceTree = "<group>"; };
- 5DCC19A31B822804004FFAD9 /* SDLURLRequestTask.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLURLRequestTask.m; sourceTree = "<group>"; };
5DCF76F31ACDBAD300BB647B /* SDLSendLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLSendLocation.h; sourceTree = "<group>"; };
5DCF76F41ACDBAD300BB647B /* SDLSendLocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLSendLocation.m; sourceTree = "<group>"; };
5DCF76F71ACDD7CD00BB647B /* SDLSendLocationResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLSendLocationResponse.h; sourceTree = "<group>"; };
@@ -1903,21 +1886,12 @@
DA7515981D95FAA000F29323 /* lock_arrow_down_black.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = lock_arrow_down_black.png; sourceTree = "<group>"; };
DA7515991D95FAA000F29323 /* lock_arrow_down_black@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "lock_arrow_down_black@2x.png"; sourceTree = "<group>"; };
DA75159A1D95FAA000F29323 /* lock_arrow_down_black@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "lock_arrow_down_black@3x.png"; sourceTree = "<group>"; };
- DA75159C1D95FAA000F29323 /* lock_arrow_down_white.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = lock_arrow_down_white.png; sourceTree = "<group>"; };
- DA75159D1D95FAA000F29323 /* lock_arrow_down_white@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "lock_arrow_down_white@2x.png"; sourceTree = "<group>"; };
- DA75159E1D95FAA000F29323 /* lock_arrow_down_white@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "lock_arrow_down_white@3x.png"; sourceTree = "<group>"; };
DA7515A11D95FAA000F29323 /* lock_arrow_up_black.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = lock_arrow_up_black.png; sourceTree = "<group>"; };
DA7515A21D95FAA000F29323 /* lock_arrow_up_black@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "lock_arrow_up_black@2x.png"; sourceTree = "<group>"; };
DA7515A31D95FAA000F29323 /* lock_arrow_up_black@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "lock_arrow_up_black@3x.png"; sourceTree = "<group>"; };
- DA7515A51D95FAA000F29323 /* lock_arrow_up_white.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = lock_arrow_up_white.png; sourceTree = "<group>"; };
- DA7515A61D95FAA000F29323 /* lock_arrow_up_white@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "lock_arrow_up_white@2x.png"; sourceTree = "<group>"; };
- DA7515A71D95FAA000F29323 /* lock_arrow_up_white@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "lock_arrow_up_white@3x.png"; sourceTree = "<group>"; };
DA7515AA1D95FAA000F29323 /* sdl_logo_black.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = sdl_logo_black.png; sourceTree = "<group>"; };
DA7515AB1D95FAA000F29323 /* sdl_logo_black@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sdl_logo_black@2x.png"; sourceTree = "<group>"; };
DA7515AC1D95FAA000F29323 /* sdl_logo_black@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sdl_logo_black@3x.png"; sourceTree = "<group>"; };
- DA7515AE1D95FAA000F29323 /* sdl_logo_white.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = sdl_logo_white.png; sourceTree = "<group>"; };
- DA7515AF1D95FAA000F29323 /* sdl_logo_white@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sdl_logo_white@2x.png"; sourceTree = "<group>"; };
- DA7515B01D95FAA000F29323 /* sdl_logo_white@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "sdl_logo_white@3x.png"; sourceTree = "<group>"; };
DA96C0651D4D4F730022F520 /* SDLAppInfoSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLAppInfoSpec.m; sourceTree = "<group>"; };
DA9F7E611DCBFAC800ACAE48 /* SDLDateTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLDateTime.h; sourceTree = "<group>"; };
DA9F7E621DCBFAC800ACAE48 /* SDLDateTime.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLDateTime.m; sourceTree = "<group>"; };
@@ -3049,7 +3023,6 @@
isa = PBXGroup;
children = (
DAC5724C1D0FE3B60004288B /* Touches */,
- 5DCC199D1B8221D2004FFAD9 /* HTTP Connection */,
E9C32B831AB20B2900F283AF /* @categories */,
5D5934F91A851A8000687FB9 /* Prioritized Objects */,
5D61FAD21A84238A00846EE7 /* SDLHexUtility.h */,
@@ -3642,17 +3615,6 @@
name = Dispatchers;
sourceTree = "<group>";
};
- 5DCC199D1B8221D2004FFAD9 /* HTTP Connection */ = {
- isa = PBXGroup;
- children = (
- 5DCC199E1B8221F3004FFAD9 /* SDLURLSession.h */,
- 5DCC199F1B8221F3004FFAD9 /* SDLURLSession.m */,
- 5DCC19A21B822804004FFAD9 /* SDLURLRequestTask.h */,
- 5DCC19A31B822804004FFAD9 /* SDLURLRequestTask.m */,
- );
- name = "HTTP Connection";
- sourceTree = "<group>";
- };
5DE372A71ACC35C100849FAA /* @protocols */ = {
isa = PBXGroup;
children = (
@@ -3696,7 +3658,6 @@
isa = PBXGroup;
children = (
DA7515971D95FAA000F29323 /* black */,
- DA75159B1D95FAA000F29323 /* white */,
);
path = lock_arrow_down;
sourceTree = "<group>";
@@ -3711,21 +3672,10 @@
path = black;
sourceTree = "<group>";
};
- DA75159B1D95FAA000F29323 /* white */ = {
- isa = PBXGroup;
- children = (
- DA75159C1D95FAA000F29323 /* lock_arrow_down_white.png */,
- DA75159D1D95FAA000F29323 /* lock_arrow_down_white@2x.png */,
- DA75159E1D95FAA000F29323 /* lock_arrow_down_white@3x.png */,
- );
- path = white;
- sourceTree = "<group>";
- };
DA75159F1D95FAA000F29323 /* lock_arrow_up */ = {
isa = PBXGroup;
children = (
DA7515A01D95FAA000F29323 /* black */,
- DA7515A41D95FAA000F29323 /* white */,
);
path = lock_arrow_up;
sourceTree = "<group>";
@@ -3740,21 +3690,10 @@
path = black;
sourceTree = "<group>";
};
- DA7515A41D95FAA000F29323 /* white */ = {
- isa = PBXGroup;
- children = (
- DA7515A51D95FAA000F29323 /* lock_arrow_up_white.png */,
- DA7515A61D95FAA000F29323 /* lock_arrow_up_white@2x.png */,
- DA7515A71D95FAA000F29323 /* lock_arrow_up_white@3x.png */,
- );
- path = white;
- sourceTree = "<group>";
- };
DA7515A81D95FAA000F29323 /* sdl_logo */ = {
isa = PBXGroup;
children = (
DA7515A91D95FAA000F29323 /* black */,
- DA7515AD1D95FAA000F29323 /* white */,
);
path = sdl_logo;
sourceTree = "<group>";
@@ -3769,16 +3708,6 @@
path = black;
sourceTree = "<group>";
};
- DA7515AD1D95FAA000F29323 /* white */ = {
- isa = PBXGroup;
- children = (
- DA7515AE1D95FAA000F29323 /* sdl_logo_white.png */,
- DA7515AF1D95FAA000F29323 /* sdl_logo_white@2x.png */,
- DA7515B01D95FAA000F29323 /* sdl_logo_white@3x.png */,
- );
- path = white;
- sourceTree = "<group>";
- };
DAC5724C1D0FE3B60004288B /* Touches */ = {
isa = PBXGroup;
children = (
@@ -3955,7 +3884,6 @@
5D61FD5F1A84238C00846EE7 /* SDLRegisterAppInterfaceResponse.h in Headers */,
5D61FD191A84238C00846EE7 /* SDLOnSyncPData.h in Headers */,
5D61FE091A84238C00846EE7 /* SDLVehicleDataType.h in Headers */,
- 5DCC19A01B8221F3004FFAD9 /* SDLURLSession.h in Headers */,
5D61FDB11A84238C00846EE7 /* SDLSubscribeVehicleData.h in Headers */,
5DCF76F51ACDBAD300BB647B /* SDLSendLocation.h in Headers */,
5D61FC9E1A84238C00846EE7 /* SDLEncodedSyncPData.h in Headers */,
@@ -4055,7 +3983,6 @@
DA9F7E7F1DCC028B00ACAE48 /* SDLOnWaypointChange.h in Headers */,
5D61FCE41A84238C00846EE7 /* SDLKeyboardProperties.h in Headers */,
5D61FDED1A84238C00846EE7 /* SDLUnsubscribeVehicleDataResponse.h in Headers */,
- 5DCC19A41B822804004FFAD9 /* SDLURLRequestTask.h in Headers */,
5D61FCCF1A84238C00846EE7 /* SDLImageField.h in Headers */,
5D535DC51B72473800CF7760 /* SDLGlobals.h in Headers */,
5D79A03B1CE36F030035797B /* SDLUploadFileOperation.h in Headers */,
@@ -4268,24 +4195,15 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- DA7515B51D95FAA000F29323 /* lock_arrow_down_white@2x.png in Resources */,
DA7515BE1D95FAA000F29323 /* sdl_logo_black@2x.png in Resources */,
DA7515B91D95FAA000F29323 /* lock_arrow_up_black@3x.png in Resources */,
DA7515B71D95FAA000F29323 /* lock_arrow_up_black.png in Resources */,
- DA7515BC1D95FAA000F29323 /* lock_arrow_up_white@3x.png in Resources */,
DA7515B81D95FAA000F29323 /* lock_arrow_up_black@2x.png in Resources */,
- DA7515C21D95FAA000F29323 /* sdl_logo_white@3x.png in Resources */,
- DA7515C01D95FAA000F29323 /* sdl_logo_white.png in Resources */,
- DA7515C11D95FAA000F29323 /* sdl_logo_white@2x.png in Resources */,
DA7515BD1D95FAA000F29323 /* sdl_logo_black.png in Resources */,
DA7515B11D95FAA000F29323 /* lock_arrow_down_black.png in Resources */,
- DA7515BA1D95FAA000F29323 /* lock_arrow_up_white.png in Resources */,
5D6F7A3E1BC811FC0070BF37 /* SDLAssets.xcassets in Resources */,
5D616B451D552F7A00553F6B /* SDLLockScreen.storyboard in Resources */,
- DA7515BB1D95FAA000F29323 /* lock_arrow_up_white@2x.png in Resources */,
- DA7515B61D95FAA000F29323 /* lock_arrow_down_white@3x.png in Resources */,
DA7515B21D95FAA000F29323 /* lock_arrow_down_black@2x.png in Resources */,
- DA7515B41D95FAA000F29323 /* lock_arrow_down_white.png in Resources */,
DA7515B31D95FAA000F29323 /* lock_arrow_down_black@3x.png in Resources */,
DA7515BF1D95FAA000F29323 /* sdl_logo_black@3x.png in Resources */,
);
@@ -4331,7 +4249,6 @@
buildActionMask = 2147483647;
files = (
332A914F1CED9CC60043824C /* SDLAppInfo.m in Sources */,
- 5DCC19A51B822804004FFAD9 /* SDLURLRequestTask.m in Sources */,
DA9F7E841DCC047200ACAE48 /* SDLWaypointType.m in Sources */,
5D61FC561A84238C00846EE7 /* SDLButtonName.m in Sources */,
5D61FCC21A84238C00846EE7 /* SDLHMILevel.m in Sources */,
@@ -4460,7 +4377,6 @@
5D61FC4E1A84238C00846EE7 /* SDLBitsPerSample.m in Sources */,
5D61FDEA1A84238C00846EE7 /* SDLUnsubscribeButtonResponse.m in Sources */,
5D61FCA61A84238C00846EE7 /* SDLEndAudioPassThruResponse.m in Sources */,
- 5DCC19A11B8221F3004FFAD9 /* SDLURLSession.m in Sources */,
5D61FD281A84238C00846EE7 /* SDLPerformAudioPassThruResponse.m in Sources */,
5D61FDCE1A84238C00846EE7 /* SDLTimerMode.m in Sources */,
5D61FD701A84238C00846EE7 /* SDLRPCPayload.m in Sources */,
diff --git a/SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_down_white.imageset/Contents.json b/SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_down_white.imageset/Contents.json
deleted file mode 100644
index 765c60c66..000000000
--- a/SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_down_white.imageset/Contents.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "images" : [
- {
- "idiom" : "universal",
- "filename" : "lock_arrow_down_white.png",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "filename" : "lock_arrow_down_white@2x.png",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "filename" : "lock_arrow_down_white@3x.png",
- "scale" : "3x"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-} \ No newline at end of file
diff --git a/SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_down_white.imageset/lock_arrow_down_white.png b/SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_down_white.imageset/lock_arrow_down_white.png
deleted file mode 100644
index 07e620d05..000000000
--- a/SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_down_white.imageset/lock_arrow_down_white.png
+++ /dev/null
Binary files differ
diff --git a/SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_down_white.imageset/lock_arrow_down_white@2x.png b/SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_down_white.imageset/lock_arrow_down_white@2x.png
deleted file mode 100644
index 57fa8120f..000000000
--- a/SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_down_white.imageset/lock_arrow_down_white@2x.png
+++ /dev/null
Binary files differ
diff --git a/SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_down_white.imageset/lock_arrow_down_white@3x.png b/SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_down_white.imageset/lock_arrow_down_white@3x.png
deleted file mode 100644
index b354c1a13..000000000
--- a/SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_down_white.imageset/lock_arrow_down_white@3x.png
+++ /dev/null
Binary files differ
diff --git a/SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_up_white.imageset/Contents.json b/SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_up_white.imageset/Contents.json
deleted file mode 100644
index 3140e0f82..000000000
--- a/SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_up_white.imageset/Contents.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "images" : [
- {
- "idiom" : "universal",
- "filename" : "lock_arrow_up_white.png",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "filename" : "lock_arrow_up_white@2x.png",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "filename" : "lock_arrow_up_white@3x.png",
- "scale" : "3x"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-} \ No newline at end of file
diff --git a/SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_up_white.imageset/lock_arrow_up_white.png b/SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_up_white.imageset/lock_arrow_up_white.png
deleted file mode 100644
index bb0662fe5..000000000
--- a/SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_up_white.imageset/lock_arrow_up_white.png
+++ /dev/null
Binary files differ
diff --git a/SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_up_white.imageset/lock_arrow_up_white@2x.png b/SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_up_white.imageset/lock_arrow_up_white@2x.png
deleted file mode 100644
index f45e6b299..000000000
--- a/SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_up_white.imageset/lock_arrow_up_white@2x.png
+++ /dev/null
Binary files differ
diff --git a/SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_up_white.imageset/lock_arrow_up_white@3x.png b/SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_up_white.imageset/lock_arrow_up_white@3x.png
deleted file mode 100644
index d30fc404c..000000000
--- a/SmartDeviceLink/Assets/SDLAssets.xcassets/lock_arrow_up_white.imageset/lock_arrow_up_white@3x.png
+++ /dev/null
Binary files differ
diff --git a/SmartDeviceLink/Assets/SDLAssets.xcassets/sdl_logo_white.imageset/Contents.json b/SmartDeviceLink/Assets/SDLAssets.xcassets/sdl_logo_white.imageset/Contents.json
deleted file mode 100644
index 3943b868e..000000000
--- a/SmartDeviceLink/Assets/SDLAssets.xcassets/sdl_logo_white.imageset/Contents.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "images" : [
- {
- "idiom" : "universal",
- "filename" : "sdl_logo_white.png",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "filename" : "sdl_logo_white@2x.png",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "filename" : "sdl_logo_white@3x.png",
- "scale" : "3x"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-} \ No newline at end of file
diff --git a/SmartDeviceLink/Assets/SDLAssets.xcassets/sdl_logo_white.imageset/sdl_logo_white.png b/SmartDeviceLink/Assets/SDLAssets.xcassets/sdl_logo_white.imageset/sdl_logo_white.png
deleted file mode 100644
index 1c35ef9b3..000000000
--- a/SmartDeviceLink/Assets/SDLAssets.xcassets/sdl_logo_white.imageset/sdl_logo_white.png
+++ /dev/null
Binary files differ
diff --git a/SmartDeviceLink/Assets/SDLAssets.xcassets/sdl_logo_white.imageset/sdl_logo_white@2x.png b/SmartDeviceLink/Assets/SDLAssets.xcassets/sdl_logo_white.imageset/sdl_logo_white@2x.png
deleted file mode 100644
index b7d0bd92a..000000000
--- a/SmartDeviceLink/Assets/SDLAssets.xcassets/sdl_logo_white.imageset/sdl_logo_white@2x.png
+++ /dev/null
Binary files differ
diff --git a/SmartDeviceLink/Assets/SDLAssets.xcassets/sdl_logo_white.imageset/sdl_logo_white@3x.png b/SmartDeviceLink/Assets/SDLAssets.xcassets/sdl_logo_white.imageset/sdl_logo_white@3x.png
deleted file mode 100644
index b8b9ef757..000000000
--- a/SmartDeviceLink/Assets/SDLAssets.xcassets/sdl_logo_white.imageset/sdl_logo_white@3x.png
+++ /dev/null
Binary files differ
diff --git a/SmartDeviceLink/Info.plist b/SmartDeviceLink/Info.plist
index 3050683a6..192a3f9a6 100644
--- a/SmartDeviceLink/Info.plist
+++ b/SmartDeviceLink/Info.plist
@@ -9,7 +9,7 @@
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
+ <string>7.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
diff --git a/SmartDeviceLink/SDLLockScreenViewController.m b/SmartDeviceLink/SDLLockScreenViewController.m
index 88bd4ff74..73659eaf6 100644
--- a/SmartDeviceLink/SDLLockScreenViewController.m
+++ b/SmartDeviceLink/SDLLockScreenViewController.m
@@ -40,7 +40,7 @@ NS_ASSUME_NONNULL_BEGIN
}
- (UIStatusBarStyle)preferredStatusBarStyle {
- BOOL useWhiteIcon = [self.class shouldUseWhiteForegroundForBackgroundColor:self.backgroundColor];
+ BOOL useWhiteIcon = [self.class sdl_shouldUseWhiteForegroundForBackgroundColor:self.backgroundColor];
return useWhiteIcon ? UIStatusBarStyleLightContent : UIStatusBarStyleDefault;
}
@@ -71,15 +71,18 @@ NS_ASSUME_NONNULL_BEGIN
#pragma mark - Layout
- (void)sdl_layoutViews {
- BOOL useWhiteIcon = [self.class shouldUseWhiteForegroundForBackgroundColor:self.backgroundColor];
+ UIColor *iconColor = [self.class sdl_accentColorBasedOnColor:self.backgroundColor];
- UIImage *sdlLogo = [self.class sdl_logoImageWithColor:useWhiteIcon];
- self.sdlIconImageView.image = sdlLogo;
+ self.sdlIconImageView.image = [self.class sdl_imageWithName:@"sdl_logo_black"];
+ self.sdlIconImageView.tintColor = iconColor;
- self.arrowUpImageView.image = [self.class sdl_arrowUpImageWithColor:useWhiteIcon];
- self.arrowDownImageView.image = [self.class sdl_arrowDownImageWithColor:useWhiteIcon];
-
- self.lockedLabel.textColor = useWhiteIcon ? [UIColor whiteColor] : [UIColor blackColor];
+ self.arrowUpImageView.image = [self.class sdl_imageWithName:@"lock_arrow_up_black"];
+ self.arrowUpImageView.tintColor = iconColor;
+
+ self.arrowDownImageView.image = [self.class sdl_imageWithName:@"lock_arrow_down_black"];
+ self.arrowDownImageView.tintColor = iconColor;
+
+ self.lockedLabel.textColor = iconColor;
if (self.vehicleIcon != nil && self.appIcon != nil) {
[self sdl_setVehicleAndAppIconsLayout];
@@ -106,7 +109,8 @@ NS_ASSUME_NONNULL_BEGIN
self.primaryVehicleIconImageView.image = self.vehicleIcon;
self.backupImageView.image = nil;
-
+ self.backupImageView.tintColor = nil;
+
self.arrowUpImageView.alpha = 1.0;
self.arrowDownImageView.alpha = 1.0;
@@ -118,7 +122,8 @@ NS_ASSUME_NONNULL_BEGIN
self.primaryVehicleIconImageView.image = nil;
self.backupImageView.image = self.appIcon;
-
+ self.backupImageView.tintColor = nil;
+
self.arrowUpImageView.alpha = 0.0;
self.arrowDownImageView.alpha = 0.0;
@@ -130,7 +135,8 @@ NS_ASSUME_NONNULL_BEGIN
self.primaryVehicleIconImageView.image = nil;
self.backupImageView.image = self.vehicleIcon;
-
+ self.backupImageView.tintColor = nil;
+
self.arrowUpImageView.alpha = 0.0;
self.arrowDownImageView.alpha = 0.0;
@@ -142,6 +148,7 @@ NS_ASSUME_NONNULL_BEGIN
self.primaryVehicleIconImageView.image = nil;
self.backupImageView.image = self.sdlIconImageView.image;
+ self.backupImageView.tintColor = [self.class sdl_accentColorBasedOnColor:self.backgroundColor];
self.arrowUpImageView.alpha = 0.0;
self.arrowDownImageView.alpha = 0.0;
@@ -152,20 +159,12 @@ NS_ASSUME_NONNULL_BEGIN
#pragma mark - Private Image
-// TODO: (Joel F.)[2016-08-22] When moved to iOS 7+, use `imageWithRenderingMode:`
-+ (UIImage *)sdl_logoImageWithColor:(BOOL)white {
- return [self sdl_imageWithName:[NSString stringWithFormat:@"sdl_logo_%@", white ? @"white" : @"black"]];
-}
-
-+ (UIImage *)sdl_arrowUpImageWithColor:(BOOL)white {
- return [self sdl_imageWithName:[NSString stringWithFormat:@"lock_arrow_up_%@", white ? @"white" : @"black"]];
-}
-
-+ (UIImage *)sdl_arrowDownImageWithColor:(BOOL)white {
- return [self sdl_imageWithName:[NSString stringWithFormat:@"lock_arrow_down_%@", white ? @"white" : @"black"]];
++ (UIColor *)sdl_accentColorBasedOnColor:(UIColor *)backgroundColor {
+ return [self sdl_shouldUseWhiteForegroundForBackgroundColor:backgroundColor] ? [UIColor whiteColor] : [UIColor blackColor];
}
+ (UIImage *)sdl_imageWithName:(NSString *)name {
+ UIImage* image = nil;
if (SDL_SYSTEM_VERSION_LESS_THAN(@"8.0")) {
NSString *bundlePath = [[NSBundle sdlBundle] bundlePath];
NSInteger deviceScale = [[UIScreen mainScreen] scale];
@@ -173,13 +172,15 @@ NS_ASSUME_NONNULL_BEGIN
NSString *fileName = [NSString stringWithFormat:@"%@%li.png", name, (long)deviceScale];
NSString *fullPath = [NSString stringWithFormat:@"%@/%@", bundlePath, fileName];
NSData *imageData = [NSData dataWithContentsOfFile:fullPath];
- return [UIImage imageWithData:imageData];
+ image = [UIImage imageWithData:imageData];
} else {
- return [UIImage imageNamed:name inBundle:[NSBundle sdlBundle] compatibleWithTraitCollection:nil];
+ image = [UIImage imageNamed:name inBundle:[NSBundle sdlBundle] compatibleWithTraitCollection:nil];
}
+
+ return [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
}
-+ (BOOL)shouldUseWhiteForegroundForBackgroundColor:(UIColor *)backgroundColor {
++ (BOOL)sdl_shouldUseWhiteForegroundForBackgroundColor:(UIColor *)backgroundColor {
CGFloat red, green, blue;
[backgroundColor getRed:&red green:&green blue:&blue alpha:nil];
diff --git a/SmartDeviceLink/SDLProxy.m b/SmartDeviceLink/SDLProxy.m
index b78f0d514..ba42907e0 100644
--- a/SmartDeviceLink/SDLProxy.m
+++ b/SmartDeviceLink/SDLProxy.m
@@ -38,7 +38,6 @@
#import "SDLSystemContext.h"
#import "SDLSystemRequest.h"
#import "SDLTimer.h"
-#import "SDLURLSession.h"
#import "SDLVehicleType.h"
NS_ASSUME_NONNULL_BEGIN
@@ -52,6 +51,7 @@ NSString *const SDLProxyVersion = @"4.5.1";
const float startSessionTime = 10.0;
const float notifyProxyClosedDelay = 0.1;
const int POLICIES_CORRELATION_ID = 65535;
+static float DefaultConnectionTimeout = 45.0;
@interface SDLProxy () {
SDLLockScreenStatusManager *_lsm;
@@ -62,6 +62,7 @@ const int POLICIES_CORRELATION_ID = 65535;
@property (nullable, nonatomic, strong, readwrite) SDLStreamingMediaManager *streamingMediaManager;
@property (nullable, nonatomic, strong) SDLDisplayCapabilities *displayCapabilities;
@property (nonatomic, strong) NSMutableDictionary<SDLVehicleMake *, Class> *securityManagers;
+@property (nonatomic, strong) NSURLSession* urlSession;
@end
@@ -86,6 +87,14 @@ const int POLICIES_CORRELATION_ID = 65535;
[SDLDebugTool logInfo:@"SDLProxy initWithTransport"];
[[EAAccessoryManager sharedAccessoryManager] registerForLocalNotifications];
+
+ NSURLSessionConfiguration* configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
+ configuration.timeoutIntervalForRequest = DefaultConnectionTimeout;
+ configuration.timeoutIntervalForResource = DefaultConnectionTimeout;
+ configuration.requestCachePolicy = NSURLRequestUseProtocolCachePolicy;
+
+ _urlSession = [NSURLSession sessionWithConfiguration:configuration];
+
}
return self;
@@ -98,9 +107,9 @@ const int POLICIES_CORRELATION_ID = 65535;
[[NSNotificationCenter defaultCenter] removeObserver:self];
[[EAAccessoryManager sharedAccessoryManager] unregisterForLocalNotifications];
-
- [[SDLURLSession defaultSession] cancelAllTasks];
-
+
+ [_urlSession invalidateAndCancel];
+
[SDLDebugTool logInfo:@"SDLProxy Dealloc" withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:_debugConsoleGroupName];
}
@@ -509,17 +518,17 @@ const int POLICIES_CORRELATION_ID = 65535;
}
- (void)handleSystemRequestLockScreenIconURL:(SDLOnSystemRequest *)request {
- [[SDLURLSession defaultSession] dataFromURL:[NSURL URLWithString:request.url]
- completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
- if (error != nil) {
- NSString *logMessage = [NSString stringWithFormat:@"OnSystemRequest failure (HTTP response), download task failed: %@", error.localizedDescription];
- [SDLDebugTool logInfo:logMessage withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:self.debugConsoleGroupName];
- return;
- }
-
- UIImage *icon = [UIImage imageWithData:data];
- [self invokeMethodOnDelegates:@selector(onReceivedLockScreenIcon:) withObject:icon];
- }];
+ [self sdl_sendDataTaskWithURL:[NSURL URLWithString:request.url]
+ completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
+ if (error != nil) {
+ NSString *logMessage = [NSString stringWithFormat:@"OnSystemRequest failure (HTTP response), download task failed: %@", error.localizedDescription];
+ [SDLDebugTool logInfo:logMessage withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:self.debugConsoleGroupName];
+ return;
+ }
+
+ UIImage *icon = [UIImage imageWithData:data];
+ [self invokeMethodOnDelegates:@selector(onReceivedLockScreenIcon:) withObject:icon];
+ }];
}
- (void)sdl_handleSystemRequestHTTP:(SDLOnSystemRequest *)request {
@@ -613,7 +622,7 @@ const int POLICIES_CORRELATION_ID = 65535;
[SDLDebugTool logInfo:logMessage withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:self.debugConsoleGroupName];
// Create the upload task
- [[SDLURLSession defaultSession] uploadWithURLRequest:request data:data completionHandler:completionHandler];
+ [self sdl_sendUploadRequest:request withData:data completionHandler:completionHandler];
}
/**
@@ -649,9 +658,26 @@ const int POLICIES_CORRELATION_ID = 65535;
[SDLDebugTool logInfo:logMessage withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:self.debugConsoleGroupName];
// Create the upload task
- [[SDLURLSession defaultSession] uploadWithURLRequest:request data:bodyData completionHandler:completionHandler];
+ [self sdl_sendUploadRequest:request withData:bodyData completionHandler:completionHandler];
}
+- (void)sdl_sendUploadRequest:(NSURLRequest*)request withData:(NSData*)data completionHandler:(URLSessionTaskCompletionHandler)completionHandler {
+ NSMutableURLRequest* mutableRequest = [request mutableCopy];
+
+ if ([mutableRequest.URL.scheme isEqualToString:@"http"]) {
+ mutableRequest.URL = [NSURL URLWithString:[mutableRequest.URL.absoluteString stringByReplacingCharactersInRange:NSMakeRange(0, 4) withString:@"https"]];
+ }
+
+ [[self.urlSession uploadTaskWithRequest:request fromData:data completionHandler:completionHandler] resume];
+}
+
+- (void)sdl_sendDataTaskWithURL:(NSURL*)url completionHandler:(URLSessionTaskCompletionHandler)completionHandler {
+ if ([url.scheme isEqualToString:@"http"]) {
+ url = [NSURL URLWithString:[url.absoluteString stringByReplacingCharactersInRange:NSMakeRange(0, 4) withString:@"https"]];
+ }
+
+ [[self.urlSession dataTaskWithURL:url completionHandler:completionHandler] resume];
+}
#pragma mark - Delegate management
@@ -704,11 +730,11 @@ const int POLICIES_CORRELATION_ID = 65535;
}
// Send the HTTP Request
- [[SDLURLSession defaultSession] uploadWithURLRequest:request
- data:data
- completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
+ [[self.urlSession uploadTaskWithRequest:request
+ fromData:data
+ completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
[self syncPDataNetworkRequestCompleteWithData:data response:response error:error];
- }];
+ }] resume];
[SDLDebugTool logInfo:@"OnEncodedSyncPData (HTTP request)" withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:self.debugConsoleGroupName];
}
diff --git a/SmartDeviceLink/SDLURLRequestTask.h b/SmartDeviceLink/SDLURLRequestTask.h
deleted file mode 100644
index 8745f8519..000000000
--- a/SmartDeviceLink/SDLURLRequestTask.h
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// SDLURLRequestTask.h
-// SmartDeviceLink-iOS
-//
-// Created by Joel Fischer on 8/17/15.
-// Copyright (c) 2015 smartdevicelink. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-@class SDLURLRequestTask;
-@class SDLURLSession;
-
-
-typedef void (^SDLURLConnectionRequestCompletionHandler)(NSData *__nullable data, NSURLResponse *__nullable response, NSError *__nullable error);
-
-typedef NS_ENUM(NSUInteger, SDLURLRequestTaskState) {
- SDLURLRequestTaskStateRunning,
- SDLURLRequestTaskStateCompleted
-};
-
-
-NS_ASSUME_NONNULL_BEGIN
-
-@protocol SDLURLRequestTaskDelegate <NSObject>
-
-- (void)taskDidFinish:(SDLURLRequestTask *)task;
-
-@end
-
-
-@interface SDLURLRequestTask : NSObject
-
-@property (weak, nonatomic) id<SDLURLRequestTaskDelegate> delegate;
-@property (assign, nonatomic) SDLURLRequestTaskState state;
-
-- (instancetype)init NS_UNAVAILABLE;
-- (instancetype)initWithURLRequest:(NSURLRequest *)request completionHandler:(SDLURLConnectionRequestCompletionHandler)completionHandler NS_DESIGNATED_INITIALIZER;
-
-+ (instancetype)taskWithURLRequest:(NSURLRequest *)request completionHandler:(SDLURLConnectionRequestCompletionHandler)completionHandler;
-
-- (void)cancel;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLURLRequestTask.m b/SmartDeviceLink/SDLURLRequestTask.m
deleted file mode 100644
index d1895ac10..000000000
--- a/SmartDeviceLink/SDLURLRequestTask.m
+++ /dev/null
@@ -1,110 +0,0 @@
-//
-// SDLURLRequestTask.m
-// SmartDeviceLink-iOS
-//
-// Created by Joel Fischer on 8/17/15.
-// Copyright (c) 2015 smartdevicelink. All rights reserved.
-//
-
-#import "SDLURLRequestTask.h"
-
-#import "SDLURLSession.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface SDLURLRequestTask () <NSURLConnectionDelegate, NSURLConnectionDataDelegate>
-
-@property (strong, nonatomic) NSURLConnection *connection;
-@property (strong, nonatomic, nullable) NSURLResponse *response;
-@property (copy, nonatomic) SDLURLConnectionRequestCompletionHandler completionHandler;
-@property (strong, nonatomic) NSMutableData *mutableData;
-
-@end
-
-
-@implementation SDLURLRequestTask
-
-#pragma mark - Lifecycle
-
-- (instancetype)init {
- NSAssert(NO, @"use initWithURLRequest:completionHandler instead");
- return nil;
-}
-
-- (instancetype)initWithURLRequest:(NSURLRequest *)request completionHandler:(SDLURLConnectionRequestCompletionHandler)completionHandler {
- self = [super init];
- if (!self) {
- return nil;
- }
-
- _connection = [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:NO];
- [_connection scheduleInRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode];
- [_connection start];
-
- _completionHandler = completionHandler;
-
- _mutableData = [NSMutableData data];
- _response = nil;
- _state = SDLURLRequestTaskStateRunning;
-
- return self;
-}
-
-+ (instancetype)taskWithURLRequest:(NSURLRequest *)request completionHandler:(SDLURLConnectionRequestCompletionHandler)completionHandler {
- return [[self alloc] initWithURLRequest:request completionHandler:completionHandler];
-}
-
-- (void)dealloc {
- [_connection cancel];
-}
-
-
-#pragma mark - Data Methods
-
-- (void)sdl_addData:(NSData *)data {
- [self.mutableData appendData:data];
-}
-
-
-#pragma mark - Cancel
-
-- (void)cancel {
- [self.connection cancel];
- [self connection:self.connection didFailWithError:[NSError errorWithDomain:NSURLErrorDomain code:kCFURLErrorCancelled userInfo:nil]];
-}
-
-
-#pragma mark - NSURLConnectionDelegate
-
-- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error {
- dispatch_async(dispatch_get_main_queue(), ^{
- self.completionHandler(nil, self.response, error);
-
- self.state = SDLURLRequestTaskStateCompleted;
- [self.delegate taskDidFinish:self];
- });
-}
-
-
-#pragma mark - NSURLConnectionDataDelegate
-
-- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
- [self sdl_addData:data];
-}
-
-- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response {
- self.response = response;
-}
-
-- (void)connectionDidFinishLoading:(NSURLConnection *)connection {
- dispatch_async(dispatch_get_main_queue(), ^{
- self.completionHandler([self.mutableData copy], self.response, nil);
-
- self.state = SDLURLRequestTaskStateCompleted;
- [self.delegate taskDidFinish:self];
- });
-}
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLURLSession.h b/SmartDeviceLink/SDLURLSession.h
deleted file mode 100644
index 0d2a22e28..000000000
--- a/SmartDeviceLink/SDLURLSession.h
+++ /dev/null
@@ -1,57 +0,0 @@
-//
-// SDLURLConnection.h
-// SmartDeviceLink-iOS
-//
-// Created by Joel Fischer on 8/17/15.
-// Copyright (c) 2015 smartdevicelink. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-
-typedef void (^SDLURLConnectionRequestCompletionHandler)(NSData *__nullable data, NSURLResponse *__nullable response, NSError *__nullable error);
-
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface SDLURLSession : NSObject
-
-@property (assign, nonatomic) NSURLRequestCachePolicy cachePolicy;
-
-/**
- * If any task is started with a request that is at the default timeout (60.0 sec), it will be altered to this connection timeout (by default 45.0 sec).
- */
-@property (assign, nonatomic) NSTimeInterval connectionTimeout;
-
-/**
- * Get the default session, a singleton.
- *
- * @return The default session
- */
-+ (instancetype)defaultSession;
-
-/**
- * Retrieves data from a specified URL. Default settings for timeout and cache policy will be used.
- *
- * @param url An NSURLRequest will be assembled for this URL
- * @param completionHandler The completion handler that will be called when the request is complete
- */
-- (void)dataFromURL:(NSURL *)url completionHandler:(SDLURLConnectionRequestCompletionHandler)completionHandler;
-
-/**
- * Starts a URL request using data supplied.
- *
- * @param request An NSURLRequest that provides the URL, cache policy, request method, etc. The HTTPBody data in this request will be ignored
- * @param data The data to be uploaded over HTTP
- * @param completionHandler The completion handler that will be called when the request is complete
- */
-- (void)uploadWithURLRequest:(NSURLRequest *)request data:(NSData *)data completionHandler:(SDLURLConnectionRequestCompletionHandler)completionHandler;
-
-/**
- * Tells all pending requests to cancel
- */
-- (void)cancelAllTasks;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLURLSession.m b/SmartDeviceLink/SDLURLSession.m
deleted file mode 100644
index 373ce7d44..000000000
--- a/SmartDeviceLink/SDLURLSession.m
+++ /dev/null
@@ -1,113 +0,0 @@
-//
-// SDLURLConnection.m
-// SmartDeviceLink-iOS
-//
-// Created by Joel Fischer on 8/17/15.
-// Copyright (c) 2015 smartdevicelink. All rights reserved.
-//
-
-#import "SDLURLSession.h"
-
-#import "SDLURLRequestTask.h"
-
-
-NS_ASSUME_NONNULL_BEGIN
-
-static float DefaultConnectionTimeout = 45.0;
-
-
-@interface SDLURLSession () <SDLURLRequestTaskDelegate>
-
-@property (strong, nonatomic) NSMutableSet<SDLURLRequestTask *> *activeTasks;
-
-@end
-
-
-@implementation SDLURLSession
-
-
-#pragma mark - Lifecycle
-
-+ (instancetype)defaultSession {
- static SDLURLSession *sharedSession = nil;
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- sharedSession = [[self alloc] init];
- });
-
- return sharedSession;
-}
-
-- (void)dealloc {
- for (SDLURLRequestTask *task in self.activeTasks) {
- [task cancel];
- }
-}
-
-- (instancetype)init {
- self = [super init];
- if (!self) {
- return nil;
- }
-
- _cachePolicy = NSURLRequestUseProtocolCachePolicy;
- _connectionTimeout = DefaultConnectionTimeout;
-
- _activeTasks = [NSMutableSet set];
-
- return self;
-}
-
-
-#pragma mark - URL Request Methods
-
-- (void)dataFromURL:(NSURL *)url completionHandler:(SDLURLConnectionRequestCompletionHandler)completionHandler {
- // Apple no longer allows HTTP URLs without a special exception as of Jan. 2017
- if ([url.scheme isEqualToString:@"http"]) {
- url = [NSURL URLWithString:[url.absoluteString stringByReplacingCharactersInRange:NSMakeRange(0, 4) withString:@"https"]];
- }
-
- NSURLRequest *request = [NSURLRequest requestWithURL:url cachePolicy:self.cachePolicy timeoutInterval:self.connectionTimeout];
-
- SDLURLRequestTask *task = [[SDLURLRequestTask alloc] initWithURLRequest:request completionHandler:completionHandler];
- task.delegate = self;
-
- [self.activeTasks addObject:task];
-}
-
-- (void)uploadWithURLRequest:(NSURLRequest *)request data:(NSData *)data completionHandler:(SDLURLConnectionRequestCompletionHandler)completionHandler {
- NSURL *url = request.URL;
- if ([url.scheme isEqualToString:@"http"]) {
- url = [NSURL URLWithString:[url.absoluteString stringByReplacingCharactersInRange:NSMakeRange(0, 4) withString:@"https"]];
- }
-
- NSMutableURLRequest *mutableRequest = [request mutableCopy];
- mutableRequest.URL = url;
- mutableRequest.HTTPBody = data;
- mutableRequest.HTTPMethod = @"POST";
-
- SDLURLRequestTask *task = [[SDLURLRequestTask alloc] initWithURLRequest:mutableRequest completionHandler:completionHandler];
- task.delegate = self;
-
- [self.activeTasks addObject:task];
-}
-
-
-#pragma mark - Cancel Methods
-
-- (void)cancelAllTasks {
- for (SDLURLRequestTask *task in self.activeTasks) {
- [task cancel];
- }
-}
-
-
-#pragma mark - SDLURLRequestTaskDelegate
-
-- (void)taskDidFinish:(SDLURLRequestTask *)task {
- [self.activeTasks removeObject:task];
-}
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/iOS 7 Assets/lock_arrow_down/white/lock_arrow_down_white.png b/SmartDeviceLink/iOS 7 Assets/lock_arrow_down/white/lock_arrow_down_white.png
deleted file mode 100644
index 07e620d05..000000000
--- a/SmartDeviceLink/iOS 7 Assets/lock_arrow_down/white/lock_arrow_down_white.png
+++ /dev/null
Binary files differ
diff --git a/SmartDeviceLink/iOS 7 Assets/lock_arrow_down/white/lock_arrow_down_white@2x.png b/SmartDeviceLink/iOS 7 Assets/lock_arrow_down/white/lock_arrow_down_white@2x.png
deleted file mode 100644
index 57fa8120f..000000000
--- a/SmartDeviceLink/iOS 7 Assets/lock_arrow_down/white/lock_arrow_down_white@2x.png
+++ /dev/null
Binary files differ
diff --git a/SmartDeviceLink/iOS 7 Assets/lock_arrow_down/white/lock_arrow_down_white@3x.png b/SmartDeviceLink/iOS 7 Assets/lock_arrow_down/white/lock_arrow_down_white@3x.png
deleted file mode 100644
index b354c1a13..000000000
--- a/SmartDeviceLink/iOS 7 Assets/lock_arrow_down/white/lock_arrow_down_white@3x.png
+++ /dev/null
Binary files differ
diff --git a/SmartDeviceLinkTests/Info.plist b/SmartDeviceLinkTests/Info.plist
index ba72822e8..7c292c70a 100644
--- a/SmartDeviceLinkTests/Info.plist
+++ b/SmartDeviceLinkTests/Info.plist
@@ -9,7 +9,7 @@
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
+ <string>7.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
diff --git a/SmartDeviceLinkTests/UtilitiesSpecs/HTTP Connection/SDLURLRequestTaskSpec.m b/SmartDeviceLinkTests/UtilitiesSpecs/HTTP Connection/SDLURLRequestTaskSpec.m
deleted file mode 100644
index d78ff0c7f..000000000
--- a/SmartDeviceLinkTests/UtilitiesSpecs/HTTP Connection/SDLURLRequestTaskSpec.m
+++ /dev/null
@@ -1,140 +0,0 @@
-#import <Quick/Quick.h>
-#import <Nimble/Nimble.h>
-#import <OHHTTPStubs/OHHTTPStubs.h>
-
-#import "SDLURLRequestTask.h"
-
-
-QuickSpecBegin(SDLURLRequestTaskSpec)
-
-describe(@"a url request task", ^{
- __block SDLURLRequestTask *testTask = nil;
-
- describe(@"when the server returns correct data", ^{
- NSData *testData = [@"someData" dataUsingEncoding:NSUTF8StringEncoding];
-
- __block NSData *testReturnData = nil;
- __block NSURLResponse *testReturnResponse = nil;
- __block NSError *testReturnError = nil;
-
- beforeEach(^{
- [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) {
- return [request.URL.host isEqualToString:@"www.faketest.com"];
- } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) {
- return [[OHHTTPStubsResponse responseWithData:testData statusCode:200 headers:nil] requestTime:0.5 responseTime:0];
- }];
-
- NSURLRequest *someURLRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.faketest.com"]];
-
- testTask = [[SDLURLRequestTask alloc] initWithURLRequest:someURLRequest completionHandler:^void(NSData *data, NSURLResponse *response, NSError *error) {
- testReturnData = data;
- testReturnResponse = response;
- testReturnError = error;
- }];
- });
-
- afterEach(^{
- testTask = nil;
- [OHHTTPStubs removeAllStubs];
- });
-
- it(@"should return data", ^{
- expect(testReturnData).toEventually(equal(testData));
- });
-
- it(@"should return a response", ^{
- expect(testReturnResponse).toEventuallyNot(beNil());
- });
-
- it(@"should not return an error", ^{
- expect(testReturnError).toEventually(beNil());
- });
- });
-
- describe(@"when the connection fails because there is no internet", ^{
- NSError *someNetworkError = [NSError errorWithDomain:NSURLErrorDomain code:kCFURLErrorNotConnectedToInternet userInfo:nil];
-
- __block NSData *testReturnData = nil;
- __block NSURLResponse *testReturnResponse = nil;
- __block NSError *testReturnError = nil;
-
- beforeEach(^{
- [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) {
- return [request.URL.host isEqualToString:@"www.faketest.com"];
- } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) {
- return [OHHTTPStubsResponse responseWithError:someNetworkError];
- }];
-
- NSURLRequest *someURLRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.faketest.com"]];
-
- testTask = [[SDLURLRequestTask alloc] initWithURLRequest:someURLRequest completionHandler:^void(NSData *data, NSURLResponse *response, NSError *error) {
- testReturnData = data;
- testReturnResponse = response;
- testReturnError = error;
- }];
- });
-
- afterEach(^{
- testTask = nil;
- [OHHTTPStubs removeAllStubs];
- });
-
- it(@"should return nil data", ^{
- expect(testReturnData).toEventually(beNil());
- });
-
- it(@"should return a nil response", ^{
- expect(testReturnResponse).toEventually(beNil());
- });
-
- it(@"should return an error", ^{
- expect(@(testReturnError.code)).toEventually(equal(@(someNetworkError.code)));
- });
- });
-
- describe(@"when the connection fails because it was cancelled", ^{
- NSData *testData = [@"testData" dataUsingEncoding:NSUTF8StringEncoding];
-
- __block NSData *testReturnData = nil;
- __block NSURLResponse *testReturnResponse = nil;
- __block NSError *testReturnError = nil;
-
- beforeEach(^{
- [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) {
- return [request.URL.host isEqualToString:@"www.faketest.com"];
- } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) {
- return [[OHHTTPStubsResponse responseWithData:testData statusCode:200 headers:nil] requestTime:0.25 responseTime:0.25];
- }];
-
- NSURLRequest *someURLRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.faketest.com"]];
-
-
- testTask = [[SDLURLRequestTask alloc] initWithURLRequest:someURLRequest completionHandler:^void(NSData *data, NSURLResponse *response, NSError *error) {
- testReturnData = data;
- testReturnResponse = response;
- testReturnError = error;
- }];
-
- [testTask cancel];
- });
-
- afterEach(^{
- testTask = nil;
- [OHHTTPStubs removeAllStubs];
- });
-
- it(@"should return nil data", ^{
- expect(testReturnData).toEventually(beNil());
- });
-
- it(@"should return a nil response", ^{
- expect(testReturnResponse).toEventually(beNil());
- });
-
- it(@"should return an error", ^{
- expect(@(testReturnError.code)).toEventually(equal(@(kCFURLErrorCancelled)));
- });
- });
-});
-
-QuickSpecEnd
diff --git a/SmartDeviceLinkTests/UtilitiesSpecs/HTTP Connection/SDLURLSessionSpec.m b/SmartDeviceLinkTests/UtilitiesSpecs/HTTP Connection/SDLURLSessionSpec.m
deleted file mode 100644
index 73d12e6aa..000000000
--- a/SmartDeviceLinkTests/UtilitiesSpecs/HTTP Connection/SDLURLSessionSpec.m
+++ /dev/null
@@ -1,201 +0,0 @@
-#import <Quick/Quick.h>
-#import <Nimble/Nimble.h>
-#import <OHHTTPStubs/OHHTTPStubs.h>
-
-#import "SDLURLSession.h"
-
-QuickSpecBegin(SDLURLSessionSpec)
-
-describe(@"the url session", ^{
- __block SDLURLSession *testSession = nil;
-
- describe(@"attempting to get good data", ^{
- context(@"from an https address", ^{
- context(@"uploading data", ^{
- NSData *testData = [@"testData" dataUsingEncoding:NSUTF8StringEncoding];
- NSArray<NSString *> *someJSONObject = @[@"one", @"two"];
- NSData *testJSONData = [NSJSONSerialization dataWithJSONObject:someJSONObject options:0 error:nil];
-
- __block NSData *testReturnData = nil;
- __block NSURLResponse *testReturnResponse = nil;
- __block NSError *testReturnError = nil;
- __block NSArray<id> *testReturnJSONObject = nil;
-
- beforeEach(^{
- [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) {
- if ([request.URL.host isEqualToString:@"www.faketest.com"]) {
- testReturnJSONObject = [NSJSONSerialization JSONObjectWithData:request.HTTPBody options:0 error:nil];
- return YES;
- }
-
- return NO;
- } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) {
- return [[OHHTTPStubsResponse responseWithData:testData statusCode:200 headers:nil] requestTime:0.5 responseTime:0];
- }];
-
- testSession = [[SDLURLSession alloc] init];
- NSURLRequest *someURLRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://www.faketest.com"]];
-
- [testSession uploadWithURLRequest:someURLRequest data:testJSONData completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
- testReturnData = data;
- testReturnResponse = response;
- testReturnError = error;
- }];
- });
-
- afterEach(^{
- testSession = nil;
- [OHHTTPStubs removeAllStubs];
- });
-
- it(@"should have correct data", ^{
- expect(testReturnJSONObject).toEventually(equal(someJSONObject));
- expect(testReturnData).toEventually(equal(testData));
- expect(testReturnResponse).toEventuallyNot(beNil());
- expect(testReturnError).toEventually(beNil());
- });
- });
-
- context(@"downloading data", ^{
- NSData *testData = [@"someData" dataUsingEncoding:NSUTF8StringEncoding];
-
- __block NSData *testReturnData = nil;
- __block NSURLResponse *testReturnResponse = nil;
- __block NSError *testReturnError = nil;
-
- beforeEach(^{
- [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) {
- return [request.URL.host isEqualToString:@"www.faketest.com"];
- } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) {
- return [[OHHTTPStubsResponse responseWithData:testData statusCode:200 headers:nil] requestTime:0.5 responseTime:0];
- }];
-
- testSession = [[SDLURLSession alloc] init];
- [testSession dataFromURL:[NSURL URLWithString:@"https://www.faketest.com"] completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
- testReturnData = data;
- testReturnResponse = response;
- testReturnError = error;
- }];
- });
-
- afterEach(^{
- testSession = nil;
- [OHHTTPStubs removeAllStubs];
- });
-
- it(@"should return correct info", ^{
- expect(testReturnData).toEventually(equal(testData));
- expect(testReturnResponse).toEventuallyNot(beNil());
- expect(testReturnError).toEventually(beNil());
- });
- });
- });
-
- context(@"from an http address", ^{
- NSData *testData = [@"testData" dataUsingEncoding:NSUTF8StringEncoding];
- NSArray<NSString *> *someJSONObject = @[@"one", @"two"];
- NSData *testJSONData = [NSJSONSerialization dataWithJSONObject:someJSONObject options:0 error:nil];
-
- __block NSString *testURLRequestComponent = nil;
-
- beforeEach(^{
- [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) {
- if ([request.URL.host isEqualToString:@"www.faketest.com"]) {
- testURLRequestComponent = request.URL.scheme;
- return YES;
- }
-
- return NO;
- } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) {
- return [[OHHTTPStubsResponse responseWithData:testData statusCode:200 headers:request.allHTTPHeaderFields] requestTime:0.5 responseTime:0];
- }];
-
- testSession = [[SDLURLSession alloc] init];
- NSURLRequest *someURLRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.faketest.com"]];
-
- [testSession uploadWithURLRequest:someURLRequest data:testJSONData completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {}];
- });
-
- afterEach(^{
- testSession = nil;
- [OHHTTPStubs removeAllStubs];
- });
-
- it(@"should have called the HTTPS URL instead", ^{
- expect(testURLRequestComponent).toEventually(match(@"https"));
- });
- });
- });
-
- describe(@"when the connection fails because there is no internet", ^{
- NSError *someNetworkError = [NSError errorWithDomain:NSURLErrorDomain code:kCFURLErrorNotConnectedToInternet userInfo:nil];
-
- __block NSData *testReturnData = nil;
- __block NSURLResponse *testReturnResponse = nil;
- __block NSError *testReturnError = nil;
-
- beforeEach(^{
- [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) {
- return [request.URL.host isEqualToString:@"www.faketest.com"];
- } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) {
- return [OHHTTPStubsResponse responseWithError:someNetworkError];
- }];
-
- testSession = [[SDLURLSession alloc] init];
- [testSession dataFromURL:[NSURL URLWithString:@"http://www.faketest.com"] completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
- testReturnData = data;
- testReturnResponse = response;
- testReturnError = error;
- }];
- });
-
- afterEach(^{
- testSession = nil;
- [OHHTTPStubs removeAllStubs];
- });
-
- it(@"should return nil data", ^{
- expect(testReturnData).toEventually(beNil());
- expect(testReturnResponse).toEventually(beNil());
- expect(@(testReturnError.code)).toEventually(equal(@(someNetworkError.code)));
- });
- });
-
- describe(@"when the connection fails because it was cancelled", ^{
- NSData *testData = [@"testData" dataUsingEncoding:NSUTF8StringEncoding];
-
- __block NSData *testReturnData = nil;
- __block NSURLResponse *testReturnResponse = nil;
- __block NSError *testReturnError = nil;
-
- beforeEach(^{
- [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) {
- return [request.URL.host isEqualToString:@"www.faketest.com"];
- } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) {
- return [[OHHTTPStubsResponse responseWithData:testData statusCode:200 headers:nil] requestTime:0.25 responseTime:0.25];
- }];
-
- testSession = [[SDLURLSession alloc] init];
- [testSession dataFromURL:[NSURL URLWithString:@"http://www.faketest.com"] completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
- testReturnData = data;
- testReturnResponse = response;
- testReturnError = error;
- }];
-
- [testSession cancelAllTasks];
- });
-
- afterEach(^{
- testSession = nil;
- [OHHTTPStubs removeAllStubs];
- });
-
- it(@"should return nil data", ^{
- expect(testReturnData).toEventually(beNil());
- expect(testReturnResponse).toEventually(beNil());
- expect(@(testReturnError.code)).toEventually(equal(@(kCFURLErrorCancelled)));
- });
- });
-});
-
-QuickSpecEnd
diff --git a/SmartDeviceLink_Example/Info.plist b/SmartDeviceLink_Example/Info.plist
index 9a5a675b4..7191e361c 100644
--- a/SmartDeviceLink_Example/Info.plist
+++ b/SmartDeviceLink_Example/Info.plist
@@ -9,7 +9,7 @@
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
+ <string>7.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>