├── .gitignore ├── CreateFirebaseDynamicLinks.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── CreateFirebaseDynamicLinks.xcworkspace └── contents.xcworkspacedata ├── CreateFirebaseDynamicLinks ├── AppDelegate.swift ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── DynamicLinkConfiguration.swift ├── Info.plist └── ViewController.swift ├── LICENSE ├── Podfile ├── Podfile.lock └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | ## Playgrounds 32 | timeline.xctimeline 33 | playground.xcworkspace 34 | 35 | # Swift Package Manager 36 | # 37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 38 | # Packages/ 39 | # Package.pins 40 | .build/ 41 | 42 | # CocoaPods 43 | # 44 | # We recommend against adding the Pods directory to your .gitignore. However 45 | # you should judge for yourself, the pros and cons are mentioned at: 46 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 47 | # 48 | # Pods/ 49 | 50 | # Carthage 51 | # 52 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 53 | # Carthage/Checkouts 54 | 55 | Carthage/Build 56 | 57 | # fastlane 58 | # 59 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 60 | # screenshots whenever they are needed. 61 | # For more information about the recommended setup visit: 62 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 63 | 64 | fastlane/report.xml 65 | fastlane/Preview.html 66 | fastlane/screenshots 67 | fastlane/test_output 68 | -------------------------------------------------------------------------------- /CreateFirebaseDynamicLinks.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0C1915A02063AA1C001E0C9B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C19159F2063AA1C001E0C9B /* AppDelegate.swift */; }; 11 | 0C1915A52063AA1C001E0C9B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0C1915A32063AA1C001E0C9B /* Main.storyboard */; }; 12 | 0C1915A72063AA1C001E0C9B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0C1915A62063AA1C001E0C9B /* Assets.xcassets */; }; 13 | 0C1915AA2063AA1C001E0C9B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0C1915A82063AA1C001E0C9B /* LaunchScreen.storyboard */; }; 14 | 0CDB458E2063AE4600973295 /* DynamicLinkConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CDB458C2063AE4600973295 /* DynamicLinkConfiguration.swift */; }; 15 | 0CDB45902063B2EB00973295 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CDB458F2063B2EA00973295 /* ViewController.swift */; }; 16 | E56D169B7458B27D2B6D04DA /* Pods_CreateFirebaseDynamicLinks.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB3ED2D956CD2E19103DF72A /* Pods_CreateFirebaseDynamicLinks.framework */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXFileReference section */ 20 | 0C19159C2063AA1C001E0C9B /* CreateFirebaseDynamicLinks.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CreateFirebaseDynamicLinks.app; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | 0C19159F2063AA1C001E0C9B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 22 | 0C1915A42063AA1C001E0C9B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 23 | 0C1915A62063AA1C001E0C9B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 24 | 0C1915A92063AA1C001E0C9B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 25 | 0C1915AB2063AA1C001E0C9B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 26 | 0CDB458C2063AE4600973295 /* DynamicLinkConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DynamicLinkConfiguration.swift; sourceTree = ""; }; 27 | 0CDB458F2063B2EA00973295 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 28 | 7501C60C9B3BDBFFFE706EB2 /* Pods-CreateFirebaseDynamicLinks.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CreateFirebaseDynamicLinks.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CreateFirebaseDynamicLinks/Pods-CreateFirebaseDynamicLinks.debug.xcconfig"; sourceTree = ""; }; 29 | C882D7A52258AB2EF2844599 /* Pods-CreateFirebaseDynamicLinks.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CreateFirebaseDynamicLinks.release.xcconfig"; path = "Pods/Target Support Files/Pods-CreateFirebaseDynamicLinks/Pods-CreateFirebaseDynamicLinks.release.xcconfig"; sourceTree = ""; }; 30 | CB3ED2D956CD2E19103DF72A /* Pods_CreateFirebaseDynamicLinks.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CreateFirebaseDynamicLinks.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | /* End PBXFileReference section */ 32 | 33 | /* Begin PBXFrameworksBuildPhase section */ 34 | 0C1915992063AA1C001E0C9B /* Frameworks */ = { 35 | isa = PBXFrameworksBuildPhase; 36 | buildActionMask = 2147483647; 37 | files = ( 38 | E56D169B7458B27D2B6D04DA /* Pods_CreateFirebaseDynamicLinks.framework in Frameworks */, 39 | ); 40 | runOnlyForDeploymentPostprocessing = 0; 41 | }; 42 | /* End PBXFrameworksBuildPhase section */ 43 | 44 | /* Begin PBXGroup section */ 45 | 0C1915932063AA1C001E0C9B = { 46 | isa = PBXGroup; 47 | children = ( 48 | 0C19159E2063AA1C001E0C9B /* CreateFirebaseDynamicLinks */, 49 | 0C19159D2063AA1C001E0C9B /* Products */, 50 | C662B3DFFDC6201E8CDACDCF /* Pods */, 51 | 7FD6C30997791351B7958F75 /* Frameworks */, 52 | ); 53 | sourceTree = ""; 54 | }; 55 | 0C19159D2063AA1C001E0C9B /* Products */ = { 56 | isa = PBXGroup; 57 | children = ( 58 | 0C19159C2063AA1C001E0C9B /* CreateFirebaseDynamicLinks.app */, 59 | ); 60 | name = Products; 61 | sourceTree = ""; 62 | }; 63 | 0C19159E2063AA1C001E0C9B /* CreateFirebaseDynamicLinks */ = { 64 | isa = PBXGroup; 65 | children = ( 66 | 0CDB458F2063B2EA00973295 /* ViewController.swift */, 67 | 0C19159F2063AA1C001E0C9B /* AppDelegate.swift */, 68 | 0CDB458C2063AE4600973295 /* DynamicLinkConfiguration.swift */, 69 | 0C1915A32063AA1C001E0C9B /* Main.storyboard */, 70 | 0C1915A62063AA1C001E0C9B /* Assets.xcassets */, 71 | 0C1915A82063AA1C001E0C9B /* LaunchScreen.storyboard */, 72 | 0C1915AB2063AA1C001E0C9B /* Info.plist */, 73 | ); 74 | path = CreateFirebaseDynamicLinks; 75 | sourceTree = ""; 76 | }; 77 | 7FD6C30997791351B7958F75 /* Frameworks */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | CB3ED2D956CD2E19103DF72A /* Pods_CreateFirebaseDynamicLinks.framework */, 81 | ); 82 | name = Frameworks; 83 | sourceTree = ""; 84 | }; 85 | C662B3DFFDC6201E8CDACDCF /* Pods */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | 7501C60C9B3BDBFFFE706EB2 /* Pods-CreateFirebaseDynamicLinks.debug.xcconfig */, 89 | C882D7A52258AB2EF2844599 /* Pods-CreateFirebaseDynamicLinks.release.xcconfig */, 90 | ); 91 | name = Pods; 92 | sourceTree = ""; 93 | }; 94 | /* End PBXGroup section */ 95 | 96 | /* Begin PBXNativeTarget section */ 97 | 0C19159B2063AA1C001E0C9B /* CreateFirebaseDynamicLinks */ = { 98 | isa = PBXNativeTarget; 99 | buildConfigurationList = 0C1915AE2063AA1C001E0C9B /* Build configuration list for PBXNativeTarget "CreateFirebaseDynamicLinks" */; 100 | buildPhases = ( 101 | DA199D3D8BA2F489CF7A5369 /* [CP] Check Pods Manifest.lock */, 102 | 0C1915982063AA1C001E0C9B /* Sources */, 103 | 0C1915992063AA1C001E0C9B /* Frameworks */, 104 | 0C19159A2063AA1C001E0C9B /* Resources */, 105 | 051E73E26A6510355615BD22 /* [CP] Embed Pods Frameworks */, 106 | 7D638B748C99E3C41BE954D2 /* [CP] Copy Pods Resources */, 107 | ); 108 | buildRules = ( 109 | ); 110 | dependencies = ( 111 | ); 112 | name = CreateFirebaseDynamicLinks; 113 | productName = CreateFirebaseDynamicLinks; 114 | productReference = 0C19159C2063AA1C001E0C9B /* CreateFirebaseDynamicLinks.app */; 115 | productType = "com.apple.product-type.application"; 116 | }; 117 | /* End PBXNativeTarget section */ 118 | 119 | /* Begin PBXProject section */ 120 | 0C1915942063AA1C001E0C9B /* Project object */ = { 121 | isa = PBXProject; 122 | attributes = { 123 | LastSwiftUpdateCheck = 0920; 124 | LastUpgradeCheck = 0920; 125 | ORGANIZATIONNAME = "Simform Solutions PVT. LTD"; 126 | TargetAttributes = { 127 | 0C19159B2063AA1C001E0C9B = { 128 | CreatedOnToolsVersion = 9.2; 129 | ProvisioningStyle = Automatic; 130 | }; 131 | }; 132 | }; 133 | buildConfigurationList = 0C1915972063AA1C001E0C9B /* Build configuration list for PBXProject "CreateFirebaseDynamicLinks" */; 134 | compatibilityVersion = "Xcode 8.0"; 135 | developmentRegion = en; 136 | hasScannedForEncodings = 0; 137 | knownRegions = ( 138 | en, 139 | Base, 140 | ); 141 | mainGroup = 0C1915932063AA1C001E0C9B; 142 | productRefGroup = 0C19159D2063AA1C001E0C9B /* Products */; 143 | projectDirPath = ""; 144 | projectRoot = ""; 145 | targets = ( 146 | 0C19159B2063AA1C001E0C9B /* CreateFirebaseDynamicLinks */, 147 | ); 148 | }; 149 | /* End PBXProject section */ 150 | 151 | /* Begin PBXResourcesBuildPhase section */ 152 | 0C19159A2063AA1C001E0C9B /* Resources */ = { 153 | isa = PBXResourcesBuildPhase; 154 | buildActionMask = 2147483647; 155 | files = ( 156 | 0C1915AA2063AA1C001E0C9B /* LaunchScreen.storyboard in Resources */, 157 | 0C1915A72063AA1C001E0C9B /* Assets.xcassets in Resources */, 158 | 0C1915A52063AA1C001E0C9B /* Main.storyboard in Resources */, 159 | ); 160 | runOnlyForDeploymentPostprocessing = 0; 161 | }; 162 | /* End PBXResourcesBuildPhase section */ 163 | 164 | /* Begin PBXShellScriptBuildPhase section */ 165 | 051E73E26A6510355615BD22 /* [CP] Embed Pods Frameworks */ = { 166 | isa = PBXShellScriptBuildPhase; 167 | buildActionMask = 2147483647; 168 | files = ( 169 | ); 170 | inputPaths = ( 171 | "${SRCROOT}/Pods/Target Support Files/Pods-CreateFirebaseDynamicLinks/Pods-CreateFirebaseDynamicLinks-frameworks.sh", 172 | "${BUILT_PRODUCTS_DIR}/GoogleToolboxForMac/GoogleToolboxForMac.framework", 173 | "${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework", 174 | ); 175 | name = "[CP] Embed Pods Frameworks"; 176 | outputPaths = ( 177 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleToolboxForMac.framework", 178 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework", 179 | ); 180 | runOnlyForDeploymentPostprocessing = 0; 181 | shellPath = /bin/sh; 182 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CreateFirebaseDynamicLinks/Pods-CreateFirebaseDynamicLinks-frameworks.sh\"\n"; 183 | showEnvVarsInLog = 0; 184 | }; 185 | 7D638B748C99E3C41BE954D2 /* [CP] Copy Pods Resources */ = { 186 | isa = PBXShellScriptBuildPhase; 187 | buildActionMask = 2147483647; 188 | files = ( 189 | ); 190 | inputPaths = ( 191 | ); 192 | name = "[CP] Copy Pods Resources"; 193 | outputPaths = ( 194 | ); 195 | runOnlyForDeploymentPostprocessing = 0; 196 | shellPath = /bin/sh; 197 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CreateFirebaseDynamicLinks/Pods-CreateFirebaseDynamicLinks-resources.sh\"\n"; 198 | showEnvVarsInLog = 0; 199 | }; 200 | DA199D3D8BA2F489CF7A5369 /* [CP] Check Pods Manifest.lock */ = { 201 | isa = PBXShellScriptBuildPhase; 202 | buildActionMask = 2147483647; 203 | files = ( 204 | ); 205 | inputPaths = ( 206 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 207 | "${PODS_ROOT}/Manifest.lock", 208 | ); 209 | name = "[CP] Check Pods Manifest.lock"; 210 | outputPaths = ( 211 | "$(DERIVED_FILE_DIR)/Pods-CreateFirebaseDynamicLinks-checkManifestLockResult.txt", 212 | ); 213 | runOnlyForDeploymentPostprocessing = 0; 214 | shellPath = /bin/sh; 215 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 216 | showEnvVarsInLog = 0; 217 | }; 218 | /* End PBXShellScriptBuildPhase section */ 219 | 220 | /* Begin PBXSourcesBuildPhase section */ 221 | 0C1915982063AA1C001E0C9B /* Sources */ = { 222 | isa = PBXSourcesBuildPhase; 223 | buildActionMask = 2147483647; 224 | files = ( 225 | 0CDB45902063B2EB00973295 /* ViewController.swift in Sources */, 226 | 0CDB458E2063AE4600973295 /* DynamicLinkConfiguration.swift in Sources */, 227 | 0C1915A02063AA1C001E0C9B /* AppDelegate.swift in Sources */, 228 | ); 229 | runOnlyForDeploymentPostprocessing = 0; 230 | }; 231 | /* End PBXSourcesBuildPhase section */ 232 | 233 | /* Begin PBXVariantGroup section */ 234 | 0C1915A32063AA1C001E0C9B /* Main.storyboard */ = { 235 | isa = PBXVariantGroup; 236 | children = ( 237 | 0C1915A42063AA1C001E0C9B /* Base */, 238 | ); 239 | name = Main.storyboard; 240 | sourceTree = ""; 241 | }; 242 | 0C1915A82063AA1C001E0C9B /* LaunchScreen.storyboard */ = { 243 | isa = PBXVariantGroup; 244 | children = ( 245 | 0C1915A92063AA1C001E0C9B /* Base */, 246 | ); 247 | name = LaunchScreen.storyboard; 248 | sourceTree = ""; 249 | }; 250 | /* End PBXVariantGroup section */ 251 | 252 | /* Begin XCBuildConfiguration section */ 253 | 0C1915AC2063AA1C001E0C9B /* Debug */ = { 254 | isa = XCBuildConfiguration; 255 | buildSettings = { 256 | ALWAYS_SEARCH_USER_PATHS = NO; 257 | CLANG_ANALYZER_NONNULL = YES; 258 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 259 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 260 | CLANG_CXX_LIBRARY = "libc++"; 261 | CLANG_ENABLE_MODULES = YES; 262 | CLANG_ENABLE_OBJC_ARC = YES; 263 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 264 | CLANG_WARN_BOOL_CONVERSION = YES; 265 | CLANG_WARN_COMMA = YES; 266 | CLANG_WARN_CONSTANT_CONVERSION = YES; 267 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 268 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 269 | CLANG_WARN_EMPTY_BODY = YES; 270 | CLANG_WARN_ENUM_CONVERSION = YES; 271 | CLANG_WARN_INFINITE_RECURSION = YES; 272 | CLANG_WARN_INT_CONVERSION = YES; 273 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 274 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 275 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 276 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 277 | CLANG_WARN_STRICT_PROTOTYPES = YES; 278 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 279 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 280 | CLANG_WARN_UNREACHABLE_CODE = YES; 281 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 282 | CODE_SIGN_IDENTITY = "iPhone Developer"; 283 | COPY_PHASE_STRIP = NO; 284 | DEBUG_INFORMATION_FORMAT = dwarf; 285 | ENABLE_STRICT_OBJC_MSGSEND = YES; 286 | ENABLE_TESTABILITY = YES; 287 | GCC_C_LANGUAGE_STANDARD = gnu11; 288 | GCC_DYNAMIC_NO_PIC = NO; 289 | GCC_NO_COMMON_BLOCKS = YES; 290 | GCC_OPTIMIZATION_LEVEL = 0; 291 | GCC_PREPROCESSOR_DEFINITIONS = ( 292 | "DEBUG=1", 293 | "$(inherited)", 294 | ); 295 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 296 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 297 | GCC_WARN_UNDECLARED_SELECTOR = YES; 298 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 299 | GCC_WARN_UNUSED_FUNCTION = YES; 300 | GCC_WARN_UNUSED_VARIABLE = YES; 301 | IPHONEOS_DEPLOYMENT_TARGET = 11.2; 302 | MTL_ENABLE_DEBUG_INFO = YES; 303 | ONLY_ACTIVE_ARCH = YES; 304 | SDKROOT = iphoneos; 305 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 306 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 307 | }; 308 | name = Debug; 309 | }; 310 | 0C1915AD2063AA1C001E0C9B /* Release */ = { 311 | isa = XCBuildConfiguration; 312 | buildSettings = { 313 | ALWAYS_SEARCH_USER_PATHS = NO; 314 | CLANG_ANALYZER_NONNULL = YES; 315 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 316 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 317 | CLANG_CXX_LIBRARY = "libc++"; 318 | CLANG_ENABLE_MODULES = YES; 319 | CLANG_ENABLE_OBJC_ARC = YES; 320 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 321 | CLANG_WARN_BOOL_CONVERSION = YES; 322 | CLANG_WARN_COMMA = YES; 323 | CLANG_WARN_CONSTANT_CONVERSION = YES; 324 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 325 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 326 | CLANG_WARN_EMPTY_BODY = YES; 327 | CLANG_WARN_ENUM_CONVERSION = YES; 328 | CLANG_WARN_INFINITE_RECURSION = YES; 329 | CLANG_WARN_INT_CONVERSION = YES; 330 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 331 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 333 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 334 | CLANG_WARN_STRICT_PROTOTYPES = YES; 335 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 336 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 337 | CLANG_WARN_UNREACHABLE_CODE = YES; 338 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 339 | CODE_SIGN_IDENTITY = "iPhone Developer"; 340 | COPY_PHASE_STRIP = NO; 341 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 342 | ENABLE_NS_ASSERTIONS = NO; 343 | ENABLE_STRICT_OBJC_MSGSEND = YES; 344 | GCC_C_LANGUAGE_STANDARD = gnu11; 345 | GCC_NO_COMMON_BLOCKS = YES; 346 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 347 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 348 | GCC_WARN_UNDECLARED_SELECTOR = YES; 349 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 350 | GCC_WARN_UNUSED_FUNCTION = YES; 351 | GCC_WARN_UNUSED_VARIABLE = YES; 352 | IPHONEOS_DEPLOYMENT_TARGET = 11.2; 353 | MTL_ENABLE_DEBUG_INFO = NO; 354 | SDKROOT = iphoneos; 355 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 356 | VALIDATE_PRODUCT = YES; 357 | }; 358 | name = Release; 359 | }; 360 | 0C1915AF2063AA1C001E0C9B /* Debug */ = { 361 | isa = XCBuildConfiguration; 362 | baseConfigurationReference = 7501C60C9B3BDBFFFE706EB2 /* Pods-CreateFirebaseDynamicLinks.debug.xcconfig */; 363 | buildSettings = { 364 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 365 | CODE_SIGN_STYLE = Automatic; 366 | DEVELOPMENT_TEAM = Y98X8JAPH6; 367 | INFOPLIST_FILE = CreateFirebaseDynamicLinks/Info.plist; 368 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 369 | PRODUCT_BUNDLE_IDENTIFIER = com.simformsolutions.CreateFirebaseDynamicLinks; 370 | PRODUCT_NAME = "$(TARGET_NAME)"; 371 | SWIFT_VERSION = 4.0; 372 | TARGETED_DEVICE_FAMILY = "1,2"; 373 | }; 374 | name = Debug; 375 | }; 376 | 0C1915B02063AA1C001E0C9B /* Release */ = { 377 | isa = XCBuildConfiguration; 378 | baseConfigurationReference = C882D7A52258AB2EF2844599 /* Pods-CreateFirebaseDynamicLinks.release.xcconfig */; 379 | buildSettings = { 380 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 381 | CODE_SIGN_STYLE = Automatic; 382 | DEVELOPMENT_TEAM = Y98X8JAPH6; 383 | INFOPLIST_FILE = CreateFirebaseDynamicLinks/Info.plist; 384 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 385 | PRODUCT_BUNDLE_IDENTIFIER = com.simformsolutions.CreateFirebaseDynamicLinks; 386 | PRODUCT_NAME = "$(TARGET_NAME)"; 387 | SWIFT_VERSION = 4.0; 388 | TARGETED_DEVICE_FAMILY = "1,2"; 389 | }; 390 | name = Release; 391 | }; 392 | /* End XCBuildConfiguration section */ 393 | 394 | /* Begin XCConfigurationList section */ 395 | 0C1915972063AA1C001E0C9B /* Build configuration list for PBXProject "CreateFirebaseDynamicLinks" */ = { 396 | isa = XCConfigurationList; 397 | buildConfigurations = ( 398 | 0C1915AC2063AA1C001E0C9B /* Debug */, 399 | 0C1915AD2063AA1C001E0C9B /* Release */, 400 | ); 401 | defaultConfigurationIsVisible = 0; 402 | defaultConfigurationName = Release; 403 | }; 404 | 0C1915AE2063AA1C001E0C9B /* Build configuration list for PBXNativeTarget "CreateFirebaseDynamicLinks" */ = { 405 | isa = XCConfigurationList; 406 | buildConfigurations = ( 407 | 0C1915AF2063AA1C001E0C9B /* Debug */, 408 | 0C1915B02063AA1C001E0C9B /* Release */, 409 | ); 410 | defaultConfigurationIsVisible = 0; 411 | defaultConfigurationName = Release; 412 | }; 413 | /* End XCConfigurationList section */ 414 | }; 415 | rootObject = 0C1915942063AA1C001E0C9B /* Project object */; 416 | } 417 | -------------------------------------------------------------------------------- /CreateFirebaseDynamicLinks.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CreateFirebaseDynamicLinks.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /CreateFirebaseDynamicLinks/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // CreateFirebaseDynamicLinks 4 | // 5 | // Created by Sumit Goswami on 22/03/18. 6 | // Copyright © 2018 Simform Solutions PVT. LTD. 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: [UIApplicationLaunchOptionsKey: Any]?) -> 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 invalidate graphics rendering callbacks. 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 active 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 | -------------------------------------------------------------------------------- /CreateFirebaseDynamicLinks/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 | } -------------------------------------------------------------------------------- /CreateFirebaseDynamicLinks/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 | -------------------------------------------------------------------------------- /CreateFirebaseDynamicLinks/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 | -------------------------------------------------------------------------------- /CreateFirebaseDynamicLinks/DynamicLinkConfiguration.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DynamicLinkConfiguration.swift 3 | // swipe 4 | // 5 | // Created by Sumit Goswami on 08/03/18. 6 | // Copyright © 2018 Simform Solutions PVT. LTD. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Firebase 11 | import FirebaseDynamicLinks 12 | 13 | struct DynamicLinkParams { 14 | // dyanamic Link Domain 15 | static let dynamicLinkDomain = "your_dynamic_link_domin" 16 | // your app web link 17 | static let link:String = "your_app_web_site" //"http://www.google.com?" 18 | 19 | //iOS Params 20 | static let appStoreID:String = "your_appstore_id" 21 | static let bundleID:String = "your_app_bundle_id" 22 | static let iOSFallbackUrl:String = "your_app_appstore_link" 23 | static let minimumAppVersion:String = "your_app_minimum_app_version" 24 | 25 | //Andriod Params 26 | static let packageName:String = "your_app_package_name" 27 | static let androidFallbackURL:String = "your_app_playstore_link" 28 | static let minimumVersion:String = "minimum_version" 29 | 30 | // put this BudleId in customURLScheme -> ProjectNavigator -> select Target -> info -> URL Types 31 | static let customURLScheme:String = "BundleId" 32 | } 33 | 34 | typealias CompletionHandler = (_ success:Bool,_ shortLink:URL?,_ longLinkURL:URL?) -> Void 35 | typealias DynamicLinkHandler = (_ success:Bool,_ dictionary:[String:String]) -> Void 36 | 37 | class DynamicLinkConfiguration: NSObject { 38 | 39 | struct Static { 40 | static let instance = DynamicLinkConfiguration() 41 | } 42 | 43 | class var shared: DynamicLinkConfiguration { 44 | return Static.instance 45 | } 46 | 47 | 48 | 49 | // MARK:- Build DynamicLink 50 | func buildFirebaseDynamicLink(customParams:[String:String],completionHandler:@escaping CompletionHandler) { 51 | 52 | let linkString = DynamicLinkParams.link.appending(setCustomParams(params: customParams)) 53 | let link = URL(string: linkString) 54 | let components = DynamicLinkComponents(link: link!, domain: DynamicLinkParams.dynamicLinkDomain) 55 | 56 | let iOSParams = DynamicLinkIOSParameters(bundleID: DynamicLinkParams.bundleID) 57 | iOSParams.fallbackURL = URL(string: DynamicLinkParams.iOSFallbackUrl) 58 | iOSParams.minimumAppVersion = DynamicLinkParams.minimumAppVersion 59 | iOSParams.customScheme = DynamicLinkParams.customURLScheme 60 | iOSParams.appStoreID = DynamicLinkParams.appStoreID 61 | components.iOSParameters = iOSParams 62 | 63 | let androidParams = DynamicLinkAndroidParameters(packageName: DynamicLinkParams.packageName) 64 | androidParams.fallbackURL = URL(string: DynamicLinkParams.androidFallbackURL) 65 | if let intVersion = Int(DynamicLinkParams.minimumVersion) { 66 | androidParams.minimumVersion = intVersion 67 | } 68 | components.androidParameters = androidParams 69 | 70 | let longLink:URL = components.url! 71 | let options = DynamicLinkComponentsOptions() 72 | options.pathLength = .unguessable 73 | components.options = options 74 | components.shorten { (shortURL, warnings, error) in 75 | if let error = error { 76 | completionHandler(false,nil,nil) 77 | print(error.localizedDescription) 78 | return 79 | } 80 | let shortURLString = shortURL?.absoluteString.replacingOccurrences(of: "https://", with: "") 81 | let shortLink:URL = URL(string: shortURLString!)! 82 | print("shortLink",shortLink.absoluteString) 83 | completionHandler(true,shortLink,longLink) 84 | } 85 | } 86 | // MARK: setCustom parameter for link 87 | func setCustomParams(params:[String:String]) -> String { 88 | var link:String = "" 89 | let allKeys = Array(params.keys) 90 | let allvalues = Array(params.values) 91 | for i in 0.. Bool{ 98 | 99 | return (DynamicLinks.dynamicLinks()?.handleUniversalLink(url, completion: { (dynamicLink, error) in 100 | if let dynamicLink = dynamicLink, let _ = dynamicLink.url { 101 | print("==",dynamicLink) 102 | completionHandler(true,(dynamicLink.url?.queryDictionary)!) 103 | } else { 104 | completionHandler(false,[:]) 105 | } 106 | }))! 107 | } 108 | } 109 | 110 | 111 | //MARK:- To Featch Data From URL 112 | extension URL { 113 | var queryDictionary: [String: String] { 114 | guard let components = URLComponents(string: absoluteString), let items = components.queryItems else { return [:] } 115 | return items.reduce([:]) { dictionary, item in 116 | var dictionary = dictionary 117 | dictionary[item.name] = item.value 118 | return dictionary 119 | } 120 | } 121 | } 122 | 123 | //Handle Firbase dynamic link 124 | extension AppDelegate { 125 | func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool { 126 | 127 | if let incomingURL = userActivity.webpageURL { 128 | return DynamicLinkConfiguration.shared.handelDynamicLink(url: incomingURL, completionHandler: { (sucess, dictionary) in 129 | print(dictionary) 130 | }) 131 | } 132 | return false 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /CreateFirebaseDynamicLinks/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 | CFBundleURLTypes 20 | 21 | 22 | CFBundleTypeRole 23 | Editor 24 | CFBundleURLSchemes 25 | 26 | BundleId 27 | 28 | 29 | 30 | CFBundleVersion 31 | 1 32 | LSRequiresIPhoneOS 33 | 34 | UILaunchStoryboardName 35 | LaunchScreen 36 | UIMainStoryboardFile 37 | Main 38 | UIRequiredDeviceCapabilities 39 | 40 | armv7 41 | 42 | UISupportedInterfaceOrientations 43 | 44 | UIInterfaceOrientationPortrait 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | UISupportedInterfaceOrientations~ipad 49 | 50 | UIInterfaceOrientationPortrait 51 | UIInterfaceOrientationPortraitUpsideDown 52 | UIInterfaceOrientationLandscapeLeft 53 | UIInterfaceOrientationLandscapeRight 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /CreateFirebaseDynamicLinks/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // FireBaseDynamicLinkReuabelClass 4 | // 5 | // Created by Sumit Goswami on 08/03/18. 6 | // Copyright © 2018 Simform Solutions PVT. LTD. 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 | let parm:[String:String] = ["uname":"abc","pass":"123","call":"yes"] 17 | DynamicLinkConfiguration.shared.buildFirebaseDynamicLink(customParams: parm) { (sucess, shortLink, longLink) in 18 | if sucess { 19 | print(shortLink ?? "") 20 | print(longLink ?? "") 21 | } 22 | } 23 | } 24 | 25 | 26 | override func didReceiveMemoryWarning() { 27 | super.didReceiveMemoryWarning() 28 | // Dispose of any resources that can be recreated. 29 | } 30 | 31 | 32 | } 33 | 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Simform 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'CreateFirebaseDynamicLinks' do 5 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 6 | pod 'Firebase/Core','~> 4.9.0’ 7 | pod 'Firebase/DynamicLinks','~> 4.9.0’ 8 | use_frameworks! 9 | 10 | # Pods for CreateFirebaseDynamicLinks 11 | 12 | end 13 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Firebase/Core (4.9.0): 3 | - FirebaseAnalytics (= 4.0.9) 4 | - FirebaseCore (= 4.0.15) 5 | - Firebase/DynamicLinks (4.9.0): 6 | - Firebase/Core 7 | - FirebaseDynamicLinks (= 2.3.2) 8 | - FirebaseAnalytics (4.0.9): 9 | - FirebaseCore (~> 4.0) 10 | - FirebaseInstanceID (~> 2.0) 11 | - GoogleToolboxForMac/NSData+zlib (~> 2.1) 12 | - nanopb (~> 0.3) 13 | - FirebaseCore (4.0.15): 14 | - GoogleToolboxForMac/NSData+zlib (~> 2.1) 15 | - FirebaseDynamicLinks (2.3.2): 16 | - FirebaseAnalytics (~> 4.0) 17 | - FirebaseInstanceID (2.0.9): 18 | - FirebaseCore (~> 4.0) 19 | - GoogleToolboxForMac/Defines (2.1.3) 20 | - GoogleToolboxForMac/NSData+zlib (2.1.3): 21 | - GoogleToolboxForMac/Defines (= 2.1.3) 22 | - nanopb (0.3.8): 23 | - nanopb/decode (= 0.3.8) 24 | - nanopb/encode (= 0.3.8) 25 | - nanopb/decode (0.3.8) 26 | - nanopb/encode (0.3.8) 27 | 28 | DEPENDENCIES: 29 | - Firebase/Core (~> 4.9.0) 30 | - Firebase/DynamicLinks (~> 4.9.0) 31 | 32 | SPEC CHECKSUMS: 33 | Firebase: 632216af3ed7f31e3be34776947fdc7546cfb572 34 | FirebaseAnalytics: 388b630c15713f5dbf364071f5f3d6077fb52f4e 35 | FirebaseCore: 3bd047463058fa6b5d312c97502c52e45401cdfb 36 | FirebaseDynamicLinks: 38b68641d24e78d0277a9205d988ce22875d5a25 37 | FirebaseInstanceID: d2058a35e9bebda1b6dd42486b84917bde552a9d 38 | GoogleToolboxForMac: 2501e2ad72a52eb3dfe7bd9aee7dad11b858bd20 39 | nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3 40 | 41 | PODFILE CHECKSUM: e2835598cb200ebf6f7eaefb853d5222f93f0977 42 | 43 | COCOAPODS: 1.4.0 44 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FireBase DynamicLink Reuabel Class 2 | 3 | 4 | The FireBaseDynamicLinkReuabelClass provide the sharing data between both ios and android plateforms. 5 | 6 | 7 | ## Features 8 | 9 | - [x] Sharing data between both ios and android plateforms. 10 | - [x] Geting data between both ios and android plateforms. 11 | 12 | ## Requirements 13 | 14 | - iOS 8.0+ 15 | - Xcode 7.3 16 | 17 | ## Installation 18 | 19 | #### Take DynamicLinkConfiguration.swift, Import this file in your project and configure DynamicLinkParams and it's done 20 | 21 | #### Manually 22 | 1. Configure FirebaseBase Settings for iOS (https://firebase.google.com/docs/ios/setup) 23 | 2. Download FirebaseBase SDK Or Pod's for iOS 24 | 3. Add SDK to Project 25 | 4. Configure Xcode Project 26 | 5. Configure FirebaseBaseDynamicLinks Settings for iOS (https://firebase.google.com/docs/dynamic-links/) 27 | 6. Connect App Delegate Using DynamicLinkConfiguration.swift Methods 28 | 7. Congratulations! 29 | 30 | ## Usage example 31 | 32 | ##### First configure the perams 33 | 34 | ```swift 35 | struct DynamicLinkParams { 36 | // dyanamic Link Domain 37 | static let dynamicLinkDomain = "your_dynamic_link_domin" 38 | // your app web link 39 | static let link:String = "your_app_web_site" //"http://www.google.com?" 40 | 41 | //iOS Params 42 | static let appStoreID:String = "your_appstore_id" 43 | static let bundleID:String = "your_app_bundle_id" 44 | static let iOSFallbackUrl:String = "your_app_appstore_link" 45 | static let minimumAppVersion:String = "your_app_minimum_app_version" 46 | 47 | //Andriod Params 48 | static let packageName:String = "your_app_package_name" 49 | static let androidFallbackURL:String = "your_app_playstore_link" 50 | static let minimumVersion:String = "minimum_version" 51 | 52 | // put this BudleId in customURLScheme -> ProjectNavigator -> select Target -> info -> URL Types 53 | static let customURLScheme:String = "BundleId" 54 | } 55 | ``` 56 | ##### Create dynamiclink 57 | ```swift 58 | 59 | let parm:[String:String] = ["uname":"abc","pass":"123","call":"yes"] 60 | DynamicLinkConfiguration.shared.buildFirebaseDynamicLink(customParams: parm) { (sucess, shortLink, longLink) in 61 | if sucess { 62 | print(shortLink) 63 | print(longLink) 64 | } 65 | } 66 | ``` 67 | ##### Handle dynamiclink in AppDelegate 68 | ```swift 69 | // 70 | extension AppDelegate { 71 | func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool { 72 | 73 | if let incomingURL = userActivity.webpageURL { 74 | return DynamicLinkConfiguration.shared.handelDynamicLink(url: incomingURL, completionHandler: { (sucess, dictionary) in 75 | print(dictionary)// you will get data here 76 | }) 77 | } 78 | return false 79 | } 80 | } 81 | // 82 | ``` 83 | 84 | 85 | --------------------------------------------------------------------------------