summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicoleYarroch <nicole@livio.io>2018-05-15 10:27:11 -0400
committerNicoleYarroch <nicole@livio.io>2018-05-15 10:27:11 -0400
commit5fdbabc6a8a8fef696a963b350dc590f3eea0932 (patch)
treebb3a6191eb58f9a9e6839c6ad11a1b1e29716e39
parentd67e67b7c8857978f2167445b93ca1e7e2e68b8f (diff)
downloadsdl_ios-5fdbabc6a8a8fef696a963b350dc590f3eea0932.tar.gz
Cleaned up submanagers in example apps
Signed-off-by: NicoleYarroch <nicole@livio.io>
-rw-r--r--SmartDeviceLink-iOS.xcodeproj/project.pbxproj14
-rw-r--r--SmartDeviceLink_Example/ButtonManager.h1
-rw-r--r--SmartDeviceLink_Example/ButtonManager.m6
-rw-r--r--SmartDeviceLink_Example/ButtonManager.swift6
-rw-r--r--SmartDeviceLink_Example/Classes/ProxyManager.m8
-rw-r--r--SmartDeviceLink_Example/Enum+SDLAudioRecordingState.swift15
-rw-r--r--SmartDeviceLink_Example/ProxyManager.swift7
-rw-r--r--SmartDeviceLink_Example/VehicleDataManager.h1
-rw-r--r--SmartDeviceLink_Example/VehicleDataManager.m6
-rw-r--r--SmartDeviceLink_Example/VehicleDataManager.swift4
10 files changed, 7 insertions, 61 deletions
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
index ca9aad646..95b662b6c 100644
--- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
+++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
@@ -966,10 +966,10 @@
5DA49CE61F1EA83300E65FC5 /* SDLControlFramePayloadRPCStartService.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DA49CE41F1EA83300E65FC5 /* SDLControlFramePayloadRPCStartService.m */; };
5DA8A0E91E955F710039C50D /* SDLStreamingMediaManagerConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = DA8966F31E56977C00413EAB /* SDLStreamingMediaManagerConstants.m */; };
5DA8A0EA1E955FE00039C50D /* SDLLogModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DBF06301E64A9C600A5CF03 /* SDLLogModel.m */; };
- 5DAB5F562098E5D100A020C8 /* SDLProtocolConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DAB5F542098E5D100A020C8 /* SDLProtocolConstants.h */; };
- 5DAB5F572098E5D100A020C8 /* SDLProtocolConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DAB5F552098E5D100A020C8 /* SDLProtocolConstants.m */; };
5DAB5F512098994C00A020C8 /* SDLMenuCellSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DAB5F502098994C00A020C8 /* SDLMenuCellSpec.m */; };
5DAB5F5320989A8300A020C8 /* SDLVoiceCommandSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DAB5F5220989A8300A020C8 /* SDLVoiceCommandSpec.m */; };
+ 5DAB5F562098E5D100A020C8 /* SDLProtocolConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DAB5F542098E5D100A020C8 /* SDLProtocolConstants.h */; };
+ 5DAB5F572098E5D100A020C8 /* SDLProtocolConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DAB5F552098E5D100A020C8 /* SDLProtocolConstants.m */; };
5DAD5F7F204DEDEB0025624C /* SDLScreenManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DAD5F7D204DEDEB0025624C /* SDLScreenManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
5DAD5F80204DEDEB0025624C /* SDLScreenManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DAD5F7E204DEDEB0025624C /* SDLScreenManager.m */; };
5DAD5F8520507E1F0025624C /* SDLScreenManagerSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DAD5F8420507E1F0025624C /* SDLScreenManagerSpec.m */; };
@@ -1059,7 +1059,6 @@
5DF40B28208FDA9700DD6FDA /* SDLVoiceCommandManagerSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DF40B27208FDA9700DD6FDA /* SDLVoiceCommandManagerSpec.m */; };
5DFFB9151BD7C89700DB3F04 /* SDLConnectionManagerType.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DFFB9141BD7C89700DB3F04 /* SDLConnectionManagerType.h */; };
8800871E20A6356D008E1EA0 /* ButtonManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8800871B20A6338C008E1EA0 /* ButtonManager.m */; };
- 8803A0AA208E281E009FDC02 /* Enum+SDLAudioRecordingState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8803A0A7208E27E6009FDC02 /* Enum+SDLAudioRecordingState.swift */; };
8803A0AF208E2A3A009FDC02 /* AudioManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8803A0AC208E2907009FDC02 /* AudioManager.m */; };
8803A0B2208E7CA4009FDC02 /* VehicleDataManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8803A0B1208E7CA4009FDC02 /* VehicleDataManager.m */; };
880E35B42088F75A00181259 /* SDLSystemCapabilityManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 880E35B22088F75A00181259 /* SDLSystemCapabilityManager.m */; };
@@ -2295,10 +2294,10 @@
5DA3F36F1BC4489A0026F2D0 /* SDLManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLManager.m; sourceTree = "<group>"; };
5DA49CE31F1EA83300E65FC5 /* SDLControlFramePayloadRPCStartService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLControlFramePayloadRPCStartService.h; sourceTree = "<group>"; };
5DA49CE41F1EA83300E65FC5 /* SDLControlFramePayloadRPCStartService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLControlFramePayloadRPCStartService.m; sourceTree = "<group>"; };
- 5DAB5F542098E5D100A020C8 /* SDLProtocolConstants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLProtocolConstants.h; sourceTree = "<group>"; };
- 5DAB5F552098E5D100A020C8 /* SDLProtocolConstants.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLProtocolConstants.m; sourceTree = "<group>"; };
5DAB5F502098994C00A020C8 /* SDLMenuCellSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SDLMenuCellSpec.m; path = DevAPISpecs/SDLMenuCellSpec.m; sourceTree = "<group>"; };
5DAB5F5220989A8300A020C8 /* SDLVoiceCommandSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SDLVoiceCommandSpec.m; path = DevAPISpecs/SDLVoiceCommandSpec.m; sourceTree = "<group>"; };
+ 5DAB5F542098E5D100A020C8 /* SDLProtocolConstants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLProtocolConstants.h; sourceTree = "<group>"; };
+ 5DAB5F552098E5D100A020C8 /* SDLProtocolConstants.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLProtocolConstants.m; sourceTree = "<group>"; };
5DAD5F7D204DEDEB0025624C /* SDLScreenManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLScreenManager.h; sourceTree = "<group>"; };
5DAD5F7E204DEDEB0025624C /* SDLScreenManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLScreenManager.m; sourceTree = "<group>"; };
5DAD5F8420507E1F0025624C /* SDLScreenManagerSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLScreenManagerSpec.m; sourceTree = "<group>"; };
@@ -2399,7 +2398,6 @@
5DFFB9141BD7C89700DB3F04 /* SDLConnectionManagerType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLConnectionManagerType.h; sourceTree = "<group>"; };
8800871A20A6338C008E1EA0 /* ButtonManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ButtonManager.h; sourceTree = "<group>"; };
8800871B20A6338C008E1EA0 /* ButtonManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ButtonManager.m; sourceTree = "<group>"; };
- 8803A0A7208E27E6009FDC02 /* Enum+SDLAudioRecordingState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Enum+SDLAudioRecordingState.swift"; sourceTree = "<group>"; };
8803A0AB208E2907009FDC02 /* AudioManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AudioManager.h; sourceTree = "<group>"; };
8803A0AC208E2907009FDC02 /* AudioManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AudioManager.m; sourceTree = "<group>"; };
8803A0B0208E7CA4009FDC02 /* VehicleDataManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VehicleDataManager.h; sourceTree = "<group>"; };
@@ -4514,7 +4512,7 @@
name = TCP;
sourceTree = "<group>";
};
- 5DAD5F8120507DE40025624C /* Show */ = {
+ 5DAD5F8120507DE40025624C /* Screen */ = {
isa = PBXGroup;
children = (
5DF40B24208FA7C500DD6FDA /* Menu */,
@@ -4932,7 +4930,6 @@
88A0AA55207CFE5C0075132C /* AppUserDefaults.swift */,
885D259A207D107A00BD6EE7 /* Enum+SDLProxyState.swift */,
8863B59E207D4308002D6459 /* Enum+SDLConnectionType.swift */,
- 8803A0A7208E27E6009FDC02 /* Enum+SDLAudioRecordingState.swift */,
88DFB051207F8DF50079D19D /* Protocol+ProxyManagerDelegate.swift */,
);
name = Utilities;
@@ -6511,7 +6508,6 @@
88DFB055207F96EE0079D19D /* AlertManager.swift in Sources */,
888D178F207E7F42008E9F8F /* ButtonManager.swift in Sources */,
88A0AA5E207CFE740075132C /* ConnectionTCPTableViewController.swift in Sources */,
- 8803A0AA208E281E009FDC02 /* Enum+SDLAudioRecordingState.swift in Sources */,
885D259C207D111200BD6EE7 /* Enum+SDLProxyState.swift in Sources */,
88DFB053207F8E100079D19D /* Protocol+ProxyManagerDelegate.swift in Sources */,
88B849C820812442002A034D /* VehicleDataManager.swift in Sources */,
diff --git a/SmartDeviceLink_Example/ButtonManager.h b/SmartDeviceLink_Example/ButtonManager.h
index 71ab38f87..867f50c7c 100644
--- a/SmartDeviceLink_Example/ButtonManager.h
+++ b/SmartDeviceLink_Example/ButtonManager.h
@@ -23,7 +23,6 @@ typedef void(^RefreshUIHandler)(void);
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithManager:(SDLManager *)manager refreshUIHandler:(RefreshUIHandler)refreshUIHandler;
-- (void)stopManager;
- (NSArray<SDLSoftButtonObject *> *)allScreenSoftButtons;
diff --git a/SmartDeviceLink_Example/ButtonManager.m b/SmartDeviceLink_Example/ButtonManager.m
index 1e163db56..1e7623be0 100644
--- a/SmartDeviceLink_Example/ButtonManager.m
+++ b/SmartDeviceLink_Example/ButtonManager.m
@@ -42,12 +42,6 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
-- (void)stopManager {
- _textEnabled = YES;
- _imagesEnabled = YES;
- _toggleEnabled = YES;
-}
-
#pragma mark - Setters
- (void)setTextEnabled:(BOOL)textEnabled {
diff --git a/SmartDeviceLink_Example/ButtonManager.swift b/SmartDeviceLink_Example/ButtonManager.swift
index 7994e95b3..a09ffcd01 100644
--- a/SmartDeviceLink_Example/ButtonManager.swift
+++ b/SmartDeviceLink_Example/ButtonManager.swift
@@ -50,12 +50,6 @@ class ButtonManager: NSObject {
super.init()
}
- func stopManager() {
- textEnabled = true
- imagesEnabled = true
- toggleEnabled = true
- }
-
/// Creates and returns an array of all soft buttons for the UI
///
/// - Parameter manager: The SDL Manager
diff --git a/SmartDeviceLink_Example/Classes/ProxyManager.m b/SmartDeviceLink_Example/Classes/ProxyManager.m
index df7ddf0de..0af6d0b12 100644
--- a/SmartDeviceLink_Example/Classes/ProxyManager.m
+++ b/SmartDeviceLink_Example/Classes/ProxyManager.m
@@ -138,10 +138,9 @@ NS_ASSUME_NONNULL_BEGIN
+ (SDLLogConfiguration *)sdlex_logConfiguration {
SDLLogConfiguration *logConfig = [SDLLogConfiguration debugConfiguration];
- SDLLogFileModule *sdlExampleModule = [SDLLogFileModule moduleWithName:@"SDL Example" files:[NSSet setWithArray:@[@"ProxyManager"]]];
+ SDLLogFileModule *sdlExampleModule = [SDLLogFileModule moduleWithName:@"SDL Obj-C Example App" files:[NSSet setWithArray:@[@"ProxyManager", @"AudioManager", @"VehicleDataManager", @"AlertManager", @"RPCPermissionsManager", @"ButtonManager"]]];
logConfig.modules = [logConfig.modules setByAddingObject:sdlExampleModule];
logConfig.targets = [logConfig.targets setByAddingObject:[SDLLogTargetFile logger]];
- // logConfig.filters = [logConfig.filters setByAddingObject:[SDLLogFilter filterByAllowingModules:[NSSet setWithObject:@"Transport"]]];
logConfig.globalLogLevel = SDLLogLevelVerbose;
return logConfig;
@@ -305,11 +304,6 @@ static UInt32 choiceSetId = 100;
[self sdlex_updateProxyState:ProxyStateStopped];
self.firstHMILevel = SDLHMILevelNone;
- if (self.vehicleDataManager != nil && self.buttonManager != nil) {
- [self.vehicleDataManager stopManager];
- [self.buttonManager stopManager];
- }
-
// If desired, automatically start searching for a new connection to Core
if (ExampleAppShouldRestartSDLManagerOnDisconnect) {
[self startManager];
diff --git a/SmartDeviceLink_Example/Enum+SDLAudioRecordingState.swift b/SmartDeviceLink_Example/Enum+SDLAudioRecordingState.swift
deleted file mode 100644
index 6264566f2..000000000
--- a/SmartDeviceLink_Example/Enum+SDLAudioRecordingState.swift
+++ /dev/null
@@ -1,15 +0,0 @@
-//
-// Enum+SDLAudioRecordingState.swift
-// SmartDeviceLink
-//
-// Created by Nicole on 4/23/18.
-// Copyright © 2018 smartdevicelink. All rights reserved.
-//
-
-import Foundation
-
-enum SDLAudioRecordingState {
- case listening
- case notListening
- case notAuthorized
-}
diff --git a/SmartDeviceLink_Example/ProxyManager.swift b/SmartDeviceLink_Example/ProxyManager.swift
index 555fdc743..1898bb824 100644
--- a/SmartDeviceLink_Example/ProxyManager.swift
+++ b/SmartDeviceLink_Example/ProxyManager.swift
@@ -88,7 +88,7 @@ private extension ProxyManager {
/// - Returns: A SDLLogConfiguration object
class func logConfiguration() -> SDLLogConfiguration {
let logConfig = SDLLogConfiguration.default()
- let exampleLogFileModule = SDLLogFileModule(name: "SDL_Swift", files: ["ProxyManager", "MenuManager", "ButtonManager", "AlertManager", "RPCPermissionsManager", "VehicleDataManager", "AudioManager"])
+ let exampleLogFileModule = SDLLogFileModule(name: "SDL Swift Example App", files: ["ProxyManager", "MenuManager", "ButtonManager", "AlertManager", "RPCPermissionsManager", "VehicleDataManager", "AudioManager"])
logConfig.modules.insert(exampleLogFileModule)
_ = logConfig.targets.insert(SDLLogTargetFile()) // Logs to file
logConfig.globalLogLevel = .debug // Filters the logs
@@ -124,11 +124,6 @@ extension ProxyManager: SDLManagerDelegate {
delegate?.didChangeProxyState(SDLProxyState.stopped)
firstHMILevelState = .none
- if buttonManager != nil && vehicleDataManager != nil {
- buttonManager.stopManager()
- vehicleDataManager.stopManager()
- }
-
// If desired, automatically start searching for a new connection to Core
if ExampleAppShouldRestartSDLManagerOnDisconnect.boolValue {
startManager()
diff --git a/SmartDeviceLink_Example/VehicleDataManager.h b/SmartDeviceLink_Example/VehicleDataManager.h
index f2e757de8..65f6dd09d 100644
--- a/SmartDeviceLink_Example/VehicleDataManager.h
+++ b/SmartDeviceLink_Example/VehicleDataManager.h
@@ -20,7 +20,6 @@ typedef void(^RefreshUIHandler)(void);
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithManager:(SDLManager *)manager refreshUIHandler:(RefreshUIHandler)refreshUIHandler;
-- (void)stopManager;
- (void)subscribeToVehicleOdometer;
- (void)unsubscribeToVehicleOdometer;
diff --git a/SmartDeviceLink_Example/VehicleDataManager.m b/SmartDeviceLink_Example/VehicleDataManager.m
index 7d8706b0c..dbd954e3c 100644
--- a/SmartDeviceLink_Example/VehicleDataManager.m
+++ b/SmartDeviceLink_Example/VehicleDataManager.m
@@ -42,12 +42,6 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
-/**
- * Resets the manager to its default values
- */
-- (void)stopManager {
- [self sdlex_resetOdometer];
-}
#pragma mark - Subscribe Vehicle Data
diff --git a/SmartDeviceLink_Example/VehicleDataManager.swift b/SmartDeviceLink_Example/VehicleDataManager.swift
index ea9ae701a..6cf25b904 100644
--- a/SmartDeviceLink_Example/VehicleDataManager.swift
+++ b/SmartDeviceLink_Example/VehicleDataManager.swift
@@ -24,10 +24,6 @@ class VehicleDataManager: NSObject {
resetOdometer()
NotificationCenter.default.addObserver(self, selector: #selector(vehicleDataNotification(_:)), name: .SDLDidReceiveVehicleData, object: nil)
}
-
- func stopManager() {
- resetOdometer()
- }
}
// MARK: - Subscribe Vehicle Data