├── .travis.yml ├── App-Domain.png ├── MC-Domain.png ├── README.md ├── Universal Links ├── Universal Links.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── emp195.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── emp195.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── Universal Links.xcscheme │ │ └── xcschememanagement.plist └── Universal Links │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-40.png │ │ ├── Icon-40@2x.png │ │ ├── Icon-40@3x.png │ │ ├── Icon-60@2x.png │ │ ├── Icon-60@3x.png │ │ ├── Icon-76.png │ │ ├── Icon-76@2x.png │ │ ├── Icon-83.5@2x.png │ │ ├── Icon-Small.png │ │ ├── Icon-Small@2x.png │ │ └── Icon-Small@3x.png │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── Universal Links.entitlements │ ├── Universal_Links.xcdatamodeld │ ├── .xccurrentversion │ └── Universal_Links.xcdatamodel │ │ └── contents │ ├── ViewController.h │ ├── ViewController.m │ └── main.m ├── screen.gif └── target.png /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | xcode_project: Universal Links/Universal Links.xcodeproj # path to your xcodeproj folder 3 | osx_image: xcode7.3 4 | -------------------------------------------------------------------------------- /App-Domain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vineetchoudhary/iOS-Universal-Links/c3070d3b940b35295615e5da1bbf48e7e7d1a6fb/App-Domain.png -------------------------------------------------------------------------------- /MC-Domain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vineetchoudhary/iOS-Universal-Links/c3070d3b940b35295615e5da1bbf48e7e7d1a6fb/MC-Domain.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Build Status](https://travis-ci.org/vineetchoudhary/iOS-Universal-Links.svg?branch=master)](https://travis-ci.org/vineetchoudhary/iOS-Universal-Links) 2 | 3 | # iOS Universal Links 4 | Universal Links, iOS 9 users can tap a link to your website and get seamlessly redirected to your installed app without going through Safari. If your app isn’t installed, tapping a link to your website opens your website in Safari. 5 | 6 | # Support Universal Links 7 | When you support universal links, iOS 9 users can tap a link to your website and get seamlessly redirected to your installed app without going through Safari. If your app isn’t installed, tapping a link to your website opens your website in Safari. 8 | 9 | I’ll show how to setup your own server, and handle the corresponding links in your app 10 | 11 | ## Server Setup 12 | You need to having a server running online. To securely associate your iOS app with a server, Apple requires that you make available a configuration file, called apple-app-site-association. This is a JSON file which describes the domain and supported routes. 13 | 14 | The apple-app-site-association file needs to be accessible via HTTPS, without any redirects, at https://{domain}/apple-app-site-association. 15 | 16 | The file looks like this: 17 | 18 | { 19 | "applinks": { 20 | "apps": [ ], 21 | "details": [ 22 | { 23 | "appID": "{app_prefix}.{app_identifier}", 24 | "paths": [ "/path/to/content", "/path/to/other/*", "NOT /path/to/exclude" ] 25 | }, 26 | { 27 | "appID": "TeamID.BundleID2", 28 | "paths": [ "*" ] 29 | } 30 | ] 31 | } 32 | } 33 | 34 | 35 | __NOTE__ - Don’t append .json to the apple-app-site-association filename. 36 | 37 | 38 | The keys are as follows: 39 | `apps`: Should have an empty array as its value, and it must be present. This is how Apple wants it. 40 | `details`: Is an array of dictionaries, one for each iOS app supported by the website. Each dictionary contains information about the app, the team and bundle IDs. 41 | 42 | There are 3 ways to define paths: 43 | `Static`: The entire supported path is hardcoded to identify a specific link, e.g. /static/terms 44 | `Wildcards`: A * can be used to match dynamic paths, e.g. /books/* can matches the path to any author’s page. ? inside specific path components, e.g. books/1? can be used to match any books whose ID starts with 1. 45 | `Exclusions`: Prepending a path with NOT excludes that path from being matched. 46 | 47 | The order in which the paths are mentioned in the array is important. Earlier indices have higher priority. Once a path matches, the evaluation stops, and other paths ignored. Each path is case-sensitive. 48 | 49 | ### Supporting Multiple Domains 50 | Each domain supported in the app needs to make available its own apple-app-site-association file. If the content served by each domain is different, then the contents of the file will also change to support the respective paths. Otherwise, the same file can be used, but it needs to be accessible at every supported domain. 51 | 52 | ### Signing the App-Site-Association File 53 | If your app targets iOS 9 and your server uses HTTPS to serve content, you don’t need to sign the file. If not (e.g. when supporting Handoff on iOS 8), it has to be signed using a SSL certificate from a recognized certificate authority. 54 | 55 | __Note__: This is not the certificate provided by Apple to submit your app to the App Store. It should be provided by a third-party, and it’s recommended to use the same certificate you use for your HTTPS server (although it’s not required). 56 | 57 | To sign the file, first create and save a simple .txt version of it. Next, in the terminal, run the following command: 58 | 59 | cat .txt | openssl smime -sign -inkey example.com.key -signer example.com.pem -certfile intermediate.pem -noattr -nodetach -outform DER > apple-app-site-association 60 | 61 | This will output the signed file in the current directory. The example.com.key, example.com.pem, and intermediate.pem are the files that would made available to you by your Certifying Authority. 62 | 63 | __Note__: If the file is unsigned, it should have a Content-Type of application/json. Otherwise, it should be application/pkcs7-mime. 64 | 65 | 66 | The website code can be found gh-pages branch on https://github.com/vineetchoudhary/iOS-Universal-Links/tree/gh-pages 67 | 68 | ## App Setup 69 | Next is the app, that mirrors the server. It will target iOS 9 and will be using Xcode 7.2 with Objective-C. 70 | 71 | The app code can be found master branch on https://github.com/vineetchoudhary/iOS-Universal-Links/ 72 | 73 | ### Enabling Universal Links 74 | The setup on the app side requires two things: 75 | - Configuring the app’s entitlement, and enabling universal links. 76 | - Handling Incoming Links in your AppDelegate. 77 | 78 | #### Configuring the app’s entitlement, and enabling universal links. 79 | The first step in configuring your app’s entitlements is to enable it for your App ID. Do this in the Apple Developer Member Center. Click on Certificates, Identifiers & Profiles and then Identifiers. Select your App ID (create it first if required), click Edit and enable the Associated Domains entitlement. 80 | ![](/MC-Domain.png) 81 | 82 | Next, get the App ID prefix and suffix by clicking on the respective App ID. 83 | 84 | The App ID prefix and suffix should match the one in the apple-app-site-association file. 85 | 86 | Next in Xcode, select your App’s target, click Capabilities and toggle Associated Domains to On. Add an entry for each domain that your app supports, prefixed with applinks:. 87 | 88 | For example: applinks:vineetchoudhary.github.io 89 | 90 | Which looks like this for the sample app: 91 | ![](/App-Domain.png) 92 | 93 | __Note__: Ensure you have selected the same team and entered the same Bundle ID as the registered App ID on the Member Center. Also ensure that the entitlements file is included by Xcode by selecting the file and in the File Inspector, ensure that your target is checked. 94 | ![](/target.png) 95 | 96 | 97 | 98 | #### Handling Incoming Links in your AppDelegate. 99 | `[UIApplicationDelegate application: continueUserActivity: restorationHandler:]` method in AppDelegate.m handles incoming links. You parse this URL to determine the right action in the app. 100 | 101 | For example, in the sample app: 102 | 103 | -(BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray * _Nullable))restorationHandler{ 104 | if ([userActivity.activityType isEqualToString: NSUserActivityTypeBrowsingWeb]) { 105 | NSURL *url = userActivity.webpageURL; 106 | UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; 107 | UINavigationController *navigationController = (UINavigationController *)_window.rootViewController; 108 | if ([url.pathComponents containsObject:@"home"]) { 109 | [navigationController pushViewController:[storyBoard instantiateViewControllerWithIdentifier:@"HomeScreenId"] animated:YES]; 110 | }else if ([url.pathComponents containsObject:@"about"]){ 111 | [navigationController pushViewController:[storyBoard instantiateViewControllerWithIdentifier:@"AboutScreenId"] animated:YES]; 112 | } 113 | } 114 | return YES; 115 | } 116 | 117 | ### DONE 118 | 119 | ![](/screen.gif) 120 | 121 | ### References 122 | https://developer.apple.com/library/ios/documentation/General/Conceptual/AppSearch/UniversalLinks.html 123 | http://www.developerinsider.in/enable-universal-links-in-ios-app-and-setup-server-for-it/ 124 | -------------------------------------------------------------------------------- /Universal Links/Universal Links.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | E12E3C381C7DAF9500AD4F20 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E12E3C371C7DAF9500AD4F20 /* main.m */; }; 11 | E12E3C3B1C7DAF9500AD4F20 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E12E3C3A1C7DAF9500AD4F20 /* AppDelegate.m */; }; 12 | E12E3C3E1C7DAF9500AD4F20 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E12E3C3D1C7DAF9500AD4F20 /* ViewController.m */; }; 13 | E12E3C411C7DAF9500AD4F20 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E12E3C3F1C7DAF9500AD4F20 /* Main.storyboard */; }; 14 | E12E3C441C7DAF9500AD4F20 /* Universal_Links.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = E12E3C421C7DAF9500AD4F20 /* Universal_Links.xcdatamodeld */; }; 15 | E12E3C461C7DAF9500AD4F20 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E12E3C451C7DAF9500AD4F20 /* Assets.xcassets */; }; 16 | E12E3C491C7DAF9500AD4F20 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E12E3C471C7DAF9500AD4F20 /* LaunchScreen.storyboard */; }; 17 | E12E3C511C7DBD8800AD4F20 /* Universal Links.entitlements in Resources */ = {isa = PBXBuildFile; fileRef = E12E3C501C7DBD1000AD4F20 /* Universal Links.entitlements */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXFileReference section */ 21 | E12E3C331C7DAF9500AD4F20 /* Universal Links.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Universal Links.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | E12E3C371C7DAF9500AD4F20 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 23 | E12E3C391C7DAF9500AD4F20 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 24 | E12E3C3A1C7DAF9500AD4F20 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 25 | E12E3C3C1C7DAF9500AD4F20 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 26 | E12E3C3D1C7DAF9500AD4F20 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 27 | E12E3C401C7DAF9500AD4F20 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 28 | E12E3C431C7DAF9500AD4F20 /* Universal_Links.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Universal_Links.xcdatamodel; sourceTree = ""; }; 29 | E12E3C451C7DAF9500AD4F20 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 30 | E12E3C481C7DAF9500AD4F20 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 31 | E12E3C4A1C7DAF9500AD4F20 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 32 | E12E3C501C7DBD1000AD4F20 /* Universal Links.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "Universal Links.entitlements"; sourceTree = ""; }; 33 | /* End PBXFileReference section */ 34 | 35 | /* Begin PBXFrameworksBuildPhase section */ 36 | E12E3C301C7DAF9500AD4F20 /* Frameworks */ = { 37 | isa = PBXFrameworksBuildPhase; 38 | buildActionMask = 2147483647; 39 | files = ( 40 | ); 41 | runOnlyForDeploymentPostprocessing = 0; 42 | }; 43 | /* End PBXFrameworksBuildPhase section */ 44 | 45 | /* Begin PBXGroup section */ 46 | E12E3C2A1C7DAF9500AD4F20 = { 47 | isa = PBXGroup; 48 | children = ( 49 | E12E3C351C7DAF9500AD4F20 /* Universal Links */, 50 | E12E3C341C7DAF9500AD4F20 /* Products */, 51 | ); 52 | sourceTree = ""; 53 | }; 54 | E12E3C341C7DAF9500AD4F20 /* Products */ = { 55 | isa = PBXGroup; 56 | children = ( 57 | E12E3C331C7DAF9500AD4F20 /* Universal Links.app */, 58 | ); 59 | name = Products; 60 | sourceTree = ""; 61 | }; 62 | E12E3C351C7DAF9500AD4F20 /* Universal Links */ = { 63 | isa = PBXGroup; 64 | children = ( 65 | E12E3C501C7DBD1000AD4F20 /* Universal Links.entitlements */, 66 | E12E3C391C7DAF9500AD4F20 /* AppDelegate.h */, 67 | E12E3C3A1C7DAF9500AD4F20 /* AppDelegate.m */, 68 | E12E3C3C1C7DAF9500AD4F20 /* ViewController.h */, 69 | E12E3C3D1C7DAF9500AD4F20 /* ViewController.m */, 70 | E12E3C3F1C7DAF9500AD4F20 /* Main.storyboard */, 71 | E12E3C451C7DAF9500AD4F20 /* Assets.xcassets */, 72 | E12E3C471C7DAF9500AD4F20 /* LaunchScreen.storyboard */, 73 | E12E3C4A1C7DAF9500AD4F20 /* Info.plist */, 74 | E12E3C421C7DAF9500AD4F20 /* Universal_Links.xcdatamodeld */, 75 | E12E3C361C7DAF9500AD4F20 /* Supporting Files */, 76 | ); 77 | path = "Universal Links"; 78 | sourceTree = ""; 79 | }; 80 | E12E3C361C7DAF9500AD4F20 /* Supporting Files */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | E12E3C371C7DAF9500AD4F20 /* main.m */, 84 | ); 85 | name = "Supporting Files"; 86 | sourceTree = ""; 87 | }; 88 | /* End PBXGroup section */ 89 | 90 | /* Begin PBXNativeTarget section */ 91 | E12E3C321C7DAF9500AD4F20 /* Universal Links */ = { 92 | isa = PBXNativeTarget; 93 | buildConfigurationList = E12E3C4D1C7DAF9500AD4F20 /* Build configuration list for PBXNativeTarget "Universal Links" */; 94 | buildPhases = ( 95 | E12E3C2F1C7DAF9500AD4F20 /* Sources */, 96 | E12E3C301C7DAF9500AD4F20 /* Frameworks */, 97 | E12E3C311C7DAF9500AD4F20 /* Resources */, 98 | ); 99 | buildRules = ( 100 | ); 101 | dependencies = ( 102 | ); 103 | name = "Universal Links"; 104 | productName = "Universal Links"; 105 | productReference = E12E3C331C7DAF9500AD4F20 /* Universal Links.app */; 106 | productType = "com.apple.product-type.application"; 107 | }; 108 | /* End PBXNativeTarget section */ 109 | 110 | /* Begin PBXProject section */ 111 | E12E3C2B1C7DAF9500AD4F20 /* Project object */ = { 112 | isa = PBXProject; 113 | attributes = { 114 | LastUpgradeCheck = 0720; 115 | ORGANIZATIONNAME = "Vineet Choudhary"; 116 | TargetAttributes = { 117 | E12E3C321C7DAF9500AD4F20 = { 118 | CreatedOnToolsVersion = 7.2; 119 | DevelopmentTeam = M8HBL5W4VV; 120 | SystemCapabilities = { 121 | com.apple.SafariKeychain = { 122 | enabled = 1; 123 | }; 124 | }; 125 | }; 126 | }; 127 | }; 128 | buildConfigurationList = E12E3C2E1C7DAF9500AD4F20 /* Build configuration list for PBXProject "Universal Links" */; 129 | compatibilityVersion = "Xcode 3.2"; 130 | developmentRegion = English; 131 | hasScannedForEncodings = 0; 132 | knownRegions = ( 133 | en, 134 | Base, 135 | ); 136 | mainGroup = E12E3C2A1C7DAF9500AD4F20; 137 | productRefGroup = E12E3C341C7DAF9500AD4F20 /* Products */; 138 | projectDirPath = ""; 139 | projectRoot = ""; 140 | targets = ( 141 | E12E3C321C7DAF9500AD4F20 /* Universal Links */, 142 | ); 143 | }; 144 | /* End PBXProject section */ 145 | 146 | /* Begin PBXResourcesBuildPhase section */ 147 | E12E3C311C7DAF9500AD4F20 /* Resources */ = { 148 | isa = PBXResourcesBuildPhase; 149 | buildActionMask = 2147483647; 150 | files = ( 151 | E12E3C511C7DBD8800AD4F20 /* Universal Links.entitlements in Resources */, 152 | E12E3C491C7DAF9500AD4F20 /* LaunchScreen.storyboard in Resources */, 153 | E12E3C461C7DAF9500AD4F20 /* Assets.xcassets in Resources */, 154 | E12E3C411C7DAF9500AD4F20 /* Main.storyboard in Resources */, 155 | ); 156 | runOnlyForDeploymentPostprocessing = 0; 157 | }; 158 | /* End PBXResourcesBuildPhase section */ 159 | 160 | /* Begin PBXSourcesBuildPhase section */ 161 | E12E3C2F1C7DAF9500AD4F20 /* Sources */ = { 162 | isa = PBXSourcesBuildPhase; 163 | buildActionMask = 2147483647; 164 | files = ( 165 | E12E3C3E1C7DAF9500AD4F20 /* ViewController.m in Sources */, 166 | E12E3C441C7DAF9500AD4F20 /* Universal_Links.xcdatamodeld in Sources */, 167 | E12E3C3B1C7DAF9500AD4F20 /* AppDelegate.m in Sources */, 168 | E12E3C381C7DAF9500AD4F20 /* main.m in Sources */, 169 | ); 170 | runOnlyForDeploymentPostprocessing = 0; 171 | }; 172 | /* End PBXSourcesBuildPhase section */ 173 | 174 | /* Begin PBXVariantGroup section */ 175 | E12E3C3F1C7DAF9500AD4F20 /* Main.storyboard */ = { 176 | isa = PBXVariantGroup; 177 | children = ( 178 | E12E3C401C7DAF9500AD4F20 /* Base */, 179 | ); 180 | name = Main.storyboard; 181 | sourceTree = ""; 182 | }; 183 | E12E3C471C7DAF9500AD4F20 /* LaunchScreen.storyboard */ = { 184 | isa = PBXVariantGroup; 185 | children = ( 186 | E12E3C481C7DAF9500AD4F20 /* Base */, 187 | ); 188 | name = LaunchScreen.storyboard; 189 | sourceTree = ""; 190 | }; 191 | /* End PBXVariantGroup section */ 192 | 193 | /* Begin XCBuildConfiguration section */ 194 | E12E3C4B1C7DAF9500AD4F20 /* Debug */ = { 195 | isa = XCBuildConfiguration; 196 | buildSettings = { 197 | ALWAYS_SEARCH_USER_PATHS = NO; 198 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 199 | CLANG_CXX_LIBRARY = "libc++"; 200 | CLANG_ENABLE_MODULES = YES; 201 | CLANG_ENABLE_OBJC_ARC = YES; 202 | CLANG_WARN_BOOL_CONVERSION = YES; 203 | CLANG_WARN_CONSTANT_CONVERSION = YES; 204 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 205 | CLANG_WARN_EMPTY_BODY = YES; 206 | CLANG_WARN_ENUM_CONVERSION = YES; 207 | CLANG_WARN_INT_CONVERSION = YES; 208 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 209 | CLANG_WARN_UNREACHABLE_CODE = YES; 210 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 211 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 212 | COPY_PHASE_STRIP = NO; 213 | DEBUG_INFORMATION_FORMAT = dwarf; 214 | ENABLE_STRICT_OBJC_MSGSEND = YES; 215 | ENABLE_TESTABILITY = YES; 216 | GCC_C_LANGUAGE_STANDARD = gnu99; 217 | GCC_DYNAMIC_NO_PIC = NO; 218 | GCC_NO_COMMON_BLOCKS = YES; 219 | GCC_OPTIMIZATION_LEVEL = 0; 220 | GCC_PREPROCESSOR_DEFINITIONS = ( 221 | "DEBUG=1", 222 | "$(inherited)", 223 | ); 224 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 225 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 226 | GCC_WARN_UNDECLARED_SELECTOR = YES; 227 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 228 | GCC_WARN_UNUSED_FUNCTION = YES; 229 | GCC_WARN_UNUSED_VARIABLE = YES; 230 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 231 | MTL_ENABLE_DEBUG_INFO = YES; 232 | ONLY_ACTIVE_ARCH = YES; 233 | PROVISIONING_PROFILE = "c1f388f6-1611-4477-8fc5-b00b49c71e86"; 234 | SDKROOT = iphoneos; 235 | TARGETED_DEVICE_FAMILY = "1,2"; 236 | }; 237 | name = Debug; 238 | }; 239 | E12E3C4C1C7DAF9500AD4F20 /* Release */ = { 240 | isa = XCBuildConfiguration; 241 | buildSettings = { 242 | ALWAYS_SEARCH_USER_PATHS = NO; 243 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 244 | CLANG_CXX_LIBRARY = "libc++"; 245 | CLANG_ENABLE_MODULES = YES; 246 | CLANG_ENABLE_OBJC_ARC = YES; 247 | CLANG_WARN_BOOL_CONVERSION = YES; 248 | CLANG_WARN_CONSTANT_CONVERSION = YES; 249 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 250 | CLANG_WARN_EMPTY_BODY = YES; 251 | CLANG_WARN_ENUM_CONVERSION = YES; 252 | CLANG_WARN_INT_CONVERSION = YES; 253 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 254 | CLANG_WARN_UNREACHABLE_CODE = YES; 255 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 256 | CODE_SIGN_IDENTITY = "iPhone Distribution: Finoit Technologies (I) Pvt. Ltd. (M8HBL5W4VV)"; 257 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Finoit Technologies (I) Pvt. Ltd. (M8HBL5W4VV)"; 258 | COPY_PHASE_STRIP = NO; 259 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 260 | ENABLE_NS_ASSERTIONS = NO; 261 | ENABLE_STRICT_OBJC_MSGSEND = YES; 262 | GCC_C_LANGUAGE_STANDARD = gnu99; 263 | GCC_NO_COMMON_BLOCKS = YES; 264 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 265 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 266 | GCC_WARN_UNDECLARED_SELECTOR = YES; 267 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 268 | GCC_WARN_UNUSED_FUNCTION = YES; 269 | GCC_WARN_UNUSED_VARIABLE = YES; 270 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 271 | MTL_ENABLE_DEBUG_INFO = NO; 272 | PROVISIONING_PROFILE = "c1f388f6-1611-4477-8fc5-b00b49c71e86"; 273 | SDKROOT = iphoneos; 274 | TARGETED_DEVICE_FAMILY = "1,2"; 275 | VALIDATE_PRODUCT = YES; 276 | }; 277 | name = Release; 278 | }; 279 | E12E3C4E1C7DAF9500AD4F20 /* Debug */ = { 280 | isa = XCBuildConfiguration; 281 | buildSettings = { 282 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 283 | CODE_SIGN_ENTITLEMENTS = "Universal Links/Universal Links.entitlements"; 284 | CODE_SIGN_IDENTITY = "iPhone Developer"; 285 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 286 | INFOPLIST_FILE = "Universal Links/Info.plist"; 287 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 288 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 289 | PRODUCT_BUNDLE_IDENTIFIER = "com.Universal-Links"; 290 | PRODUCT_NAME = "$(TARGET_NAME)"; 291 | PROVISIONING_PROFILE = ""; 292 | }; 293 | name = Debug; 294 | }; 295 | E12E3C4F1C7DAF9500AD4F20 /* Release */ = { 296 | isa = XCBuildConfiguration; 297 | buildSettings = { 298 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 299 | CODE_SIGN_ENTITLEMENTS = "Universal Links/Universal Links.entitlements"; 300 | CODE_SIGN_IDENTITY = "iPhone Developer"; 301 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 302 | INFOPLIST_FILE = "Universal Links/Info.plist"; 303 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 304 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 305 | PRODUCT_BUNDLE_IDENTIFIER = "com.Universal-Links"; 306 | PRODUCT_NAME = "$(TARGET_NAME)"; 307 | PROVISIONING_PROFILE = ""; 308 | }; 309 | name = Release; 310 | }; 311 | /* End XCBuildConfiguration section */ 312 | 313 | /* Begin XCConfigurationList section */ 314 | E12E3C2E1C7DAF9500AD4F20 /* Build configuration list for PBXProject "Universal Links" */ = { 315 | isa = XCConfigurationList; 316 | buildConfigurations = ( 317 | E12E3C4B1C7DAF9500AD4F20 /* Debug */, 318 | E12E3C4C1C7DAF9500AD4F20 /* Release */, 319 | ); 320 | defaultConfigurationIsVisible = 0; 321 | defaultConfigurationName = Release; 322 | }; 323 | E12E3C4D1C7DAF9500AD4F20 /* Build configuration list for PBXNativeTarget "Universal Links" */ = { 324 | isa = XCConfigurationList; 325 | buildConfigurations = ( 326 | E12E3C4E1C7DAF9500AD4F20 /* Debug */, 327 | E12E3C4F1C7DAF9500AD4F20 /* Release */, 328 | ); 329 | defaultConfigurationIsVisible = 0; 330 | defaultConfigurationName = Release; 331 | }; 332 | /* End XCConfigurationList section */ 333 | 334 | /* Begin XCVersionGroup section */ 335 | E12E3C421C7DAF9500AD4F20 /* Universal_Links.xcdatamodeld */ = { 336 | isa = XCVersionGroup; 337 | children = ( 338 | E12E3C431C7DAF9500AD4F20 /* Universal_Links.xcdatamodel */, 339 | ); 340 | currentVersion = E12E3C431C7DAF9500AD4F20 /* Universal_Links.xcdatamodel */; 341 | path = Universal_Links.xcdatamodeld; 342 | sourceTree = ""; 343 | versionGroupType = wrapper.xcdatamodel; 344 | }; 345 | /* End XCVersionGroup section */ 346 | }; 347 | rootObject = E12E3C2B1C7DAF9500AD4F20 /* Project object */; 348 | } 349 | -------------------------------------------------------------------------------- /Universal Links/Universal Links.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Universal Links/Universal Links.xcodeproj/project.xcworkspace/xcuserdata/emp195.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vineetchoudhary/iOS-Universal-Links/c3070d3b940b35295615e5da1bbf48e7e7d1a6fb/Universal Links/Universal Links.xcodeproj/project.xcworkspace/xcuserdata/emp195.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Universal Links/Universal Links.xcodeproj/xcuserdata/emp195.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /Universal Links/Universal Links.xcodeproj/xcuserdata/emp195.xcuserdatad/xcschemes/Universal Links.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 | -------------------------------------------------------------------------------- /Universal Links/Universal Links.xcodeproj/xcuserdata/emp195.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Universal Links.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | E12E3C321C7DAF9500AD4F20 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Universal Links/Universal Links/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // Universal Links 4 | // 5 | // Created by Vineet Choudhary on 24/02/16. 6 | // Copyright © 2016 Vineet Choudhary. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (strong, nonatomic) UIWindow *window; 15 | 16 | @property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext; 17 | @property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel; 18 | @property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator; 19 | 20 | - (void)saveContext; 21 | - (NSURL *)applicationDocumentsDirectory; 22 | 23 | 24 | @end 25 | 26 | -------------------------------------------------------------------------------- /Universal Links/Universal Links/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // Universal Links 4 | // 5 | // Created by Vineet Choudhary on 24/02/16. 6 | // Copyright © 2016 Vineet Choudhary. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // 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. 25 | // 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. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // 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. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // 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. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // 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. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | // Saves changes in the application's managed object context before the application terminates. 44 | [self saveContext]; 45 | } 46 | 47 | -(BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray * _Nullable))restorationHandler{ 48 | if ([userActivity.activityType isEqualToString: NSUserActivityTypeBrowsingWeb]) { 49 | NSURL *url = userActivity.webpageURL; 50 | UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; 51 | UINavigationController *navigationController = (UINavigationController *)_window.rootViewController; 52 | if ([url.pathComponents containsObject:@"home"]) { 53 | [navigationController pushViewController:[storyBoard instantiateViewControllerWithIdentifier:@"HomeScreenId"] animated:YES]; 54 | }else if ([url.pathComponents containsObject:@"about"]){ 55 | [navigationController pushViewController:[storyBoard instantiateViewControllerWithIdentifier:@"AboutScreenId"] animated:YES]; 56 | } 57 | } 58 | return YES; 59 | } 60 | 61 | #pragma mark - Core Data stack 62 | 63 | @synthesize managedObjectContext = _managedObjectContext; 64 | @synthesize managedObjectModel = _managedObjectModel; 65 | @synthesize persistentStoreCoordinator = _persistentStoreCoordinator; 66 | 67 | - (NSURL *)applicationDocumentsDirectory { 68 | // The directory the application uses to store the Core Data store file. This code uses a directory named "com.Universal_Links" in the application's documents directory. 69 | return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; 70 | } 71 | 72 | - (NSManagedObjectModel *)managedObjectModel { 73 | // The managed object model for the application. It is a fatal error for the application not to be able to find and load its model. 74 | if (_managedObjectModel != nil) { 75 | return _managedObjectModel; 76 | } 77 | NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"Universal_Links" withExtension:@"momd"]; 78 | _managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL]; 79 | return _managedObjectModel; 80 | } 81 | 82 | - (NSPersistentStoreCoordinator *)persistentStoreCoordinator { 83 | // The persistent store coordinator for the application. This implementation creates and returns a coordinator, having added the store for the application to it. 84 | if (_persistentStoreCoordinator != nil) { 85 | return _persistentStoreCoordinator; 86 | } 87 | 88 | // Create the coordinator and store 89 | 90 | _persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]]; 91 | NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"Universal_Links.sqlite"]; 92 | NSError *error = nil; 93 | NSString *failureReason = @"There was an error creating or loading the application's saved data."; 94 | if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error]) { 95 | // Report any error we got. 96 | NSMutableDictionary *dict = [NSMutableDictionary dictionary]; 97 | dict[NSLocalizedDescriptionKey] = @"Failed to initialize the application's saved data"; 98 | dict[NSLocalizedFailureReasonErrorKey] = failureReason; 99 | dict[NSUnderlyingErrorKey] = error; 100 | error = [NSError errorWithDomain:@"YOUR_ERROR_DOMAIN" code:9999 userInfo:dict]; 101 | // Replace this with code to handle the error appropriately. 102 | // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. 103 | NSLog(@"Unresolved error %@, %@", error, [error userInfo]); 104 | abort(); 105 | } 106 | 107 | return _persistentStoreCoordinator; 108 | } 109 | 110 | 111 | - (NSManagedObjectContext *)managedObjectContext { 112 | // Returns the managed object context for the application (which is already bound to the persistent store coordinator for the application.) 113 | if (_managedObjectContext != nil) { 114 | return _managedObjectContext; 115 | } 116 | 117 | NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator]; 118 | if (!coordinator) { 119 | return nil; 120 | } 121 | _managedObjectContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSMainQueueConcurrencyType]; 122 | [_managedObjectContext setPersistentStoreCoordinator:coordinator]; 123 | return _managedObjectContext; 124 | } 125 | 126 | #pragma mark - Core Data Saving support 127 | 128 | - (void)saveContext { 129 | NSManagedObjectContext *managedObjectContext = self.managedObjectContext; 130 | if (managedObjectContext != nil) { 131 | NSError *error = nil; 132 | if ([managedObjectContext hasChanges] && ![managedObjectContext save:&error]) { 133 | // Replace this implementation with code to handle the error appropriately. 134 | // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. 135 | NSLog(@"Unresolved error %@, %@", error, [error userInfo]); 136 | abort(); 137 | } 138 | } 139 | } 140 | 141 | @end 142 | -------------------------------------------------------------------------------- /Universal Links/Universal Links/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-Small@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "29x29", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-Small@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "40x40", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-40@2x.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "40x40", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-40@3x.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "60x60", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-60@2x.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "60x60", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-60@3x.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "29x29", 41 | "idiom" : "ipad", 42 | "filename" : "Icon-Small.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "29x29", 47 | "idiom" : "ipad", 48 | "filename" : "Icon-Small@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "40x40", 53 | "idiom" : "ipad", 54 | "filename" : "Icon-40.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "40x40", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-40@2x.png", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "size" : "76x76", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-76.png", 67 | "scale" : "1x" 68 | }, 69 | { 70 | "size" : "76x76", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-76@2x.png", 73 | "scale" : "2x" 74 | }, 75 | { 76 | "size" : "83.5x83.5", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-83.5@2x.png", 79 | "scale" : "2x" 80 | } 81 | ], 82 | "info" : { 83 | "version" : 1, 84 | "author" : "xcode" 85 | } 86 | } -------------------------------------------------------------------------------- /Universal Links/Universal Links/Assets.xcassets/AppIcon.appiconset/Icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vineetchoudhary/iOS-Universal-Links/c3070d3b940b35295615e5da1bbf48e7e7d1a6fb/Universal Links/Universal Links/Assets.xcassets/AppIcon.appiconset/Icon-40.png -------------------------------------------------------------------------------- /Universal Links/Universal Links/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vineetchoudhary/iOS-Universal-Links/c3070d3b940b35295615e5da1bbf48e7e7d1a6fb/Universal Links/Universal Links/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png -------------------------------------------------------------------------------- /Universal Links/Universal Links/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vineetchoudhary/iOS-Universal-Links/c3070d3b940b35295615e5da1bbf48e7e7d1a6fb/Universal Links/Universal Links/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png -------------------------------------------------------------------------------- /Universal Links/Universal Links/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vineetchoudhary/iOS-Universal-Links/c3070d3b940b35295615e5da1bbf48e7e7d1a6fb/Universal Links/Universal Links/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png -------------------------------------------------------------------------------- /Universal Links/Universal Links/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vineetchoudhary/iOS-Universal-Links/c3070d3b940b35295615e5da1bbf48e7e7d1a6fb/Universal Links/Universal Links/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png -------------------------------------------------------------------------------- /Universal Links/Universal Links/Assets.xcassets/AppIcon.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vineetchoudhary/iOS-Universal-Links/c3070d3b940b35295615e5da1bbf48e7e7d1a6fb/Universal Links/Universal Links/Assets.xcassets/AppIcon.appiconset/Icon-76.png -------------------------------------------------------------------------------- /Universal Links/Universal Links/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vineetchoudhary/iOS-Universal-Links/c3070d3b940b35295615e5da1bbf48e7e7d1a6fb/Universal Links/Universal Links/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png -------------------------------------------------------------------------------- /Universal Links/Universal Links/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vineetchoudhary/iOS-Universal-Links/c3070d3b940b35295615e5da1bbf48e7e7d1a6fb/Universal Links/Universal Links/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png -------------------------------------------------------------------------------- /Universal Links/Universal Links/Assets.xcassets/AppIcon.appiconset/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vineetchoudhary/iOS-Universal-Links/c3070d3b940b35295615e5da1bbf48e7e7d1a6fb/Universal Links/Universal Links/Assets.xcassets/AppIcon.appiconset/Icon-Small.png -------------------------------------------------------------------------------- /Universal Links/Universal Links/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vineetchoudhary/iOS-Universal-Links/c3070d3b940b35295615e5da1bbf48e7e7d1a6fb/Universal Links/Universal Links/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png -------------------------------------------------------------------------------- /Universal Links/Universal Links/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vineetchoudhary/iOS-Universal-Links/c3070d3b940b35295615e5da1bbf48e7e7d1a6fb/Universal Links/Universal Links/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png -------------------------------------------------------------------------------- /Universal Links/Universal Links/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Universal Links/Universal Links/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 | -------------------------------------------------------------------------------- /Universal Links/Universal Links/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 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 46 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | -------------------------------------------------------------------------------- /Universal Links/Universal Links/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 | CFBundleURLTypes 22 | 23 | 24 | CFBundleTypeRole 25 | Editor 26 | CFBundleURLName 27 | universallinks 28 | CFBundleURLSchemes 29 | 30 | universallinks 31 | 32 | 33 | 34 | CFBundleVersion 35 | 1 36 | LSRequiresIPhoneOS 37 | 38 | UILaunchStoryboardName 39 | LaunchScreen 40 | UIMainStoryboardFile 41 | Main 42 | UIRequiredDeviceCapabilities 43 | 44 | armv7 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | UISupportedInterfaceOrientations~ipad 53 | 54 | UIInterfaceOrientationPortrait 55 | UIInterfaceOrientationPortraitUpsideDown 56 | UIInterfaceOrientationLandscapeLeft 57 | UIInterfaceOrientationLandscapeRight 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Universal Links/Universal Links/Universal Links.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.developer.associated-domains 6 | 7 | applinks:vineetchoudhary.github.io 8 | applinks:www.vineetchoudhary.github.io 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Universal Links/Universal Links/Universal_Links.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | Universal_Links.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /Universal Links/Universal Links/Universal_Links.xcdatamodeld/Universal_Links.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Universal Links/Universal Links/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // Universal Links 4 | // 5 | // Created by Vineet Choudhary on 24/02/16. 6 | // Copyright © 2016 Vineet Choudhary. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /Universal Links/Universal Links/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // Universal Links 4 | // 5 | // Created by Vineet Choudhary on 24/02/16. 6 | // Copyright © 2016 Vineet Choudhary. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | @interface ViewController () 12 | 13 | @end 14 | 15 | @implementation ViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view, typically from a nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Universal Links/Universal Links/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Universal Links 4 | // 5 | // Created by Vineet Choudhary on 24/02/16. 6 | // Copyright © 2016 Vineet Choudhary. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /screen.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vineetchoudhary/iOS-Universal-Links/c3070d3b940b35295615e5da1bbf48e7e7d1a6fb/screen.gif -------------------------------------------------------------------------------- /target.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vineetchoudhary/iOS-Universal-Links/c3070d3b940b35295615e5da1bbf48e7e7d1a6fb/target.png --------------------------------------------------------------------------------