Compare commits

...

253 Commits

Author SHA1 Message Date
Arthur Ariel Sabintsev b65d0d9c75 Updated Siren.podspec 2018-12-20 17:21:55 -05:00
ivan aee7eeca8a Update Siren.swift (#254)
* Update Siren.swift

- fixed url session caching issue in performVersionCheck().

* Update Siren.swift

- swapped .reloadIgnoringCacheData caching policy with .reloadIgnoringLocalAndRemoteCacheData in performVersionCheck() method.
2018-12-20 17:17:48 -05:00
ArtSabintsev dc63e9ea2f Updated base ruby-version 2018-11-17 13:50:08 -05:00
Arthur Ariel Sabintsev 121178a603 Update README.md 2018-11-10 10:59:40 -05:00
Arthur Ariel Sabintsev d946ccbc1b Updated Podspec and Contributors docs 2018-11-09 13:03:42 -05:00
Ilija Puaca 608329ec30 Removed print statement from UserDefaults getter (#247) 2018-11-09 13:02:08 -05:00
Arthur Ariel Sabintsev 8686a397dd Update README.md 2018-11-09 13:01:08 -05:00
Arthur Ariel Sabintsev 4dd7941d22 Updated podspec and docs 2018-11-07 21:42:47 -05:00
Arthur Ariel Sabintsev a43d87d0ae Reverted trackId back to Int. Closes #246 2018-11-07 21:41:46 -05:00
Arthur Ariel Sabintsev 9a72fcc164 Minor stylistic change 2018-11-04 07:18:18 -05:00
Arthur Ariel Sabintsev 2b15eb55aa Minor stylistic change 2018-11-04 07:16:23 -05:00
Arthur Ariel Sabintsev 364ba7d755 Updated Gems 2018-11-01 23:36:01 -04:00
Arthur Ariel Sabintsev fb9633cf25 Update Gemfile 2018-11-01 23:22:14 -04:00
Arthur Ariel Sabintsev 417caff8b1 Updated Siren docs 2018-10-29 23:10:36 -04:00
Arthur Ariel Sabintsev a66052c592 Updated docs 2018-10-29 23:09:59 -04:00
Arthur Ariel Sabintsev d152dc4887 Update ISSUE_TEMPLATE.md 2018-10-29 22:51:10 -04:00
Arthur Ariel Sabintsev 7ff3f21945 Update ISSUE_TEMPLATE.md 2018-10-29 22:48:12 -04:00
Arthur Ariel Sabintsev 5b3742175c Update ISSUE_TEMPLATE.md 2018-10-29 22:47:59 -04:00
Arthur Ariel Sabintsev 2e0b11d30a Update ISSUE_TEMPLATE.md 2018-10-29 22:47:45 -04:00
Arthur Ariel Sabintsev 7176b45aed Update ISSUE_TEMPLATE.md 2018-10-29 22:47:12 -04:00
Arthur Ariel Sabintsev 954ce02353 Update ISSUE_TEMPLATE.md 2018-10-26 10:43:09 -04:00
Arthur Ariel Sabintsev a3fbdfaee0 Update ISSUE_TEMPLATE.md 2018-10-26 10:26:35 -04:00
Arthur Ariel Sabintsev 92c8ac45cc Update README.md 2018-10-25 22:37:42 -04:00
Arthur Ariel Sabintsev 63ed8219dc Update README.md 2018-10-25 22:37:35 -04:00
Arthur Ariel Sabintsev 2b482d367c Fixed indentation 2018-10-25 21:18:17 -04:00
Arthur Ariel Sabintsev cc639488b3 Updated lockfile 2018-10-25 20:59:58 -04:00
Arthur Ariel Sabintsev 0772192629 Updated podspec 2018-10-25 20:52:28 -04:00
Arthur Ariel Sabintsev c2449e25a2 Fixed tackId parsing. Added some documentation 2018-10-25 20:50:36 -04:00
Arthur Ariel Sabintsev da0b258863 Update README.md 2018-10-02 08:37:13 -04:00
Arthur Ariel Sabintsev 58da2806a1 Update README.md 2018-09-29 23:08:58 -04:00
Arthur Ariel Sabintsev 25ec41abbd Updated docs 2018-09-29 23:04:40 -04:00
Arthur Ariel Sabintsev 1c9dd88d68 Update README.md 2018-09-29 23:03:55 -04:00
Arthur Ariel Sabintsev dd0966b29b Updated podspec 2018-09-29 00:02:53 -04:00
Arthur Ariel Sabintsev 421eb6802e 100% documentation again 2018-09-29 00:00:26 -04:00
Arthur Ariel Sabintsev 01c33f99d6 Added more docs 2018-09-28 23:51:39 -04:00
Arthur Ariel Sabintsev de925dc477 Added more missing documentation 2018-09-28 23:44:50 -04:00
Arthur Ariel Sabintsev bdf15f9be8 Updated project 2018-09-28 10:02:09 -04:00
Arthur Ariel Sabintsev 8cb742d2a6 Updated docs 2018-09-28 09:59:55 -04:00
Arthur Ariel Sabintsev 2168a4f1fc Updated docs 2018-09-28 09:58:39 -04:00
Arthur Ariel Sabintsev 1febce77dd Updated podspec 2018-09-27 22:22:23 -04:00
Arthur Ariel Sabintsev 2197494481 Removed force unwrapped localization methods 2018-09-27 22:21:42 -04:00
Arthur Ariel Sabintsev 74284809e3 Cleaned up constants file 2018-09-27 21:51:47 -04:00
Arthur Ariel Sabintsev 841d04dafd Removed dead file 2018-09-27 21:47:09 -04:00
Arthur Ariel Sabintsev d4c7baf247 project updates 2018-09-27 21:41:46 -04:00
Arthur Ariel Sabintsev 6f0b8f733c Minor changes 2018-09-27 21:39:09 -04:00
Arthur Ariel Sabintsev f217d5cd73 Further refactoring for Swift 4.2 (#231)
* Began moving code around to clean Siren.swift

* further cleanup of siren.swift

* Removed superfluous test helping function

* More code cleanup

* Added code that potentially fixes old bug about users not being reprompted after NEXT TIME is tapped

* Continued work on UserDefaults changes

* Improved UserDefaults handling

* Fixed UserDefaults comments
2018-09-27 21:37:01 -04:00
Arthur Ariel Sabintsev 7cfd6e788f Update README.md 2018-09-22 15:46:29 -04:00
Arthur Ariel Sabintsev 1a215cc608 Converted SirenAlertMessaging strings to type of NSAttributedString (#228)
* Converted SirenAlertMessaging strings to type of NSAttributedString

* Updated documentation

* Removed whitespace

* Removed more whitespace

* Updated sample code and README

* Updated sample code and README

* Updated sample code and README

* Added some docs

* Updated Gems

* Updated podspec
2018-09-22 15:41:32 -04:00
Arthur Ariel Sabintsev 7e30501d1c Update ISSUE_TEMPLATE.md 2018-09-21 07:53:02 -04:00
Arthur Ariel Sabintsev 6df36c9c8c Update .travis.yml 2018-09-20 08:23:10 -04:00
Arthur Ariel Sabintsev d7bbe9e8a6 Update README.md 2018-09-18 22:14:19 -04:00
Arthur Ariel Sabintsev 62b51d52a5 Removed .build folder 2018-09-18 21:43:19 -04:00
Arthur Ariel Sabintsev 6aa91d26c4 Minor changes 2018-09-18 21:07:44 -04:00
Arthur Ariel Sabintsev beb19f19c0 Updated osx_image to xcode10 2018-09-16 22:16:31 -04:00
Arthur Ariel Sabintsev 6e504a84a0 Updated example project and framework swift_version to 4.2 2018-09-16 21:58:19 -04:00
Arthur Ariel Sabintsev 129bffe9d8 Update README.md 2018-09-16 21:52:35 -04:00
Arthur Ariel Sabintsev cd4328feee Merged with swift4.2 branch 2018-09-16 21:46:26 -04:00
Arthur Ariel Sabintsev 1ac84cafc8 Updated podspec and other files 2018-09-16 21:45:58 -04:00
Arthur Ariel Sabintsev 36bff434f6 Merge branch 'master' into swift4.2 2018-09-16 21:40:38 -04:00
Arthur Ariel Sabintsev 94b319573e Update README.md 2018-08-07 14:17:50 -04:00
Arthur Ariel Sabintsev 43abfabe15 Update README.md 2018-08-04 21:10:50 -04:00
Arthur Ariel Sabintsev 9ac0dea011 Update README.md 2018-08-03 09:25:13 -04:00
Arthur Ariel Sabintsev 9721263f90 Updated project and framework to Swift 4.2. Updated UIWindowLevelAlert reference 2018-08-03 09:23:58 -04:00
Arthur Ariel Sabintsev 124fd715ef Xcode 10b5 fixes. 2018-08-03 08:59:16 -04:00
Arthur Ariel Sabintsev 1c3aee01fd Updated travis.yml 2018-07-28 01:13:26 -04:00
Arthur Ariel Sabintsev fe3b0acb6d Updated travis.yml 2018-07-28 00:54:08 -04:00
Arthur Ariel Sabintsev 509b5c9ca3 Updated travis.yml 2018-07-28 00:47:29 -04:00
Arthur Ariel Sabintsev 9c00d90424 Updated travis.yml 2018-07-28 00:40:01 -04:00
Arthur Ariel Sabintsev b4bba84753 Updated travis.yml 2018-07-27 22:39:40 -04:00
Arthur Ariel Sabintsev 47b95c97e0 Update README.md 2018-07-27 22:31:09 -04:00
Arthur Ariel Sabintsev fedee61c34 Update .travis.yml 2018-07-27 22:30:27 -04:00
Arthur Ariel Sabintsev 0c5c0fd1bf Update README.md 2018-07-25 22:02:40 -04:00
Arthur Ariel Sabintsev f2929ef72b Reverted docs location 2018-07-25 22:02:18 -04:00
Arthur Ariel Sabintsev f19075e6b4 Updated docs. Made certain sequences lazy 2018-07-25 22:00:38 -04:00
Arthur Ariel Sabintsev 4063d7e061 Updated docs and gems 2018-07-25 11:46:42 -04:00
Arthur Ariel Sabintsev 75bf43da3c Merged with downstream 2018-07-24 10:01:39 -04:00
Arthur Ariel Sabintsev 556382e38e Updatdd metadata 2018-07-24 09:59:59 -04:00
Titouan Van Belle de480f9cb8 Update German localisation (#218)
The current translation is not grammatically ideal.
2018-07-24 09:56:48 -04:00
Arthur Ariel Sabintsev 0643cd318c Update README.md 2018-07-04 12:34:34 -04:00
Arthur Ariel Sabintsev c7ffac16a1 Update README.md 2018-07-04 12:34:20 -04:00
Arthur Ariel Sabintsev 0f85e4087a Updated CONTRIBUTORS.md file 2018-07-01 22:33:08 -04:00
Arthur Ariel Sabintsev 1bdffa86fc Updated podspec 2018-07-01 22:29:50 -04:00
Arthur Ariel Sabintsev 8ffc87556c Updated gems 2018-07-01 22:29:19 -04:00
Arthur Ariel Sabintsev 43a5d734c1 Minor changes 2018-07-01 22:28:34 -04:00
Ryan 4fad697cd5 Use method introduced in iOS 10 for opening URLs with UIApplication, when appropriate. (#216) 2018-07-01 22:15:34 -04:00
Arthur Ariel Sabintsev 7ab708edf6 Minor changes after path renames 2018-07-01 21:59:48 -04:00
Arthur Ariel Sabintsev 094b218c1d Renamed example project and tests project 2018-07-01 21:57:26 -04:00
Arthur Ariel Sabintsev 3117731c00 Removed jazzy.yml 2018-06-07 22:52:10 -04:00
Arthur Ariel Sabintsev 3d7ebea02f Merge branch 'master' of https://github.com/ArtSabintsev/Siren 2018-06-07 22:51:35 -04:00
Arthur Ariel Sabintsev 53f32cd3d5 Updated docs 2018-06-07 22:51:33 -04:00
Arthur Ariel Sabintsev af6a9825e1 Update .gitattributes 2018-06-07 22:50:02 -04:00
Arthur Ariel Sabintsev bc570b028e Updated README 2018-06-07 22:48:42 -04:00
Arthur Ariel Sabintsev c37cd6968f Update .gitattributes 2018-06-07 22:47:23 -04:00
Arthur Ariel Sabintsev ef8498a8e6 Updated metadata 2018-06-06 20:51:41 -04:00
Arthur Ariel Sabintsev 10ddcab12c Updated logic slightly. Updated sample bundleId 2018-06-06 20:49:35 -04:00
Arthur Ariel Sabintsev 8344ed8cb3 Merge branch 'master' of https://github.com/ArtSabintsev/Siren 2018-06-06 20:07:38 -04:00
Gabriel Martelo d3668c8943 Localized title (#214)
* Expose localized title

* Update sirenDidDetectNewVersionWithoutAlert delegate method
2018-06-06 20:06:04 -04:00
Arthur Ariel Sabintsev 4def0e9441 Merge branch 'master' of https://github.com/ArtSabintsev/Siren 2018-05-08 19:48:47 -04:00
Arthur Ariel Sabintsev fa692a3912 Update README.md 2018-04-27 23:09:17 -04:00
Arthur Ariel Sabintsev 80a449975b Updated gitattributes 2018-04-27 23:09:02 -04:00
Arthur Ariel Sabintsev 3fd2f93d21 Update README.md 2018-04-27 23:08:41 -04:00
Arthur Ariel Sabintsev 13ad9ba3da Updated gitattributes 2018-04-27 23:04:37 -04:00
Arthur Ariel Sabintsev 31a59a4b3c Added .gitattributes 2018-04-27 23:00:45 -04:00
Arthur Ariel Sabintsev 19f303535c Updated podspec 2018-04-27 22:50:39 -04:00
Arthur Ariel Sabintsev cdfae11e70 SirenDelegate Enhancements (#210)
* SirenDelegate now returns SirenLookupModel

* Updated README and documentation

* Updated README

* Updated .travis.yml file
2018-04-27 22:50:11 -04:00
Arthur Ariel Sabintsev 676b125666 Updated podspec 2018-04-27 22:19:59 -04:00
Arthur Ariel Sabintsev 3032aed434 Updated jazzy and docs 2018-04-27 22:19:35 -04:00
Arthur Ariel Sabintsev a9a5be48e6 Minor enhancements to documentation and SirenLookupModel 2018-04-27 22:10:18 -04:00
Antoine Cœur 6999fefad4 HTTPS when supported (#209) 2018-04-27 12:56:47 -04:00
Arthur Ariel Sabintsev 7ef6584c14 Update README.md 2018-04-27 11:00:05 -04:00
Arthur Ariel Sabintsev ecf41d965c Merge branch 'master' of https://github.com/ArtSabintsev/Siren 2018-04-23 19:59:53 -04:00
Arthur Ariel Sabintsev 4338a2dae2 Updated model to be alphabetical 2018-04-23 19:59:52 -04:00
Arthur Ariel Sabintsev e80a073fe9 Update README.md 2018-04-23 19:57:35 -04:00
Arthur Ariel Sabintsev a1404096bf Updated Siren 2018-04-23 10:23:14 -04:00
Arthur Ariel Sabintsev cef1a7f560 Update README.md 2018-04-23 10:19:26 -04:00
Arthur Ariel Sabintsev 7ef618d402 Update README.md 2018-04-23 10:15:59 -04:00
Arthur Ariel Sabintsev 4b32315ad1 Modified travis.yml file 2018-04-23 10:06:33 -04:00
Arthur Ariel Sabintsev 2504f5efc0 Modified travis.yml file 2018-04-23 09:58:12 -04:00
Arthur Ariel Sabintsev 2acc8ee0c0 Added travis.yml file 2018-04-23 09:53:47 -04:00
Arthur Ariel Sabintsev 2c833b84ee Updated docs and metadata 2018-04-23 09:50:35 -04:00
Arthur Ariel Sabintsev fd5aaabb99 Minor doc change 2018-04-23 09:44:23 -04:00
Arthur Ariel Sabintsev 4eb31510d0 Fixed unowned to weak 2018-04-23 09:40:12 -04:00
Arthur Ariel Sabintsev 8bb784a16b SirenLookupModel now parses releaseNotes. Closes #206. 2018-04-23 09:35:01 -04:00
Arthur Ariel Sabintsev c98b124f73 Update README.md 2018-03-29 16:42:16 -04:00
Arthur Ariel Sabintsev 5e12e74e9c Update README.md 2018-03-29 16:16:09 -04:00
Arthur Ariel Sabintsev 04ad0f1682 Update gemfile 2018-03-29 16:02:46 -04:00
Arthur Ariel Sabintsev 87a58c65de Updated podspec 2018-03-29 16:01:38 -04:00
Arthur Ariel Sabintsev c2e278df55 Updated syntax for 4.1 2018-03-29 15:58:42 -04:00
Arthur Ariel Sabintsev dee7bc8e5e Updated synatx for 4.1. 2018-03-29 15:58:04 -04:00
Arthur Ariel Sabintsev e7fc566b10 Updated docs 2018-03-22 00:30:58 -04:00
Arthur Ariel Sabintsev a4ab45f772 Update README.md 2018-03-14 22:30:06 -04:00
Arthur Ariel Sabintsev c72eaf234c Improved ccoapods compatibility by modernizing podspec 2018-03-14 21:32:52 -04:00
Arthur Ariel Sabintsev edb8906b4d Updated metadata 2018-03-11 22:13:24 -04:00
Txai Wieser b7fb413814 Changed pt-BR text to be less agressive. (#201) 2018-03-11 22:09:52 -04:00
Arthur Ariel Sabintsev 0246ee905a Updated docs 2018-03-10 19:51:58 -05:00
Balázs Vincze 853eed62c4 Check if the return data contains any results (#200) 2018-03-10 19:33:21 -05:00
Arthur Ariel Sabintsev 4725475cfc Update README.md 2018-02-23 09:08:52 -05:00
Arthur Ariel Sabintsev 1d03dc16e1 Updated README 2018-02-21 18:57:17 -05:00
Arthur Ariel Sabintsev 1d3be00440 Updated docs. Closes #198. 2018-02-21 18:56:17 -05:00
Arthur Ariel Sabintsev 42c5ab103d Updated README and podspec 2017-12-08 11:09:23 -05:00
Arthur Ariel Sabintsev a82d13d1a2 Override Siren's Default Copy/Messaging in UIAlertController/UIAlertActionSheet (#187)
* Added SirenAlertMessaging struct to allow for custom overriding of messaging in UIAlertController update modal

* Spacing fix

* Comment updates

* alertMessaging is now long lazy

* Updated Sample message

* Commented sample message

* Updates Keys to Constants
2017-12-08 09:06:08 -07:00
Arthur Ariel Sabintsev 77cda5f933 Updated bundle id 2017-12-07 01:56:49 -05:00
Arthur Ariel Sabintsev a5bd175373 Closes #183. Fixes Country Code App Store URL in comments within AppDelegate. 2017-11-27 10:45:17 -05:00
Arthur Ariel Sabintsev a95766201b Updated Dutch localization 2017-11-21 23:35:30 -05:00
Attia Mo 6a7901f443 Fix Arabic localization. (#182)
* Fix Arabic localization.

* update Arabic localization Tests
2017-11-21 23:28:09 -05:00
Aaron Brager 97b23f2804 Update README with phased rollout options (#181) 2017-11-17 16:54:37 -05:00
Arthur Ariel Sabintsev e475b18892 Updated Contributors docs 2017-11-09 16:07:05 -05:00
Arthur Ariel Sabintsev c41f146a2d Update podspec 2017-11-09 16:05:42 -05:00
NSemakov 12ec30958c Add import UIKit for compilation as static framework. (#179) 2017-11-09 16:04:59 -05:00
Arthur Ariel Sabintsev cdb05f36a1 Update README.md 2017-10-23 21:58:17 -04:00
Arthur Ariel Sabintsev 8a85468354 Updated metadata 2017-10-21 10:37:54 -04:00
Vladislav Jevremović 54e91577a7 'characters' is deprecated in Swift 4 (#176) 2017-10-21 10:36:03 -04:00
Arthur Ariel Sabintsev 171250c580 Updated podspec and Contributors.md file 2017-10-19 23:57:29 -04:00
Dmytro Cheverda 1b07f76f59 Add Ukrainian localization (#175)
* Add Ukrainian localization

* Update tests to cover Ukrainian localization
2017-10-19 23:56:38 -04:00
Arthur Ariel Sabintsev b7819acbd5 Fixed transitive dependency issue by increasing scope from private to fileprivate on a couple variables and functions 2017-10-19 16:14:04 -04:00
Arthur Ariel Sabintsev 2c10d82f7f Updated Podspec 2017-10-15 22:49:05 -04:00
Arthur Ariel Sabintsev d7514471ba SirenError is now Public. Closes #174. 2017-10-15 22:48:47 -04:00
Arthur Ariel Sabintsev b918235b4e Updated podspec 2017-10-12 22:32:44 -04:00
Arthur Ariel Sabintsev 6d1e626036 Re-enabled isUpdateCompatibleWithDeviceOS 2017-10-12 22:19:25 -04:00
Arthur Ariel Sabintsev e235f46b3b Updated podspec 2017-10-11 19:48:02 -04:00
Arthur Ariel Sabintsev 17f9952d8b Updated docs 2017-10-11 19:47:20 -04:00
Arthur Ariel Sabintsev 5abf8ede8d Updated UpdateType and SirenDelegate 2017-10-11 19:45:56 -04:00
Jussi Suojanen 8caddf0f8c Add update type information to custom alert delegate function (#171) 2017-10-11 19:34:16 -04:00
Arthur Ariel Sabintsev f6219ccb90 Merge branch 'master' of https://github.com/ArtSabintsev/Siren 2017-09-13 22:15:13 -04:00
Arthur Ariel Sabintsev 21e5f579e2 Updated Docs 2017-09-13 22:15:09 -04:00
Arthur Ariel Sabintsev 7c7791c17a Update README.md 2017-09-13 20:50:01 -04:00
Arthur Ariel Sabintsev b03b7d12bf Updated metadata 2017-09-13 13:52:52 -04:00
Jason Ash 01e439d523 Resolve accessibility issues (#162)
A few variables and one function had private access and errors were thrown stating they were inaccessible, changed to fileprivate to resolve this issue.
2017-09-13 13:50:48 -04:00
Arthur Ariel Sabintsev 1701df1c72 Update README.md 2017-09-13 08:25:46 -04:00
Arthur Ariel Sabintsev 6d5070cdb4 Updated README 2017-09-13 08:20:19 -04:00
Arthur Ariel Sabintsev 9460160937 README updates 2017-09-13 08:17:53 -04:00
Arthur Ariel Sabintsev afeadfddfa README updates 2017-09-13 08:06:25 -04:00
Arthur Ariel Sabintsev d234e8c472 Swift 4 and Xcode 9 Support (#147)
* Converted to Swift 4 using Xcode 9b1.

* Updated README with Swift 4.0 support

* Swiftier syntax for certain localization methods

* More documentation

* Implemented Swift 4 Access Control rules

* Fixed Urdu Test

* Fixed some project settings. Replaced most JSON parsing with SirenLookupModel, which conforms to codable

* Adds Siren Error. Augments Siren, SirenDelegate. Fixes double alert issue.

* Some docs changes

* Updated docs

* Simplified model

* Removed docs to fix merge conflicts. Will remake after merge

* Fixes for Xcode9b5

* Jazzy docs dump to fix CI

* Tightening up Siren.swift after Xcode 9b5 changes

* Fixed signature for sirenDidFailVersionCheck to take an Error vs NSError

* Updated README

* Minor project level changes

* Updated .swift-version and podspec
2017-09-13 08:04:48 -04:00
Arthur Ariel Sabintsev ca33c8f2c8 Updated README 2017-09-11 20:45:14 -04:00
Arthur Ariel Sabintsev 51eb58d236 Update Gemfile.lock 2017-08-27 15:02:33 -04:00
Arthur Ariel Sabintsev a8311bd6b9 Updated podspec and contributors file 2017-08-27 11:45:39 -04:00
Ryoh Tsukahara f8aa3f5534 WIP: Update ja localization (#159)
* Updated Japanese Localization

* Updated test for Japanese localization
2017-08-27 11:43:16 -04:00
Arthur Ariel Sabintsev eba3e056c2 Updated README and AppDelegate in example app 2017-08-07 19:50:56 -04:00
Arthur Ariel Sabintsev 321ba43a15 Updated docs 2017-08-06 07:07:57 -04:00
Arthur Ariel Sabintsev 0b9bae5cbb Updated podspec to 2.0.7 2017-08-05 13:45:25 -04:00
Arthur Ariel Sabintsev c6b3ece14e Updated podspec to 2.0.7 2017-08-05 13:43:41 -04:00
Arthur Ariel Sabintsev 6203ff3e17 Added SirenLog. Removed assertionFailures on default implementations … (#157)
* Added SirenLog. Removed assertionFailures on default implementations of methods defined by SirenDelegate.

* Exposes launchAppStore
2017-08-05 13:43:06 -04:00
Arthur Ariel Sabintsev f9f9b82668 Updated podspec 2017-07-30 21:49:25 -04:00
Arthur Ariel Sabintsev 59e4b9e113 Update README.md 2017-07-10 11:56:27 -04:00
Arthur Ariel Sabintsev a5a1797cce Changed comment in sample project 2017-07-10 11:48:13 -04:00
Arthur Ariel Sabintsev 9eeb265614 Moved CODEOWNERS 2017-07-07 22:41:05 -04:00
Arthur Ariel Sabintsev 31c0109adb Create CODEOWNERS 2017-07-07 22:39:06 -04:00
Arthur Ariel Sabintsev df3a8fd14f Updated CONTRIBUTORS.md 2017-06-19 14:11:33 -04:00
Arthur Ariel Sabintsev c51fcc851b Added Contributors.md 2017-06-19 14:07:47 -04:00
Arthur Ariel Sabintsev add692995a Updated Metadata files after PR merge 2017-06-19 14:03:47 -04:00
Ryoh Tsukahara 379d4b3d82 Set "en_US_POSIX" as the locale of the date formatter (#150) 2017-06-19 13:57:59 -04:00
Arthur Ariel Sabintsev c402feabf1 Update README.md 2017-06-18 23:05:39 -04:00
Arthur Ariel Sabintsev 1d563f89bf Updated docs 2017-06-15 23:54:42 -04:00
Arthur Ariel Sabintsev 3a4d7dd841 Added Urdu Localization and tests 2017-06-15 23:53:23 -04:00
Arthur Ariel Sabintsev 543a3cc1cb Updated README 2017-06-06 22:32:11 -04:00
Arthur Ariel Sabintsev f44a3ba879 Update README.md 2017-06-05 22:57:39 -04:00
Arthur Ariel Sabintsev 54b1042b5c Updated README with Swift 4.0 support 2017-06-05 22:57:12 -04:00
Arthur Ariel Sabintsev a904ca08df Updated README 2017-06-05 22:39:04 -04:00
Arthur Ariel Sabintsev 6101b30b3e Updated Podspec, Gemfile, Readme, and Contributors 2017-06-04 14:59:05 -04:00
Seyed Mojtaba Hosseini Zeidabadi 208f0ade0a Persian localization added. (#144)
Persian localization tests added.
2017-06-04 14:53:59 -04:00
Arthur Ariel Sabintsev e285ded587 Updated Gemfile 2017-05-29 14:51:37 -04:00
Arthur Ariel Sabintsev f2dc07757c Update CONTRIBUTORS.md 2017-05-29 14:43:21 -04:00
Arthur Ariel Sabintsev 6d7613fa3e Added tests for Czech localization. Updated README and Podspec 2017-05-29 14:42:31 -04:00
premyslvlcek 2352276947 Czech language support added (#143)
Czech translation
2017-05-29 14:38:26 -04:00
Arthur Ariel Sabintsev 28b789f28f Update README.md 2017-05-26 01:57:32 -04:00
Arthur Ariel Sabintsev d14e0ad046 Updated Contributors.md 2017-04-26 10:43:33 -04:00
Arthur Ariel Sabintsev d322afa41a Updated podspec 2017-04-26 10:34:01 -04:00
Txai Wieser a5a95c43af Update pt-BR localization (#140)
In Portuguese from Brazil you say "o aplicativo" (the application) with masculine pronoun, you can say "a aplicação" too but it's not very common, and its a little weird. So "A new version the 'Application'" would be translated to "Uma nova versão DO `Aplicativo`" and NOT "Uma nova versão DA 'Aplicação'"

Thank you! :)
2017-04-26 10:33:17 -04:00
Txai Wieser a6a521c8d1 Fixed Enum cases typo (#139) 2017-04-20 09:49:49 -04:00
Arthur Ariel Sabintsev 18a56fa45e Update README.md 2017-04-08 23:56:26 -04:00
Arthur Ariel Sabintsev 278d9e863e Update README.md 2017-04-08 23:55:37 -04:00
Arthur Ariel Sabintsev ba2bc03263 Update README.md 2017-04-08 03:13:26 -04:00
Arthur Ariel Sabintsev 28aba0f794 Updated gems 2017-04-08 03:11:25 -04:00
Arthur Ariel Sabintsev e8ac4b78e1 Update ISSUE_TEMPLATE.md 2017-04-08 02:30:53 -04:00
Arthur Ariel Sabintsev daaa063c60 Update ISSUE_TEMPLATE.md 2017-04-08 02:25:29 -04:00
Arthur Ariel Sabintsev f339fab54d Update ISSUE_TEMPLATE.md 2017-04-08 02:23:52 -04:00
Arthur Ariel Sabintsev 69d49689ce SirenVersionCheckType is now Siren.VersionCheckType. Updated docs and podspec. 2017-04-08 02:12:18 -04:00
Arthur Ariel Sabintsev bd4b17fafc Updated docs 2017-04-08 02:09:18 -04:00
Arthur Ariel Sabintsev 950830d94d Merge pull request #136 from ArtSabintsev/improvement/delayed-launch
2.0.0
2017-04-08 01:50:29 -04:00
Arthur Ariel Sabintsev 11bfdca77a README updates 2017-04-08 01:49:54 -04:00
Arthur Ariel Sabintsev 3e1aa263cb Updated readme and sample project 2017-04-08 01:46:39 -04:00
Arthur Ariel Sabintsev 628ff9bb8d Updated sample project, readme, podspec, project hierarchy 2017-04-08 01:41:49 -04:00
Arthur Ariel Sabintsev 4dd92112eb Added JSONKeys 2017-04-08 01:23:51 -04:00
Arthur Ariel Sabintsev 7c5f153e1f printMessage change 2017-04-08 01:11:56 -04:00
Arthur Ariel Sabintsev 3717686bf8 Documentation changes and sanity check 2017-04-08 01:05:15 -04:00
Arthur Ariel Sabintsev 404e61bcf2 Removed extra new line 2017-04-08 00:58:44 -04:00
Arthur Ariel Sabintsev 4d4fb66fd1 showAlertAfterCurrentVersionHasBeenReleasedForDays is a non-optional Int defaulting to 1 day. Added SirenTestHelper 2017-04-08 00:57:49 -04:00
Arthur Ariel Sabintsev 43232c3e94 Updated swiftlint rules 2017-04-08 00:26:00 -04:00
Arthur Ariel Sabintsev 04ecdc5d86 Updated swiftlint rules 2017-04-08 00:22:56 -04:00
Arthur Ariel Sabintsev c14ffbeaca Updated tests 2017-04-08 00:22:08 -04:00
Arthur Ariel Sabintsev c6dd2e38d9 Created SirenDelegate. Better namespacing 2017-04-08 00:21:28 -04:00
Arthur Ariel Sabintsev f37197e2d6 Removed unncessary self declarations 2017-04-07 23:56:56 -04:00
Arthur Ariel Sabintsev 1301d13b19 Update README.md 2017-04-03 18:49:31 -04:00
Arthur Ariel Sabintsev 868fd61abb Update README.md 2017-03-22 18:35:50 -04:00
Arthur Ariel Sabintsev fd3160ead2 Update README.md 2017-03-22 18:35:01 -04:00
Arthur Ariel Sabintsev bbf166c41e Updated Docs 2017-03-22 00:19:29 -04:00
Arthur Ariel Sabintsev fa410383fb Update README.md 2017-03-21 23:37:07 -04:00
Arthur Ariel Sabintsev 28f7595712 Update README.md 2017-03-21 23:36:38 -04:00
Arthur Ariel Sabintsev d49d41a147 Updated README 2017-03-21 23:34:58 -04:00
Arthur Ariel Sabintsev 4a329bafff Updated Podspec 2017-03-21 23:31:06 -04:00
Arthur Ariel Sabintsev 4569b1352c Merge pull request #134 from ArtSabintsev/improvement/Date-Extension-Safety
Added SirenDateExtension. Improved app safety.
2017-03-21 23:30:19 -04:00
Arthur Ariel Sabintsev 2632a9b661 Added SirenDateExtension. Improved app safety. 2017-03-21 23:26:07 -04:00
Arthur Ariel Sabintsev 74f266aaf0 Updated Podspec and README 2017-03-21 23:12:13 -04:00
Arthur Ariel Sabintsev 7a66d39eaa Added assets 2017-03-18 00:27:43 -04:00
Arthur Ariel Sabintsev 5ee91398b4 Updated Docs. Update scoping in extension files. 2017-03-18 00:19:35 -04:00
Arthur Ariel Sabintsev 2238ed76d9 Modified podspec 2017-03-18 00:12:06 -04:00
Arthur Ariel Sabintsev 77fec7c466 Merge pull request #131 from ArtSabintsev/improvement/codebase
Split code into separate files
2017-03-17 23:29:55 -04:00
Arthur Ariel Sabintsev 95b35eb045 Split code into separate files 2017-03-17 23:26:52 -04:00
Arthur Ariel Sabintsev cf99475842 Updated README 2017-03-14 17:10:35 -04:00
Arthur Ariel Sabintsev dee148be33 Update ISSUE_TEMPLATE.md 2017-03-13 11:35:18 -04:00
Arthur Ariel Sabintsev cb3e865e96 Update README.md 2017-03-11 23:49:03 -05:00
Arthur Ariel Sabintsev ef8f6e1a8e Removed dead links in project 2017-03-04 22:52:20 -05:00
Arthur Ariel Sabintsev 98dd98b8b5 Update README.md 2017-03-04 22:27:39 -05:00
104 changed files with 9488 additions and 3172 deletions
+1
View File
@@ -0,0 +1 @@
docs/* linguist-vendored
+1
View File
@@ -0,0 +1 @@
* @artsabintsev
+24 -6
View File
@@ -1,10 +1,28 @@
======
Before posting an issue, please make sure your issue has not already been resolved or answered elsehwere.
# If you're experiencing a problem integrating Siren into your app, please provide the following information when posting a new issue:
Common Issue:
> "Error retrieving iOS version number as there was no data returned."
- **Are you using the [latest version](https://github.com/ArtSabintsev/Siren/releases) of Siren?**:
- **What is your app's Bundle ID?**:
- **When was the latest version of your app published to the App Store?**:
- **Is your app published in the US App Store? If not, what App Store is it published in?**:
- **Does Siren work if you plugin your app's BundleID (and CountryCode, if necessary) into the Example App?**:
Check if your app is available in the US App Store, otherwise add the corresponding country code when setting up Siren: https://github.com/ArtSabintsev/Siren/blob/master/Siren/Siren.swift#L198
---
# Before posting an issue, please make sure your issue has not already been resolved or answered elsewhere.
## Common Issue #1:
>"Error retrieving iOS version number as there was no data returned."
Check if your app is available in the US App Store, otherwise add the corresponding country code when setting up Siren.
## Common Issue #2:
> "Support for macOS App Store."
Siren does not and will not support the macOS App Store.
## Common Issue #3:
> "Support for prompting TestFlight users to update to the newest beta build."
Siren does not support this functionality. There is no publicly accessible TestFlight API akin to that of the public App Store API that Siren can utilize to provide this functionality.
Please delete this text before submitting a new issue.
======
+1 -1
View File
@@ -22,6 +22,6 @@ DerivedData
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
# Pods/
-7
View File
@@ -1,7 +0,0 @@
module: Siren
author: Arthur Ariel Sabintsev
author_url: http://www.sabintsev.com
github_url: https://github.com/artsabintsev/siren
copyright: "© 2015-2017 [Arthur Ariel Sabintsev](http://www.sabintsev.com)"
clean: true
podspec: Siren.podspec
+1
View File
@@ -0,0 +1 @@
ruby-2.5.1
-1
View File
@@ -1 +0,0 @@
3.0
+10 -3
View File
@@ -1,10 +1,17 @@
reporter: "xcode"
included:
- ../Sources/
disabled_rules:
- cyclomatic_complexity
- file_length
- line_length
- nesting
- unused_optional_binding
- variable_name
reporter: "xcode"
# Specialized Rules
file_length:
- 1000
line_length:
- 200
+15
View File
@@ -0,0 +1,15 @@
language: objective-c
osx_image: xcode10
notifications:
email: false
env:
- LC_CTYPE=en_US.UTF-8 LANG=en_US.UTF-8
before_install:
- rvm install ruby-2.4.1
- gem install cocoapods
- gem install xcpretty -N
- brew update
script:
- set -o pipefail
- xcodebuild -project Example/Example.xcodeproj -scheme Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c
Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

+28 -8
View File
@@ -1,11 +1,11 @@
### Creators
[Arthur Ariel Sabintsev](http://www.sabintsev.com/) and [Aaron Brager](http://twitter.com/GetAaron)
[Arthur Ariel Sabintsev](http://www.sabintsev.com/) and [Aaron Brager](https://twitter.com/GetAaron)
### Siren Project Contributors
- [Dmitry Bespalov](https://github.com/diamondsky) for [Pull Request #7](https://github.com/ArtSabintsev/Siren/pull/7)
- [Daniel Bauke](https://github.com/bonkey) for [Pull Request #8](https://github.com/ArtSabintsev/Siren/pull/8)
- [ipedro](https://github.com/ipedro) for [Pull Request #76 (Harpy)](https://github.com/ArtSabintsev/Harpy/pull/76)
- [Michael Graff](http://github.com/skandragon) for [Pull Request #15](https://github.com/ArtSabintsev/Siren/pull/15)
- [Michael Graff](https://github.com/skandragon) for [Pull Request #15](https://github.com/ArtSabintsev/Siren/pull/15)
- [Jaroslav_](https://github.com/jaroslavas) for [Pull Request #83 (Harpy)](https://github.com/ArtSabintsev/Harpy/pull/83)
- [Dylan Bettermann](https://github.com/dbettermann) for [Pull Request #18](https://github.com/ArtSabintsev/Siren/pull/18)
- [Daniel](https://github.com/Daniel) for [Pull Request #21](https://github.com/ArtSabintsev/Siren/pull/21)
@@ -31,12 +31,32 @@
- [Vladislav Jevremović](https://github.com/VladislavJevremovic) for [Pull Request #98](https://github.com/ArtSabintsev/Siren/pull/98)
- [Stefan Kieleithner](https://github.com/steviki) for [Pull Request #99](https://github.com/ArtSabintsev/Siren/pull/99)
- [Konstantinos N.](https://github.com/kwstasna) for [Pull Request #101](https://github.com/ArtSabintsev/Siren/pull/101)
- [Christoph Mantler](https://github.com/ChrisixFlash) for [Pull Request #103](https://github.com/ArtSabintsev/Siren/pull/103)
- [Christoph Mantler](https://github.com/ChrisixFlash) for [Pull Request #106](https://github.com/ArtSabintsev/Siren/pull/106)
- [Pietro D'Alessandro](https://github.com/xedla) for [Pull Request #107](https://github.com/ArtSabintsev/Siren/pull/107)
- [Christoph Mantler](https://github.com/ChrisixFlash) for [Pull Request #103](https://github.com/ArtSabintsev/Siren/pull/103) and [Pull Request #106](https://github.com/ArtSabintsev/Siren/pull/106)
- [xedla](https://github.com/xedla) for [Pull Request #107](https://github.com/ArtSabintsev/Siren/pull/107)
- [Daniel Hu](https://github.com/zongmumask) for [Pull Request #116](https://github.com/ArtSabintsev/Siren/pull/116)
- [Jakob Krigovsky](https://github.com/sonicdoe) for [Pull Request #118](https://github.com/ArtSabintsev/Siren/pull/118)
- [germ4n](https://github.com/glm4) for [Pull Request #122](https://github.com/ArtSabintsev/Siren/pull/122)
- [Txai Wieser](https://github.com/txaiwieser) for [Pull Request #139](https://github.com/ArtSabintsev/Siren/pull/139) and [Pull Request #140](https://github.com/ArtSabintsev/Siren/pull/140)
- [premyslvlcek](https://github.com/premyslvlcek) for [Pull Request #143](https://github.com/ArtSabintsev/Siren/pull/143)
- [Seyed Mojtaba Hosseini Zeidabadi](https://github.com/MojtabaHs) for [Pull Request #144](https://github.com/ArtSabintsev/Siren/pull/143)
- [Chanchal Raj](https://github.com/RajChanchal) for [Pull Request #171 (Harpy)](https://github.com/ArtSabintsev/harpy/pull/171)
- [Ryoh Tsukahara](https://github.com/nixnoughtnothing) for [Pull Request #150](https://github.com/ArtSabintsev/Siren/pull/150) and [Pull Request #159](https://github.com/ArtSabintsev/Siren/pull/159)
- [Jason Wade](https://github.com/iJasonWade) for [Pull Request #162](https://github.com/ArtSabintsev/Siren/pull/162)
- [JussiSuojanen](https://github.com/JussiSuojanen) for [Pull Request #171](https://github.com/ArtSabintsev/Siren/pull/171)
- [Dmytro Cheverda](https://github.com/dimacheverda) for [Pull Request #175](https://github.com/ArtSabintsev/Siren/pull/175)
- [Vladislav Jevremovic](https://github.com/VladislavJevremovic) for [Pull Request #176](https://github.com/ArtSabintsev/Siren/pull/176)
- [NSemakov](https://github.com/NSemakov) for [Pull Request #179](https://github.com/ArtSabintsev/Siren/pull/179)
- [Attia Mo](https://github.com/attiamo) for [Pull Request #182](https://github.com/ArtSabintsev/Siren/pull/182)
- [wbison](https://github.com/wbison) for [Pull Request #185 (Harpy)](https://github.com/ArtSabintsev/Harpy/pull/185)
- [Balázs Vincze](https://github.com/vinczebalazs) for [Pull Request #200](https://github.com/ArtSabintsev/siren/pull/200)
- [Txai Wieser](https://github.com/txaiwieser) for [Pull Request #201](https://github.com/ArtSabintsev/siren/pull/200)
- [Gabriel Martelo](https://github.com/gabmarfer) for [Pull Request #214](https://github.com/ArtSabintsev/Siren/pull/214)
- [Ryan](ryanthon) for [Pull Request #216](https://github.com/ArtSabintsev/Siren/pull/216)
- [Titouan Van Belle](TitouanVanBelle) for [Pull Request #218](https://github.com/ArtSabintsev/Siren/pull/218)
- [Ilija Puaca](https://github.com/ilijapuaca) for [Pull Request #247](https://github.com/ArtSabintsev/Siren/pull/247)
### Harpy Project Contributors
This repo is a Swift language port of [Harpy](http://github.com/ArtSabintsev/Harpy). We couldn't have built this port without acknowledging the following developers who were instrumental in getting Harpy to v3.2.1, the version of Harpy that Siren was based on.
This repo is a Swift language port of [Harpy](https://github.com/ArtSabintsev/Harpy). We couldn't have built this port without acknowledging the following developers who were instrumental in getting Harpy to v3.2.1, the version of Harpy that Siren was based on.
A huge **Thank You** to the following developers:
@@ -48,7 +68,7 @@ A huge **Thank You** to the following developers:
- [David Keegan](https://github.com/kgn)
- [Erick](https://github.com/dexcell0)
- [Ercillagorka](https://github.com/ercillagorka)
- [Jamie Ly](http://github,com/jamiely)
- [Jamie Ly](https://github,com/jamiely)
- [Jon Andersen](https://github.com/jonandersen)
- [Josh T. Brown](https://github.com/joshuatbrown)
- [Mark Rickert](https://github.com/markrickert)
@@ -60,4 +80,4 @@ A huge **Thank You** to the following developers:
- [TrentW](https://github.com/trentw)
### Special Thanks
Finally, a massive **Thank You** to [Aaron Brager](http://twitter.com/GetAaron) for the dev-work and issue-moderation he's done on Harpy since 2012. A Swift port could not have happened without him.
Finally, a massive **Thank You** to [Aaron Brager](https://twitter.com/GetAaron) for the dev-work and issue-moderation he's done on Harpy since 2012. A Swift port could not have happened without him.
@@ -8,26 +8,31 @@
/* Begin PBXBuildFile section */
55EC364B1E6BB98A00726F13 /* Siren.h in Headers */ = {isa = PBXBuildFile; fileRef = 55EC36491E6BB98A00726F13 /* Siren.h */; settings = {ATTRIBUTES = (Public, ); }; };
55EC364E1E6BB98A00726F13 /* Siren.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55EC36471E6BB98A00726F13 /* Siren.framework */; };
55EC364F1E6BB98A00726F13 /* Siren.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 55EC36471E6BB98A00726F13 /* Siren.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
55EC36601E6BB99B00726F13 /* Siren.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 55EC365E1E6BB99B00726F13 /* Siren.bundle */; };
55EC36611E6BB99B00726F13 /* Siren.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55EC365F1E6BB99B00726F13 /* Siren.swift */; };
8E1635A91E6A0B9C0060CE27 /* SirenTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EE6C74C1E6A0AE100DBE454 /* SirenTests.swift */; };
8EBDF8251E6A0C41006C87B4 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8EBDF8211E6A0C41006C87B4 /* LaunchScreen.xib */; };
8EBDF8261E6A0C41006C87B4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8EBDF8231E6A0C41006C87B4 /* Main.storyboard */; };
8EE6C7431E6A0AA500DBE454 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EE6C7411E6A0AA500DBE454 /* AppDelegate.swift */; };
8EE6C7441E6A0AA500DBE454 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EE6C7421E6A0AA500DBE454 /* ViewController.swift */; };
8EE6C7481E6A0AB800DBE454 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8EE6C7461E6A0AB800DBE454 /* Images.xcassets */; };
8E171DDE215B26B4006FBBCC /* SirenBundleExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E171DD1215B26B4006FBBCC /* SirenBundleExtension.swift */; };
8E171DDF215B26B4006FBBCC /* SirenDateExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E171DD2215B26B4006FBBCC /* SirenDateExtension.swift */; };
8E171DE1215B26B4006FBBCC /* SirenAlertMessaging.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E171DD6215B26B4006FBBCC /* SirenAlertMessaging.swift */; };
8E171DE2215B26B4006FBBCC /* SirenLookupModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E171DD7215B26B4006FBBCC /* SirenLookupModel.swift */; };
8E171DE3215B26B4006FBBCC /* SirenUIAlertControllerExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E171DD8215B26B4006FBBCC /* SirenUIAlertControllerExtension.swift */; };
8E171DE4215B26B4006FBBCC /* SirenViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E171DDA215B26B4006FBBCC /* SirenViewController.swift */; };
8E171DE6215B2701006FBBCC /* SirenLocalizationExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E171DE5215B2701006FBBCC /* SirenLocalizationExtension.swift */; };
8E171DEE215B2D09006FBBCC /* SirenUserDefaultsExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E171DED215B2D09006FBBCC /* SirenUserDefaultsExtension.swift */; };
8E641D2520C8B44B00908555 /* Siren.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55EC36471E6BB98A00726F13 /* Siren.framework */; };
8EACA9711F380294003134CA /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8EACA9671F37F2D3003134CA /* LaunchScreen.xib */; };
8EACA9721F380294003134CA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8EACA9691F37F2D3003134CA /* Main.storyboard */; };
8EACA9731F380294003134CA /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8EACA96B1F37F2D3003134CA /* Images.xcassets */; };
8EACA9741F38029B003134CA /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EACA9661F37F2D3003134CA /* AppDelegate.swift */; };
8EACA9751F38029B003134CA /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EACA96D1F37F2D3003134CA /* ViewController.swift */; };
8ED733FC215DBE4900447E3B /* SirenDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E171DD4215B26B4006FBBCC /* SirenDelegate.swift */; };
8ED733FD215DBE4900447E3B /* SirenConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E171DE7215B27C2006FBBCC /* SirenConstants.swift */; };
8ED733FE215DBE4900447E3B /* SirenError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E171DCD215B26B4006FBBCC /* SirenError.swift */; };
8ED733FF215DBE4900447E3B /* SirenLog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E171DCE215B26B4006FBBCC /* SirenLog.swift */; };
8ED73400215DBE4900447E3B /* SirenHelpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E171DEB215B28EC006FBBCC /* SirenHelpers.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
55EC364C1E6BB98A00726F13 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 8EC391791A58B465001C121E /* Project object */;
proxyType = 1;
remoteGlobalIDString = 55EC36461E6BB98A00726F13;
remoteInfo = Siren;
};
8E3A6C091D07CB6F00A8B7CF /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 8EC391791A58B465001C121E /* Project object */;
@@ -37,35 +42,33 @@
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
558455D81C6690B4004BE492 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
55EC364F1E6BB98A00726F13 /* Siren.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
55EC36471E6BB98A00726F13 /* Siren.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Siren.framework; sourceTree = BUILT_PRODUCTS_DIR; };
55EC36491E6BB98A00726F13 /* Siren.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Siren.h; sourceTree = "<group>"; };
55EC364A1E6BB98A00726F13 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
55EC365D1E6BB98C00726F13 /* Siren copy-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Siren copy-Info.plist"; path = "/Users/sabintseva/Documents/oss/siren/SirenExample/Siren copy-Info.plist"; sourceTree = "<absolute>"; };
55EC364A1E6BB98A00726F13 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = ../../Siren/Info.plist; sourceTree = "<group>"; };
55EC365E1E6BB99B00726F13 /* Siren.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Siren.bundle; path = ../../Sources/Siren.bundle; sourceTree = "<group>"; };
55EC365F1E6BB99B00726F13 /* Siren.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Siren.swift; path = ../../Sources/Siren.swift; sourceTree = "<group>"; };
8E3A6C041D07CB6F00A8B7CF /* SirenExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SirenExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
8EBDF8221E6A0C41006C87B4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = SirenExample/Base.lproj/LaunchScreen.xib; sourceTree = SOURCE_ROOT; };
8EBDF8241E6A0C41006C87B4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = SirenExample/Base.lproj/Main.storyboard; sourceTree = SOURCE_ROOT; };
8EC391811A58B465001C121E /* SirenExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SirenExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
8EE6C7411E6A0AA500DBE454 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = SirenExample/AppDelegate.swift; sourceTree = SOURCE_ROOT; };
8EE6C7421E6A0AA500DBE454 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewController.swift; path = SirenExample/ViewController.swift; sourceTree = SOURCE_ROOT; };
8EE6C7461E6A0AB800DBE454 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = SirenExample/Images.xcassets; sourceTree = SOURCE_ROOT; };
8EE6C7471E6A0AB800DBE454 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = SirenExample/Info.plist; sourceTree = SOURCE_ROOT; };
8E171DCD215B26B4006FBBCC /* SirenError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SirenError.swift; sourceTree = "<group>"; };
8E171DCE215B26B4006FBBCC /* SirenLog.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SirenLog.swift; sourceTree = "<group>"; };
8E171DD1215B26B4006FBBCC /* SirenBundleExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SirenBundleExtension.swift; sourceTree = "<group>"; };
8E171DD2215B26B4006FBBCC /* SirenDateExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SirenDateExtension.swift; sourceTree = "<group>"; };
8E171DD4215B26B4006FBBCC /* SirenDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SirenDelegate.swift; sourceTree = "<group>"; };
8E171DD6215B26B4006FBBCC /* SirenAlertMessaging.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SirenAlertMessaging.swift; sourceTree = "<group>"; };
8E171DD7215B26B4006FBBCC /* SirenLookupModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SirenLookupModel.swift; sourceTree = "<group>"; };
8E171DD8215B26B4006FBBCC /* SirenUIAlertControllerExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SirenUIAlertControllerExtension.swift; sourceTree = "<group>"; };
8E171DDA215B26B4006FBBCC /* SirenViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SirenViewController.swift; sourceTree = "<group>"; };
8E171DE5215B2701006FBBCC /* SirenLocalizationExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SirenLocalizationExtension.swift; sourceTree = "<group>"; };
8E171DE7215B27C2006FBBCC /* SirenConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SirenConstants.swift; sourceTree = "<group>"; };
8E171DEB215B28EC006FBBCC /* SirenHelpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SirenHelpers.swift; sourceTree = "<group>"; };
8E171DED215B2D09006FBBCC /* SirenUserDefaultsExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SirenUserDefaultsExtension.swift; sourceTree = "<group>"; };
8E3A6C041D07CB6F00A8B7CF /* Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
8EACA9661F37F2D3003134CA /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
8EACA9681F37F2D3003134CA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
8EACA96A1F37F2D3003134CA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
8EACA96B1F37F2D3003134CA /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
8EACA96C1F37F2D3003134CA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8EACA96D1F37F2D3003134CA /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
8EC391811A58B465001C121E /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
8EE6C74B1E6A0AE100DBE454 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8EE6C74C1E6A0AE100DBE454 /* SirenTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SirenTests.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -89,7 +92,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
55EC364E1E6BB98A00726F13 /* Siren.framework in Frameworks */,
8E641D2520C8B44B00908555 /* Siren.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -99,56 +102,128 @@
55EC36481E6BB98A00726F13 /* Siren */ = {
isa = PBXGroup;
children = (
55EC365E1E6BB99B00726F13 /* Siren.bundle */,
55EC365F1E6BB99B00726F13 /* Siren.swift */,
55EC36491E6BB98A00726F13 /* Siren.h */,
55EC364A1E6BB98A00726F13 /* Info.plist */,
55EC365F1E6BB99B00726F13 /* Siren.swift */,
55EC365E1E6BB99B00726F13 /* Siren.bundle */,
8E171DD0215B26B4006FBBCC /* Extensions */,
8E171DD5215B26B4006FBBCC /* Models */,
8E171DD3215B26B4006FBBCC /* Protocols */,
8E171DCC215B26B4006FBBCC /* Utilities */,
8E171DD9215B26B4006FBBCC /* View Controllers */,
);
path = Siren;
sourceTree = "<group>";
};
8E1005DE1A5DD02300509B14 /* SirenExample */ = {
8E171DCC215B26B4006FBBCC /* Utilities */ = {
isa = PBXGroup;
children = (
8EE6C7411E6A0AA500DBE454 /* AppDelegate.swift */,
8EE6C7421E6A0AA500DBE454 /* ViewController.swift */,
8EBDF8211E6A0C41006C87B4 /* LaunchScreen.xib */,
8EBDF8231E6A0C41006C87B4 /* Main.storyboard */,
8EE6C7461E6A0AB800DBE454 /* Images.xcassets */,
8EE6C7471E6A0AB800DBE454 /* Info.plist */,
8E171DE7215B27C2006FBBCC /* SirenConstants.swift */,
8E171DCD215B26B4006FBBCC /* SirenError.swift */,
8E171DCE215B26B4006FBBCC /* SirenLog.swift */,
8E171DEB215B28EC006FBBCC /* SirenHelpers.swift */,
);
name = SirenExample;
path = "Sample App";
name = Utilities;
path = ../../Sources/Utilities;
sourceTree = "<group>";
};
8E171DD0215B26B4006FBBCC /* Extensions */ = {
isa = PBXGroup;
children = (
8E171DD1215B26B4006FBBCC /* SirenBundleExtension.swift */,
8E171DD2215B26B4006FBBCC /* SirenDateExtension.swift */,
8E171DE5215B2701006FBBCC /* SirenLocalizationExtension.swift */,
8E171DD8215B26B4006FBBCC /* SirenUIAlertControllerExtension.swift */,
8E171DED215B2D09006FBBCC /* SirenUserDefaultsExtension.swift */,
);
name = Extensions;
path = ../../Sources/Extensions;
sourceTree = "<group>";
};
8E171DD3215B26B4006FBBCC /* Protocols */ = {
isa = PBXGroup;
children = (
8E171DD4215B26B4006FBBCC /* SirenDelegate.swift */,
);
name = Protocols;
path = ../../Sources/Protocols;
sourceTree = "<group>";
};
8E171DD5215B26B4006FBBCC /* Models */ = {
isa = PBXGroup;
children = (
8E171DD6215B26B4006FBBCC /* SirenAlertMessaging.swift */,
8E171DD7215B26B4006FBBCC /* SirenLookupModel.swift */,
);
name = Models;
path = ../../Sources/Models;
sourceTree = "<group>";
};
8E171DD9215B26B4006FBBCC /* View Controllers */ = {
isa = PBXGroup;
children = (
8E171DDA215B26B4006FBBCC /* SirenViewController.swift */,
);
name = "View Controllers";
path = "../../Sources/View Controllers";
sourceTree = "<group>";
};
8E641D2420C8B44B00908555 /* Frameworks */ = {
isa = PBXGroup;
children = (
);
name = Frameworks;
sourceTree = "<group>";
};
8EACA9651F37F2D3003134CA /* Example */ = {
isa = PBXGroup;
children = (
8EACA9661F37F2D3003134CA /* AppDelegate.swift */,
8EACA96E1F37F2DD003134CA /* Supporting Files */,
);
path = Example;
sourceTree = "<group>";
};
8EACA96E1F37F2DD003134CA /* Supporting Files */ = {
isa = PBXGroup;
children = (
8EACA9671F37F2D3003134CA /* LaunchScreen.xib */,
8EACA9691F37F2D3003134CA /* Main.storyboard */,
8EACA96B1F37F2D3003134CA /* Images.xcassets */,
8EACA96C1F37F2D3003134CA /* Info.plist */,
8EACA96D1F37F2D3003134CA /* ViewController.swift */,
55EC364A1E6BB98A00726F13 /* Info.plist */,
);
path = "Supporting Files";
sourceTree = "<group>";
};
8EC391781A58B465001C121E = {
isa = PBXGroup;
children = (
8E1005DE1A5DD02300509B14 /* SirenExample */,
8EE6C74A1E6A0AE100DBE454 /* SirenExampleTests */,
55EC36481E6BB98A00726F13 /* Siren */,
8EACA9651F37F2D3003134CA /* Example */,
8EE6C74A1E6A0AE100DBE454 /* Tests */,
8EC391821A58B465001C121E /* Products */,
55EC365D1E6BB98C00726F13 /* Siren copy-Info.plist */,
8E641D2420C8B44B00908555 /* Frameworks */,
);
sourceTree = "<group>";
};
8EC391821A58B465001C121E /* Products */ = {
isa = PBXGroup;
children = (
8EC391811A58B465001C121E /* SirenExample.app */,
8E3A6C041D07CB6F00A8B7CF /* SirenExampleTests.xctest */,
8EC391811A58B465001C121E /* Example.app */,
8E3A6C041D07CB6F00A8B7CF /* Tests.xctest */,
55EC36471E6BB98A00726F13 /* Siren.framework */,
);
name = Products;
sourceTree = "<group>";
};
8EE6C74A1E6A0AE100DBE454 /* SirenExampleTests */ = {
8EE6C74A1E6A0AE100DBE454 /* Tests */ = {
isa = PBXGroup;
children = (
8EE6C74B1E6A0AE100DBE454 /* Info.plist */,
8EE6C74C1E6A0AE100DBE454 /* SirenTests.swift */,
);
path = SirenExampleTests;
path = Tests;
sourceTree = "<group>";
};
/* End PBXGroup section */
@@ -183,9 +258,9 @@
productReference = 55EC36471E6BB98A00726F13 /* Siren.framework */;
productType = "com.apple.product-type.framework";
};
8E3A6C031D07CB6F00A8B7CF /* SirenExampleTests */ = {
8E3A6C031D07CB6F00A8B7CF /* Tests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 8E3A6C0D1D07CB6F00A8B7CF /* Build configuration list for PBXNativeTarget "SirenExampleTests" */;
buildConfigurationList = 8E3A6C0D1D07CB6F00A8B7CF /* Build configuration list for PBXNativeTarget "Tests" */;
buildPhases = (
8E3A6C001D07CB6F00A8B7CF /* Sources */,
8E3A6C011D07CB6F00A8B7CF /* Frameworks */,
@@ -196,29 +271,27 @@
dependencies = (
8E3A6C0A1D07CB6F00A8B7CF /* PBXTargetDependency */,
);
name = SirenExampleTests;
name = Tests;
productName = SirenTests;
productReference = 8E3A6C041D07CB6F00A8B7CF /* SirenExampleTests.xctest */;
productReference = 8E3A6C041D07CB6F00A8B7CF /* Tests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
8EC391801A58B465001C121E /* SirenExample */ = {
8EC391801A58B465001C121E /* Example */ = {
isa = PBXNativeTarget;
buildConfigurationList = 8EC391A01A58B466001C121E /* Build configuration list for PBXNativeTarget "SirenExample" */;
buildConfigurationList = 8EC391A01A58B466001C121E /* Build configuration list for PBXNativeTarget "Example" */;
buildPhases = (
8EC3917D1A58B465001C121E /* Sources */,
8EC3917E1A58B465001C121E /* Frameworks */,
8EE3A3F81E6A0E470010BDCE /* SwiftLint */,
8EC3917F1A58B465001C121E /* Resources */,
558455D81C6690B4004BE492 /* Embed Frameworks */,
);
buildRules = (
);
dependencies = (
55EC364D1E6BB98A00726F13 /* PBXTargetDependency */,
);
name = SirenExample;
name = Example;
productName = Siren;
productReference = 8EC391811A58B465001C121E /* SirenExample.app */;
productReference = 8EC391811A58B465001C121E /* Example.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
@@ -229,28 +302,39 @@
attributes = {
LastSwiftMigration = 0700;
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0820;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = "Sabintsev iOS Projects";
TargetAttributes = {
55EC36461E6BB98A00726F13 = {
CreatedOnToolsVersion = 8.2.1;
LastSwiftMigration = 0820;
LastSwiftMigration = 0900;
ProvisioningStyle = Automatic;
};
8E3A6C031D07CB6F00A8B7CF = {
CreatedOnToolsVersion = 7.3.1;
LastSwiftMigration = 0800;
LastSwiftMigration = 0900;
TestTargetID = 8EC391801A58B465001C121E;
};
8EC391801A58B465001C121E = {
CreatedOnToolsVersion = 6.1.1;
DevelopmentTeam = HT94948NDD;
DevelopmentTeamName = "Arthur Sabintsev";
LastSwiftMigration = 0800;
LastSwiftMigration = 0900;
SystemCapabilities = {
com.apple.BackgroundModes = {
enabled = 0;
};
com.apple.InAppPurchase = {
enabled = 0;
};
com.apple.Push = {
enabled = 0;
};
};
};
};
};
buildConfigurationList = 8EC3917C1A58B465001C121E /* Build configuration list for PBXProject "SirenExample" */;
buildConfigurationList = 8EC3917C1A58B465001C121E /* Build configuration list for PBXProject "Example" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
@@ -263,8 +347,8 @@
projectDirPath = "";
projectRoot = "";
targets = (
8EC391801A58B465001C121E /* SirenExample */,
8E3A6C031D07CB6F00A8B7CF /* SirenExampleTests */,
8EC391801A58B465001C121E /* Example */,
8E3A6C031D07CB6F00A8B7CF /* Tests */,
55EC36461E6BB98A00726F13 /* Siren */,
);
};
@@ -290,9 +374,9 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8EBDF8261E6A0C41006C87B4 /* Main.storyboard in Resources */,
8EBDF8251E6A0C41006C87B4 /* LaunchScreen.xib in Resources */,
8EE6C7481E6A0AB800DBE454 /* Images.xcassets in Resources */,
8EACA9711F380294003134CA /* LaunchScreen.xib in Resources */,
8EACA9721F380294003134CA /* Main.storyboard in Resources */,
8EACA9731F380294003134CA /* Images.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -320,7 +404,20 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8E171DE1215B26B4006FBBCC /* SirenAlertMessaging.swift in Sources */,
8E171DEE215B2D09006FBBCC /* SirenUserDefaultsExtension.swift in Sources */,
8E171DE2215B26B4006FBBCC /* SirenLookupModel.swift in Sources */,
8ED73400215DBE4900447E3B /* SirenHelpers.swift in Sources */,
55EC36611E6BB99B00726F13 /* Siren.swift in Sources */,
8ED733FC215DBE4900447E3B /* SirenDelegate.swift in Sources */,
8ED733FF215DBE4900447E3B /* SirenLog.swift in Sources */,
8E171DE4215B26B4006FBBCC /* SirenViewController.swift in Sources */,
8E171DE6215B2701006FBBCC /* SirenLocalizationExtension.swift in Sources */,
8E171DDE215B26B4006FBBCC /* SirenBundleExtension.swift in Sources */,
8ED733FD215DBE4900447E3B /* SirenConstants.swift in Sources */,
8E171DE3215B26B4006FBBCC /* SirenUIAlertControllerExtension.swift in Sources */,
8ED733FE215DBE4900447E3B /* SirenError.swift in Sources */,
8E171DDF215B26B4006FBBCC /* SirenDateExtension.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -336,39 +433,34 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8EE6C7431E6A0AA500DBE454 /* AppDelegate.swift in Sources */,
8EE6C7441E6A0AA500DBE454 /* ViewController.swift in Sources */,
8EACA9741F38029B003134CA /* AppDelegate.swift in Sources */,
8EACA9751F38029B003134CA /* ViewController.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
55EC364D1E6BB98A00726F13 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 55EC36461E6BB98A00726F13 /* Siren */;
targetProxy = 55EC364C1E6BB98A00726F13 /* PBXContainerItemProxy */;
};
8E3A6C0A1D07CB6F00A8B7CF /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 8EC391801A58B465001C121E /* SirenExample */;
target = 8EC391801A58B465001C121E /* Example */;
targetProxy = 8E3A6C091D07CB6F00A8B7CF /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
8EBDF8211E6A0C41006C87B4 /* LaunchScreen.xib */ = {
8EACA9671F37F2D3003134CA /* LaunchScreen.xib */ = {
isa = PBXVariantGroup;
children = (
8EBDF8221E6A0C41006C87B4 /* Base */,
8EACA9681F37F2D3003134CA /* Base */,
);
name = LaunchScreen.xib;
sourceTree = "<group>";
};
8EBDF8231E6A0C41006C87B4 /* Main.storyboard */ = {
8EACA9691F37F2D3003134CA /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
8EBDF8241E6A0C41006C87B4 /* Base */,
8EACA96A1F37F2D3003134CA /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
@@ -386,6 +478,7 @@
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -393,12 +486,13 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.sabintsev.Siren;
PRODUCT_BUNDLE_IDENTIFIER = com.apple.AppStoreConnect;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
@@ -416,6 +510,7 @@
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -423,11 +518,12 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.sabintsev.Siren;
PRODUCT_BUNDLE_IDENTIFIER = com.apple.AppStoreConnect;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
@@ -437,36 +533,40 @@
8E3A6C0B1D07CB6F00A8B7CF /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ANALYZER_NONNULL = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = SirenExampleTests/Info.plist;
INFOPLIST_FILE = Tests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.sabintsev.SirenTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SirenExample.app/SirenExample";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example";
};
name = Debug;
};
8E3A6C0C1D07CB6F00A8B7CF /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ANALYZER_NONNULL = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = SirenExampleTests/Info.plist;
INFOPLIST_FILE = Tests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.sabintsev.SirenTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SirenExample.app/SirenExample";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example";
};
name = Release;
};
@@ -478,14 +578,22 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -513,6 +621,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
};
name = Debug;
};
@@ -524,14 +633,22 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -550,6 +667,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_VERSION = 4.2;
VALIDATE_PRODUCT = YES;
};
name = Release;
@@ -557,29 +675,31 @@
8EC391A11A58B466001C121E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = "$(SRCROOT)/SirenExample/Info.plist";
DEVELOPMENT_TEAM = HT94948NDD;
INFOPLIST_FILE = "$(SRCROOT)/Siren/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.apple.itunesconnect.mobile;
PRODUCT_NAME = SirenExample;
SWIFT_VERSION = 3.0;
PRODUCT_BUNDLE_IDENTIFIER = com.apple.AppStoreConnect;
PRODUCT_NAME = Example;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
8EC391A21A58B466001C121E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = "$(SRCROOT)/SirenExample/Info.plist";
DEVELOPMENT_TEAM = HT94948NDD;
INFOPLIST_FILE = "$(SRCROOT)/Siren/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.apple.itunesconnect.mobile;
PRODUCT_NAME = SirenExample;
PRODUCT_BUNDLE_IDENTIFIER = com.apple.AppStoreConnect;
PRODUCT_NAME = Example;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
};
name = Release;
};
@@ -593,8 +713,9 @@
55EC36511E6BB98A00726F13 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
8E3A6C0D1D07CB6F00A8B7CF /* Build configuration list for PBXNativeTarget "SirenExampleTests" */ = {
8E3A6C0D1D07CB6F00A8B7CF /* Build configuration list for PBXNativeTarget "Tests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
8E3A6C0B1D07CB6F00A8B7CF /* Debug */,
@@ -603,7 +724,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
8EC3917C1A58B465001C121E /* Build configuration list for PBXProject "SirenExample" */ = {
8EC3917C1A58B465001C121E /* Build configuration list for PBXProject "Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
8EC3919E1A58B466001C121E /* Debug */,
@@ -612,7 +733,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
8EC391A01A58B466001C121E /* Build configuration list for PBXNativeTarget "SirenExample" */ = {
8EC391A01A58B466001C121E /* Build configuration list for PBXNativeTarget "Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
8EC391A11A58B466001C121E /* Debug */,
@@ -2,6 +2,6 @@
<Workspace
version = "1.0">
<FileRef
location = "self:/Users/Arthur/Documents/oss/siren/Sample App/SirenExample.xcodeproj">
location = "self:/Users/Arthur/Documents/oss/siren/SirenExample/Example.xcodeproj">
</FileRef>
</Workspace>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
LastUpgradeVersion = "0940"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -15,9 +15,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8EC391801A58B465001C121E"
BuildableName = "SirenExample.app"
BlueprintName = "SirenExample"
ReferencedContainer = "container:SirenExample.xcodeproj">
BuildableName = "Example.app"
BlueprintName = "Example"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
@@ -33,9 +33,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8E3A6C031D07CB6F00A8B7CF"
BuildableName = "SirenExampleTests.xctest"
BlueprintName = "SirenExampleTests"
ReferencedContainer = "container:SirenExample.xcodeproj">
BuildableName = "Tests.xctest"
BlueprintName = "Tests"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
@@ -43,9 +43,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8EC391801A58B465001C121E"
BuildableName = "SirenExample.app"
BlueprintName = "SirenExample"
ReferencedContainer = "container:SirenExample.xcodeproj">
BuildableName = "Example.app"
BlueprintName = "Example"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
@@ -66,9 +66,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8EC391801A58B465001C121E"
BuildableName = "SirenExample.app"
BlueprintName = "SirenExample"
ReferencedContainer = "container:SirenExample.xcodeproj">
BuildableName = "Example.app"
BlueprintName = "Example"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
@@ -85,9 +85,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8EC391801A58B465001C121E"
BuildableName = "SirenExample.app"
BlueprintName = "SirenExample"
ReferencedContainer = "container:SirenExample.xcodeproj">
BuildableName = "Example.app"
BlueprintName = "Example"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -17,7 +17,7 @@
BlueprintIdentifier = "55EC36461E6BB98A00726F13"
BuildableName = "Siren.framework"
BlueprintName = "Siren"
ReferencedContainer = "container:SirenExample.xcodeproj">
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
@@ -48,7 +48,7 @@
BlueprintIdentifier = "55EC36461E6BB98A00726F13"
BuildableName = "Siren.framework"
BlueprintName = "Siren"
ReferencedContainer = "container:SirenExample.xcodeproj">
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
@@ -66,7 +66,7 @@
BlueprintIdentifier = "55EC36461E6BB98A00726F13"
BuildableName = "Siren.framework"
BlueprintName = "Siren"
ReferencedContainer = "container:SirenExample.xcodeproj">
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
@@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
window?.makeKeyAndVisible()
setupSiren()
@@ -31,34 +31,43 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// Optional
siren.debugEnabled = true
// Optional
siren.appName = "Test App Name"
// Optional - Change the name of your app. Useful if you have a long app name and want to display a shortened version in the update dialog (e.g., the UIAlertController).
// siren.appName = "Test App Name"
// Optional - Change the various UIAlertController and UIAlertAction messaging. One or more values can be changes. If only a subset of values are changed, the defaults with which Siren comes with will be used.
// siren.alertMessaging = SirenAlertMessaging(updateTitle: NSAttributedString(string: "New Fancy Title"),
// updateMessage: NSAttributedString(string: "New message goes here!"),
// updateButtonMessage: NSAttributedString(string: "Update Now, Plz!?"),
// nextTimeButtonMessage: NSAttributedString(string: "OK, next time it is!"),
// skipVersionButtonMessage: NSAttributedString(string: "Please don't push skip, please don't!"))
// Optional - Defaults to .Option
// siren.alertType = .Option // or .Force, .Skip, .None
// siren.alertType = .option // or .force, .skip, .none
// Optional - Can set differentiated Alerts for Major, Minor, Patch, and Revision Updates (Must be called AFTER siren.alertType, if you are using siren.alertType)
siren.majorUpdateAlertType = .option
siren.minorUpdateAlertType = .option
siren.patchUpdateAlertType = .option
siren.revisionUpdateAlertType = .option
// Optional - Sets all messages to appear in Russian. Siren supports many other languages, not just English and Russian.
// siren.forceLanguageLocalization = .Russian
// Optional - Set this variable if your app is not available in the U.S. App Store. List of codes: https://developer.apple.com/library/content/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Appendices/AppStoreTerritories.html
// Optional - Sets all messages to appear in Russian. Siren supports many other languages, not just English and Russian.
// siren.forceLanguageLocalization = .russian
// Optional - Set this variable if your app is not available in the U.S. App Store. List of codes: https://developer.apple.com/library/content/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Chapters/AppStoreTerritories.html
// siren.countryCode = ""
// Optional - Set this variable if you would only like to show an alert if your app has been available on the store for a few days. The number 5 is used as an example.
// siren.showAlertAfterCurrentVersionHasBeenReleasedForDays = 5
// Optional - Set this variable if you would only like to show an alert if your app has been available on the store for a few days.
// This default value is set to 1 to avoid this issue: https://github.com/ArtSabintsev/Siren#words-of-caution
// To show the update immediately after Apple has updated their JSON, set this value to 0. Not recommended due to aforementioned reason in https://github.com/ArtSabintsev/Siren#words-of-caution.
siren.showAlertAfterCurrentVersionHasBeenReleasedForDays = 0
// Required
siren.checkVersion(checkType: .immediately)
// Optional (Only do this if you don't call checkVersion in didBecomeActive)
// siren.checkVersion(checkType: .immediately)
}
func applicationWillEnterForeground(_ application: UIApplication) {
// 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.
Siren.shared.checkVersion(checkType: .immediately)
Siren.shared.checkVersion(checkType: .daily)
}
func applicationDidBecomeActive(_ application: UIApplication) {
@@ -69,7 +78,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
extension AppDelegate: SirenDelegate
{
func sirenDidShowUpdateDialog(alertType: SirenAlertType) {
func sirenDidShowUpdateDialog(alertType: Siren.AlertType) {
print(#function, alertType)
}
@@ -85,7 +94,7 @@ extension AppDelegate: SirenDelegate
print(#function)
}
func sirenDidFailVersionCheck(error: NSError) {
func sirenDidFailVersionCheck(error: Error) {
print(#function, error)
}
@@ -93,8 +102,12 @@ extension AppDelegate: SirenDelegate
print(#function, "Latest version of app is installed")
}
func sirenNetworkCallDidReturnWithNewVersionInformation(lookupModel: SirenLookupModel) {
print(#function, "\(lookupModel)")
}
// This delegate method is only hit when alertType is initialized to .none
func sirenDidDetectNewVersionWithoutAlert(message: String) {
print(#function, "\(message)")
func sirenDidDetectNewVersionWithoutAlert(title: String, message: String, updateType: UpdateType) {
print(#function, "\n\(title)\n\(message).\nRelease type: \(updateType.rawValue.capitalized)")
}
}
@@ -1,21 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="vXZ-lx-hvc">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="vXZ-lx-hvc">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="ufC-wZ-h7g">
<objects>
<viewController id="vXZ-lx-hvc" customClass="ViewController" customModule="Sample_App" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="vXZ-lx-hvc" customClass="ViewController" customModule="Example" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="jyV-Pf-zRb"/>
<viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
@@ -1,5 +1,15 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
@@ -29,6 +39,11 @@
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<string>0.0.9</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
@@ -15,10 +15,14 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>0.0.9</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
</dict>
</plist>
@@ -15,5 +15,3 @@ FOUNDATION_EXPORT double SirenVersionNumber;
FOUNDATION_EXPORT const unsigned char SirenVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <Siren/PublicHeader.h>
+838
View File
@@ -0,0 +1,838 @@
//
// SirenTests.swift
// SirenTests
//
// Created by Arthur Sabintsev on 6/7/16.
// Copyright © 2016 Sabintsev iOS Projects. All rights reserved.
//
import XCTest
@testable import Siren
class SirenTests: XCTestCase {
let siren = Siren.shared
}
// MARK: - Updates
extension SirenTests {
func testSingleDigitVersionUpdate() {
siren.testSetCurrentInstalledVersion(version: "1")
siren.testSetAppStoreVersion(version: "2")
XCTAssertTrue(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "2.0")
XCTAssertTrue(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "2.0.0")
XCTAssertTrue(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "2.0.0.0")
XCTAssertTrue(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0")
XCTAssertFalse(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0.9")
XCTAssertFalse(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0.0.9")
XCTAssertFalse(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0.0.0.9")
XCTAssertFalse(siren.isAppStoreVersionNewer())
}
func testDoubleDigitVersionUpdate() {
siren.testSetCurrentInstalledVersion(version: "1.0")
siren.testSetAppStoreVersion(version: "2")
XCTAssertTrue(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "2.0")
XCTAssertTrue(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "2.0.0")
XCTAssertTrue(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "2.0.0.0")
XCTAssertTrue(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0")
XCTAssertFalse(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0.9")
XCTAssertFalse(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0.0.9")
XCTAssertFalse(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0.0.0.9")
XCTAssertFalse(siren.isAppStoreVersionNewer())
}
func testTripleDigitVersionUpdate() {
siren.testSetCurrentInstalledVersion(version: "1.0.0")
siren.testSetAppStoreVersion(version: "2")
XCTAssertTrue(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "2.0")
XCTAssertTrue(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "2.0.0")
XCTAssertTrue(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "2.0.0.0")
XCTAssertTrue(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0")
XCTAssertFalse(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0.9")
XCTAssertFalse(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0.0.9")
XCTAssertFalse(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0.0.0.9")
XCTAssertFalse(siren.isAppStoreVersionNewer())
}
func testQuadrupleDigitVersionUpdate() {
siren.testSetCurrentInstalledVersion(version: "1.0.0")
siren.testSetAppStoreVersion(version: "2")
XCTAssertTrue(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "2.0")
XCTAssertTrue(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "2.0.0")
XCTAssertTrue(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "2.0.0.0")
XCTAssertTrue(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0")
XCTAssertFalse(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0.9")
XCTAssertFalse(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0.0.9")
XCTAssertFalse(siren.isAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0.0.0.9")
XCTAssertFalse(siren.isAppStoreVersionNewer())
}
}
// MARK: - Localization
extension SirenTests {
func testArabicLocalization() {
let language: Siren.LanguageType = .arabic
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "التحديث متوفر")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "المرة التالية")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "تخطى عن هذه النسخة")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "تحديث")
}
func testArmenianLocalization() {
let language: Siren.LanguageType = .armenian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Թարմացումը հասանելի Է")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Հաջորդ անգամ")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Բաց թողնել այս տարբերակը")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Թարմացնել")
}
func testBasqueLocalization() {
let language: Siren.LanguageType = .basque
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Eguneratzea erabilgarri")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Hurrengo batean")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Bertsio honetatik jauzi egin")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Eguneratu")
}
func testChineseSimplifiedLocalization() {
let language: Siren.LanguageType = .chineseSimplified
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "更新可用")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "下一次")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "跳过此版本")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "更新")
}
func testChineseTraditionalLocalization() {
let language: Siren.LanguageType = .chineseTraditional
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "有更新可用")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "下次")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "跳過此版本")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "更新")
}
func testCroatianLocalization() {
let language: Siren.LanguageType = .croatian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Nova ažuriranje je stigla")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Sljedeći put")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Preskoči ovu verziju")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Ažuriraj")
}
func testCzechLocalization() {
let language: Siren.LanguageType = .czech
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Aktualizace dostupná")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Příště")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Přeskočit tuto verzi")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Aktualizovat")
}
func testDanishLocalization() {
let language: Siren.LanguageType = .danish
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Tilgængelig opdatering")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Næste gang")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Spring denne version over")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Opdater")
}
func testDutchLocalization() {
let language: Siren.LanguageType = .dutch
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Update beschikbaar")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Volgende keer")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Sla deze versie over")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Updaten")
}
func testEstonianLocalization() {
let language: Siren.LanguageType = .estonian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Uuendus saadaval")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Järgmisel korral")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Jäta see version vahele")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Uuenda")
}
func testFinnishLocalization() {
let language: Siren.LanguageType = .finnish
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Päivitys saatavilla")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Ensi kerralla")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Jätä tämä versio väliin")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Päivitys")
}
func testFrenchLocalization() {
let language: Siren.LanguageType = .french
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Mise à jour disponible")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "La prochaine fois")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Sauter cette version")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Mettre à jour")
}
func testGermanLocalization() {
let language: Siren.LanguageType = .german
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Update erhältlich")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Später")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Diese Version überspringen")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Update")
}
func testGreekLocalization() {
let language: Siren.LanguageType = .greek
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Διαθέσιμη Ενημέρωση")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Άλλη φορά")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Αγνόησε αυτήν την έκδοση")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Αναβάθμιση")
}
func testHebrewLocalization() {
let language: Siren.LanguageType = .hebrew
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "עדכון זמין")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "בפעם הבאה")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "דלג על גרסה זו")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "עדכן")
}
func testHungarianLocalization() {
let language: Siren.LanguageType = .hungarian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Új frissítés érhető el")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Később")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Ennél a verziónál ne figyelmeztessen")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Frissítés")
}
func testIndonesianLocalization() {
let language: Siren.LanguageType = .indonesian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Pembaruan Tersedia")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Lain kali")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Lewati versi ini")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Perbarui")
}
func testItalianLocalization() {
let language: Siren.LanguageType = .italian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Aggiornamento disponibile")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "La prossima volta")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Salta questa versione")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Aggiorna")
}
func testJapaneseLocalization() {
let language: Siren.LanguageType = .japanese
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "アップデートのお知らせ")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "次回")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "このバージョンをスキップ")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "アップデート")
}
func testKoreanLocalization() {
let language: Siren.LanguageType = .korean
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "업데이트 가능")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "다음에")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "이 버전 건너뜀")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "업데이트")
}
func testLatvianLocalization() {
let language: Siren.LanguageType = .latvian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Atjauninājums pieejams")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Nākamreiz")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Izlaist šo versiju")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Atjaunināt")
}
func testLithuanianLocalization() {
let language: Siren.LanguageType = .lithuanian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Atnaujinimas")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Kitą kartą")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Praleisti šią versiją")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Atnaujinti")
}
func testMalayLocalization() {
let language: Siren.LanguageType = .malay
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Versi Terkini")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Lain kali")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Langkau versi ini")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Muat turun")
}
func testNorwegianLocalization() {
let language: Siren.LanguageType = .norwegian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Oppdatering tilgjengelig")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Neste gang")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Hopp over denne versjonen")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Oppdater")
}
func testPersianLocalization() {
let language: Siren.LanguageType = .persian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "بروزرسانی در دسترس")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "دفعه بعد")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "رد این نسخه")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "بروزرسانی")
}
func testPersianAfghanistanLocalization() {
let language: Siren.LanguageType = .persianAfghanistan
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "بروزرسانی در دسترس")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "دگر بار")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "رد این نسخه")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "بروزرسانی")
}
func testPersianIranLocalization() {
let language: Siren.LanguageType = .persianIran
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "بروزرسانی در دسترس")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "دفعه بعد")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "رد این نسخه")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "بروزرسانی")
}
func testPolishLocalization() {
let language: Siren.LanguageType = .polish
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Aktualizacja dostępna")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Następnym razem")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Pomiń wersję")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Zaktualizuj")
}
func testPortugueseBrazilLocalization() {
let language: Siren.LanguageType = .portugueseBrazil
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Atualização disponível")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Próxima vez")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Ignorar esta versão")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Atualizar")
}
func testPortuguesePortugalLocalization() {
let language: Siren.LanguageType = .portuguesePortugal
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Nova actualização disponível")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Próxima vez")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Ignorar esta versão")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Actualizar")
}
func testRussianLocalization() {
let language: Siren.LanguageType = .russian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Доступно обновление")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "В следующий раз")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Пропустить эту версию")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Обновить")
}
func testSerbianCyrillicLocalization() {
let language: Siren.LanguageType = .serbianCyrillic
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Ажурирање доступно")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Следећи пут")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Прескочи ову верзију")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Ажурирај")
}
func testSerbianLatinLocalization() {
let language: Siren.LanguageType = .serbianLatin
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Ažuriranje dostupno")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Sledeći put")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Preskoči ovu verziju")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Ažuriraj")
}
func testSlovenianLocalization() {
let language: Siren.LanguageType = .slovenian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Posodobitev aplikacije")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Naslednjič")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Ne želim")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Namesti")
}
func testSpanishLocalization() {
let language: Siren.LanguageType = .spanish
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Actualización disponible")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "La próxima vez")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Saltar esta versión")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Actualizar")
}
func testSwedishLocalization() {
let language: Siren.LanguageType = .swedish
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Tillgänglig uppdatering")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Nästa gång")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Hoppa över den här versionen")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Uppdatera")
}
func testThaiLocalization() {
let language: Siren.LanguageType = .thai
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "มีการอัพเดท")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "ไว้คราวหน้า")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "ข้ามเวอร์ชั่นนี้")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "อัพเดท")
}
func testTurkishLocalization() {
let language: Siren.LanguageType = .turkish
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Güncelleme Mevcut")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Daha sonra")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Boşver")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Güncelle")
}
func testUkrainianLocalization() {
let language: Siren.LanguageType = .ukrainian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Доступне Оновлення")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Наступного разу")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Пропустити версію")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Оновити")
}
func testUrduLocalization() {
let language: Siren.LanguageType = .urdu
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "نیا اپڈیٹ")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "اگلی مرتبہ")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "اس ورزن کو چھوڑ دیں")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "اپڈیٹ کریں")
}
func testVietnameseLocalization() {
let language: Siren.LanguageType = .vietnamese
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update Available", forceLanguageLocalization: language), "Cập nhật mới")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Next time", forceLanguageLocalization: language), "Lần tới")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Skip this version", forceLanguageLocalization: language), "Bỏ qua phiên bản này")
// Update
XCTAssertEqual(Bundle().testLocalizedString(forKey: "Update", forceLanguageLocalization: language), "Cập nhật")
}
}
+3 -2
View File
@@ -1,5 +1,6 @@
# A sample Gemfile
source "https://rubygems.org"
gem "cocoapods", "1.2.0"
gem "jazzy"
gem "cocoapods"
gem "jazzy", :git => "https://www.github.com/realm/jazzy.git"
gem "rubygems-bundler"
+71 -49
View File
@@ -1,92 +1,114 @@
GIT
remote: https://www.github.com/realm/jazzy.git
revision: 916cf729525040c43ea31fc55a3730dee04f1a29
specs:
jazzy (0.9.4)
cocoapods (~> 1.5.3)
mustache (~> 1.1.0)
open4
redcarpet (~> 3.4.0)
rouge (>= 2.0.6, < 4.0)
sass (~> 3.6.0)
sqlite3 (~> 1.3.13)
xcinvoke (~> 0.3.0)
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (2.3.5)
activesupport (4.2.8)
CFPropertyList (3.0.0)
activesupport (4.2.10)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
claide (1.0.1)
cocoapods (1.2.0)
atomos (0.1.3)
bundler-unload (1.0.2)
claide (1.0.2)
cocoapods (1.5.3)
activesupport (>= 4.0.2, < 5)
claide (>= 1.0.1, < 2.0)
cocoapods-core (= 1.2.0)
cocoapods-deintegrate (>= 1.0.1, < 2.0)
cocoapods-downloader (>= 1.1.3, < 2.0)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.5.3)
cocoapods-deintegrate (>= 1.0.2, < 2.0)
cocoapods-downloader (>= 1.2.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-stats (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.1.2, < 2.0)
cocoapods-trunk (>= 1.3.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored (~> 1.2)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (~> 2.0.1)
gh_inspector (~> 1.0)
molinillo (~> 0.5.5)
molinillo (~> 0.6.5)
nap (~> 1.0)
ruby-macho (~> 0.2.5)
xcodeproj (>= 1.4.1, < 2.0)
cocoapods-core (1.2.0)
activesupport (>= 4.0.2, < 5)
ruby-macho (~> 1.1)
xcodeproj (>= 1.5.7, < 2.0)
cocoapods-core (1.5.3)
activesupport (>= 4.0.2, < 6)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
cocoapods-deintegrate (1.0.1)
cocoapods-downloader (1.1.3)
cocoapods-deintegrate (1.0.2)
cocoapods-downloader (1.2.2)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.0)
cocoapods-stats (1.0.0)
cocoapods-trunk (1.1.2)
cocoapods-trunk (1.3.1)
nap (>= 0.8, < 2.0)
netrc (= 0.7.8)
netrc (~> 0.11)
cocoapods-try (1.1.0)
colored (1.2)
colored2 (3.1.2)
concurrent-ruby (1.0.5)
escape (0.0.4)
executable-hooks (1.6.0)
ffi (1.9.25)
fourflusher (2.0.1)
fuzzy_match (2.0.4)
gh_inspector (1.0.3)
i18n (0.8.1)
jazzy (0.7.4)
cocoapods (~> 1.0)
mustache (~> 0.99)
open4
redcarpet (~> 3.2)
rouge (~> 1.5)
sass (~> 3.4)
sqlite3 (~> 1.3)
xcinvoke (~> 0.3.0)
gh_inspector (1.1.3)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
liferaft (0.0.6)
minitest (5.10.1)
molinillo (0.5.7)
mustache (0.99.8)
nanaimo (0.2.3)
minitest (5.11.3)
molinillo (0.6.6)
mustache (1.1.0)
nanaimo (0.2.6)
nap (1.1.0)
netrc (0.7.8)
netrc (0.11.0)
open4 (1.3.4)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
redcarpet (3.4.0)
rouge (1.11.1)
ruby-macho (0.2.6)
sass (3.4.23)
rouge (3.3.0)
ruby-macho (1.3.1)
rubygems-bundler (1.4.5)
bundler-unload (>= 1.0.2)
executable-hooks (>= 1.5.0)
sass (3.6.0)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sqlite3 (1.3.13)
thread_safe (0.3.6)
tzinfo (1.2.2)
tzinfo (1.2.5)
thread_safe (~> 0.1)
xcinvoke (0.3.0)
liferaft (~> 0.0.6)
xcodeproj (1.4.2)
CFPropertyList (~> 2.3.3)
activesupport (>= 3)
claide (>= 1.0.1, < 2.0)
colored (~> 1.2)
nanaimo (~> 0.2.3)
xcodeproj (1.7.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.2.6)
PLATFORMS
ruby
DEPENDENCIES
cocoapods (= 1.2.0)
jazzy
cocoapods
jazzy!
rubygems-bundler
BUNDLED WITH
1.14.5
1.17.1
+156 -83
View File
@@ -1,8 +1,28 @@
# Siren
# Siren 🚨
### Notify users when a new version of your app is available and prompt them to upgrade.
[![CocoaPods](https://img.shields.io/cocoapods/v/Siren.svg)](https://cocoapods.org/pods/Siren) [![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![SwiftPM Compatible](https://img.shields.io/badge/SwiftPM-Compatible-brightgreen.svg)](https://swift.org/package-manager/) [![CocoaPods](https://img.shields.io/cocoapods/dt/Siren.svg)](https://cocoapods.org/pods/Siren) [![CocoaPods](https://img.shields.io/cocoapods/dm/Siren.svg)](https://cocoapods.org/pods/Siren)
[![Travis CI Status](https://travis-ci.org/ArtSabintsev/Siren.svg?branch=master)](https://travis-ci.org/ArtSabintsev/Siren) ![Swift Support](https://img.shields.io/badge/Swift-4.2%2C%204.1%2C%203.2%2C%203.1%202.3-orange.svg) ![Documentation](https://github.com/ArtSabintsev/Siren/blob/master/docs/badge.svg) [![CocoaPods](https://img.shields.io/cocoapods/v/Siren.svg)](https://cocoapods.org/pods/Siren) [![Carthage Compatible](https://img.shields.io/badge/carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![SwiftPM Compatible](https://img.shields.io/badge/SwiftPM-compatible-brightgreen.svg)](https://swift.org/package-manager/)
---
## Table of Contents
- [About](https://github.com/ArtSabintsev/Siren#about)
- [Features](https://github.com/ArtSabintsev/Siren#features)
- [Screenshots](https://github.com/ArtSabintsev/Siren#screenshots)
- [Installation Instructions](https://github.com/ArtSabintsev/Siren#installation-instructions)
- [Example Code](https://github.com/ArtSabintsev/Siren#example-code)
- [Granular/Differentiated Version Management](https://github.com/ArtSabintsev/Siren#granular-version-update-management)
- [Delegates (Optional)](https://github.com/ArtSabintsev/Siren#optional-delegate-and-delegate-methods)
- [Localization](https://github.com/ArtSabintsev/Siren#localization)
- [Device Compatibility](https://github.com/ArtSabintsev/Siren#device-compatibility)
- [Testing Siren](https://github.com/ArtSabintsev/Siren#testing-siren)
- [App Store Review & Submissions](https://github.com/ArtSabintsev/Siren#app-store-submissions)
- [Phased Releases](https://github.com/ArtSabintsev/Siren#phased-releases)
- [Words of Caution](https://github.com/ArtSabintsev/Siren#words-of-caution)
- [Ports](https://github.com/ArtSabintsev/Siren#ports)
- [Attribution](https://github.com/ArtSabintsev/Siren#created-and-maintained-by)
---
## About
@@ -10,83 +30,72 @@
If a new version is available, an alert can be presented to the user informing them of the newer version, and giving them the option to update the application. Alternatively, Siren can notify your app programmatically, enabling you to inform the user through alternative means, such as a custom interface.
- Siren is built to work with the [**Semantic Versioning**](http://semver.org/) system.
- Siren is built to work with the [**Semantic Versioning**](https://semver.org/) system.
- Semantic Versioning is a three number versioning system (e.g., 1.0.0)
- Siren also supports two-number versioning (e.g., 1.0) and four-number versioning (e.g., 1.0.0.0)
- Siren is actively maintained by [**Arthur Sabintsev**](http://github.com/ArtSabintsev) and [**Aaron Brager**](http://twitter.com/getaaron)
- Siren is actively maintained by [**Arthur Sabintsev**](https://github.com/ArtSabintsev) and [**Aaron Brager**](https://twitter.com/getaaron)
## README Translations
- [**简体中文**](README.zh_CN.md) (by [**Daniel Hu**](http://www.jianshu.com/u/d8bbc4831623))
## Ports
- Siren is a Swift language port of [**Harpy**](http://github.com/ArtSabintsev/Harpy), an Objective-C library that achieves the same functionality.
- Siren and Harpy are maintained by the same developers.
- This library was the inspiration for [**Egghead Games' Siren library**](https://github.com/eggheadgames/Siren), which achieves the same functionality with the Google Play store on the Android platform.
- This library was the inspiration for [**Gant Laborde's Siren library**](https://github.com/GantMan/react-native-siren), which achieves the same functionality for React Native projects (iOS/Android).
### README Translations
- [**简体中文**](README.zh_CN.md) (by [**Daniel Hu**](https://www.jianshu.com/u/d8bbc4831623))
## Features
- [x] CocoaPods Support
- [x] Carthage Support
- [x] Swift Package Manager Support
- [x] Localized for 30+ languages (See **Localization**)
- [x] Pre-Update Device Compatibility Check (See **Device Compatibility**)
- [x] Three types of alerts (see **Screenshots**)
- [x] Optional delegate methods (see **Optional Delegate**)
- [x] Unit Tests!
- [x] Localized for 30+ languages (see [Localization](https://github.com/ArtSabintsev/Siren#localization))
- [x] Pre-Update Device Compatibility Check (see [Device Compatibility](https://github.com/ArtSabintsev/Siren#device-compatibility))
- [x] Three types of alerts (see [Screenshots](https://github.com/ArtSabintsev/Siren#screenshots))
- [x] Optional delegate methods (see [Delegates (Optional)](https://github.com/ArtSabintsev/Siren#optional-delegate-and-delegate-methods))
- [x] Unit Tests
- [x] Documentation can be found at http://sabintsev.com/Siren.
## Screenshots
- The **left picture** forces the user to update the app.
- The **center picture** gives the user the option to update the app.
- The **right picture** gives the user the option to skip the current update.
- These options are controlled by the `SirenAlertType` enum.
- These options are controlled by the `Siren.AlertType` enum.
<img src="https://github.com/ArtSabintsev/Harpy/blob/master/Assets/picForcedUpdate.png?raw=true" height=480">
<img src="https://github.com/ArtSabintsev/Harpy/blob/master/Assets/picOptionalUpdate.png?raw=true" height=480">
<img src="https://github.com/ArtSabintsev/Harpy/blob/master/Assets/picSkippedUpdate.png?raw=true" height=480">
<img src="https://github.com/ArtSabintsev/Siren/blob/master/Assets/picForcedUpdate.png?raw=true" height="480"><img src="https://github.com/ArtSabintsev/Siren/blob/master/Assets/picOptionalUpdate.png?raw=true" height="480"><img src="https://github.com/ArtSabintsev/Siren/blob/master/Assets/picSkippedUpdate.png?raw=true" height="480">
## Installation Instructions
| Swift Version | Branch Name | Will Continue to Receive Updates?
| ------------- | ------------- | -------------
| 4.2 | master | **Yes**
| 4.1 | swift4.1 | No
| 3.2 | swift3.2 | No
| 3.1 | swift3.1 | No
| 2.3 | swift2.3 | No
### CocoaPods
For Swift 3 support:
```ruby
pod 'Siren'
```
For Swift 2.3 support:
```ruby
pod 'Siren', :git => 'https://github.com/ArtSabintsev/Siren.git', :branch => 'swift2.3'
```
For Swift 2.2 support:
```ruby
pod 'Siren', '0.9.5'
pod 'Siren' # Swift 4.2
pod 'Siren', :git => 'https://github.com/ArtSabintsev/Siren.git', :branch => 'swift4.1' # Swift 4.1
pod 'Siren', :git => 'https://github.com/ArtSabintsev/Siren.git', :branch => 'swift3.2' # Swift 3.2
pod 'Siren', :git => 'https://github.com/ArtSabintsev/Siren.git', :branch => 'swift3.1' # Swift 3.1
pod 'Siren', :git => 'https://github.com/ArtSabintsev/Siren.git', :branch => 'swift2.3' # Swift 2.3
```
### Carthage
For Swift 3 support:
``` swift
github "ArtSabintsev/Siren"
```
For Swift 2.3 support:
``` swift
github "ArtSabintsev/Siren" "swift2.3"
```swift
github "ArtSabintsev/Siren" // Swift 4.2
github "ArtSabintsev/Siren" "swift4.1" // Swift 4.1
github "ArtSabintsev/Siren" "swift3.2" // Swift 3.2
github "ArtSabintsev/Siren" "swift3.1" // Swift 3.1
github "ArtSabintsev/Siren" "swift2.3" // Swift 2.3
```
### Swift Package Manager
```swift
.Package(url: "https://github.com/ArtSabintsev/Siren.git", majorVersion: 1)
.Package(url: "https://github.com/ArtSabintsev/Siren.git", majorVersion: 3)
```
## Setup
## Example Code
Here's some commented sample code. Adapt this to meet your app's needs. For a full list of optional settings/preferences, please refer to https://github.com/ArtSabintsev/Siren/blob/master/Sample%20App/Sample%20App/AppDelegate.swift in the Sample Project.
Below is some commented sample code. Adapt this to meet your app's needs.
Full documentation can be found at http://sabintsev.com/Siren.
For a full list of optional settings/preferences, please refer to https://github.com/ArtSabintsev/Siren/blob/master/Example/Example/AppDelegate.swift in the Sample Project.
```Swift
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
@@ -95,33 +104,45 @@ func application(application: UIApplication, didFinishLaunchingWithOptions launc
// Siren is a singleton
let siren = Siren.shared
// Optional: Defaults to .Option
siren.alertType = <#SirenAlertType_Enum_Value#>
// Optional: Defaults to .option
siren.alertType = <#Siren.AlertType_Enum_Value#>
/*
Replace .Immediately with .Daily or .Weekly to specify a maximum daily or weekly frequency for version
checks.
*/
siren.checkVersion(checkType: .immediately)
// Optional: Change the various UIAlertController and UIAlertAction messaging. One or more values can be changes. If only a subset of values are changed, the defaults with which Siren comes with will be used.
siren.alertMessaging = SirenAlertMessaging(updateTitle: NSAttributedString(string: "New Fancy Title"),
updateMessage: NSAttributedString(string: "New message goes here!"),
updateButtonMessage: NSAttributedString(string: "Update Now, Plz!?"),
nextTimeButtonMessage: NSAttributedString(string: "OK, next time it is!"),
skipVersionButtonMessage: NSAttributedString(string: "Please don't push skip, please don't!"))
// Optional: Set this variable if you would only like to show an alert if your app has been available on the store for a few days.
// This default value is set to 1 to avoid this issue: https://github.com/ArtSabintsev/Siren#words-of-caution
// To show the update immediately after Apple has updated their JSON, set this value to 0. Not recommended due to aforementioned reason in https://github.com/ArtSabintsev/Siren#words-of-caution.
siren.showAlertAfterCurrentVersionHasBeenReleasedForDays = 3
// Replace .immediately with .daily or .weekly to specify a maximum daily or weekly frequency for version checks.
// DO NOT CALL THIS METHOD IN didFinishLaunchingWithOptions IF YOU ALSO PLAN TO CALL IT IN applicationDidBecomeActive.
siren.checkVersion(checkType: .immediately)
return true
}
func applicationDidBecomeActive(application: UIApplication) {
/*
Perform daily (.Daily) or weekly (.Weekly) checks for new version of your app.
Perform daily (.daily) or weekly (.weekly) checks for new version of your app.
Useful if user returns to your app from the background after extended period of time.
Place in applicationDidBecomeActive(_:). */
Place in applicationDidBecomeActive(_:).
*/
Siren.shared.checkVersion(checkType: .daily)
}
func applicationWillEnterForeground(application: UIApplication) {
/*
Useful if user returns to your app from the background after being sent to the
App Store, but doesn't update their app before coming back to your app.
Useful if user returns to your app from the background after being sent to the
App Store, but doesn't update their app before coming back to your app.
ONLY USE WITH SirenAlertType.Force
ONLY USE WITH Siren.AlertType.immediately
*/
Siren.shared.checkVersion(checkType: .immediately)
@@ -138,42 +159,68 @@ Some developers may want to display a less obtrusive custom interface, like a ba
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
...
siren.delegate = self
siren.alertType = .None
siren.alertType = .none
...
}
extension AppDelegate: SirenDelegate {
// Returns a localized message to this delegate method upon performing a successful version check
func sirenDidDetectNewVersionWithoutAlert(message: String) {
print("\(message)")
}
func sirenDidDetectNewVersionWithoutAlert(message: String, updateType: UpdateType) {
print("\(message)")
}
}
```
Siren will call the `sirenDidDetectNewVersionWithoutAlert(message: String)` delegate method, passing a localized, suggested update string suitable for display. Implement this method to display your own messaging, optionally using `message`.
## Differentiated Alerts for Revision, Patch, Minor, and Major Updates
## Granular Version Update Management
If you would like to set a different type of alert for revision, patch, minor, and/or major updates, simply add one or all of the following *optional* lines to your setup *before* calling the `checkVersion()` method:
```swift
/* Siren defaults to SirenAlertType.Option for all updates */
siren.shared.revisionUpdateAlertType = <#SirenAlertType_Enum_Value#>
siren.shared.patchUpdateAlertType = <#SirenAlertType_Enum_Value#>
siren.shared.minorUpdateAlertType = <#SirenAlertType_Enum_Value#>
siren.shared.majorUpdateAlertType = <#SirenAlertType_Enum_Value#>
/* Siren defaults to Siren.AlertType.option for all updates */
siren.shared.revisionUpdateAlertType = <#Siren.AlertType_Enum_Value#>
siren.shared.patchUpdateAlertType = <#Siren.AlertType_Enum_Value#>
siren.shared.minorUpdateAlertType = <#Siren.AlertType_Enum_Value#>
siren.shared.majorUpdateAlertType = <#Siren.AlertType_Enum_Value#>
```
## Optional Delegate and Delegate Methods
Six delegate methods allow you to handle or track the user's behavior. Each method has a default, empty implementation, effectively making each of these methods optional.
``` swift
public protocol SirenDelegate: class {
func sirenDidShowUpdateDialog(alertType: SirenAlertType) // User presented with update dialog
func sirenUserDidLaunchAppStore() // User did click on button that launched App Store.app
func sirenUserDidSkipVersion() // User did click on button that skips version update
func sirenUserDidCancel() // User did click on button that cancels update dialog
func sirenDidFailVersionCheck(error: NSError) // Siren failed to perform version check (may return system-level error)
func sirenDidDetectNewVersionWithoutAlert(message: String) // Siren performed version check and did not display alert
public protocol SirenDelegate: NSObjectProtocol {
/// Siren performed version check and did not display alert.
func sirenDidDetectNewVersionWithoutAlert(message: String, updateType: UpdateType)
/// Siren failed to perform version check.
///
/// - Note:
/// Depending on the reason for failure,
/// a system-level error may be returned.
func sirenDidFailVersionCheck(error: Error)
/// User presented with update dialog.
func sirenDidShowUpdateDialog(alertType: Siren.AlertType)
/// Siren performed a version check and latest version is installed.
func sirenLatestVersionInstalled()
/// Provides the decoded JSON information from a successful version check call.
///
/// - SeeAlso:
/// SirenLookupModel.swift
///
/// - Parameter lookupModel: The `Decodable` model representing the JSON results from the iTunes Lookup API.
func sirenNetworkCallDidReturnWithNewVersionInformation(lookupModel: SirenLookupModel)
/// User did click on button that cancels update dialog.
func sirenUserDidCancel()
/// User did click on button that launched "App Store.app".
func sirenUserDidLaunchAppStore()
/// User did click on button that skips version update.
func sirenUserDidSkipVersion()
}
```
@@ -183,6 +230,8 @@ Siren is localized for
- Armenian
- Basque
- Chinese (Simplified and Traditional)
- Croatian
- Czech
- Danish
- Dutch
- English
@@ -201,36 +250,60 @@ Siren is localized for
- Lithuanian
- Malay
- Norwegian (Bokmål)
- Persian (Afghanistan, Iran, Persian)
- Polish
- Portuguese (Brazil and Portugal)
- Russian
- Serbian (Cyrillic and Latin)
- Slovenian
- Swedish
- Spanish
- Swedish
- Thai
- Turkish
- Ukrainian
- Urdu
- Vietnamese
You may want the update dialog to *always* appear in a certain language, ignoring iOS's language setting (e.g. apps released in a specific country).
You can enable it like this:
You can enable it like so:
```swift
Siren.shared.forceLanguageLocalization = SirenLanguageType.<#SirenLanguageType_Enum_Value#>
Siren.shared.forceLanguageLocalization = Siren.LanguageType.<#Siren.LanguageType_Enum_Value#>
```
## Device Compatibility
If an app update is available, Siren checks to make sure that the version of iOS on the user's device is compatible the one that is required by the app update. For example, if a user has iOS 9 installed on their device, but the app update requires iOS 10, an alert will not be shown. This takes care of the *false positive* case regarding app updating.
If an app update is available, Siren checks to make sure that the version of iOS on the user's device is compatible with the one that is required by the app update. For example, if a user has iOS 10 installed on their device, but the app update requires iOS 11, an alert will not be shown. This takes care of the *false positive* case regarding app updating.
## Testing Siren
Temporarily change the version string in Xcode (within the `.xcodeproj`) to an older version than the one that's currently available in the App Store. Afterwards, build and run your app, and you should see the alert.
If you currently don't have an app in the store, change your bundleID to one that is already in the store. In the sample app packaged with this library, we use the [iTunes Connect Mobile](https://itunes.apple.com/us/app/itunes-connect/id376771144?mt=8) app's bundleID: `com.apple.itunesconnect.mobile`.
If you currently don't have an app in the store, change your bundleID to one that is already in the store. In the sample app packaged with this library, we use the [App Store Connect](https://itunes.apple.com/app/id1234793120) app's bundleID: `com.apple.AppStoreConnect`.
For your convenience, you may turn on debugging statements by setting `self.debugEnabled = true` before calling the `checkVersion()` method.
## App Store Submissions
The App Store reviewer will **not** see the alert. The version in the App Store will always be older than the version being reviewed.
## Phased Releases
In 2017, Apple announced the [ability to rollout app updates gradually (a.k.a. Phased Releases)](https://itunespartner.apple.com/en/apps/faq/Managing%20Your%20Apps_Submission%20Process). Siren will continue to work as it has in the past, presenting an update modal to _all_ users. If you opt-in to a phased rollout for a specific version, you have a few choices:
- You can leave Siren configured as normal. Phased rollout will continue to auto-update apps. Since all users can still manually update your app directly from the App Store, Siren will ignore the phased rollout and will prompt users to update.
- You can set `showAlertAfterCurrentVersionHasBeenReleasedForDays` to `7`, and Siren will not prompt any users until the latest version is 7 days old, after phased rollout is complete.
- You can remotely disable Siren until the rollout is done using your own API / backend logic.
## Words of Caution
Occasionally, the iTunes JSON will update faster than the App Store CDN, meaning the JSON may state that the new version of the app has been released, while no new binary is made available for download via the App Store. It is for this reason that Siren will, by default, wait 1 day (24 hours) after the JSON has been updated to prompt the user to update. To change the default setting, please modify the value of `showAlertAfterCurrentVersionHasBeenReleasedForDays`.
## Ports
- **Objective-C (iOS)**
- [**Harpy**](https://github.com/ArtSabintsev/Harpy)
- Siren was ported _from_ Harpy, as Siren and Harpy are maintained by the same developer.
- **Java (Android)**
- [**Egghead Games' Siren library**](https://github.com/eggheadgames/Siren)
- The Siren Swift library inspired the Java library.
- **React Native (iOS)**
- [**Gant Laborde's Siren library**](https://github.com/GantMan/react-native-siren)
- The Siren Swift library inspired the React Native library.
## Created and maintained by
[Arthur Ariel Sabintsev](http://www.sabintsev.com/) & [Aaron Brager](http://twitter.com/getaaron)
[Arthur Ariel Sabintsev](http://www.sabintsev.com/) & [Aaron Brager](https://twitter.com/getaaron)
+5 -5
View File
@@ -10,15 +10,15 @@
当 app 有更新时,Siren 会弹出提示框,用户可根据提示框提供的选项进行更新。或者您也可以根据 Siren 发出的消息来自定义通知用户的方式,比如您可以提供一个自定义的提示框。
- Siren 可配合 [**Semantic Versioning**](http://semver.org/) 系统使用
- Siren 可配合 [**Semantic Versioning**](https://semver.org/) 系统使用
- Semantic 版本系统由三位数字标识 (比如,1.0.0)
- Siren 同时支持两位数字标识 (比如,1.0)
- Siren 同时支持四位数字标识 (比如,1.0.0.0)
- Siren 当前处于活跃维护状态,由[**Arthur Sabintsev**](http://github.com/ArtSabintsev) 和 [**Aaron Brager**](http://twitter.com/getaaron) 进行维护。
- Siren 当前处于活跃维护状态,由[**Arthur Sabintsev**](https://github.com/ArtSabintsev) 和 [**Aaron Brager**](https://twitter.com/getaaron) 进行维护。
## Ports
- [**Harpy**](http://github.com/ArtSabintsev/Harpy) 是 Objective-C 实现的版本更新检查库,Siren 是 Harpy 的 swift 版本。
- [**Harpy**](https://github.com/ArtSabintsev/Harpy) 是 Objective-C 实现的版本更新检查库,Siren 是 Harpy 的 swift 版本。
- Siren 和 Harpy 是由相同的开发者维护。
- 安卓平台 Play Store 上的 [**Egghead Games' Siren library**](https://github.com/eggheadgames/Siren) 库使用了和 Siren 相同的原理实现了版本更新检测。
- 针对 React Native 项目 (iOS/Android) 的 [**Gant Laborde's Siren library**](https://github.com/GantMan/react-native-siren) 库使用了和 Siren 相同的原理实现了版本更新检测。
@@ -226,7 +226,7 @@ Siren.sharedInstance.forceLanguageLocalization = SirenLanguageType.<#SirenLangua
因为商店里的可用版本总是比提交审核的版本老,所以苹果商店审核人员在审核时是**不会**弹出提示框的。
##创建维护人员
[Arthur Ariel Sabintsev](http://www.sabintsev.com/) & [Aaron Brager](http://twitter.com/getaaron)
[Arthur Ariel Sabintsev](http://www.sabintsev.com/) & [Aaron Brager](https://twitter.com/getaaron)
## 翻译人员
[Daniel Hu](http://www.jianshu.com/u/d8bbc4831623)
[Daniel Hu](https://www.jianshu.com/u/d8bbc4831623)
+12 -12
View File
@@ -1,22 +1,22 @@
Pod::Spec.new do |s|
# Version
s.version = "3.9.2"
s.swift_version = '4.2'
# Meta
s.name = "Siren"
s.version = "1.2.2"
s.summary = "Notify users when a new version of your iOS app is available, and prompt them with the App Store link.."
s.description = <<-DESC
Siren is checks a users currently installed version of your iOS app against the version that is currently available in the App Store. If a new version is available, an instance of UIAlertController can be presented to the user informing them of the newer version, and giving them the option to update the application. Alternatively, Siren can notify your app programmatically, enabling you to inform the user through alternative means, such as a custom interface.
Siren is built to work with the Semantic Versioning system.
Siren is a Swift port of Harpy, an Objective-C library that achieves the same functionality.
Siren is actively maintained by Arthur Sabintsev and Aaron Brager.
DESC
s.summary = "Notify users that a new version of your iOS app is available, and prompt them with the App Store link."
s.homepage = "https://github.com/ArtSabintsev/Siren"
s.license = "MIT"
s.authors = { "Arthur Ariel Sabintsev" => "arthur@sabintsev.com", "Aaron Brager" => "getaaron@gmail.com" }
s.description = <<-DESC
Notify your users when a new version of your iOS app is available, and prompt them with the App Store link.
DESC
# Compatibility & Sources
s.platform = :ios, "8.0"
s.source = { :git => "https://github.com/ArtSabintsev/Siren.git", :tag => s.version.to_s }
s.source_files = 'Sources/Siren.swift'
s.source_files = 'Sources/**/*.swift'
s.resources = 'Sources/Siren.bundle'
s.requires_arc = true
@@ -1,736 +0,0 @@
//
// SirenTests.swift
// SirenTests
//
// Created by Arthur Sabintsev on 6/7/16.
// Copyright © 2016 Sabintsev iOS Projects. All rights reserved.
//
import XCTest
@testable import Siren
class SirenTests: XCTestCase {
let siren = Siren.shared
}
// MARK: - Updates
extension SirenTests {
func testSingleDigitVersionUpdate() {
siren.testSetCurrentInstalledVersion(version: "1")
siren.testSetAppStoreVersion(version: "2")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "2.0")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "2.0.0")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "2.0.0.0")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0.9")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0.0.9")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0.0.0.9")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
}
func testDoubleDigitVersionUpdate() {
siren.testSetCurrentInstalledVersion(version: "1.0")
siren.testSetAppStoreVersion(version: "2")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "2.0")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "2.0.0")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "2.0.0.0")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0.9")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0.0.9")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0.0.0.9")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
}
func testTripleDigitVersionUpdate() {
siren.testSetCurrentInstalledVersion(version: "1.0.0")
siren.testSetAppStoreVersion(version: "2")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "2.0")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "2.0.0")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "2.0.0.0")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0.9")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0.0.9")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0.0.0.9")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
}
func testQuadrupleDigitVersionUpdate() {
siren.testSetCurrentInstalledVersion(version: "1.0.0")
siren.testSetAppStoreVersion(version: "2")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "2.0")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "2.0.0")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "2.0.0.0")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0.9")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0.0.9")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion(version: "0.0.0.9")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
}
}
// MARK: - Localization
extension SirenTests {
func testArabicLocalization() {
let language: SirenLanguageType = .Arabic
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "التجديد متوفر")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "المرة التالية")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "تخطى عن هذه النسخة")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "تجديد")
}
func testArmenianLocalization() {
let language: SirenLanguageType = .Armenian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Թարմացումը հասանելի Է")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "Հաջորդ անգամ")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Բաց թողնել այս տարբերակը")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Թարմացնել")
}
func testBasqueLocalization() {
let language: SirenLanguageType = .Basque
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Eguneratzea erabilgarri")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "Hurrengo batean")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Bertsio honetatik jauzi egin")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Eguneratu")
}
func testChineseSimplifiedLocalization() {
let language: SirenLanguageType = .ChineseSimplified
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "更新可用")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "下一次")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "跳过此版本")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "更新")
}
func testChineseTraditionalLocalization() {
let language: SirenLanguageType = .ChineseTraditional
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "有更新可用")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "下次")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "跳過此版本")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "更新")
}
func testCroatianLocalization() {
let language: SirenLanguageType = .Croatian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Nova ažuriranje je stigla")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "Sljedeći put")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Preskoči ovu verziju")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Ažuriraj")
}
func testDanishLocalization() {
let language: SirenLanguageType = .Danish
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Tilgængelig opdatering")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "Næste gang")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Spring denne version over")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Opdater")
}
func testDutchLocalization() {
let language: SirenLanguageType = .Dutch
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Update Beschikbaar")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "Volgende keer")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Sla deze versie over")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Updaten")
}
func testEstonianLocalization() {
let language: SirenLanguageType = .Estonian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Uuendus saadaval")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "Järgmisel korral")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Jäta see version vahele")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Uuenda")
}
func testFinnishLocalization() {
let language: SirenLanguageType = .Finnish
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Päivitys saatavilla")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "Ensi kerralla")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Jätä tämä versio väliin")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Päivitys")
}
func testFrenchLocalization() {
let language: SirenLanguageType = .French
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Mise à jour disponible")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "La prochaine fois")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Sauter cette version")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Mettre à jour")
}
func testGermanLocalization() {
let language: SirenLanguageType = .German
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Update erhältlich")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "Später")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Diese Version überspringen")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Update")
}
func testGreekLocalization() {
let language: SirenLanguageType = .Greek
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Διαθέσιμη Ενημέρωση")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "Άλλη φορά")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Αγνόησε αυτήν την έκδοση")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Αναβάθμιση")
}
func testHebrewLocalization() {
let language: SirenLanguageType = .Hebrew
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "עדכון זמין")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "בפעם הבאה")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "דלג על גרסה זו")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "עדכן")
}
func testHungarianLocalization() {
let language: SirenLanguageType = .Hungarian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Új frissítés érhető el")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "Később")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Ennél a verziónál ne figyelmeztessen")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Frissítés")
}
func testIndonesianLocalization() {
let language: SirenLanguageType = .Indonesian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Pembaruan Tersedia")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "Lain kali")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Lewati versi ini")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Perbarui")
}
func testItalianLocalization() {
let language: SirenLanguageType = .Italian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Aggiornamento disponibile")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "La prossima volta")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Salta questa versione")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Aggiorna")
}
func testJapaneseLocalization() {
let language: SirenLanguageType = .Japanese
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "更新が利用可能")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "次回")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "このバージョンをスキップ")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "更新")
}
func testKoreanLocalization() {
let language: SirenLanguageType = .Korean
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "업데이트 가능")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "다음에")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "이 버전 건너뜀")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "업데이트")
}
func testLatvianLocalization() {
let language: SirenLanguageType = .Latvian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Atjauninājums pieejams")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "Nākamreiz")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Izlaist šo versiju")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Atjaunināt")
}
func testLithuanianLocalization() {
let language: SirenLanguageType = .Lithuanian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Atnaujinimas")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "Kitą kartą")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Praleisti šią versiją")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Atnaujinti")
}
func testMalayLocalization() {
let language: SirenLanguageType = .Malay
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Versi Terkini")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "Lain kali")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Langkau versi ini")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Muat turun")
}
func testNorwegianLocalization() {
let language: SirenLanguageType = .Norwegian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Oppdatering tilgjengelig")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "Neste gang")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Hopp over denne versjonen")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Oppdater")
}
func testPolishLocalization() {
let language: SirenLanguageType = .Polish
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Aktualizacja dostępna")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "Następnym razem")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Pomiń wersję")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Zaktualizuj")
}
func testPortugueseBrazilLocalization() {
let language: SirenLanguageType = .PortugueseBrazil
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Atualização disponível")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "Próxima vez")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Ignorar esta versão")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Atualizar")
}
func testPortuguesePortugalLocalization() {
let language: SirenLanguageType = .PortuguesePortugal
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Nova actualização disponível")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "Próxima vez")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Ignorar esta versão")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Actualizar")
}
func testRussianLocalization() {
let language: SirenLanguageType = .Russian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Доступно обновление")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "В следующий раз")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Пропустить эту версию")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Обновить")
}
func testSerbianCyrillicLocalization() {
let language: SirenLanguageType = .SerbianCyrillic
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Ажурирање доступно")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "Следећи пут")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Прескочи ову верзију")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Ажурирај")
}
func testSerbianLatinLocalization() {
let language: SirenLanguageType = .SerbianLatin
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Ažuriranje dostupno")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "Sledeći put")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Preskoči ovu verziju")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Ažuriraj")
}
func testSlovenianLocalization() {
let language: SirenLanguageType = .Slovenian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Posodobitev aplikacije")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "Naslednjič")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Ne želim")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Namesti")
}
func testSpanishLocalization() {
let language: SirenLanguageType = .Spanish
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Actualización disponible")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "La próxima vez")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Saltar esta versión")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Actualizar")
}
func testSwedishLocalization() {
let language: SirenLanguageType = .Swedish
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Tillgänglig uppdatering")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "Nästa gång")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Hoppa över den här versionen")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Uppdatera")
}
func testThaiLocalization() {
let language: SirenLanguageType = .Thai
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "มีการอัพเดท")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "ไว้คราวหน้า")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "ข้ามเวอร์ชั่นนี้")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "อัพเดท")
}
func testTurkishLocalization() {
let language: SirenLanguageType = .Turkish
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Güncelleme Mevcut")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "Daha sonra")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Boşver")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Güncelle")
}
func testVietnameseLocalization() {
let language: SirenLanguageType = .Vietnamese
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update Available", forceLanguageLocalization: language), "Cập nhật mới")
// Next time
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Next time", forceLanguageLocalization: language), "Lần tới")
// Skip this version
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Skip this version", forceLanguageLocalization: language), "Bỏ qua phiên bản này")
// Update
XCTAssertEqual(Bundle().testLocalizedString(stringKey: "Update", forceLanguageLocalization: language), "Cập nhật")
}
}
@@ -0,0 +1,55 @@
//
// SirenBundleExtension.swift
// SirenExample
//
// Created by Arthur Sabintsev on 3/17/17.
// Copyright © 2017 Sabintsev iOS Projects. All rights reserved.
//
import Foundation
// MARK: - Bundle Extension for Siren
extension Bundle {
final class func bundleID() -> String? {
return Bundle.main.bundleIdentifier
}
final class func sirenBundlePath() -> String? {
return Bundle(for: Siren.self).path(forResource: "Siren", ofType: "bundle")
}
final class func sirenForcedBundlePath(forceLanguageLocalization: Siren.LanguageType) -> String? {
guard let path = sirenBundlePath() else { return nil }
let name = forceLanguageLocalization.rawValue
return Bundle(path: path)?.path(forResource: name, ofType: "lproj")
}
final class func localizedString(forKey key: String, forceLanguageLocalization: Siren.LanguageType?) -> String? {
guard var path = sirenBundlePath() else { return nil }
let table = "SirenLocalizable"
if let forceLanguageLocalization = forceLanguageLocalization,
let forcedPath = sirenForcedBundlePath(forceLanguageLocalization: forceLanguageLocalization) {
path = forcedPath
}
return Bundle(path: path)?.localizedString(forKey: key, value: key, table: table)
}
final class func bestMatchingAppName() -> String {
let bundleDisplayName = Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") as? String
let bundleName = Bundle.main.object(forInfoDictionaryKey: kCFBundleNameKey as String) as? String
return bundleDisplayName ?? bundleName ?? ""
}
}
// MARK: - Bundle Extension for Testing Siren
extension Bundle {
func testLocalizedString(forKey key: String, forceLanguageLocalization: Siren.LanguageType?) -> String? {
return Bundle.localizedString(forKey: key, forceLanguageLocalization: forceLanguageLocalization)
}
}
@@ -0,0 +1,31 @@
//
// SirenDateExtension.swift
// SirenExample
//
// Created by Arthur Sabintsev on 3/21/17.
// Copyright © 2017 Sabintsev iOS Projects. All rights reserved.
//
import Foundation
// MARK: - Date Extension for Siren
extension Date {
static func days(since date: Date) -> Int {
let calendar = Calendar.current
let components = calendar.dateComponents([.day], from: date, to: Date())
return components.day ?? 0
}
static func days(since dateString: String) -> Int? {
let dateformatter = DateFormatter()
dateformatter.locale = Locale(identifier: "en_US_POSIX")
dateformatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss'Z'"
guard let releaseDate = dateformatter.date(from: dateString) else {
return nil
}
return days(since: releaseDate)
}
}
@@ -0,0 +1,48 @@
//
// SirenLocalizationExtension.swift
// Siren
//
// Created by Arthur Sabintsev on 9/25/18.
// Copyright © 2018 Sabintsev iOS Projects. All rights reserved.
//
import Foundation
// MARK: - Helpers (Localization)
extension Siren {
func localizedUpdateTitle() -> String {
return Bundle.localizedString(forKey: alertMessaging.updateTitle.string, forceLanguageLocalization: forceLanguageLocalization)
?? alertMessaging.updateTitle.string
}
func localizedNewVersionMessage() -> String {
let newVersionMessage = Bundle.localizedString(forKey: alertMessaging.updateMessage.string,
forceLanguageLocalization: forceLanguageLocalization)
?? alertMessaging.updateMessage.string
guard let currentAppStoreVersion = currentAppStoreVersion else {
return String(format: newVersionMessage, appName, "Unknown")
}
return String(format: newVersionMessage, appName, currentAppStoreVersion)
}
func localizedUpdateButtonTitle() -> String? {
return Bundle.localizedString(forKey: alertMessaging.updateButtonMessage.string,
forceLanguageLocalization: forceLanguageLocalization)
?? alertMessaging.updateButtonMessage.string
}
func localizedNextTimeButtonTitle() -> String? {
return Bundle.localizedString(forKey: alertMessaging.nextTimeButtonMessage.string,
forceLanguageLocalization: forceLanguageLocalization)
?? alertMessaging.nextTimeButtonMessage.string
}
func localizedSkipButtonTitle() -> String? {
return Bundle.localizedString(forKey: alertMessaging.skipVersionButtonMessage.string,
forceLanguageLocalization: forceLanguageLocalization)
?? alertMessaging.skipVersionButtonMessage.string
}
}
@@ -0,0 +1,25 @@
//
// SirenUIAlertControllerExtension.swift
// SirenExample
//
// Created by Arthur Sabintsev on 3/17/17.
// Copyright © 2017 Sabintsev iOS Projects. All rights reserved.
//
import Foundation
import UIKit
// MARK: - UIAlertController Extension for Siren
extension UIAlertController {
func show() {
let window = UIWindow(frame: UIScreen.main.bounds)
window.rootViewController = SirenViewController()
window.windowLevel = UIWindow.Level.alert + 1
Siren.shared.updaterWindow = window
window.makeKeyAndVisible()
window.rootViewController?.present(self, animated: true, completion: nil)
}
}
@@ -0,0 +1,50 @@
//
// SirenUserDefaultsExtension.swift
// Siren
//
// Created by Arthur Sabintsev on 9/25/18.
// Copyright © 2018 Sabintsev iOS Projects. All rights reserved.
//
import Foundation
/// Siren-specific UserDefaults Keys
private enum SirenKeys: String {
/// Key that notifies Siren to perform a version check and present
/// the Siren alert the next time the user launches the app.
case PerformVersionCheckOnSubsequentLaunch
/// Key that stores the timestamp of the last version check in UserDefaults.
case StoredVersionCheckDate
/// Key that stores the version that a user decided to skip in UserDefaults.
case StoredSkippedVersion
}
// MARK: - UserDefaults Extension for Siren
extension UserDefaults {
static var shouldPerformVersionCheckOnSubsequentLaunch: Bool {
get {
return standard.bool(forKey: SirenKeys.PerformVersionCheckOnSubsequentLaunch.rawValue)
} set {
standard.set(newValue, forKey: SirenKeys.PerformVersionCheckOnSubsequentLaunch.rawValue)
}
}
static var storedSkippedVersion: String? {
get {
return standard.string(forKey: SirenKeys.StoredSkippedVersion.rawValue)
} set {
standard.set(newValue, forKey: SirenKeys.StoredSkippedVersion.rawValue)
}
}
static var storedVersionCheckDate: Date? {
get {
return standard.object(forKey: SirenKeys.StoredVersionCheckDate.rawValue) as? Date
} set {
standard.set(newValue, forKey: SirenKeys.StoredVersionCheckDate.rawValue)
}
}
}
+64
View File
@@ -0,0 +1,64 @@
//
// SirenAlertMessaging.swift
// Siren
//
// Created by Arthur Sabintsev on 12/6/17.
// Copyright © 2017 Sabintsev iOS Projects. All rights reserved.
//
import Foundation
// MARK: - Siren Alert Messaging Customization
/// Allows the overriding of all the `UIAlertController` and `UIActionSheet` Strings to which Siren defaults.
///
/// - Warning: Overriding any of these keys will result in the loss of the built-in internationalization that Siren provides.
///
/// As `SirenAlertMessaging` is a Struct, one _or_ more keys can be modified. Overriding only one string will result in the other keys retaining their default (and internationalizable) values.
public struct SirenAlertMessaging {
/// The default constants used for the alert messaging.
public struct Constants {
/// The button text that conveys the message that the user should be prompted to update next time the app launches.
public static let nextTime = NSAttributedString(string: "Next time")
/// The text that conveys the message that the the user wants to skip this verison update.
public static let skipVersion = NSAttributedString(string: "Skip this version")
/// The text that conveys the message that there is an app update available
public static let updateMessage = NSAttributedString(string: "A new version of %@ is available. Please update to version %@ now.")
/// The alert title which defaults to *Update Available*.
public static let updateTitle = NSAttributedString(string: "Update Available")
/// The button text that conveys the message that the user would like to update the app right away.
public static let updateNow = NSAttributedString(string: "Update")
}
let nextTimeButtonMessage: NSAttributedString
let skipVersionButtonMessage: NSAttributedString
let updateButtonMessage: NSAttributedString
let updateMessage: NSAttributedString
let updateTitle: NSAttributedString
/// The public initializer
///
/// - Parameters:
/// - title: The title field of the `UIAlertController`.
/// - message: The `message` field of the `UIAlertController`.
/// - updateButtonMessage: The `title` field of the Update Button `UIAlertAction`.
/// - nextTimeButtonMessage: The `title` field of the Next Time Button `UIAlertAction`.
/// - skipVersionButtonMessage: The `title` field of the Skip Button `UIAlertAction`.
public init(updateTitle title: NSAttributedString = Constants.updateTitle,
updateMessage message: NSAttributedString = Constants.updateMessage,
updateButtonMessage: NSAttributedString = Constants.updateNow,
nextTimeButtonMessage: NSAttributedString = Constants.nextTime,
skipVersionButtonMessage: NSAttributedString = Constants.skipVersion) {
self.updateTitle = title
self.nextTimeButtonMessage = nextTimeButtonMessage
self.updateButtonMessage = updateButtonMessage
self.updateMessage = message
self.skipVersionButtonMessage = skipVersionButtonMessage
}
}
+47
View File
@@ -0,0 +1,47 @@
//
// SirenLookupModel.swift
// Siren
//
// Created by Arthur Sabintsev on 8/6/17.
// Copyright © 2017 Sabintsev iOS Projects. All rights reserved.
//
import Foundation
// MARK: - Model representing a selection of results from the iTunes Lookup API
/// MARK: Siren extension used to parse and map the iTunes JSON results into a model represented in Swift.
public struct SirenLookupModel: Decodable {
private enum CodingKeys: String, CodingKey {
case results
}
/// The array of results objects from the iTunes Lookup API.
public let results: [Results]
/// The Results object from the the iTunes Lookup API.
public struct Results: Decodable {
private enum CodingKeys: String, CodingKey {
case appID = "trackId"
case currentVersionReleaseDate
case minimumOSVersion = "minimumOsVersion"
case releaseNotes
case version
}
/// The app's App ID.
public let appID: Int
/// The release date for the latest verison of the app.
public let currentVersionReleaseDate: String
/// The minimum verison of iOS that the current verison of the app requires.
public let minimumOSVersion: String
/// The releases notes from the latest version of the app.
public let releaseNotes: String?
/// The latest version of the app.
public let version: String
}
}
+110
View File
@@ -0,0 +1,110 @@
//
// SirenDelegate.swift
// SirenExample
//
// Created by Arthur Sabintsev on 4/8/17.
// Copyright © 2017 Sabintsev iOS Projects. All rights reserved.
//
import Foundation
/// MARK - Siren UpdateType
/// `UpdateType` defines what kind of update is available.
/// It is used as parameter if user wants to use
/// custom alert to inform the user about an update.
///
/// - major: Major release available: A.b.c.d
/// - minor: Minor release available: a.B.c.d
/// - patch: Patch release available: a.b.C.d
/// - revision: Revision release available: a.b.c.D
/// - unknown: No information available about the update.
public enum UpdateType: String {
/// Major release available: A.b.c.d
case major
/// Minor release available: a.B.c.d
case minor
/// Patch release available: a.b.C.d
case patch
/// Revision release available: a.b.c.D
case revision
/// No information available about the update.
case unknown
}
// MARK: - SirenDelegate Protocol
/// Delegate that handles all codepaths for Siren upon version check completion.
public protocol SirenDelegate: NSObjectProtocol {
/// Siren performed a version check and did not display an alert.
func sirenDidDetectNewVersionWithoutAlert(title: String, message: String, updateType: UpdateType)
/// Siren failed to perform version check.
///
/// - Note:
/// Depending on the reason for failure,
/// a system-level error may be returned.
func sirenDidFailVersionCheck(error: Error)
/// User presented with an update dialog.
///
/// - Parameter alertType: The type of alert that was presented.
func sirenDidShowUpdateDialog(alertType: Siren.AlertType)
/// Siren performed a version check and the latest version was already installed.
func sirenLatestVersionInstalled()
/// Provides the decoded JSON information from a successful version check call.
///
/// - Parameter lookupModel: The `Decodable` model representing the JSON results from the iTunes Lookup API.
func sirenNetworkCallDidReturnWithNewVersionInformation(lookupModel: SirenLookupModel)
/// User did click on button that cancels update dialog.
func sirenUserDidCancel()
/// User did click on button that launched "App Store.app".
func sirenUserDidLaunchAppStore()
/// User did click on button that skips version update.
func sirenUserDidSkipVersion()
}
// MARK: - SirenDelegate Protocol Extension
public extension SirenDelegate {
func sirenDidDetectNewVersionWithoutAlert(title: String, message: String, updateType: UpdateType) {
printMessage()
}
func sirenDidFailVersionCheck(error: Error) {
printMessage()
}
func sirenDidShowUpdateDialog(alertType: Siren.AlertType) {
printMessage()
}
func sirenLatestVersionInstalled() {
printMessage()
}
func sirenUserDidCancel() {
printMessage()
}
func sirenUserDidLaunchAppStore() {
printMessage()
}
func sirenNetworkCallDidReturnWithNewVersionInformation(lookupModel: SirenLookupModel) {
printMessage()
}
func sirenUserDidSkipVersion() {
printMessage()
}
private func printMessage(_ function: String = #function) {
SirenLog("The default implementation of \(function) is being called. You can ignore this message if you do not care to implement this method in your `SirenDelegate` conforming structure.")
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
+142 -502
View File
@@ -8,176 +8,30 @@
import UIKit
// MARK: - SirenDelegate Protocol
/// Delegate that handles all codepaths for Siren upon version check completion.
public protocol SirenDelegate: class {
/// User presented with update dialog
func sirenDidShowUpdateDialog(alertType: SirenAlertType)
/// User did click on button that launched App Store.app
func sirenUserDidLaunchAppStore()
/// User did click on button that skips version update
func sirenUserDidSkipVersion()
/// User did click on button that cancels update dialog
func sirenUserDidCancel()
/// Siren failed to perform version check (may return system-level error)
func sirenDidFailVersionCheck(error: NSError)
/// Siren performed version check and did not display alert
func sirenDidDetectNewVersionWithoutAlert(message: String)
/// Siren performed version check and latest version is installed
func sirenLatestVersionInstalled()
}
// MARK: - SirenDelegate Protocol Extension
public extension SirenDelegate {
func sirenDidShowUpdateDialog(alertType: SirenAlertType) {}
func sirenUserDidLaunchAppStore() {}
func sirenUserDidSkipVersion() {}
func sirenUserDidCancel() {}
func sirenDidFailVersionCheck(error: NSError) {}
func sirenDidDetectNewVersionWithoutAlert(message: String) {}
func sirenLatestVersionInstalled() {}
}
/// Determines the type of alert to present after a successful version check has been performed.
public enum SirenAlertType {
/// Forces user to update your app (1 button alert).
case force
/// (DEFAULT) Presents user with option to update app now or at next launch (2 button alert).
case option
/// Presents user with option to update the app now, at next launch, or to skip this version all together (3 button alert).
case skip
/// Doesn't show the alert, but instead returns a localized message for use in a custom UI within the sirenDidDetectNewVersionWithoutAlert() delegate method.
case none
}
/// Determines the frequency in which the the version check is performed.
///
public enum SirenVersionCheckType: Int {
/// Version check performed every time the app is launched.
case immediately = 0
/// Version check performed once a day.
case daily = 1
/// Version check performed once a week.
case weekly = 7
}
/// Determines the available languages in which the update message and alert button titles should appear.
///
/// By default, the operating system's default lanuage setting is used. However, you can force a specific language
/// by setting the forceLanguageLocalization property before calling checkVersion()
public enum SirenLanguageType: String {
case Arabic = "ar"
case Armenian = "hy"
case Basque = "eu"
case ChineseSimplified = "zh-Hans"
case ChineseTraditional = "zh-Hant"
case Croatian = "hr"
case Danish = "da"
case Dutch = "nl"
case English = "en"
case Estonian = "et"
case Finnish = "fi"
case French = "fr"
case German = "de"
case Greek = "el"
case Hebrew = "he"
case Hungarian = "hu"
case Indonesian = "id"
case Italian = "it"
case Japanese = "ja"
case Korean = "ko"
case Latvian = "lv"
case Lithuanian = "lt"
case Malay = "ms"
case Norwegian = "nb-NO"
case Polish = "pl"
case PortugueseBrazil = "pt"
case PortuguesePortugal = "pt-PT"
case Russian = "ru"
case SerbianCyrillic = "sr-Cyrl"
case SerbianLatin = "sr-Latn"
case Slovenian = "sl"
case Spanish = "es"
case Swedish = "sv"
case Thai = "th"
case Turkish = "tr"
case Vietnamese = "vi"
}
/// Siren-specific Error Codes
private enum SirenErrorCode: Int {
case malformedURL = 1000
case recentlyCheckedAlready
case noUpdateAvailable
case appStoreDataRetrievalFailure
case appStoreJSONParsingFailure
case appStoreOSVersionNumberFailure
case appStoreOSVersionUnsupported
case appStoreVersionNumberFailure
case appStoreVersionArrayFailure
case appStoreAppIDFailure
}
/// Siren-specific Throwable Errors
private enum SirenError: Error {
case malformedURL
case missingBundleIdOrAppId
}
/// Siren-specific UserDefaults Keys
private enum SirenUserDefaults: String {
/// Key that stores the timestamp of the last version check in UserDefaults
case StoredVersionCheckDate
/// Key that stores the version that a user decided to skip in UserDefaults.
case StoredSkippedVersion
}
// MARK: - Siren
/// The Siren Class. A singleton that is initialized using the shared() method.
/// The Siren Class. A singleton that is initialized using the `shared` constant.
public final class Siren: NSObject {
///Current installed version of your app
fileprivate var currentInstalledVersion: String? = {
/// Current installed version of your app.
internal var currentInstalledVersion: String? = {
return Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String
}()
/// The error domain for all errors created by Siren
/// The error domain for all errors created by Siren.
public let SirenErrorDomain = "Siren Error Domain"
/// The SirenDelegate variable, which should be set if you'd like to be notified:
///
/// When a user views or interacts with the alert
/// - sirenDidShowUpdateDialog(alertType: SirenAlertType)
/// - sirenUserDidLaunchAppStore()
/// - sirenUserDidSkipVersion()
/// - sirenUserDidCancel()
///
/// When a new version has been detected, and you would like to present a localized message in a custom UI
/// - sirenDidDetectNewVersionWithoutAlert(message: String)
/// The `SirenDelegate` variable, which should be set if you'd like to be notified of any of specific user interactions or API success/failures.
/// Also set this variable if you'd like to use custom UI for presesnting the update notification.
public weak var delegate: SirenDelegate?
/// The debug flag, which is disabled by default.
/// When enabled, a stream of println() statements are logged to your console when a version check is performed.
/// When enabled, a stream of print() statements are logged to your console when a version check is performed.
public lazy var debugEnabled = false
/// Determines the type of alert that should be shown.
/// See the SirenAlertType enum for full details.
public var alertType = SirenAlertType.option {
/// See the Siren.AlertType enum for full details.
public var alertType: AlertType = .option {
didSet {
majorUpdateAlertType = alertType
minorUpdateAlertType = alertType
@@ -187,28 +41,32 @@ public final class Siren: NSObject {
}
/// Determines the type of alert that should be shown for major version updates: A.b.c
/// Defaults to SirenAlertType.Option.
/// See the SirenAlertType enum for full details.
public lazy var majorUpdateAlertType = SirenAlertType.option
/// Defaults to Siren.AlertType.option.
/// See the Siren.AlertType enum for full details.
public lazy var majorUpdateAlertType: AlertType = .option
/// Determines the type of alert that should be shown for minor version updates: a.B.c
/// Defaults to SirenAlertType.Option.
/// See the SirenAlertType enum for full details.
public lazy var minorUpdateAlertType = SirenAlertType.option
/// Defaults to Siren.AlertType.option.
/// See the Siren.AlertType enum for full details.
public lazy var minorUpdateAlertType: AlertType = .option
/// Determines the type of alert that should be shown for minor patch updates: a.b.C
/// Defaults to SirenAlertType.Option.
/// See the SirenAlertType enum for full details.
public lazy var patchUpdateAlertType = SirenAlertType.option
/// Defaults to Siren.AlertType.option.
/// See the Siren.AlertType enum for full details.
public lazy var patchUpdateAlertType: AlertType = .option
/// Determines the type of alert that should be shown for revision updates: a.b.c.D
/// Defaults to SirenAlertType.Option.
/// See the SirenAlertType enum for full details.
public lazy var revisionUpdateAlertType = SirenAlertType.option
/// Defaults to Siren.AlertType.option.
/// See the Siren.AlertType enum for full details.
public lazy var revisionUpdateAlertType: AlertType = .option
/// The name of your app.
/// By default, it's set to the name of the app that's stored in your plist.
public lazy var appName: String = Bundle.main.bestMatchingAppName()
public lazy var appName = Bundle.bestMatchingAppName()
/// Overrides all the Strings to which Siren defaults.
/// Defaults to the values defined in `SirenAlertMessaging.Constants`
public var alertMessaging = SirenAlertMessaging()
/// The region or country of an App Store in which your app is available.
/// By default, all version checks are performed against the US App Store.
@@ -216,31 +74,36 @@ public final class Siren: NSObject {
public var countryCode: String?
/// Overrides the default localization of a user's device when presenting the update message and button titles in the alert.
/// See the SirenLanguageType enum for more details.
public var forceLanguageLocalization: SirenLanguageType?
/// See the Siren.LanguageType enum for more details.
public var forceLanguageLocalization: Siren.LanguageType?
/// Overrides the tint color for UIAlertController.
public var alertControllerTintColor: UIColor?
/// When this is set, the alert will only show up if the current version has already been released for X days
public var showAlertAfterCurrentVersionHasBeenReleasedForDays: Int?
/// When this is set, the alert will only show up if the current version has already been released for X days.
/// Defaults to 1 day to avoid an issue where Apple updates the JSON faster than the app binary propogates to the App Store.
public var showAlertAfterCurrentVersionHasBeenReleasedForDays: Int = 1
/// The current version of your app that is available for download on the App Store
public fileprivate(set) var currentAppStoreVersion: String?
public internal(set) var currentAppStoreVersion: String?
/// The `UIWindow` instance that presents the `SirenAlertViewController`.
var updaterWindow: UIWindow?
/// The last Date that a version check was performed.
var lastVersionCheckPerformedOnDate: Date?
fileprivate var appID: Int?
fileprivate var lastVersionCheckPerformedOnDate: Date?
fileprivate lazy var alertViewIsVisible: Bool = false
fileprivate var updaterWindow: UIWindow?
/// Type of the available update
fileprivate var updateType: UpdateType = .unknown
/// The App's Singleton
public static let shared = Siren()
@available(*, deprecated: 1.2.0, unavailable, renamed: "shared")
public static let sharedInstance = Siren()
override init() {
lastVersionCheckPerformedOnDate = UserDefaults.standard.object(forKey: SirenUserDefaults.StoredVersionCheckDate.rawValue) as? Date
lastVersionCheckPerformedOnDate = UserDefaults.storedVersionCheckDate
}
/// Checks the currently installed version of your app against the App Store.
@@ -248,122 +111,130 @@ public final class Siren: NSObject {
/// you should set the `countryCode` property before calling this method. Please refer to the countryCode property for more information.
///
/// - Parameters:
/// - checkType: The frequency in days in which you want a check to be performed. Please refer to the SirenVersionCheckType enum for more details.
public func checkVersion(checkType: SirenVersionCheckType) {
guard let _ = Bundle.bundleID() else {
printMessage(message: "Please make sure that you have set a `Bundle Identifier` in your project.")
/// - checkType: The frequency in days in which you want a check to be performed. Please refer to the Siren.VersionCheckType enum for more details.
public func checkVersion(checkType: VersionCheckType) {
updateType = .unknown
guard Bundle.bundleID() != nil else {
printMessage("Please make sure that you have set a `Bundle Identifier` in your project.")
return
}
if checkType == .immediately {
performVersionCheck()
} else if UserDefaults.shouldPerformVersionCheckOnSubsequentLaunch {
UserDefaults.shouldPerformVersionCheckOnSubsequentLaunch = false
performVersionCheck()
} else {
guard let lastVersionCheckPerformedOnDate = lastVersionCheckPerformedOnDate else {
performVersionCheck()
return
}
if days(since: lastVersionCheckPerformedOnDate) >= checkType.rawValue {
if Date.days(since: lastVersionCheckPerformedOnDate) >= checkType.rawValue {
performVersionCheck()
} else {
postError(.recentlyCheckedAlready, underlyingError: nil)
postError(.recentlyCheckedAlready)
}
}
}
/// Launches the AppStore in two situations:
///
/// - User clicked the `Update` button in the UIAlertController modal.
/// - Developer built a custom alert modal and needs to be able to call this function when the user chooses to update the app in the aforementioned custom modal.
public func launchAppStore() {
guard let appID = appID,
let url = URL(string: "https://itunes.apple.com/app/id\(appID)") else {
return
}
DispatchQueue.main.async {
if #available(iOS 10.0, *) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
} else {
UIApplication.shared.openURL(url)
}
}
}
}
// MARK: - Helpers (Networking)
// MARK: - Networking
private extension Siren {
func performVersionCheck() {
do {
let url = try iTunesURLFromString()
let request = URLRequest(url: url, cachePolicy: .reloadIgnoringCacheData, timeoutInterval: 30)
let task = URLSession.shared.dataTask(with: request, completionHandler: { [unowned self] (data, _, error) in
if let error = error {
self.postError(.appStoreDataRetrievalFailure, underlyingError: error)
} else {
guard let data = data else {
self.postError(.appStoreDataRetrievalFailure, underlyingError: nil)
return
}
do {
let jsonData = try JSONSerialization.jsonObject(with: data, options: JSONSerialization.ReadingOptions.allowFragments)
guard let appData = jsonData as? [String: Any],
self.isUpdateCompatibleWithDeviceOS(appData: appData) else {
self.postError(.appStoreJSONParsingFailure, underlyingError: nil)
return
}
DispatchQueue.main.async {
// Print iTunesLookup results from appData
self.printMessage(message: "JSON results: \(appData)")
// Process Results (e.g., extract current version that is available on the AppStore)
self.processVersionCheck(withResults: appData)
}
} catch let error as NSError {
self.postError(.appStoreDataRetrievalFailure, underlyingError: error)
}
}
})
task.resume()
} catch let error as NSError {
postError(.malformedURL, underlyingError: error)
let request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalAndRemoteCacheData, timeoutInterval: 30)
URLCache.shared.removeCachedResponse(for: request)
URLSession.shared.dataTask(with: request, completionHandler: { [weak self] (data, response, error) in
self?.processResults(withData: data, response: response, error: error)
}).resume()
} catch {
postError(.malformedURL)
}
}
func processVersionCheck(withResults results: [String: Any]) {
storeVersionCheckDate() // Store version comparison date
func processResults(withData data: Data?, response: URLResponse?, error: Error?) {
if let error = error {
postError(.appStoreDataRetrievalFailure(underlyingError: error))
} else {
guard let data = data else {
return postError(.appStoreDataRetrievalFailure(underlyingError: nil))
}
do {
let decodedData = try JSONDecoder().decode(SirenLookupModel.self, from: data)
guard let allResults = results["results"] as? [[String: Any]] else {
self.postError(.appStoreVersionNumberFailure, underlyingError: nil)
return
guard !decodedData.results.isEmpty else {
return postError(.appStoreDataRetrievalEmptyResults)
}
DispatchQueue.main.async { [weak self] in
guard let self = self else { return }
self.printMessage("Decoded JSON results: \(decodedData)")
self.delegate?.sirenNetworkCallDidReturnWithNewVersionInformation(lookupModel: decodedData)
self.processVersionCheck(with: decodedData)
}
} catch {
postError(.appStoreJSONParsingFailure(underlyingError: error))
}
}
}
/// Condition satisfied when app not in App Store
guard !allResults.isEmpty else {
postError(.appStoreDataRetrievalFailure, underlyingError: nil)
return
}
func processVersionCheck(with model: SirenLookupModel) {
guard isUpdateCompatibleWithDeviceOS(for: model) else { return }
guard let appID = allResults.first?["trackId"] as? Int else {
postError(.appStoreAppIDFailure, underlyingError: nil)
return
guard let appID = model.results.first?.appID else {
return postError(.appStoreAppIDFailure)
}
self.appID = appID
guard let currentAppStoreVersion = allResults.first?["version"] as? String else {
self.postError(.appStoreVersionArrayFailure, underlyingError: nil)
return
guard let currentAppStoreVersion = model.results.first?.version else {
return postError(.appStoreVersionArrayFailure)
}
self.currentAppStoreVersion = currentAppStoreVersion
guard isAppStoreVersionNewer() else {
delegate?.sirenLatestVersionInstalled()
postError(.noUpdateAvailable, underlyingError: nil)
postError(.noUpdateAvailable)
return
}
guard let alertDays = showAlertAfterCurrentVersionHasBeenReleasedForDays else {
showAlertIfCurrentAppStoreVersionNotSkipped()
guard let currentVersionReleaseDate = model.results.first?.currentVersionReleaseDate,
let daysSinceRelease = Date.days(since: currentVersionReleaseDate) else {
return
}
guard let currentVersionReleaseDate = allResults.first?["currentVersionReleaseDate"] as? String,
let daysSinceRelease = days(since: currentVersionReleaseDate),
daysSinceRelease >= alertDays else {
return
guard daysSinceRelease >= showAlertAfterCurrentVersionHasBeenReleasedForDays else {
let message = "Your app has been released for \(daysSinceRelease) days, but Siren cannot prompt the user until \(showAlertAfterCurrentVersionHasBeenReleasedForDays) days have passed."
self.printMessage(message)
return
}
showAlertIfCurrentAppStoreVersionNotSkipped()
showAlertAfterCurrentVersionHasBeenReleasedForDays = nil
}
func iTunesURLFromString() throws -> URL {
@@ -382,20 +253,20 @@ private extension Siren {
components.queryItems = items
guard let url = components.url, !url.absoluteString.isEmpty else {
throw SirenError.malformedURL
throw SirenError.Known.malformedURL
}
return url
}
}
// MARK: - Helpers (Alert)
// MARK: - Alert
private extension Siren {
func showAlertIfCurrentAppStoreVersionNotSkipped() {
alertType = setAlertType()
guard let previouslySkippedVersion = UserDefaults.standard.object(forKey: SirenUserDefaults.StoredSkippedVersion.rawValue) as? String else {
guard let previouslySkippedVersion = UserDefaults.storedSkippedVersion else {
showAlert()
return
}
@@ -406,7 +277,9 @@ private extension Siren {
}
func showAlert() {
let updateAvailableMessage = Bundle().localizedString(stringKey: "Update Available", forceLanguageLocalization: forceLanguageLocalization)
storeVersionCheckDate()
let updateAvailableMessage = localizedUpdateTitle()
let newVersionMessage = localizedNewVersionMessage()
let alertController = UIAlertController(title: updateAvailableMessage, message: newVersionMessage, preferredStyle: .alert)
@@ -426,7 +299,8 @@ private extension Siren {
alertController.addAction(updateAlertAction())
alertController.addAction(skipAlertAction())
case .none:
delegate?.sirenDidDetectNewVersionWithoutAlert(message: newVersionMessage)
let updateTitle = localizedUpdateTitle()
delegate?.sirenDidDetectNewVersionWithoutAlert(title: updateTitle, message: newVersionMessage, updateType: updateType)
}
if alertType != .none && !alertViewIsVisible {
@@ -438,7 +312,9 @@ private extension Siren {
func updateAlertAction() -> UIAlertAction {
let title = localizedUpdateButtonTitle()
let action = UIAlertAction(title: title, style: .default) { [unowned self] _ in
let action = UIAlertAction(title: title, style: .default) { [weak self] _ in
guard let self = self else { return }
self.hideWindow()
self.launchAppStore()
self.delegate?.sirenUserDidLaunchAppStore()
@@ -451,10 +327,13 @@ private extension Siren {
func nextTimeAlertAction() -> UIAlertAction {
let title = localizedNextTimeButtonTitle()
let action = UIAlertAction(title: title, style: .default) { [unowned self] _ in
let action = UIAlertAction(title: title, style: .default) { [weak self] _ in
guard let self = self else { return }
self.hideWindow()
self.delegate?.sirenUserDidCancel()
self.alertViewIsVisible = false
UserDefaults.shouldPerformVersionCheckOnSubsequentLaunch = true
return
}
@@ -463,10 +342,11 @@ private extension Siren {
func skipAlertAction() -> UIAlertAction {
let title = localizedSkipButtonTitle()
let action = UIAlertAction(title: title, style: .default) { [unowned self] _ in
let action = UIAlertAction(title: title, style: .default) { [weak self] _ in
guard let self = self else { return }
if let currentAppStoreVersion = self.currentAppStoreVersion {
UserDefaults.standard.set(currentAppStoreVersion, forKey: SirenUserDefaults.StoredSkippedVersion.rawValue)
UserDefaults.storedSkippedVersion = currentAppStoreVersion
UserDefaults.standard.synchronize()
}
@@ -479,14 +359,14 @@ private extension Siren {
return action
}
func setAlertType() -> SirenAlertType {
func setAlertType() -> Siren.AlertType {
guard let currentInstalledVersion = currentInstalledVersion,
let currentAppStoreVersion = currentAppStoreVersion else {
return .option
}
let oldVersion = (currentInstalledVersion).characters.split {$0 == "."}.map { String($0) }.map {Int($0) ?? 0}
let newVersion = (currentAppStoreVersion).characters.split {$0 == "."}.map { String($0) }.map {Int($0) ?? 0}
let oldVersion = (currentInstalledVersion).lazy.split {$0 == "."}.map { String($0) }.map {Int($0) ?? 0}
let newVersion = (currentAppStoreVersion).lazy.split {$0 == "."}.map { String($0) }.map {Int($0) ?? 0}
guard let newVersionFirst = newVersion.first, let oldVersionFirst = oldVersion.first else {
return alertType // Default value is .Option
@@ -494,258 +374,18 @@ private extension Siren {
if newVersionFirst > oldVersionFirst { // A.b.c.d
alertType = majorUpdateAlertType
updateType = .major
} else if newVersion.count > 1 && (oldVersion.count <= 1 || newVersion[1] > oldVersion[1]) { // a.B.c.d
alertType = minorUpdateAlertType
updateType = .minor
} else if newVersion.count > 2 && (oldVersion.count <= 2 || newVersion[2] > oldVersion[2]) { // a.b.C.d
alertType = patchUpdateAlertType
updateType = .patch
} else if newVersion.count > 3 && (oldVersion.count <= 3 || newVersion[3] > oldVersion[3]) { // a.b.c.D
alertType = revisionUpdateAlertType
updateType = .revision
}
return alertType
}
}
// MARK: - Helpers (Localization)
private extension Siren {
func localizedNewVersionMessage() -> String {
let newVersionMessageToLocalize = "A new version of %@ is available. Please update to version %@ now."
let newVersionMessage = Bundle().localizedString(stringKey: newVersionMessageToLocalize, forceLanguageLocalization: forceLanguageLocalization)
guard let currentAppStoreVersion = currentAppStoreVersion else {
return String(format: newVersionMessage, appName, "Unknown")
}
return String(format: newVersionMessage, appName, currentAppStoreVersion)
}
func localizedUpdateButtonTitle() -> String {
return Bundle().localizedString(stringKey: "Update", forceLanguageLocalization: forceLanguageLocalization)
}
func localizedNextTimeButtonTitle() -> String {
return Bundle().localizedString(stringKey: "Next time", forceLanguageLocalization: forceLanguageLocalization)
}
func localizedSkipButtonTitle() -> String {
return Bundle().localizedString(stringKey: "Skip this version", forceLanguageLocalization: forceLanguageLocalization)
}
}
// MARK: - Helpers (Version)
private extension Siren {
func isAppStoreVersionNewer() -> Bool {
var newVersionExists = false
if let currentInstalledVersion = currentInstalledVersion,
let currentAppStoreVersion = currentAppStoreVersion,
(currentInstalledVersion.compare(currentAppStoreVersion, options: .numeric) == .orderedAscending) {
newVersionExists = true
}
return newVersionExists
}
func storeVersionCheckDate() {
lastVersionCheckPerformedOnDate = Date()
if let lastVersionCheckPerformedOnDate = lastVersionCheckPerformedOnDate {
UserDefaults.standard.set(lastVersionCheckPerformedOnDate, forKey: SirenUserDefaults.StoredVersionCheckDate.rawValue)
UserDefaults.standard.synchronize()
}
}
}
// MARK: - Helpers (Date)
private extension Siren {
static func setupDateFormatter() -> DateFormatter {
let dateformatter = DateFormatter()
dateformatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss'Z'"
return dateformatter
}
func days(since date: Date) -> Int {
let calendar = Calendar.current
let components = calendar.dateComponents([.day], from: date, to: Date())
return components.day!
}
func days(since dateString: String) -> Int? {
let dateformatter = Siren.setupDateFormatter()
guard let releaseDate = dateformatter.date(from: dateString) else { return nil }
return days(since: releaseDate)
}
}
// MARK: - Helpers (Misc.)
private extension Siren {
func isUpdateCompatibleWithDeviceOS(appData: [String: Any]) -> Bool {
guard let results = appData["results"] as? [[String: Any]],
let requiredOSVersion = results.first?["minimumOsVersion"] as? String else {
postError(.appStoreOSVersionNumberFailure, underlyingError: nil)
return false
}
let systemVersion = UIDevice.current.systemVersion
if systemVersion.compare(requiredOSVersion, options: .numeric) == .orderedDescending ||
systemVersion.compare(requiredOSVersion, options: .numeric) == .orderedSame {
return true
} else {
postError(.appStoreOSVersionUnsupported, underlyingError: nil)
return false
}
}
func hideWindow() {
if let updaterWindow = updaterWindow {
updaterWindow.isHidden = true
self.updaterWindow = nil
}
}
func launchAppStore() {
guard let appID = appID else {
return
}
let iTunesString = "https://itunes.apple.com/app/id\(appID)"
let iTunesURL = URL(string: iTunesString)
DispatchQueue.main.async {
UIApplication.shared.openURL(iTunesURL!)
}
}
func printMessage(message: String) {
if debugEnabled {
print("[Siren] \(message)")
}
}
}
// MARK: - UIAlertController Extension
private extension UIAlertController {
func show() {
let window = UIWindow(frame: UIScreen.main.bounds)
window.rootViewController = ViewController()
window.windowLevel = UIWindowLevelAlert + 1
Siren.shared.updaterWindow = window
window.makeKeyAndVisible()
window.rootViewController!.present(self, animated: true, completion: nil)
}
class ViewController: UIViewController {
override var preferredStatusBarStyle: UIStatusBarStyle { return UIApplication.shared.statusBarStyle }
}
}
// MARK: - Bundle Extension
private extension Bundle {
class func bundleID() -> String? {
return Bundle.main.bundleIdentifier
}
func sirenBundlePath() -> String {
return Bundle(for: Siren.self).path(forResource: "Siren", ofType: "bundle") as String!
}
func sirenForcedBundlePath(forceLanguageLocalization: SirenLanguageType) -> String {
let path = sirenBundlePath()
let name = forceLanguageLocalization.rawValue
return Bundle(path: path)!.path(forResource: name, ofType: "lproj")!
}
func localizedString(stringKey: String, forceLanguageLocalization: SirenLanguageType?) -> String {
var path: String
let table = "SirenLocalizable"
if let forceLanguageLocalization = forceLanguageLocalization {
path = sirenForcedBundlePath(forceLanguageLocalization: forceLanguageLocalization)
} else {
path = sirenBundlePath()
}
return Bundle(path: path)!.localizedString(forKey: stringKey, value: stringKey, table: table)
}
func bestMatchingAppName() -> String {
let bundleDisplayName = Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") as? String
let bundleName = Bundle.main.object(forInfoDictionaryKey: kCFBundleNameKey as String) as? String
return bundleDisplayName ?? bundleName ?? ""
}
}
// MARK: - Error Handling
private extension Siren {
func postError(_ code: SirenErrorCode, underlyingError: Error?) {
let description: String
switch code {
case .malformedURL:
description = "The iTunes URL is malformed. Please leave an issue on http://github.com/ArtSabintsev/Siren with as many details as possible."
case .recentlyCheckedAlready:
description = "Not checking the version, because it already checked recently."
case .noUpdateAvailable:
description = "No new update available."
case .appStoreDataRetrievalFailure:
description = "Error retrieving App Store data as an error was returned."
case .appStoreJSONParsingFailure:
description = "Error parsing App Store JSON data."
case .appStoreOSVersionNumberFailure:
description = "Error retrieving iOS version number as there was no data returned."
case .appStoreOSVersionUnsupported:
description = "The version of iOS on the device is lower than that of the one required by the app verison update."
case .appStoreVersionNumberFailure:
description = "Error retrieving App Store version number as there was no data returned."
case .appStoreVersionArrayFailure:
description = "Error retrieving App Store verson number as results.first does not contain a 'version' key."
case .appStoreAppIDFailure:
description = "Error retrieving trackId as results.first does not contain a 'trackId' key."
}
var userInfo: [String: Any] = [NSLocalizedDescriptionKey: description]
if let underlyingError = underlyingError {
userInfo[NSUnderlyingErrorKey] = underlyingError
}
let error = NSError(domain: SirenErrorDomain, code: code.rawValue, userInfo: userInfo)
delegate?.sirenDidFailVersionCheck(error: error)
printMessage(message: error.localizedDescription)
}
}
// MARK: - Helpers (Testing Target)
extension Siren {
func testSetCurrentInstalledVersion(version: String) {
currentInstalledVersion = version
}
func testSetAppStoreVersion(version: String) {
currentAppStoreVersion = version
}
func testIsAppStoreVersionNewer() -> Bool {
return isAppStoreVersionNewer()
}
}
extension Bundle {
func testLocalizedString(stringKey: String, forceLanguageLocalization: SirenLanguageType?) -> String {
return Bundle().localizedString(stringKey: stringKey, forceLanguageLocalization: forceLanguageLocalization)
}
}
+129
View File
@@ -0,0 +1,129 @@
//
// SirenConstants.swift
// Siren
//
// Created by Arthur Sabintsev on 9/25/18.
// Copyright © 2018 Sabintsev iOS Projects. All rights reserved.
//
import Foundation
// MARK: - Enumerated Types
// MARK: Siren extension dealing with enumerated types and constants.
public extension Siren {
/// Determines the type of alert to present after a successful version check has been performed.
enum AlertType {
/// Forces user to update your app (1 button alert).
case force
/// (DEFAULT) Presents user with option to update app now or at next launch (2 button alert).
case option
/// Presents user with option to update the app now, at next launch, or to skip this version all together (3 button alert).
case skip
/// Doesn't show the alert, but instead returns a localized message
/// for use in a custom UI within the sirenDidDetectNewVersionWithoutAlert() delegate method.
case none
}
/// Determines the frequency in which the the version check is performed and the user is prompted to update the app.
///
enum VersionCheckType: Int {
/// Version check performed every time the app is launched.
case immediately = 0
/// Version check performed once a day.
case daily = 1
/// Version check performed once a week.
case weekly = 7
}
/// Determines the available languages in which the update message and alert button titles should appear.
///
/// By default, the operating system's default lanuage setting is used. However, you can force a specific language
/// by setting the forceLanguageLocalization property before calling checkVersion()
enum LanguageType: String {
/// Arabic
case arabic = "ar"
/// Armenian
case armenian = "hy"
/// Basque
case basque = "eu"
/// Simplified Chinese
case chineseSimplified = "zh-Hans"
/// Traditional Chinese
case chineseTraditional = "zh-Hant"
/// Croatian
case croatian = "hr"
/// Czech
case czech = "cs"
/// Danish
case danish = "da"
/// Dutch
case dutch = "nl"
/// English
case english = "en"
/// Estonian
case estonian = "et"
/// Finnish
case finnish = "fi"
/// French
case french = "fr"
/// German
case german = "de"
/// Greek
case greek = "el"
/// Hebrew
case hebrew = "he"
/// Hungarian
case hungarian = "hu"
/// Indonesian
case indonesian = "id"
/// Italian
case italian = "it"
/// Japanese
case japanese = "ja"
/// Korean
case korean = "ko"
/// Latvian
case latvian = "lv"
/// Lithuanian
case lithuanian = "lt"
/// Malaysian
case malay = "ms"
/// Norwegian
case norwegian = "nb-NO"
/// Persian
case persian = "fa"
/// Persian (Afghanistan)
case persianAfghanistan = "fa-AF"
/// Persian (Iran)
case persianIran = "fa-IR"
/// Polish
case polish = "pl"
/// Portuguese (Brazil)
case portugueseBrazil = "pt"
/// Portuguese (Portugal)
case portuguesePortugal = "pt-PT"
/// Russian
case russian = "ru"
/// Serbian (Cyrillic)
case serbianCyrillic = "sr-Cyrl"
/// Serbian (Latin)
case serbianLatin = "sr-Latn"
/// Slovenian
case slovenian = "sl"
/// Spanish
case spanish = "es"
/// Swedish
case swedish = "sv"
/// Thai
case thai = "th"
/// Turkish
case turkish = "tr"
/// Urdu
case urdu = "ur"
/// Ukranian
case ukrainian = "uk"
/// Vietnamese
case vietnamese = "vi"
}
}
+86
View File
@@ -0,0 +1,86 @@
//
// SirenError.swift
// Siren
//
// Created by Arthur Sabintsev on 8/6/17.
// Copyright © 2017 Sabintsev iOS Projects. All rights reserved.
//
import Foundation
// MARK: - Siren Error Handling
/// Data structure used to build Siren specific Errors.
public struct SirenError: LocalizedError {
/// Enumerates all potentials errors that Siren can handle.
///
/// - appStoreAppIDFailure: Error retrieving trackId as the JSON does not contain a 'trackId' key.
/// - appStoreDataRetrievalFailure: Error retrieving App Store data as an error was returned.
/// - appStoreJSONParsingFailure: Error parsing App Store JSON data.
/// - appStoreDataRetrievalEmptyResults: Error retrieving App Store data as JSON results were empty. Is your app available in the US? If not, change the `countryCode` variable to fix this error.
/// - appStoreOSVersionNumberFailure: Error retrieving iOS version number as there was no data returned.
/// - appStoreOSVersionUnsupported: The version of iOS on the device is lower than that of the one required by the app verison update.
/// - appStoreVersionArrayFailure: Error retrieving App Store verson number as the JSON does not contain a 'version' key.
/// - malformedURL: The iTunes URL is malformed. Please leave an issue on https://github.com/ArtSabintsev/Siren with as many details as possible.
/// - noUpdateAvailable: No new update available.
/// - recentlyCheckedAlready: Not checking the version, because it was already checked recently.
public enum Known: Error {
/// Error retrieving trackId as the JSON does not contain a 'trackId' key.
case appStoreAppIDFailure
/// Error retrieving App Store data as an error was returned.
case appStoreDataRetrievalFailure(underlyingError: Error?)
/// Error parsing App Store JSON data.
case appStoreJSONParsingFailure(underlyingError: Error)
/// Error retrieving App Store data as JSON results were empty. Is your app available in the US? If not, change the `countryCode` variable to fix this error.
case appStoreDataRetrievalEmptyResults
/// Error retrieving iOS version number as there was no data returned.
case appStoreOSVersionNumberFailure
/// The version of iOS on the device is lower than that of the one required by the app verison update.
case appStoreOSVersionUnsupported
/// Error retrieving App Store verson number as the JSON does not contain a 'version' key.
case appStoreVersionArrayFailure
/// The iTunes URL is malformed. Please leave an issue on https://github.com/ArtSabintsev/Siren with as many details as possible.
case malformedURL
/// No new update available.
case noUpdateAvailable
/// Not checking the version, because it was already checked recently.
case recentlyCheckedAlready
/// The localized description for each error handled by Siren.
var localizedDescription: String {
switch self {
case .appStoreAppIDFailure:
return "Error retrieving trackId as the JSON does not contain a 'trackId' key."
case .appStoreDataRetrievalFailure(let error?):
return "Error retrieving App Store data as an error was returned\nAlso, the following system level error was returned: \(error)"
case .appStoreDataRetrievalFailure(.none):
return "Error retrieving App Store data as an error was returned."
case .appStoreDataRetrievalEmptyResults:
return "Error retrieving App Store data as the JSON results were empty. Is your app available in the US? If not, change the `countryCode` variable to fix this error."
case .appStoreJSONParsingFailure(let error):
return "Error parsing App Store JSON data.\nAlso, the following system level error was returned: \(error)"
case .appStoreOSVersionNumberFailure:
return "Error retrieving iOS version number as there was no data returned."
case .appStoreOSVersionUnsupported:
return "The version of iOS on the device is lower than that of the one required by the app verison update."
case .appStoreVersionArrayFailure:
return "Error retrieving App Store verson number as the JSON does not contain a 'version' key."
case .malformedURL:
return "The iTunes URL is malformed. Please leave an issue on https://github.com/ArtSabintsev/Siren with as many details as possible."
case .noUpdateAvailable:
return "No new update available."
case .recentlyCheckedAlready:
return "Not checking the version, because it was already checked recently."
}
}
}
}
// MARK: - Error Handling
extension Siren {
func postError(_ error: SirenError.Known) {
delegate?.sirenDidFailVersionCheck(error: error)
printMessage(error.localizedDescription)
}
}
+83
View File
@@ -0,0 +1,83 @@
//
// SirenHelpers.swift
// Siren
//
// Created by Arthur Sabintsev on 9/25/18.
// Copyright © 2018 Sabintsev iOS Projects. All rights reserved.
//
import Foundation
// MARK: - Version
extension Siren {
func isAppStoreVersionNewer() -> Bool {
var newVersionExists = false
if let currentInstalledVersion = currentInstalledVersion,
let currentAppStoreVersion = currentAppStoreVersion,
(currentInstalledVersion.compare(currentAppStoreVersion, options: .numeric) == .orderedAscending) {
newVersionExists = true
}
return newVersionExists
}
func storeVersionCheckDate() {
lastVersionCheckPerformedOnDate = Date()
if let lastVersionCheckPerformedOnDate = lastVersionCheckPerformedOnDate {
UserDefaults.storedVersionCheckDate = lastVersionCheckPerformedOnDate
UserDefaults.standard.synchronize()
}
}
}
// MARK: - Miscellaneous
extension Siren {
func isUpdateCompatibleWithDeviceOS(for model: SirenLookupModel) -> Bool {
guard let requiredOSVersion = model.results.first?.minimumOSVersion else {
postError(.appStoreOSVersionNumberFailure)
return false
}
let systemVersion = UIDevice.current.systemVersion
guard systemVersion.compare(requiredOSVersion, options: .numeric) == .orderedDescending ||
systemVersion.compare(requiredOSVersion, options: .numeric) == .orderedSame else {
postError(.appStoreOSVersionUnsupported)
return false
}
return true
}
func hideWindow() {
if let updaterWindow = updaterWindow {
updaterWindow.isHidden = true
self.updaterWindow = nil
}
}
/// Routes a console-bound message to the `SirenLog` struct, which decorates the log message.
///
/// - Parameter message: The message to decorate and log to the console.
func printMessage(_ message: String) {
if debugEnabled {
SirenLog(message)
}
}
}
// MARK: - Test Target
extension Siren {
func testSetCurrentInstalledVersion(version: String) {
currentInstalledVersion = version
}
func testSetAppStoreVersion(version: String) {
currentAppStoreVersion = version
}
}
+18
View File
@@ -0,0 +1,18 @@
//
// SirenLog.swift
// SirenExample
//
// Created by Arthur Sabintsev on 8/5/17.
// Copyright © 2017 Sabintsev iOS Projects. All rights reserved.
//
import Foundation
// MARK: - Log and decorate Siren-specific messages to the console.
struct SirenLog {
@discardableResult
init(_ message: String) {
print("[Siren] \(message)")
}
}
@@ -0,0 +1,16 @@
//
// SirenViewController.swift
// SirenExample
//
// Created by Arthur Sabintsev on 3/17/17.
// Copyright © 2017 Sabintsev iOS Projects. All rights reserved.
//
import Foundation
import UIKit
// MARK: - UIViewController Extension for Siren
final class SirenViewController: UIViewController {
override var preferredStatusBarStyle: UIStatusBarStyle { return UIApplication.shared.statusBarStyle }
}
+41 -14
View File
@@ -10,6 +10,7 @@
</head>
<body>
<a name="//apple_ref/swift/Section/Classes" class="dashAnchor"></a>
<a title="Classes Reference"></a>
<header>
<div class="content-wrapper">
@@ -32,19 +33,22 @@
<li class="nav-group-task">
<a href="Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="Enums.html">Enums</a>
<a href="Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Enums/SirenAlertType.html">SirenAlertType</a>
</li>
<li class="nav-group-task">
<a href="Enums/SirenLanguageType.html">SirenLanguageType</a>
</li>
<li class="nav-group-task">
<a href="Enums/SirenVersionCheckType.html">SirenVersionCheckType</a>
<a href="Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
@@ -56,6 +60,29 @@
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
@@ -78,9 +105,9 @@
<li class="item">
<div>
<code>
<a name="/s:C5Siren5Siren"></a>
<a name="/c:@M@Siren@objc(cs)Siren"></a>
<a name="//apple_ref/swift/Class/Siren" class="dashAnchor"></a>
<a class="token" href="#/s:C5Siren5Siren">Siren</a>
<a class="token" href="#/c:@M@Siren@objc(cs)Siren">Siren</a>
</code>
</div>
<div class="height-container">
@@ -88,7 +115,7 @@
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The Siren Class. A singleton that is initialized using the shared() method.</p>
<p>The Siren Class. A singleton that is initialized using the <code>shared</code> constant.</p>
<a href="Classes/Siren.html" class="slightly-smaller">See more</a>
</div>
@@ -96,7 +123,7 @@
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">Siren</span><span class="p">:</span> <span class="kt">NSObject</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">Siren</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
</div>
</div>
@@ -108,8 +135,8 @@
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2017-03-04)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
+262 -86
View File
@@ -33,19 +33,22 @@
<li class="nav-group-task">
<a href="../Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Enums.html">Enums</a>
<a href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Enums/SirenAlertType.html">SirenAlertType</a>
</li>
<li class="nav-group-task">
<a href="../Enums/SirenLanguageType.html">SirenLanguageType</a>
</li>
<li class="nav-group-task">
<a href="../Enums/SirenVersionCheckType.html">SirenVersionCheckType</a>
<a href="../Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
@@ -57,6 +60,29 @@
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
@@ -65,11 +91,11 @@
<h1>Siren</h1>
<div class="declaration">
<div class="language">
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">Siren</span><span class="p">:</span> <span class="kt">NSObject</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">Siren</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
</div>
</div>
<p>The Siren Class. A singleton that is initialized using the shared() method.</p>
<p>The Siren Class. A singleton that is initialized using the <code>shared</code> constant.</p>
</section>
<section class="section task-group-section">
@@ -78,9 +104,9 @@
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren16SirenErrorDomainSS"></a>
<a name="/s:5SirenAAC0A11ErrorDomainSSvp"></a>
<a name="//apple_ref/swift/Property/SirenErrorDomain" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren16SirenErrorDomainSS">SirenErrorDomain</a>
<a class="token" href="#/s:5SirenAAC0A11ErrorDomainSSvp">SirenErrorDomain</a>
</code>
</div>
<div class="height-container">
@@ -88,14 +114,14 @@
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The error domain for all errors created by Siren</p>
<p>The error domain for all errors created by Siren.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">SirenErrorDomain</span> <span class="o">=</span> <span class="s">"Siren Error Domain"</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">SirenErrorDomain</span><span class="p">:</span> <span class="kt">String</span></code></pre>
</div>
</div>
@@ -105,9 +131,9 @@
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren8delegateXwGSqPS_13SirenDelegate__"></a>
<a name="/s:5SirenAAC8delegateAA0A8Delegate_pSgXwvp"></a>
<a name="//apple_ref/swift/Property/delegate" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren8delegateXwGSqPS_13SirenDelegate__">delegate</a>
<a class="token" href="#/s:5SirenAAC8delegateAA0A8Delegate_pSgXwvp">delegate</a>
</code>
</div>
<div class="height-container">
@@ -115,23 +141,15 @@
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The SirenDelegate variable, which should be set if you&rsquo;d like to be notified:</p>
<p>When a user views or interacts with the alert
- sirenDidShowUpdateDialog(alertType: SirenAlertType)
- sirenUserDidLaunchAppStore()
- sirenUserDidSkipVersion()
- sirenUserDidCancel()</p>
<p>When a new version has been detected, and you would like to present a localized message in a custom UI
- sirenDidDetectNewVersionWithoutAlert(message: String)</p>
<p>The <code><a href="../Protocols/SirenDelegate.html">SirenDelegate</a></code> variable, which should be set if you&rsquo;d like to be notified of any of specific user interactions or API success/failures.
Also set this variable if you&rsquo;d like to use custom UI for presesnting the update notification.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">delegate</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SirenDelegate.html">SirenDelegate</a></span><span class="p">?</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">delegate</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SirenDelegate.html">SirenDelegate</a></span><span class="p">?</span></code></pre>
</div>
</div>
@@ -141,9 +159,9 @@
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren12debugEnabledSb"></a>
<a name="/s:5SirenAAC12debugEnabledSbvp"></a>
<a name="//apple_ref/swift/Property/debugEnabled" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren12debugEnabledSb">debugEnabled</a>
<a class="token" href="#/s:5SirenAAC12debugEnabledSbvp">debugEnabled</a>
</code>
</div>
<div class="height-container">
@@ -152,14 +170,14 @@
<div class="pointer"></div>
<div class="abstract">
<p>The debug flag, which is disabled by default.
When enabled, a stream of println() statements are logged to your console when a version check is performed.</p>
When enabled, a stream of print() statements are logged to your console when a version check is performed.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">debugEnabled</span> <span class="o">=</span> <span class="kc">false</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">debugEnabled</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
</div>
</div>
@@ -169,9 +187,9 @@ When enabled, a stream of println() statements are logged to your console when a
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren9alertTypeOS_14SirenAlertType"></a>
<a name="/s:5SirenAAC9alertTypeAB05AlertC0Ovp"></a>
<a name="//apple_ref/swift/Property/alertType" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren9alertTypeOS_14SirenAlertType">alertType</a>
<a class="token" href="#/s:5SirenAAC9alertTypeAB05AlertC0Ovp">alertType</a>
</code>
</div>
<div class="height-container">
@@ -180,14 +198,14 @@ When enabled, a stream of println() statements are logged to your console when a
<div class="pointer"></div>
<div class="abstract">
<p>Determines the type of alert that should be shown.
See the SirenAlertType enum for full details.</p>
See the Siren.AlertType enum for full details.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">alertType</span> <span class="o">=</span> <span class="kt"><a href="../Enums/SirenAlertType.html">SirenAlertType</a></span><span class="o">.</span><span class="n">option</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">alertType</span><span class="p">:</span> <span class="kt">Siren</span><span class="o">.</span><span class="kt"><a href="../Classes/Siren/AlertType.html">AlertType</a></span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
</div>
</div>
@@ -197,9 +215,9 @@ See the SirenAlertType enum for full details.</p>
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren20majorUpdateAlertTypeOS_14SirenAlertType"></a>
<a name="/s:5SirenAAC20majorUpdateAlertTypeAB0dE0Ovp"></a>
<a name="//apple_ref/swift/Property/majorUpdateAlertType" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren20majorUpdateAlertTypeOS_14SirenAlertType">majorUpdateAlertType</a>
<a class="token" href="#/s:5SirenAAC20majorUpdateAlertTypeAB0dE0Ovp">majorUpdateAlertType</a>
</code>
</div>
<div class="height-container">
@@ -208,15 +226,15 @@ See the SirenAlertType enum for full details.</p>
<div class="pointer"></div>
<div class="abstract">
<p>Determines the type of alert that should be shown for major version updates: A.b.c
Defaults to SirenAlertType.Option.
See the SirenAlertType enum for full details.</p>
Defaults to Siren.AlertType.option.
See the Siren.AlertType enum for full details.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">majorUpdateAlertType</span> <span class="o">=</span> <span class="kt"><a href="../Enums/SirenAlertType.html">SirenAlertType</a></span><span class="o">.</span><span class="n">option</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">majorUpdateAlertType</span><span class="p">:</span> <span class="kt"><a href="../Classes/Siren/AlertType.html">AlertType</a></span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
</div>
</div>
@@ -226,9 +244,9 @@ See the SirenAlertType enum for full details.</p>
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren20minorUpdateAlertTypeOS_14SirenAlertType"></a>
<a name="/s:5SirenAAC20minorUpdateAlertTypeAB0dE0Ovp"></a>
<a name="//apple_ref/swift/Property/minorUpdateAlertType" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren20minorUpdateAlertTypeOS_14SirenAlertType">minorUpdateAlertType</a>
<a class="token" href="#/s:5SirenAAC20minorUpdateAlertTypeAB0dE0Ovp">minorUpdateAlertType</a>
</code>
</div>
<div class="height-container">
@@ -237,15 +255,15 @@ See the SirenAlertType enum for full details.</p>
<div class="pointer"></div>
<div class="abstract">
<p>Determines the type of alert that should be shown for minor version updates: a.B.c
Defaults to SirenAlertType.Option.
See the SirenAlertType enum for full details.</p>
Defaults to Siren.AlertType.option.
See the Siren.AlertType enum for full details.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">minorUpdateAlertType</span> <span class="o">=</span> <span class="kt"><a href="../Enums/SirenAlertType.html">SirenAlertType</a></span><span class="o">.</span><span class="n">option</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">minorUpdateAlertType</span><span class="p">:</span> <span class="kt"><a href="../Classes/Siren/AlertType.html">AlertType</a></span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
</div>
</div>
@@ -255,9 +273,9 @@ See the SirenAlertType enum for full details.</p>
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren20patchUpdateAlertTypeOS_14SirenAlertType"></a>
<a name="/s:5SirenAAC20patchUpdateAlertTypeAB0dE0Ovp"></a>
<a name="//apple_ref/swift/Property/patchUpdateAlertType" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren20patchUpdateAlertTypeOS_14SirenAlertType">patchUpdateAlertType</a>
<a class="token" href="#/s:5SirenAAC20patchUpdateAlertTypeAB0dE0Ovp">patchUpdateAlertType</a>
</code>
</div>
<div class="height-container">
@@ -266,15 +284,15 @@ See the SirenAlertType enum for full details.</p>
<div class="pointer"></div>
<div class="abstract">
<p>Determines the type of alert that should be shown for minor patch updates: a.b.C
Defaults to SirenAlertType.Option.
See the SirenAlertType enum for full details.</p>
Defaults to Siren.AlertType.option.
See the Siren.AlertType enum for full details.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">patchUpdateAlertType</span> <span class="o">=</span> <span class="kt"><a href="../Enums/SirenAlertType.html">SirenAlertType</a></span><span class="o">.</span><span class="n">option</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">patchUpdateAlertType</span><span class="p">:</span> <span class="kt"><a href="../Classes/Siren/AlertType.html">AlertType</a></span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
</div>
</div>
@@ -284,9 +302,9 @@ See the SirenAlertType enum for full details.</p>
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren23revisionUpdateAlertTypeOS_14SirenAlertType"></a>
<a name="/s:5SirenAAC23revisionUpdateAlertTypeAB0dE0Ovp"></a>
<a name="//apple_ref/swift/Property/revisionUpdateAlertType" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren23revisionUpdateAlertTypeOS_14SirenAlertType">revisionUpdateAlertType</a>
<a class="token" href="#/s:5SirenAAC23revisionUpdateAlertTypeAB0dE0Ovp">revisionUpdateAlertType</a>
</code>
</div>
<div class="height-container">
@@ -295,15 +313,15 @@ See the SirenAlertType enum for full details.</p>
<div class="pointer"></div>
<div class="abstract">
<p>Determines the type of alert that should be shown for revision updates: a.b.c.D
Defaults to SirenAlertType.Option.
See the SirenAlertType enum for full details.</p>
Defaults to Siren.AlertType.option.
See the Siren.AlertType enum for full details.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">revisionUpdateAlertType</span> <span class="o">=</span> <span class="kt"><a href="../Enums/SirenAlertType.html">SirenAlertType</a></span><span class="o">.</span><span class="n">option</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">revisionUpdateAlertType</span><span class="p">:</span> <span class="kt"><a href="../Classes/Siren/AlertType.html">AlertType</a></span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
</div>
</div>
@@ -313,9 +331,9 @@ See the SirenAlertType enum for full details.</p>
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren7appNameSS"></a>
<a name="/s:5SirenAAC7appNameSSvp"></a>
<a name="//apple_ref/swift/Property/appName" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren7appNameSS">appName</a>
<a class="token" href="#/s:5SirenAAC7appNameSSvp">appName</a>
</code>
</div>
<div class="height-container">
@@ -331,7 +349,7 @@ By default, it&rsquo;s set to the name of the app that&rsquo;s stored in your pl
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">appName</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="kt">Bundle</span><span class="o">.</span><span class="n">main</span><span class="o">.</span><span class="nf">bestMatchingAppName</span><span class="p">()</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">appName</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
</div>
</div>
@@ -341,9 +359,37 @@ By default, it&rsquo;s set to the name of the app that&rsquo;s stored in your pl
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren11countryCodeGSqSS_"></a>
<a name="/s:5SirenAAC14alertMessagingAA0a5AlertC0Vvp"></a>
<a name="//apple_ref/swift/Property/alertMessaging" class="dashAnchor"></a>
<a class="token" href="#/s:5SirenAAC14alertMessagingAA0a5AlertC0Vvp">alertMessaging</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Overrides all the Strings to which Siren defaults.
Defaults to the values defined in <code><a href="../Structs/SirenAlertMessaging/Constants.html">SirenAlertMessaging.Constants</a></code></p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">alertMessaging</span><span class="p">:</span> <span class="kt"><a href="../Structs/SirenAlertMessaging.html">SirenAlertMessaging</a></span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5SirenAAC11countryCodeSSSgvp"></a>
<a name="//apple_ref/swift/Property/countryCode" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren11countryCodeGSqSS_">countryCode</a>
<a class="token" href="#/s:5SirenAAC11countryCodeSSSgvp">countryCode</a>
</code>
</div>
<div class="height-container">
@@ -360,7 +406,7 @@ If your app is not available in the US App Store, set it to the identifier of at
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">countryCode</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">countryCode</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span></code></pre>
</div>
</div>
@@ -370,9 +416,9 @@ If your app is not available in the US App Store, set it to the identifier of at
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren25forceLanguageLocalizationGSqOS_17SirenLanguageType_"></a>
<a name="/s:5SirenAAC25forceLanguageLocalizationAB0C4TypeOSgvp"></a>
<a name="//apple_ref/swift/Property/forceLanguageLocalization" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren25forceLanguageLocalizationGSqOS_17SirenLanguageType_">forceLanguageLocalization</a>
<a class="token" href="#/s:5SirenAAC25forceLanguageLocalizationAB0C4TypeOSgvp">forceLanguageLocalization</a>
</code>
</div>
<div class="height-container">
@@ -381,14 +427,14 @@ If your app is not available in the US App Store, set it to the identifier of at
<div class="pointer"></div>
<div class="abstract">
<p>Overrides the default localization of a user&rsquo;s device when presenting the update message and button titles in the alert.
See the SirenLanguageType enum for more details.</p>
See the Siren.LanguageType enum for more details.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">forceLanguageLocalization</span><span class="p">:</span> <span class="kt"><a href="../Enums/SirenLanguageType.html">SirenLanguageType</a></span><span class="p">?</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">forceLanguageLocalization</span><span class="p">:</span> <span class="kt">Siren</span><span class="o">.</span><span class="kt"><a href="../Classes/Siren/LanguageType.html">LanguageType</a></span><span class="p">?</span></code></pre>
</div>
</div>
@@ -398,9 +444,9 @@ See the SirenLanguageType enum for more details.</p>
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren24alertControllerTintColorGSqCSo7UIColor_"></a>
<a name="/s:5SirenAAC24alertControllerTintColorSo7UIColorCSgvp"></a>
<a name="//apple_ref/swift/Property/alertControllerTintColor" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren24alertControllerTintColorGSqCSo7UIColor_">alertControllerTintColor</a>
<a class="token" href="#/s:5SirenAAC24alertControllerTintColorSo7UIColorCSgvp">alertControllerTintColor</a>
</code>
</div>
<div class="height-container">
@@ -415,7 +461,7 @@ See the SirenLanguageType enum for more details.</p>
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">alertControllerTintColor</span><span class="p">:</span> <span class="kt">UIColor</span><span class="p">?</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">alertControllerTintColor</span><span class="p">:</span> <span class="kt">UIColor</span><span class="p">?</span></code></pre>
</div>
</div>
@@ -425,9 +471,9 @@ See the SirenLanguageType enum for more details.</p>
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren50showAlertAfterCurrentVersionHasBeenReleasedForDaysGSqSi_"></a>
<a name="/s:5SirenAAC50showAlertAfterCurrentVersionHasBeenReleasedForDaysSivp"></a>
<a name="//apple_ref/swift/Property/showAlertAfterCurrentVersionHasBeenReleasedForDays" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren50showAlertAfterCurrentVersionHasBeenReleasedForDaysGSqSi_">showAlertAfterCurrentVersionHasBeenReleasedForDays</a>
<a class="token" href="#/s:5SirenAAC50showAlertAfterCurrentVersionHasBeenReleasedForDaysSivp">showAlertAfterCurrentVersionHasBeenReleasedForDays</a>
</code>
</div>
<div class="height-container">
@@ -435,14 +481,15 @@ See the SirenLanguageType enum for more details.</p>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>When this is set, the alert will only show up if the current version has already been released for X days</p>
<p>When this is set, the alert will only show up if the current version has already been released for X days.
Defaults to 1 day to avoid an issue where Apple updates the JSON faster than the app binary propogates to the App Store.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">showAlertAfterCurrentVersionHasBeenReleasedForDays</span><span class="p">:</span> <span class="kt">Int</span><span class="p">?</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">showAlertAfterCurrentVersionHasBeenReleasedForDays</span><span class="p">:</span> <span class="kt">Int</span></code></pre>
</div>
</div>
@@ -452,9 +499,9 @@ See the SirenLanguageType enum for more details.</p>
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren22currentAppStoreVersionGSqSS_"></a>
<a name="/s:5SirenAAC22currentAppStoreVersionSSSgvp"></a>
<a name="//apple_ref/swift/Property/currentAppStoreVersion" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren22currentAppStoreVersionGSqSS_">currentAppStoreVersion</a>
<a class="token" href="#/s:5SirenAAC22currentAppStoreVersionSSSgvp">currentAppStoreVersion</a>
</code>
</div>
<div class="height-container">
@@ -469,7 +516,7 @@ See the SirenLanguageType enum for more details.</p>
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">fileprivate</span><span class="p">(</span><span class="k">set</span><span class="p">)</span> <span class="k">var</span> <span class="nv">currentAppStoreVersion</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">internal(set)</span> <span class="k">var</span> <span class="nv">currentAppStoreVersion</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span></code></pre>
</div>
</div>
@@ -479,9 +526,9 @@ See the SirenLanguageType enum for more details.</p>
<li class="item">
<div>
<code>
<a name="/s:ZvC5Siren5Siren6sharedS0_"></a>
<a name="/s:5SirenAAC6sharedABvpZ"></a>
<a name="//apple_ref/swift/Variable/shared" class="dashAnchor"></a>
<a class="token" href="#/s:ZvC5Siren5Siren6sharedS0_">shared</a>
<a class="token" href="#/s:5SirenAAC6sharedABvpZ">shared</a>
</code>
</div>
<div class="height-container">
@@ -496,7 +543,7 @@ See the SirenLanguageType enum for more details.</p>
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">shared</span> <span class="o">=</span> <span class="kt">Siren</span><span class="p">()</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">shared</span><span class="p">:</span> <span class="kt">Siren</span></code></pre>
</div>
</div>
@@ -506,9 +553,9 @@ See the SirenLanguageType enum for more details.</p>
<li class="item">
<div>
<code>
<a name="/s:FC5Siren5Siren12checkVersionFT9checkTypeOS_21SirenVersionCheckType_T_"></a>
<a name="/s:5SirenAAC12checkVersion0B4TypeyAB0c5CheckD0O_tF"></a>
<a name="//apple_ref/swift/Method/checkVersion(checkType:)" class="dashAnchor"></a>
<a class="token" href="#/s:FC5Siren5Siren12checkVersionFT9checkTypeOS_21SirenVersionCheckType_T_">checkVersion(checkType:)</a>
<a class="token" href="#/s:5SirenAAC12checkVersion0B4TypeyAB0c5CheckD0O_tF">checkVersion(checkType:)</a>
</code>
</div>
<div class="height-container">
@@ -518,14 +565,14 @@ See the SirenLanguageType enum for more details.</p>
<div class="abstract">
<p>Checks the currently installed version of your app against the App Store.
The default check is against the US App Store, but if your app is not listed in the US,
you should set the <code><a href="../Classes/Siren.html#/s:vC5Siren5Siren11countryCodeGSqSS_">countryCode</a></code> property before calling this method. Please refer to the countryCode property for more information.</p>
you should set the <code><a href="../Classes/Siren.html#/s:5SirenAAC11countryCodeSSSgvp">countryCode</a></code> property before calling this method. Please refer to the countryCode property for more information.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">checkVersion</span><span class="p">(</span><span class="nv">checkType</span><span class="p">:</span> <span class="kt"><a href="../Enums/SirenVersionCheckType.html">SirenVersionCheckType</a></span><span class="p">)</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">checkVersion</span><span class="p">(</span><span class="nv">checkType</span><span class="p">:</span> <span class="kt"><a href="../Classes/Siren/VersionCheckType.html">VersionCheckType</a></span><span class="p">)</span></code></pre>
</div>
</div>
@@ -541,8 +588,7 @@ you should set the <code><a href="../Classes/Siren.html#/s:vC5Siren5Siren11count
</td>
<td>
<div>
<p>The frequency in days in which you want a check to be performed. Please refer to the SirenVersionCheckType enum for more details.</p>
<p>The frequency in days in which you want a check to be performed. Please refer to the Siren.VersionCheckType enum for more details.</p>
</div>
</td>
</tr>
@@ -552,13 +598,143 @@ you should set the <code><a href="../Classes/Siren.html#/s:vC5Siren5Siren11count
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5SirenAAC14launchAppStoreyyF"></a>
<a name="//apple_ref/swift/Method/launchAppStore()" class="dashAnchor"></a>
<a class="token" href="#/s:5SirenAAC14launchAppStoreyyF">launchAppStore()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Launches the AppStore in two situations:</p>
<ul>
<li>User clicked the <code>Update</code> button in the UIAlertController modal.</li>
<li>Developer built a custom alert modal and needs to be able to call this function when the user chooses to update the app in the aforementioned custom modal.</li>
</ul>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">launchAppStore</span><span class="p">()</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/Siren%20extension%20dealing%20with%20enumerated%20types%20and%20constants."></a>
<a name="//apple_ref/swift/Section/Siren extension dealing with enumerated types and constants." class="dashAnchor"></a>
<a href="#/Siren%20extension%20dealing%20with%20enumerated%20types%20and%20constants.">
<h3 class="section-name">Siren extension dealing with enumerated types and constants.</h3>
</a>
</div>
<ul>
<li class="item">
<div>
<code>
<a name="/s:5SirenAAC9AlertTypeO"></a>
<a name="//apple_ref/swift/Enum/AlertType" class="dashAnchor"></a>
<a class="token" href="#/s:5SirenAAC9AlertTypeO">AlertType</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Determines the type of alert to present after a successful version check has been performed.</p>
<a href="../Classes/Siren/AlertType.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">enum</span> <span class="kt">AlertType</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5SirenAAC16VersionCheckTypeO"></a>
<a name="//apple_ref/swift/Enum/VersionCheckType" class="dashAnchor"></a>
<a class="token" href="#/s:5SirenAAC16VersionCheckTypeO">VersionCheckType</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Determines the frequency in which the the version check is performed and the user is prompted to update the app.</p>
<a href="../Classes/Siren/VersionCheckType.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">enum</span> <span class="kt">VersionCheckType</span> <span class="p">:</span> <span class="kt">Int</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5SirenAAC12LanguageTypeO"></a>
<a name="//apple_ref/swift/Enum/LanguageType" class="dashAnchor"></a>
<a class="token" href="#/s:5SirenAAC12LanguageTypeO">LanguageType</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Determines the available languages in which the update message and alert button titles should appear.</p>
<p>By default, the operating system&rsquo;s default lanuage setting is used. However, you can force a specific language
by setting the forceLanguageLocalization property before calling checkVersion()</p>
<a href="../Classes/Siren/LanguageType.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">enum</span> <span class="kt">LanguageType</span> <span class="p">:</span> <span class="kt">String</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2017-03-04)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
@@ -1,59 +1,85 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>SirenAlertType Enum Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<title>AlertType Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
<meta charset='utf-8'>
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../../js/jquery.min.js" defer></script>
<script src="../../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/SirenAlertType" class="dashAnchor"></a>
<a title="SirenAlertType Enum Reference"></a>
<a name="//apple_ref/swift/Enum/AlertType" class="dashAnchor"></a>
<a title="AlertType Enumeration Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">Siren Docs</a> (100% documented)</p>
<p><a href="../../index.html">Siren Docs</a> (100% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html">Siren Reference</a>
<img id="carat" src="../img/carat.png" />
SirenAlertType Enum Reference
<a href="../../index.html">Siren Reference</a>
<img id="carat" src="../../img/carat.png" />
AlertType Enumeration Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<a href="../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes/Siren.html">Siren</a>
<a href="../../Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Enums.html">Enums</a>
<a href="../../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Enums/SirenAlertType.html">SirenAlertType</a>
</li>
<li class="nav-group-task">
<a href="../Enums/SirenLanguageType.html">SirenLanguageType</a>
</li>
<li class="nav-group-task">
<a href="../Enums/SirenVersionCheckType.html">SirenVersionCheckType</a>
<a href="../../Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Protocols.html">Protocols</a>
<a href="../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Protocols/SirenDelegate.html">SirenDelegate</a>
<a href="../../Protocols/SirenDelegate.html">SirenDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
@@ -62,10 +88,10 @@
<article class="main-content">
<section>
<section class="section">
<h1>SirenAlertType</h1>
<h1>AlertType</h1>
<div class="declaration">
<div class="language">
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SirenAlertType</span></code></pre>
<pre class="highlight swift"><code><span class="kd">enum</span> <span class="kt">AlertType</span></code></pre>
</div>
</div>
@@ -78,9 +104,9 @@
<li class="item">
<div>
<code>
<a name="/s:FO5Siren14SirenAlertType5forceFMS0_S0_"></a>
<a name="/s:5SirenAAC9AlertTypeO5forceyA2DmF"></a>
<a name="//apple_ref/swift/Element/force" class="dashAnchor"></a>
<a class="token" href="#/s:FO5Siren14SirenAlertType5forceFMS0_S0_">force</a>
<a class="token" href="#/s:5SirenAAC9AlertTypeO5forceyA2DmF">force</a>
</code>
</div>
<div class="height-container">
@@ -95,23 +121,19 @@
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="k">case</span> <span class="n">force</span></code></pre>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">force</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:FO5Siren14SirenAlertType6optionFMS0_S0_"></a>
<a name="/s:5SirenAAC9AlertTypeO6optionyA2DmF"></a>
<a name="//apple_ref/swift/Element/option" class="dashAnchor"></a>
<a class="token" href="#/s:FO5Siren14SirenAlertType6optionFMS0_S0_">option</a>
<a class="token" href="#/s:5SirenAAC9AlertTypeO6optionyA2DmF">option</a>
</code>
</div>
<div class="height-container">
@@ -126,23 +148,19 @@
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="k">case</span> <span class="n">option</span></code></pre>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">option</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:FO5Siren14SirenAlertType4skipFMS0_S0_"></a>
<a name="/s:5SirenAAC9AlertTypeO4skipyA2DmF"></a>
<a name="//apple_ref/swift/Element/skip" class="dashAnchor"></a>
<a class="token" href="#/s:FO5Siren14SirenAlertType4skipFMS0_S0_">skip</a>
<a class="token" href="#/s:5SirenAAC9AlertTypeO4skipyA2DmF">skip</a>
</code>
</div>
<div class="height-container">
@@ -157,23 +175,19 @@
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="k">case</span> <span class="n">skip</span></code></pre>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">skip</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:FO5Siren14SirenAlertType4noneFMS0_S0_"></a>
<a name="/s:5SirenAAC9AlertTypeO4noneyA2DmF"></a>
<a name="//apple_ref/swift/Element/none" class="dashAnchor"></a>
<a class="token" href="#/s:FO5Siren14SirenAlertType4noneFMS0_S0_">none</a>
<a class="token" href="#/s:5SirenAAC9AlertTypeO4noneyA2DmF">none</a>
</code>
</div>
<div class="height-container">
@@ -181,14 +195,15 @@
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Doesn&rsquo;t show the alert, but instead returns a localized message for use in a custom UI within the sirenDidDetectNewVersionWithoutAlert() delegate method.</p>
<p>Doesn&rsquo;t show the alert, but instead returns a localized message
for use in a custom UI within the sirenDidDetectNewVersionWithoutAlert() delegate method.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="k">case</span> <span class="k">none</span></code></pre>
<pre class="highlight swift"><code><span class="k">case</span> <span class="k">none</span></code></pre>
</div>
</div>
@@ -200,8 +215,8 @@
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2017-03-04)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
File diff suppressed because it is too large Load Diff
@@ -1,59 +1,85 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>SirenVersionCheckType Enum Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<title>VersionCheckType Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
<meta charset='utf-8'>
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../../js/jquery.min.js" defer></script>
<script src="../../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/SirenVersionCheckType" class="dashAnchor"></a>
<a title="SirenVersionCheckType Enum Reference"></a>
<a name="//apple_ref/swift/Enum/VersionCheckType" class="dashAnchor"></a>
<a title="VersionCheckType Enumeration Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">Siren Docs</a> (100% documented)</p>
<p><a href="../../index.html">Siren Docs</a> (100% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html">Siren Reference</a>
<img id="carat" src="../img/carat.png" />
SirenVersionCheckType Enum Reference
<a href="../../index.html">Siren Reference</a>
<img id="carat" src="../../img/carat.png" />
VersionCheckType Enumeration Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<a href="../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes/Siren.html">Siren</a>
<a href="../../Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Enums.html">Enums</a>
<a href="../../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Enums/SirenAlertType.html">SirenAlertType</a>
</li>
<li class="nav-group-task">
<a href="../Enums/SirenLanguageType.html">SirenLanguageType</a>
</li>
<li class="nav-group-task">
<a href="../Enums/SirenVersionCheckType.html">SirenVersionCheckType</a>
<a href="../../Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Protocols.html">Protocols</a>
<a href="../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Protocols/SirenDelegate.html">SirenDelegate</a>
<a href="../../Protocols/SirenDelegate.html">SirenDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
@@ -62,14 +88,14 @@
<article class="main-content">
<section>
<section class="section">
<h1>SirenVersionCheckType</h1>
<h1>VersionCheckType</h1>
<div class="declaration">
<div class="language">
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SirenVersionCheckType</span><span class="p">:</span> <span class="kt">Int</span></code></pre>
<pre class="highlight swift"><code><span class="kd">enum</span> <span class="kt">VersionCheckType</span> <span class="p">:</span> <span class="kt">Int</span></code></pre>
</div>
</div>
<p>Determines the frequency in which the the version check is performed.</p>
<p>Determines the frequency in which the the version check is performed and the user is prompted to update the app.</p>
</section>
<section class="section task-group-section">
@@ -78,9 +104,9 @@
<li class="item">
<div>
<code>
<a name="/s:FO5Siren21SirenVersionCheckType11immediatelyFMS0_S0_"></a>
<a name="/s:5SirenAAC16VersionCheckTypeO11immediatelyyA2DmF"></a>
<a name="//apple_ref/swift/Element/immediately" class="dashAnchor"></a>
<a class="token" href="#/s:FO5Siren21SirenVersionCheckType11immediatelyFMS0_S0_">immediately</a>
<a class="token" href="#/s:5SirenAAC16VersionCheckTypeO11immediatelyyA2DmF">immediately</a>
</code>
</div>
<div class="height-container">
@@ -95,23 +121,19 @@
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="k">case</span> <span class="n">immediately</span> <span class="o">=</span> <span class="mi">0</span></code></pre>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">immediately</span> <span class="o">=</span> <span class="mi">0</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:FO5Siren21SirenVersionCheckType5dailyFMS0_S0_"></a>
<a name="/s:5SirenAAC16VersionCheckTypeO5dailyyA2DmF"></a>
<a name="//apple_ref/swift/Element/daily" class="dashAnchor"></a>
<a class="token" href="#/s:FO5Siren21SirenVersionCheckType5dailyFMS0_S0_">daily</a>
<a class="token" href="#/s:5SirenAAC16VersionCheckTypeO5dailyyA2DmF">daily</a>
</code>
</div>
<div class="height-container">
@@ -126,23 +148,19 @@
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="k">case</span> <span class="n">daily</span> <span class="o">=</span> <span class="mi">1</span></code></pre>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">daily</span> <span class="o">=</span> <span class="mi">1</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:FO5Siren21SirenVersionCheckType6weeklyFMS0_S0_"></a>
<a name="/s:5SirenAAC16VersionCheckTypeO6weeklyyA2DmF"></a>
<a name="//apple_ref/swift/Element/weekly" class="dashAnchor"></a>
<a class="token" href="#/s:FO5Siren21SirenVersionCheckType6weeklyFMS0_S0_">weekly</a>
<a class="token" href="#/s:5SirenAAC16VersionCheckTypeO6weeklyyA2DmF">weekly</a>
</code>
</div>
<div class="height-container">
@@ -157,7 +175,7 @@
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="k">case</span> <span class="n">weekly</span> <span class="o">=</span> <span class="mi">7</span></code></pre>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">weekly</span> <span class="o">=</span> <span class="mi">7</span></code></pre>
</div>
</div>
@@ -169,8 +187,8 @@
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2017-03-04)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
+59 -87
View File
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Enums Reference</title>
<title>Enumerations Reference</title>
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
<meta charset='utf-8'>
@@ -10,7 +10,8 @@
</head>
<body>
<a title="Enums Reference"></a>
<a name="//apple_ref/swift/Section/Enumerations" class="dashAnchor"></a>
<a title="Enumerations Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="index.html">Siren Docs</a> (100% documented)</p>
@@ -20,7 +21,7 @@
<p id="breadcrumbs">
<a href="index.html">Siren Reference</a>
<img id="carat" src="img/carat.png" />
Enums Reference
Enumerations Reference
</p>
</div>
<div class="content-wrapper">
@@ -32,19 +33,22 @@
<li class="nav-group-task">
<a href="Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="Enums.html">Enums</a>
<a href="Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Enums/SirenAlertType.html">SirenAlertType</a>
</li>
<li class="nav-group-task">
<a href="Enums/SirenLanguageType.html">SirenLanguageType</a>
</li>
<li class="nav-group-task">
<a href="Enums/SirenVersionCheckType.html">SirenVersionCheckType</a>
<a href="Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
@@ -56,31 +60,47 @@
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>Enums</h1>
<p>The following enums are available globally.</p>
<h1>Enumerations</h1>
<p>The following enumerations are available globally.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<div class="task-name-container">
<a name="/SirenDelegate%20Protocol%20Extension"></a>
<a name="//apple_ref/swift/Section/SirenDelegate Protocol Extension" class="dashAnchor"></a>
<a href="#/SirenDelegate%20Protocol%20Extension">
<h3 class="section-name">SirenDelegate Protocol Extension</h3>
</a>
</div>
<ul>
<li class="item">
<div>
<code>
<a name="/s:O5Siren14SirenAlertType"></a>
<a name="//apple_ref/swift/Enum/SirenAlertType" class="dashAnchor"></a>
<a class="token" href="#/s:O5Siren14SirenAlertType">SirenAlertType</a>
<a name="/s:5Siren10UpdateTypeO"></a>
<a name="//apple_ref/swift/Enum/UpdateType" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren10UpdateTypeO">UpdateType</a>
</code>
</div>
<div class="height-container">
@@ -88,74 +108,26 @@
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Determines the type of alert to present after a successful version check has been performed.</p>
<p>MARK - Siren UpdateType
<code>UpdateType</code> defines what kind of update is available.
It is used as parameter if user wants to use
custom alert to inform the user about an update.</p>
<a href="Enums/SirenAlertType.html" class="slightly-smaller">See more</a>
<ul>
<li>major: Major release available: A.b.c.d</li>
<li>minor: Minor release available: a.B.c.d</li>
<li>patch: Patch release available: a.b.C.d</li>
<li>revision: Revision release available: a.b.c.D</li>
<li>unknown: No information available about the update.</li>
</ul>
<a href="Enums/UpdateType.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SirenAlertType</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:O5Siren21SirenVersionCheckType"></a>
<a name="//apple_ref/swift/Enum/SirenVersionCheckType" class="dashAnchor"></a>
<a class="token" href="#/s:O5Siren21SirenVersionCheckType">SirenVersionCheckType</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Determines the frequency in which the the version check is performed.</p>
<a href="Enums/SirenVersionCheckType.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SirenVersionCheckType</span><span class="p">:</span> <span class="kt">Int</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:O5Siren17SirenLanguageType"></a>
<a name="//apple_ref/swift/Enum/SirenLanguageType" class="dashAnchor"></a>
<a class="token" href="#/s:O5Siren17SirenLanguageType">SirenLanguageType</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Determines the available languages in which the update message and alert button titles should appear.</p>
<p>By default, the operating system&rsquo;s default lanuage setting is used. However, you can force a specific language
by setting the forceLanguageLocalization property before calling checkVersion()</p>
<a href="Enums/SirenLanguageType.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SirenLanguageType</span><span class="p">:</span> <span class="kt">String</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">UpdateType</span> <span class="p">:</span> <span class="kt">String</span></code></pre>
</div>
</div>
@@ -167,8 +139,8 @@ by setting the forceLanguageLocalization property before calling checkVersion()<
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2017-03-04)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
+262
View File
@@ -0,0 +1,262 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>UpdateType Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset='utf-8'>
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/UpdateType" class="dashAnchor"></a>
<a title="UpdateType Enumeration Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">Siren Docs</a> (100% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html">Siren Reference</a>
<img id="carat" src="../img/carat.png" />
UpdateType Enumeration Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Protocols/SirenDelegate.html">SirenDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>UpdateType</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">UpdateType</span> <span class="p">:</span> <span class="kt">String</span></code></pre>
</div>
</div>
<p>MARK - Siren UpdateType
<code>UpdateType</code> defines what kind of update is available.
It is used as parameter if user wants to use
custom alert to inform the user about an update.</p>
<ul>
<li>major: Major release available: A.b.c.d</li>
<li>minor: Minor release available: a.B.c.d</li>
<li>patch: Patch release available: a.b.C.d</li>
<li>revision: Revision release available: a.b.c.D</li>
<li>unknown: No information available about the update.</li>
</ul>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:5Siren10UpdateTypeO5majoryA2CmF"></a>
<a name="//apple_ref/swift/Element/major" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren10UpdateTypeO5majoryA2CmF">major</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Major release available: A.b.c.d</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">major</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren10UpdateTypeO5minoryA2CmF"></a>
<a name="//apple_ref/swift/Element/minor" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren10UpdateTypeO5minoryA2CmF">minor</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Minor release available: a.B.c.d</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">minor</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren10UpdateTypeO5patchyA2CmF"></a>
<a name="//apple_ref/swift/Element/patch" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren10UpdateTypeO5patchyA2CmF">patch</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Patch release available: a.b.C.d</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">patch</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren10UpdateTypeO8revisionyA2CmF"></a>
<a name="//apple_ref/swift/Element/revision" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren10UpdateTypeO8revisionyA2CmF">revision</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Revision release available: a.b.c.D</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">revision</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren10UpdateTypeO7unknownyA2CmF"></a>
<a name="//apple_ref/swift/Element/unknown" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren10UpdateTypeO7unknownyA2CmF">unknown</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>No information available about the update.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">unknown</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
+40 -13
View File
@@ -10,6 +10,7 @@
</head>
<body>
<a name="//apple_ref/swift/Section/Protocols" class="dashAnchor"></a>
<a title="Protocols Reference"></a>
<header>
<div class="content-wrapper">
@@ -32,19 +33,22 @@
<li class="nav-group-task">
<a href="Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="Enums.html">Enums</a>
<a href="Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Enums/SirenAlertType.html">SirenAlertType</a>
</li>
<li class="nav-group-task">
<a href="Enums/SirenLanguageType.html">SirenLanguageType</a>
</li>
<li class="nav-group-task">
<a href="Enums/SirenVersionCheckType.html">SirenVersionCheckType</a>
<a href="Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
@@ -56,6 +60,29 @@
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
@@ -78,9 +105,9 @@
<li class="item">
<div>
<code>
<a name="/s:P5Siren13SirenDelegate"></a>
<a name="/s:5Siren0A8DelegateP"></a>
<a name="//apple_ref/swift/Protocol/SirenDelegate" class="dashAnchor"></a>
<a class="token" href="#/s:P5Siren13SirenDelegate">SirenDelegate</a>
<a class="token" href="#/s:5Siren0A8DelegateP">SirenDelegate</a>
</code>
</div>
<div class="height-container">
@@ -96,7 +123,7 @@
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SirenDelegate</span><span class="p">:</span> <span class="kd">class</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SirenDelegate</span> <span class="p">:</span> <span class="kt">NSObjectProtocol</span></code></pre>
</div>
</div>
@@ -108,8 +135,8 @@
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2017-03-04)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
+235 -131
View File
@@ -33,19 +33,22 @@
<li class="nav-group-task">
<a href="../Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Enums.html">Enums</a>
<a href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Enums/SirenAlertType.html">SirenAlertType</a>
</li>
<li class="nav-group-task">
<a href="../Enums/SirenLanguageType.html">SirenLanguageType</a>
</li>
<li class="nav-group-task">
<a href="../Enums/SirenVersionCheckType.html">SirenVersionCheckType</a>
<a href="../Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
@@ -57,6 +60,29 @@
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
@@ -65,7 +91,7 @@
<h1>SirenDelegate</h1>
<div class="declaration">
<div class="language">
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SirenDelegate</span><span class="p">:</span> <span class="kd">class</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SirenDelegate</span> <span class="p">:</span> <span class="kt">NSObjectProtocol</span></code></pre>
</div>
</div>
@@ -78,9 +104,9 @@
<li class="item">
<div>
<code>
<a name="/s:FP5Siren13SirenDelegate24sirenDidShowUpdateDialogFT9alertTypeOS_14SirenAlertType_T_"></a>
<a name="//apple_ref/swift/Method/sirenDidShowUpdateDialog(alertType:)" class="dashAnchor"></a>
<a class="token" href="#/s:FP5Siren13SirenDelegate24sirenDidShowUpdateDialogFT9alertTypeOS_14SirenAlertType_T_">sirenDidShowUpdateDialog(alertType:)</a>
<a name="/s:5Siren0A8DelegateP36sirenDidDetectNewVersionWithoutAlert5title7message10updateTypeySS_SSAA06UpdateM0OtF"></a>
<a name="//apple_ref/swift/Method/sirenDidDetectNewVersionWithoutAlert(title:message:updateType:)" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A8DelegateP36sirenDidDetectNewVersionWithoutAlert5title7message10updateTypeySS_SSAA06UpdateM0OtF">sirenDidDetectNewVersionWithoutAlert(title:message:updateType:)</a>
</code>
<span class="declaration-note">
Default implementation
@@ -91,7 +117,7 @@
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>User presented with update dialog</p>
<p>Siren performed a version check and did not display an alert.</p>
</div>
<h4>Default Implementation</h4>
@@ -102,7 +128,7 @@
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">sirenDidShowUpdateDialog</span><span class="p">(</span><span class="nv">alertType</span><span class="p">:</span> <span class="kt"><a href="../Enums/SirenAlertType.html">SirenAlertType</a></span><span class="p">)</span></code></pre>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">sirenDidDetectNewVersionWithoutAlert</span><span class="p">(</span><span class="nv">title</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">message</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">updateType</span><span class="p">:</span> <span class="kt"><a href="../Enums/UpdateType.html">UpdateType</a></span><span class="p">)</span></code></pre>
</div>
</div>
@@ -112,111 +138,9 @@
<li class="item">
<div>
<code>
<a name="/s:FP5Siren13SirenDelegate26sirenUserDidLaunchAppStoreFT_T_"></a>
<a name="//apple_ref/swift/Method/sirenUserDidLaunchAppStore()" class="dashAnchor"></a>
<a class="token" href="#/s:FP5Siren13SirenDelegate26sirenUserDidLaunchAppStoreFT_T_">sirenUserDidLaunchAppStore()</a>
</code>
<span class="declaration-note">
Default implementation
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>User did click on button that launched App Store.app</p>
</div>
<h4>Default Implementation</h4>
<div class="default_impl abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">sirenUserDidLaunchAppStore</span><span class="p">()</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:FP5Siren13SirenDelegate23sirenUserDidSkipVersionFT_T_"></a>
<a name="//apple_ref/swift/Method/sirenUserDidSkipVersion()" class="dashAnchor"></a>
<a class="token" href="#/s:FP5Siren13SirenDelegate23sirenUserDidSkipVersionFT_T_">sirenUserDidSkipVersion()</a>
</code>
<span class="declaration-note">
Default implementation
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>User did click on button that skips version update</p>
</div>
<h4>Default Implementation</h4>
<div class="default_impl abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">sirenUserDidSkipVersion</span><span class="p">()</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:FP5Siren13SirenDelegate18sirenUserDidCancelFT_T_"></a>
<a name="//apple_ref/swift/Method/sirenUserDidCancel()" class="dashAnchor"></a>
<a class="token" href="#/s:FP5Siren13SirenDelegate18sirenUserDidCancelFT_T_">sirenUserDidCancel()</a>
</code>
<span class="declaration-note">
Default implementation
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>User did click on button that cancels update dialog</p>
</div>
<h4>Default Implementation</h4>
<div class="default_impl abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">sirenUserDidCancel</span><span class="p">()</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:FP5Siren13SirenDelegate24sirenDidFailVersionCheckFT5errorCSo7NSError_T_"></a>
<a name="/s:5Siren0A8DelegateP24sirenDidFailVersionCheck5errorys5Error_p_tF"></a>
<a name="//apple_ref/swift/Method/sirenDidFailVersionCheck(error:)" class="dashAnchor"></a>
<a class="token" href="#/s:FP5Siren13SirenDelegate24sirenDidFailVersionCheckFT5errorCSo7NSError_T_">sirenDidFailVersionCheck(error:)</a>
<a class="token" href="#/s:5Siren0A8DelegateP24sirenDidFailVersionCheck5errorys5Error_p_tF">sirenDidFailVersionCheck(error:)</a>
</code>
<span class="declaration-note">
Default implementation
@@ -227,7 +151,13 @@
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Siren failed to perform version check (may return system-level error)</p>
<p>Siren failed to perform version check.</p>
<div class="aside aside-note">
<p class="aside-title">Note</p>
Depending on the reason for failure,
a system-level error may be returned.
</div>
</div>
<h4>Default Implementation</h4>
@@ -238,7 +168,7 @@
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">sirenDidFailVersionCheck</span><span class="p">(</span><span class="nv">error</span><span class="p">:</span> <span class="kt">NSError</span><span class="p">)</span></code></pre>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">sirenDidFailVersionCheck</span><span class="p">(</span><span class="nv">error</span><span class="p">:</span> <span class="kt">Error</span><span class="p">)</span></code></pre>
</div>
</div>
@@ -248,9 +178,9 @@
<li class="item">
<div>
<code>
<a name="/s:FP5Siren13SirenDelegate36sirenDidDetectNewVersionWithoutAlertFT7messageSS_T_"></a>
<a name="//apple_ref/swift/Method/sirenDidDetectNewVersionWithoutAlert(message:)" class="dashAnchor"></a>
<a class="token" href="#/s:FP5Siren13SirenDelegate36sirenDidDetectNewVersionWithoutAlertFT7messageSS_T_">sirenDidDetectNewVersionWithoutAlert(message:)</a>
<a name="/s:5Siren0A8DelegateP24sirenDidShowUpdateDialog9alertTypeyA2AC05AlertI0O_tF"></a>
<a name="//apple_ref/swift/Method/sirenDidShowUpdateDialog(alertType:)" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A8DelegateP24sirenDidShowUpdateDialog9alertTypeyA2AC05AlertI0O_tF">sirenDidShowUpdateDialog(alertType:)</a>
</code>
<span class="declaration-note">
Default implementation
@@ -261,7 +191,7 @@
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Siren performed version check and did not display alert</p>
<p>User presented with an update dialog.</p>
</div>
<h4>Default Implementation</h4>
@@ -272,19 +202,38 @@
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">sirenDidDetectNewVersionWithoutAlert</span><span class="p">(</span><span class="nv">message</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">sirenDidShowUpdateDialog</span><span class="p">(</span><span class="nv">alertType</span><span class="p">:</span> <span class="kt"><a href="../Classes/Siren.html">Siren</a></span><span class="o">.</span><span class="kt">AlertType</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>alertType</em>
</code>
</td>
<td>
<div>
<p>The type of alert that was presented.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:FP5Siren13SirenDelegate27sirenLatestVersionInstalledFT_T_"></a>
<a name="/s:5Siren0A8DelegateP27sirenLatestVersionInstalledyyF"></a>
<a name="//apple_ref/swift/Method/sirenLatestVersionInstalled()" class="dashAnchor"></a>
<a class="token" href="#/s:FP5Siren13SirenDelegate27sirenLatestVersionInstalledFT_T_">sirenLatestVersionInstalled()</a>
<a class="token" href="#/s:5Siren0A8DelegateP27sirenLatestVersionInstalledyyF">sirenLatestVersionInstalled()</a>
</code>
<span class="declaration-note">
Default implementation
@@ -295,7 +244,7 @@
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Siren performed version check and latest version is installed</p>
<p>Siren performed a version check and the latest version was already installed.</p>
</div>
<h4>Default Implementation</h4>
@@ -306,7 +255,162 @@
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">sirenLatestVersionInstalled</span><span class="p">()</span></code></pre>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">sirenLatestVersionInstalled</span><span class="p">()</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A8DelegateP50sirenNetworkCallDidReturnWithNewVersionInformation11lookupModelyAA0a6LookupM0V_tF"></a>
<a name="//apple_ref/swift/Method/sirenNetworkCallDidReturnWithNewVersionInformation(lookupModel:)" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A8DelegateP50sirenNetworkCallDidReturnWithNewVersionInformation11lookupModelyAA0a6LookupM0V_tF">sirenNetworkCallDidReturnWithNewVersionInformation(lookupModel:)</a>
</code>
<span class="declaration-note">
Default implementation
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Provides the decoded JSON information from a successful version check call.</p>
</div>
<h4>Default Implementation</h4>
<div class="default_impl abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">sirenNetworkCallDidReturnWithNewVersionInformation</span><span class="p">(</span><span class="nv">lookupModel</span><span class="p">:</span> <span class="kt"><a href="../Structs/SirenLookupModel.html">SirenLookupModel</a></span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>lookupModel</em>
</code>
</td>
<td>
<div>
<p>The <code>Decodable</code> model representing the JSON results from the iTunes Lookup API.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A8DelegateP18sirenUserDidCancelyyF"></a>
<a name="//apple_ref/swift/Method/sirenUserDidCancel()" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A8DelegateP18sirenUserDidCancelyyF">sirenUserDidCancel()</a>
</code>
<span class="declaration-note">
Default implementation
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>User did click on button that cancels update dialog.</p>
</div>
<h4>Default Implementation</h4>
<div class="default_impl abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">sirenUserDidCancel</span><span class="p">()</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A8DelegateP26sirenUserDidLaunchAppStoreyyF"></a>
<a name="//apple_ref/swift/Method/sirenUserDidLaunchAppStore()" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A8DelegateP26sirenUserDidLaunchAppStoreyyF">sirenUserDidLaunchAppStore()</a>
</code>
<span class="declaration-note">
Default implementation
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>User did click on button that launched <q>App Store.app</q>.</p>
</div>
<h4>Default Implementation</h4>
<div class="default_impl abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">sirenUserDidLaunchAppStore</span><span class="p">()</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A8DelegateP23sirenUserDidSkipVersionyyF"></a>
<a name="//apple_ref/swift/Method/sirenUserDidSkipVersion()" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A8DelegateP23sirenUserDidSkipVersionyyF">sirenUserDidSkipVersion()</a>
</code>
<span class="declaration-note">
Default implementation
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>User did click on button that skips version update.</p>
</div>
<h4>Default Implementation</h4>
<div class="default_impl abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">sirenUserDidSkipVersion</span><span class="p">()</span></code></pre>
</div>
</div>
@@ -318,8 +422,8 @@
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2017-03-04)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
+230
View File
@@ -0,0 +1,230 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Structures Reference</title>
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
<meta charset='utf-8'>
<script src="js/jquery.min.js" defer></script>
<script src="js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Section/Structures" class="dashAnchor"></a>
<a title="Structures Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="index.html">Siren Docs</a> (100% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="index.html">Siren Reference</a>
<img id="carat" src="img/carat.png" />
Structures Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Protocols/SirenDelegate.html">SirenDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>Structures</h1>
<p>The following structures are available globally.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<div class="task-name-container">
<a name="/Siren%20Alert%20Messaging%20Customization"></a>
<a name="//apple_ref/swift/Section/Siren Alert Messaging Customization" class="dashAnchor"></a>
<a href="#/Siren%20Alert%20Messaging%20Customization">
<h3 class="section-name">Siren Alert Messaging Customization</h3>
</a>
</div>
<ul>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A14AlertMessagingV"></a>
<a name="//apple_ref/swift/Struct/SirenAlertMessaging" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A14AlertMessagingV">SirenAlertMessaging</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Allows the overriding of all the <code>UIAlertController</code> and <code>UIActionSheet</code> Strings to which Siren defaults.</p>
<div class="aside aside-warning">
<p class="aside-title">Warning</p>
Overriding any of these keys will result in the loss of the built-in internationalization that Siren provides.
</div>
<p>As <code>SirenAlertMessaging</code> is a Struct, one <em>or</em> more keys can be modified. Overriding only one string will result in the other keys retaining their default (and internationalizable) values.</p>
<a href="Structs/SirenAlertMessaging.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SirenAlertMessaging</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/Model%20representing%20a%20selection%20of%20results%20from%20the%20iTunes%20Lookup%20API"></a>
<a name="//apple_ref/swift/Section/Model representing a selection of results from the iTunes Lookup API" class="dashAnchor"></a>
<a href="#/Model%20representing%20a%20selection%20of%20results%20from%20the%20iTunes%20Lookup%20API">
<h3 class="section-name">Model representing a selection of results from the iTunes Lookup API</h3>
</a>
</div>
<ul>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A11LookupModelV"></a>
<a name="//apple_ref/swift/Struct/SirenLookupModel" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A11LookupModelV">SirenLookupModel</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>MARK: Siren extension used to parse and map the iTunes JSON results into a model represented in Swift.</p>
<a href="Structs/SirenLookupModel.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SirenLookupModel</span> <span class="p">:</span> <span class="kt">Decodable</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/Siren%20Error%20Handling"></a>
<a name="//apple_ref/swift/Section/Siren Error Handling" class="dashAnchor"></a>
<a href="#/Siren%20Error%20Handling">
<h3 class="section-name">Siren Error Handling</h3>
</a>
</div>
<ul>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A5ErrorV"></a>
<a name="//apple_ref/swift/Struct/SirenError" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A5ErrorV">SirenError</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Data structure used to build Siren specific Errors.</p>
<a href="Structs/SirenError.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SirenError</span> <span class="p">:</span> <span class="kt">LocalizedError</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
+249
View File
@@ -0,0 +1,249 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>SirenAlertMessaging Structure Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset='utf-8'>
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Struct/SirenAlertMessaging" class="dashAnchor"></a>
<a title="SirenAlertMessaging Structure Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">Siren Docs</a> (100% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html">Siren Reference</a>
<img id="carat" src="../img/carat.png" />
SirenAlertMessaging Structure Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Protocols/SirenDelegate.html">SirenDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>SirenAlertMessaging</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SirenAlertMessaging</span></code></pre>
</div>
</div>
<p>Allows the overriding of all the <code>UIAlertController</code> and <code>UIActionSheet</code> Strings to which Siren defaults.</p>
<div class="aside aside-warning">
<p class="aside-title">Warning</p>
Overriding any of these keys will result in the loss of the built-in internationalization that Siren provides.
</div>
<p>As <code>SirenAlertMessaging</code> is a Struct, one <em>or</em> more keys can be modified. Overriding only one string will result in the other keys retaining their default (and internationalizable) values.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A14AlertMessagingV9ConstantsV"></a>
<a name="//apple_ref/swift/Struct/Constants" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A14AlertMessagingV9ConstantsV">Constants</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The default constants used for the alert messaging.</p>
<a href="../Structs/SirenAlertMessaging/Constants.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Constants</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A14AlertMessagingV11updateTitle0D7Message0d6ButtonF008nextTimegF0011skipVersiongF0ACSo18NSAttributedStringC_A4Jtcfc"></a>
<a name="//apple_ref/swift/Method/init(updateTitle:updateMessage:updateButtonMessage:nextTimeButtonMessage:skipVersionButtonMessage:)" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A14AlertMessagingV11updateTitle0D7Message0d6ButtonF008nextTimegF0011skipVersiongF0ACSo18NSAttributedStringC_A4Jtcfc">init(updateTitle:updateMessage:updateButtonMessage:nextTimeButtonMessage:skipVersionButtonMessage:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The public initializer</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">updateTitle</span> <span class="nv">title</span><span class="p">:</span> <span class="kt">NSAttributedString</span> <span class="o">=</span> <span class="kt"><a href="../Structs/SirenAlertMessaging/Constants.html">Constants</a></span><span class="o">.</span><span class="n">updateTitle</span><span class="p">,</span>
<span class="n">updateMessage</span> <span class="nv">message</span><span class="p">:</span> <span class="kt">NSAttributedString</span> <span class="o">=</span> <span class="kt"><a href="../Structs/SirenAlertMessaging/Constants.html">Constants</a></span><span class="o">.</span><span class="n">updateMessage</span><span class="p">,</span>
<span class="nv">updateButtonMessage</span><span class="p">:</span> <span class="kt">NSAttributedString</span> <span class="o">=</span> <span class="kt"><a href="../Structs/SirenAlertMessaging/Constants.html">Constants</a></span><span class="o">.</span><span class="n">updateNow</span><span class="p">,</span>
<span class="nv">nextTimeButtonMessage</span><span class="p">:</span> <span class="kt">NSAttributedString</span> <span class="o">=</span> <span class="kt"><a href="../Structs/SirenAlertMessaging/Constants.html">Constants</a></span><span class="o">.</span><span class="n">nextTime</span><span class="p">,</span>
<span class="nv">skipVersionButtonMessage</span><span class="p">:</span> <span class="kt">NSAttributedString</span> <span class="o">=</span> <span class="kt"><a href="../Structs/SirenAlertMessaging/Constants.html">Constants</a></span><span class="o">.</span><span class="n">skipVersion</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>title</em>
</code>
</td>
<td>
<div>
<p>The title field of the <code>UIAlertController</code>.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>message</em>
</code>
</td>
<td>
<div>
<p>The <code>message</code> field of the <code>UIAlertController</code>.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>updateButtonMessage</em>
</code>
</td>
<td>
<div>
<p>The <code>title</code> field of the Update Button <code>UIAlertAction</code>.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>nextTimeButtonMessage</em>
</code>
</td>
<td>
<div>
<p>The <code>title</code> field of the Next Time Button <code>UIAlertAction</code>.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>skipVersionButtonMessage</em>
</code>
</td>
<td>
<div>
<p>The <code>title</code> field of the Skip Button <code>UIAlertAction</code>.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
@@ -0,0 +1,251 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Constants Structure Reference</title>
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
<meta charset='utf-8'>
<script src="../../js/jquery.min.js" defer></script>
<script src="../../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Struct/Constants" class="dashAnchor"></a>
<a title="Constants Structure Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../../index.html">Siren Docs</a> (100% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../../index.html">Siren Reference</a>
<img id="carat" src="../../img/carat.png" />
Constants Structure Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Protocols/SirenDelegate.html">SirenDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>Constants</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Constants</span></code></pre>
</div>
</div>
<p>The default constants used for the alert messaging.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A14AlertMessagingV9ConstantsV8nextTimeSo18NSAttributedStringCvpZ"></a>
<a name="//apple_ref/swift/Variable/nextTime" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A14AlertMessagingV9ConstantsV8nextTimeSo18NSAttributedStringCvpZ">nextTime</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The button text that conveys the message that the user should be prompted to update next time the app launches.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">nextTime</span><span class="p">:</span> <span class="kt">NSAttributedString</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A14AlertMessagingV9ConstantsV11skipVersionSo18NSAttributedStringCvpZ"></a>
<a name="//apple_ref/swift/Variable/skipVersion" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A14AlertMessagingV9ConstantsV11skipVersionSo18NSAttributedStringCvpZ">skipVersion</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The text that conveys the message that the the user wants to skip this verison update.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">skipVersion</span><span class="p">:</span> <span class="kt">NSAttributedString</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A14AlertMessagingV9ConstantsV13updateMessageSo18NSAttributedStringCvpZ"></a>
<a name="//apple_ref/swift/Variable/updateMessage" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A14AlertMessagingV9ConstantsV13updateMessageSo18NSAttributedStringCvpZ">updateMessage</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The text that conveys the message that there is an app update available</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">updateMessage</span><span class="p">:</span> <span class="kt">NSAttributedString</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A14AlertMessagingV9ConstantsV11updateTitleSo18NSAttributedStringCvpZ"></a>
<a name="//apple_ref/swift/Variable/updateTitle" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A14AlertMessagingV9ConstantsV11updateTitleSo18NSAttributedStringCvpZ">updateTitle</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The alert title which defaults to <em>Update Available</em>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">updateTitle</span><span class="p">:</span> <span class="kt">NSAttributedString</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A14AlertMessagingV9ConstantsV9updateNowSo18NSAttributedStringCvpZ"></a>
<a name="//apple_ref/swift/Variable/updateNow" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A14AlertMessagingV9ConstantsV9updateNowSo18NSAttributedStringCvpZ">updateNow</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The button text that conveys the message that the user would like to update the app right away.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">updateNow</span><span class="p">:</span> <span class="kt">NSAttributedString</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
+157
View File
@@ -0,0 +1,157 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>SirenError Structure Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset='utf-8'>
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Struct/SirenError" class="dashAnchor"></a>
<a title="SirenError Structure Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">Siren Docs</a> (100% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html">Siren Reference</a>
<img id="carat" src="../img/carat.png" />
SirenError Structure Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Protocols/SirenDelegate.html">SirenDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>SirenError</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SirenError</span> <span class="p">:</span> <span class="kt">LocalizedError</span></code></pre>
</div>
</div>
<p>Data structure used to build Siren specific Errors.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A5ErrorV5KnownO"></a>
<a name="//apple_ref/swift/Enum/Known" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A5ErrorV5KnownO">Known</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Enumerates all potentials errors that Siren can handle.</p>
<ul>
<li>appStoreAppIDFailure: Error retrieving trackId as the JSON does not contain a &lsquo;trackId&rsquo; key.</li>
<li>appStoreDataRetrievalFailure: Error retrieving App Store data as an error was returned.</li>
<li>appStoreJSONParsingFailure: Error parsing App Store JSON data.</li>
<li>appStoreDataRetrievalEmptyResults: Error retrieving App Store data as JSON results were empty. Is your app available in the US? If not, change the <code>countryCode</code> variable to fix this error.</li>
<li>appStoreOSVersionNumberFailure: Error retrieving iOS version number as there was no data returned.</li>
<li>appStoreOSVersionUnsupported: The version of iOS on the device is lower than that of the one required by the app verison update.</li>
<li>appStoreVersionArrayFailure: Error retrieving App Store verson number as the JSON does not contain a &lsquo;version&rsquo; key.</li>
<li>malformedURL: The iTunes URL is malformed. Please leave an issue on <a href="https://github.com/ArtSabintsev/Siren">https://github.com/ArtSabintsev/Siren</a> with as many details as possible.</li>
<li>noUpdateAvailable: No new update available.</li>
<li>recentlyCheckedAlready: Not checking the version, because it was already checked recently.</li>
</ul>
<a href="../Structs/SirenError/Known.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">Known</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
+399
View File
@@ -0,0 +1,399 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Known Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
<meta charset='utf-8'>
<script src="../../js/jquery.min.js" defer></script>
<script src="../../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/Known" class="dashAnchor"></a>
<a title="Known Enumeration Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../../index.html">Siren Docs</a> (100% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../../index.html">Siren Reference</a>
<img id="carat" src="../../img/carat.png" />
Known Enumeration Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Protocols/SirenDelegate.html">SirenDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>Known</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">Known</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
</div>
</div>
<p>Enumerates all potentials errors that Siren can handle.</p>
<ul>
<li>appStoreAppIDFailure: Error retrieving trackId as the JSON does not contain a &lsquo;trackId&rsquo; key.</li>
<li>appStoreDataRetrievalFailure: Error retrieving App Store data as an error was returned.</li>
<li>appStoreJSONParsingFailure: Error parsing App Store JSON data.</li>
<li>appStoreDataRetrievalEmptyResults: Error retrieving App Store data as JSON results were empty. Is your app available in the US? If not, change the <code>countryCode</code> variable to fix this error.</li>
<li>appStoreOSVersionNumberFailure: Error retrieving iOS version number as there was no data returned.</li>
<li>appStoreOSVersionUnsupported: The version of iOS on the device is lower than that of the one required by the app verison update.</li>
<li>appStoreVersionArrayFailure: Error retrieving App Store verson number as the JSON does not contain a &lsquo;version&rsquo; key.</li>
<li>malformedURL: The iTunes URL is malformed. Please leave an issue on <a href="https://github.com/ArtSabintsev/Siren">https://github.com/ArtSabintsev/Siren</a> with as many details as possible.</li>
<li>noUpdateAvailable: No new update available.</li>
<li>recentlyCheckedAlready: Not checking the version, because it was already checked recently.</li>
</ul>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A5ErrorV5KnownO20appStoreAppIDFailureyA2EmF"></a>
<a name="//apple_ref/swift/Element/appStoreAppIDFailure" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A5ErrorV5KnownO20appStoreAppIDFailureyA2EmF">appStoreAppIDFailure</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Error retrieving trackId as the JSON does not contain a &lsquo;trackId&rsquo; key.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">appStoreAppIDFailure</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A5ErrorV5KnownO28appStoreDataRetrievalFailureyAEs0B0_pSg_tcAEmF"></a>
<a name="//apple_ref/swift/Element/appStoreDataRetrievalFailure(underlyingError:)" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A5ErrorV5KnownO28appStoreDataRetrievalFailureyAEs0B0_pSg_tcAEmF">appStoreDataRetrievalFailure(underlyingError:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Error retrieving App Store data as an error was returned.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">appStoreDataRetrievalFailure</span><span class="p">(</span><span class="nv">underlyingError</span><span class="p">:</span> <span class="kt">Error</span><span class="p">?)</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A5ErrorV5KnownO26appStoreJSONParsingFailureyAEs0B0_p_tcAEmF"></a>
<a name="//apple_ref/swift/Element/appStoreJSONParsingFailure(underlyingError:)" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A5ErrorV5KnownO26appStoreJSONParsingFailureyAEs0B0_p_tcAEmF">appStoreJSONParsingFailure(underlyingError:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Error parsing App Store JSON data.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">appStoreJSONParsingFailure</span><span class="p">(</span><span class="nv">underlyingError</span><span class="p">:</span> <span class="kt">Error</span><span class="p">)</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A5ErrorV5KnownO33appStoreDataRetrievalEmptyResultsyA2EmF"></a>
<a name="//apple_ref/swift/Element/appStoreDataRetrievalEmptyResults" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A5ErrorV5KnownO33appStoreDataRetrievalEmptyResultsyA2EmF">appStoreDataRetrievalEmptyResults</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Error retrieving App Store data as JSON results were empty. Is your app available in the US? If not, change the <code>countryCode</code> variable to fix this error.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">appStoreDataRetrievalEmptyResults</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A5ErrorV5KnownO30appStoreOSVersionNumberFailureyA2EmF"></a>
<a name="//apple_ref/swift/Element/appStoreOSVersionNumberFailure" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A5ErrorV5KnownO30appStoreOSVersionNumberFailureyA2EmF">appStoreOSVersionNumberFailure</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Error retrieving iOS version number as there was no data returned.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">appStoreOSVersionNumberFailure</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A5ErrorV5KnownO28appStoreOSVersionUnsupportedyA2EmF"></a>
<a name="//apple_ref/swift/Element/appStoreOSVersionUnsupported" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A5ErrorV5KnownO28appStoreOSVersionUnsupportedyA2EmF">appStoreOSVersionUnsupported</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The version of iOS on the device is lower than that of the one required by the app verison update.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">appStoreOSVersionUnsupported</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A5ErrorV5KnownO27appStoreVersionArrayFailureyA2EmF"></a>
<a name="//apple_ref/swift/Element/appStoreVersionArrayFailure" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A5ErrorV5KnownO27appStoreVersionArrayFailureyA2EmF">appStoreVersionArrayFailure</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Error retrieving App Store verson number as the JSON does not contain a &lsquo;version&rsquo; key.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">appStoreVersionArrayFailure</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A5ErrorV5KnownO12malformedURLyA2EmF"></a>
<a name="//apple_ref/swift/Element/malformedURL" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A5ErrorV5KnownO12malformedURLyA2EmF">malformedURL</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The iTunes URL is malformed. Please leave an issue on <a href="https://github.com/ArtSabintsev/Siren">https://github.com/ArtSabintsev/Siren</a> with as many details as possible.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">malformedURL</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A5ErrorV5KnownO17noUpdateAvailableyA2EmF"></a>
<a name="//apple_ref/swift/Element/noUpdateAvailable" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A5ErrorV5KnownO17noUpdateAvailableyA2EmF">noUpdateAvailable</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>No new update available.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">noUpdateAvailable</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A5ErrorV5KnownO22recentlyCheckedAlreadyyA2EmF"></a>
<a name="//apple_ref/swift/Element/recentlyCheckedAlready" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A5ErrorV5KnownO22recentlyCheckedAlreadyyA2EmF">recentlyCheckedAlready</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Not checking the version, because it was already checked recently.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">recentlyCheckedAlready</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
+171
View File
@@ -0,0 +1,171 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>SirenLookupModel Structure Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset='utf-8'>
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Struct/SirenLookupModel" class="dashAnchor"></a>
<a title="SirenLookupModel Structure Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">Siren Docs</a> (100% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html">Siren Reference</a>
<img id="carat" src="../img/carat.png" />
SirenLookupModel Structure Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Protocols/SirenDelegate.html">SirenDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>SirenLookupModel</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SirenLookupModel</span> <span class="p">:</span> <span class="kt">Decodable</span></code></pre>
</div>
</div>
<p>MARK: Siren extension used to parse and map the iTunes JSON results into a model represented in Swift.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A11LookupModelV7resultsSayAC7ResultsVGvp"></a>
<a name="//apple_ref/swift/Property/results" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A11LookupModelV7resultsSayAC7ResultsVGvp">results</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The array of results objects from the iTunes Lookup API.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">results</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/SirenLookupModel/Results.html">Results</a></span><span class="p">]</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A11LookupModelV7ResultsV"></a>
<a name="//apple_ref/swift/Struct/Results" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A11LookupModelV7ResultsV">Results</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The Results object from the the iTunes Lookup API.</p>
<a href="../Structs/SirenLookupModel/Results.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Results</span> <span class="p">:</span> <span class="kt">Decodable</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
+251
View File
@@ -0,0 +1,251 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Results Structure Reference</title>
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
<meta charset='utf-8'>
<script src="../../js/jquery.min.js" defer></script>
<script src="../../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Struct/Results" class="dashAnchor"></a>
<a title="Results Structure Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../../index.html">Siren Docs</a> (100% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../../index.html">Siren Reference</a>
<img id="carat" src="../../img/carat.png" />
Results Structure Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Protocols/SirenDelegate.html">SirenDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>Results</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Results</span> <span class="p">:</span> <span class="kt">Decodable</span></code></pre>
</div>
</div>
<p>The Results object from the the iTunes Lookup API.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A11LookupModelV7ResultsV5appIDSivp"></a>
<a name="//apple_ref/swift/Property/appID" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A11LookupModelV7ResultsV5appIDSivp">appID</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The app&rsquo;s App ID.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">appID</span><span class="p">:</span> <span class="kt">Int</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A11LookupModelV7ResultsV25currentVersionReleaseDateSSvp"></a>
<a name="//apple_ref/swift/Property/currentVersionReleaseDate" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A11LookupModelV7ResultsV25currentVersionReleaseDateSSvp">currentVersionReleaseDate</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The release date for the latest verison of the app.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">currentVersionReleaseDate</span><span class="p">:</span> <span class="kt">String</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A11LookupModelV7ResultsV16minimumOSVersionSSvp"></a>
<a name="//apple_ref/swift/Property/minimumOSVersion" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A11LookupModelV7ResultsV16minimumOSVersionSSvp">minimumOSVersion</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The minimum verison of iOS that the current verison of the app requires.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">minimumOSVersion</span><span class="p">:</span> <span class="kt">String</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A11LookupModelV7ResultsV12releaseNotesSSSgvp"></a>
<a name="//apple_ref/swift/Property/releaseNotes" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A11LookupModelV7ResultsV12releaseNotesSSSgvp">releaseNotes</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The releases notes from the latest version of the app.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">releaseNotes</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A11LookupModelV7ResultsV7versionSSvp"></a>
<a name="//apple_ref/swift/Property/version" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A11LookupModelV7ResultsV7versionSSvp">version</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The latest version of the app.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">version</span><span class="p">:</span> <span class="kt">String</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
+28 -1
View File
@@ -1 +1,28 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="136" height="20"><linearGradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="a"><rect width="136" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#a)"><path fill="#555" d="M0 0h93v20H0z"/><path fill="#4c1" d="M93 0h43v20H93z"/><path fill="url(#b)" d="M0 0h136v20H0z"/></g><g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"><text x="46.5" y="15" fill="#010101" fill-opacity=".3">documentation</text><text x="46.5" y="14">documentation</text><text x="113.5" y="15" fill="#010101" fill-opacity=".3">100%</text><text x="113.5" y="14">100%</text></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="136" height="20">
<linearGradient id="b" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<clipPath id="a">
<rect width="136" height="20" rx="3" fill="#fff"/>
</clipPath>
<g clip-path="url(#a)">
<path fill="#555" d="M0 0h93v20H0z"/>
<path fill="#4c1" d="M93 0h43v20H93z"/>
<path fill="url(#b)" d="M0 0h136v20H0z"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110">
<text x="475" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="830">
documentation
</text>
<text x="475" y="140" transform="scale(.1)" textLength="830">
documentation
</text>
<text x="1135" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="330">
100%
</text>
<text x="1135" y="140" transform="scale(.1)" textLength="330">
100%
</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 807 B

After

Width:  |  Height:  |  Size: 1.1 KiB

+5
View File
@@ -164,6 +164,11 @@ header {
padding-top: 10px; }
.main-content section .task-group-section .task-group:first-of-type .section-name {
padding-top: 15px; }
.main-content section .heading:before {
content: "";
display: block;
padding-top: 70px;
margin: -70px 0 0; }
.section {
padding: 0 25px; }
@@ -10,6 +10,7 @@
</head>
<body>
<a name="//apple_ref/swift/Section/Classes" class="dashAnchor"></a>
<a title="Classes Reference"></a>
<header>
<div class="content-wrapper">
@@ -32,19 +33,22 @@
<li class="nav-group-task">
<a href="Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="Enums.html">Enums</a>
<a href="Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Enums/SirenAlertType.html">SirenAlertType</a>
</li>
<li class="nav-group-task">
<a href="Enums/SirenLanguageType.html">SirenLanguageType</a>
</li>
<li class="nav-group-task">
<a href="Enums/SirenVersionCheckType.html">SirenVersionCheckType</a>
<a href="Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
@@ -56,6 +60,29 @@
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
@@ -78,9 +105,9 @@
<li class="item">
<div>
<code>
<a name="/s:C5Siren5Siren"></a>
<a name="/c:@M@Siren@objc(cs)Siren"></a>
<a name="//apple_ref/swift/Class/Siren" class="dashAnchor"></a>
<a class="token" href="#/s:C5Siren5Siren">Siren</a>
<a class="token" href="#/c:@M@Siren@objc(cs)Siren">Siren</a>
</code>
</div>
<div class="height-container">
@@ -88,7 +115,7 @@
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The Siren Class. A singleton that is initialized using the shared() method.</p>
<p>The Siren Class. A singleton that is initialized using the <code>shared</code> constant.</p>
<a href="Classes/Siren.html" class="slightly-smaller">See more</a>
</div>
@@ -96,7 +123,7 @@
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">Siren</span><span class="p">:</span> <span class="kt">NSObject</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">Siren</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
</div>
</div>
@@ -108,8 +135,8 @@
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2017-03-04)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
@@ -33,19 +33,22 @@
<li class="nav-group-task">
<a href="../Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Enums.html">Enums</a>
<a href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Enums/SirenAlertType.html">SirenAlertType</a>
</li>
<li class="nav-group-task">
<a href="../Enums/SirenLanguageType.html">SirenLanguageType</a>
</li>
<li class="nav-group-task">
<a href="../Enums/SirenVersionCheckType.html">SirenVersionCheckType</a>
<a href="../Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
@@ -57,6 +60,29 @@
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
@@ -65,11 +91,11 @@
<h1>Siren</h1>
<div class="declaration">
<div class="language">
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">Siren</span><span class="p">:</span> <span class="kt">NSObject</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">Siren</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
</div>
</div>
<p>The Siren Class. A singleton that is initialized using the shared() method.</p>
<p>The Siren Class. A singleton that is initialized using the <code>shared</code> constant.</p>
</section>
<section class="section task-group-section">
@@ -78,9 +104,9 @@
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren16SirenErrorDomainSS"></a>
<a name="/s:5SirenAAC0A11ErrorDomainSSvp"></a>
<a name="//apple_ref/swift/Property/SirenErrorDomain" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren16SirenErrorDomainSS">SirenErrorDomain</a>
<a class="token" href="#/s:5SirenAAC0A11ErrorDomainSSvp">SirenErrorDomain</a>
</code>
</div>
<div class="height-container">
@@ -88,14 +114,14 @@
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The error domain for all errors created by Siren</p>
<p>The error domain for all errors created by Siren.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">SirenErrorDomain</span> <span class="o">=</span> <span class="s">"Siren Error Domain"</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">SirenErrorDomain</span><span class="p">:</span> <span class="kt">String</span></code></pre>
</div>
</div>
@@ -105,9 +131,9 @@
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren8delegateXwGSqPS_13SirenDelegate__"></a>
<a name="/s:5SirenAAC8delegateAA0A8Delegate_pSgXwvp"></a>
<a name="//apple_ref/swift/Property/delegate" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren8delegateXwGSqPS_13SirenDelegate__">delegate</a>
<a class="token" href="#/s:5SirenAAC8delegateAA0A8Delegate_pSgXwvp">delegate</a>
</code>
</div>
<div class="height-container">
@@ -115,23 +141,15 @@
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The SirenDelegate variable, which should be set if you&rsquo;d like to be notified:</p>
<p>When a user views or interacts with the alert
- sirenDidShowUpdateDialog(alertType: SirenAlertType)
- sirenUserDidLaunchAppStore()
- sirenUserDidSkipVersion()
- sirenUserDidCancel()</p>
<p>When a new version has been detected, and you would like to present a localized message in a custom UI
- sirenDidDetectNewVersionWithoutAlert(message: String)</p>
<p>The <code><a href="../Protocols/SirenDelegate.html">SirenDelegate</a></code> variable, which should be set if you&rsquo;d like to be notified of any of specific user interactions or API success/failures.
Also set this variable if you&rsquo;d like to use custom UI for presesnting the update notification.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">delegate</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SirenDelegate.html">SirenDelegate</a></span><span class="p">?</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">delegate</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SirenDelegate.html">SirenDelegate</a></span><span class="p">?</span></code></pre>
</div>
</div>
@@ -141,9 +159,9 @@
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren12debugEnabledSb"></a>
<a name="/s:5SirenAAC12debugEnabledSbvp"></a>
<a name="//apple_ref/swift/Property/debugEnabled" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren12debugEnabledSb">debugEnabled</a>
<a class="token" href="#/s:5SirenAAC12debugEnabledSbvp">debugEnabled</a>
</code>
</div>
<div class="height-container">
@@ -152,14 +170,14 @@
<div class="pointer"></div>
<div class="abstract">
<p>The debug flag, which is disabled by default.
When enabled, a stream of println() statements are logged to your console when a version check is performed.</p>
When enabled, a stream of print() statements are logged to your console when a version check is performed.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">debugEnabled</span> <span class="o">=</span> <span class="kc">false</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">debugEnabled</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
</div>
</div>
@@ -169,9 +187,9 @@ When enabled, a stream of println() statements are logged to your console when a
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren9alertTypeOS_14SirenAlertType"></a>
<a name="/s:5SirenAAC9alertTypeAB05AlertC0Ovp"></a>
<a name="//apple_ref/swift/Property/alertType" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren9alertTypeOS_14SirenAlertType">alertType</a>
<a class="token" href="#/s:5SirenAAC9alertTypeAB05AlertC0Ovp">alertType</a>
</code>
</div>
<div class="height-container">
@@ -180,14 +198,14 @@ When enabled, a stream of println() statements are logged to your console when a
<div class="pointer"></div>
<div class="abstract">
<p>Determines the type of alert that should be shown.
See the SirenAlertType enum for full details.</p>
See the Siren.AlertType enum for full details.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">alertType</span> <span class="o">=</span> <span class="kt"><a href="../Enums/SirenAlertType.html">SirenAlertType</a></span><span class="o">.</span><span class="n">option</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">alertType</span><span class="p">:</span> <span class="kt">Siren</span><span class="o">.</span><span class="kt"><a href="../Classes/Siren/AlertType.html">AlertType</a></span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
</div>
</div>
@@ -197,9 +215,9 @@ See the SirenAlertType enum for full details.</p>
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren20majorUpdateAlertTypeOS_14SirenAlertType"></a>
<a name="/s:5SirenAAC20majorUpdateAlertTypeAB0dE0Ovp"></a>
<a name="//apple_ref/swift/Property/majorUpdateAlertType" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren20majorUpdateAlertTypeOS_14SirenAlertType">majorUpdateAlertType</a>
<a class="token" href="#/s:5SirenAAC20majorUpdateAlertTypeAB0dE0Ovp">majorUpdateAlertType</a>
</code>
</div>
<div class="height-container">
@@ -208,15 +226,15 @@ See the SirenAlertType enum for full details.</p>
<div class="pointer"></div>
<div class="abstract">
<p>Determines the type of alert that should be shown for major version updates: A.b.c
Defaults to SirenAlertType.Option.
See the SirenAlertType enum for full details.</p>
Defaults to Siren.AlertType.option.
See the Siren.AlertType enum for full details.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">majorUpdateAlertType</span> <span class="o">=</span> <span class="kt"><a href="../Enums/SirenAlertType.html">SirenAlertType</a></span><span class="o">.</span><span class="n">option</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">majorUpdateAlertType</span><span class="p">:</span> <span class="kt"><a href="../Classes/Siren/AlertType.html">AlertType</a></span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
</div>
</div>
@@ -226,9 +244,9 @@ See the SirenAlertType enum for full details.</p>
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren20minorUpdateAlertTypeOS_14SirenAlertType"></a>
<a name="/s:5SirenAAC20minorUpdateAlertTypeAB0dE0Ovp"></a>
<a name="//apple_ref/swift/Property/minorUpdateAlertType" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren20minorUpdateAlertTypeOS_14SirenAlertType">minorUpdateAlertType</a>
<a class="token" href="#/s:5SirenAAC20minorUpdateAlertTypeAB0dE0Ovp">minorUpdateAlertType</a>
</code>
</div>
<div class="height-container">
@@ -237,15 +255,15 @@ See the SirenAlertType enum for full details.</p>
<div class="pointer"></div>
<div class="abstract">
<p>Determines the type of alert that should be shown for minor version updates: a.B.c
Defaults to SirenAlertType.Option.
See the SirenAlertType enum for full details.</p>
Defaults to Siren.AlertType.option.
See the Siren.AlertType enum for full details.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">minorUpdateAlertType</span> <span class="o">=</span> <span class="kt"><a href="../Enums/SirenAlertType.html">SirenAlertType</a></span><span class="o">.</span><span class="n">option</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">minorUpdateAlertType</span><span class="p">:</span> <span class="kt"><a href="../Classes/Siren/AlertType.html">AlertType</a></span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
</div>
</div>
@@ -255,9 +273,9 @@ See the SirenAlertType enum for full details.</p>
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren20patchUpdateAlertTypeOS_14SirenAlertType"></a>
<a name="/s:5SirenAAC20patchUpdateAlertTypeAB0dE0Ovp"></a>
<a name="//apple_ref/swift/Property/patchUpdateAlertType" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren20patchUpdateAlertTypeOS_14SirenAlertType">patchUpdateAlertType</a>
<a class="token" href="#/s:5SirenAAC20patchUpdateAlertTypeAB0dE0Ovp">patchUpdateAlertType</a>
</code>
</div>
<div class="height-container">
@@ -266,15 +284,15 @@ See the SirenAlertType enum for full details.</p>
<div class="pointer"></div>
<div class="abstract">
<p>Determines the type of alert that should be shown for minor patch updates: a.b.C
Defaults to SirenAlertType.Option.
See the SirenAlertType enum for full details.</p>
Defaults to Siren.AlertType.option.
See the Siren.AlertType enum for full details.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">patchUpdateAlertType</span> <span class="o">=</span> <span class="kt"><a href="../Enums/SirenAlertType.html">SirenAlertType</a></span><span class="o">.</span><span class="n">option</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">patchUpdateAlertType</span><span class="p">:</span> <span class="kt"><a href="../Classes/Siren/AlertType.html">AlertType</a></span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
</div>
</div>
@@ -284,9 +302,9 @@ See the SirenAlertType enum for full details.</p>
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren23revisionUpdateAlertTypeOS_14SirenAlertType"></a>
<a name="/s:5SirenAAC23revisionUpdateAlertTypeAB0dE0Ovp"></a>
<a name="//apple_ref/swift/Property/revisionUpdateAlertType" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren23revisionUpdateAlertTypeOS_14SirenAlertType">revisionUpdateAlertType</a>
<a class="token" href="#/s:5SirenAAC23revisionUpdateAlertTypeAB0dE0Ovp">revisionUpdateAlertType</a>
</code>
</div>
<div class="height-container">
@@ -295,15 +313,15 @@ See the SirenAlertType enum for full details.</p>
<div class="pointer"></div>
<div class="abstract">
<p>Determines the type of alert that should be shown for revision updates: a.b.c.D
Defaults to SirenAlertType.Option.
See the SirenAlertType enum for full details.</p>
Defaults to Siren.AlertType.option.
See the Siren.AlertType enum for full details.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">revisionUpdateAlertType</span> <span class="o">=</span> <span class="kt"><a href="../Enums/SirenAlertType.html">SirenAlertType</a></span><span class="o">.</span><span class="n">option</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">revisionUpdateAlertType</span><span class="p">:</span> <span class="kt"><a href="../Classes/Siren/AlertType.html">AlertType</a></span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
</div>
</div>
@@ -313,9 +331,9 @@ See the SirenAlertType enum for full details.</p>
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren7appNameSS"></a>
<a name="/s:5SirenAAC7appNameSSvp"></a>
<a name="//apple_ref/swift/Property/appName" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren7appNameSS">appName</a>
<a class="token" href="#/s:5SirenAAC7appNameSSvp">appName</a>
</code>
</div>
<div class="height-container">
@@ -331,7 +349,7 @@ By default, it&rsquo;s set to the name of the app that&rsquo;s stored in your pl
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">appName</span><span class="p">:</span> <span class="kt">String</span> <span class="o">=</span> <span class="kt">Bundle</span><span class="o">.</span><span class="n">main</span><span class="o">.</span><span class="nf">bestMatchingAppName</span><span class="p">()</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">appName</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
</div>
</div>
@@ -341,9 +359,37 @@ By default, it&rsquo;s set to the name of the app that&rsquo;s stored in your pl
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren11countryCodeGSqSS_"></a>
<a name="/s:5SirenAAC14alertMessagingAA0a5AlertC0Vvp"></a>
<a name="//apple_ref/swift/Property/alertMessaging" class="dashAnchor"></a>
<a class="token" href="#/s:5SirenAAC14alertMessagingAA0a5AlertC0Vvp">alertMessaging</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Overrides all the Strings to which Siren defaults.
Defaults to the values defined in <code><a href="../Structs/SirenAlertMessaging/Constants.html">SirenAlertMessaging.Constants</a></code></p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">alertMessaging</span><span class="p">:</span> <span class="kt"><a href="../Structs/SirenAlertMessaging.html">SirenAlertMessaging</a></span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5SirenAAC11countryCodeSSSgvp"></a>
<a name="//apple_ref/swift/Property/countryCode" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren11countryCodeGSqSS_">countryCode</a>
<a class="token" href="#/s:5SirenAAC11countryCodeSSSgvp">countryCode</a>
</code>
</div>
<div class="height-container">
@@ -360,7 +406,7 @@ If your app is not available in the US App Store, set it to the identifier of at
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">countryCode</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">countryCode</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span></code></pre>
</div>
</div>
@@ -370,9 +416,9 @@ If your app is not available in the US App Store, set it to the identifier of at
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren25forceLanguageLocalizationGSqOS_17SirenLanguageType_"></a>
<a name="/s:5SirenAAC25forceLanguageLocalizationAB0C4TypeOSgvp"></a>
<a name="//apple_ref/swift/Property/forceLanguageLocalization" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren25forceLanguageLocalizationGSqOS_17SirenLanguageType_">forceLanguageLocalization</a>
<a class="token" href="#/s:5SirenAAC25forceLanguageLocalizationAB0C4TypeOSgvp">forceLanguageLocalization</a>
</code>
</div>
<div class="height-container">
@@ -381,14 +427,14 @@ If your app is not available in the US App Store, set it to the identifier of at
<div class="pointer"></div>
<div class="abstract">
<p>Overrides the default localization of a user&rsquo;s device when presenting the update message and button titles in the alert.
See the SirenLanguageType enum for more details.</p>
See the Siren.LanguageType enum for more details.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">forceLanguageLocalization</span><span class="p">:</span> <span class="kt"><a href="../Enums/SirenLanguageType.html">SirenLanguageType</a></span><span class="p">?</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">forceLanguageLocalization</span><span class="p">:</span> <span class="kt">Siren</span><span class="o">.</span><span class="kt"><a href="../Classes/Siren/LanguageType.html">LanguageType</a></span><span class="p">?</span></code></pre>
</div>
</div>
@@ -398,9 +444,9 @@ See the SirenLanguageType enum for more details.</p>
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren24alertControllerTintColorGSqCSo7UIColor_"></a>
<a name="/s:5SirenAAC24alertControllerTintColorSo7UIColorCSgvp"></a>
<a name="//apple_ref/swift/Property/alertControllerTintColor" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren24alertControllerTintColorGSqCSo7UIColor_">alertControllerTintColor</a>
<a class="token" href="#/s:5SirenAAC24alertControllerTintColorSo7UIColorCSgvp">alertControllerTintColor</a>
</code>
</div>
<div class="height-container">
@@ -415,7 +461,7 @@ See the SirenLanguageType enum for more details.</p>
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">alertControllerTintColor</span><span class="p">:</span> <span class="kt">UIColor</span><span class="p">?</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">alertControllerTintColor</span><span class="p">:</span> <span class="kt">UIColor</span><span class="p">?</span></code></pre>
</div>
</div>
@@ -425,9 +471,9 @@ See the SirenLanguageType enum for more details.</p>
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren50showAlertAfterCurrentVersionHasBeenReleasedForDaysGSqSi_"></a>
<a name="/s:5SirenAAC50showAlertAfterCurrentVersionHasBeenReleasedForDaysSivp"></a>
<a name="//apple_ref/swift/Property/showAlertAfterCurrentVersionHasBeenReleasedForDays" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren50showAlertAfterCurrentVersionHasBeenReleasedForDaysGSqSi_">showAlertAfterCurrentVersionHasBeenReleasedForDays</a>
<a class="token" href="#/s:5SirenAAC50showAlertAfterCurrentVersionHasBeenReleasedForDaysSivp">showAlertAfterCurrentVersionHasBeenReleasedForDays</a>
</code>
</div>
<div class="height-container">
@@ -435,14 +481,15 @@ See the SirenLanguageType enum for more details.</p>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>When this is set, the alert will only show up if the current version has already been released for X days</p>
<p>When this is set, the alert will only show up if the current version has already been released for X days.
Defaults to 1 day to avoid an issue where Apple updates the JSON faster than the app binary propogates to the App Store.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">showAlertAfterCurrentVersionHasBeenReleasedForDays</span><span class="p">:</span> <span class="kt">Int</span><span class="p">?</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">showAlertAfterCurrentVersionHasBeenReleasedForDays</span><span class="p">:</span> <span class="kt">Int</span></code></pre>
</div>
</div>
@@ -452,9 +499,9 @@ See the SirenLanguageType enum for more details.</p>
<li class="item">
<div>
<code>
<a name="/s:vC5Siren5Siren22currentAppStoreVersionGSqSS_"></a>
<a name="/s:5SirenAAC22currentAppStoreVersionSSSgvp"></a>
<a name="//apple_ref/swift/Property/currentAppStoreVersion" class="dashAnchor"></a>
<a class="token" href="#/s:vC5Siren5Siren22currentAppStoreVersionGSqSS_">currentAppStoreVersion</a>
<a class="token" href="#/s:5SirenAAC22currentAppStoreVersionSSSgvp">currentAppStoreVersion</a>
</code>
</div>
<div class="height-container">
@@ -469,7 +516,7 @@ See the SirenLanguageType enum for more details.</p>
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">fileprivate</span><span class="p">(</span><span class="k">set</span><span class="p">)</span> <span class="k">var</span> <span class="nv">currentAppStoreVersion</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">internal(set)</span> <span class="k">var</span> <span class="nv">currentAppStoreVersion</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span></code></pre>
</div>
</div>
@@ -479,9 +526,9 @@ See the SirenLanguageType enum for more details.</p>
<li class="item">
<div>
<code>
<a name="/s:ZvC5Siren5Siren6sharedS0_"></a>
<a name="/s:5SirenAAC6sharedABvpZ"></a>
<a name="//apple_ref/swift/Variable/shared" class="dashAnchor"></a>
<a class="token" href="#/s:ZvC5Siren5Siren6sharedS0_">shared</a>
<a class="token" href="#/s:5SirenAAC6sharedABvpZ">shared</a>
</code>
</div>
<div class="height-container">
@@ -496,7 +543,7 @@ See the SirenLanguageType enum for more details.</p>
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">shared</span> <span class="o">=</span> <span class="kt">Siren</span><span class="p">()</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">shared</span><span class="p">:</span> <span class="kt">Siren</span></code></pre>
</div>
</div>
@@ -506,9 +553,9 @@ See the SirenLanguageType enum for more details.</p>
<li class="item">
<div>
<code>
<a name="/s:FC5Siren5Siren12checkVersionFT9checkTypeOS_21SirenVersionCheckType_T_"></a>
<a name="/s:5SirenAAC12checkVersion0B4TypeyAB0c5CheckD0O_tF"></a>
<a name="//apple_ref/swift/Method/checkVersion(checkType:)" class="dashAnchor"></a>
<a class="token" href="#/s:FC5Siren5Siren12checkVersionFT9checkTypeOS_21SirenVersionCheckType_T_">checkVersion(checkType:)</a>
<a class="token" href="#/s:5SirenAAC12checkVersion0B4TypeyAB0c5CheckD0O_tF">checkVersion(checkType:)</a>
</code>
</div>
<div class="height-container">
@@ -518,14 +565,14 @@ See the SirenLanguageType enum for more details.</p>
<div class="abstract">
<p>Checks the currently installed version of your app against the App Store.
The default check is against the US App Store, but if your app is not listed in the US,
you should set the <code><a href="../Classes/Siren.html#/s:vC5Siren5Siren11countryCodeGSqSS_">countryCode</a></code> property before calling this method. Please refer to the countryCode property for more information.</p>
you should set the <code><a href="../Classes/Siren.html#/s:5SirenAAC11countryCodeSSSgvp">countryCode</a></code> property before calling this method. Please refer to the countryCode property for more information.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">checkVersion</span><span class="p">(</span><span class="nv">checkType</span><span class="p">:</span> <span class="kt"><a href="../Enums/SirenVersionCheckType.html">SirenVersionCheckType</a></span><span class="p">)</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">checkVersion</span><span class="p">(</span><span class="nv">checkType</span><span class="p">:</span> <span class="kt"><a href="../Classes/Siren/VersionCheckType.html">VersionCheckType</a></span><span class="p">)</span></code></pre>
</div>
</div>
@@ -541,8 +588,7 @@ you should set the <code><a href="../Classes/Siren.html#/s:vC5Siren5Siren11count
</td>
<td>
<div>
<p>The frequency in days in which you want a check to be performed. Please refer to the SirenVersionCheckType enum for more details.</p>
<p>The frequency in days in which you want a check to be performed. Please refer to the Siren.VersionCheckType enum for more details.</p>
</div>
</td>
</tr>
@@ -552,13 +598,143 @@ you should set the <code><a href="../Classes/Siren.html#/s:vC5Siren5Siren11count
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5SirenAAC14launchAppStoreyyF"></a>
<a name="//apple_ref/swift/Method/launchAppStore()" class="dashAnchor"></a>
<a class="token" href="#/s:5SirenAAC14launchAppStoreyyF">launchAppStore()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Launches the AppStore in two situations:</p>
<ul>
<li>User clicked the <code>Update</code> button in the UIAlertController modal.</li>
<li>Developer built a custom alert modal and needs to be able to call this function when the user chooses to update the app in the aforementioned custom modal.</li>
</ul>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">launchAppStore</span><span class="p">()</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/Siren%20extension%20dealing%20with%20enumerated%20types%20and%20constants."></a>
<a name="//apple_ref/swift/Section/Siren extension dealing with enumerated types and constants." class="dashAnchor"></a>
<a href="#/Siren%20extension%20dealing%20with%20enumerated%20types%20and%20constants.">
<h3 class="section-name">Siren extension dealing with enumerated types and constants.</h3>
</a>
</div>
<ul>
<li class="item">
<div>
<code>
<a name="/s:5SirenAAC9AlertTypeO"></a>
<a name="//apple_ref/swift/Enum/AlertType" class="dashAnchor"></a>
<a class="token" href="#/s:5SirenAAC9AlertTypeO">AlertType</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Determines the type of alert to present after a successful version check has been performed.</p>
<a href="../Classes/Siren/AlertType.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">enum</span> <span class="kt">AlertType</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5SirenAAC16VersionCheckTypeO"></a>
<a name="//apple_ref/swift/Enum/VersionCheckType" class="dashAnchor"></a>
<a class="token" href="#/s:5SirenAAC16VersionCheckTypeO">VersionCheckType</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Determines the frequency in which the the version check is performed and the user is prompted to update the app.</p>
<a href="../Classes/Siren/VersionCheckType.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">enum</span> <span class="kt">VersionCheckType</span> <span class="p">:</span> <span class="kt">Int</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5SirenAAC12LanguageTypeO"></a>
<a name="//apple_ref/swift/Enum/LanguageType" class="dashAnchor"></a>
<a class="token" href="#/s:5SirenAAC12LanguageTypeO">LanguageType</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Determines the available languages in which the update message and alert button titles should appear.</p>
<p>By default, the operating system&rsquo;s default lanuage setting is used. However, you can force a specific language
by setting the forceLanguageLocalization property before calling checkVersion()</p>
<a href="../Classes/Siren/LanguageType.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">enum</span> <span class="kt">LanguageType</span> <span class="p">:</span> <span class="kt">String</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2017-03-04)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
@@ -1,59 +1,85 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>SirenAlertType Enum Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<title>AlertType Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
<meta charset='utf-8'>
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../../js/jquery.min.js" defer></script>
<script src="../../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/SirenAlertType" class="dashAnchor"></a>
<a title="SirenAlertType Enum Reference"></a>
<a name="//apple_ref/swift/Enum/AlertType" class="dashAnchor"></a>
<a title="AlertType Enumeration Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">Siren Docs</a> (100% documented)</p>
<p><a href="../../index.html">Siren Docs</a> (100% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html">Siren Reference</a>
<img id="carat" src="../img/carat.png" />
SirenAlertType Enum Reference
<a href="../../index.html">Siren Reference</a>
<img id="carat" src="../../img/carat.png" />
AlertType Enumeration Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<a href="../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes/Siren.html">Siren</a>
<a href="../../Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Enums.html">Enums</a>
<a href="../../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Enums/SirenAlertType.html">SirenAlertType</a>
</li>
<li class="nav-group-task">
<a href="../Enums/SirenLanguageType.html">SirenLanguageType</a>
</li>
<li class="nav-group-task">
<a href="../Enums/SirenVersionCheckType.html">SirenVersionCheckType</a>
<a href="../../Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Protocols.html">Protocols</a>
<a href="../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Protocols/SirenDelegate.html">SirenDelegate</a>
<a href="../../Protocols/SirenDelegate.html">SirenDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
@@ -62,10 +88,10 @@
<article class="main-content">
<section>
<section class="section">
<h1>SirenAlertType</h1>
<h1>AlertType</h1>
<div class="declaration">
<div class="language">
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SirenAlertType</span></code></pre>
<pre class="highlight swift"><code><span class="kd">enum</span> <span class="kt">AlertType</span></code></pre>
</div>
</div>
@@ -78,9 +104,9 @@
<li class="item">
<div>
<code>
<a name="/s:FO5Siren14SirenAlertType5forceFMS0_S0_"></a>
<a name="/s:5SirenAAC9AlertTypeO5forceyA2DmF"></a>
<a name="//apple_ref/swift/Element/force" class="dashAnchor"></a>
<a class="token" href="#/s:FO5Siren14SirenAlertType5forceFMS0_S0_">force</a>
<a class="token" href="#/s:5SirenAAC9AlertTypeO5forceyA2DmF">force</a>
</code>
</div>
<div class="height-container">
@@ -95,23 +121,19 @@
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="k">case</span> <span class="n">force</span></code></pre>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">force</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:FO5Siren14SirenAlertType6optionFMS0_S0_"></a>
<a name="/s:5SirenAAC9AlertTypeO6optionyA2DmF"></a>
<a name="//apple_ref/swift/Element/option" class="dashAnchor"></a>
<a class="token" href="#/s:FO5Siren14SirenAlertType6optionFMS0_S0_">option</a>
<a class="token" href="#/s:5SirenAAC9AlertTypeO6optionyA2DmF">option</a>
</code>
</div>
<div class="height-container">
@@ -126,23 +148,19 @@
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="k">case</span> <span class="n">option</span></code></pre>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">option</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:FO5Siren14SirenAlertType4skipFMS0_S0_"></a>
<a name="/s:5SirenAAC9AlertTypeO4skipyA2DmF"></a>
<a name="//apple_ref/swift/Element/skip" class="dashAnchor"></a>
<a class="token" href="#/s:FO5Siren14SirenAlertType4skipFMS0_S0_">skip</a>
<a class="token" href="#/s:5SirenAAC9AlertTypeO4skipyA2DmF">skip</a>
</code>
</div>
<div class="height-container">
@@ -157,23 +175,19 @@
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="k">case</span> <span class="n">skip</span></code></pre>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">skip</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:FO5Siren14SirenAlertType4noneFMS0_S0_"></a>
<a name="/s:5SirenAAC9AlertTypeO4noneyA2DmF"></a>
<a name="//apple_ref/swift/Element/none" class="dashAnchor"></a>
<a class="token" href="#/s:FO5Siren14SirenAlertType4noneFMS0_S0_">none</a>
<a class="token" href="#/s:5SirenAAC9AlertTypeO4noneyA2DmF">none</a>
</code>
</div>
<div class="height-container">
@@ -181,14 +195,15 @@
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Doesn&rsquo;t show the alert, but instead returns a localized message for use in a custom UI within the sirenDidDetectNewVersionWithoutAlert() delegate method.</p>
<p>Doesn&rsquo;t show the alert, but instead returns a localized message
for use in a custom UI within the sirenDidDetectNewVersionWithoutAlert() delegate method.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="k">case</span> <span class="k">none</span></code></pre>
<pre class="highlight swift"><code><span class="k">case</span> <span class="k">none</span></code></pre>
</div>
</div>
@@ -200,8 +215,8 @@
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2017-03-04)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
@@ -1,59 +1,85 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>SirenVersionCheckType Enum Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<title>VersionCheckType Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
<meta charset='utf-8'>
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
<script src="../../js/jquery.min.js" defer></script>
<script src="../../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/SirenVersionCheckType" class="dashAnchor"></a>
<a title="SirenVersionCheckType Enum Reference"></a>
<a name="//apple_ref/swift/Enum/VersionCheckType" class="dashAnchor"></a>
<a title="VersionCheckType Enumeration Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">Siren Docs</a> (100% documented)</p>
<p><a href="../../index.html">Siren Docs</a> (100% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html">Siren Reference</a>
<img id="carat" src="../img/carat.png" />
SirenVersionCheckType Enum Reference
<a href="../../index.html">Siren Reference</a>
<img id="carat" src="../../img/carat.png" />
VersionCheckType Enumeration Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<a href="../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes/Siren.html">Siren</a>
<a href="../../Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Enums.html">Enums</a>
<a href="../../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Enums/SirenAlertType.html">SirenAlertType</a>
</li>
<li class="nav-group-task">
<a href="../Enums/SirenLanguageType.html">SirenLanguageType</a>
</li>
<li class="nav-group-task">
<a href="../Enums/SirenVersionCheckType.html">SirenVersionCheckType</a>
<a href="../../Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Protocols.html">Protocols</a>
<a href="../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Protocols/SirenDelegate.html">SirenDelegate</a>
<a href="../../Protocols/SirenDelegate.html">SirenDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
@@ -62,14 +88,14 @@
<article class="main-content">
<section>
<section class="section">
<h1>SirenVersionCheckType</h1>
<h1>VersionCheckType</h1>
<div class="declaration">
<div class="language">
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SirenVersionCheckType</span><span class="p">:</span> <span class="kt">Int</span></code></pre>
<pre class="highlight swift"><code><span class="kd">enum</span> <span class="kt">VersionCheckType</span> <span class="p">:</span> <span class="kt">Int</span></code></pre>
</div>
</div>
<p>Determines the frequency in which the the version check is performed.</p>
<p>Determines the frequency in which the the version check is performed and the user is prompted to update the app.</p>
</section>
<section class="section task-group-section">
@@ -78,9 +104,9 @@
<li class="item">
<div>
<code>
<a name="/s:FO5Siren21SirenVersionCheckType11immediatelyFMS0_S0_"></a>
<a name="/s:5SirenAAC16VersionCheckTypeO11immediatelyyA2DmF"></a>
<a name="//apple_ref/swift/Element/immediately" class="dashAnchor"></a>
<a class="token" href="#/s:FO5Siren21SirenVersionCheckType11immediatelyFMS0_S0_">immediately</a>
<a class="token" href="#/s:5SirenAAC16VersionCheckTypeO11immediatelyyA2DmF">immediately</a>
</code>
</div>
<div class="height-container">
@@ -95,23 +121,19 @@
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="k">case</span> <span class="n">immediately</span> <span class="o">=</span> <span class="mi">0</span></code></pre>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">immediately</span> <span class="o">=</span> <span class="mi">0</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:FO5Siren21SirenVersionCheckType5dailyFMS0_S0_"></a>
<a name="/s:5SirenAAC16VersionCheckTypeO5dailyyA2DmF"></a>
<a name="//apple_ref/swift/Element/daily" class="dashAnchor"></a>
<a class="token" href="#/s:FO5Siren21SirenVersionCheckType5dailyFMS0_S0_">daily</a>
<a class="token" href="#/s:5SirenAAC16VersionCheckTypeO5dailyyA2DmF">daily</a>
</code>
</div>
<div class="height-container">
@@ -126,23 +148,19 @@
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="k">case</span> <span class="n">daily</span> <span class="o">=</span> <span class="mi">1</span></code></pre>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">daily</span> <span class="o">=</span> <span class="mi">1</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:FO5Siren21SirenVersionCheckType6weeklyFMS0_S0_"></a>
<a name="/s:5SirenAAC16VersionCheckTypeO6weeklyyA2DmF"></a>
<a name="//apple_ref/swift/Element/weekly" class="dashAnchor"></a>
<a class="token" href="#/s:FO5Siren21SirenVersionCheckType6weeklyFMS0_S0_">weekly</a>
<a class="token" href="#/s:5SirenAAC16VersionCheckTypeO6weeklyyA2DmF">weekly</a>
</code>
</div>
<div class="height-container">
@@ -157,7 +175,7 @@
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="k">case</span> <span class="n">weekly</span> <span class="o">=</span> <span class="mi">7</span></code></pre>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">weekly</span> <span class="o">=</span> <span class="mi">7</span></code></pre>
</div>
</div>
@@ -169,8 +187,8 @@
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2017-03-04)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Enums Reference</title>
<title>Enumerations Reference</title>
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
<meta charset='utf-8'>
@@ -10,7 +10,8 @@
</head>
<body>
<a title="Enums Reference"></a>
<a name="//apple_ref/swift/Section/Enumerations" class="dashAnchor"></a>
<a title="Enumerations Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="index.html">Siren Docs</a> (100% documented)</p>
@@ -20,7 +21,7 @@
<p id="breadcrumbs">
<a href="index.html">Siren Reference</a>
<img id="carat" src="img/carat.png" />
Enums Reference
Enumerations Reference
</p>
</div>
<div class="content-wrapper">
@@ -32,19 +33,22 @@
<li class="nav-group-task">
<a href="Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="Enums.html">Enums</a>
<a href="Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Enums/SirenAlertType.html">SirenAlertType</a>
</li>
<li class="nav-group-task">
<a href="Enums/SirenLanguageType.html">SirenLanguageType</a>
</li>
<li class="nav-group-task">
<a href="Enums/SirenVersionCheckType.html">SirenVersionCheckType</a>
<a href="Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
@@ -56,31 +60,47 @@
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>Enums</h1>
<p>The following enums are available globally.</p>
<h1>Enumerations</h1>
<p>The following enumerations are available globally.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<div class="task-name-container">
<a name="/SirenDelegate%20Protocol%20Extension"></a>
<a name="//apple_ref/swift/Section/SirenDelegate Protocol Extension" class="dashAnchor"></a>
<a href="#/SirenDelegate%20Protocol%20Extension">
<h3 class="section-name">SirenDelegate Protocol Extension</h3>
</a>
</div>
<ul>
<li class="item">
<div>
<code>
<a name="/s:O5Siren14SirenAlertType"></a>
<a name="//apple_ref/swift/Enum/SirenAlertType" class="dashAnchor"></a>
<a class="token" href="#/s:O5Siren14SirenAlertType">SirenAlertType</a>
<a name="/s:5Siren10UpdateTypeO"></a>
<a name="//apple_ref/swift/Enum/UpdateType" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren10UpdateTypeO">UpdateType</a>
</code>
</div>
<div class="height-container">
@@ -88,74 +108,26 @@
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Determines the type of alert to present after a successful version check has been performed.</p>
<p>MARK - Siren UpdateType
<code>UpdateType</code> defines what kind of update is available.
It is used as parameter if user wants to use
custom alert to inform the user about an update.</p>
<a href="Enums/SirenAlertType.html" class="slightly-smaller">See more</a>
<ul>
<li>major: Major release available: A.b.c.d</li>
<li>minor: Minor release available: a.B.c.d</li>
<li>patch: Patch release available: a.b.C.d</li>
<li>revision: Revision release available: a.b.c.D</li>
<li>unknown: No information available about the update.</li>
</ul>
<a href="Enums/UpdateType.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SirenAlertType</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:O5Siren21SirenVersionCheckType"></a>
<a name="//apple_ref/swift/Enum/SirenVersionCheckType" class="dashAnchor"></a>
<a class="token" href="#/s:O5Siren21SirenVersionCheckType">SirenVersionCheckType</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Determines the frequency in which the the version check is performed.</p>
<a href="Enums/SirenVersionCheckType.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SirenVersionCheckType</span><span class="p">:</span> <span class="kt">Int</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:O5Siren17SirenLanguageType"></a>
<a name="//apple_ref/swift/Enum/SirenLanguageType" class="dashAnchor"></a>
<a class="token" href="#/s:O5Siren17SirenLanguageType">SirenLanguageType</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Determines the available languages in which the update message and alert button titles should appear.</p>
<p>By default, the operating system&rsquo;s default lanuage setting is used. However, you can force a specific language
by setting the forceLanguageLocalization property before calling checkVersion()</p>
<a href="Enums/SirenLanguageType.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SirenLanguageType</span><span class="p">:</span> <span class="kt">String</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">UpdateType</span> <span class="p">:</span> <span class="kt">String</span></code></pre>
</div>
</div>
@@ -167,8 +139,8 @@ by setting the forceLanguageLocalization property before calling checkVersion()<
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2017-03-04)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
@@ -0,0 +1,262 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>UpdateType Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset='utf-8'>
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/UpdateType" class="dashAnchor"></a>
<a title="UpdateType Enumeration Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">Siren Docs</a> (100% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html">Siren Reference</a>
<img id="carat" src="../img/carat.png" />
UpdateType Enumeration Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Protocols/SirenDelegate.html">SirenDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>UpdateType</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">UpdateType</span> <span class="p">:</span> <span class="kt">String</span></code></pre>
</div>
</div>
<p>MARK - Siren UpdateType
<code>UpdateType</code> defines what kind of update is available.
It is used as parameter if user wants to use
custom alert to inform the user about an update.</p>
<ul>
<li>major: Major release available: A.b.c.d</li>
<li>minor: Minor release available: a.B.c.d</li>
<li>patch: Patch release available: a.b.C.d</li>
<li>revision: Revision release available: a.b.c.D</li>
<li>unknown: No information available about the update.</li>
</ul>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:5Siren10UpdateTypeO5majoryA2CmF"></a>
<a name="//apple_ref/swift/Element/major" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren10UpdateTypeO5majoryA2CmF">major</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Major release available: A.b.c.d</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">major</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren10UpdateTypeO5minoryA2CmF"></a>
<a name="//apple_ref/swift/Element/minor" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren10UpdateTypeO5minoryA2CmF">minor</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Minor release available: a.B.c.d</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">minor</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren10UpdateTypeO5patchyA2CmF"></a>
<a name="//apple_ref/swift/Element/patch" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren10UpdateTypeO5patchyA2CmF">patch</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Patch release available: a.b.C.d</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">patch</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren10UpdateTypeO8revisionyA2CmF"></a>
<a name="//apple_ref/swift/Element/revision" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren10UpdateTypeO8revisionyA2CmF">revision</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Revision release available: a.b.c.D</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">revision</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren10UpdateTypeO7unknownyA2CmF"></a>
<a name="//apple_ref/swift/Element/unknown" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren10UpdateTypeO7unknownyA2CmF">unknown</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>No information available about the update.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">unknown</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
@@ -10,6 +10,7 @@
</head>
<body>
<a name="//apple_ref/swift/Section/Protocols" class="dashAnchor"></a>
<a title="Protocols Reference"></a>
<header>
<div class="content-wrapper">
@@ -32,19 +33,22 @@
<li class="nav-group-task">
<a href="Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="Enums.html">Enums</a>
<a href="Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Enums/SirenAlertType.html">SirenAlertType</a>
</li>
<li class="nav-group-task">
<a href="Enums/SirenLanguageType.html">SirenLanguageType</a>
</li>
<li class="nav-group-task">
<a href="Enums/SirenVersionCheckType.html">SirenVersionCheckType</a>
<a href="Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
@@ -56,6 +60,29 @@
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
@@ -78,9 +105,9 @@
<li class="item">
<div>
<code>
<a name="/s:P5Siren13SirenDelegate"></a>
<a name="/s:5Siren0A8DelegateP"></a>
<a name="//apple_ref/swift/Protocol/SirenDelegate" class="dashAnchor"></a>
<a class="token" href="#/s:P5Siren13SirenDelegate">SirenDelegate</a>
<a class="token" href="#/s:5Siren0A8DelegateP">SirenDelegate</a>
</code>
</div>
<div class="height-container">
@@ -96,7 +123,7 @@
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SirenDelegate</span><span class="p">:</span> <span class="kd">class</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SirenDelegate</span> <span class="p">:</span> <span class="kt">NSObjectProtocol</span></code></pre>
</div>
</div>
@@ -108,8 +135,8 @@
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2017-03-04)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
@@ -33,19 +33,22 @@
<li class="nav-group-task">
<a href="../Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Enums.html">Enums</a>
<a href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Enums/SirenAlertType.html">SirenAlertType</a>
</li>
<li class="nav-group-task">
<a href="../Enums/SirenLanguageType.html">SirenLanguageType</a>
</li>
<li class="nav-group-task">
<a href="../Enums/SirenVersionCheckType.html">SirenVersionCheckType</a>
<a href="../Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
@@ -57,6 +60,29 @@
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
@@ -65,7 +91,7 @@
<h1>SirenDelegate</h1>
<div class="declaration">
<div class="language">
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SirenDelegate</span><span class="p">:</span> <span class="kd">class</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SirenDelegate</span> <span class="p">:</span> <span class="kt">NSObjectProtocol</span></code></pre>
</div>
</div>
@@ -78,9 +104,9 @@
<li class="item">
<div>
<code>
<a name="/s:FP5Siren13SirenDelegate24sirenDidShowUpdateDialogFT9alertTypeOS_14SirenAlertType_T_"></a>
<a name="//apple_ref/swift/Method/sirenDidShowUpdateDialog(alertType:)" class="dashAnchor"></a>
<a class="token" href="#/s:FP5Siren13SirenDelegate24sirenDidShowUpdateDialogFT9alertTypeOS_14SirenAlertType_T_">sirenDidShowUpdateDialog(alertType:)</a>
<a name="/s:5Siren0A8DelegateP36sirenDidDetectNewVersionWithoutAlert5title7message10updateTypeySS_SSAA06UpdateM0OtF"></a>
<a name="//apple_ref/swift/Method/sirenDidDetectNewVersionWithoutAlert(title:message:updateType:)" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A8DelegateP36sirenDidDetectNewVersionWithoutAlert5title7message10updateTypeySS_SSAA06UpdateM0OtF">sirenDidDetectNewVersionWithoutAlert(title:message:updateType:)</a>
</code>
<span class="declaration-note">
Default implementation
@@ -91,7 +117,7 @@
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>User presented with update dialog</p>
<p>Siren performed a version check and did not display an alert.</p>
</div>
<h4>Default Implementation</h4>
@@ -102,7 +128,7 @@
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">sirenDidShowUpdateDialog</span><span class="p">(</span><span class="nv">alertType</span><span class="p">:</span> <span class="kt"><a href="../Enums/SirenAlertType.html">SirenAlertType</a></span><span class="p">)</span></code></pre>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">sirenDidDetectNewVersionWithoutAlert</span><span class="p">(</span><span class="nv">title</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">message</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">updateType</span><span class="p">:</span> <span class="kt"><a href="../Enums/UpdateType.html">UpdateType</a></span><span class="p">)</span></code></pre>
</div>
</div>
@@ -112,111 +138,9 @@
<li class="item">
<div>
<code>
<a name="/s:FP5Siren13SirenDelegate26sirenUserDidLaunchAppStoreFT_T_"></a>
<a name="//apple_ref/swift/Method/sirenUserDidLaunchAppStore()" class="dashAnchor"></a>
<a class="token" href="#/s:FP5Siren13SirenDelegate26sirenUserDidLaunchAppStoreFT_T_">sirenUserDidLaunchAppStore()</a>
</code>
<span class="declaration-note">
Default implementation
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>User did click on button that launched App Store.app</p>
</div>
<h4>Default Implementation</h4>
<div class="default_impl abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">sirenUserDidLaunchAppStore</span><span class="p">()</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:FP5Siren13SirenDelegate23sirenUserDidSkipVersionFT_T_"></a>
<a name="//apple_ref/swift/Method/sirenUserDidSkipVersion()" class="dashAnchor"></a>
<a class="token" href="#/s:FP5Siren13SirenDelegate23sirenUserDidSkipVersionFT_T_">sirenUserDidSkipVersion()</a>
</code>
<span class="declaration-note">
Default implementation
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>User did click on button that skips version update</p>
</div>
<h4>Default Implementation</h4>
<div class="default_impl abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">sirenUserDidSkipVersion</span><span class="p">()</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:FP5Siren13SirenDelegate18sirenUserDidCancelFT_T_"></a>
<a name="//apple_ref/swift/Method/sirenUserDidCancel()" class="dashAnchor"></a>
<a class="token" href="#/s:FP5Siren13SirenDelegate18sirenUserDidCancelFT_T_">sirenUserDidCancel()</a>
</code>
<span class="declaration-note">
Default implementation
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>User did click on button that cancels update dialog</p>
</div>
<h4>Default Implementation</h4>
<div class="default_impl abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">sirenUserDidCancel</span><span class="p">()</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:FP5Siren13SirenDelegate24sirenDidFailVersionCheckFT5errorCSo7NSError_T_"></a>
<a name="/s:5Siren0A8DelegateP24sirenDidFailVersionCheck5errorys5Error_p_tF"></a>
<a name="//apple_ref/swift/Method/sirenDidFailVersionCheck(error:)" class="dashAnchor"></a>
<a class="token" href="#/s:FP5Siren13SirenDelegate24sirenDidFailVersionCheckFT5errorCSo7NSError_T_">sirenDidFailVersionCheck(error:)</a>
<a class="token" href="#/s:5Siren0A8DelegateP24sirenDidFailVersionCheck5errorys5Error_p_tF">sirenDidFailVersionCheck(error:)</a>
</code>
<span class="declaration-note">
Default implementation
@@ -227,7 +151,13 @@
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Siren failed to perform version check (may return system-level error)</p>
<p>Siren failed to perform version check.</p>
<div class="aside aside-note">
<p class="aside-title">Note</p>
Depending on the reason for failure,
a system-level error may be returned.
</div>
</div>
<h4>Default Implementation</h4>
@@ -238,7 +168,7 @@
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">sirenDidFailVersionCheck</span><span class="p">(</span><span class="nv">error</span><span class="p">:</span> <span class="kt">NSError</span><span class="p">)</span></code></pre>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">sirenDidFailVersionCheck</span><span class="p">(</span><span class="nv">error</span><span class="p">:</span> <span class="kt">Error</span><span class="p">)</span></code></pre>
</div>
</div>
@@ -248,9 +178,9 @@
<li class="item">
<div>
<code>
<a name="/s:FP5Siren13SirenDelegate36sirenDidDetectNewVersionWithoutAlertFT7messageSS_T_"></a>
<a name="//apple_ref/swift/Method/sirenDidDetectNewVersionWithoutAlert(message:)" class="dashAnchor"></a>
<a class="token" href="#/s:FP5Siren13SirenDelegate36sirenDidDetectNewVersionWithoutAlertFT7messageSS_T_">sirenDidDetectNewVersionWithoutAlert(message:)</a>
<a name="/s:5Siren0A8DelegateP24sirenDidShowUpdateDialog9alertTypeyA2AC05AlertI0O_tF"></a>
<a name="//apple_ref/swift/Method/sirenDidShowUpdateDialog(alertType:)" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A8DelegateP24sirenDidShowUpdateDialog9alertTypeyA2AC05AlertI0O_tF">sirenDidShowUpdateDialog(alertType:)</a>
</code>
<span class="declaration-note">
Default implementation
@@ -261,7 +191,7 @@
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Siren performed version check and did not display alert</p>
<p>User presented with an update dialog.</p>
</div>
<h4>Default Implementation</h4>
@@ -272,19 +202,38 @@
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">sirenDidDetectNewVersionWithoutAlert</span><span class="p">(</span><span class="nv">message</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">sirenDidShowUpdateDialog</span><span class="p">(</span><span class="nv">alertType</span><span class="p">:</span> <span class="kt"><a href="../Classes/Siren.html">Siren</a></span><span class="o">.</span><span class="kt">AlertType</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>alertType</em>
</code>
</td>
<td>
<div>
<p>The type of alert that was presented.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:FP5Siren13SirenDelegate27sirenLatestVersionInstalledFT_T_"></a>
<a name="/s:5Siren0A8DelegateP27sirenLatestVersionInstalledyyF"></a>
<a name="//apple_ref/swift/Method/sirenLatestVersionInstalled()" class="dashAnchor"></a>
<a class="token" href="#/s:FP5Siren13SirenDelegate27sirenLatestVersionInstalledFT_T_">sirenLatestVersionInstalled()</a>
<a class="token" href="#/s:5Siren0A8DelegateP27sirenLatestVersionInstalledyyF">sirenLatestVersionInstalled()</a>
</code>
<span class="declaration-note">
Default implementation
@@ -295,7 +244,7 @@
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Siren performed version check and latest version is installed</p>
<p>Siren performed a version check and the latest version was already installed.</p>
</div>
<h4>Default Implementation</h4>
@@ -306,7 +255,162 @@
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">sirenLatestVersionInstalled</span><span class="p">()</span></code></pre>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">sirenLatestVersionInstalled</span><span class="p">()</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A8DelegateP50sirenNetworkCallDidReturnWithNewVersionInformation11lookupModelyAA0a6LookupM0V_tF"></a>
<a name="//apple_ref/swift/Method/sirenNetworkCallDidReturnWithNewVersionInformation(lookupModel:)" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A8DelegateP50sirenNetworkCallDidReturnWithNewVersionInformation11lookupModelyAA0a6LookupM0V_tF">sirenNetworkCallDidReturnWithNewVersionInformation(lookupModel:)</a>
</code>
<span class="declaration-note">
Default implementation
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Provides the decoded JSON information from a successful version check call.</p>
</div>
<h4>Default Implementation</h4>
<div class="default_impl abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">sirenNetworkCallDidReturnWithNewVersionInformation</span><span class="p">(</span><span class="nv">lookupModel</span><span class="p">:</span> <span class="kt"><a href="../Structs/SirenLookupModel.html">SirenLookupModel</a></span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>lookupModel</em>
</code>
</td>
<td>
<div>
<p>The <code>Decodable</code> model representing the JSON results from the iTunes Lookup API.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A8DelegateP18sirenUserDidCancelyyF"></a>
<a name="//apple_ref/swift/Method/sirenUserDidCancel()" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A8DelegateP18sirenUserDidCancelyyF">sirenUserDidCancel()</a>
</code>
<span class="declaration-note">
Default implementation
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>User did click on button that cancels update dialog.</p>
</div>
<h4>Default Implementation</h4>
<div class="default_impl abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">sirenUserDidCancel</span><span class="p">()</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A8DelegateP26sirenUserDidLaunchAppStoreyyF"></a>
<a name="//apple_ref/swift/Method/sirenUserDidLaunchAppStore()" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A8DelegateP26sirenUserDidLaunchAppStoreyyF">sirenUserDidLaunchAppStore()</a>
</code>
<span class="declaration-note">
Default implementation
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>User did click on button that launched <q>App Store.app</q>.</p>
</div>
<h4>Default Implementation</h4>
<div class="default_impl abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">sirenUserDidLaunchAppStore</span><span class="p">()</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A8DelegateP23sirenUserDidSkipVersionyyF"></a>
<a name="//apple_ref/swift/Method/sirenUserDidSkipVersion()" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A8DelegateP23sirenUserDidSkipVersionyyF">sirenUserDidSkipVersion()</a>
</code>
<span class="declaration-note">
Default implementation
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>User did click on button that skips version update.</p>
</div>
<h4>Default Implementation</h4>
<div class="default_impl abstract">
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">sirenUserDidSkipVersion</span><span class="p">()</span></code></pre>
</div>
</div>
@@ -318,8 +422,8 @@
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2017-03-04)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
@@ -0,0 +1,230 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Structures Reference</title>
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
<meta charset='utf-8'>
<script src="js/jquery.min.js" defer></script>
<script src="js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Section/Structures" class="dashAnchor"></a>
<a title="Structures Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="index.html">Siren Docs</a> (100% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="index.html">Siren Reference</a>
<img id="carat" src="img/carat.png" />
Structures Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Protocols/SirenDelegate.html">SirenDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>Structures</h1>
<p>The following structures are available globally.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<div class="task-name-container">
<a name="/Siren%20Alert%20Messaging%20Customization"></a>
<a name="//apple_ref/swift/Section/Siren Alert Messaging Customization" class="dashAnchor"></a>
<a href="#/Siren%20Alert%20Messaging%20Customization">
<h3 class="section-name">Siren Alert Messaging Customization</h3>
</a>
</div>
<ul>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A14AlertMessagingV"></a>
<a name="//apple_ref/swift/Struct/SirenAlertMessaging" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A14AlertMessagingV">SirenAlertMessaging</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Allows the overriding of all the <code>UIAlertController</code> and <code>UIActionSheet</code> Strings to which Siren defaults.</p>
<div class="aside aside-warning">
<p class="aside-title">Warning</p>
Overriding any of these keys will result in the loss of the built-in internationalization that Siren provides.
</div>
<p>As <code>SirenAlertMessaging</code> is a Struct, one <em>or</em> more keys can be modified. Overriding only one string will result in the other keys retaining their default (and internationalizable) values.</p>
<a href="Structs/SirenAlertMessaging.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SirenAlertMessaging</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/Model%20representing%20a%20selection%20of%20results%20from%20the%20iTunes%20Lookup%20API"></a>
<a name="//apple_ref/swift/Section/Model representing a selection of results from the iTunes Lookup API" class="dashAnchor"></a>
<a href="#/Model%20representing%20a%20selection%20of%20results%20from%20the%20iTunes%20Lookup%20API">
<h3 class="section-name">Model representing a selection of results from the iTunes Lookup API</h3>
</a>
</div>
<ul>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A11LookupModelV"></a>
<a name="//apple_ref/swift/Struct/SirenLookupModel" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A11LookupModelV">SirenLookupModel</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>MARK: Siren extension used to parse and map the iTunes JSON results into a model represented in Swift.</p>
<a href="Structs/SirenLookupModel.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SirenLookupModel</span> <span class="p">:</span> <span class="kt">Decodable</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/Siren%20Error%20Handling"></a>
<a name="//apple_ref/swift/Section/Siren Error Handling" class="dashAnchor"></a>
<a href="#/Siren%20Error%20Handling">
<h3 class="section-name">Siren Error Handling</h3>
</a>
</div>
<ul>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A5ErrorV"></a>
<a name="//apple_ref/swift/Struct/SirenError" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A5ErrorV">SirenError</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Data structure used to build Siren specific Errors.</p>
<a href="Structs/SirenError.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SirenError</span> <span class="p">:</span> <span class="kt">LocalizedError</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
@@ -0,0 +1,249 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>SirenAlertMessaging Structure Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset='utf-8'>
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Struct/SirenAlertMessaging" class="dashAnchor"></a>
<a title="SirenAlertMessaging Structure Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">Siren Docs</a> (100% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html">Siren Reference</a>
<img id="carat" src="../img/carat.png" />
SirenAlertMessaging Structure Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Protocols/SirenDelegate.html">SirenDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>SirenAlertMessaging</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SirenAlertMessaging</span></code></pre>
</div>
</div>
<p>Allows the overriding of all the <code>UIAlertController</code> and <code>UIActionSheet</code> Strings to which Siren defaults.</p>
<div class="aside aside-warning">
<p class="aside-title">Warning</p>
Overriding any of these keys will result in the loss of the built-in internationalization that Siren provides.
</div>
<p>As <code>SirenAlertMessaging</code> is a Struct, one <em>or</em> more keys can be modified. Overriding only one string will result in the other keys retaining their default (and internationalizable) values.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A14AlertMessagingV9ConstantsV"></a>
<a name="//apple_ref/swift/Struct/Constants" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A14AlertMessagingV9ConstantsV">Constants</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The default constants used for the alert messaging.</p>
<a href="../Structs/SirenAlertMessaging/Constants.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Constants</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A14AlertMessagingV11updateTitle0D7Message0d6ButtonF008nextTimegF0011skipVersiongF0ACSo18NSAttributedStringC_A4Jtcfc"></a>
<a name="//apple_ref/swift/Method/init(updateTitle:updateMessage:updateButtonMessage:nextTimeButtonMessage:skipVersionButtonMessage:)" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A14AlertMessagingV11updateTitle0D7Message0d6ButtonF008nextTimegF0011skipVersiongF0ACSo18NSAttributedStringC_A4Jtcfc">init(updateTitle:updateMessage:updateButtonMessage:nextTimeButtonMessage:skipVersionButtonMessage:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The public initializer</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">updateTitle</span> <span class="nv">title</span><span class="p">:</span> <span class="kt">NSAttributedString</span> <span class="o">=</span> <span class="kt"><a href="../Structs/SirenAlertMessaging/Constants.html">Constants</a></span><span class="o">.</span><span class="n">updateTitle</span><span class="p">,</span>
<span class="n">updateMessage</span> <span class="nv">message</span><span class="p">:</span> <span class="kt">NSAttributedString</span> <span class="o">=</span> <span class="kt"><a href="../Structs/SirenAlertMessaging/Constants.html">Constants</a></span><span class="o">.</span><span class="n">updateMessage</span><span class="p">,</span>
<span class="nv">updateButtonMessage</span><span class="p">:</span> <span class="kt">NSAttributedString</span> <span class="o">=</span> <span class="kt"><a href="../Structs/SirenAlertMessaging/Constants.html">Constants</a></span><span class="o">.</span><span class="n">updateNow</span><span class="p">,</span>
<span class="nv">nextTimeButtonMessage</span><span class="p">:</span> <span class="kt">NSAttributedString</span> <span class="o">=</span> <span class="kt"><a href="../Structs/SirenAlertMessaging/Constants.html">Constants</a></span><span class="o">.</span><span class="n">nextTime</span><span class="p">,</span>
<span class="nv">skipVersionButtonMessage</span><span class="p">:</span> <span class="kt">NSAttributedString</span> <span class="o">=</span> <span class="kt"><a href="../Structs/SirenAlertMessaging/Constants.html">Constants</a></span><span class="o">.</span><span class="n">skipVersion</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>title</em>
</code>
</td>
<td>
<div>
<p>The title field of the <code>UIAlertController</code>.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>message</em>
</code>
</td>
<td>
<div>
<p>The <code>message</code> field of the <code>UIAlertController</code>.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>updateButtonMessage</em>
</code>
</td>
<td>
<div>
<p>The <code>title</code> field of the Update Button <code>UIAlertAction</code>.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>nextTimeButtonMessage</em>
</code>
</td>
<td>
<div>
<p>The <code>title</code> field of the Next Time Button <code>UIAlertAction</code>.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>skipVersionButtonMessage</em>
</code>
</td>
<td>
<div>
<p>The <code>title</code> field of the Skip Button <code>UIAlertAction</code>.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
@@ -0,0 +1,251 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Constants Structure Reference</title>
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
<meta charset='utf-8'>
<script src="../../js/jquery.min.js" defer></script>
<script src="../../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Struct/Constants" class="dashAnchor"></a>
<a title="Constants Structure Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../../index.html">Siren Docs</a> (100% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../../index.html">Siren Reference</a>
<img id="carat" src="../../img/carat.png" />
Constants Structure Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Protocols/SirenDelegate.html">SirenDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>Constants</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Constants</span></code></pre>
</div>
</div>
<p>The default constants used for the alert messaging.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A14AlertMessagingV9ConstantsV8nextTimeSo18NSAttributedStringCvpZ"></a>
<a name="//apple_ref/swift/Variable/nextTime" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A14AlertMessagingV9ConstantsV8nextTimeSo18NSAttributedStringCvpZ">nextTime</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The button text that conveys the message that the user should be prompted to update next time the app launches.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">nextTime</span><span class="p">:</span> <span class="kt">NSAttributedString</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A14AlertMessagingV9ConstantsV11skipVersionSo18NSAttributedStringCvpZ"></a>
<a name="//apple_ref/swift/Variable/skipVersion" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A14AlertMessagingV9ConstantsV11skipVersionSo18NSAttributedStringCvpZ">skipVersion</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The text that conveys the message that the the user wants to skip this verison update.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">skipVersion</span><span class="p">:</span> <span class="kt">NSAttributedString</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A14AlertMessagingV9ConstantsV13updateMessageSo18NSAttributedStringCvpZ"></a>
<a name="//apple_ref/swift/Variable/updateMessage" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A14AlertMessagingV9ConstantsV13updateMessageSo18NSAttributedStringCvpZ">updateMessage</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The text that conveys the message that there is an app update available</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">updateMessage</span><span class="p">:</span> <span class="kt">NSAttributedString</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A14AlertMessagingV9ConstantsV11updateTitleSo18NSAttributedStringCvpZ"></a>
<a name="//apple_ref/swift/Variable/updateTitle" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A14AlertMessagingV9ConstantsV11updateTitleSo18NSAttributedStringCvpZ">updateTitle</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The alert title which defaults to <em>Update Available</em>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">updateTitle</span><span class="p">:</span> <span class="kt">NSAttributedString</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A14AlertMessagingV9ConstantsV9updateNowSo18NSAttributedStringCvpZ"></a>
<a name="//apple_ref/swift/Variable/updateNow" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A14AlertMessagingV9ConstantsV9updateNowSo18NSAttributedStringCvpZ">updateNow</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The button text that conveys the message that the user would like to update the app right away.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">updateNow</span><span class="p">:</span> <span class="kt">NSAttributedString</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
@@ -0,0 +1,157 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>SirenError Structure Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset='utf-8'>
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Struct/SirenError" class="dashAnchor"></a>
<a title="SirenError Structure Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">Siren Docs</a> (100% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html">Siren Reference</a>
<img id="carat" src="../img/carat.png" />
SirenError Structure Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Protocols/SirenDelegate.html">SirenDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>SirenError</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SirenError</span> <span class="p">:</span> <span class="kt">LocalizedError</span></code></pre>
</div>
</div>
<p>Data structure used to build Siren specific Errors.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A5ErrorV5KnownO"></a>
<a name="//apple_ref/swift/Enum/Known" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A5ErrorV5KnownO">Known</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Enumerates all potentials errors that Siren can handle.</p>
<ul>
<li>appStoreAppIDFailure: Error retrieving trackId as the JSON does not contain a &lsquo;trackId&rsquo; key.</li>
<li>appStoreDataRetrievalFailure: Error retrieving App Store data as an error was returned.</li>
<li>appStoreJSONParsingFailure: Error parsing App Store JSON data.</li>
<li>appStoreDataRetrievalEmptyResults: Error retrieving App Store data as JSON results were empty. Is your app available in the US? If not, change the <code>countryCode</code> variable to fix this error.</li>
<li>appStoreOSVersionNumberFailure: Error retrieving iOS version number as there was no data returned.</li>
<li>appStoreOSVersionUnsupported: The version of iOS on the device is lower than that of the one required by the app verison update.</li>
<li>appStoreVersionArrayFailure: Error retrieving App Store verson number as the JSON does not contain a &lsquo;version&rsquo; key.</li>
<li>malformedURL: The iTunes URL is malformed. Please leave an issue on <a href="https://github.com/ArtSabintsev/Siren">https://github.com/ArtSabintsev/Siren</a> with as many details as possible.</li>
<li>noUpdateAvailable: No new update available.</li>
<li>recentlyCheckedAlready: Not checking the version, because it was already checked recently.</li>
</ul>
<a href="../Structs/SirenError/Known.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">Known</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
@@ -0,0 +1,399 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Known Enumeration Reference</title>
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
<meta charset='utf-8'>
<script src="../../js/jquery.min.js" defer></script>
<script src="../../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Enum/Known" class="dashAnchor"></a>
<a title="Known Enumeration Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../../index.html">Siren Docs</a> (100% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../../index.html">Siren Reference</a>
<img id="carat" src="../../img/carat.png" />
Known Enumeration Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Protocols/SirenDelegate.html">SirenDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>Known</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">Known</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
</div>
</div>
<p>Enumerates all potentials errors that Siren can handle.</p>
<ul>
<li>appStoreAppIDFailure: Error retrieving trackId as the JSON does not contain a &lsquo;trackId&rsquo; key.</li>
<li>appStoreDataRetrievalFailure: Error retrieving App Store data as an error was returned.</li>
<li>appStoreJSONParsingFailure: Error parsing App Store JSON data.</li>
<li>appStoreDataRetrievalEmptyResults: Error retrieving App Store data as JSON results were empty. Is your app available in the US? If not, change the <code>countryCode</code> variable to fix this error.</li>
<li>appStoreOSVersionNumberFailure: Error retrieving iOS version number as there was no data returned.</li>
<li>appStoreOSVersionUnsupported: The version of iOS on the device is lower than that of the one required by the app verison update.</li>
<li>appStoreVersionArrayFailure: Error retrieving App Store verson number as the JSON does not contain a &lsquo;version&rsquo; key.</li>
<li>malformedURL: The iTunes URL is malformed. Please leave an issue on <a href="https://github.com/ArtSabintsev/Siren">https://github.com/ArtSabintsev/Siren</a> with as many details as possible.</li>
<li>noUpdateAvailable: No new update available.</li>
<li>recentlyCheckedAlready: Not checking the version, because it was already checked recently.</li>
</ul>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A5ErrorV5KnownO20appStoreAppIDFailureyA2EmF"></a>
<a name="//apple_ref/swift/Element/appStoreAppIDFailure" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A5ErrorV5KnownO20appStoreAppIDFailureyA2EmF">appStoreAppIDFailure</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Error retrieving trackId as the JSON does not contain a &lsquo;trackId&rsquo; key.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">appStoreAppIDFailure</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A5ErrorV5KnownO28appStoreDataRetrievalFailureyAEs0B0_pSg_tcAEmF"></a>
<a name="//apple_ref/swift/Element/appStoreDataRetrievalFailure(underlyingError:)" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A5ErrorV5KnownO28appStoreDataRetrievalFailureyAEs0B0_pSg_tcAEmF">appStoreDataRetrievalFailure(underlyingError:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Error retrieving App Store data as an error was returned.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">appStoreDataRetrievalFailure</span><span class="p">(</span><span class="nv">underlyingError</span><span class="p">:</span> <span class="kt">Error</span><span class="p">?)</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A5ErrorV5KnownO26appStoreJSONParsingFailureyAEs0B0_p_tcAEmF"></a>
<a name="//apple_ref/swift/Element/appStoreJSONParsingFailure(underlyingError:)" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A5ErrorV5KnownO26appStoreJSONParsingFailureyAEs0B0_p_tcAEmF">appStoreJSONParsingFailure(underlyingError:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Error parsing App Store JSON data.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">appStoreJSONParsingFailure</span><span class="p">(</span><span class="nv">underlyingError</span><span class="p">:</span> <span class="kt">Error</span><span class="p">)</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A5ErrorV5KnownO33appStoreDataRetrievalEmptyResultsyA2EmF"></a>
<a name="//apple_ref/swift/Element/appStoreDataRetrievalEmptyResults" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A5ErrorV5KnownO33appStoreDataRetrievalEmptyResultsyA2EmF">appStoreDataRetrievalEmptyResults</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Error retrieving App Store data as JSON results were empty. Is your app available in the US? If not, change the <code>countryCode</code> variable to fix this error.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">appStoreDataRetrievalEmptyResults</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A5ErrorV5KnownO30appStoreOSVersionNumberFailureyA2EmF"></a>
<a name="//apple_ref/swift/Element/appStoreOSVersionNumberFailure" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A5ErrorV5KnownO30appStoreOSVersionNumberFailureyA2EmF">appStoreOSVersionNumberFailure</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Error retrieving iOS version number as there was no data returned.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">appStoreOSVersionNumberFailure</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A5ErrorV5KnownO28appStoreOSVersionUnsupportedyA2EmF"></a>
<a name="//apple_ref/swift/Element/appStoreOSVersionUnsupported" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A5ErrorV5KnownO28appStoreOSVersionUnsupportedyA2EmF">appStoreOSVersionUnsupported</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The version of iOS on the device is lower than that of the one required by the app verison update.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">appStoreOSVersionUnsupported</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A5ErrorV5KnownO27appStoreVersionArrayFailureyA2EmF"></a>
<a name="//apple_ref/swift/Element/appStoreVersionArrayFailure" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A5ErrorV5KnownO27appStoreVersionArrayFailureyA2EmF">appStoreVersionArrayFailure</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Error retrieving App Store verson number as the JSON does not contain a &lsquo;version&rsquo; key.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">appStoreVersionArrayFailure</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A5ErrorV5KnownO12malformedURLyA2EmF"></a>
<a name="//apple_ref/swift/Element/malformedURL" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A5ErrorV5KnownO12malformedURLyA2EmF">malformedURL</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The iTunes URL is malformed. Please leave an issue on <a href="https://github.com/ArtSabintsev/Siren">https://github.com/ArtSabintsev/Siren</a> with as many details as possible.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">malformedURL</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A5ErrorV5KnownO17noUpdateAvailableyA2EmF"></a>
<a name="//apple_ref/swift/Element/noUpdateAvailable" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A5ErrorV5KnownO17noUpdateAvailableyA2EmF">noUpdateAvailable</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>No new update available.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">noUpdateAvailable</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A5ErrorV5KnownO22recentlyCheckedAlreadyyA2EmF"></a>
<a name="//apple_ref/swift/Element/recentlyCheckedAlready" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A5ErrorV5KnownO22recentlyCheckedAlreadyyA2EmF">recentlyCheckedAlready</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Not checking the version, because it was already checked recently.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">recentlyCheckedAlready</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
@@ -0,0 +1,171 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>SirenLookupModel Structure Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset='utf-8'>
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Struct/SirenLookupModel" class="dashAnchor"></a>
<a title="SirenLookupModel Structure Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">Siren Docs</a> (100% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html">Siren Reference</a>
<img id="carat" src="../img/carat.png" />
SirenLookupModel Structure Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="../Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Protocols/SirenDelegate.html">SirenDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>SirenLookupModel</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SirenLookupModel</span> <span class="p">:</span> <span class="kt">Decodable</span></code></pre>
</div>
</div>
<p>MARK: Siren extension used to parse and map the iTunes JSON results into a model represented in Swift.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A11LookupModelV7resultsSayAC7ResultsVGvp"></a>
<a name="//apple_ref/swift/Property/results" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A11LookupModelV7resultsSayAC7ResultsVGvp">results</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The array of results objects from the iTunes Lookup API.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">results</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/SirenLookupModel/Results.html">Results</a></span><span class="p">]</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A11LookupModelV7ResultsV"></a>
<a name="//apple_ref/swift/Struct/Results" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A11LookupModelV7ResultsV">Results</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The Results object from the the iTunes Lookup API.</p>
<a href="../Structs/SirenLookupModel/Results.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Results</span> <span class="p">:</span> <span class="kt">Decodable</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
@@ -0,0 +1,251 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Results Structure Reference</title>
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
<meta charset='utf-8'>
<script src="../../js/jquery.min.js" defer></script>
<script src="../../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Struct/Results" class="dashAnchor"></a>
<a title="Results Structure Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../../index.html">Siren Docs</a> (100% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../../index.html">Siren Reference</a>
<img id="carat" src="../../img/carat.png" />
Results Structure Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="../../Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Protocols/SirenDelegate.html">SirenDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../../Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../../Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="../../Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>Results</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Results</span> <span class="p">:</span> <span class="kt">Decodable</span></code></pre>
</div>
</div>
<p>The Results object from the the iTunes Lookup API.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A11LookupModelV7ResultsV5appIDSivp"></a>
<a name="//apple_ref/swift/Property/appID" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A11LookupModelV7ResultsV5appIDSivp">appID</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The app&rsquo;s App ID.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">appID</span><span class="p">:</span> <span class="kt">Int</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A11LookupModelV7ResultsV25currentVersionReleaseDateSSvp"></a>
<a name="//apple_ref/swift/Property/currentVersionReleaseDate" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A11LookupModelV7ResultsV25currentVersionReleaseDateSSvp">currentVersionReleaseDate</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The release date for the latest verison of the app.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">currentVersionReleaseDate</span><span class="p">:</span> <span class="kt">String</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A11LookupModelV7ResultsV16minimumOSVersionSSvp"></a>
<a name="//apple_ref/swift/Property/minimumOSVersion" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A11LookupModelV7ResultsV16minimumOSVersionSSvp">minimumOSVersion</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The minimum verison of iOS that the current verison of the app requires.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">minimumOSVersion</span><span class="p">:</span> <span class="kt">String</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A11LookupModelV7ResultsV12releaseNotesSSSgvp"></a>
<a name="//apple_ref/swift/Property/releaseNotes" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A11LookupModelV7ResultsV12releaseNotesSSSgvp">releaseNotes</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The releases notes from the latest version of the app.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">releaseNotes</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:5Siren0A11LookupModelV7ResultsV7versionSSvp"></a>
<a name="//apple_ref/swift/Property/version" class="dashAnchor"></a>
<a class="token" href="#/s:5Siren0A11LookupModelV7ResultsV7versionSSvp">version</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The latest version of the app.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">version</span><span class="p">:</span> <span class="kt">String</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
@@ -0,0 +1,28 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="136" height="20">
<linearGradient id="b" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<clipPath id="a">
<rect width="136" height="20" rx="3" fill="#fff"/>
</clipPath>
<g clip-path="url(#a)">
<path fill="#555" d="M0 0h93v20H0z"/>
<path fill="#4c1" d="M93 0h43v20H93z"/>
<path fill="url(#b)" d="M0 0h136v20H0z"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110">
<text x="475" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="830">
documentation
</text>
<text x="475" y="140" transform="scale(.1)" textLength="830">
documentation
</text>
<text x="1135" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="330">
100%
</text>
<text x="1135" y="140" transform="scale(.1)" textLength="330">
100%
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@@ -164,6 +164,11 @@ header {
padding-top: 10px; }
.main-content section .task-group-section .task-group:first-of-type .section-name {
padding-top: 15px; }
.main-content section .heading:before {
content: "";
display: block;
padding-top: 70px;
margin: -70px 0 0; }
.section {
padding: 0 25px; }
@@ -32,19 +32,22 @@
<li class="nav-group-task">
<a href="Classes/Siren.html">Siren</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/AlertType.html"> AlertType</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/VersionCheckType.html"> VersionCheckType</a>
</li>
<li class="nav-group-task">
<a href="Classes/Siren/LanguageType.html"> LanguageType</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="Enums.html">Enums</a>
<a href="Enums.html">Enumerations</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Enums/SirenAlertType.html">SirenAlertType</a>
</li>
<li class="nav-group-task">
<a href="Enums/SirenLanguageType.html">SirenLanguageType</a>
</li>
<li class="nav-group-task">
<a href="Enums/SirenVersionCheckType.html">SirenVersionCheckType</a>
<a href="Enums/UpdateType.html">UpdateType</a>
</li>
</ul>
</li>
@@ -56,32 +59,385 @@
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="Structs.html">Structures</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Structs/SirenAlertMessaging.html">SirenAlertMessaging</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenAlertMessaging/Constants.html"> Constants</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenError.html">SirenError</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenError/Known.html"> Known</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenLookupModel.html">SirenLookupModel</a>
</li>
<li class="nav-group-task">
<a href="Structs/SirenLookupModel/Results.html"> Results</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<a href='#siren' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h1 id='siren'>Siren</h1>
<a href='#notify-users-when-a-new-version-of-your-ios-app-is-available-and-prompt-them-with-the-app-store-link' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h3 id='notify-users-when-a-new-version-of-your-ios-app-is-available-and-prompt-them-with-the-app-store-link'>Notify users when a new version of your iOS app is available, and prompt them with the App Store link..</h3>
<h1 id='siren' class='heading'>Siren 🚨</h1>
<h3 id='notify-users-when-a-new-version-of-your-app-is-available-and-prompt-them-to-upgrade' class='heading'>Notify users when a new version of your app is available and prompt them to upgrade.</h3>
<p>Siren is checks a users currently installed version of your iOS app against the version that is currently available in the App Store. If a new version is available, an instance of UIAlertController can be presented to the user informing them of the newer version, and giving them the option to update the application. Alternatively, Siren can notify your app programmatically, enabling you to inform the user through alternative means, such as a custom interface.</p>
<p><a href="https://travis-ci.org/ArtSabintsev/Siren"><img src="https://travis-ci.org/ArtSabintsev/Siren.svg?branch=master" alt="Travis CI Status"></a> <img src="https://img.shields.io/badge/Swift-4.2%2C%204.1%2C%203.2%2C%203.1%202.3-orange.svg" alt="Swift Support"> <img src="https://github.com/ArtSabintsev/Siren/blob/master/docs/badge.svg" alt="Documentation"> <a href="https://cocoapods.org/pods/Siren"><img src="https://img.shields.io/cocoapods/v/Siren.svg" alt="CocoaPods"></a> <a href="https://github.com/Carthage/Carthage"><img src="https://img.shields.io/badge/carthage-compatible-4BC51D.svg?style=flat" alt="Carthage Compatible"></a> <a href="https://swift.org/package-manager/"><img src="https://img.shields.io/badge/SwiftPM-compatible-brightgreen.svg" alt="SwiftPM Compatible"></a></p>
<p>Siren is built to work with the Semantic Versioning system.
Siren is a Swift port of Harpy, an Objective-C library that achieves the same functionality.
Siren is actively maintained by Arthur Sabintsev and Aaron Brager.</p>
<a href='#installation' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h3 id='installation'>Installation</h3>
<pre class="highlight ruby"><code><span class="n">pod</span> <span class="s1">'Siren'</span>
<hr>
<h2 id='table-of-contents' class='heading'>Table of Contents</h2>
<ul>
<li><a href="https://github.com/ArtSabintsev/Siren#about">About</a></li>
<li><a href="https://github.com/ArtSabintsev/Siren#features">Features</a></li>
<li><a href="https://github.com/ArtSabintsev/Siren#screenshots">Screenshots</a></li>
<li><a href="https://github.com/ArtSabintsev/Siren#installation-instructions">Installation Instructions</a></li>
<li><a href="https://github.com/ArtSabintsev/Siren#example-code">Example Code</a></li>
<li><a href="https://github.com/ArtSabintsev/Siren#granular-version-update-management">Granular/Differentiated Version Management</a></li>
<li><a href="https://github.com/ArtSabintsev/Siren#optional-delegate-and-delegate-methods">Delegates (Optional)</a></li>
<li><a href="https://github.com/ArtSabintsev/Siren#localization">Localization</a></li>
<li><a href="https://github.com/ArtSabintsev/Siren#device-compatibility">Device Compatibility</a></li>
<li><a href="https://github.com/ArtSabintsev/Siren#testing-siren">Testing Siren</a></li>
<li><a href="https://github.com/ArtSabintsev/Siren#app-store-submissions">App Store Review &amp; Submissions</a></li>
<li><a href="https://github.com/ArtSabintsev/Siren#phased-releases">Phrased Releases</a></li>
<li><a href="https://github.com/ArtSabintsev/Siren#words-of-caution">Words of Caution</a></li>
<li><a href="https://github.com/ArtSabintsev/Siren#ports">Ports</a></li>
<li><a href="https://github.com/ArtSabintsev/Siren#created-and-maintained-by">Attribution</a></li>
</ul>
<hr>
<h2 id='about' class='heading'>About</h2>
<p><strong>Siren</strong> checks a user&rsquo;s currently installed version of your iOS app against the version that is currently available in the App Store.</p>
<p>If a new version is available, an alert can be presented to the user informing them of the newer version, and giving them the option to update the application. Alternatively, Siren can notify your app programmatically, enabling you to inform the user through alternative means, such as a custom interface.</p>
<ul>
<li>Siren is built to work with the <a href="https://semver.org/"><strong>Semantic Versioning</strong></a> system.
<ul>
<li>Semantic Versioning is a three number versioning system (e.g., 1.0.0)</li>
<li>Siren also supports two-number versioning (e.g., 1.0) and four-number versioning (e.g., 1.0.0.0)</li>
</ul></li>
<li>Siren is actively maintained by <a href="https://github.com/ArtSabintsev"><strong>Arthur Sabintsev</strong></a> and <a href="https://twitter.com/getaaron"><strong>Aaron Brager</strong></a></li>
</ul>
<h3 id='readme-translations' class='heading'>README Translations</h3>
<ul>
<li><a href="README.zh_CN.md"><strong>简体中文</strong></a> (by <a href="https://www.jianshu.com/u/d8bbc4831623"><strong>Daniel Hu</strong></a>)</li>
</ul>
<h2 id='features' class='heading'>Features</h2>
<ul>
<li>[x] CocoaPods Support</li>
<li>[x] Carthage Support</li>
<li>[x] Swift Package Manager Support</li>
<li>[x] Localized for 30+ languages (see <a href="https://github.com/ArtSabintsev/Siren#localization">Localization</a>)</li>
<li>[x] Pre-Update Device Compatibility Check (see <a href="https://github.com/ArtSabintsev/Siren#device-compatibility">Device Compatibility</a>)</li>
<li>[x] Three types of alerts (see <a href="https://github.com/ArtSabintsev/Siren#screenshots">Screenshots</a>)</li>
<li>[x] Optional delegate methods (see <a href="https://github.com/ArtSabintsev/Siren#optional-delegate-and-delegate-methods">Delegates (Optional)</a>)</li>
<li>[x] Unit Tests</li>
<li>[x] Documentation can be found at <a href="http://sabintsev.com/Siren">http://sabintsev.com/Siren</a>.</li>
</ul>
<h2 id='screenshots' class='heading'>Screenshots</h2>
<ul>
<li>The <strong>left picture</strong> forces the user to update the app.</li>
<li>The <strong>center picture</strong> gives the user the option to update the app.</li>
<li>The <strong>right picture</strong> gives the user the option to skip the current update.</li>
<li>These options are controlled by the <code><a href="Classes/Siren/AlertType.html">Siren.AlertType</a></code> enum.</li>
</ul>
<p><img src="https://github.com/ArtSabintsev/Siren/blob/master/Assets/picForcedUpdate.png?raw=true" height="480"><img src="https://github.com/ArtSabintsev/Siren/blob/master/Assets/picOptionalUpdate.png?raw=true" height="480"><img src="https://github.com/ArtSabintsev/Siren/blob/master/Assets/picSkippedUpdate.png?raw=true" height="480"></p>
<h2 id='installation-instructions' class='heading'>Installation Instructions</h2>
<table><thead>
<tr>
<th>Swift Version</th>
<th>Branch Name</th>
<th>Will Continue to Receive Updates?</th>
</tr>
</thead><tbody>
<tr>
<td>4.2</td>
<td>master</td>
<td><strong>Yes</strong></td>
</tr>
<tr>
<td>4.1</td>
<td>swift4.1</td>
<td>No</td>
</tr>
<tr>
<td>3.2</td>
<td>swift3.2</td>
<td>No</td>
</tr>
<tr>
<td>3.1</td>
<td>swift3.1</td>
<td>No</td>
</tr>
<tr>
<td>2.3</td>
<td>swift2.3</td>
<td>No</td>
</tr>
</tbody></table>
<h3 id='cocoapods' class='heading'>CocoaPods</h3>
<pre class="highlight ruby"><code><span class="n">pod</span> <span class="s1">'Siren'</span> <span class="c1"># Swift 4.2</span>
<span class="n">pod</span> <span class="s1">'Siren'</span><span class="p">,</span> <span class="ss">:git</span> <span class="o">=&gt;</span> <span class="s1">'https://github.com/ArtSabintsev/Siren.git'</span><span class="p">,</span> <span class="ss">:branch</span> <span class="o">=&gt;</span> <span class="s1">'swift4.1'</span> <span class="c1"># Swift 4.1</span>
<span class="n">pod</span> <span class="s1">'Siren'</span><span class="p">,</span> <span class="ss">:git</span> <span class="o">=&gt;</span> <span class="s1">'https://github.com/ArtSabintsev/Siren.git'</span><span class="p">,</span> <span class="ss">:branch</span> <span class="o">=&gt;</span> <span class="s1">'swift3.2'</span> <span class="c1"># Swift 3.2</span>
<span class="n">pod</span> <span class="s1">'Siren'</span><span class="p">,</span> <span class="ss">:git</span> <span class="o">=&gt;</span> <span class="s1">'https://github.com/ArtSabintsev/Siren.git'</span><span class="p">,</span> <span class="ss">:branch</span> <span class="o">=&gt;</span> <span class="s1">'swift3.1'</span> <span class="c1"># Swift 3.1</span>
<span class="n">pod</span> <span class="s1">'Siren'</span><span class="p">,</span> <span class="ss">:git</span> <span class="o">=&gt;</span> <span class="s1">'https://github.com/ArtSabintsev/Siren.git'</span><span class="p">,</span> <span class="ss">:branch</span> <span class="o">=&gt;</span> <span class="s1">'swift2.3'</span> <span class="c1"># Swift 2.3</span>
</code></pre>
<a href='#authors' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h3 id='authors'>Authors</h3>
<h3 id='carthage' class='heading'>Carthage</h3>
<pre class="highlight swift"><code><span class="n">github</span> <span class="s">"ArtSabintsev/Siren"</span> <span class="c1">// Swift 4.2</span>
<span class="n">github</span> <span class="s">"ArtSabintsev/Siren"</span><span class="p">,</span> <span class="s">"swift4.1"</span> <span class="c1">// Swift 4.1</span>
<span class="n">github</span> <span class="s">"ArtSabintsev/Siren"</span><span class="p">,</span> <span class="s">"swift3.2"</span> <span class="c1">// Swift 3.2</span>
<span class="n">github</span> <span class="s">"ArtSabintsev/Siren"</span><span class="p">,</span> <span class="s">"swift3.1"</span> <span class="c1">// Swift 3.1</span>
<span class="n">github</span> <span class="s">"ArtSabintsev/Siren"</span><span class="p">,</span> <span class="s">"swift2.3"</span> <span class="c1">// Swift 2.3</span>
</code></pre>
<h3 id='swift-package-manager' class='heading'>Swift Package Manager</h3>
<pre class="highlight swift"><code><span class="o">.</span><span class="kt">Package</span><span class="p">(</span><span class="nv">url</span><span class="p">:</span> <span class="s">"https://github.com/ArtSabintsev/Siren.git"</span><span class="p">,</span> <span class="nv">majorVersion</span><span class="p">:</span> <span class="mi">3</span><span class="p">)</span>
</code></pre>
<h2 id='example-code' class='heading'>Example Code</h2>
<p>Arthur Ariel Sabintsev and Aaron Brager</p>
<p>Below is some commented sample code. Adapt this to meet your app&rsquo;s needs.</p>
<p>For a full list of optional settings/preferences, please refer to <a href="https://github.com/ArtSabintsev/Siren/blob/master/Example/Example/AppDelegate.swift">https://github.com/ArtSabintsev/Siren/blob/master/Example/Example/AppDelegate.swift</a> in the Sample Project.</p>
<pre class="highlight plaintext"><code>func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -&gt; Bool {
/* Siren code should go below window?.makeKeyAndVisible() */
// Siren is a singleton
let siren = Siren.shared
// Optional: Defaults to .option
siren.alertType = &lt;#Siren.AlertType_Enum_Value#&gt;
// Optional: Change the various UIAlertController and UIAlertAction messaging. One or more values can be changes. If only a subset of values are changed, the defaults with which Siren comes with will be used.
siren.alertMessaging = SirenAlertMessaging(updateTitle: NSAttributedString(string: "New Fancy Title"),
updateMessage: NSAttributedString(string: "New message goes here!"),
updateButtonMessage: NSAttributedString(string: "Update Now, Plz!?"),
nextTimeButtonMessage: NSAttributedString(string: "OK, next time it is!"),
skipVersionButtonMessage: NSAttributedString(string: "Please don't push skip, please don't!"))
// Optional: Set this variable if you would only like to show an alert if your app has been available on the store for a few days.
// This default value is set to 1 to avoid this issue: https://github.com/ArtSabintsev/Siren#words-of-caution
// To show the update immediately after Apple has updated their JSON, set this value to 0. Not recommended due to aforementioned reason in https://github.com/ArtSabintsev/Siren#words-of-caution.
siren.showAlertAfterCurrentVersionHasBeenReleasedForDays = 3
// Replace .immediately with .daily or .weekly to specify a maximum daily or weekly frequency for version checks.
// DO NOT CALL THIS METHOD IN didFinishLaunchingWithOptions IF YOU ALSO PLAN TO CALL IT IN applicationDidBecomeActive.
siren.checkVersion(checkType: .immediately)
return true
}
func applicationDidBecomeActive(application: UIApplication) {
/*
Perform daily (.daily) or weekly (.weekly) checks for new version of your app.
Useful if user returns to your app from the background after extended period of time.
Place in applicationDidBecomeActive(_:).
*/
Siren.shared.checkVersion(checkType: .daily)
}
func applicationWillEnterForeground(application: UIApplication) {
/*
Useful if user returns to your app from the background after being sent to the
App Store, but doesn't update their app before coming back to your app.
ONLY USE WITH Siren.AlertType.immediately
*/
Siren.shared.checkVersion(checkType: .immediately)
}
</code></pre>
<p>And you&rsquo;re all set!</p>
<h3 id='prompting-for-updates-without-alerts' class='heading'>Prompting for Updates without Alerts</h3>
<p>Some developers may want to display a less obtrusive custom interface, like a banner or small icon. To accomplish this, you can disable alert presentation by doing the following:</p>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">application</span><span class="p">(</span><span class="nv">application</span><span class="p">:</span> <span class="kt">UIApplication</span><span class="p">,</span> <span class="n">didFinishLaunchingWithOptions</span> <span class="nv">launchOptions</span><span class="p">:</span> <span class="p">[</span><span class="kt">NSObject</span><span class="p">:</span> <span class="kt">AnyObject</span><span class="p">]?)</span> <span class="o">-&gt;</span> <span class="kt">Bool</span> <span class="p">{</span>
<span class="o">...</span>
<span class="n">siren</span><span class="o">.</span><span class="n">delegate</span> <span class="o">=</span> <span class="k">self</span>
<span class="n">siren</span><span class="o">.</span><span class="n">alertType</span> <span class="o">=</span> <span class="o">.</span><span class="k">none</span>
<span class="o">...</span>
<span class="p">}</span>
<span class="kd">extension</span> <span class="kt">AppDelegate</span><span class="p">:</span> <span class="kt">SirenDelegate</span> <span class="p">{</span>
<span class="c1">// Returns a localized message to this delegate method upon performing a successful version check</span>
<span class="kd">func</span> <span class="nf">sirenDidDetectNewVersionWithoutAlert</span><span class="p">(</span><span class="nv">message</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">updateType</span><span class="p">:</span> <span class="kt">UpdateType</span><span class="p">)</span> <span class="p">{</span>
<span class="nf">print</span><span class="p">(</span><span class="s">"</span><span class="se">\(</span><span class="n">message</span><span class="se">)</span><span class="s">"</span><span class="p">)</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre>
<p>Siren will call the <code>sirenDidDetectNewVersionWithoutAlert(message: String)</code> delegate method, passing a localized, suggested update string suitable for display. Implement this method to display your own messaging, optionally using <code>message</code>.</p>
<h2 id='granular-version-update-management' class='heading'>Granular Version Update Management</h2>
<p>If you would like to set a different type of alert for revision, patch, minor, and/or major updates, simply add one or all of the following <em>optional</em> lines to your setup <em>before</em> calling the <code>checkVersion()</code> method:</p>
<pre class="highlight swift"><code> <span class="cm">/* Siren defaults to Siren.AlertType.option for all updates */</span>
<span class="n">siren</span><span class="o">.</span><span class="n">shared</span><span class="o">.</span><span class="n">revisionUpdateAlertType</span> <span class="o">=</span> <span class="o">&lt;</span><span class="err">#</span><span class="kt">Siren</span><span class="o">.</span><span class="kt">AlertType_Enum_Value</span><span class="err">#</span><span class="o">&gt;</span>
<span class="n">siren</span><span class="o">.</span><span class="n">shared</span><span class="o">.</span><span class="n">patchUpdateAlertType</span> <span class="o">=</span> <span class="o">&lt;</span><span class="err">#</span><span class="kt">Siren</span><span class="o">.</span><span class="kt">AlertType_Enum_Value</span><span class="err">#</span><span class="o">&gt;</span>
<span class="n">siren</span><span class="o">.</span><span class="n">shared</span><span class="o">.</span><span class="n">minorUpdateAlertType</span> <span class="o">=</span> <span class="o">&lt;</span><span class="err">#</span><span class="kt">Siren</span><span class="o">.</span><span class="kt">AlertType_Enum_Value</span><span class="err">#</span><span class="o">&gt;</span>
<span class="n">siren</span><span class="o">.</span><span class="n">shared</span><span class="o">.</span><span class="n">majorUpdateAlertType</span> <span class="o">=</span> <span class="o">&lt;</span><span class="err">#</span><span class="kt">Siren</span><span class="o">.</span><span class="kt">AlertType_Enum_Value</span><span class="err">#</span><span class="o">&gt;</span>
</code></pre>
<h2 id='optional-delegate-and-delegate-methods' class='heading'>Optional Delegate and Delegate Methods</h2>
<p>Six delegate methods allow you to handle or track the user&rsquo;s behavior. Each method has a default, empty implementation, effectively making each of these methods optional.</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SirenDelegate</span><span class="p">:</span> <span class="kt">NSObjectProtocol</span> <span class="p">{</span>
<span class="c1">/// Siren performed version check and did not display alert.</span>
<span class="kd">func</span> <span class="nf">sirenDidDetectNewVersionWithoutAlert</span><span class="p">(</span><span class="nv">message</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">updateType</span><span class="p">:</span> <span class="kt">UpdateType</span><span class="p">)</span>
<span class="c1">/// Siren failed to perform version check.</span>
<span class="c1">///</span>
<span class="c1">/// - Note:</span>
<span class="c1">/// Depending on the reason for failure,</span>
<span class="c1">/// a system-level error may be returned.</span>
<span class="kd">func</span> <span class="nf">sirenDidFailVersionCheck</span><span class="p">(</span><span class="nv">error</span><span class="p">:</span> <span class="kt">Error</span><span class="p">)</span>
<span class="c1">/// User presented with update dialog.</span>
<span class="kd">func</span> <span class="nf">sirenDidShowUpdateDialog</span><span class="p">(</span><span class="nv">alertType</span><span class="p">:</span> <span class="kt">Siren</span><span class="o">.</span><span class="kt">AlertType</span><span class="p">)</span>
<span class="c1">/// Siren performed a version check and latest version is installed.</span>
<span class="kd">func</span> <span class="nf">sirenLatestVersionInstalled</span><span class="p">()</span>
<span class="c1">/// Provides the decoded JSON information from a successful version check call.</span>
<span class="c1">///</span>
<span class="c1">/// - SeeAlso:</span>
<span class="c1">/// SirenLookupModel.swift</span>
<span class="c1">///</span>
<span class="c1">/// - Parameter lookupModel: The `Decodable` model representing the JSON results from the iTunes Lookup API.</span>
<span class="kd">func</span> <span class="nf">sirenNetworkCallDidReturnWithNewVersionInformation</span><span class="p">(</span><span class="nv">lookupModel</span><span class="p">:</span> <span class="kt">SirenLookupModel</span><span class="p">)</span>
<span class="c1">/// User did click on button that cancels update dialog.</span>
<span class="kd">func</span> <span class="nf">sirenUserDidCancel</span><span class="p">()</span>
<span class="c1">/// User did click on button that launched "App Store.app".</span>
<span class="kd">func</span> <span class="nf">sirenUserDidLaunchAppStore</span><span class="p">()</span>
<span class="c1">/// User did click on button that skips version update.</span>
<span class="kd">func</span> <span class="nf">sirenUserDidSkipVersion</span><span class="p">()</span>
<span class="p">}</span>
</code></pre>
<h2 id='localization' class='heading'>Localization</h2>
<p>Siren is localized for</p>
<ul>
<li>Arabic</li>
<li>Armenian</li>
<li>Basque</li>
<li>Chinese (Simplified and Traditional)</li>
<li>Croatian</li>
<li>Czech</li>
<li>Danish</li>
<li>Dutch</li>
<li>English</li>
<li>Estonian</li>
<li>Finnish</li>
<li>French</li>
<li>German</li>
<li>Greek</li>
<li>Hebrew</li>
<li>Hungarian</li>
<li>Indonesian</li>
<li>Italian</li>
<li>Japanese</li>
<li>Korean</li>
<li>Latvian</li>
<li>Lithuanian</li>
<li>Malay</li>
<li>Norwegian (Bokmål)</li>
<li>Persian (Afghanistan, Iran, Persian)</li>
<li>Polish</li>
<li>Portuguese (Brazil and Portugal)</li>
<li>Russian</li>
<li>Serbian (Cyrillic and Latin)</li>
<li>Slovenian</li>
<li>Spanish</li>
<li>Swedish</li>
<li>Thai</li>
<li>Turkish</li>
<li>Ukrainian</li>
<li>Urdu</li>
<li>Vietnamese</li>
</ul>
<p>You may want the update dialog to <em>always</em> appear in a certain language, ignoring iOS&rsquo;s language setting (e.g. apps released in a specific country).</p>
<p>You can enable it like so:</p>
<pre class="highlight swift"><code><span class="kt">Siren</span><span class="o">.</span><span class="n">shared</span><span class="o">.</span><span class="n">forceLanguageLocalization</span> <span class="o">=</span> <span class="kt">Siren</span><span class="o">.</span><span class="kt">LanguageType</span><span class="o">.&lt;</span><span class="err">#</span><span class="kt">Siren</span><span class="o">.</span><span class="kt">LanguageType_Enum_Value</span><span class="err">#</span><span class="o">&gt;</span>
</code></pre>
<h2 id='device-compatibility' class='heading'>Device Compatibility</h2>
<p>If an app update is available, Siren checks to make sure that the version of iOS on the user&rsquo;s device is compatible with the one that is required by the app update. For example, if a user has iOS 10 installed on their device, but the app update requires iOS 11, an alert will not be shown. This takes care of the <em>false positive</em> case regarding app updating.</p>
<h2 id='testing-siren' class='heading'>Testing Siren</h2>
<p>Temporarily change the version string in Xcode (within the <code>.xcodeproj</code>) to an older version than the one that&rsquo;s currently available in the App Store. Afterwards, build and run your app, and you should see the alert.</p>
<p>If you currently don&rsquo;t have an app in the store, change your bundleID to one that is already in the store. In the sample app packaged with this library, we use the <a href="https://itunes.apple.com/app/id1234793120">App Store Connect</a> app&rsquo;s bundleID: <code>com.apple.AppStoreConnect</code>.</p>
<p>For your convenience, you may turn on debugging statements by setting <code>self.debugEnabled = true</code> before calling the <code>checkVersion()</code> method.</p>
<h2 id='app-store-submissions' class='heading'>App Store Submissions</h2>
<p>The App Store reviewer will <strong>not</strong> see the alert. The version in the App Store will always be older than the version being reviewed.</p>
<h2 id='phased-releases' class='heading'>Phased Releases</h2>
<p>In 2017, Apple announced the <a href="https://itunespartner.apple.com/en/apps/faq/Managing%20Your%20Apps_Submission%20Process">ability to rollout app updates gradually (a.k.a. Phased Releases)</a>. Siren will continue to work as it has in the past, presenting an update modal to <em>all</em> users. If you opt-in to a phased rollout for a specific version, you have a few choices:</p>
<ul>
<li>You can leave Siren configured as normal. Phased rollout will continue to auto-update apps. Since all users can still manually update your app directly from the App Store, Siren will ignore the phased rollout and will prompt users to update.</li>
<li>You can set <code>showAlertAfterCurrentVersionHasBeenReleasedForDays</code> to <code>7</code>, and Siren will not prompt any users until the latest version is 7 days old, after phased rollout is complete.</li>
<li>You can remotely disable Siren until the rollout is done using your own API / backend logic.</li>
</ul>
<h2 id='words-of-caution' class='heading'>Words of Caution</h2>
<p>Occasionally, the iTunes JSON will update faster than the App Store CDN, meaning the JSON may state that the new version of the app has been released, while no new binary is made available for download via the App Store. It is for this reason that Siren will, by default, wait 1 day (24 hours) after the JSON has been updated to prompt the user to update. To change the default setting, please modify the value of <code>showAlertAfterCurrentVersionHasBeenReleasedForDays</code>.</p>
<h2 id='ports' class='heading'>Ports</h2>
<ul>
<li><strong>Objective-C (iOS)</strong>
<ul>
<li><a href="https://github.com/ArtSabintsev/Harpy"><strong>Harpy</strong></a></li>
<li>Siren was ported <em>from</em> Harpy, as Siren and Harpy are maintained by the same developer.</li>
</ul></li>
<li><strong>Java (Android)</strong>
<ul>
<li><a href="https://github.com/eggheadgames/Siren"><strong>Egghead Games&rsquo; Siren library</strong></a></li>
<li>The Siren Swift library inspired the Java library.</li>
</ul></li>
<li><strong>React Native (iOS)</strong>
<ul>
<li><a href="https://github.com/GantMan/react-native-siren"><strong>Gant Laborde&rsquo;s Siren library</strong></a></li>
<li>The Siren Swift library inspired the React Native library.</li>
</ul></li>
</ul>
<h2 id='created-and-maintained-by' class='heading'>Created and maintained by</h2>
<p><a href="http://www.sabintsev.com/">Arthur Ariel Sabintsev</a> &amp; <a href="https://twitter.com/getaaron">Aaron Brager</a></p>
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2017-03-04)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2018 <a class="link" href="https://github.com/ArtSabintsev/Siren" target="_blank" rel="external">Arthur Ariel Sabintsev and Aaron Brager</a>. All rights reserved. (Last updated: 2018-11-07)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
File diff suppressed because one or more lines are too long
@@ -2,5 +2,5 @@
"warnings": [
],
"source_directory": "/Users/sabintseva/Documents/oss/siren/SirenExample"
"source_directory": "/Users/Arthur/Documents/oss/siren"
}

Some files were not shown because too many files have changed in this diff Show More