├── AppServicesSwift.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcuserdata │ └── stevencurtis.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ └── xcschememanagement.plist ├── AppServicesSwift ├── AppDelegate+Services │ ├── AnalyticsService.swift │ ├── CrashReporterService.swift │ └── PersistenceService.swift ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist └── ViewController.swift ├── AppServicesSwiftTests ├── AppServicesSwiftTests.swift └── Info.plist ├── AppServicesSwiftUITests ├── AppServicesSwiftUITests.swift └── Info.plist └── README.md /AppServicesSwift.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | CAAB9E2022E936820007ADFB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAAB9E1F22E936820007ADFB /* AppDelegate.swift */; }; 11 | CAAB9E2222E936820007ADFB /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAAB9E2122E936820007ADFB /* ViewController.swift */; }; 12 | CAAB9E2522E936820007ADFB /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CAAB9E2322E936820007ADFB /* Main.storyboard */; }; 13 | CAAB9E2722E936840007ADFB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CAAB9E2622E936840007ADFB /* Assets.xcassets */; }; 14 | CAAB9E2A22E936840007ADFB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CAAB9E2822E936840007ADFB /* LaunchScreen.storyboard */; }; 15 | CAAB9E3522E936840007ADFB /* AppServicesSwiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAAB9E3422E936840007ADFB /* AppServicesSwiftTests.swift */; }; 16 | CAAB9E4022E936840007ADFB /* AppServicesSwiftUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAAB9E3F22E936840007ADFB /* AppServicesSwiftUITests.swift */; }; 17 | CAAB9E4E22E936B00007ADFB /* CrashReporterService.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAAB9E4D22E936B00007ADFB /* CrashReporterService.swift */; }; 18 | CAAB9E5122E936E30007ADFB /* PersistenceService.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAAB9E5022E936E30007ADFB /* PersistenceService.swift */; }; 19 | CAAB9E5322E936F40007ADFB /* AnalyticsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAAB9E5222E936F40007ADFB /* AnalyticsService.swift */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXContainerItemProxy section */ 23 | CAAB9E3122E936840007ADFB /* PBXContainerItemProxy */ = { 24 | isa = PBXContainerItemProxy; 25 | containerPortal = CAAB9E1422E936820007ADFB /* Project object */; 26 | proxyType = 1; 27 | remoteGlobalIDString = CAAB9E1B22E936820007ADFB; 28 | remoteInfo = AppServicesSwift; 29 | }; 30 | CAAB9E3C22E936840007ADFB /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = CAAB9E1422E936820007ADFB /* Project object */; 33 | proxyType = 1; 34 | remoteGlobalIDString = CAAB9E1B22E936820007ADFB; 35 | remoteInfo = AppServicesSwift; 36 | }; 37 | /* End PBXContainerItemProxy section */ 38 | 39 | /* Begin PBXFileReference section */ 40 | CAAB9E1C22E936820007ADFB /* AppServicesSwift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AppServicesSwift.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | CAAB9E1F22E936820007ADFB /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 42 | CAAB9E2122E936820007ADFB /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 43 | CAAB9E2422E936820007ADFB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 44 | CAAB9E2622E936840007ADFB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 45 | CAAB9E2922E936840007ADFB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 46 | CAAB9E2B22E936840007ADFB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 47 | CAAB9E3022E936840007ADFB /* AppServicesSwiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AppServicesSwiftTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | CAAB9E3422E936840007ADFB /* AppServicesSwiftTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppServicesSwiftTests.swift; sourceTree = ""; }; 49 | CAAB9E3622E936840007ADFB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 50 | CAAB9E3B22E936840007ADFB /* AppServicesSwiftUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AppServicesSwiftUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | CAAB9E3F22E936840007ADFB /* AppServicesSwiftUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppServicesSwiftUITests.swift; sourceTree = ""; }; 52 | CAAB9E4122E936840007ADFB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 53 | CAAB9E4D22E936B00007ADFB /* CrashReporterService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CrashReporterService.swift; sourceTree = ""; }; 54 | CAAB9E5022E936E30007ADFB /* PersistenceService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PersistenceService.swift; sourceTree = ""; }; 55 | CAAB9E5222E936F40007ADFB /* AnalyticsService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnalyticsService.swift; sourceTree = ""; }; 56 | /* End PBXFileReference section */ 57 | 58 | /* Begin PBXFrameworksBuildPhase section */ 59 | CAAB9E1922E936820007ADFB /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | CAAB9E2D22E936840007ADFB /* Frameworks */ = { 67 | isa = PBXFrameworksBuildPhase; 68 | buildActionMask = 2147483647; 69 | files = ( 70 | ); 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | CAAB9E3822E936840007ADFB /* Frameworks */ = { 74 | isa = PBXFrameworksBuildPhase; 75 | buildActionMask = 2147483647; 76 | files = ( 77 | ); 78 | runOnlyForDeploymentPostprocessing = 0; 79 | }; 80 | /* End PBXFrameworksBuildPhase section */ 81 | 82 | /* Begin PBXGroup section */ 83 | CAAB9E1322E936820007ADFB = { 84 | isa = PBXGroup; 85 | children = ( 86 | CAAB9E1E22E936820007ADFB /* AppServicesSwift */, 87 | CAAB9E3322E936840007ADFB /* AppServicesSwiftTests */, 88 | CAAB9E3E22E936840007ADFB /* AppServicesSwiftUITests */, 89 | CAAB9E1D22E936820007ADFB /* Products */, 90 | ); 91 | sourceTree = ""; 92 | }; 93 | CAAB9E1D22E936820007ADFB /* Products */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | CAAB9E1C22E936820007ADFB /* AppServicesSwift.app */, 97 | CAAB9E3022E936840007ADFB /* AppServicesSwiftTests.xctest */, 98 | CAAB9E3B22E936840007ADFB /* AppServicesSwiftUITests.xctest */, 99 | ); 100 | name = Products; 101 | sourceTree = ""; 102 | }; 103 | CAAB9E1E22E936820007ADFB /* AppServicesSwift */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | CAAB9E1F22E936820007ADFB /* AppDelegate.swift */, 107 | CAAB9E4F22E936B40007ADFB /* AppDelegate+Services */, 108 | CAAB9E2122E936820007ADFB /* ViewController.swift */, 109 | CAAB9E2322E936820007ADFB /* Main.storyboard */, 110 | CAAB9E2622E936840007ADFB /* Assets.xcassets */, 111 | CAAB9E2822E936840007ADFB /* LaunchScreen.storyboard */, 112 | CAAB9E2B22E936840007ADFB /* Info.plist */, 113 | ); 114 | path = AppServicesSwift; 115 | sourceTree = ""; 116 | }; 117 | CAAB9E3322E936840007ADFB /* AppServicesSwiftTests */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | CAAB9E3422E936840007ADFB /* AppServicesSwiftTests.swift */, 121 | CAAB9E3622E936840007ADFB /* Info.plist */, 122 | ); 123 | path = AppServicesSwiftTests; 124 | sourceTree = ""; 125 | }; 126 | CAAB9E3E22E936840007ADFB /* AppServicesSwiftUITests */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | CAAB9E3F22E936840007ADFB /* AppServicesSwiftUITests.swift */, 130 | CAAB9E4122E936840007ADFB /* Info.plist */, 131 | ); 132 | path = AppServicesSwiftUITests; 133 | sourceTree = ""; 134 | }; 135 | CAAB9E4F22E936B40007ADFB /* AppDelegate+Services */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | CAAB9E5222E936F40007ADFB /* AnalyticsService.swift */, 139 | CAAB9E4D22E936B00007ADFB /* CrashReporterService.swift */, 140 | CAAB9E5022E936E30007ADFB /* PersistenceService.swift */, 141 | ); 142 | path = "AppDelegate+Services"; 143 | sourceTree = ""; 144 | }; 145 | /* End PBXGroup section */ 146 | 147 | /* Begin PBXNativeTarget section */ 148 | CAAB9E1B22E936820007ADFB /* AppServicesSwift */ = { 149 | isa = PBXNativeTarget; 150 | buildConfigurationList = CAAB9E4422E936840007ADFB /* Build configuration list for PBXNativeTarget "AppServicesSwift" */; 151 | buildPhases = ( 152 | CAAB9E1822E936820007ADFB /* Sources */, 153 | CAAB9E1922E936820007ADFB /* Frameworks */, 154 | CAAB9E1A22E936820007ADFB /* Resources */, 155 | ); 156 | buildRules = ( 157 | ); 158 | dependencies = ( 159 | ); 160 | name = AppServicesSwift; 161 | productName = AppServicesSwift; 162 | productReference = CAAB9E1C22E936820007ADFB /* AppServicesSwift.app */; 163 | productType = "com.apple.product-type.application"; 164 | }; 165 | CAAB9E2F22E936840007ADFB /* AppServicesSwiftTests */ = { 166 | isa = PBXNativeTarget; 167 | buildConfigurationList = CAAB9E4722E936840007ADFB /* Build configuration list for PBXNativeTarget "AppServicesSwiftTests" */; 168 | buildPhases = ( 169 | CAAB9E2C22E936840007ADFB /* Sources */, 170 | CAAB9E2D22E936840007ADFB /* Frameworks */, 171 | CAAB9E2E22E936840007ADFB /* Resources */, 172 | ); 173 | buildRules = ( 174 | ); 175 | dependencies = ( 176 | CAAB9E3222E936840007ADFB /* PBXTargetDependency */, 177 | ); 178 | name = AppServicesSwiftTests; 179 | productName = AppServicesSwiftTests; 180 | productReference = CAAB9E3022E936840007ADFB /* AppServicesSwiftTests.xctest */; 181 | productType = "com.apple.product-type.bundle.unit-test"; 182 | }; 183 | CAAB9E3A22E936840007ADFB /* AppServicesSwiftUITests */ = { 184 | isa = PBXNativeTarget; 185 | buildConfigurationList = CAAB9E4A22E936840007ADFB /* Build configuration list for PBXNativeTarget "AppServicesSwiftUITests" */; 186 | buildPhases = ( 187 | CAAB9E3722E936840007ADFB /* Sources */, 188 | CAAB9E3822E936840007ADFB /* Frameworks */, 189 | CAAB9E3922E936840007ADFB /* Resources */, 190 | ); 191 | buildRules = ( 192 | ); 193 | dependencies = ( 194 | CAAB9E3D22E936840007ADFB /* PBXTargetDependency */, 195 | ); 196 | name = AppServicesSwiftUITests; 197 | productName = AppServicesSwiftUITests; 198 | productReference = CAAB9E3B22E936840007ADFB /* AppServicesSwiftUITests.xctest */; 199 | productType = "com.apple.product-type.bundle.ui-testing"; 200 | }; 201 | /* End PBXNativeTarget section */ 202 | 203 | /* Begin PBXProject section */ 204 | CAAB9E1422E936820007ADFB /* Project object */ = { 205 | isa = PBXProject; 206 | attributes = { 207 | LastSwiftUpdateCheck = 1020; 208 | LastUpgradeCheck = 1020; 209 | ORGANIZATIONNAME = "Steven Curtis"; 210 | TargetAttributes = { 211 | CAAB9E1B22E936820007ADFB = { 212 | CreatedOnToolsVersion = 10.2.1; 213 | }; 214 | CAAB9E2F22E936840007ADFB = { 215 | CreatedOnToolsVersion = 10.2.1; 216 | TestTargetID = CAAB9E1B22E936820007ADFB; 217 | }; 218 | CAAB9E3A22E936840007ADFB = { 219 | CreatedOnToolsVersion = 10.2.1; 220 | TestTargetID = CAAB9E1B22E936820007ADFB; 221 | }; 222 | }; 223 | }; 224 | buildConfigurationList = CAAB9E1722E936820007ADFB /* Build configuration list for PBXProject "AppServicesSwift" */; 225 | compatibilityVersion = "Xcode 9.3"; 226 | developmentRegion = en; 227 | hasScannedForEncodings = 0; 228 | knownRegions = ( 229 | en, 230 | Base, 231 | ); 232 | mainGroup = CAAB9E1322E936820007ADFB; 233 | productRefGroup = CAAB9E1D22E936820007ADFB /* Products */; 234 | projectDirPath = ""; 235 | projectRoot = ""; 236 | targets = ( 237 | CAAB9E1B22E936820007ADFB /* AppServicesSwift */, 238 | CAAB9E2F22E936840007ADFB /* AppServicesSwiftTests */, 239 | CAAB9E3A22E936840007ADFB /* AppServicesSwiftUITests */, 240 | ); 241 | }; 242 | /* End PBXProject section */ 243 | 244 | /* Begin PBXResourcesBuildPhase section */ 245 | CAAB9E1A22E936820007ADFB /* Resources */ = { 246 | isa = PBXResourcesBuildPhase; 247 | buildActionMask = 2147483647; 248 | files = ( 249 | CAAB9E2A22E936840007ADFB /* LaunchScreen.storyboard in Resources */, 250 | CAAB9E2722E936840007ADFB /* Assets.xcassets in Resources */, 251 | CAAB9E2522E936820007ADFB /* Main.storyboard in Resources */, 252 | ); 253 | runOnlyForDeploymentPostprocessing = 0; 254 | }; 255 | CAAB9E2E22E936840007ADFB /* Resources */ = { 256 | isa = PBXResourcesBuildPhase; 257 | buildActionMask = 2147483647; 258 | files = ( 259 | ); 260 | runOnlyForDeploymentPostprocessing = 0; 261 | }; 262 | CAAB9E3922E936840007ADFB /* Resources */ = { 263 | isa = PBXResourcesBuildPhase; 264 | buildActionMask = 2147483647; 265 | files = ( 266 | ); 267 | runOnlyForDeploymentPostprocessing = 0; 268 | }; 269 | /* End PBXResourcesBuildPhase section */ 270 | 271 | /* Begin PBXSourcesBuildPhase section */ 272 | CAAB9E1822E936820007ADFB /* Sources */ = { 273 | isa = PBXSourcesBuildPhase; 274 | buildActionMask = 2147483647; 275 | files = ( 276 | CAAB9E2222E936820007ADFB /* ViewController.swift in Sources */, 277 | CAAB9E5322E936F40007ADFB /* AnalyticsService.swift in Sources */, 278 | CAAB9E5122E936E30007ADFB /* PersistenceService.swift in Sources */, 279 | CAAB9E4E22E936B00007ADFB /* CrashReporterService.swift in Sources */, 280 | CAAB9E2022E936820007ADFB /* AppDelegate.swift in Sources */, 281 | ); 282 | runOnlyForDeploymentPostprocessing = 0; 283 | }; 284 | CAAB9E2C22E936840007ADFB /* Sources */ = { 285 | isa = PBXSourcesBuildPhase; 286 | buildActionMask = 2147483647; 287 | files = ( 288 | CAAB9E3522E936840007ADFB /* AppServicesSwiftTests.swift in Sources */, 289 | ); 290 | runOnlyForDeploymentPostprocessing = 0; 291 | }; 292 | CAAB9E3722E936840007ADFB /* Sources */ = { 293 | isa = PBXSourcesBuildPhase; 294 | buildActionMask = 2147483647; 295 | files = ( 296 | CAAB9E4022E936840007ADFB /* AppServicesSwiftUITests.swift in Sources */, 297 | ); 298 | runOnlyForDeploymentPostprocessing = 0; 299 | }; 300 | /* End PBXSourcesBuildPhase section */ 301 | 302 | /* Begin PBXTargetDependency section */ 303 | CAAB9E3222E936840007ADFB /* PBXTargetDependency */ = { 304 | isa = PBXTargetDependency; 305 | target = CAAB9E1B22E936820007ADFB /* AppServicesSwift */; 306 | targetProxy = CAAB9E3122E936840007ADFB /* PBXContainerItemProxy */; 307 | }; 308 | CAAB9E3D22E936840007ADFB /* PBXTargetDependency */ = { 309 | isa = PBXTargetDependency; 310 | target = CAAB9E1B22E936820007ADFB /* AppServicesSwift */; 311 | targetProxy = CAAB9E3C22E936840007ADFB /* PBXContainerItemProxy */; 312 | }; 313 | /* End PBXTargetDependency section */ 314 | 315 | /* Begin PBXVariantGroup section */ 316 | CAAB9E2322E936820007ADFB /* Main.storyboard */ = { 317 | isa = PBXVariantGroup; 318 | children = ( 319 | CAAB9E2422E936820007ADFB /* Base */, 320 | ); 321 | name = Main.storyboard; 322 | sourceTree = ""; 323 | }; 324 | CAAB9E2822E936840007ADFB /* LaunchScreen.storyboard */ = { 325 | isa = PBXVariantGroup; 326 | children = ( 327 | CAAB9E2922E936840007ADFB /* Base */, 328 | ); 329 | name = LaunchScreen.storyboard; 330 | sourceTree = ""; 331 | }; 332 | /* End PBXVariantGroup section */ 333 | 334 | /* Begin XCBuildConfiguration section */ 335 | CAAB9E4222E936840007ADFB /* Debug */ = { 336 | isa = XCBuildConfiguration; 337 | buildSettings = { 338 | ALWAYS_SEARCH_USER_PATHS = NO; 339 | CLANG_ANALYZER_NONNULL = YES; 340 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 341 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 342 | CLANG_CXX_LIBRARY = "libc++"; 343 | CLANG_ENABLE_MODULES = YES; 344 | CLANG_ENABLE_OBJC_ARC = YES; 345 | CLANG_ENABLE_OBJC_WEAK = YES; 346 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 347 | CLANG_WARN_BOOL_CONVERSION = YES; 348 | CLANG_WARN_COMMA = YES; 349 | CLANG_WARN_CONSTANT_CONVERSION = YES; 350 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 351 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 352 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 353 | CLANG_WARN_EMPTY_BODY = YES; 354 | CLANG_WARN_ENUM_CONVERSION = YES; 355 | CLANG_WARN_INFINITE_RECURSION = YES; 356 | CLANG_WARN_INT_CONVERSION = YES; 357 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 358 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 359 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 360 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 361 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 362 | CLANG_WARN_STRICT_PROTOTYPES = YES; 363 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 364 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 365 | CLANG_WARN_UNREACHABLE_CODE = YES; 366 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 367 | CODE_SIGN_IDENTITY = "iPhone Developer"; 368 | COPY_PHASE_STRIP = NO; 369 | DEBUG_INFORMATION_FORMAT = dwarf; 370 | ENABLE_STRICT_OBJC_MSGSEND = YES; 371 | ENABLE_TESTABILITY = YES; 372 | GCC_C_LANGUAGE_STANDARD = gnu11; 373 | GCC_DYNAMIC_NO_PIC = NO; 374 | GCC_NO_COMMON_BLOCKS = YES; 375 | GCC_OPTIMIZATION_LEVEL = 0; 376 | GCC_PREPROCESSOR_DEFINITIONS = ( 377 | "DEBUG=1", 378 | "$(inherited)", 379 | ); 380 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 381 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 382 | GCC_WARN_UNDECLARED_SELECTOR = YES; 383 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 384 | GCC_WARN_UNUSED_FUNCTION = YES; 385 | GCC_WARN_UNUSED_VARIABLE = YES; 386 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 387 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 388 | MTL_FAST_MATH = YES; 389 | ONLY_ACTIVE_ARCH = YES; 390 | SDKROOT = iphoneos; 391 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 392 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 393 | }; 394 | name = Debug; 395 | }; 396 | CAAB9E4322E936840007ADFB /* Release */ = { 397 | isa = XCBuildConfiguration; 398 | buildSettings = { 399 | ALWAYS_SEARCH_USER_PATHS = NO; 400 | CLANG_ANALYZER_NONNULL = YES; 401 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 402 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 403 | CLANG_CXX_LIBRARY = "libc++"; 404 | CLANG_ENABLE_MODULES = YES; 405 | CLANG_ENABLE_OBJC_ARC = YES; 406 | CLANG_ENABLE_OBJC_WEAK = YES; 407 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 408 | CLANG_WARN_BOOL_CONVERSION = YES; 409 | CLANG_WARN_COMMA = YES; 410 | CLANG_WARN_CONSTANT_CONVERSION = YES; 411 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 412 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 413 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 414 | CLANG_WARN_EMPTY_BODY = YES; 415 | CLANG_WARN_ENUM_CONVERSION = YES; 416 | CLANG_WARN_INFINITE_RECURSION = YES; 417 | CLANG_WARN_INT_CONVERSION = YES; 418 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 419 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 420 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 421 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 422 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 423 | CLANG_WARN_STRICT_PROTOTYPES = YES; 424 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 425 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 426 | CLANG_WARN_UNREACHABLE_CODE = YES; 427 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 428 | CODE_SIGN_IDENTITY = "iPhone Developer"; 429 | COPY_PHASE_STRIP = NO; 430 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 431 | ENABLE_NS_ASSERTIONS = NO; 432 | ENABLE_STRICT_OBJC_MSGSEND = YES; 433 | GCC_C_LANGUAGE_STANDARD = gnu11; 434 | GCC_NO_COMMON_BLOCKS = YES; 435 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 436 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 437 | GCC_WARN_UNDECLARED_SELECTOR = YES; 438 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 439 | GCC_WARN_UNUSED_FUNCTION = YES; 440 | GCC_WARN_UNUSED_VARIABLE = YES; 441 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 442 | MTL_ENABLE_DEBUG_INFO = NO; 443 | MTL_FAST_MATH = YES; 444 | SDKROOT = iphoneos; 445 | SWIFT_COMPILATION_MODE = wholemodule; 446 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 447 | VALIDATE_PRODUCT = YES; 448 | }; 449 | name = Release; 450 | }; 451 | CAAB9E4522E936840007ADFB /* Debug */ = { 452 | isa = XCBuildConfiguration; 453 | buildSettings = { 454 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 455 | CODE_SIGN_STYLE = Automatic; 456 | DEVELOPMENT_TEAM = UW69ZFFDZJ; 457 | INFOPLIST_FILE = AppServicesSwift/Info.plist; 458 | LD_RUNPATH_SEARCH_PATHS = ( 459 | "$(inherited)", 460 | "@executable_path/Frameworks", 461 | ); 462 | PRODUCT_BUNDLE_IDENTIFIER = com.studeapps.AppServicesSwift; 463 | PRODUCT_NAME = "$(TARGET_NAME)"; 464 | SWIFT_VERSION = 5.0; 465 | TARGETED_DEVICE_FAMILY = "1,2"; 466 | }; 467 | name = Debug; 468 | }; 469 | CAAB9E4622E936840007ADFB /* Release */ = { 470 | isa = XCBuildConfiguration; 471 | buildSettings = { 472 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 473 | CODE_SIGN_STYLE = Automatic; 474 | DEVELOPMENT_TEAM = UW69ZFFDZJ; 475 | INFOPLIST_FILE = AppServicesSwift/Info.plist; 476 | LD_RUNPATH_SEARCH_PATHS = ( 477 | "$(inherited)", 478 | "@executable_path/Frameworks", 479 | ); 480 | PRODUCT_BUNDLE_IDENTIFIER = com.studeapps.AppServicesSwift; 481 | PRODUCT_NAME = "$(TARGET_NAME)"; 482 | SWIFT_VERSION = 5.0; 483 | TARGETED_DEVICE_FAMILY = "1,2"; 484 | }; 485 | name = Release; 486 | }; 487 | CAAB9E4822E936840007ADFB /* Debug */ = { 488 | isa = XCBuildConfiguration; 489 | buildSettings = { 490 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 491 | BUNDLE_LOADER = "$(TEST_HOST)"; 492 | CODE_SIGN_STYLE = Automatic; 493 | DEVELOPMENT_TEAM = UW69ZFFDZJ; 494 | INFOPLIST_FILE = AppServicesSwiftTests/Info.plist; 495 | LD_RUNPATH_SEARCH_PATHS = ( 496 | "$(inherited)", 497 | "@executable_path/Frameworks", 498 | "@loader_path/Frameworks", 499 | ); 500 | PRODUCT_BUNDLE_IDENTIFIER = com.studeapps.AppServicesSwiftTests; 501 | PRODUCT_NAME = "$(TARGET_NAME)"; 502 | SWIFT_VERSION = 5.0; 503 | TARGETED_DEVICE_FAMILY = "1,2"; 504 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AppServicesSwift.app/AppServicesSwift"; 505 | }; 506 | name = Debug; 507 | }; 508 | CAAB9E4922E936840007ADFB /* Release */ = { 509 | isa = XCBuildConfiguration; 510 | buildSettings = { 511 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 512 | BUNDLE_LOADER = "$(TEST_HOST)"; 513 | CODE_SIGN_STYLE = Automatic; 514 | DEVELOPMENT_TEAM = UW69ZFFDZJ; 515 | INFOPLIST_FILE = AppServicesSwiftTests/Info.plist; 516 | LD_RUNPATH_SEARCH_PATHS = ( 517 | "$(inherited)", 518 | "@executable_path/Frameworks", 519 | "@loader_path/Frameworks", 520 | ); 521 | PRODUCT_BUNDLE_IDENTIFIER = com.studeapps.AppServicesSwiftTests; 522 | PRODUCT_NAME = "$(TARGET_NAME)"; 523 | SWIFT_VERSION = 5.0; 524 | TARGETED_DEVICE_FAMILY = "1,2"; 525 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AppServicesSwift.app/AppServicesSwift"; 526 | }; 527 | name = Release; 528 | }; 529 | CAAB9E4B22E936840007ADFB /* Debug */ = { 530 | isa = XCBuildConfiguration; 531 | buildSettings = { 532 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 533 | CODE_SIGN_STYLE = Automatic; 534 | DEVELOPMENT_TEAM = UW69ZFFDZJ; 535 | INFOPLIST_FILE = AppServicesSwiftUITests/Info.plist; 536 | LD_RUNPATH_SEARCH_PATHS = ( 537 | "$(inherited)", 538 | "@executable_path/Frameworks", 539 | "@loader_path/Frameworks", 540 | ); 541 | PRODUCT_BUNDLE_IDENTIFIER = com.studeapps.AppServicesSwiftUITests; 542 | PRODUCT_NAME = "$(TARGET_NAME)"; 543 | SWIFT_VERSION = 5.0; 544 | TARGETED_DEVICE_FAMILY = "1,2"; 545 | TEST_TARGET_NAME = AppServicesSwift; 546 | }; 547 | name = Debug; 548 | }; 549 | CAAB9E4C22E936840007ADFB /* Release */ = { 550 | isa = XCBuildConfiguration; 551 | buildSettings = { 552 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 553 | CODE_SIGN_STYLE = Automatic; 554 | DEVELOPMENT_TEAM = UW69ZFFDZJ; 555 | INFOPLIST_FILE = AppServicesSwiftUITests/Info.plist; 556 | LD_RUNPATH_SEARCH_PATHS = ( 557 | "$(inherited)", 558 | "@executable_path/Frameworks", 559 | "@loader_path/Frameworks", 560 | ); 561 | PRODUCT_BUNDLE_IDENTIFIER = com.studeapps.AppServicesSwiftUITests; 562 | PRODUCT_NAME = "$(TARGET_NAME)"; 563 | SWIFT_VERSION = 5.0; 564 | TARGETED_DEVICE_FAMILY = "1,2"; 565 | TEST_TARGET_NAME = AppServicesSwift; 566 | }; 567 | name = Release; 568 | }; 569 | /* End XCBuildConfiguration section */ 570 | 571 | /* Begin XCConfigurationList section */ 572 | CAAB9E1722E936820007ADFB /* Build configuration list for PBXProject "AppServicesSwift" */ = { 573 | isa = XCConfigurationList; 574 | buildConfigurations = ( 575 | CAAB9E4222E936840007ADFB /* Debug */, 576 | CAAB9E4322E936840007ADFB /* Release */, 577 | ); 578 | defaultConfigurationIsVisible = 0; 579 | defaultConfigurationName = Release; 580 | }; 581 | CAAB9E4422E936840007ADFB /* Build configuration list for PBXNativeTarget "AppServicesSwift" */ = { 582 | isa = XCConfigurationList; 583 | buildConfigurations = ( 584 | CAAB9E4522E936840007ADFB /* Debug */, 585 | CAAB9E4622E936840007ADFB /* Release */, 586 | ); 587 | defaultConfigurationIsVisible = 0; 588 | defaultConfigurationName = Release; 589 | }; 590 | CAAB9E4722E936840007ADFB /* Build configuration list for PBXNativeTarget "AppServicesSwiftTests" */ = { 591 | isa = XCConfigurationList; 592 | buildConfigurations = ( 593 | CAAB9E4822E936840007ADFB /* Debug */, 594 | CAAB9E4922E936840007ADFB /* Release */, 595 | ); 596 | defaultConfigurationIsVisible = 0; 597 | defaultConfigurationName = Release; 598 | }; 599 | CAAB9E4A22E936840007ADFB /* Build configuration list for PBXNativeTarget "AppServicesSwiftUITests" */ = { 600 | isa = XCConfigurationList; 601 | buildConfigurations = ( 602 | CAAB9E4B22E936840007ADFB /* Debug */, 603 | CAAB9E4C22E936840007ADFB /* Release */, 604 | ); 605 | defaultConfigurationIsVisible = 0; 606 | defaultConfigurationName = Release; 607 | }; 608 | /* End XCConfigurationList section */ 609 | }; 610 | rootObject = CAAB9E1422E936820007ADFB /* Project object */; 611 | } 612 | -------------------------------------------------------------------------------- /AppServicesSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AppServicesSwift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AppServicesSwift.xcodeproj/xcuserdata/stevencurtis.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /AppServicesSwift.xcodeproj/xcuserdata/stevencurtis.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | AppServicesSwift.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /AppServicesSwift/AppDelegate+Services/AnalyticsService.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AnalyticsService.swift 3 | // AppServicesSwift 4 | // 5 | // Created by Dan Ursu on 25/01/16. 6 | // Copyright © 2016 Dan Ursu. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | // If you want to do something related to analytics in your app , then you should work in this file. 12 | 13 | class AnalyticsService: NSObject, UIApplicationDelegate { 14 | 15 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { 16 | #if ALPHA 17 | //register with one id 18 | #else 19 | //Register with another one 20 | #endif 21 | //Analytics manager starttracking 22 | return true 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /AppServicesSwift/AppDelegate+Services/CrashReporterService.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CrashReporterService.swift 3 | // AppServicesSwift 4 | // 5 | // Created by Dan Ursu on 25/01/16. 6 | // Copyright © 2016 Dan Ursu. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | // If you want to do something related to crash reporting, you go in this file. 12 | 13 | class CrashReporterService: NSObject, UIApplicationDelegate { 14 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { 15 | return true 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /AppServicesSwift/AppDelegate+Services/PersistenceService.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HockeyAppService.swift 3 | // AppServicesSwift 4 | // 5 | // Created by Dan Ursu on 25/01/16. 6 | // Copyright © 2016 Dan Ursu. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class PersistenceService: NSObject, UIApplicationDelegate { 12 | func applicationDidEnterBackground(_ application: UIApplication) { 13 | print ("Persistence") 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /AppServicesSwift/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // AppServicesSwift 4 | // 5 | // Created by Steven Curtis on 25/07/2019. 6 | // Copyright © 2019 Steven Curtis. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | var services: [UIApplicationDelegate] = [ 17 | PersistenceService(), 18 | AnalyticsService(), 19 | CrashReporterService() 20 | ] 21 | 22 | 23 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 24 | // Override point for customization after application launch. 25 | // Here is an example how you pass a message to your services 26 | for service in self.services { 27 | let _ = service.application? (application, didFinishLaunchingWithOptions: launchOptions) 28 | } 29 | return true 30 | } 31 | 32 | func applicationWillResignActive(_ application: UIApplication) { 33 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 34 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 35 | } 36 | 37 | func applicationDidEnterBackground(_ application: UIApplication) { 38 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 39 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 40 | } 41 | 42 | func applicationWillEnterForeground(_ application: UIApplication) { 43 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 44 | } 45 | 46 | func applicationDidBecomeActive(_ application: UIApplication) { 47 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 48 | } 49 | 50 | func applicationWillTerminate(_ application: UIApplication) { 51 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 52 | } 53 | 54 | 55 | } 56 | 57 | -------------------------------------------------------------------------------- /AppServicesSwift/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /AppServicesSwift/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /AppServicesSwift/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /AppServicesSwift/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /AppServicesSwift/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /AppServicesSwift/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // AppServicesSwift 4 | // 5 | // Created by Steven Curtis on 25/07/2019. 6 | // Copyright © 2019 Steven Curtis. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | // Do any additional setup after loading the view. 16 | } 17 | 18 | 19 | } 20 | 21 | -------------------------------------------------------------------------------- /AppServicesSwiftTests/AppServicesSwiftTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppServicesSwiftTests.swift 3 | // AppServicesSwiftTests 4 | // 5 | // Created by Steven Curtis on 25/07/2019. 6 | // Copyright © 2019 Steven Curtis. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import AppServicesSwift 11 | 12 | class AppServicesSwiftTests: XCTestCase { 13 | 14 | override func setUp() { 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | } 21 | 22 | func testExample() { 23 | // This is an example of a functional test case. 24 | // Use XCTAssert and related functions to verify your tests produce the correct results. 25 | } 26 | 27 | func testPerformanceExample() { 28 | // This is an example of a performance test case. 29 | self.measure { 30 | // Put the code you want to measure the time of here. 31 | } 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /AppServicesSwiftTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /AppServicesSwiftUITests/AppServicesSwiftUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppServicesSwiftUITests.swift 3 | // AppServicesSwiftUITests 4 | // 5 | // Created by Steven Curtis on 25/07/2019. 6 | // Copyright © 2019 Steven Curtis. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class AppServicesSwiftUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | // Put setup code here. This method is called before the invocation of each test method in the class. 15 | 16 | // In UI tests it is usually best to stop immediately when a failure occurs. 17 | continueAfterFailure = false 18 | 19 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 20 | XCUIApplication().launch() 21 | 22 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 23 | } 24 | 25 | override func tearDown() { 26 | // Put teardown code here. This method is called after the invocation of each test method in the class. 27 | } 28 | 29 | func testExample() { 30 | // Use recording to get started writing UI tests. 31 | // Use XCTAssert and related functions to verify your tests produce the correct results. 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /AppServicesSwiftUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # A simple implementation of an architecture for an AppDelegate 2 | 3 | The App Delegate has many responsibilites by default including creash reporting, analytics, setting up the CoreData stack, notifications etc. 4 | 5 | This breaks the Single Responsibility principle because the AppDelegate handles too many things. 6 | 7 | The AppDelegate is responsible for this mix of things that are caught up in the massive AppDelegate class. Even splitting up the responsibilities into smaller methods just spreads the responsibilities around. 8 | 9 | To avoid this we can implement a form of the strategy pattern, where the behaviours of a class are encapsulated by using interfaces. 10 | --------------------------------------------------------------------------------