├── README.md ├── SpotIt.xcodeproj ├── project.xcworkspace │ └── contents.xcworkspacedata ├── xcuserdata │ └── gabriel.xcuserdatad │ │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ └── SpotIt.xcscheme └── project.pbxproj └── SpotIt ├── ViewController.swift ├── Assets.xcassets └── AppIcon.appiconset │ └── Contents.json ├── Info.plist ├── Base.lproj ├── Main.storyboard └── LaunchScreen.storyboard └── AppDelegate.swift /README.md: -------------------------------------------------------------------------------- 1 | # Core Spotlight Demo 2 | A simple demo for Core Spotlight 3 | 4 | For the full tutorial, please refer to the link below: 5 | 6 | http://www.appcoda.com/core-spotlight-framework/ 7 | -------------------------------------------------------------------------------- /SpotIt.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SpotIt/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // SpotIt 4 | // 5 | // Created by Gabriel Theodoropoulos on 11/11/15. 6 | // Copyright © 2015 Appcoda. 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, typically from a nib. 16 | } 17 | 18 | override func didReceiveMemoryWarning() { 19 | super.didReceiveMemoryWarning() 20 | // Dispose of any resources that can be recreated. 21 | } 22 | 23 | 24 | } 25 | 26 | -------------------------------------------------------------------------------- /SpotIt.xcodeproj/xcuserdata/gabriel.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SpotIt.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | C08500931BF3AA9500DD9194 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /SpotIt/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /SpotIt/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 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 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /SpotIt/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 | 26 | -------------------------------------------------------------------------------- /SpotIt/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 | 27 | 28 | -------------------------------------------------------------------------------- /SpotIt/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // SpotIt 4 | // 5 | // Created by Gabriel Theodoropoulos on 11/11/15. 6 | // Copyright © 2015 Appcoda. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(application: UIApplication) { 23 | // 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. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /SpotIt.xcodeproj/xcuserdata/gabriel.xcuserdatad/xcschemes/SpotIt.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /SpotIt.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C08500981BF3AA9500DD9194 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08500971BF3AA9500DD9194 /* AppDelegate.swift */; }; 11 | C085009A1BF3AA9500DD9194 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08500991BF3AA9500DD9194 /* ViewController.swift */; }; 12 | C085009D1BF3AA9500DD9194 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C085009B1BF3AA9500DD9194 /* Main.storyboard */; }; 13 | C085009F1BF3AA9500DD9194 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C085009E1BF3AA9500DD9194 /* Assets.xcassets */; }; 14 | C08500A21BF3AA9500DD9194 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C08500A01BF3AA9500DD9194 /* LaunchScreen.storyboard */; }; 15 | /* End PBXBuildFile section */ 16 | 17 | /* Begin PBXFileReference section */ 18 | C08500941BF3AA9500DD9194 /* SpotIt.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SpotIt.app; sourceTree = BUILT_PRODUCTS_DIR; }; 19 | C08500971BF3AA9500DD9194 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 20 | C08500991BF3AA9500DD9194 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 21 | C085009C1BF3AA9500DD9194 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 22 | C085009E1BF3AA9500DD9194 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 23 | C08500A11BF3AA9500DD9194 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 24 | C08500A31BF3AA9500DD9194 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 25 | /* End PBXFileReference section */ 26 | 27 | /* Begin PBXFrameworksBuildPhase section */ 28 | C08500911BF3AA9500DD9194 /* Frameworks */ = { 29 | isa = PBXFrameworksBuildPhase; 30 | buildActionMask = 2147483647; 31 | files = ( 32 | ); 33 | runOnlyForDeploymentPostprocessing = 0; 34 | }; 35 | /* End PBXFrameworksBuildPhase section */ 36 | 37 | /* Begin PBXGroup section */ 38 | C085008B1BF3AA9500DD9194 = { 39 | isa = PBXGroup; 40 | children = ( 41 | C08500961BF3AA9500DD9194 /* SpotIt */, 42 | C08500951BF3AA9500DD9194 /* Products */, 43 | ); 44 | sourceTree = ""; 45 | }; 46 | C08500951BF3AA9500DD9194 /* Products */ = { 47 | isa = PBXGroup; 48 | children = ( 49 | C08500941BF3AA9500DD9194 /* SpotIt.app */, 50 | ); 51 | name = Products; 52 | sourceTree = ""; 53 | }; 54 | C08500961BF3AA9500DD9194 /* SpotIt */ = { 55 | isa = PBXGroup; 56 | children = ( 57 | C08500971BF3AA9500DD9194 /* AppDelegate.swift */, 58 | C08500991BF3AA9500DD9194 /* ViewController.swift */, 59 | C085009B1BF3AA9500DD9194 /* Main.storyboard */, 60 | C085009E1BF3AA9500DD9194 /* Assets.xcassets */, 61 | C08500A01BF3AA9500DD9194 /* LaunchScreen.storyboard */, 62 | C08500A31BF3AA9500DD9194 /* Info.plist */, 63 | ); 64 | path = SpotIt; 65 | sourceTree = ""; 66 | }; 67 | /* End PBXGroup section */ 68 | 69 | /* Begin PBXNativeTarget section */ 70 | C08500931BF3AA9500DD9194 /* SpotIt */ = { 71 | isa = PBXNativeTarget; 72 | buildConfigurationList = C08500A61BF3AA9500DD9194 /* Build configuration list for PBXNativeTarget "SpotIt" */; 73 | buildPhases = ( 74 | C08500901BF3AA9500DD9194 /* Sources */, 75 | C08500911BF3AA9500DD9194 /* Frameworks */, 76 | C08500921BF3AA9500DD9194 /* Resources */, 77 | ); 78 | buildRules = ( 79 | ); 80 | dependencies = ( 81 | ); 82 | name = SpotIt; 83 | productName = SpotIt; 84 | productReference = C08500941BF3AA9500DD9194 /* SpotIt.app */; 85 | productType = "com.apple.product-type.application"; 86 | }; 87 | /* End PBXNativeTarget section */ 88 | 89 | /* Begin PBXProject section */ 90 | C085008C1BF3AA9500DD9194 /* Project object */ = { 91 | isa = PBXProject; 92 | attributes = { 93 | LastUpgradeCheck = 0700; 94 | ORGANIZATIONNAME = Appcoda; 95 | TargetAttributes = { 96 | C08500931BF3AA9500DD9194 = { 97 | CreatedOnToolsVersion = 7.0; 98 | }; 99 | }; 100 | }; 101 | buildConfigurationList = C085008F1BF3AA9500DD9194 /* Build configuration list for PBXProject "SpotIt" */; 102 | compatibilityVersion = "Xcode 3.2"; 103 | developmentRegion = English; 104 | hasScannedForEncodings = 0; 105 | knownRegions = ( 106 | en, 107 | Base, 108 | ); 109 | mainGroup = C085008B1BF3AA9500DD9194; 110 | productRefGroup = C08500951BF3AA9500DD9194 /* Products */; 111 | projectDirPath = ""; 112 | projectRoot = ""; 113 | targets = ( 114 | C08500931BF3AA9500DD9194 /* SpotIt */, 115 | ); 116 | }; 117 | /* End PBXProject section */ 118 | 119 | /* Begin PBXResourcesBuildPhase section */ 120 | C08500921BF3AA9500DD9194 /* Resources */ = { 121 | isa = PBXResourcesBuildPhase; 122 | buildActionMask = 2147483647; 123 | files = ( 124 | C08500A21BF3AA9500DD9194 /* LaunchScreen.storyboard in Resources */, 125 | C085009F1BF3AA9500DD9194 /* Assets.xcassets in Resources */, 126 | C085009D1BF3AA9500DD9194 /* Main.storyboard in Resources */, 127 | ); 128 | runOnlyForDeploymentPostprocessing = 0; 129 | }; 130 | /* End PBXResourcesBuildPhase section */ 131 | 132 | /* Begin PBXSourcesBuildPhase section */ 133 | C08500901BF3AA9500DD9194 /* Sources */ = { 134 | isa = PBXSourcesBuildPhase; 135 | buildActionMask = 2147483647; 136 | files = ( 137 | C085009A1BF3AA9500DD9194 /* ViewController.swift in Sources */, 138 | C08500981BF3AA9500DD9194 /* AppDelegate.swift in Sources */, 139 | ); 140 | runOnlyForDeploymentPostprocessing = 0; 141 | }; 142 | /* End PBXSourcesBuildPhase section */ 143 | 144 | /* Begin PBXVariantGroup section */ 145 | C085009B1BF3AA9500DD9194 /* Main.storyboard */ = { 146 | isa = PBXVariantGroup; 147 | children = ( 148 | C085009C1BF3AA9500DD9194 /* Base */, 149 | ); 150 | name = Main.storyboard; 151 | sourceTree = ""; 152 | }; 153 | C08500A01BF3AA9500DD9194 /* LaunchScreen.storyboard */ = { 154 | isa = PBXVariantGroup; 155 | children = ( 156 | C08500A11BF3AA9500DD9194 /* Base */, 157 | ); 158 | name = LaunchScreen.storyboard; 159 | sourceTree = ""; 160 | }; 161 | /* End PBXVariantGroup section */ 162 | 163 | /* Begin XCBuildConfiguration section */ 164 | C08500A41BF3AA9500DD9194 /* Debug */ = { 165 | isa = XCBuildConfiguration; 166 | buildSettings = { 167 | ALWAYS_SEARCH_USER_PATHS = NO; 168 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 169 | CLANG_CXX_LIBRARY = "libc++"; 170 | CLANG_ENABLE_MODULES = YES; 171 | CLANG_ENABLE_OBJC_ARC = YES; 172 | CLANG_WARN_BOOL_CONVERSION = YES; 173 | CLANG_WARN_CONSTANT_CONVERSION = YES; 174 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 175 | CLANG_WARN_EMPTY_BODY = YES; 176 | CLANG_WARN_ENUM_CONVERSION = YES; 177 | CLANG_WARN_INT_CONVERSION = YES; 178 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 179 | CLANG_WARN_UNREACHABLE_CODE = YES; 180 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 181 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 182 | COPY_PHASE_STRIP = NO; 183 | DEBUG_INFORMATION_FORMAT = dwarf; 184 | ENABLE_STRICT_OBJC_MSGSEND = YES; 185 | ENABLE_TESTABILITY = YES; 186 | GCC_C_LANGUAGE_STANDARD = gnu99; 187 | GCC_DYNAMIC_NO_PIC = NO; 188 | GCC_NO_COMMON_BLOCKS = YES; 189 | GCC_OPTIMIZATION_LEVEL = 0; 190 | GCC_PREPROCESSOR_DEFINITIONS = ( 191 | "DEBUG=1", 192 | "$(inherited)", 193 | ); 194 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 195 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 196 | GCC_WARN_UNDECLARED_SELECTOR = YES; 197 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 198 | GCC_WARN_UNUSED_FUNCTION = YES; 199 | GCC_WARN_UNUSED_VARIABLE = YES; 200 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 201 | MTL_ENABLE_DEBUG_INFO = YES; 202 | ONLY_ACTIVE_ARCH = YES; 203 | SDKROOT = iphoneos; 204 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 205 | }; 206 | name = Debug; 207 | }; 208 | C08500A51BF3AA9500DD9194 /* Release */ = { 209 | isa = XCBuildConfiguration; 210 | buildSettings = { 211 | ALWAYS_SEARCH_USER_PATHS = NO; 212 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 213 | CLANG_CXX_LIBRARY = "libc++"; 214 | CLANG_ENABLE_MODULES = YES; 215 | CLANG_ENABLE_OBJC_ARC = YES; 216 | CLANG_WARN_BOOL_CONVERSION = YES; 217 | CLANG_WARN_CONSTANT_CONVERSION = YES; 218 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 219 | CLANG_WARN_EMPTY_BODY = YES; 220 | CLANG_WARN_ENUM_CONVERSION = YES; 221 | CLANG_WARN_INT_CONVERSION = YES; 222 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 223 | CLANG_WARN_UNREACHABLE_CODE = YES; 224 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 225 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 226 | COPY_PHASE_STRIP = NO; 227 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 228 | ENABLE_NS_ASSERTIONS = NO; 229 | ENABLE_STRICT_OBJC_MSGSEND = YES; 230 | GCC_C_LANGUAGE_STANDARD = gnu99; 231 | GCC_NO_COMMON_BLOCKS = YES; 232 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 233 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 234 | GCC_WARN_UNDECLARED_SELECTOR = YES; 235 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 236 | GCC_WARN_UNUSED_FUNCTION = YES; 237 | GCC_WARN_UNUSED_VARIABLE = YES; 238 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 239 | MTL_ENABLE_DEBUG_INFO = NO; 240 | SDKROOT = iphoneos; 241 | VALIDATE_PRODUCT = YES; 242 | }; 243 | name = Release; 244 | }; 245 | C08500A71BF3AA9500DD9194 /* Debug */ = { 246 | isa = XCBuildConfiguration; 247 | buildSettings = { 248 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 249 | INFOPLIST_FILE = SpotIt/Info.plist; 250 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 251 | PRODUCT_BUNDLE_IDENTIFIER = com.appcoda.SpotIt; 252 | PRODUCT_NAME = "$(TARGET_NAME)"; 253 | }; 254 | name = Debug; 255 | }; 256 | C08500A81BF3AA9500DD9194 /* Release */ = { 257 | isa = XCBuildConfiguration; 258 | buildSettings = { 259 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 260 | INFOPLIST_FILE = SpotIt/Info.plist; 261 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 262 | PRODUCT_BUNDLE_IDENTIFIER = com.appcoda.SpotIt; 263 | PRODUCT_NAME = "$(TARGET_NAME)"; 264 | }; 265 | name = Release; 266 | }; 267 | /* End XCBuildConfiguration section */ 268 | 269 | /* Begin XCConfigurationList section */ 270 | C085008F1BF3AA9500DD9194 /* Build configuration list for PBXProject "SpotIt" */ = { 271 | isa = XCConfigurationList; 272 | buildConfigurations = ( 273 | C08500A41BF3AA9500DD9194 /* Debug */, 274 | C08500A51BF3AA9500DD9194 /* Release */, 275 | ); 276 | defaultConfigurationIsVisible = 0; 277 | defaultConfigurationName = Release; 278 | }; 279 | C08500A61BF3AA9500DD9194 /* Build configuration list for PBXNativeTarget "SpotIt" */ = { 280 | isa = XCConfigurationList; 281 | buildConfigurations = ( 282 | C08500A71BF3AA9500DD9194 /* Debug */, 283 | C08500A81BF3AA9500DD9194 /* Release */, 284 | ); 285 | defaultConfigurationIsVisible = 0; 286 | }; 287 | /* End XCConfigurationList section */ 288 | }; 289 | rootObject = C085008C1BF3AA9500DD9194 /* Project object */; 290 | } 291 | --------------------------------------------------------------------------------