Compare commits

..

5 Commits

Author SHA1 Message Date
Arthur Ariel Sabintsev 758680ad91 Merge pull request #122 from toptier/fix_cache
URL request cached response fixed
2017-02-03 15:33:44 -05:00
German Lopez 9484d6a903 URL request cached response fixed 2017-02-03 16:46:36 -03:00
Arthur Ariel Sabintsev 5dcb270c1b Merge branch 'master' into swift2.3 2016-08-14 14:32:03 -04:00
Arthur Ariel Sabintsev e6cf673498 Merge branch 'master' into swift2.3 2016-08-05 20:59:22 -04:00
Arthur Ariel Sabintsev 69ff4f1e67 Updated to Swift 2.3 syntax using Xcode8b4 2016-08-05 20:57:29 -04:00
134 changed files with 2481 additions and 6142 deletions
-1
View File
@@ -1 +0,0 @@
Docs/* linguist-vendored
-1
View File
@@ -1 +0,0 @@
* @artsabintsev
-28
View File
@@ -1,28 +0,0 @@
## If you're experiencing a problem integrating Siren into your app, please provide the following information when posting a new issue:
- **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?**:
---
## 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.
+5 -45
View File
@@ -1,12 +1,6 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
build/
DerivedData/
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
@@ -15,52 +9,18 @@ DerivedData/
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
## Other
xcuserdata
*.xccheckout
*.moved-aside
*.xcuserstate
.DS_Store
## Obj-C/Swift specific
DerivedData
*.hmap
*.ipa
*.dSYM.zip
*.dSYM
## Playgrounds
timeline.xctimeline
playground.xcworkspace
# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
.build/
*.xcuserstate
# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
# Pods/
# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts
Carthage/Build
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
-13
View File
@@ -1,13 +0,0 @@
reporter: "xcode"
included:
- ../Sources/
- Example/Tests/
disabled_rules:
- cyclomatic_complexity
- identifier_name
- file_length
- line_length
- nesting
- unused_optional_binding
+4 -14
View File
@@ -1,16 +1,6 @@
language: swift
osx_image: xcode11
language: objective-c
osx_image: xcode7.3
notifications:
email: false
before_install:
- brew update
- gem install bundler
- bundle
- cd Example/
- pod install
env:
- LC_CTYPE=en_US.UTF-8 LANG=en_US.UTF-8
script:
- set -o pipefail
- xcodebuild -workspace Example.xcworkspace -scheme Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO
Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 KiB

+55
View File
@@ -0,0 +1,55 @@
### Creators
[Arthur Ariel Sabintsev](http://www.sabintsev.com/) and [Aaron Brager](http://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)
- [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)
- [nagaho](https://github.com/nagaho) for [Pull Request #22](https://github.com/ArtSabintsev/Siren/pull/22)
- [Parnsind Hantrakool](https://github.com/kong707) for [Pull Request #91 (Harpy)](https://github.com/ArtSabintsev/Harpy/issues/91)
- [Tibor Molnár](https://github.com/fatalaa) for [Pull Request #96 (Harpy)](https://github.com/ArtSabintsev/Harpy/issues/96)
- [Tanel Suurhans](https://github.com/tanelsuurhans) and [Jaroslav_](https://github.com/jaroslavas) for [Pull Request #99 (Harpy)](https://github.com/ArtSabintsev/Harpy/issues/99)
- [Zaid M. Said](https://github.com/SentulAsia) for [Pull Request #36](https://github.com/ArtSabintsev/Siren/pull/36)
- [Vahan Margaryan](https://github.com/VahanMargaryan) for [Pull Request #37](https://github.com/ArtSabintsev/Siren/pull/37)
- [Justus Kandzi](https://github.com/jkandzi) for [Pull Request #108 (Harpy)](https://github.com/ArtSabintsev/Harpy/pull/108)
- [Maxim-Inv](https://github.com/Maxim-Inv) for [Pull Request #40](https://github.com/ArtSabintsev/Siren/pull/40)
- [Dirk van Oosterbosch](https://github.com/irlabs) for [Pull Request #54](https://github.com/ArtSabintsev/Siren/pull/54) and [Pull Request #55](https://github.com/ArtSabintsev/Siren/pull/55)
- [pavankataria](https://github.com/pavankataria) for [Pull Request #63](https://github.com/ArtSabintsev/Siren/pull/63)
- [attilat85](https://github.com/attilat85) for [Pull Request #124 (Harpy)](https://github.com/ArtSabintsev/Harpy/pull/124)
- [Vahan Margaryan](https://github.com/VahanMargaryan) for [Pull Request #71](https://github.com/ArtSabintsev/Siren/pull/71)
- [Josip Injic](https://github.com/jinjic) for [Pull Request #73](https://github.com/ArtSabintsev/Siren/pull/73)
- [Thi](https://github.com/thii) for [Pull Request #78](https://github.com/ArtSabintsev/Siren/pull/78)
- [Ilija Puaca](https://github.com/ilijapuaca) for [Pull Request #141 (Harpy)](https://github.com/ArtSabintsev/Harpy/pull/141)
- [thii](https://github.com/ilijapuaca) for [Pull Request #83](https://github.com/ArtSabintsev/Siren/pull/83)
### 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.
A huge **Thank You** to the following developers:
- [Borut Tomažin](https://github.com/borut-t)
- [Bertie Liu](https://github.com/https://github.com/aceisScope)
- [Burakkilic](https://github.com/burakkilic)
- [Claas Lange](https://github.com/claaslange)
- [Daniel](https://github.com/danieltskv)
- [David Keegan](https://github.com/kgn)
- [Erick](https://github.com/dexcell0)
- [Ercillagorka](https://github.com/ercillagorka)
- [Jamie Ly](http://github,com/jamiely)
- [Jon Andersen](https://github.com/jonandersen)
- [Josh T. Brown](https://github.com/joshuatbrown)
- [Mark Rickert](https://github.com/markrickert)
- [Patrick Debois](https://github.com/jedi4ever)
- [Pius Uzamere](https://github.com/pius)
- [Rahul Jiresal](https://github.com/rahuljiresal)
- [Rui Peres](https://github.com/RuiAAPeres)
- [Thomas Hempel](https://github.com/thomashempel)
- [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.
-633
View File
@@ -1,633 +0,0 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
5913ECF89C0DE3BEB22031BE /* Pods_Example_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3207656F9030B2912198AF2E /* Pods_Example_Tests.framework */; };
8E1635A91E6A0B9C0060CE27 /* SirenTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EE6C74C1E6A0AE100DBE454 /* SirenTests.swift */; };
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 */; };
E7269D91A22F64E1A0C661C5 /* Pods_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 37940350BF612EEBD59D5DF4 /* Pods_Example.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
8E3A6C091D07CB6F00A8B7CF /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 8EC391791A58B465001C121E /* Project object */;
proxyType = 1;
remoteGlobalIDString = 8EC391801A58B465001C121E;
remoteInfo = "Sample App";
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
8EF9F892224EB00200B20545 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
3008B0CC506A71223653ED92 /* Pods-Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests.release.xcconfig"; path = "Target Support Files/Pods-Tests/Pods-Tests.release.xcconfig"; sourceTree = "<group>"; };
31A1A1D27EA05F1E28033516 /* Pods-Example-Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-Tests.release.xcconfig"; path = "Target Support Files/Pods-Example-Tests/Pods-Example-Tests.release.xcconfig"; sourceTree = "<group>"; };
3207656F9030B2912198AF2E /* Pods_Example_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
37940350BF612EEBD59D5DF4 /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5A65216266BE44478A3B3AEB /* Pods-Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests.debug.xcconfig"; path = "Target Support Files/Pods-Tests/Pods-Tests.debug.xcconfig"; sourceTree = "<group>"; };
740DAA3321466F1ABE6CC37D /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; 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>"; };
E83E47CD9052083916E39F84 /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = "<group>"; };
EA761E9782C2024D152342D4 /* Pods-Example-Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-Tests.debug.xcconfig"; path = "Target Support Files/Pods-Example-Tests/Pods-Example-Tests.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
8E3A6C011D07CB6F00A8B7CF /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
5913ECF89C0DE3BEB22031BE /* Pods_Example_Tests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
8EC3917E1A58B465001C121E /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
E7269D91A22F64E1A0C661C5 /* Pods_Example.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
781697C27F2F128F70738C30 /* Pods */ = {
isa = PBXGroup;
children = (
740DAA3321466F1ABE6CC37D /* Pods-Example.debug.xcconfig */,
E83E47CD9052083916E39F84 /* Pods-Example.release.xcconfig */,
5A65216266BE44478A3B3AEB /* Pods-Tests.debug.xcconfig */,
3008B0CC506A71223653ED92 /* Pods-Tests.release.xcconfig */,
EA761E9782C2024D152342D4 /* Pods-Example-Tests.debug.xcconfig */,
31A1A1D27EA05F1E28033516 /* Pods-Example-Tests.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
};
8E641D2420C8B44B00908555 /* Frameworks */ = {
isa = PBXGroup;
children = (
37940350BF612EEBD59D5DF4 /* Pods_Example.framework */,
3207656F9030B2912198AF2E /* Pods_Example_Tests.framework */,
);
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 */,
);
path = "Supporting Files";
sourceTree = "<group>";
};
8EC391781A58B465001C121E = {
isa = PBXGroup;
children = (
8EACA9651F37F2D3003134CA /* Example */,
8EE6C74A1E6A0AE100DBE454 /* Tests */,
8EC391821A58B465001C121E /* Products */,
8E641D2420C8B44B00908555 /* Frameworks */,
781697C27F2F128F70738C30 /* Pods */,
);
sourceTree = "<group>";
};
8EC391821A58B465001C121E /* Products */ = {
isa = PBXGroup;
children = (
8EC391811A58B465001C121E /* Example.app */,
8E3A6C041D07CB6F00A8B7CF /* Tests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
8EE6C74A1E6A0AE100DBE454 /* Tests */ = {
isa = PBXGroup;
children = (
8EE6C74B1E6A0AE100DBE454 /* Info.plist */,
8EE6C74C1E6A0AE100DBE454 /* SirenTests.swift */,
);
path = Tests;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
8E3A6C031D07CB6F00A8B7CF /* Tests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 8E3A6C0D1D07CB6F00A8B7CF /* Build configuration list for PBXNativeTarget "Tests" */;
buildPhases = (
F0D788DF78612C5704C442B8 /* [CP] Check Pods Manifest.lock */,
8E3A6C001D07CB6F00A8B7CF /* Sources */,
8E3A6C011D07CB6F00A8B7CF /* Frameworks */,
8E3A6C021D07CB6F00A8B7CF /* Resources */,
F4829FA85904971576C7920A /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
dependencies = (
8E3A6C0A1D07CB6F00A8B7CF /* PBXTargetDependency */,
);
name = Tests;
productName = SirenTests;
productReference = 8E3A6C041D07CB6F00A8B7CF /* Tests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
8EC391801A58B465001C121E /* Example */ = {
isa = PBXNativeTarget;
buildConfigurationList = 8EC391A01A58B466001C121E /* Build configuration list for PBXNativeTarget "Example" */;
buildPhases = (
007D5BEF60AE64704A038FBF /* [CP] Check Pods Manifest.lock */,
8EC3917D1A58B465001C121E /* Sources */,
8EC3917E1A58B465001C121E /* Frameworks */,
8EE3A3F81E6A0E470010BDCE /* SwiftLint */,
8EC3917F1A58B465001C121E /* Resources */,
8EF9F892224EB00200B20545 /* Embed Frameworks */,
E31482FEAF1E4460E554FDD1 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = Example;
productName = Siren;
productReference = 8EC391811A58B465001C121E /* Example.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
8EC391791A58B465001C121E /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftMigration = 0700;
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 1220;
ORGANIZATIONNAME = "Sabintsev iOS Projects";
TargetAttributes = {
8E3A6C031D07CB6F00A8B7CF = {
CreatedOnToolsVersion = 7.3.1;
LastSwiftMigration = 1020;
TestTargetID = 8EC391801A58B465001C121E;
};
8EC391801A58B465001C121E = {
CreatedOnToolsVersion = 6.1.1;
DevelopmentTeam = HT94948NDD;
DevelopmentTeamName = "Arthur Sabintsev";
LastSwiftMigration = 1020;
SystemCapabilities = {
com.apple.BackgroundModes = {
enabled = 0;
};
com.apple.InAppPurchase = {
enabled = 0;
};
com.apple.Push = {
enabled = 0;
};
};
};
};
};
buildConfigurationList = 8EC3917C1A58B465001C121E /* Build configuration list for PBXProject "Example" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 8EC391781A58B465001C121E;
productRefGroup = 8EC391821A58B465001C121E /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
8EC391801A58B465001C121E /* Example */,
8E3A6C031D07CB6F00A8B7CF /* Tests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
8E3A6C021D07CB6F00A8B7CF /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
8EC3917F1A58B465001C121E /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8EACA9711F380294003134CA /* LaunchScreen.xib in Resources */,
8EACA9721F380294003134CA /* Main.storyboard in Resources */,
8EACA9731F380294003134CA /* Images.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
007D5BEF60AE64704A038FBF /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Example-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
8EE3A3F81E6A0E470010BDCE /* SwiftLint */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = SwiftLint;
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which swiftlint >/dev/null; then\nswiftlint lint --config ../.swiftlint.yml\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi";
};
E31482FEAF1E4460E554FDD1 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/Siren/Siren.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Siren.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
F0D788DF78612C5704C442B8 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Example-Tests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
F4829FA85904971576C7920A /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Example-Tests/Pods-Example-Tests-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/Siren/Siren.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Siren.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example-Tests/Pods-Example-Tests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
8E3A6C001D07CB6F00A8B7CF /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8E1635A91E6A0B9C0060CE27 /* SirenTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
8EC3917D1A58B465001C121E /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8EACA9741F38029B003134CA /* AppDelegate.swift in Sources */,
8EACA9751F38029B003134CA /* ViewController.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
8E3A6C0A1D07CB6F00A8B7CF /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 8EC391801A58B465001C121E /* Example */;
targetProxy = 8E3A6C091D07CB6F00A8B7CF /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
8EACA9671F37F2D3003134CA /* LaunchScreen.xib */ = {
isa = PBXVariantGroup;
children = (
8EACA9681F37F2D3003134CA /* Base */,
);
name = LaunchScreen.xib;
sourceTree = "<group>";
};
8EACA9691F37F2D3003134CA /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
8EACA96A1F37F2D3003134CA /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
8E3A6C0B1D07CB6F00A8B7CF /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = EA761E9782C2024D152342D4 /* Pods-Example-Tests.debug.xcconfig */;
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 = Tests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.sabintsev.SirenTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example";
};
name = Debug;
};
8E3A6C0C1D07CB6F00A8B7CF /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 31A1A1D27EA05F1E28033516 /* Pods-Example-Tests.release.xcconfig */;
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 = Tests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
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 = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example";
};
name = Release;
};
8EC3919E1A58B466001C121E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
};
name = Debug;
};
8EC3919F1A58B466001C121E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
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;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_VERSION = 4.2;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
8EC391A11A58B466001C121E /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 740DAA3321466F1ABE6CC37D /* Pods-Example.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
DEVELOPMENT_TEAM = HT94948NDD;
INFOPLIST_FILE = "$(SRCROOT)/Example/Supporting Files/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 2.0.2;
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.Facebook;
PRODUCT_NAME = Example;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
8EC391A21A58B466001C121E /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = E83E47CD9052083916E39F84 /* Pods-Example.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
DEVELOPMENT_TEAM = HT94948NDD;
INFOPLIST_FILE = "$(SRCROOT)/Example/Supporting Files/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 2.0.2;
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.Facebook;
PRODUCT_NAME = Example;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
8E3A6C0D1D07CB6F00A8B7CF /* Build configuration list for PBXNativeTarget "Tests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
8E3A6C0B1D07CB6F00A8B7CF /* Debug */,
8E3A6C0C1D07CB6F00A8B7CF /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
8EC3917C1A58B465001C121E /* Build configuration list for PBXProject "Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
8EC3919E1A58B466001C121E /* Debug */,
8EC3919F1A58B466001C121E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
8EC391A01A58B466001C121E /* Build configuration list for PBXNativeTarget "Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
8EC391A11A58B466001C121E /* Debug */,
8EC391A21A58B466001C121E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 8EC391791A58B465001C121E /* Project object */;
}
@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:/Users/Arthur/Documents/oss/siren/SirenExample/Example.xcodeproj">
</FileRef>
</Workspace>
@@ -1,8 +0,0 @@
<?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>
-10
View File
@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Example.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>
@@ -1,8 +0,0 @@
<?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>
-269
View File
@@ -1,269 +0,0 @@
//
// AppDelegate.swift
// Siren
//
// Created by Arthur Sabintsev on 1/3/15.
// Copyright (c) 2015 Sabintsev iOS Projects. All rights reserved.
//
import Siren
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
window?.makeKeyAndVisible()
/// - Warning:
/// Siren should ONLY be placed in UIApplication.didFinishLaunchingWithOptions and only after the `window?.makeKeyAndVisible()` call.
/// Siren initializes a listener on `didBecomeActiveNotification` to perform version checks.
// defaultExample()
// defaultExampleUsingCompletionHandler()
// manualExampleWithCompletionHandler()
// minimalCustomizationPresentationExample()
// forceLocalizationCustomizationPresentationExample()
// customMessagingPresentationExample()
// annoyingRuleExample()
hyperCriticalRulesExample()
// updateSpecificRulesExample()
// customAlertRulesExample()
// appStoreCountryChangeExample()
// complexExample()
return true
}
}
// Examples on how to use Siren
private extension AppDelegate {
/// The simplest implementation of Siren.
/// All default rules are implemented and the
/// results of the completion handler are ignored.
func defaultExample() {
Siren.shared.wail()
}
/// The simplest implementation of Siren.
/// All default rules are implemented and the
/// results of the completion handler are returned or an error is returned.
func defaultExampleUsingCompletionHandler() {
Siren.shared.wail { results in
switch results {
case .success(let updateResults):
print("AlertAction ", updateResults.alertAction)
print("Localization ", updateResults.localization)
print("Model ", updateResults.model)
print("UpdateType ", updateResults.updateType)
case .failure(let error):
print(error.localizedDescription)
}
}
}
/// Rather than waiting for `didBecomeActive` state changes (e.g., app launching/relaunching),
/// Siren's version checking and alert presentation methods will be triggered each time this method is called.
func manualExampleWithCompletionHandler() {
Siren.shared.wail(performCheck: .onDemand) { results in
switch results {
case .success(let updateResults):
print("AlertAction ", updateResults.alertAction)
print("Localization ", updateResults.localization)
print("Model ", updateResults.model)
print("UpdateType ", updateResults.updateType)
case .failure(let error):
print(error.localizedDescription)
}
}
}
/// Minor customization to Siren's update alert presentation.
func minimalCustomizationPresentationExample() {
let siren = Siren.shared
siren.rulesManager = RulesManager(globalRules: .annoying)
siren.presentationManager = PresentationManager(alertTintColor: .purple,
appName: "Siren Example App Override!")
siren.wail { results in
switch results {
case .success(let updateResults):
print("AlertAction ", updateResults.alertAction)
print("Localization ", updateResults.localization)
print("Model ", updateResults.model)
print("UpdateType ", updateResults.updateType)
case .failure(let error):
print(error.localizedDescription)
}
}
}
/// Forcing the language of the update alert to a specific localization (e.g., Russian is forced in this function)
func forceLocalizationCustomizationPresentationExample() {
let siren = Siren.shared
siren.presentationManager = PresentationManager(forceLanguageLocalization: .russian)
siren.wail { results in
switch results {
case .success(let updateResults):
print("AlertAction ", updateResults.alertAction)
print("Localization ", updateResults.localization)
print("Model ", updateResults.model)
print("UpdateType ", updateResults.updateType)
case .failure(let error):
print(error.localizedDescription)
}
}
}
/// Example on how to change specific strings in the update alert.
func customMessagingPresentationExample() {
let siren = Siren.shared
siren.presentationManager = PresentationManager(alertTitle: "Update Now, OK?",
nextTimeButtonTitle: "Next time, please!?")
siren.wail { results in
switch results {
case .success(let updateResults):
print("AlertAction ", updateResults.alertAction)
print("Localization ", updateResults.localization)
print("Model ", updateResults.model)
print("UpdateType ", updateResults.updateType)
case .failure(let error):
print(error.localizedDescription)
}
}
}
/// How to present an alert every time the app is foregrounded.
func annoyingRuleExample() {
let siren = Siren.shared
siren.rulesManager = RulesManager(globalRules: .annoying)
siren.wail { results in
switch results {
case .success(let updateResults):
print("AlertAction ", updateResults.alertAction)
print("Localization ", updateResults.localization)
print("Model ", updateResults.model)
print("UpdateType ", updateResults.updateType)
case .failure(let error):
print(error.localizedDescription)
}
}
}
/// How to present an alert every time the app is foregrounded.
/// This will block the user from using the app until they update the app.
/// Setting `showAlertAfterCurrentVersionHasBeenReleasedForDays` to `0` IS NOT RECOMMENDED
/// as it will cause the user to go into an endless loop to the App Store if the JSON results
/// update faster than the App Store CDN.
///
/// The `0` value is illustrated in this app as an example on how to change how quickly an alert is presented.
func hyperCriticalRulesExample() {
let siren = Siren.shared
siren.rulesManager = RulesManager(globalRules: .critical,
showAlertAfterCurrentVersionHasBeenReleasedForDays: 0)
siren.wail { results in
switch results {
case .success(let updateResults):
print("AlertAction ", updateResults.alertAction)
print("Localization ", updateResults.localization)
print("Model ", updateResults.model)
print("UpdateType ", updateResults.updateType)
case .failure(let error):
print(error.localizedDescription)
}
}
}
/// Major, Minor, Patch, and Revision specific rules implementations.
func updateSpecificRulesExample() {
let siren = Siren.shared
siren.rulesManager = RulesManager(majorUpdateRules: .critical,
minorUpdateRules: .annoying,
patchUpdateRules: .default,
revisionUpdateRules: Rules(promptFrequency: .weekly, forAlertType: .option))
siren.wail { results in
switch results {
case .success(let updateResults):
print("AlertAction ", updateResults.alertAction)
print("Localization ", updateResults.localization)
print("Model ", updateResults.model)
print("UpdateType ", updateResults.updateType)
case .failure(let error):
print(error.localizedDescription)
}
}
}
/// An example on how to present your own custom alert using Siren's localized Strings and version checking cadence.
func customAlertRulesExample() {
let siren = Siren.shared
// The key for using custom alerts is to set the `alertType` to `.none`.
// The `Results` type will return localized strings for your app's custom modal presentation.
// The `promptFrequency` allows you to customize how often Siren performs the version check before returning a non-error result back into your app, prompting your custom alert functionality.
let rules = Rules(promptFrequency: .immediately, forAlertType: .none)
siren.rulesManager = RulesManager(globalRules: rules)
siren.wail { results in
switch results {
case .success(let updateResults):
print("AlertAction ", updateResults.alertAction)
print("Localization ", updateResults.localization)
print("Model ", updateResults.model)
print("UpdateType ", updateResults.updateType)
case .failure(let error):
print(error.localizedDescription)
}
}
}
/// An example on how to change the App Store region that your app in which your app is available.
/// This should only be used if your app is not available in the US App Store.
/// This example function illustrates how this can be done by checking against the Russian App Store.
func appStoreCountryChangeExample() {
let siren = Siren.shared
siren.apiManager = APIManager(country: .russia)
siren.wail { results in
switch results {
case .success(let updateResults):
print("AlertAction ", updateResults.alertAction)
print("Localization ", updateResults.localization)
print("Model ", updateResults.model)
print("UpdateType ", updateResults.updateType)
case .failure(let error):
print(error.localizedDescription)
}
}
}
/// An example on how to customize multiple managers at once.
func complexExample() {
let siren = Siren.shared
siren.presentationManager = PresentationManager(alertTintColor: .brown,
appName: "Siren's Complex Rule Example App",
alertTitle: "Please, Update Now!",
skipButtonTitle: "Click here to skip!",
forceLanguageLocalization: .spanish)
siren.rulesManager = RulesManager(majorUpdateRules: .critical,
minorUpdateRules: .annoying,
patchUpdateRules: .default,
revisionUpdateRules: .relaxed)
siren.wail { results in
switch results {
case .success(let updateResults):
print("AlertAction ", updateResults.alertAction)
print("Localization ", updateResults.localization)
print("Model ", updateResults.model)
print("UpdateType ", updateResults.updateType)
case .failure(let error):
print(error.localizedDescription)
}
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

@@ -1,6 +0,0 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
-10
View File
@@ -1,10 +0,0 @@
platform :ios, '15.0'
inhibit_all_warnings!
use_frameworks!
target 'Example' do
pod 'Siren', :path => '../'
target 'Tests' do
end
end
-16
View File
@@ -1,16 +0,0 @@
PODS:
- Siren (6.0.2)
DEPENDENCIES:
- Siren (from `../`)
EXTERNAL SOURCES:
Siren:
:path: "../"
SPEC CHECKSUMS:
Siren: 1be92ef5775f9b61ebb294c79c59268ab0afcf5d
PODFILE CHECKSUM: 5800641824958ea506d6ae52e89b594fe8270c18
COCOAPODS: 1.11.2
-24
View File
@@ -1,24 +0,0 @@
{
"name": "Siren",
"version": "6.0.2",
"swift_versions": "5.5",
"summary": "Notify users that a new version of your iOS app is available, and prompt them with the App Store link.",
"homepage": "https://github.com/ArtSabintsev/Siren",
"license": "MIT",
"authors": {
"Arthur Ariel Sabintsev": "arthur@sabintsev.com"
},
"description": "Notify your users when a new version of your iOS app is available, and prompt them with the App Store link.",
"platforms": {
"ios": "15.0",
"tvos": "15.0"
},
"source": {
"git": "https://github.com/ArtSabintsev/Siren.git",
"tag": "6.0.2"
},
"source_files": "Sources/**/*.swift",
"resources": "Sources/Siren.bundle",
"requires_arc": true,
"swift_version": "5.5"
}
-16
View File
@@ -1,16 +0,0 @@
PODS:
- Siren (6.0.2)
DEPENDENCIES:
- Siren (from `../`)
EXTERNAL SOURCES:
Siren:
:path: "../"
SPEC CHECKSUMS:
Siren: 1be92ef5775f9b61ebb294c79c59268ab0afcf5d
PODFILE CHECKSUM: 5800641824958ea506d6ae52e89b594fe8270c18
COCOAPODS: 1.11.2
-902
View File
@@ -1,902 +0,0 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
151BA7773369BE5FC2A1A56A0ADB1E11 /* PerformCheck.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7637C46E7C27C83B4C31CECE3D6064B4 /* PerformCheck.swift */; };
158B5EA21F24D8A42B2C0DA33D6911D2 /* UIAlertControllerExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = F20FBAD7ADBFD07AF8183236B4ECE297 /* UIAlertControllerExtension.swift */; };
18AAE788DE1B28510F53F35A0E68214F /* AppStoreCountry.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCAD38316B970AACF9940545155FFAF8 /* AppStoreCountry.swift */; };
1D79DF28DA9C6AA8026CBFF47184B6AF /* AlertConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19D5FEFBCEC302A522182EEE37AD81B3 /* AlertConstants.swift */; };
268E0E6589DE799396C3FBF264AD3996 /* RulesManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E841994E6AE2DF727221123E0ED744A /* RulesManager.swift */; };
300E952C78F6EA5BEBF5B5E31F3706E0 /* DateExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9220E906478C87C685A81A5177136643 /* DateExtension.swift */; };
32AEE3D9A55EC66EBCE39C3A38D01126 /* Pods-Example-Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F92A716E93EDF48D0C9EF3C5062B558 /* Pods-Example-Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
425B752B150AAEF5221916E9FC670153 /* KnownError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4681015D4D44EB9A4302B2A179FD809F /* KnownError.swift */; };
428DE866FE6650BC83086E281DAD66F2 /* BundleExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11BFB38B8D147BDF94B9415C0F2DE13A /* BundleExtension.swift */; };
45303C99CEDE9EBA4990949652F4B28D /* Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62176AC744B2DC815BA7CD121F4EA473 /* Model.swift */; };
487B8148F836C8A64C6ECBBE67126ECA /* Pods-Example-Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = AEAE97BBEB3D5E4F45CEC2708FAFB72C /* Pods-Example-Tests-dummy.m */; };
4B4BB6D6D4B49D976A961CEBCA97BC05 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */; };
4ECA4FF1C7B4AC6DF846045C5B720A0B /* AlertAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF347B3A55392D1407E1A4ABC8114173 /* AlertAction.swift */; };
56AC6974308EB4B394AAF9B703DC7A47 /* Localization.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB4D2B7323F8C610677B540FEEC7673C /* Localization.swift */; };
5B9E7420A0284E837C04012B528EAE4A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */; };
6522773E85791CCB1A7256E5C3201E75 /* Pods-Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 850060B744F1FDFB6ADCAFD76D4D34EB /* Pods-Example-dummy.m */; };
66D1B530F0822D462D840C6E2428F9C0 /* Siren.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7B3EAF82CFAB96C6721BA02F97FC71B /* Siren.swift */; };
9952BF0ED5F6B7F18A07976BDD134D41 /* DataParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97602092A124F5A205482E90225B67EA /* DataParser.swift */; };
A1E89EF77BDD0C8D1EE8AAE743D82ED4 /* Siren-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 94DA749EC12B6582F7B5F8C0E50736F1 /* Siren-dummy.m */; };
A1EA2053268A5D5D9AC11C3D74D5BD4F /* Siren-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2506E5646D43BCE53FBEE1AB44BF4871 /* Siren-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
A73E39544FF12C5E5E54F07B0A2F7F78 /* PresentationManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B26CBDBDDF69163D512AED074B4549D /* PresentationManager.swift */; };
AE1B34BAF1974C7DDAF628092F663F7A /* UpdateResults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 567D8AAC664C44A23EBB5EC6B0AA4049 /* UpdateResults.swift */; };
C21F6BE2015F6B8C8540667C5C4EDCF0 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */; };
C609EB036330DECF2976CE62912E9745 /* SirenViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 786A05732FE78B252DC56C9F78F693C0 /* SirenViewController.swift */; };
C988AA88E47FFA79D317BF4291B2A04D /* UserDefaultsExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A8349F11EDA01F629C4C61E99CCFD91 /* UserDefaultsExtension.swift */; };
D95522B7A00F56B9510A8E58BB5AE8ED /* APIManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08A780E0CDE0D69B789468679AB277EA /* APIManager.swift */; };
E5F659EBC88C14C084176F93C9F0156D /* Rules.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1EABF799D1E792CA3E9194926E78605 /* Rules.swift */; };
F235A549B294F2E848529A1A93F852EB /* Pods-Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 90BF25316BE6972758B31C52602CE12C /* Pods-Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
FB731D70855188EDE196CEA745D6940A /* APIModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06B1A9453346F0CDCD7A4DC41A4F92C /* APIModel.swift */; };
FF40E81B2B174F3584493809B90C6668 /* Siren.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 3CDA2F82B5CE0BD747E1FE8BA63539AD /* Siren.bundle */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
B52DE15DFA6D788DDC41A589FA9AD9E8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */;
proxyType = 1;
remoteGlobalIDString = A0E2640B83527AE54205D7FDE9C5D930;
remoteInfo = Siren;
};
BF9CC9039B7878DA61A42FFBD3A22E9F /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */;
proxyType = 1;
remoteGlobalIDString = A0E2640B83527AE54205D7FDE9C5D930;
remoteInfo = Siren;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
033A17C59E0896996DE69A71A44F74D3 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
07692E025EFBB5F5C9DD63817289A7F2 /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Example.debug.xcconfig"; sourceTree = "<group>"; };
08A780E0CDE0D69B789468679AB277EA /* APIManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = APIManager.swift; sourceTree = "<group>"; };
11BFB38B8D147BDF94B9415C0F2DE13A /* BundleExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BundleExtension.swift; sourceTree = "<group>"; };
17E70395B3CDD0B7EDA622612E2C3144 /* Siren.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Siren.framework; sourceTree = BUILT_PRODUCTS_DIR; };
19D5FEFBCEC302A522182EEE37AD81B3 /* AlertConstants.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AlertConstants.swift; sourceTree = "<group>"; };
1BA24BC1E607E24F1C9AED046EE27110 /* Pods-Example-Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Example-Tests.release.xcconfig"; sourceTree = "<group>"; };
1C22073E7207FFF335D3A9EADE0DA51B /* Siren.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Siren.debug.xcconfig; sourceTree = "<group>"; };
1F667CC0E19EAF34E5A4119E2121F585 /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2506E5646D43BCE53FBEE1AB44BF4871 /* Siren-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Siren-umbrella.h"; sourceTree = "<group>"; };
27809964D647C11D4B07299C7B264724 /* Pods-Example-Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Example-Tests.debug.xcconfig"; sourceTree = "<group>"; };
2C0257A9A3D8C5B62771A4DDEB17A0ED /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Example.release.xcconfig"; sourceTree = "<group>"; };
2F92A716E93EDF48D0C9EF3C5062B558 /* Pods-Example-Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Example-Tests-umbrella.h"; sourceTree = "<group>"; };
3CDA2F82B5CE0BD747E1FE8BA63539AD /* Siren.bundle */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "wrapper.plug-in"; name = Siren.bundle; path = Sources/Siren.bundle; sourceTree = "<group>"; };
3F4E87B2E26A88328CDC6588E37F2AD2 /* Siren-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Siren-prefix.pch"; sourceTree = "<group>"; };
4681015D4D44EB9A4302B2A179FD809F /* KnownError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = KnownError.swift; sourceTree = "<group>"; };
4E841994E6AE2DF727221123E0ED744A /* RulesManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = RulesManager.swift; sourceTree = "<group>"; };
5281882E9C6A7A11616D41DF41B0CC7A /* Pods-Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Example-acknowledgements.plist"; sourceTree = "<group>"; };
567D8AAC664C44A23EBB5EC6B0AA4049 /* UpdateResults.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = UpdateResults.swift; sourceTree = "<group>"; };
62176AC744B2DC815BA7CD121F4EA473 /* Model.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Model.swift; sourceTree = "<group>"; };
688C1754B2F8DFC0710F4772C4A75C32 /* Pods-Example-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Example-Info.plist"; sourceTree = "<group>"; };
6D859521A91F233E653F06300C561D0A /* Pods-Example-Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Example-Tests-acknowledgements.markdown"; sourceTree = "<group>"; };
6FE61F66C83C50497BB430E4C3C49CD6 /* Pods-Example-Tests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Example-Tests-Info.plist"; sourceTree = "<group>"; };
70689754D9C1D7660D29312893615F94 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
7637C46E7C27C83B4C31CECE3D6064B4 /* PerformCheck.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PerformCheck.swift; sourceTree = "<group>"; };
786A05732FE78B252DC56C9F78F693C0 /* SirenViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SirenViewController.swift; sourceTree = "<group>"; };
850060B744F1FDFB6ADCAFD76D4D34EB /* Pods-Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Example-dummy.m"; sourceTree = "<group>"; };
89F8A185DF29707E4DC9BB13872AF702 /* Siren.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; path = Siren.podspec; sourceTree = "<group>"; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
8B26CBDBDDF69163D512AED074B4549D /* PresentationManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PresentationManager.swift; sourceTree = "<group>"; };
8B636D1CA58AC29F35305FCC180DDAD8 /* Siren-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Siren-Info.plist"; sourceTree = "<group>"; };
90BF25316BE6972758B31C52602CE12C /* Pods-Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Example-umbrella.h"; sourceTree = "<group>"; };
9220E906478C87C685A81A5177136643 /* DateExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = DateExtension.swift; sourceTree = "<group>"; };
94DA749EC12B6582F7B5F8C0E50736F1 /* Siren-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Siren-dummy.m"; sourceTree = "<group>"; };
97602092A124F5A205482E90225B67EA /* DataParser.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = DataParser.swift; sourceTree = "<group>"; };
9A8349F11EDA01F629C4C61E99CCFD91 /* UserDefaultsExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = UserDefaultsExtension.swift; sourceTree = "<group>"; };
9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
A2D5633C9DFACF001D250AC90A2EAD23 /* Pods_Example_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
AB37C628ACFCAD98A383C821813EFBBF /* Pods-Example-Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Example-Tests-frameworks.sh"; sourceTree = "<group>"; };
AB4D2B7323F8C610677B540FEEC7673C /* Localization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Localization.swift; sourceTree = "<group>"; };
AEAE97BBEB3D5E4F45CEC2708FAFB72C /* Pods-Example-Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Example-Tests-dummy.m"; sourceTree = "<group>"; };
AEB39A55C28B48D98B02090079C5C084 /* Pods-Example-Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Example-Tests-acknowledgements.plist"; sourceTree = "<group>"; };
B297160149C4B307A3DD5A8DDFC7EEF9 /* Siren.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Siren.modulemap; sourceTree = "<group>"; };
CCAD38316B970AACF9940545155FFAF8 /* AppStoreCountry.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AppStoreCountry.swift; sourceTree = "<group>"; };
D06B1A9453346F0CDCD7A4DC41A4F92C /* APIModel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = APIModel.swift; sourceTree = "<group>"; };
D991827462FB11E20C03858A8A0EF766 /* Pods-Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-Example.modulemap"; sourceTree = "<group>"; };
DDB351CF336FC775897FB3DEFC1AECE1 /* Pods-Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Example-frameworks.sh"; sourceTree = "<group>"; };
EEF458E38855C5A2A0F70C968763EEAD /* Pods-Example-Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-Example-Tests.modulemap"; sourceTree = "<group>"; };
F1EABF799D1E792CA3E9194926E78605 /* Rules.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Rules.swift; sourceTree = "<group>"; };
F20FBAD7ADBFD07AF8183236B4ECE297 /* UIAlertControllerExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = UIAlertControllerExtension.swift; sourceTree = "<group>"; };
F5743486693D7F303412A3018B0941CF /* Siren.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Siren.release.xcconfig; sourceTree = "<group>"; };
F7B3EAF82CFAB96C6721BA02F97FC71B /* Siren.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Siren.swift; path = Sources/Siren.swift; sourceTree = "<group>"; };
F924C881D2735430B1A17EDFF024E317 /* Pods-Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Example-acknowledgements.markdown"; sourceTree = "<group>"; };
FF347B3A55392D1407E1A4ABC8114173 /* AlertAction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AlertAction.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
19C68C00E0D92CD65F2917255ED5A50B /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
4B4BB6D6D4B49D976A961CEBCA97BC05 /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
5E2E02FD05446E0D72F1A5C4F34A57DB /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
C21F6BE2015F6B8C8540667C5C4EDCF0 /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
D01825EFADF2015C2D6F895EE2B5C81A /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
5B9E7420A0284E837C04012B528EAE4A /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
108F8CE4A8FCBCCB97F2FAD6A5B6D6D2 /* Extensions */ = {
isa = PBXGroup;
children = (
11BFB38B8D147BDF94B9415C0F2DE13A /* BundleExtension.swift */,
9220E906478C87C685A81A5177136643 /* DateExtension.swift */,
F20FBAD7ADBFD07AF8183236B4ECE297 /* UIAlertControllerExtension.swift */,
9A8349F11EDA01F629C4C61E99CCFD91 /* UserDefaultsExtension.swift */,
);
name = Extensions;
path = Sources/Extensions;
sourceTree = "<group>";
};
1CB4D55DAEB98D0046DA84E18479FED9 /* View Controllers */ = {
isa = PBXGroup;
children = (
786A05732FE78B252DC56C9F78F693C0 /* SirenViewController.swift */,
);
name = "View Controllers";
path = "Sources/View Controllers";
sourceTree = "<group>";
};
578452D2E740E91742655AC8F1636D1F /* iOS */ = {
isa = PBXGroup;
children = (
73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */,
);
name = iOS;
sourceTree = "<group>";
};
62A567EC72AC1F16179364897645F180 /* Utilities */ = {
isa = PBXGroup;
children = (
97602092A124F5A205482E90225B67EA /* DataParser.swift */,
4681015D4D44EB9A4302B2A179FD809F /* KnownError.swift */,
);
name = Utilities;
path = Sources/Utilities;
sourceTree = "<group>";
};
79BF3B1D578C929414C256003C35CDDA /* Pods-Example-Tests */ = {
isa = PBXGroup;
children = (
EEF458E38855C5A2A0F70C968763EEAD /* Pods-Example-Tests.modulemap */,
6D859521A91F233E653F06300C561D0A /* Pods-Example-Tests-acknowledgements.markdown */,
AEB39A55C28B48D98B02090079C5C084 /* Pods-Example-Tests-acknowledgements.plist */,
AEAE97BBEB3D5E4F45CEC2708FAFB72C /* Pods-Example-Tests-dummy.m */,
AB37C628ACFCAD98A383C821813EFBBF /* Pods-Example-Tests-frameworks.sh */,
6FE61F66C83C50497BB430E4C3C49CD6 /* Pods-Example-Tests-Info.plist */,
2F92A716E93EDF48D0C9EF3C5062B558 /* Pods-Example-Tests-umbrella.h */,
27809964D647C11D4B07299C7B264724 /* Pods-Example-Tests.debug.xcconfig */,
1BA24BC1E607E24F1C9AED046EE27110 /* Pods-Example-Tests.release.xcconfig */,
);
name = "Pods-Example-Tests";
path = "Target Support Files/Pods-Example-Tests";
sourceTree = "<group>";
};
85FAA2FE23142B2837AABDED1ABBE431 /* Siren */ = {
isa = PBXGroup;
children = (
3CDA2F82B5CE0BD747E1FE8BA63539AD /* Siren.bundle */,
F7B3EAF82CFAB96C6721BA02F97FC71B /* Siren.swift */,
108F8CE4A8FCBCCB97F2FAD6A5B6D6D2 /* Extensions */,
96395B3494838F55CD3B289AE14E3EBC /* Managers */,
A2735ADBD845397D9F481076C17C1760 /* Models */,
DAE3F5037DE241FD14030F7285578362 /* Pod */,
C9A9CB18FAE1BDEE996F72E1BA74240D /* Support Files */,
62A567EC72AC1F16179364897645F180 /* Utilities */,
1CB4D55DAEB98D0046DA84E18479FED9 /* View Controllers */,
);
name = Siren;
path = ../..;
sourceTree = "<group>";
};
96395B3494838F55CD3B289AE14E3EBC /* Managers */ = {
isa = PBXGroup;
children = (
08A780E0CDE0D69B789468679AB277EA /* APIManager.swift */,
8B26CBDBDDF69163D512AED074B4549D /* PresentationManager.swift */,
4E841994E6AE2DF727221123E0ED744A /* RulesManager.swift */,
);
name = Managers;
path = Sources/Managers;
sourceTree = "<group>";
};
A2735ADBD845397D9F481076C17C1760 /* Models */ = {
isa = PBXGroup;
children = (
FF347B3A55392D1407E1A4ABC8114173 /* AlertAction.swift */,
19D5FEFBCEC302A522182EEE37AD81B3 /* AlertConstants.swift */,
D06B1A9453346F0CDCD7A4DC41A4F92C /* APIModel.swift */,
CCAD38316B970AACF9940545155FFAF8 /* AppStoreCountry.swift */,
AB4D2B7323F8C610677B540FEEC7673C /* Localization.swift */,
62176AC744B2DC815BA7CD121F4EA473 /* Model.swift */,
7637C46E7C27C83B4C31CECE3D6064B4 /* PerformCheck.swift */,
F1EABF799D1E792CA3E9194926E78605 /* Rules.swift */,
567D8AAC664C44A23EBB5EC6B0AA4049 /* UpdateResults.swift */,
);
name = Models;
path = Sources/Models;
sourceTree = "<group>";
};
A8A8EA9BC9538376CEF195F2EAAC8200 /* Targets Support Files */ = {
isa = PBXGroup;
children = (
E91BC7AD44E15DE8E857ACB38F588DF3 /* Pods-Example */,
79BF3B1D578C929414C256003C35CDDA /* Pods-Example-Tests */,
);
name = "Targets Support Files";
sourceTree = "<group>";
};
B9E413F3FEAF521324127A009A6039BA /* Products */ = {
isa = PBXGroup;
children = (
1F667CC0E19EAF34E5A4119E2121F585 /* Pods_Example.framework */,
A2D5633C9DFACF001D250AC90A2EAD23 /* Pods_Example_Tests.framework */,
17E70395B3CDD0B7EDA622612E2C3144 /* Siren.framework */,
);
name = Products;
sourceTree = "<group>";
};
C9A9CB18FAE1BDEE996F72E1BA74240D /* Support Files */ = {
isa = PBXGroup;
children = (
B297160149C4B307A3DD5A8DDFC7EEF9 /* Siren.modulemap */,
94DA749EC12B6582F7B5F8C0E50736F1 /* Siren-dummy.m */,
8B636D1CA58AC29F35305FCC180DDAD8 /* Siren-Info.plist */,
3F4E87B2E26A88328CDC6588E37F2AD2 /* Siren-prefix.pch */,
2506E5646D43BCE53FBEE1AB44BF4871 /* Siren-umbrella.h */,
1C22073E7207FFF335D3A9EADE0DA51B /* Siren.debug.xcconfig */,
F5743486693D7F303412A3018B0941CF /* Siren.release.xcconfig */,
);
name = "Support Files";
path = "Example/Pods/Target Support Files/Siren";
sourceTree = "<group>";
};
CA5CC6205CFA8B5868F65C2CE32900E5 /* Development Pods */ = {
isa = PBXGroup;
children = (
85FAA2FE23142B2837AABDED1ABBE431 /* Siren */,
);
name = "Development Pods";
sourceTree = "<group>";
};
CF1408CF629C7361332E53B88F7BD30C = {
isa = PBXGroup;
children = (
9D940727FF8FB9C785EB98E56350EF41 /* Podfile */,
CA5CC6205CFA8B5868F65C2CE32900E5 /* Development Pods */,
D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */,
B9E413F3FEAF521324127A009A6039BA /* Products */,
A8A8EA9BC9538376CEF195F2EAAC8200 /* Targets Support Files */,
);
sourceTree = "<group>";
};
D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */ = {
isa = PBXGroup;
children = (
578452D2E740E91742655AC8F1636D1F /* iOS */,
);
name = Frameworks;
sourceTree = "<group>";
};
DAE3F5037DE241FD14030F7285578362 /* Pod */ = {
isa = PBXGroup;
children = (
70689754D9C1D7660D29312893615F94 /* LICENSE */,
033A17C59E0896996DE69A71A44F74D3 /* README.md */,
89F8A185DF29707E4DC9BB13872AF702 /* Siren.podspec */,
);
name = Pod;
sourceTree = "<group>";
};
E91BC7AD44E15DE8E857ACB38F588DF3 /* Pods-Example */ = {
isa = PBXGroup;
children = (
D991827462FB11E20C03858A8A0EF766 /* Pods-Example.modulemap */,
F924C881D2735430B1A17EDFF024E317 /* Pods-Example-acknowledgements.markdown */,
5281882E9C6A7A11616D41DF41B0CC7A /* Pods-Example-acknowledgements.plist */,
850060B744F1FDFB6ADCAFD76D4D34EB /* Pods-Example-dummy.m */,
DDB351CF336FC775897FB3DEFC1AECE1 /* Pods-Example-frameworks.sh */,
688C1754B2F8DFC0710F4772C4A75C32 /* Pods-Example-Info.plist */,
90BF25316BE6972758B31C52602CE12C /* Pods-Example-umbrella.h */,
07692E025EFBB5F5C9DD63817289A7F2 /* Pods-Example.debug.xcconfig */,
2C0257A9A3D8C5B62771A4DDEB17A0ED /* Pods-Example.release.xcconfig */,
);
name = "Pods-Example";
path = "Target Support Files/Pods-Example";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
57B0EAD2BF26101AE4951B7571E127AC /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
F235A549B294F2E848529A1A93F852EB /* Pods-Example-umbrella.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
810C4E5C60D9DE47607703BE3EF5C570 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
32AEE3D9A55EC66EBCE39C3A38D01126 /* Pods-Example-Tests-umbrella.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
C1B2B775EC37DA6784A580EC336EB857 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
A1EA2053268A5D5D9AC11C3D74D5BD4F /* Siren-umbrella.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
0AEE99A309977BD12A049FF48AF9BA4B /* Pods-Example */ = {
isa = PBXNativeTarget;
buildConfigurationList = D3B82CA51562CEF224C9A4BB49C4984C /* Build configuration list for PBXNativeTarget "Pods-Example" */;
buildPhases = (
57B0EAD2BF26101AE4951B7571E127AC /* Headers */,
4FFB70C136C9E782741B288D15B85315 /* Sources */,
5E2E02FD05446E0D72F1A5C4F34A57DB /* Frameworks */,
1D93CD182681FF85B9578413C8D20386 /* Resources */,
);
buildRules = (
);
dependencies = (
5325AFA39850B8A702C4FAF857E8B547 /* PBXTargetDependency */,
);
name = "Pods-Example";
productName = Pods_Example;
productReference = 1F667CC0E19EAF34E5A4119E2121F585 /* Pods_Example.framework */;
productType = "com.apple.product-type.framework";
};
258F10561A9DF823C49949D6176054DD /* Pods-Example-Tests */ = {
isa = PBXNativeTarget;
buildConfigurationList = FF4C27B32F8578162520923AA315DD80 /* Build configuration list for PBXNativeTarget "Pods-Example-Tests" */;
buildPhases = (
810C4E5C60D9DE47607703BE3EF5C570 /* Headers */,
222B8840F0BDB57E0AAD162A4612C884 /* Sources */,
19C68C00E0D92CD65F2917255ED5A50B /* Frameworks */,
26CAC077D527B3E5B13B86D2CA4BFF44 /* Resources */,
);
buildRules = (
);
dependencies = (
8292FC67D3422DFD54E714A9A8FF469E /* PBXTargetDependency */,
);
name = "Pods-Example-Tests";
productName = Pods_Example_Tests;
productReference = A2D5633C9DFACF001D250AC90A2EAD23 /* Pods_Example_Tests.framework */;
productType = "com.apple.product-type.framework";
};
A0E2640B83527AE54205D7FDE9C5D930 /* Siren */ = {
isa = PBXNativeTarget;
buildConfigurationList = D32ED6FCE8895E74A4FB89FACB79DC86 /* Build configuration list for PBXNativeTarget "Siren" */;
buildPhases = (
C1B2B775EC37DA6784A580EC336EB857 /* Headers */,
D808E7A6F5C7F3EB841EB711DC313822 /* Sources */,
D01825EFADF2015C2D6F895EE2B5C81A /* Frameworks */,
15A1BDD07A3C42FFD26CA6341DED32EC /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = Siren;
productName = Siren;
productReference = 17E70395B3CDD0B7EDA622612E2C3144 /* Siren.framework */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
BFDFE7DC352907FC980B868725387E98 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1340;
};
buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Base,
en,
);
mainGroup = CF1408CF629C7361332E53B88F7BD30C;
productRefGroup = B9E413F3FEAF521324127A009A6039BA /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
0AEE99A309977BD12A049FF48AF9BA4B /* Pods-Example */,
258F10561A9DF823C49949D6176054DD /* Pods-Example-Tests */,
A0E2640B83527AE54205D7FDE9C5D930 /* Siren */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
15A1BDD07A3C42FFD26CA6341DED32EC /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
FF40E81B2B174F3584493809B90C6668 /* Siren.bundle in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
1D93CD182681FF85B9578413C8D20386 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
26CAC077D527B3E5B13B86D2CA4BFF44 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
222B8840F0BDB57E0AAD162A4612C884 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
487B8148F836C8A64C6ECBBE67126ECA /* Pods-Example-Tests-dummy.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
4FFB70C136C9E782741B288D15B85315 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
6522773E85791CCB1A7256E5C3201E75 /* Pods-Example-dummy.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
D808E7A6F5C7F3EB841EB711DC313822 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
4ECA4FF1C7B4AC6DF846045C5B720A0B /* AlertAction.swift in Sources */,
1D79DF28DA9C6AA8026CBFF47184B6AF /* AlertConstants.swift in Sources */,
D95522B7A00F56B9510A8E58BB5AE8ED /* APIManager.swift in Sources */,
FB731D70855188EDE196CEA745D6940A /* APIModel.swift in Sources */,
18AAE788DE1B28510F53F35A0E68214F /* AppStoreCountry.swift in Sources */,
428DE866FE6650BC83086E281DAD66F2 /* BundleExtension.swift in Sources */,
9952BF0ED5F6B7F18A07976BDD134D41 /* DataParser.swift in Sources */,
300E952C78F6EA5BEBF5B5E31F3706E0 /* DateExtension.swift in Sources */,
425B752B150AAEF5221916E9FC670153 /* KnownError.swift in Sources */,
56AC6974308EB4B394AAF9B703DC7A47 /* Localization.swift in Sources */,
45303C99CEDE9EBA4990949652F4B28D /* Model.swift in Sources */,
151BA7773369BE5FC2A1A56A0ADB1E11 /* PerformCheck.swift in Sources */,
A73E39544FF12C5E5E54F07B0A2F7F78 /* PresentationManager.swift in Sources */,
E5F659EBC88C14C084176F93C9F0156D /* Rules.swift in Sources */,
268E0E6589DE799396C3FBF264AD3996 /* RulesManager.swift in Sources */,
66D1B530F0822D462D840C6E2428F9C0 /* Siren.swift in Sources */,
A1E89EF77BDD0C8D1EE8AAE743D82ED4 /* Siren-dummy.m in Sources */,
C609EB036330DECF2976CE62912E9745 /* SirenViewController.swift in Sources */,
158B5EA21F24D8A42B2C0DA33D6911D2 /* UIAlertControllerExtension.swift in Sources */,
AE1B34BAF1974C7DDAF628092F663F7A /* UpdateResults.swift in Sources */,
C988AA88E47FFA79D317BF4291B2A04D /* UserDefaultsExtension.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
5325AFA39850B8A702C4FAF857E8B547 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = Siren;
target = A0E2640B83527AE54205D7FDE9C5D930 /* Siren */;
targetProxy = B52DE15DFA6D788DDC41A589FA9AD9E8 /* PBXContainerItemProxy */;
};
8292FC67D3422DFD54E714A9A8FF469E /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = Siren;
target = A0E2640B83527AE54205D7FDE9C5D930 /* Siren */;
targetProxy = BF9CC9039B7878DA61A42FFBD3A22E9F /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
33693A1CC9F4648B54726664AFDE566F /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = F5743486693D7F303412A3018B0941CF /* Siren.release.xcconfig */;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = NO;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_PREFIX_HEADER = "Target Support Files/Siren/Siren-prefix.pch";
INFOPLIST_FILE = "Target Support Files/Siren/Siren-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MODULEMAP_FILE = "Target Support Files/Siren/Siren.modulemap";
PRODUCT_MODULE_NAME = Siren;
PRODUCT_NAME = Siren;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
SWIFT_VERSION = 5.5;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
7AE7988F711FD5F0C3BBD5F5321193F9 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 1C22073E7207FFF335D3A9EADE0DA51B /* Siren.debug.xcconfig */;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = NO;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_PREFIX_HEADER = "Target Support Files/Siren/Siren-prefix.pch";
INFOPLIST_FILE = "Target Support Files/Siren/Siren-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MODULEMAP_FILE = "Target Support Files/Siren/Siren.modulemap";
PRODUCT_MODULE_NAME = Siren;
PRODUCT_NAME = Siren;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
SWIFT_VERSION = 5.5;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
893704CF3A7D64225E29C0FC0B12E037 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 27809964D647C11D4B07299C7B264724 /* Pods-Example-Tests.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
CLANG_ENABLE_OBJC_WEAK = NO;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Target Support Files/Pods-Example-Tests/Pods-Example-Tests-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "Target Support Files/Pods-Example-Tests/Pods-Example-Tests.modulemap";
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PODS_ROOT = "$(SRCROOT)";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
90D4D09BCB6A4660E43ACBE9ECB6FE9A /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = 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_DOCUMENTATION_COMMENTS = YES;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"POD_CONFIGURATION_DEBUG=1",
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
STRIP_INSTALLED_PRODUCT = NO;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
SYMROOT = "${SRCROOT}/../build";
};
name = Debug;
};
9553C89E183877A5CB2F3C6801BEC129 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = 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_DOCUMENTATION_COMMENTS = YES;
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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"POD_CONFIGURATION_RELEASE=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
STRIP_INSTALLED_PRODUCT = NO;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 5.0;
SYMROOT = "${SRCROOT}/../build";
};
name = Release;
};
A3E9B9058E9A918CE0B415D30ED0A72D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 07692E025EFBB5F5C9DD63817289A7F2 /* Pods-Example.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
CLANG_ENABLE_OBJC_WEAK = NO;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Target Support Files/Pods-Example/Pods-Example-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "Target Support Files/Pods-Example/Pods-Example.modulemap";
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PODS_ROOT = "$(SRCROOT)";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
B0425CD0BFC3B46122E8E1CC4DB5B5B8 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 2C0257A9A3D8C5B62771A4DDEB17A0ED /* Pods-Example.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
CLANG_ENABLE_OBJC_WEAK = NO;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Target Support Files/Pods-Example/Pods-Example-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "Target Support Files/Pods-Example/Pods-Example.modulemap";
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PODS_ROOT = "$(SRCROOT)";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
B3B633944F03CF5ACE6C6619C915EC03 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 1BA24BC1E607E24F1C9AED046EE27110 /* Pods-Example-Tests.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
CLANG_ENABLE_OBJC_WEAK = NO;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Target Support Files/Pods-Example-Tests/Pods-Example-Tests-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "Target Support Files/Pods-Example-Tests/Pods-Example-Tests.modulemap";
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PODS_ROOT = "$(SRCROOT)";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = {
isa = XCConfigurationList;
buildConfigurations = (
90D4D09BCB6A4660E43ACBE9ECB6FE9A /* Debug */,
9553C89E183877A5CB2F3C6801BEC129 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D32ED6FCE8895E74A4FB89FACB79DC86 /* Build configuration list for PBXNativeTarget "Siren" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7AE7988F711FD5F0C3BBD5F5321193F9 /* Debug */,
33693A1CC9F4648B54726664AFDE566F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D3B82CA51562CEF224C9A4BB49C4984C /* Build configuration list for PBXNativeTarget "Pods-Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
A3E9B9058E9A918CE0B415D30ED0A72D /* Debug */,
B0425CD0BFC3B46122E8E1CC4DB5B5B8 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
FF4C27B32F8578162520923AA315DD80 /* Build configuration list for PBXNativeTarget "Pods-Example-Tests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
893704CF3A7D64225E29C0FC0B12E037 /* Debug */,
B3B633944F03CF5ACE6C6619C915EC03 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */;
}
@@ -1,67 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1340"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0AEE99A309977BD12A049FF48AF9BA4B"
BuildableName = "Pods_Example.framework"
BlueprintName = "Pods-Example"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0AEE99A309977BD12A049FF48AF9BA4B"
BuildableName = "Pods_Example.framework"
BlueprintName = "Pods-Example"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -1,26 +0,0 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
@@ -1,29 +0,0 @@
# Acknowledgements
This application makes use of the following third party libraries:
## Siren
The MIT License (MIT)
Copyright (c) 2015 Arthur Ariel Sabintsev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Generated by CocoaPods - https://cocoapods.org
@@ -1,61 +0,0 @@
<?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>PreferenceSpecifiers</key>
<array>
<dict>
<key>FooterText</key>
<string>This application makes use of the following third party libraries:</string>
<key>Title</key>
<string>Acknowledgements</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>The MIT License (MIT)
Copyright (c) 2015 Arthur Ariel Sabintsev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
</string>
<key>License</key>
<string>MIT</string>
<key>Title</key>
<string>Siren</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Generated by CocoaPods - https://cocoapods.org</string>
<key>Title</key>
<string></string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
</array>
<key>StringsTable</key>
<string>Acknowledgements</string>
<key>Title</key>
<string>Acknowledgements</string>
</dict>
</plist>
@@ -1,5 +0,0 @@
#import <Foundation/Foundation.h>
@interface PodsDummy_Pods_Example_Tests : NSObject
@end
@implementation PodsDummy_Pods_Example_Tests
@end
@@ -1,186 +0,0 @@
#!/bin/sh
set -e
set -u
set -o pipefail
function on_error {
echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
}
trap 'on_error $LINENO' ERR
if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
# If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
# frameworks to, so exit 0 (signalling the script phase was successful).
exit 0
fi
echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
BCSYMBOLMAP_DIR="BCSymbolMaps"
# This protects against multiple targets copying the same framework dependency at the same time. The solution
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
# Copies and strips a vendored framework
install_framework()
{
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
local source="${BUILT_PRODUCTS_DIR}/$1"
elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
elif [ -r "$1" ]; then
local source="$1"
fi
local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
if [ -L "${source}" ]; then
echo "Symlinked..."
source="$(readlink "${source}")"
fi
if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then
# Locate and install any .bcsymbolmaps if present, and remove them from the .framework before the framework is copied
find "${source}/${BCSYMBOLMAP_DIR}" -name "*.bcsymbolmap"|while read f; do
echo "Installing $f"
install_bcsymbolmap "$f" "$destination"
rm "$f"
done
rmdir "${source}/${BCSYMBOLMAP_DIR}"
fi
# Use filter instead of exclude so missing patterns don't throw errors.
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
local basename
basename="$(basename -s .framework "$1")"
binary="${destination}/${basename}.framework/${basename}"
if ! [ -r "$binary" ]; then
binary="${destination}/${basename}"
elif [ -L "${binary}" ]; then
echo "Destination binary is symlinked..."
dirname="$(dirname "${binary}")"
binary="${dirname}/$(readlink "${binary}")"
fi
# Strip invalid architectures so "fat" simulator / device frameworks work on device
if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then
strip_invalid_archs "$binary"
fi
# Resign the code if required by the build settings to avoid unstable apps
code_sign_if_enabled "${destination}/$(basename "$1")"
# Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.
if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then
local swift_runtime_libs
swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u)
for lib in $swift_runtime_libs; do
echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
code_sign_if_enabled "${destination}/${lib}"
done
fi
}
# Copies and strips a vendored dSYM
install_dsym() {
local source="$1"
warn_missing_arch=${2:-true}
if [ -r "$source" ]; then
# Copy the dSYM into the targets temp dir.
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}"
local basename
basename="$(basename -s .dSYM "$source")"
binary_name="$(ls "$source/Contents/Resources/DWARF")"
binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}"
# Strip invalid architectures from the dSYM.
if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then
strip_invalid_archs "$binary" "$warn_missing_arch"
fi
if [[ $STRIP_BINARY_RETVAL == 0 ]]; then
# Move the stripped file into its final destination.
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}"
else
# The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing.
mkdir -p "${DWARF_DSYM_FOLDER_PATH}"
touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM"
fi
fi
}
# Used as a return value for each invocation of `strip_invalid_archs` function.
STRIP_BINARY_RETVAL=0
# Strip invalid architectures
strip_invalid_archs() {
binary="$1"
warn_missing_arch=${2:-true}
# Get architectures for current target binary
binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)"
# Intersect them with the architectures we are building for
intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)"
# If there are no archs supported by this binary then warn the user
if [[ -z "$intersected_archs" ]]; then
if [[ "$warn_missing_arch" == "true" ]]; then
echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)."
fi
STRIP_BINARY_RETVAL=1
return
fi
stripped=""
for arch in $binary_archs; do
if ! [[ "${ARCHS}" == *"$arch"* ]]; then
# Strip non-valid architectures in-place
lipo -remove "$arch" -output "$binary" "$binary"
stripped="$stripped $arch"
fi
done
if [[ "$stripped" ]]; then
echo "Stripped $binary of architectures:$stripped"
fi
STRIP_BINARY_RETVAL=0
}
# Copies the bcsymbolmap files of a vendored framework
install_bcsymbolmap() {
local bcsymbolmap_path="$1"
local destination="${BUILT_PRODUCTS_DIR}"
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"
}
# Signs a framework with the provided identity
code_sign_if_enabled() {
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
# Use the current code_sign_identity
echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'"
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
code_sign_cmd="$code_sign_cmd &"
fi
echo "$code_sign_cmd"
eval "$code_sign_cmd"
fi
}
if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "${BUILT_PRODUCTS_DIR}/Siren/Siren.framework"
fi
if [[ "$CONFIGURATION" == "Release" ]]; then
install_framework "${BUILT_PRODUCTS_DIR}/Siren/Siren.framework"
fi
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
wait
fi
@@ -1,16 +0,0 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
FOUNDATION_EXPORT double Pods_Example_TestsVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_Example_TestsVersionString[];
@@ -1,16 +0,0 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Siren"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Siren/Siren.framework/Headers"
LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift "$(PLATFORM_DIR)/Developer/Library/Frameworks" '@executable_path/Frameworks' '@loader_path/Frameworks'
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Siren/Siren.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Siren"
OTHER_LDFLAGS = $(inherited) -framework "Siren"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
@@ -1,6 +0,0 @@
framework module Pods_Example_Tests {
umbrella header "Pods-Example-Tests-umbrella.h"
export *
module * { export * }
}
@@ -1,16 +0,0 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Siren"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Siren/Siren.framework/Headers"
LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift "$(PLATFORM_DIR)/Developer/Library/Frameworks" '@executable_path/Frameworks' '@loader_path/Frameworks'
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Siren/Siren.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Siren"
OTHER_LDFLAGS = $(inherited) -framework "Siren"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
@@ -1,26 +0,0 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
@@ -1,29 +0,0 @@
# Acknowledgements
This application makes use of the following third party libraries:
## Siren
The MIT License (MIT)
Copyright (c) 2015 Arthur Ariel Sabintsev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Generated by CocoaPods - https://cocoapods.org
@@ -1,61 +0,0 @@
<?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>PreferenceSpecifiers</key>
<array>
<dict>
<key>FooterText</key>
<string>This application makes use of the following third party libraries:</string>
<key>Title</key>
<string>Acknowledgements</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>The MIT License (MIT)
Copyright (c) 2015 Arthur Ariel Sabintsev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
</string>
<key>License</key>
<string>MIT</string>
<key>Title</key>
<string>Siren</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Generated by CocoaPods - https://cocoapods.org</string>
<key>Title</key>
<string></string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
</array>
<key>StringsTable</key>
<string>Acknowledgements</string>
<key>Title</key>
<string>Acknowledgements</string>
</dict>
</plist>
@@ -1,5 +0,0 @@
#import <Foundation/Foundation.h>
@interface PodsDummy_Pods_Example : NSObject
@end
@implementation PodsDummy_Pods_Example
@end
@@ -1,186 +0,0 @@
#!/bin/sh
set -e
set -u
set -o pipefail
function on_error {
echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
}
trap 'on_error $LINENO' ERR
if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
# If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
# frameworks to, so exit 0 (signalling the script phase was successful).
exit 0
fi
echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
BCSYMBOLMAP_DIR="BCSymbolMaps"
# This protects against multiple targets copying the same framework dependency at the same time. The solution
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
# Copies and strips a vendored framework
install_framework()
{
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
local source="${BUILT_PRODUCTS_DIR}/$1"
elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
elif [ -r "$1" ]; then
local source="$1"
fi
local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
if [ -L "${source}" ]; then
echo "Symlinked..."
source="$(readlink "${source}")"
fi
if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then
# Locate and install any .bcsymbolmaps if present, and remove them from the .framework before the framework is copied
find "${source}/${BCSYMBOLMAP_DIR}" -name "*.bcsymbolmap"|while read f; do
echo "Installing $f"
install_bcsymbolmap "$f" "$destination"
rm "$f"
done
rmdir "${source}/${BCSYMBOLMAP_DIR}"
fi
# Use filter instead of exclude so missing patterns don't throw errors.
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
local basename
basename="$(basename -s .framework "$1")"
binary="${destination}/${basename}.framework/${basename}"
if ! [ -r "$binary" ]; then
binary="${destination}/${basename}"
elif [ -L "${binary}" ]; then
echo "Destination binary is symlinked..."
dirname="$(dirname "${binary}")"
binary="${dirname}/$(readlink "${binary}")"
fi
# Strip invalid architectures so "fat" simulator / device frameworks work on device
if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then
strip_invalid_archs "$binary"
fi
# Resign the code if required by the build settings to avoid unstable apps
code_sign_if_enabled "${destination}/$(basename "$1")"
# Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.
if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then
local swift_runtime_libs
swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u)
for lib in $swift_runtime_libs; do
echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
code_sign_if_enabled "${destination}/${lib}"
done
fi
}
# Copies and strips a vendored dSYM
install_dsym() {
local source="$1"
warn_missing_arch=${2:-true}
if [ -r "$source" ]; then
# Copy the dSYM into the targets temp dir.
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}"
local basename
basename="$(basename -s .dSYM "$source")"
binary_name="$(ls "$source/Contents/Resources/DWARF")"
binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}"
# Strip invalid architectures from the dSYM.
if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then
strip_invalid_archs "$binary" "$warn_missing_arch"
fi
if [[ $STRIP_BINARY_RETVAL == 0 ]]; then
# Move the stripped file into its final destination.
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}"
else
# The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing.
mkdir -p "${DWARF_DSYM_FOLDER_PATH}"
touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM"
fi
fi
}
# Used as a return value for each invocation of `strip_invalid_archs` function.
STRIP_BINARY_RETVAL=0
# Strip invalid architectures
strip_invalid_archs() {
binary="$1"
warn_missing_arch=${2:-true}
# Get architectures for current target binary
binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)"
# Intersect them with the architectures we are building for
intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)"
# If there are no archs supported by this binary then warn the user
if [[ -z "$intersected_archs" ]]; then
if [[ "$warn_missing_arch" == "true" ]]; then
echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)."
fi
STRIP_BINARY_RETVAL=1
return
fi
stripped=""
for arch in $binary_archs; do
if ! [[ "${ARCHS}" == *"$arch"* ]]; then
# Strip non-valid architectures in-place
lipo -remove "$arch" -output "$binary" "$binary"
stripped="$stripped $arch"
fi
done
if [[ "$stripped" ]]; then
echo "Stripped $binary of architectures:$stripped"
fi
STRIP_BINARY_RETVAL=0
}
# Copies the bcsymbolmap files of a vendored framework
install_bcsymbolmap() {
local bcsymbolmap_path="$1"
local destination="${BUILT_PRODUCTS_DIR}"
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"
}
# Signs a framework with the provided identity
code_sign_if_enabled() {
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
# Use the current code_sign_identity
echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'"
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
code_sign_cmd="$code_sign_cmd &"
fi
echo "$code_sign_cmd"
eval "$code_sign_cmd"
fi
}
if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "${BUILT_PRODUCTS_DIR}/Siren/Siren.framework"
fi
if [[ "$CONFIGURATION" == "Release" ]]; then
install_framework "${BUILT_PRODUCTS_DIR}/Siren/Siren.framework"
fi
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
wait
fi
@@ -1,129 +0,0 @@
#!/bin/sh
set -e
set -u
set -o pipefail
function on_error {
echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
}
trap 'on_error $LINENO' ERR
if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then
# If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy
# resources to, so exit 0 (signalling the script phase was successful).
exit 0
fi
mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
> "$RESOURCES_TO_COPY"
XCASSET_FILES=()
# This protects against multiple targets copying the same framework dependency at the same time. The solution
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
case "${TARGETED_DEVICE_FAMILY:-}" in
1,2)
TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
;;
1)
TARGET_DEVICE_ARGS="--target-device iphone"
;;
2)
TARGET_DEVICE_ARGS="--target-device ipad"
;;
3)
TARGET_DEVICE_ARGS="--target-device tv"
;;
4)
TARGET_DEVICE_ARGS="--target-device watch"
;;
*)
TARGET_DEVICE_ARGS="--target-device mac"
;;
esac
install_resource()
{
if [[ "$1" = /* ]] ; then
RESOURCE_PATH="$1"
else
RESOURCE_PATH="${PODS_ROOT}/$1"
fi
if [[ ! -e "$RESOURCE_PATH" ]] ; then
cat << EOM
error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script.
EOM
exit 1
fi
case $RESOURCE_PATH in
*.storyboard)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
;;
*.xib)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
;;
*.framework)
echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel)
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
;;
*.xcmappingmodel)
echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true
xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
;;
*.xcassets)
ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH"
XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
;;
*)
echo "$RESOURCE_PATH" || true
echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
;;
esac
}
if [[ "$CONFIGURATION" == "Debug" ]]; then
install_resource "${PODS_ROOT}/../../Sources/Siren.bundle"
fi
if [[ "$CONFIGURATION" == "Release" ]]; then
install_resource "${PODS_ROOT}/../../Sources/Siren.bundle"
fi
mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then
mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
fi
rm -f "$RESOURCES_TO_COPY"
if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ]
then
# Find all other xcassets (this unfortunately includes those of path pods and other targets).
OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d)
while read line; do
if [[ $line != "${PODS_ROOT}*" ]]; then
XCASSET_FILES+=("$line")
fi
done <<<"$OTHER_XCASSETS"
if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then
printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
else
printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist"
fi
fi
@@ -1,16 +0,0 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
FOUNDATION_EXPORT double Pods_ExampleVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_ExampleVersionString[];
@@ -1,16 +0,0 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Siren"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Siren/Siren.framework/Headers"
LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks'
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Siren/Siren.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Siren"
OTHER_LDFLAGS = $(inherited) -framework "Siren"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
@@ -1,6 +0,0 @@
framework module Pods_Example {
umbrella header "Pods-Example-umbrella.h"
export *
module * { export * }
}
@@ -1,16 +0,0 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Siren"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Siren/Siren.framework/Headers"
LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks'
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Siren/Siren.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Siren"
OTHER_LDFLAGS = $(inherited) -framework "Siren"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
-26
View File
@@ -1,26 +0,0 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>6.0.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
-5
View File
@@ -1,5 +0,0 @@
#import <Foundation/Foundation.h>
@interface PodsDummy_Siren : NSObject
@end
@implementation PodsDummy_Siren
@end
-12
View File
@@ -1,12 +0,0 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
-16
View File
@@ -1,16 +0,0 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
FOUNDATION_EXPORT double SirenVersionNumber;
FOUNDATION_EXPORT const unsigned char SirenVersionString[];
@@ -1,13 +0,0 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Siren
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/../..
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
-6
View File
@@ -1,6 +0,0 @@
framework module Siren {
umbrella header "Siren-umbrella.h"
export *
module * { export * }
}
@@ -1,13 +0,0 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Siren
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/../..
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
-9
View File
@@ -1,9 +0,0 @@
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Siren
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/../..
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
-819
View File
@@ -1,819 +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
final class SirenTests: XCTestCase {
var siren: Siren = Siren.shared
}
// MARK: - API
extension SirenTests {
func testAPIDefaultsToUnitedStatesAppStore() {
XCTAssertEqual(siren.apiManager.country, AppStoreCountry.unitedStates)
}
}
// MARK: - Updates
extension SirenTests {
func testSingleDigitVersionUpdate() {
siren.currentInstalledVersion = "1"
XCTAssertTrue(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "2"))
XCTAssertTrue(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "2.0"))
XCTAssertTrue(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "2.0.0"))
XCTAssertTrue(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "2.0.0.0"))
XCTAssertFalse(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "0"))
XCTAssertFalse(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "0.9"))
XCTAssertFalse(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "0.0.9"))
XCTAssertFalse(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "0.0.0.9"))
}
func testDoubleDigitVersionUpdate() {
siren.currentInstalledVersion = "1.0"
XCTAssertTrue(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "2"))
XCTAssertTrue(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "2.0"))
XCTAssertTrue(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "2.0.0"))
XCTAssertTrue(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "2.0.0.0"))
XCTAssertFalse(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "0"))
XCTAssertFalse(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "0.9"))
XCTAssertFalse(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "0.0.9"))
XCTAssertFalse(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "0.0.0.9"))
}
func testTripleDigitVersionUpdate() {
siren.currentInstalledVersion = "1.0.0"
XCTAssertTrue(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "2"))
XCTAssertTrue(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "2.0"))
XCTAssertTrue(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "2.0.0"))
XCTAssertTrue(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "2.0.0.0"))
XCTAssertFalse(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "0"))
XCTAssertFalse(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "0.9"))
XCTAssertFalse(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "0.0.9"))
XCTAssertFalse(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "0.0.0.9"))
}
func testQuadrupleDigitVersionUpdate() {
siren.currentInstalledVersion = "1.0.0"
XCTAssertTrue(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "2"))
XCTAssertTrue(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "2.0"))
XCTAssertTrue(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "2.0.0"))
XCTAssertTrue(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "2.0.0.0"))
XCTAssertFalse(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "0"))
XCTAssertFalse(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "0.9"))
XCTAssertFalse(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "0.0.9"))
XCTAssertFalse(DataParser.isAppStoreVersionNewer(installedVersion: siren.currentInstalledVersion,
appStoreVersion: "0.0.0.9"))
}
}
// MARK: - Localization
extension SirenTests {
func testArabicLocalization() {
let language: Localization.Language = .arabic
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "التحديث متوفر")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "المرة التالية")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "تخطى عن هذه النسخة")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "تحديث")
}
func testArmenianLocalization() {
let language: Localization.Language = .armenian
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Թարմացումը հասանելի Է")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Հաջորդ անգամ")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Բաց թողնել այս տարբերակը")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Թարմացնել")
}
func testBasqueLocalization() {
let language: Localization.Language = .basque
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Eguneratzea erabilgarri")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Hurrengo batean")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Bertsio honetatik jauzi egin")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Eguneratu")
}
func testChineseSimplifiedLocalization() {
let language: Localization.Language = .chineseSimplified
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "更新可用")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "下一次")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "跳过此版本")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "更新")
}
func testChineseTraditionalLocalization() {
let language: Localization.Language = .chineseTraditional
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "有更新可用")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "下次")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "跳過此版本")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "更新")
}
func testCroatianLocalization() {
let language: Localization.Language = .croatian
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Novo ažuriranje je dostupno")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Sljedeći put")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Preskoči ovu verziju")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Ažuriraj")
}
func testCzechLocalization() {
let language: Localization.Language = .czech
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Aktualizace dostupná")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Příště")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Přeskočit tuto verzi")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Aktualizovat")
}
func testDanishLocalization() {
let language: Localization.Language = .danish
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Tilgængelig opdatering")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Næste gang")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Spring denne version over")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Opdater")
}
func testDutchLocalization() {
let language: Localization.Language = .dutch
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Update beschikbaar")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Volgende keer")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Sla deze versie over")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Updaten")
}
func testEstonianLocalization() {
let language: Localization.Language = .estonian
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Uuendus saadaval")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Järgmisel korral")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Jäta see version vahele")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Uuenda")
}
func testFinnishLocalization() {
let language: Localization.Language = .finnish
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Päivitys saatavilla")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Ensi kerralla")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Jätä tämä versio väliin")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Päivitys")
}
func testFrenchLocalization() {
let language: Localization.Language = .french
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Mise à jour disponible")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "La prochaine fois")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Sauter cette version")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Mettre à jour")
}
func testGermanLocalization() {
let language: Localization.Language = .german
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Update erhältlich")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Später")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Diese Version überspringen")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Update")
}
func testGreekLocalization() {
let language: Localization.Language = .greek
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Διαθέσιμη Ενημέρωση")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Άλλη φορά")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Αγνόησε αυτήν την έκδοση")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Αναβάθμιση")
}
func testHebrewLocalization() {
let language: Localization.Language = .hebrew
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "עדכון זמין")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "בפעם הבאה")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "דלג על גרסה זו")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "עדכן")
}
func testHungarianLocalization() {
let language: Localization.Language = .hungarian
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Új frissítés érhető el")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Később")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Ennél a verziónál ne figyelmeztessen")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Frissítés")
}
func testIndonesianLocalization() {
let language: Localization.Language = .indonesian
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Pembaruan Tersedia")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Lain kali")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Lewati versi ini")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Perbarui")
}
func testItalianLocalization() {
let language: Localization.Language = .italian
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Aggiornamento disponibile")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "La prossima volta")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Salta questa versione")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Aggiorna")
}
func testJapaneseLocalization() {
let language: Localization.Language = .japanese
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "アップデートのお知らせ")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "次回")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "このバージョンをスキップ")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "アップデート")
}
func testKoreanLocalization() {
let language: Localization.Language = .korean
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "업데이트 가능")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "다음에")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "이 버전 건너뜀")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "업데이트")
}
func testLatvianLocalization() {
let language: Localization.Language = .latvian
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Atjauninājums pieejams")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Nākamreiz")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Izlaist šo versiju")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Atjaunināt")
}
func testLithuanianLocalization() {
let language: Localization.Language = .lithuanian
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Atnaujinimas")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Kitą kartą")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Praleisti šią versiją")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Atnaujinti")
}
func testMalayLocalization() {
let language: Localization.Language = .malay
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Versi Terkini")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Lain kali")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Langkau versi ini")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Muat turun")
}
func testNorwegianLocalization() {
let language: Localization.Language = .norwegian
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Oppdatering tilgjengelig")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Neste gang")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Hopp over denne versjonen")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Oppdater")
}
func testPersianLocalization() {
let language: Localization.Language = .persian
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "بروزرسانی در دسترس")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "دفعه بعد")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "رد این نسخه")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "بروزرسانی")
}
func testPersianAfghanistanLocalization() {
let language: Localization.Language = .persianAfghanistan
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "بروزرسانی در دسترس")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "دگر بار")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "رد این نسخه")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "بروزرسانی")
}
func testPersianIranLocalization() {
let language: Localization.Language = .persianIran
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "بروزرسانی در دسترس")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "دفعه بعد")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "رد این نسخه")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "بروزرسانی")
}
func testPolishLocalization() {
let language: Localization.Language = .polish
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Aktualizacja dostępna")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Następnym razem")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Pomiń wersję")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Zaktualizuj")
}
func testPortugueseBrazilLocalization() {
let language: Localization.Language = .portugueseBrazil
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Atualização disponível")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Próxima vez")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Ignorar esta versão")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Atualizar")
}
func testPortuguesePortugalLocalization() {
let language: Localization.Language = .portuguesePortugal
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Nova actualização disponível")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Próxima vez")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Ignorar esta versão")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Actualizar")
}
func testRomanianLocalization() {
let language: Localization.Language = .romanian
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Actualizare disponibilă")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Data viitoare")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Ignor această versiune")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Actualizare")
}
func testRussianLocalization() {
let language: Localization.Language = .russian
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Доступно обновление")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "В следующий раз")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Пропустить эту версию")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Обновить")
}
func testSerbianCyrillicLocalization() {
let language: Localization.Language = .serbianCyrillic
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Ажурирање доступно")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Следећи пут")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Прескочи ову верзију")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Ажурирај")
}
func testSerbianLatinLocalization() {
let language: Localization.Language = .serbianLatin
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Ažuriranje dostupno")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Sledeći put")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Preskoči ovu verziju")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Ažuriraj")
}
func testSlovenianLocalization() {
let language: Localization.Language = .slovenian
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Posodobitev aplikacije")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Naslednjič")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Ne želim")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Namesti")
}
func testSpanishLocalization() {
let language: Localization.Language = .spanish
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Actualización disponible")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "La próxima vez")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Saltar esta versión")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Actualizar")
}
func testSwedishLocalization() {
let language: Localization.Language = .swedish
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Tillgänglig uppdatering")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Nästa gång")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Hoppa över den här versionen")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Uppdatera")
}
func testThaiLocalization() {
let language: Localization.Language = .thai
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "มีการอัพเดท")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "ไว้คราวหน้า")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "ข้ามเวอร์ชั่นนี้")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "อัพเดท")
}
func testTurkishLocalization() {
let language: Localization.Language = .turkish
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Güncelleme Mevcut")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Daha sonra")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Boşver")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Güncelle")
}
func testUkrainianLocalization() {
let language: Localization.Language = .ukrainian
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Доступне Оновлення")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Наступного разу")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Пропустити версію")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Оновити")
}
func testUrduLocalization() {
let language: Localization.Language = .urdu
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "نیا اپڈیٹ")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "اگلی مرتبہ")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "اس ورزن کو چھوڑ دیں")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "اپڈیٹ کریں")
}
func testVietnameseLocalization() {
let language: Localization.Language = .vietnamese
// Update Available
XCTAssertEqual(Bundle.localizedString(forKey: "Update Available", andForceLocalization: language), "Cập nhật mới")
// Next time
XCTAssertEqual(Bundle.localizedString(forKey: "Next time", andForceLocalization: language), "Lần tới")
// Skip this version
XCTAssertEqual(Bundle.localizedString(forKey: "Skip this version", andForceLocalization: language), "Bỏ qua phiên bản này")
// Update
XCTAssertEqual(Bundle.localizedString(forKey: "Update", andForceLocalization: language), "Cập nhật")
}
}
+1 -6
View File
@@ -1,10 +1,5 @@
// swift-tools-version:5.5
import PackageDescription
let package = Package(
name: "Siren",
platforms: [.iOS(.v13), .tvOS(.v13)],
products: [.library(name: "Siren", targets: ["Siren"])],
targets: [.target(name: "Siren", path: "Sources", resources: [.copy("Siren.bundle"), .copy("PrivacyInfo.xcprivacy")])],
swiftLanguageVersions: [.v5]
name: "Siren"
)
+156 -164
View File
@@ -1,218 +1,210 @@
# Siren 🚨
# Siren
### Notify users when a new version of your app is available and prompt them to upgrade.
![Swift Support](https://img.shields.io/badge/Swift-5.5-orange.svg) [![CocoaPods](https://img.shields.io/cocoapods/v/Siren.svg)](https://cocoapods.org/pods/Siren) [![SwiftPM Compatible](https://img.shields.io/badge/SwiftPM-compatible-brightgreen.svg)](https://swift.org/package-manager/) [![Accio supported](https://img.shields.io/badge/Accio-supported-0A7CF5.svg?style=flat)](https://github.com/JamitLabs/Accio)
![Travis-CI](https://travis-ci.org/ArtSabintsev/Siren.svg?branch=master) ![Cocoapods](https://img.shields.io/cocoapods/v/Siren.svg) ![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat) ![SwiftPM Compatible](https://img.shields.io/badge/SwiftPM-Compatible-brightgreen.svg)
---
# Important Information
I stopped being a proactive iOS engineer in 2021. For the time being, I will keep this library maintained for the community, but I will not be proactively adding features.
---
# Table of Contents
- [**Meta**](https://github.com/ArtSabintsev/Siren#meta)
- [About](https://github.com/ArtSabintsev/Siren#about)
- [Features](https://github.com/ArtSabintsev/Siren#features)
- [Screenshots](https://github.com/ArtSabintsev/Siren#screenshots)
- [Ports](https://github.com/ArtSabintsev/Siren#ports)
- [**Installation and Integration**](https://github.com/ArtSabintsev/Siren#installation-and-integration)
- [Installation Instructions](https://github.com/ArtSabintsev/Siren#installation-instructions)
- [Implementation Examples](https://github.com/ArtSabintsev/Siren#implementation-examples)
- [**Device-Specific Checks**](https://github.com/ArtSabintsev/Siren#device-specific-checks)
- [Localization](https://github.com/ArtSabintsev/Siren#localization)
- [Device Compatibility](https://github.com/ArtSabintsev/Siren#device-compatibility)
- [**Testing**](https://github.com/ArtSabintsev/Siren#testing)
- [Testing Siren Locally](https://github.com/ArtSabintsev/Siren#testing-siren-locally)
- [Words of Caution](https://github.com/ArtSabintsev/Siren#words-of-caution)
- [**App Submission**](https://github.com/ArtSabintsev/Siren#app-submission)
- [App Store Review](https://github.com/ArtSabintsev/Siren#app-store-review)
- [Phased Releases](https://github.com/ArtSabintsev/Siren#phased-releases)
- [**Attribution**](https://github.com/ArtSabintsev/Siren#attribution)
- [Special Thanks](https://github.com/ArtSabintsev/Siren#special-thanks)
- [Creator](https://github.com/ArtSabintsev/Siren#creator)
---
# Meta
## About
**Siren** checks a user's currently installed version of your iOS app against the version that is currently available in the App Store.
If a new version is available, a language localized 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 through alternative means, such as a custom user interface.
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**](https://semver.org/) system.
- Canonical Semantic Versioning uses 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 built to work with the [**Semantic Versioning**](http://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)
- Siren also supports 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)
## 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).
## Features
### Current Features
- [x] Compatible with iOS 13+ and tvOS 13+
- [x] CocoaPods and Swift Package Manager Support (see [Installation Instructions](https://github.com/ArtSabintsev/Siren#installation-instructions))
- [x] Three Types of Alerts (see [Screenshots](https://github.com/ArtSabintsev/Siren#screenshots))
- [x] Highly Customizable Presentation Rules (see [Implementation Examples](https://github.com/ArtSabintsev/Siren#implementation-examples))
- [x] Localized for 40+ Languages (see [Localization](https://github.com/ArtSabintsev/Siren#localization))
- [x] Device Compatibility Check (see [Device Compatibility](https://github.com/ArtSabintsev/Siren#device-compatibility))
---
- [x] CocoaPods Support
- [x] Carthage Support
- [x] Swift Package Manager Support
- [x] Localized for 20+ 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!
## 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 `Rules.AlertType` enum.
- These options are controlled by the `SirenAlertType` enum.
<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">
<img src="https://github.com/ArtSabintsev/Harpy/blob/master/samplePictures/picForcedUpdate.png?raw=true" height=480">
<img src="https://github.com/ArtSabintsev/Harpy/blob/master/samplePictures/picOptionalUpdate.png?raw=true" height=480">
<img src="https://github.com/ArtSabintsev/Harpy/blob/master/samplePictures/picSkippedUpdate.png?raw=true" height=480">
## 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.
- As of December 2018, Harpy has been deprecated in favor of Siren.
- **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.
---
# Installation and Integration
## Installation Instructions
| Swift Version | Branch Name | Will Continue to Receive Updates?
| ------------- | ------------- | -------------
| 5.5+ | master | **Yes**
| 5.1-5.4 | swift5.4 | No
| 5.0 | swift5.0 | No
| 4.2 | swift4.2 | No
| 4.1 | swift4.1 | No
| 3.2 | swift3.2 | No
| 3.1 | swift3.1 | No
| 2.3 | swift2.3 | No
### CocoaPods
```ruby
pod 'Siren' # Swift 5.5+
pod 'Siren', :git => 'https://github.com/ArtSabintsev/Siren.git', :branch => 'swift5.4' # Swift 5.1-5.4
pod 'Siren', :git => 'https://github.com/ArtSabintsev/Siren.git', :branch => 'swift5.0' # Swift 5.0
pod 'Siren', :git => 'https://github.com/ArtSabintsev/Siren.git', :branch => 'swift4.2' # 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
pod 'Siren'
```
For Swift 2.3 support:
```swift
pod 'Siren', :git => 'https://github.com/ArtSabintsev/Siren.git', :branch => 'swift2.3'
```
For Swift 3 support:
```swift
pod 'Siren', :git => 'https://github.com/ArtSabintsev/Siren.git', :branch => 'swift3'
```
### Carthage
``` swift
github "ArtSabintsev/Siren"
```
For Swift 2.3 support:
``` swift
github "ArtSabintsev/Siren" "swift2.3"
```
For Swift 3 support:
``` swift
github "ArtSabintsev/Siren" "swift3"
```
### Swift Package Manager
```swift
.Package(url: "https://github.com/ArtSabintsev/Siren.git", majorVersion: 6)
.Package(url: "https://github.com/ArtSabintsev/Siren.git", majorVersion: 0)
```
## Implementation Examples
Implementing Siren is as easy as adding two lines of code to your app in **either** `AppDelegate.swift` or `SceneDelegate.swift`:
### Manual
1. [Download Siren](//github.com/ArtSabintsev/Siren/archive/master.zip).
2. Copy the `Siren` folder into your project.
## Setup
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.
```Swift
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
/* Siren code should go below window?.makeKeyAndVisible() */
// Siren is a singleton
let siren = Siren.sharedInstance
// Optional: Defaults to .Option
siren.alertType = <#SirenAlertType_Enum_Value#>
/*
Replace .Immediately with .Daily or .Weekly to specify a maximum daily or weekly frequency for version
checks.
*/
siren.checkVersion(.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.sharedInstance.checkVersion(.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 SirenAlertType.Force
*/
Siren.sharedInstance.checkVersion(.Immediately)
}
```
And you're all set!
### Prompting for Updates without Alerts
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:
### AppDelegate.swift Example
```swift
import Siren // Line 1
import UIKit
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
...
siren.delegate = self
siren.alertType = .None
...
}
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
window?.makeKeyAndVisible()
Siren.shared.wail() // Line 2
return true
extension AppDelegate: SirenDelegate {
// Returns a localized message to this delegate method upon performing a successful version check
func sirenDidDetectNewVersionWithoutAlert(message: String) {
print("\(message)")
}
}
```
### SceneDelegate.swift Example
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
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
import Siren // Line 1
import UIKit
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
window?.makeKeyAndVisible()
Siren.shared.wail() // Line 2
return true
}
}
/* Siren defaults to SirenAlertType.Option for all updates */
siren.sharedInstance().revisionUpdateAlertType = <#SirenAlertType_Enum_Value#>
siren.sharedInstance().patchUpdateAlertType = <#SirenAlertType_Enum_Value#>
siren.sharedInstance().minorUpdateAlertType = <#SirenAlertType_Enum_Value#>
siren.sharedInstance().majorUpdateAlertType = <#SirenAlertType_Enum_Value#>
```
Siren also has plenty of customization options. All examples can be found in the Example Project's [**AppDelegate**](https://github.com/ArtSabintsev/Siren/blob/master/Example/Example/AppDelegate.swift) file. Uncomment the example you'd like to test.
## 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.
---
# Device-Specific Checks
``` 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
}
```
## Localization
Siren is localized for the following languages:
Siren is localized for Arabic, Armenian, Basque, Chinese (Simplified), Chinese (Traditional), Danish, Dutch, English, Estonian, French, German, Hebrew, Hungarian, Italian, Japanese, Korean, Latvian, Lithuanian, Malay, Polish, Portuguese (Brazil), Portuguese (Portugal), Russian, Slovenian, Swedish, Spanish, Thai, Turkish, Vietnamese.
Arabic, Armenian, Basque, Chinese (Simplified and Traditional), Croatian, Czech, Danish, Dutch, English, Estonian, Finnish, French, German, Greek, Hebrew, Hungarian, Indonesian, Italian, Japanese, Korean, Latvian, Lithuanian, Malay, Norwegian (Bokmål), Persian (Afghanistan, Iran, Persian), Polish, Portuguese (Brazil and Portugal), Romanian, Russian, Serbian (Cyrillic and Latin), Slovenian, 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).
If your user's device is set to one of the supported locales, an update message will appear in that language. If a locale is not supported, than the message will appear in English.
You may want the update dialog to *always* appear in a certain language, ignoring the user's device-specific setting. You can enable it like so:
You can enable it like this:
```swift
// In this example, we force the `Russian` language.
Siren.shared.presentationManager = PresentationManager(forceLanguageLocalization: .russian)
Siren.sharedInstance.forceLanguageLocalization = SirenLanguageType.<#SirenLanguageType_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 with the one that is required by the app update. For example, if a user has iOS 11 installed on their device, but the app update requires iOS 12, 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 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.
---
## 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.
# Testing
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`.
## Testing Siren Locally
Temporarily change the version string in Xcode (within the `.xcodeproj` file) 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.
For your convenience, you may turn on debugging statements by setting `self.debugEnabled = true` before calling the `checkVersion()` method.
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 Facebook's Bundle ID: `com.facebook.Facebook`.
## 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`.
---
# App Submission
## App Store Review
## 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 the phased rollout is complete.
- You can remotely disable Siren until the rollout is done using your own API / backend logic.
---
# Attribution
## Special Thanks
A massive shout-out and thank you goes to the following folks:
- [Aaron Brager](https://twitter.com/@getaaron) for motivating me and assisting me in building the initial proof-of-concept of Siren (based on [Harpy](https:github.com/ArtSabintsev/Harpy)) back in 2015. Without him, Siren may never have been built.
- All of [Harpy's Contributors](https://github.com/ArtSabintsev/Harpy/graphs/contributors) for helping building the feature set from 2012-2015 that was used as the basis for the first version of Siren.
- All of [Siren's Contributors](https://github.com/ArtSabintsev/Siren/graphs/contributors) for helping make Siren as powerful and bug-free as it currently is today.
## Creator
[Arthur Ariel Sabintsev](http://www.sabintsev.com/)
## Created and maintained by
[Arthur Ariel Sabintsev](http://www.sabintsev.com/) & [Aaron Brager](http://twitter.com/getaaron)
+610
View File
@@ -0,0 +1,610 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
558455CF1C6690B4004BE492 /* Siren.h in Headers */ = {isa = PBXBuildFile; fileRef = 558455CE1C6690B4004BE492 /* Siren.h */; settings = {ATTRIBUTES = (Public, ); }; };
558455D31C6690B4004BE492 /* Siren.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 558455CC1C6690B4004BE492 /* Siren.framework */; };
558455D41C6690B4004BE492 /* Siren.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 558455CC1C6690B4004BE492 /* Siren.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
558455D91C6690D9004BE492 /* Siren.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E1005EF1A5DD04500509B14 /* Siren.swift */; };
558455DA1C6690DC004BE492 /* Siren.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 8E1005EE1A5DD04500509B14 /* Siren.bundle */; };
8E1005E71A5DD02300509B14 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E1005DF1A5DD02300509B14 /* AppDelegate.swift */; };
8E1005E81A5DD02300509B14 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8E1005E01A5DD02300509B14 /* LaunchScreen.xib */; };
8E1005E91A5DD02300509B14 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8E1005E21A5DD02300509B14 /* Main.storyboard */; };
8E1005EA1A5DD02300509B14 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8E1005E41A5DD02300509B14 /* Images.xcassets */; };
8E1005EC1A5DD02300509B14 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E1005E61A5DD02300509B14 /* ViewController.swift */; };
8E3A6C071D07CB6F00A8B7CF /* SirenTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E3A6C061D07CB6F00A8B7CF /* SirenTests.swift */; };
8E3A6C0E1D07CC7000A8B7CF /* Siren.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E1005EF1A5DD04500509B14 /* Siren.swift */; };
8E3A6C0F1D07CDF200A8B7CF /* Siren.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 8E1005EE1A5DD04500509B14 /* Siren.bundle */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
558455D11C6690B4004BE492 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 8EC391791A58B465001C121E /* Project object */;
proxyType = 1;
remoteGlobalIDString = 558455CB1C6690B4004BE492;
remoteInfo = Siren;
};
8E3A6C091D07CB6F00A8B7CF /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 8EC391791A58B465001C121E /* Project object */;
proxyType = 1;
remoteGlobalIDString = 8EC391801A58B465001C121E;
remoteInfo = "Sample App";
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
558455D81C6690B4004BE492 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
558455D41C6690B4004BE492 /* Siren.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
558455CC1C6690B4004BE492 /* Siren.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Siren.framework; sourceTree = BUILT_PRODUCTS_DIR; };
558455CE1C6690B4004BE492 /* Siren.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Siren.h; sourceTree = "<group>"; };
558455D01C6690B4004BE492 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8E1005DF1A5DD02300509B14 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
8E1005E11A5DD02300509B14 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
8E1005E31A5DD02300509B14 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
8E1005E41A5DD02300509B14 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
8E1005E51A5DD02300509B14 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8E1005E61A5DD02300509B14 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
8E1005EE1A5DD04500509B14 /* Siren.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Siren.bundle; path = ../../Siren/Siren.bundle; sourceTree = "<group>"; };
8E1005EF1A5DD04500509B14 /* Siren.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Siren.swift; path = ../../Siren/Siren.swift; sourceTree = "<group>"; };
8E3A6C041D07CB6F00A8B7CF /* SirenTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SirenTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
8E3A6C061D07CB6F00A8B7CF /* SirenTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SirenTests.swift; sourceTree = "<group>"; };
8E3A6C081D07CB6F00A8B7CF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8EC391811A58B465001C121E /* Sample App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Sample App.app"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
558455C81C6690B4004BE492 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
8E3A6C011D07CB6F00A8B7CF /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
8EC3917E1A58B465001C121E /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
558455D31C6690B4004BE492 /* Siren.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
558455CD1C6690B4004BE492 /* Siren */ = {
isa = PBXGroup;
children = (
8E1005EE1A5DD04500509B14 /* Siren.bundle */,
8E1005EF1A5DD04500509B14 /* Siren.swift */,
558455CE1C6690B4004BE492 /* Siren.h */,
558455D01C6690B4004BE492 /* Info.plist */,
);
path = Siren;
sourceTree = "<group>";
};
8E1005DE1A5DD02300509B14 /* Sample App */ = {
isa = PBXGroup;
children = (
8E1005DF1A5DD02300509B14 /* AppDelegate.swift */,
8E1005E61A5DD02300509B14 /* ViewController.swift */,
8E1005E01A5DD02300509B14 /* LaunchScreen.xib */,
8E1005E21A5DD02300509B14 /* Main.storyboard */,
8E1005E51A5DD02300509B14 /* Info.plist */,
8E1005E41A5DD02300509B14 /* Images.xcassets */,
);
path = "Sample App";
sourceTree = "<group>";
};
8E3A6C051D07CB6F00A8B7CF /* SirenTests */ = {
isa = PBXGroup;
children = (
8E3A6C061D07CB6F00A8B7CF /* SirenTests.swift */,
8E3A6C081D07CB6F00A8B7CF /* Info.plist */,
);
path = SirenTests;
sourceTree = "<group>";
};
8EC391781A58B465001C121E = {
isa = PBXGroup;
children = (
8E1005DE1A5DD02300509B14 /* Sample App */,
558455CD1C6690B4004BE492 /* Siren */,
8E3A6C051D07CB6F00A8B7CF /* SirenTests */,
8EC391821A58B465001C121E /* Products */,
);
sourceTree = "<group>";
};
8EC391821A58B465001C121E /* Products */ = {
isa = PBXGroup;
children = (
8EC391811A58B465001C121E /* Sample App.app */,
558455CC1C6690B4004BE492 /* Siren.framework */,
8E3A6C041D07CB6F00A8B7CF /* SirenTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
558455C91C6690B4004BE492 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
558455CF1C6690B4004BE492 /* Siren.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
558455CB1C6690B4004BE492 /* Siren */ = {
isa = PBXNativeTarget;
buildConfigurationList = 558455D71C6690B4004BE492 /* Build configuration list for PBXNativeTarget "Siren" */;
buildPhases = (
558455C71C6690B4004BE492 /* Sources */,
558455C81C6690B4004BE492 /* Frameworks */,
558455C91C6690B4004BE492 /* Headers */,
558455CA1C6690B4004BE492 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = Siren;
productName = Siren;
productReference = 558455CC1C6690B4004BE492 /* Siren.framework */;
productType = "com.apple.product-type.framework";
};
8E3A6C031D07CB6F00A8B7CF /* SirenTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 8E3A6C0D1D07CB6F00A8B7CF /* Build configuration list for PBXNativeTarget "SirenTests" */;
buildPhases = (
8E3A6C001D07CB6F00A8B7CF /* Sources */,
8E3A6C011D07CB6F00A8B7CF /* Frameworks */,
8E3A6C021D07CB6F00A8B7CF /* Resources */,
);
buildRules = (
);
dependencies = (
8E3A6C0A1D07CB6F00A8B7CF /* PBXTargetDependency */,
);
name = SirenTests;
productName = SirenTests;
productReference = 8E3A6C041D07CB6F00A8B7CF /* SirenTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
8EC391801A58B465001C121E /* Sample App */ = {
isa = PBXNativeTarget;
buildConfigurationList = 8EC391A01A58B466001C121E /* Build configuration list for PBXNativeTarget "Sample App" */;
buildPhases = (
8EC3917D1A58B465001C121E /* Sources */,
8EC3917E1A58B465001C121E /* Frameworks */,
8EC3917F1A58B465001C121E /* Resources */,
558455D81C6690B4004BE492 /* Embed Frameworks */,
);
buildRules = (
);
dependencies = (
558455D21C6690B4004BE492 /* PBXTargetDependency */,
);
name = "Sample App";
productName = Siren;
productReference = 8EC391811A58B465001C121E /* Sample App.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
8EC391791A58B465001C121E /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftMigration = 0700;
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = "Sabintsev iOS Projects";
TargetAttributes = {
558455CB1C6690B4004BE492 = {
CreatedOnToolsVersion = 7.2.1;
DevelopmentTeam = HT94948NDD;
LastSwiftMigration = 0800;
};
8E3A6C031D07CB6F00A8B7CF = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = HT94948NDD;
LastSwiftMigration = 0800;
TestTargetID = 8EC391801A58B465001C121E;
};
8EC391801A58B465001C121E = {
CreatedOnToolsVersion = 6.1.1;
DevelopmentTeam = HT94948NDD;
LastSwiftMigration = 0800;
};
};
};
buildConfigurationList = 8EC3917C1A58B465001C121E /* Build configuration list for PBXProject "Sample App" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 8EC391781A58B465001C121E;
productRefGroup = 8EC391821A58B465001C121E /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
8EC391801A58B465001C121E /* Sample App */,
558455CB1C6690B4004BE492 /* Siren */,
8E3A6C031D07CB6F00A8B7CF /* SirenTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
558455CA1C6690B4004BE492 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
558455DA1C6690DC004BE492 /* Siren.bundle in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
8E3A6C021D07CB6F00A8B7CF /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8E3A6C0F1D07CDF200A8B7CF /* Siren.bundle in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
8EC3917F1A58B465001C121E /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8E1005EA1A5DD02300509B14 /* Images.xcassets in Resources */,
8E1005E81A5DD02300509B14 /* LaunchScreen.xib in Resources */,
8E1005E91A5DD02300509B14 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
558455C71C6690B4004BE492 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
558455D91C6690D9004BE492 /* Siren.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
8E3A6C001D07CB6F00A8B7CF /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8E3A6C0E1D07CC7000A8B7CF /* Siren.swift in Sources */,
8E3A6C071D07CB6F00A8B7CF /* SirenTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
8EC3917D1A58B465001C121E /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8E1005EC1A5DD02300509B14 /* ViewController.swift in Sources */,
8E1005E71A5DD02300509B14 /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
558455D21C6690B4004BE492 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 558455CB1C6690B4004BE492 /* Siren */;
targetProxy = 558455D11C6690B4004BE492 /* PBXContainerItemProxy */;
};
8E3A6C0A1D07CB6F00A8B7CF /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 8EC391801A58B465001C121E /* Sample App */;
targetProxy = 8E3A6C091D07CB6F00A8B7CF /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
8E1005E01A5DD02300509B14 /* LaunchScreen.xib */ = {
isa = PBXVariantGroup;
children = (
8E1005E11A5DD02300509B14 /* Base */,
);
name = LaunchScreen.xib;
sourceTree = "<group>";
};
8E1005E21A5DD02300509B14 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
8E1005E31A5DD02300509B14 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
558455D51C6690B4004BE492 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = HT94948NDD;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = Siren/Info.plist;
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.com.siren.test;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 2.3;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
558455D61C6690B4004BE492 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = HT94948NDD;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = Siren/Info.plist;
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.com.siren.test;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 2.3;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
8E3A6C0B1D07CB6F00A8B7CF /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ANALYZER_NONNULL = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = HT94948NDD;
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = SirenTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.washingtonpost.SirenTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Sample App.app/Sample App";
};
name = Debug;
};
8E3A6C0C1D07CB6F00A8B7CF /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ANALYZER_NONNULL = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = HT94948NDD;
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = SirenTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.washingtonpost.SirenTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 2.3;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Sample App.app/Sample App";
};
name = Release;
};
8EC3919E1A58B466001C121E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = 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_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
8EC3919F1A58B466001C121E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = 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_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
8EC391A11A58B466001C121E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = HT94948NDD;
INFOPLIST_FILE = "$(SRCROOT)/Sample App/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.apple.itunesconnect.mobile;
PRODUCT_NAME = "Sample App";
SWIFT_VERSION = 2.3;
};
name = Debug;
};
8EC391A21A58B466001C121E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = HT94948NDD;
INFOPLIST_FILE = "$(SRCROOT)/Sample App/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.apple.itunesconnect.mobile;
PRODUCT_NAME = "Sample App";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 2.3;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
558455D71C6690B4004BE492 /* Build configuration list for PBXNativeTarget "Siren" */ = {
isa = XCConfigurationList;
buildConfigurations = (
558455D51C6690B4004BE492 /* Debug */,
558455D61C6690B4004BE492 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
8E3A6C0D1D07CB6F00A8B7CF /* Build configuration list for PBXNativeTarget "SirenTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
8E3A6C0B1D07CB6F00A8B7CF /* Debug */,
8E3A6C0C1D07CB6F00A8B7CF /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
8EC3917C1A58B465001C121E /* Build configuration list for PBXProject "Sample App" */ = {
isa = XCConfigurationList;
buildConfigurations = (
8EC3919E1A58B466001C121E /* Debug */,
8EC3919F1A58B466001C121E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
8EC391A01A58B466001C121E /* Build configuration list for PBXNativeTarget "Sample App" */ = {
isa = XCConfigurationList;
buildConfigurations = (
8EC391A11A58B466001C121E /* Debug */,
8EC391A21A58B466001C121E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 8EC391791A58B465001C121E /* Project object */;
}
@@ -2,6 +2,6 @@
<Workspace
version = "1.0">
<FileRef
location = "self:">
location = "self:Sample App.xcodeproj">
</FileRef>
</Workspace>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1340"
LastUpgradeVersion = "0800"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -14,10 +14,10 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "258F10561A9DF823C49949D6176054DD"
BuildableName = "Pods_Example_Tests.framework"
BlueprintName = "Pods-Example-Tests"
ReferencedContainer = "container:Pods.xcodeproj">
BlueprintIdentifier = "8EC391801A58B465001C121E"
BuildableName = "Sample App.app"
BlueprintName = "Sample App"
ReferencedContainer = "container:Sample App.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
@@ -28,7 +28,28 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8E3A6C031D07CB6F00A8B7CF"
BuildableName = "SirenTests.xctest"
BlueprintName = "SirenTests"
ReferencedContainer = "container:Sample App.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8EC391801A58B465001C121E"
BuildableName = "Sample App.app"
BlueprintName = "Sample App"
ReferencedContainer = "container:Sample App.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@@ -40,6 +61,18 @@
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8EC391801A58B465001C121E"
BuildableName = "Sample App.app"
BlueprintName = "Sample App"
ReferencedContainer = "container:Sample App.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
@@ -47,15 +80,16 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "258F10561A9DF823C49949D6176054DD"
BuildableName = "Pods_Example_Tests.framework"
BlueprintName = "Pods-Example-Tests"
ReferencedContainer = "container:Pods.xcodeproj">
BlueprintIdentifier = "8EC391801A58B465001C121E"
BuildableName = "Sample App.app"
BlueprintName = "Sample App"
ReferencedContainer = "container:Sample App.xcodeproj">
</BuildableReference>
</MacroExpansion>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1340"
LastUpgradeVersion = "0800"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -14,10 +14,10 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A0E2640B83527AE54205D7FDE9C5D930"
BlueprintIdentifier = "558455CB1C6690B4004BE492"
BuildableName = "Siren.framework"
BlueprintName = "Siren"
ReferencedContainer = "container:Pods.xcodeproj">
ReferencedContainer = "container:Sample App.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
@@ -29,6 +29,8 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@@ -40,6 +42,17 @@
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "558455CB1C6690B4004BE492"
BuildableName = "Siren.framework"
BlueprintName = "Siren"
ReferencedContainer = "container:Sample App.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
@@ -50,10 +63,10 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A0E2640B83527AE54205D7FDE9C5D930"
BlueprintIdentifier = "558455CB1C6690B4004BE492"
BuildableName = "Siren.framework"
BlueprintName = "Siren"
ReferencedContainer = "container:Pods.xcodeproj">
ReferencedContainer = "container:Sample App.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
+91
View File
@@ -0,0 +1,91 @@
//
// AppDelegate.swift
// Siren
//
// Created by Arthur Sabintsev on 1/3/15.
// Copyright (c) 2015 Sabintsev iOS Projects. All rights reserved.
//
import UIKit
import Siren
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
window?.makeKeyAndVisible()
setupSiren()
return true
}
func setupSiren() {
let siren = Siren.sharedInstance
// Optional
siren.delegate = self
// Optional
siren.debugEnabled = true
// Optional - Defaults to .Option
// 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 Spanish. Siren supports many other languages, not just English and Spanish.
// siren.forceLanguageLocalization = .Russian
// Required
siren.checkVersion(.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.sharedInstance.checkVersion(.Immediately)
}
func applicationDidBecomeActive(application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
Siren.sharedInstance.checkVersion(.Daily)
}
}
extension AppDelegate: SirenDelegate
{
func sirenDidShowUpdateDialog(alertType: SirenAlertType) {
print(#function, alertType)
}
func sirenUserDidCancel() {
print(#function)
}
func sirenUserDidSkipVersion() {
print(#function)
}
func sirenUserDidLaunchAppStore() {
print(#function)
}
func sirenDidFailVersionCheck(error: NSError) {
print(#function, error)
}
/**
This delegate method is only hit when alertType is initialized to .None
*/
func sirenDidDetectNewVersionWithoutAlert(message: String) {
print(#function, "\(message)")
}
}
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11191" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11185.3" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11156"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11151.4"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@@ -1,26 +1,21 @@
<?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>
<?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">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="ufC-wZ-h7g">
<objects>
<viewController id="vXZ-lx-hvc" customClass="ViewController" customModule="Example" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="vXZ-lx-hvc" customClass="ViewController" customModule="Sample_App" 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="375" height="667"/>
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
@@ -1,15 +1,5 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
@@ -39,11 +29,6 @@
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
@@ -15,7 +15,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<string>1.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
@@ -21,3 +21,4 @@ class ViewController: UIViewController {
}
}
+26
View File
@@ -0,0 +1,26 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
+19
View File
@@ -0,0 +1,19 @@
//
// Siren.h
// Siren
//
// Created by Sabintsev, Arthur on 2/6/16.
// Copyright © 2016 Sabintsev iOS Projects. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for Siren.
FOUNDATION_EXPORT double SirenVersionNumber;
//! Project version string for Siren.
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>
@@ -16,6 +16,8 @@
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
+634
View File
@@ -0,0 +1,634 @@
//
// 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.sharedInstance
}
// MARK: - Updates
extension SirenTests {
func testSingleDigitVersionUpdate() {
siren.testSetCurrentInstalledVersion("1")
siren.testSetAppStoreVersion("2")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("2.0")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("2.0.0")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("2.0.0.0")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("0")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("0.9")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("0.0.9")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("0.0.0.9")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
}
func testDoubleDigitVersionUpdate() {
siren.testSetCurrentInstalledVersion("1.0")
siren.testSetAppStoreVersion("2")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("2.0")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("2.0.0")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("2.0.0.0")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("0")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("0.9")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("0.0.9")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("0.0.0.9")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
}
func testTripleDigitVersionUpdate() {
siren.testSetCurrentInstalledVersion("1.0.0")
siren.testSetAppStoreVersion("2")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("2.0")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("2.0.0")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("2.0.0.0")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("0")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("0.9")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("0.0.9")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("0.0.0.9")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
}
func testQuadrupleDigitVersionUpdate() {
siren.testSetCurrentInstalledVersion("1.0.0")
siren.testSetAppStoreVersion("2")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("2.0")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("2.0.0")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("2.0.0.0")
XCTAssertTrue(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("0")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("0.9")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("0.0.9")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
siren.testSetAppStoreVersion("0.0.0.9")
XCTAssertFalse(siren.testIsAppStoreVersionNewer())
}
}
// MARK: - Localization
extension SirenTests {
func testArabicLocalization() {
let language: SirenLanguageType = .Arabic
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "التجديد متوفر")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "المرة التالية")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "تخطى عن هذه النسخة")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "تجديد")
}
func testArmenianLocalization() {
let language: SirenLanguageType = .Armenian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "Թարմացումը հասանելի Է")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "Հաջորդ անգամ")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "Բաց թողնել այս տարբերակը")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "Թարմացնել")
}
func testBasqueLocalization() {
let language: SirenLanguageType = .Basque
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "Eguneratzea erabilgarri")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "Hurrengo batean")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "Bertsio honetatik jauzi egin")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "Eguneratu")
}
func testChineseSimplifiedLocalization() {
let language: SirenLanguageType = .ChineseSimplified
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "更新可用")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "下一次")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "跳过此版本")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "更新")
}
func testChineseTraditionalLocalization() {
let language: SirenLanguageType = .ChineseTraditional
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "有更新可用")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "下次")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "跳過此版本")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "更新")
}
func testCroatianLocalization() {
let language: SirenLanguageType = .Croatian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "Nova ažuriranje je stigla")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "Sljedeći put")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "Preskoči ovu verziju")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "Ažuriraj")
}
func testDanishLocalization() {
let language: SirenLanguageType = .Danish
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "Tilgængelig opdatering")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "Næste gang")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "Spring denne version over")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "Opdater")
}
func testDutchLocalization() {
let language: SirenLanguageType = .Dutch
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "Update Beschikbaar")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "Volgende keer")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "Sla deze versie over")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "Updaten")
}
func testEstonianLocalization() {
let language: SirenLanguageType = .Estonian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "Uuendus saadaval")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "Järgmisel korral")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "Jäta see version vahele")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "Uuenda")
}
func testFrenchLocalization() {
let language: SirenLanguageType = .French
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "Mise à jour disponible")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "La prochaine fois")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "Sauter cette version")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "Mettre à jour")
}
func testGermanLocalization() {
let language: SirenLanguageType = .German
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "Update erhältlich")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "Später")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "Diese Version überspringen")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "Update")
}
func testHebrewLocalization() {
let language: SirenLanguageType = .Hebrew
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "עדכון זמין")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "בפעם הבאה")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "דלג על גרסה זו")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "עדכן")
}
func testHungarianLocalization() {
let language: SirenLanguageType = .Hungarian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "Új frissítés érhető el")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "Később")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "Ennél a verziónál ne figyelmeztessen")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "Frissítés")
}
func testItalianLocalization() {
let language: SirenLanguageType = .Italian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "Aggiornamento disponibile")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "La prossima volta")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "Salta questa versione")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "Aggiorna")
}
func testJapaneseLocalization() {
let language: SirenLanguageType = .Japanese
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "更新が利用可能")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "次回")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "このバージョンをスキップ")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "更新")
}
func testKoreanLocalization() {
let language: SirenLanguageType = .Korean
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "업데이트 가능")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "다음에")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "이 버전 건너뜀")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "업데이트")
}
func testLatvianLocalization() {
let language: SirenLanguageType = .Latvian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "Atjaunojums")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "Nākošreiz")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "Palaist garām šo versiju")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "Atjaunot")
}
func testLithuanianLocalization() {
let language: SirenLanguageType = .Lithuanian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "Atnaujinimas")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "Kitą kartą")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "Praleisti šią versiją")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "Atnaujinti")
}
func testMalayLocalization() {
let language: SirenLanguageType = .Malay
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "Versi Terkini")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "Lain kali")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "Langkau versi ini")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "Muat turun")
}
func testPolishLocalization() {
let language: SirenLanguageType = .Polish
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "Aktualizacja dostępna")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "Następnym razem")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "Pomiń wersję")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "Zaktualizuj")
}
func testPortugueseBrazilLocalization() {
let language: SirenLanguageType = .PortugueseBrazil
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "Nova atualização disponível")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "Próxima vez")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "Ignorar esta versão")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "Atualizar")
}
func testPortuguesePortugalLocalization() {
let language: SirenLanguageType = .PortuguesePortugal
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "Nova actualização disponível")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "Próxima vez")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "Ignorar esta versão")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "Actualizar")
}
func testRussianLocalization() {
let language: SirenLanguageType = .Russian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "Доступно обновление")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "В следующий раз")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "Пропустить эту версию")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "Обновить")
}
func testSlovenianLocalization() {
let language: SirenLanguageType = .Slovenian
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "Posodobitev aplikacije")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "Naslednjič")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "Ne želim")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "Namesti")
}
func testSpanishLocalization() {
let language: SirenLanguageType = .Spanish
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "Actualización disponible")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "La próxima vez")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "Saltar esta versión")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "Actualizar")
}
func testSwedishLocalization() {
let language: SirenLanguageType = .Swedish
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "Tillgänglig uppdatering")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "Nästa gång")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "Hoppa över den här versionen")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "Uppdatera")
}
func testThaiLocalization() {
let language: SirenLanguageType = .Thai
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "มีการอัพเดท")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "ไว้คราวหน้า")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "ข้ามเวอร์ชั่นนี้")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "อัพเดท")
}
func testTurkishLocalization() {
let language: SirenLanguageType = .Turkish
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "Güncelleme Mevcut")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "Daha sonra")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "Boşver")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "Güncelle")
}
func testVietnameseLocalization() {
let language: SirenLanguageType = .Vietnamese
siren.forceLanguageLocalization = language
// Update Available
XCTAssertEqual(NSBundle().testLocalizedString("Update Available", forceLanguageLocalization: language), "Cập nhật mới")
// Next time
XCTAssertEqual(NSBundle().testLocalizedString("Next time", forceLanguageLocalization: language), "Lần tới")
// Skip this version
XCTAssertEqual(NSBundle().testLocalizedString("Skip this version", forceLanguageLocalization: language), "Bỏ qua phiên bản này")
// Update
XCTAssertEqual(NSBundle().testLocalizedString("Update", forceLanguageLocalization: language), "Cập nhật")
}
}
+17 -17
View File
@@ -1,23 +1,23 @@
Pod::Spec.new do |s|
# Version
s.version = "6.1.3"
s.swift_version = "5.5"
# Meta
s.name = "Siren"
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" }
s.version = "0.9.5"
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
Notify your users when a new version of your iOS app is available, and prompt them with the App Store link.
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
# Compatibility & Sources
s.ios.deployment_target = '13.0'
s.tvos.deployment_target = '13.0'
s.source = { :git => "https://github.com/ArtSabintsev/Siren.git", :tag => s.version.to_s }
s.source_files = 'Sources/**/*.swift'
s.resources = 'Sources/Siren.bundle'
s.requires_arc = true
s.homepage = "https://github.com/ArtSabintsev/Siren"
s.license = "MIT"
s.authors = { "Arthur Ariel Sabintsev" => "arthur@sabintsev.com", "Aaron Brager" => "getaaron@gmail.com" }
s.platform = :ios, "8.0"
s.source = { :git => "https://github.com/ArtSabintsev/Siren.git", :tag => s.version.to_s }
s.source_files = 'Siren/Siren.swift'
s.resources = 'Siren/Siren.bundle'
s.requires_arc = true
end
@@ -1,8 +1,8 @@
/* Update alert message: A new version of {APP NAME} is available. Please update to version {NEW VERSION} now.*/
"A new version of %@ is available. Please update to version %@ now." = "Nova verzija %@ je dostupna. Ažuriraj na verziju %@ sada.";
"A new version of %@ is available. Please update to version %@ now." = "Nova verzia %@ je stigla. Ažuriraj na verziju %@ sada.";
/* Update alert title */
"Update Available" = "Novo ažuriranje je dostupno";
"Update Available" = "Nova ažuriranje je stigla";
/* Update alert dismiss button title */
"Next time" = "Sljedeći put";
@@ -1,14 +1,14 @@
/* Update alert message: A new version of {APP NAME} is available. Please update to version {NEW VERSION} now.*/
"A new version of %@ is available. Please update to version %@ now." = "Versi baru %@ tersedia. Perbarui ke versi %@ sekarang.";
"A new version of %@ is available. Please update to version %@ now." = "Pieejama jauna %@ versija. Lūdzam atjaunot līdz %@ versijai.";
/* Update alert title */
"Update Available" = "Pembaruan Tersedia";
"Update Available" = "Atjaunojums";
/* Update alert dismiss button title */
"Next time" = "Lain kali";
"Next time" = "Nākošreiz";
/* Update alert skip button title */
"Skip this version" = "Lewati versi ini";
"Skip this version" = "Palaist garām šo versiju";
/* Update alert skip button title */
"Update" = "Perbarui";
"Update" = "Atjaunot";
@@ -1,5 +1,5 @@
/* Update alert message: A new version of {APP NAME} is available. Please update to version {NEW VERSION} now.*/
"A new version of %@ is available. Please update to version %@ now." = "%@ uygulamasının yeni bir sürümü mevcut. Lütfen %@ sürümüne güncelleyin.";
"A new version of %@ is available. Please update to version %@ now." = "%@' nın yeni bir sürümü mevcut. Lütfen %@ sürümüne güncelleyin.";
/* Update alert title */
"Update Available" = "Güncelleme Mevcut";
+777
View File
@@ -0,0 +1,777 @@
//
// Siren.swift
// Siren
//
// Created by Arthur Sabintsev on 1/3/15.
// Copyright (c) 2015 Sabintsev iOS Projects. All rights reserved.
//
import UIKit
// MARK: - SirenDelegate Protocol
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
}
/**
Determines the type of alert to present after a successful version check has been performed.
There are four options:
- .Force: Forces user to update your app (1 button alert)
- .Option: (DEFAULT) Presents user with option to update app now or at next launch (2 button alert)
- .Skip: Presents user with option to update the app now, at next launch, or to skip this version all together (3 button alert)
- .None: Doesn't show the alert, but instead returns a localized message for use in a custom UI within the sirenDidDetectNewVersionWithoutAlert() delegate method
*/
public enum SirenAlertType {
case Force // Forces user to update your app (1 button alert)
case Option // (DEFAULT) Presents user with option to update app now or at next launch (2 button alert)
case Skip // Presents user with option to update the app now, at next launch, or to skip this version all together (3 button alert)
case None // Doesn't show the alert, but instead returns a localized message for use in a custom UI within the sirenDidDetectNewVersionWithoutAlert() delegate method
}
/**
Determines the frequency in which the the version check is performed
- .Immediately: Version check performed every time the app is launched
- .Daily: Version check performedonce a day
- .Weekly: Version check performed once a week
*/
public enum SirenVersionCheckType: Int {
case Immediately = 0 // Version check performed every time the app is launched
case Daily = 1 // Version check performed once a day
case Weekly = 7 // Version check performed once a week
}
/**
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 French = "fr"
case Hebrew = "he"
case Hungarian = "hu"
case German = "de"
case Italian = "it"
case Japanese = "ja"
case Korean = "ko"
case Latvian = "lv"
case Lithuanian = "lt"
case Malay = "ms"
case Polish = "pl"
case PortugueseBrazil = "pt"
case PortuguesePortugal = "pt-PT"
case Russian = "ru"
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 Error Throwable Errors
*/
private enum SirenErrorType: ErrorType {
case MalformedURL
case MissingBundleIdOrAppId
}
/**
Siren-specific NSUserDefault Keys
*/
private enum SirenUserDefaults: String {
case StoredVersionCheckDate // NSUserDefault key that stores the timestamp of the last version check
case StoredSkippedVersion // NSUserDefault key that stores the version that a user decided to skip
}
// MARK: - Siren
/**
The Siren Class.
A singleton that is initialized using the sharedInstance() method.
*/
public final class Siren: NSObject {
/**
Current installed version of your app
*/
private var currentInstalledVersion: String? = {
return NSBundle.mainBundle().objectForInfoDictionaryKey("CFBundleShortVersionString") as? String
}()
/**
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)
*/
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.
*/
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
{
didSet {
majorUpdateAlertType = alertType
minorUpdateAlertType = alertType
patchUpdateAlertType = alertType
revisionUpdateAlertType = alertType
}
}
/**
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
/**
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
/**
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
/**
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
// Optional Vars
/**
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 = (NSBundle.mainBundle().objectForInfoDictionaryKey(kCFBundleNameKey as String) as? String) ?? ""
/**
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.
If your app is not available in the US App Store, you should set it to the identifier
of at least one App Store within which it is available.
*/
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?
/**
Overrides the tint color for UIAlertController.
*/
public var alertControllerTintColor: UIColor?
/**
The current version of your app that is available for download on the App Store
*/
public private(set) var currentAppStoreVersion: String?
// Private
private var appID: Int?
private var lastVersionCheckPerformedOnDate: NSDate?
private var updaterWindow: UIWindow?
// Initialization
public static let sharedInstance = Siren()
override init() {
lastVersionCheckPerformedOnDate = NSUserDefaults.standardUserDefaults().objectForKey(SirenUserDefaults.StoredVersionCheckDate.rawValue) as? NSDate
}
/**
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 `countryCode` property before calling this method. Please refer to the countryCode property for more information.
- parameter 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 _ = NSBundle.bundleID() else {
printMessage("Please make sure that you have set a `Bundle Identifier` in your project.")
return
}
if checkType == .Immediately {
performVersionCheck()
} else {
guard let lastVersionCheckPerformedOnDate = lastVersionCheckPerformedOnDate else {
performVersionCheck()
return
}
if daysSinceLastVersionCheckDate(lastVersionCheckPerformedOnDate) >= checkType.rawValue {
performVersionCheck()
} else {
postError(.RecentlyCheckedAlready, underlyingError: nil)
}
}
}
private func performVersionCheck() {
// Create Request
do {
let url = try iTunesURLFromString()
let request = NSURLRequest(URL: url, cachePolicy: .ReloadIgnoringCacheData, timeoutInterval: 30)
// Perform Request
let session = NSURLSession.sharedSession()
let task = session.dataTaskWithRequest(request, completionHandler: { [unowned self] (data, response, error) in
if let error = error {
self.postError(.AppStoreDataRetrievalFailure, underlyingError: error)
} else {
guard let data = data else {
self.postError(.AppStoreDataRetrievalFailure, underlyingError: nil)
return
}
// Convert JSON data to Swift Dictionary of type [String: AnyObject]
do {
let jsonData = try NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.AllowFragments)
guard let appData = jsonData as? [String: AnyObject]
where self.isUpdateCompatibleWithDeviceOS(appData) else {
self.postError(.AppStoreJSONParsingFailure, underlyingError: nil)
return
}
dispatch_async(dispatch_get_main_queue()) {
// Print iTunesLookup results from appData
self.printMessage("JSON results: \(appData)")
// Process Results (e.g., extract current version that is available on the AppStore)
self.processVersionCheckResults(appData)
}
} catch let error as NSError {
self.postError(.AppStoreDataRetrievalFailure, underlyingError: error)
}
}
})
task.resume()
} catch let error as NSError {
postError(.MalformedURL, underlyingError: error)
}
}
private func processVersionCheckResults(lookupResults: [String: AnyObject]) {
// Store version comparison date
storeVersionCheckDate()
guard let results = lookupResults["results"] as? [[String: AnyObject]] else {
self.postError(.AppStoreVersionNumberFailure, underlyingError: nil)
return
}
if results.isEmpty == false { // Conditional that avoids crash when app not in App Store
guard let appID = results.first?["trackId"] as? Int else {
self.postError(.AppStoreAppIDFailure, underlyingError: nil)
return
}
self.appID = appID
currentAppStoreVersion = results.first?["version"] as? String
guard let _ = currentAppStoreVersion else {
self.postError(.AppStoreVersionArrayFailure, underlyingError: nil)
return
}
if isAppStoreVersionNewer() {
showAlertIfCurrentAppStoreVersionNotSkipped()
} else {
postError(.NoUpdateAvailable, underlyingError: nil)
}
} else { // lookupResults does not contain any data as the returned array is empty
postError(.AppStoreDataRetrievalFailure, underlyingError: nil)
}
}
}
// MARK: - Alert Helpers
private extension Siren {
func showAlertIfCurrentAppStoreVersionNotSkipped() {
alertType = setAlertType()
guard let previouslySkippedVersion = NSUserDefaults.standardUserDefaults().objectForKey(SirenUserDefaults.StoredSkippedVersion.rawValue) as? String else {
showAlert()
return
}
if let currentAppStoreVersion = currentAppStoreVersion
where currentAppStoreVersion != previouslySkippedVersion {
showAlert()
}
}
func showAlert() {
let updateAvailableMessage = NSBundle().localizedString("Update Available", forceLanguageLocalization: forceLanguageLocalization)
let newVersionMessage = localizedNewVersionMessage()
let alertController = UIAlertController(title: updateAvailableMessage, message: newVersionMessage, preferredStyle: .Alert)
if let alertControllerTintColor = alertControllerTintColor {
alertController.view.tintColor = alertControllerTintColor
}
switch alertType {
case .Force:
alertController.addAction(updateAlertAction())
case .Option:
alertController.addAction(nextTimeAlertAction())
alertController.addAction(updateAlertAction())
case .Skip:
alertController.addAction(nextTimeAlertAction())
alertController.addAction(updateAlertAction())
alertController.addAction(skipAlertAction())
case .None:
delegate?.sirenDidDetectNewVersionWithoutAlert(newVersionMessage)
}
if alertType != .None {
alertController.show()
delegate?.sirenDidShowUpdateDialog(alertType)
}
}
func updateAlertAction() -> UIAlertAction {
let title = localizedUpdateButtonTitle()
let action = UIAlertAction(title: title, style: .Default) { (alert: UIAlertAction) in
self.hideWindow()
self.launchAppStore()
self.delegate?.sirenUserDidLaunchAppStore()
return
}
return action
}
func nextTimeAlertAction() -> UIAlertAction {
let title = localizedNextTimeButtonTitle()
let action = UIAlertAction(title: title, style: .Default) { (alert: UIAlertAction) in
self.hideWindow()
self.delegate?.sirenUserDidCancel()
return
}
return action
}
func skipAlertAction() -> UIAlertAction {
let title = localizedSkipButtonTitle()
let action = UIAlertAction(title: title, style: .Default) { (alert: UIAlertAction) in
if let currentAppStoreVersion = self.currentAppStoreVersion {
NSUserDefaults.standardUserDefaults().setObject(currentAppStoreVersion, forKey: SirenUserDefaults.StoredSkippedVersion.rawValue)
NSUserDefaults.standardUserDefaults().synchronize()
}
self.hideWindow()
self.delegate?.sirenUserDidSkipVersion()
return
}
return action
}
}
// MARK: - Localization Helpers
private extension Siren {
func localizedNewVersionMessage() -> String {
let newVersionMessageToLocalize = "A new version of %@ is available. Please update to version %@ now."
let newVersionMessage = NSBundle().localizedString(newVersionMessageToLocalize, forceLanguageLocalization: forceLanguageLocalization)
guard let currentAppStoreVersion = currentAppStoreVersion else {
return String(format: newVersionMessage, appName, "Unknown")
}
return String(format: newVersionMessage, appName, currentAppStoreVersion)
}
func localizedUpdateButtonTitle() -> String {
return NSBundle().localizedString("Update", forceLanguageLocalization: forceLanguageLocalization)
}
func localizedNextTimeButtonTitle() -> String {
return NSBundle().localizedString("Next time", forceLanguageLocalization: forceLanguageLocalization)
}
func localizedSkipButtonTitle() -> String {
return NSBundle().localizedString("Skip this version", forceLanguageLocalization: forceLanguageLocalization)
}
}
// MARK: - Misc. Helpers
private extension Siren {
func iTunesURLFromString() throws -> NSURL {
let components = NSURLComponents()
components.scheme = "https"
components.host = "itunes.apple.com"
components.path = "/lookup"
var items: [NSURLQueryItem] = [NSURLQueryItem(name: "bundleId", value: NSBundle.bundleID())]
if let countryCode = countryCode {
let item = NSURLQueryItem(name: "country", value: countryCode)
items.append(item)
}
components.queryItems = items
guard let url = components.URL,
urlString = url.absoluteString
where !urlString.isEmpty else { // https://openradar.appspot.com/25382891
throw SirenErrorType.MalformedURL
}
return url
}
func daysSinceLastVersionCheckDate(lastVersionCheckPerformedOnDate: NSDate) -> Int {
let calendar = NSCalendar.currentCalendar()
let components = calendar.components(.Day, fromDate: lastVersionCheckPerformedOnDate, toDate: NSDate(), options: [])
return components.day
}
func isUpdateCompatibleWithDeviceOS(appData: [String: AnyObject]) -> Bool {
guard let results = appData["results"] as? [[String: AnyObject]],
requiredOSVersion = results.first?["minimumOsVersion"] as? String else {
postError(.AppStoreOSVersionNumberFailure, underlyingError: nil)
return false
}
let systemVersion = UIDevice.currentDevice().systemVersion
if systemVersion.compare(requiredOSVersion, options: .NumericSearch) == .OrderedDescending ||
systemVersion.compare(requiredOSVersion, options: .NumericSearch) == .OrderedSame {
return true
} else {
postError(.AppStoreOSVersionUnsupported, underlyingError: nil)
return false
}
}
func isAppStoreVersionNewer() -> Bool {
var newVersionExists = false
if let currentInstalledVersion = currentInstalledVersion, currentAppStoreVersion = currentAppStoreVersion
where (currentInstalledVersion.compare(currentAppStoreVersion, options: .NumericSearch) == .OrderedAscending) {
newVersionExists = true
}
return newVersionExists
}
func storeVersionCheckDate() {
lastVersionCheckPerformedOnDate = NSDate()
if let lastVersionCheckPerformedOnDate = lastVersionCheckPerformedOnDate {
NSUserDefaults.standardUserDefaults().setObject(lastVersionCheckPerformedOnDate, forKey: SirenUserDefaults.StoredVersionCheckDate.rawValue)
NSUserDefaults.standardUserDefaults().synchronize()
}
}
func setAlertType() -> SirenAlertType {
guard let currentInstalledVersion = currentInstalledVersion, 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}
if newVersion.first > oldVersion.first { // A.b.c.d
alertType = majorUpdateAlertType
} else if newVersion.count > 1 && (oldVersion.count <= 1 || newVersion[1] > oldVersion[1]) { // a.B.c.d
alertType = minorUpdateAlertType
} else if newVersion.count > 2 && (oldVersion.count <= 2 || newVersion[2] > oldVersion[2]) { // a.b.C.d
alertType = patchUpdateAlertType
} else if newVersion.count > 3 && (oldVersion.count <= 3 || newVersion[3] > oldVersion[3]) { // a.b.c.D
alertType = revisionUpdateAlertType
}
return alertType
}
func hideWindow() {
if let updaterWindow = updaterWindow {
updaterWindow.hidden = true
self.updaterWindow = nil
}
}
func launchAppStore() {
guard let appID = appID else {
return
}
let iTunesString = "https://itunes.apple.com/app/id\(appID)"
let iTunesURL = NSURL(string: iTunesString)
dispatch_async(dispatch_get_main_queue()) {
UIApplication.sharedApplication().openURL(iTunesURL!)
}
}
func printMessage(message: String) {
if debugEnabled {
print("[Siren] \(message)")
}
}
}
// MARK: - UIAlertController Extensions
private extension UIAlertController {
func show() {
let window = UIWindow(frame: UIScreen.mainScreen().bounds)
window.rootViewController = UIViewController()
window.windowLevel = UIWindowLevelAlert + 1
Siren.sharedInstance.updaterWindow = window
window.makeKeyAndVisible()
window.rootViewController!.presentViewController(self, animated: true, completion: nil)
}
}
// MARK: - NSBundle Extension
private extension NSBundle {
class func bundleID() -> String? {
return NSBundle.mainBundle().bundleIdentifier
}
func sirenBundlePath() -> String {
return NSBundle(forClass: Siren.self).pathForResource("Siren", ofType: "bundle") as String!
}
func sirenForcedBundlePath(forceLanguageLocalization: SirenLanguageType) -> String {
let path = sirenBundlePath()
let name = forceLanguageLocalization.rawValue
return NSBundle(path: path)!.pathForResource(name, ofType: "lproj")!
}
func localizedString(stringKey: String, forceLanguageLocalization: SirenLanguageType?) -> String {
var path: String
let table = "SirenLocalizable"
if let forceLanguageLocalization = forceLanguageLocalization {
path = sirenForcedBundlePath(forceLanguageLocalization)
} else {
path = sirenBundlePath()
}
return NSBundle(path: path)!.localizedStringForKey(stringKey, value: stringKey, table: table)
}
}
// MARK: - Error Handling
private extension Siren {
func postError(code: SirenErrorCode, underlyingError: NSError?) {
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: AnyObject] = [NSLocalizedDescriptionKey: description]
if let underlyingError = underlyingError {
userInfo[NSUnderlyingErrorKey] = underlyingError
}
let error = NSError(domain: SirenErrorDomain, code: code.rawValue, userInfo: userInfo)
delegate?.sirenDidFailVersionCheck(error)
printMessage(error.localizedDescription)
}
}
// MARK: - SirenDelegate
public extension SirenDelegate {
func sirenDidShowUpdateDialog(alertType: SirenAlertType) {}
func sirenUserDidLaunchAppStore() {}
func sirenUserDidSkipVersion() {}
func sirenUserDidCancel() {}
func sirenDidFailVersionCheck(error: NSError) {}
func sirenDidDetectNewVersionWithoutAlert(message: String) {}
}
// MARK: - Testing Helpers
extension Siren {
func testSetCurrentInstalledVersion(version: String) {
currentInstalledVersion = version
}
func testSetAppStoreVersion(version: String) {
currentAppStoreVersion = version
}
func testIsAppStoreVersionNewer() -> Bool {
return isAppStoreVersionNewer()
}
}
extension NSBundle {
func testLocalizedString(stringKey: String, forceLanguageLocalization: SirenLanguageType?) -> String {
return NSBundle().localizedString(stringKey, forceLanguageLocalization: forceLanguageLocalization)
}
}

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