Validate that apple-app-site-association files are set up correctly

Overview

SwiftAASAValidator

Validate that apple-app-site-association files are set up correctly

The idea is you can use these functions in your test suite for doing automated tests on the validity of your apple-app-site-association file

Fetching your apple-app-site-association files

To fetch the apple-app-site-association files, create a URL which is your domain, such as

let domainUrl:URL = URL(string:"https://www.example.com")!

and retrieve the two urls for the allowed locations like so:

let appleAppSiteAssociationURLs:[URL] = try! domainUrl.urlsForAppleAppSiteAssociation()

Then use the urls to fetch the files. it shoudle exist at one of the two locations.

Deserializing an apple-app-site-association file

Once you've fetched the Data of the apple-app-site-association file, deserialize it with a JSONDecoder, like so:

let appleAppSiteAssociation:AppleAppSiteAssociation = try! JSONDecoder().decode(AppleAppSiteAssociation.self, from: data)

Testing matching URLs

Test which app ids can be linked for a given URL, using the .matchedAppIds(...) method.

let testUrl:URL = URL(string: "https://www.example.com/buy/")!
let testAppId:String = "ABCED1234.com.example.app"
XCTAssertEqual(appleAppSiteAssociation.applinks?.matchedAppIds(testUrl).contains(testAppId), true)

Each class within contains its own testing methods and its properties can be introspected.

Unsupported features

percentEncoded is not handled correctly

You might also like...
Simple App for European people who need to validate an EU VAT number, calculate your VAT, check current VAT rates in Europe
Simple App for European people who need to validate an EU VAT number, calculate your VAT, check current VAT rates in Europe

Simple App for European people who need to validate an EU VAT number, calculate your VAT, check current VAT rates in Europe. How many euros can you save if you freelanced in another country? You can find out! Make more money now!

SwiftDate 🐔 Toolkit to parse, validate, manipulate, compare and display dates, time & timezones in Swift.
SwiftDate 🐔 Toolkit to parse, validate, manipulate, compare and display dates, time & timezones in Swift.

Toolkit to parse, validate, manipulate, compare and display dates, time & timezones in Swift. What's This? SwiftDate is the definitive toolchain to ma

A framework to validate inputs of text fields and text views in a convenient way.

FormValidatorSwift The FormValidatorSwift framework allows you to validate inputs of text fields and text views in a convenient way. It has been devel

 ValidatedPropertyKit enables you to easily validate your properties
ValidatedPropertyKit enables you to easily validate your properties

ValidatedPropertyKit enables you to easily validate your properties with the power of Property Wrappers.

Swift String Validator. Simple lib for ios to validate string and UITextFields text for some criterias

Swift String validator About Library for easy and fastest string validation based on сciterias. Instalation KKStringValidator is available through Coc

A framework to validate inputs of text fields and text views in a convenient way.

FormValidatorSwift The FormValidatorSwift framework allows you to validate inputs of text fields and text views in a convenient way. It has been devel

Easily validate your Properties with Property Wrappers 👮
Easily validate your Properties with Property Wrappers 👮

ValidatedPropertyKit enables you to easily validate your properties with the power of Property Wrappers. struct LoginView: View { @Validated(

KYC-iOS-Native - To Scan Doc and Validate KYC

KYC-iOS-Native Example To run the example project, clone the repo, and run pod i

A beautiful set of predefined colors and a set of color methods to make your iOS/OSX development life easier.
A beautiful set of predefined colors and a set of color methods to make your iOS/OSX development life easier.

Installation Drag the included Colours.h and Colours.m files into your project. They are located in the top-level directory. You can see a demo of how

Localization/I18n: Incrementally update/translate your Strings files from .swift, .h, .m(m), .storyboard or .xib files.
Localization/I18n: Incrementally update/translate your Strings files from .swift, .h, .m(m), .storyboard or .xib files.

Installation • Configuration • Usage • Build Script • Donation • Migration Guides • Issues • Contributing • License BartyCrouch BartyCrouch incrementa

A Swift sample code to reads ISO 10303-21 exchange structures (STEP P21 files for AP242) split into multiple files using external references approach.

multipleP21ReadsSample A Swift sample code to reads ISO 10303-21 exchange structures (STEP P21 files for AP242) split into multiple files using extern

BeatboxiOS - A sample implementation for merging multiple video files and/or image files using AVFoundation

MergeVideos This is a sample implementation for merging multiple video files and

NotionDrive - A swift package that can upload files to Notion.so or download files from Notion.so

NotionDrive NotionDrive is a swift package that can upload files to Notion.so or

Sign in with Apple, Sign up with Apple, or Continue with Apple

ContinueWithApple Sign in with Apple, Sign up with Apple, or Continue with Apple Utils 1. randomNonceString 로그인 요청마다 임의의 문자열인 'nonce'가 생성되며, 이 'nonce'

Objective-c code Apple style documentation set generator.

About appledoc IMPORTANT NOTICE: collaborators needed appledoc is command line tool that helps Objective-C developers generate Apple-like source code

Allow to add .pkpass files to Apple wallet

Allow to add .pkpass file to Apple Wallet

Birthdays App Challenge set by Chalkboard

Chalkboard Birthdays App Challange This is an app that utilises a web api to provide the user an ordered list of birthdays youngest to oldest How to i

A set of libraries to help users find and replace native system emojis with EmojiOne in their app or website.
A set of libraries to help users find and replace native system emojis with EmojiOne in their app or website.

This repository is now maintained as JoyPixels/emoji-toolkit. You'll find the latest version of our resources at emoji-toolkit. Please see the UPGRADE

Releases(0.1.1)
Owner
Ben Spratling IV
3 apps on the iPhone App Store the day it opened... been building ever since. Best repos are WorkableUIKit, SwiftIntegralRational and SwiftTrueTypeFont.
Ben Spratling IV
Easily validate your Properties with Property Wrappers 👮

ValidatedPropertyKit enables you to easily validate your properties with the power of Property Wrappers. struct LoginView: View { @Validated(

Sven Tiigi 873 Dec 22, 2022
Public Speaking App for @unitedspeakersglobal

Fearless Public Speaking App for @unitedspeakersglobal In collaboration with United Speakers Global, Fearless is an app for a public speaking communit

Daniel Shen 0 Dec 5, 2021
Loose Leaf is a notes app for iPad created by Adam Wulf

Overview Loose Leaf is a notes app for iPad created by Adam Wulf. Learn more and see demo videos at https://getlooseleaf.com. Support this project and

Adam Wulf 582 Nov 17, 2022
iOS association game chatbot. AI based on neural word embedding language model. Image recognition with convolutional neural net.

AssociationBot ##iOS association game chatbot. UI based on JSQMessagesDemo. Association database created with the help of Word2Vec neural word embeddi

Alex Sosnovshchenko 16 Nov 24, 2022
Validate iOS, Android, and Mac localizations. Find errors in .strings, .stringsdict, and strings.xml files.

Locheck An Xcode and Android localization file validator. Make sure your .strings, .stringsdict, and strings.xml files do not have any errors! What do

Asana 73 Dec 13, 2022
Simple and blunt static site generator

StaticSite This contains a bunch of helper functions to generate a static site in Swift.

objc.io 33 Dec 15, 2022
docc2html - A static site generator for DocC documentation archives

Tool to convert "DocC" archives, a format to document Swift frameworks and packages: Documenting a Swift Framework or Package, to a static HTML site.

DocZ 105 Nov 14, 2022
É um Aplicativo que abre o link de um site através do URL.

Aplicativo-WebView É um Aplicativo que abre o link de um site atraves do URL. ?? Tecnologias Este projeto foi desenvolvido com as seguintes tecnologia

Nathan Pereira 4 Nov 11, 2021
AWS SDK for iOS. For more information, see our web site:

AWS SDK for iOS The AWS SDK for iOS provides a library and documentation for developers to build connected mobile applications using AWS. Features / A

AWS Amplify 1.6k Dec 26, 2022
SocialButtons - A plugin for Publish that allows you to easily embed social buttons (e.g. Tweet button) in your site

SocialButtons A plugin for Publish that allows you to easily embed social button

Alan Paiva 6 Dec 1, 2022