├── .gitignore ├── Example ├── ISFIRVersionCheck.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── ISFIRVersionCheck-Example.xcscheme ├── ISFIRVersionCheck.xcworkspace │ └── contents.xcworkspacedata ├── ISFIRVersionCheck │ ├── ISAppDelegate.h │ ├── ISAppDelegate.m │ ├── ISFIRVersionCheck-Info.plist │ ├── ISFIRVersionCheck-Prefix.pch │ ├── ISViewController.h │ ├── ISViewController.m │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── LaunchScreen.storyboard │ ├── Main.storyboard │ ├── en.lproj │ │ └── InfoPlist.strings │ └── main.m ├── Podfile ├── Podfile.lock └── Tests │ ├── Tests-Info.plist │ ├── Tests-Prefix.pch │ ├── Tests.m │ └── en.lproj │ └── InfoPlist.strings ├── ISFIRVersionCheck.podspec ├── ISFIRVersionCheck ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ ├── ISFIRVersionCheck.h │ └── ISFIRVersionCheck.m ├── LICENSE ├── README.md └── screenshot.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | 30 | # CocoaPods 31 | # 32 | # We recommend against adding the Pods directory to your .gitignore. However 33 | # you should judge for yourself, the pros and cons are mentioned at: 34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 35 | # 36 | Pods/ 37 | 38 | # Carthage 39 | # 40 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 41 | # Carthage/Checkouts 42 | 43 | Carthage/Build 44 | 45 | # fastlane 46 | # 47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 48 | # screenshots whenever they are needed. 49 | # For more information about the recommended setup visit: 50 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 51 | 52 | fastlane/report.xml 53 | fastlane/screenshots 54 | 55 | #Code Injection 56 | # 57 | # After new code Injection tools there's a generated folder /iOSInjectionProject 58 | # https://github.com/johnno1962/injectionforxcode 59 | 60 | iOSInjectionProject/ 61 | -------------------------------------------------------------------------------- /Example/ISFIRVersionCheck.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0B28F64E1D47690A00020C38 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0B28F64D1D47690A00020C38 /* LaunchScreen.storyboard */; }; 11 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 12 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; 13 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 14 | 6003F598195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F596195388D20070C39A /* InfoPlist.strings */; }; 15 | 6003F59A195388D20070C39A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F599195388D20070C39A /* main.m */; }; 16 | 6003F59E195388D20070C39A /* ISAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F59D195388D20070C39A /* ISAppDelegate.m */; }; 17 | 6003F5A7195388D20070C39A /* ISViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5A6195388D20070C39A /* ISViewController.m */; }; 18 | 6003F5A9195388D20070C39A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5A8195388D20070C39A /* Images.xcassets */; }; 19 | 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F5AF195388D20070C39A /* XCTest.framework */; }; 20 | 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 21 | 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 22 | 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; }; 23 | 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; }; 24 | 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; }; 25 | AF635584E5694E23F07B3606 /* Pods_ISFIRVersionCheck_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C4968B68C89ADB8A2CF9CBE /* Pods_ISFIRVersionCheck_Tests.framework */; }; 26 | F0218069610061F8232E8246 /* Pods_ISFIRVersionCheck_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B257F10E0BA3E1F244A0726F /* Pods_ISFIRVersionCheck_Example.framework */; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXContainerItemProxy section */ 30 | 6003F5B3195388D20070C39A /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = 6003F582195388D10070C39A /* Project object */; 33 | proxyType = 1; 34 | remoteGlobalIDString = 6003F589195388D20070C39A; 35 | remoteInfo = ISFIRVersionCheck; 36 | }; 37 | /* End PBXContainerItemProxy section */ 38 | 39 | /* Begin PBXFileReference section */ 40 | 0B28F64D1D47690A00020C38 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; 41 | 31EA5C5A6D5226FDA8AB1060 /* ISFIRVersionCheck.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = ISFIRVersionCheck.podspec; path = ../ISFIRVersionCheck.podspec; sourceTree = ""; }; 42 | 35CEEFDF6CE39B7160473F64 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 43 | 4C4968B68C89ADB8A2CF9CBE /* Pods_ISFIRVersionCheck_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ISFIRVersionCheck_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 6003F58A195388D20070C39A /* ISFIRVersionCheck_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ISFIRVersionCheck_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 46 | 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 47 | 6003F591195388D20070C39A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 48 | 6003F595195388D20070C39A /* ISFIRVersionCheck-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ISFIRVersionCheck-Info.plist"; sourceTree = ""; }; 49 | 6003F597195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 50 | 6003F599195388D20070C39A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 51 | 6003F59B195388D20070C39A /* ISFIRVersionCheck-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ISFIRVersionCheck-Prefix.pch"; sourceTree = ""; }; 52 | 6003F59C195388D20070C39A /* ISAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ISAppDelegate.h; sourceTree = ""; }; 53 | 6003F59D195388D20070C39A /* ISAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ISAppDelegate.m; sourceTree = ""; }; 54 | 6003F5A5195388D20070C39A /* ISViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ISViewController.h; sourceTree = ""; }; 55 | 6003F5A6195388D20070C39A /* ISViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ISViewController.m; sourceTree = ""; }; 56 | 6003F5A8195388D20070C39A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 57 | 6003F5AE195388D20070C39A /* ISFIRVersionCheck_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ISFIRVersionCheck_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 58 | 6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 59 | 6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = ""; }; 60 | 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 61 | 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = ""; }; 62 | 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = ""; }; 63 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; }; 64 | 97F5ADE3625ED9DAA9E84CE6 /* Pods-ISFIRVersionCheck_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ISFIRVersionCheck_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ISFIRVersionCheck_Example/Pods-ISFIRVersionCheck_Example.debug.xcconfig"; sourceTree = ""; }; 65 | A05B215FE8B3E1378D097F64 /* Pods-ISFIRVersionCheck_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ISFIRVersionCheck_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-ISFIRVersionCheck_Example/Pods-ISFIRVersionCheck_Example.release.xcconfig"; sourceTree = ""; }; 66 | B257F10E0BA3E1F244A0726F /* Pods_ISFIRVersionCheck_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ISFIRVersionCheck_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 67 | C942825FA9266B88251CF80F /* Pods-ISFIRVersionCheck_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ISFIRVersionCheck_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ISFIRVersionCheck_Tests/Pods-ISFIRVersionCheck_Tests.debug.xcconfig"; sourceTree = ""; }; 68 | CA56093C8A74CFB18756DB8E /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 69 | EB0C913F831E6049E54B0567 /* Pods-ISFIRVersionCheck_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ISFIRVersionCheck_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-ISFIRVersionCheck_Tests/Pods-ISFIRVersionCheck_Tests.release.xcconfig"; sourceTree = ""; }; 70 | /* End PBXFileReference section */ 71 | 72 | /* Begin PBXFrameworksBuildPhase section */ 73 | 6003F587195388D20070C39A /* Frameworks */ = { 74 | isa = PBXFrameworksBuildPhase; 75 | buildActionMask = 2147483647; 76 | files = ( 77 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, 78 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, 79 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, 80 | F0218069610061F8232E8246 /* Pods_ISFIRVersionCheck_Example.framework in Frameworks */, 81 | ); 82 | runOnlyForDeploymentPostprocessing = 0; 83 | }; 84 | 6003F5AB195388D20070C39A /* Frameworks */ = { 85 | isa = PBXFrameworksBuildPhase; 86 | buildActionMask = 2147483647; 87 | files = ( 88 | 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, 89 | 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, 90 | 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, 91 | AF635584E5694E23F07B3606 /* Pods_ISFIRVersionCheck_Tests.framework in Frameworks */, 92 | ); 93 | runOnlyForDeploymentPostprocessing = 0; 94 | }; 95 | /* End PBXFrameworksBuildPhase section */ 96 | 97 | /* Begin PBXGroup section */ 98 | 6003F581195388D10070C39A = { 99 | isa = PBXGroup; 100 | children = ( 101 | 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */, 102 | 6003F593195388D20070C39A /* Example for ISFIRVersionCheck */, 103 | 6003F5B5195388D20070C39A /* Tests */, 104 | 6003F58C195388D20070C39A /* Frameworks */, 105 | 6003F58B195388D20070C39A /* Products */, 106 | E2417AFDBB1EBFF963C0B9A0 /* Pods */, 107 | ); 108 | sourceTree = ""; 109 | }; 110 | 6003F58B195388D20070C39A /* Products */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 6003F58A195388D20070C39A /* ISFIRVersionCheck_Example.app */, 114 | 6003F5AE195388D20070C39A /* ISFIRVersionCheck_Tests.xctest */, 115 | ); 116 | name = Products; 117 | sourceTree = ""; 118 | }; 119 | 6003F58C195388D20070C39A /* Frameworks */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 6003F58D195388D20070C39A /* Foundation.framework */, 123 | 6003F58F195388D20070C39A /* CoreGraphics.framework */, 124 | 6003F591195388D20070C39A /* UIKit.framework */, 125 | 6003F5AF195388D20070C39A /* XCTest.framework */, 126 | B257F10E0BA3E1F244A0726F /* Pods_ISFIRVersionCheck_Example.framework */, 127 | 4C4968B68C89ADB8A2CF9CBE /* Pods_ISFIRVersionCheck_Tests.framework */, 128 | ); 129 | name = Frameworks; 130 | sourceTree = ""; 131 | }; 132 | 6003F593195388D20070C39A /* Example for ISFIRVersionCheck */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | 6003F59C195388D20070C39A /* ISAppDelegate.h */, 136 | 6003F59D195388D20070C39A /* ISAppDelegate.m */, 137 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */, 138 | 6003F5A5195388D20070C39A /* ISViewController.h */, 139 | 6003F5A6195388D20070C39A /* ISViewController.m */, 140 | 6003F5A8195388D20070C39A /* Images.xcassets */, 141 | 6003F594195388D20070C39A /* Supporting Files */, 142 | 0B28F64D1D47690A00020C38 /* LaunchScreen.storyboard */, 143 | ); 144 | name = "Example for ISFIRVersionCheck"; 145 | path = ISFIRVersionCheck; 146 | sourceTree = ""; 147 | }; 148 | 6003F594195388D20070C39A /* Supporting Files */ = { 149 | isa = PBXGroup; 150 | children = ( 151 | 6003F595195388D20070C39A /* ISFIRVersionCheck-Info.plist */, 152 | 6003F596195388D20070C39A /* InfoPlist.strings */, 153 | 6003F599195388D20070C39A /* main.m */, 154 | 6003F59B195388D20070C39A /* ISFIRVersionCheck-Prefix.pch */, 155 | ); 156 | name = "Supporting Files"; 157 | sourceTree = ""; 158 | }; 159 | 6003F5B5195388D20070C39A /* Tests */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | 6003F5BB195388D20070C39A /* Tests.m */, 163 | 6003F5B6195388D20070C39A /* Supporting Files */, 164 | ); 165 | path = Tests; 166 | sourceTree = ""; 167 | }; 168 | 6003F5B6195388D20070C39A /* Supporting Files */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | 6003F5B7195388D20070C39A /* Tests-Info.plist */, 172 | 6003F5B8195388D20070C39A /* InfoPlist.strings */, 173 | 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */, 174 | ); 175 | name = "Supporting Files"; 176 | sourceTree = ""; 177 | }; 178 | 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */ = { 179 | isa = PBXGroup; 180 | children = ( 181 | 31EA5C5A6D5226FDA8AB1060 /* ISFIRVersionCheck.podspec */, 182 | 35CEEFDF6CE39B7160473F64 /* README.md */, 183 | CA56093C8A74CFB18756DB8E /* LICENSE */, 184 | ); 185 | name = "Podspec Metadata"; 186 | sourceTree = ""; 187 | }; 188 | E2417AFDBB1EBFF963C0B9A0 /* Pods */ = { 189 | isa = PBXGroup; 190 | children = ( 191 | 97F5ADE3625ED9DAA9E84CE6 /* Pods-ISFIRVersionCheck_Example.debug.xcconfig */, 192 | A05B215FE8B3E1378D097F64 /* Pods-ISFIRVersionCheck_Example.release.xcconfig */, 193 | C942825FA9266B88251CF80F /* Pods-ISFIRVersionCheck_Tests.debug.xcconfig */, 194 | EB0C913F831E6049E54B0567 /* Pods-ISFIRVersionCheck_Tests.release.xcconfig */, 195 | ); 196 | name = Pods; 197 | sourceTree = ""; 198 | }; 199 | /* End PBXGroup section */ 200 | 201 | /* Begin PBXNativeTarget section */ 202 | 6003F589195388D20070C39A /* ISFIRVersionCheck_Example */ = { 203 | isa = PBXNativeTarget; 204 | buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "ISFIRVersionCheck_Example" */; 205 | buildPhases = ( 206 | 255D846707FF323E401F4A4C /* [CP] Check Pods Manifest.lock */, 207 | 6003F586195388D20070C39A /* Sources */, 208 | 6003F587195388D20070C39A /* Frameworks */, 209 | 6003F588195388D20070C39A /* Resources */, 210 | 09F1718A690AA4E4062DA60D /* [CP] Embed Pods Frameworks */, 211 | 1C01823439E3B0145CD33255 /* [CP] Copy Pods Resources */, 212 | ); 213 | buildRules = ( 214 | ); 215 | dependencies = ( 216 | ); 217 | name = ISFIRVersionCheck_Example; 218 | productName = ISFIRVersionCheck; 219 | productReference = 6003F58A195388D20070C39A /* ISFIRVersionCheck_Example.app */; 220 | productType = "com.apple.product-type.application"; 221 | }; 222 | 6003F5AD195388D20070C39A /* ISFIRVersionCheck_Tests */ = { 223 | isa = PBXNativeTarget; 224 | buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "ISFIRVersionCheck_Tests" */; 225 | buildPhases = ( 226 | EEF138D6F8F38E2C6024F610 /* [CP] Check Pods Manifest.lock */, 227 | 6003F5AA195388D20070C39A /* Sources */, 228 | 6003F5AB195388D20070C39A /* Frameworks */, 229 | 6003F5AC195388D20070C39A /* Resources */, 230 | 861963FC2A5191192B264E47 /* [CP] Embed Pods Frameworks */, 231 | 76732787865ED31FC39FEFB2 /* [CP] Copy Pods Resources */, 232 | ); 233 | buildRules = ( 234 | ); 235 | dependencies = ( 236 | 6003F5B4195388D20070C39A /* PBXTargetDependency */, 237 | ); 238 | name = ISFIRVersionCheck_Tests; 239 | productName = ISFIRVersionCheckTests; 240 | productReference = 6003F5AE195388D20070C39A /* ISFIRVersionCheck_Tests.xctest */; 241 | productType = "com.apple.product-type.bundle.unit-test"; 242 | }; 243 | /* End PBXNativeTarget section */ 244 | 245 | /* Begin PBXProject section */ 246 | 6003F582195388D10070C39A /* Project object */ = { 247 | isa = PBXProject; 248 | attributes = { 249 | CLASSPREFIX = IS; 250 | LastUpgradeCheck = 0720; 251 | ORGANIZATIONNAME = isaced; 252 | TargetAttributes = { 253 | 6003F5AD195388D20070C39A = { 254 | TestTargetID = 6003F589195388D20070C39A; 255 | }; 256 | }; 257 | }; 258 | buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "ISFIRVersionCheck" */; 259 | compatibilityVersion = "Xcode 3.2"; 260 | developmentRegion = English; 261 | hasScannedForEncodings = 0; 262 | knownRegions = ( 263 | en, 264 | Base, 265 | ); 266 | mainGroup = 6003F581195388D10070C39A; 267 | productRefGroup = 6003F58B195388D20070C39A /* Products */; 268 | projectDirPath = ""; 269 | projectRoot = ""; 270 | targets = ( 271 | 6003F589195388D20070C39A /* ISFIRVersionCheck_Example */, 272 | 6003F5AD195388D20070C39A /* ISFIRVersionCheck_Tests */, 273 | ); 274 | }; 275 | /* End PBXProject section */ 276 | 277 | /* Begin PBXResourcesBuildPhase section */ 278 | 6003F588195388D20070C39A /* Resources */ = { 279 | isa = PBXResourcesBuildPhase; 280 | buildActionMask = 2147483647; 281 | files = ( 282 | 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */, 283 | 0B28F64E1D47690A00020C38 /* LaunchScreen.storyboard in Resources */, 284 | 6003F5A9195388D20070C39A /* Images.xcassets in Resources */, 285 | 6003F598195388D20070C39A /* InfoPlist.strings in Resources */, 286 | ); 287 | runOnlyForDeploymentPostprocessing = 0; 288 | }; 289 | 6003F5AC195388D20070C39A /* Resources */ = { 290 | isa = PBXResourcesBuildPhase; 291 | buildActionMask = 2147483647; 292 | files = ( 293 | 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */, 294 | ); 295 | runOnlyForDeploymentPostprocessing = 0; 296 | }; 297 | /* End PBXResourcesBuildPhase section */ 298 | 299 | /* Begin PBXShellScriptBuildPhase section */ 300 | 09F1718A690AA4E4062DA60D /* [CP] Embed Pods Frameworks */ = { 301 | isa = PBXShellScriptBuildPhase; 302 | buildActionMask = 2147483647; 303 | files = ( 304 | ); 305 | inputPaths = ( 306 | ); 307 | name = "[CP] Embed Pods Frameworks"; 308 | outputPaths = ( 309 | ); 310 | runOnlyForDeploymentPostprocessing = 0; 311 | shellPath = /bin/sh; 312 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ISFIRVersionCheck_Example/Pods-ISFIRVersionCheck_Example-frameworks.sh\"\n"; 313 | showEnvVarsInLog = 0; 314 | }; 315 | 1C01823439E3B0145CD33255 /* [CP] Copy Pods Resources */ = { 316 | isa = PBXShellScriptBuildPhase; 317 | buildActionMask = 2147483647; 318 | files = ( 319 | ); 320 | inputPaths = ( 321 | ); 322 | name = "[CP] Copy Pods Resources"; 323 | outputPaths = ( 324 | ); 325 | runOnlyForDeploymentPostprocessing = 0; 326 | shellPath = /bin/sh; 327 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ISFIRVersionCheck_Example/Pods-ISFIRVersionCheck_Example-resources.sh\"\n"; 328 | showEnvVarsInLog = 0; 329 | }; 330 | 255D846707FF323E401F4A4C /* [CP] Check Pods Manifest.lock */ = { 331 | isa = PBXShellScriptBuildPhase; 332 | buildActionMask = 2147483647; 333 | files = ( 334 | ); 335 | inputPaths = ( 336 | ); 337 | name = "[CP] Check Pods Manifest.lock"; 338 | outputPaths = ( 339 | ); 340 | runOnlyForDeploymentPostprocessing = 0; 341 | shellPath = /bin/sh; 342 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 343 | showEnvVarsInLog = 0; 344 | }; 345 | 76732787865ED31FC39FEFB2 /* [CP] Copy Pods Resources */ = { 346 | isa = PBXShellScriptBuildPhase; 347 | buildActionMask = 2147483647; 348 | files = ( 349 | ); 350 | inputPaths = ( 351 | ); 352 | name = "[CP] Copy Pods Resources"; 353 | outputPaths = ( 354 | ); 355 | runOnlyForDeploymentPostprocessing = 0; 356 | shellPath = /bin/sh; 357 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ISFIRVersionCheck_Tests/Pods-ISFIRVersionCheck_Tests-resources.sh\"\n"; 358 | showEnvVarsInLog = 0; 359 | }; 360 | 861963FC2A5191192B264E47 /* [CP] Embed Pods Frameworks */ = { 361 | isa = PBXShellScriptBuildPhase; 362 | buildActionMask = 2147483647; 363 | files = ( 364 | ); 365 | inputPaths = ( 366 | ); 367 | name = "[CP] Embed Pods Frameworks"; 368 | outputPaths = ( 369 | ); 370 | runOnlyForDeploymentPostprocessing = 0; 371 | shellPath = /bin/sh; 372 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ISFIRVersionCheck_Tests/Pods-ISFIRVersionCheck_Tests-frameworks.sh\"\n"; 373 | showEnvVarsInLog = 0; 374 | }; 375 | EEF138D6F8F38E2C6024F610 /* [CP] Check Pods Manifest.lock */ = { 376 | isa = PBXShellScriptBuildPhase; 377 | buildActionMask = 2147483647; 378 | files = ( 379 | ); 380 | inputPaths = ( 381 | ); 382 | name = "[CP] Check Pods Manifest.lock"; 383 | outputPaths = ( 384 | ); 385 | runOnlyForDeploymentPostprocessing = 0; 386 | shellPath = /bin/sh; 387 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 388 | showEnvVarsInLog = 0; 389 | }; 390 | /* End PBXShellScriptBuildPhase section */ 391 | 392 | /* Begin PBXSourcesBuildPhase section */ 393 | 6003F586195388D20070C39A /* Sources */ = { 394 | isa = PBXSourcesBuildPhase; 395 | buildActionMask = 2147483647; 396 | files = ( 397 | 6003F59E195388D20070C39A /* ISAppDelegate.m in Sources */, 398 | 6003F5A7195388D20070C39A /* ISViewController.m in Sources */, 399 | 6003F59A195388D20070C39A /* main.m in Sources */, 400 | ); 401 | runOnlyForDeploymentPostprocessing = 0; 402 | }; 403 | 6003F5AA195388D20070C39A /* Sources */ = { 404 | isa = PBXSourcesBuildPhase; 405 | buildActionMask = 2147483647; 406 | files = ( 407 | 6003F5BC195388D20070C39A /* Tests.m in Sources */, 408 | ); 409 | runOnlyForDeploymentPostprocessing = 0; 410 | }; 411 | /* End PBXSourcesBuildPhase section */ 412 | 413 | /* Begin PBXTargetDependency section */ 414 | 6003F5B4195388D20070C39A /* PBXTargetDependency */ = { 415 | isa = PBXTargetDependency; 416 | target = 6003F589195388D20070C39A /* ISFIRVersionCheck_Example */; 417 | targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */; 418 | }; 419 | /* End PBXTargetDependency section */ 420 | 421 | /* Begin PBXVariantGroup section */ 422 | 6003F596195388D20070C39A /* InfoPlist.strings */ = { 423 | isa = PBXVariantGroup; 424 | children = ( 425 | 6003F597195388D20070C39A /* en */, 426 | ); 427 | name = InfoPlist.strings; 428 | sourceTree = ""; 429 | }; 430 | 6003F5B8195388D20070C39A /* InfoPlist.strings */ = { 431 | isa = PBXVariantGroup; 432 | children = ( 433 | 6003F5B9195388D20070C39A /* en */, 434 | ); 435 | name = InfoPlist.strings; 436 | sourceTree = ""; 437 | }; 438 | /* End PBXVariantGroup section */ 439 | 440 | /* Begin XCBuildConfiguration section */ 441 | 6003F5BD195388D20070C39A /* Debug */ = { 442 | isa = XCBuildConfiguration; 443 | buildSettings = { 444 | ALWAYS_SEARCH_USER_PATHS = NO; 445 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 446 | CLANG_CXX_LIBRARY = "libc++"; 447 | CLANG_ENABLE_MODULES = YES; 448 | CLANG_ENABLE_OBJC_ARC = YES; 449 | CLANG_WARN_BOOL_CONVERSION = YES; 450 | CLANG_WARN_CONSTANT_CONVERSION = YES; 451 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 452 | CLANG_WARN_EMPTY_BODY = YES; 453 | CLANG_WARN_ENUM_CONVERSION = YES; 454 | CLANG_WARN_INT_CONVERSION = YES; 455 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 456 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 457 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 458 | COPY_PHASE_STRIP = NO; 459 | ENABLE_TESTABILITY = YES; 460 | GCC_C_LANGUAGE_STANDARD = gnu99; 461 | GCC_DYNAMIC_NO_PIC = NO; 462 | GCC_OPTIMIZATION_LEVEL = 0; 463 | GCC_PREPROCESSOR_DEFINITIONS = ( 464 | "DEBUG=1", 465 | "$(inherited)", 466 | ); 467 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 468 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 469 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 470 | GCC_WARN_UNDECLARED_SELECTOR = YES; 471 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 472 | GCC_WARN_UNUSED_FUNCTION = YES; 473 | GCC_WARN_UNUSED_VARIABLE = YES; 474 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 475 | ONLY_ACTIVE_ARCH = YES; 476 | SDKROOT = iphoneos; 477 | TARGETED_DEVICE_FAMILY = "1,2"; 478 | }; 479 | name = Debug; 480 | }; 481 | 6003F5BE195388D20070C39A /* Release */ = { 482 | isa = XCBuildConfiguration; 483 | buildSettings = { 484 | ALWAYS_SEARCH_USER_PATHS = NO; 485 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 486 | CLANG_CXX_LIBRARY = "libc++"; 487 | CLANG_ENABLE_MODULES = YES; 488 | CLANG_ENABLE_OBJC_ARC = YES; 489 | CLANG_WARN_BOOL_CONVERSION = YES; 490 | CLANG_WARN_CONSTANT_CONVERSION = YES; 491 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 492 | CLANG_WARN_EMPTY_BODY = YES; 493 | CLANG_WARN_ENUM_CONVERSION = YES; 494 | CLANG_WARN_INT_CONVERSION = YES; 495 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 496 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 497 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 498 | COPY_PHASE_STRIP = YES; 499 | ENABLE_NS_ASSERTIONS = NO; 500 | GCC_C_LANGUAGE_STANDARD = gnu99; 501 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 502 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 503 | GCC_WARN_UNDECLARED_SELECTOR = YES; 504 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 505 | GCC_WARN_UNUSED_FUNCTION = YES; 506 | GCC_WARN_UNUSED_VARIABLE = YES; 507 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 508 | SDKROOT = iphoneos; 509 | TARGETED_DEVICE_FAMILY = "1,2"; 510 | VALIDATE_PRODUCT = YES; 511 | }; 512 | name = Release; 513 | }; 514 | 6003F5C0195388D20070C39A /* Debug */ = { 515 | isa = XCBuildConfiguration; 516 | baseConfigurationReference = 97F5ADE3625ED9DAA9E84CE6 /* Pods-ISFIRVersionCheck_Example.debug.xcconfig */; 517 | buildSettings = { 518 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 519 | GCC_PREFIX_HEADER = "ISFIRVersionCheck/ISFIRVersionCheck-Prefix.pch"; 520 | INFOPLIST_FILE = "ISFIRVersionCheck/ISFIRVersionCheck-Info.plist"; 521 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 522 | MODULE_NAME = ExampleApp; 523 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; 524 | PRODUCT_NAME = "$(TARGET_NAME)"; 525 | WRAPPER_EXTENSION = app; 526 | }; 527 | name = Debug; 528 | }; 529 | 6003F5C1195388D20070C39A /* Release */ = { 530 | isa = XCBuildConfiguration; 531 | baseConfigurationReference = A05B215FE8B3E1378D097F64 /* Pods-ISFIRVersionCheck_Example.release.xcconfig */; 532 | buildSettings = { 533 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 534 | GCC_PREFIX_HEADER = "ISFIRVersionCheck/ISFIRVersionCheck-Prefix.pch"; 535 | INFOPLIST_FILE = "ISFIRVersionCheck/ISFIRVersionCheck-Info.plist"; 536 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 537 | MODULE_NAME = ExampleApp; 538 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; 539 | PRODUCT_NAME = "$(TARGET_NAME)"; 540 | WRAPPER_EXTENSION = app; 541 | }; 542 | name = Release; 543 | }; 544 | 6003F5C3195388D20070C39A /* Debug */ = { 545 | isa = XCBuildConfiguration; 546 | baseConfigurationReference = C942825FA9266B88251CF80F /* Pods-ISFIRVersionCheck_Tests.debug.xcconfig */; 547 | buildSettings = { 548 | BUNDLE_LOADER = "$(TEST_HOST)"; 549 | FRAMEWORK_SEARCH_PATHS = ( 550 | "$(SDKROOT)/Developer/Library/Frameworks", 551 | "$(inherited)", 552 | "$(DEVELOPER_FRAMEWORKS_DIR)", 553 | ); 554 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 555 | GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; 556 | GCC_PREPROCESSOR_DEFINITIONS = ( 557 | "DEBUG=1", 558 | "$(inherited)", 559 | ); 560 | INFOPLIST_FILE = "Tests/Tests-Info.plist"; 561 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; 562 | PRODUCT_NAME = "$(TARGET_NAME)"; 563 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ISFIRVersionCheck_Example.app/ISFIRVersionCheck_Example"; 564 | WRAPPER_EXTENSION = xctest; 565 | }; 566 | name = Debug; 567 | }; 568 | 6003F5C4195388D20070C39A /* Release */ = { 569 | isa = XCBuildConfiguration; 570 | baseConfigurationReference = EB0C913F831E6049E54B0567 /* Pods-ISFIRVersionCheck_Tests.release.xcconfig */; 571 | buildSettings = { 572 | BUNDLE_LOADER = "$(TEST_HOST)"; 573 | FRAMEWORK_SEARCH_PATHS = ( 574 | "$(SDKROOT)/Developer/Library/Frameworks", 575 | "$(inherited)", 576 | "$(DEVELOPER_FRAMEWORKS_DIR)", 577 | ); 578 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 579 | GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; 580 | INFOPLIST_FILE = "Tests/Tests-Info.plist"; 581 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; 582 | PRODUCT_NAME = "$(TARGET_NAME)"; 583 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ISFIRVersionCheck_Example.app/ISFIRVersionCheck_Example"; 584 | WRAPPER_EXTENSION = xctest; 585 | }; 586 | name = Release; 587 | }; 588 | /* End XCBuildConfiguration section */ 589 | 590 | /* Begin XCConfigurationList section */ 591 | 6003F585195388D10070C39A /* Build configuration list for PBXProject "ISFIRVersionCheck" */ = { 592 | isa = XCConfigurationList; 593 | buildConfigurations = ( 594 | 6003F5BD195388D20070C39A /* Debug */, 595 | 6003F5BE195388D20070C39A /* Release */, 596 | ); 597 | defaultConfigurationIsVisible = 0; 598 | defaultConfigurationName = Release; 599 | }; 600 | 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "ISFIRVersionCheck_Example" */ = { 601 | isa = XCConfigurationList; 602 | buildConfigurations = ( 603 | 6003F5C0195388D20070C39A /* Debug */, 604 | 6003F5C1195388D20070C39A /* Release */, 605 | ); 606 | defaultConfigurationIsVisible = 0; 607 | defaultConfigurationName = Release; 608 | }; 609 | 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "ISFIRVersionCheck_Tests" */ = { 610 | isa = XCConfigurationList; 611 | buildConfigurations = ( 612 | 6003F5C3195388D20070C39A /* Debug */, 613 | 6003F5C4195388D20070C39A /* Release */, 614 | ); 615 | defaultConfigurationIsVisible = 0; 616 | defaultConfigurationName = Release; 617 | }; 618 | /* End XCConfigurationList section */ 619 | }; 620 | rootObject = 6003F582195388D10070C39A /* Project object */; 621 | } 622 | -------------------------------------------------------------------------------- /Example/ISFIRVersionCheck.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/ISFIRVersionCheck.xcodeproj/xcshareddata/xcschemes/ISFIRVersionCheck-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /Example/ISFIRVersionCheck.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/ISFIRVersionCheck/ISAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // ISAppDelegate.h 3 | // ISFIRVersionCheck 4 | // 5 | // Created by isaced on 07/26/2016. 6 | // Copyright (c) 2016 isaced. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | @interface ISAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Example/ISFIRVersionCheck/ISAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // ISAppDelegate.m 3 | // ISFIRVersionCheck 4 | // 5 | // Created by isaced on 07/26/2016. 6 | // Copyright (c) 2016 isaced. All rights reserved. 7 | // 8 | 9 | #import "ISAppDelegate.h" 10 | #import "ISFIRVersionCheck.h" 11 | 12 | @implementation ISAppDelegate 13 | 14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 15 | { 16 | // Override point for customization after application launch. 17 | 18 | // [ISFIRVersionCheck setAPIToken:@""]; 19 | [ISFIRVersionCheck setAppID:@"" APIToken:@""]; 20 | [ISFIRVersionCheck check]; 21 | 22 | return YES; 23 | } 24 | 25 | - (void)applicationWillResignActive:(UIApplication *)application 26 | { 27 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 28 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 29 | } 30 | 31 | - (void)applicationDidEnterBackground:(UIApplication *)application 32 | { 33 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 34 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 35 | } 36 | 37 | - (void)applicationWillEnterForeground:(UIApplication *)application 38 | { 39 | // 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. 40 | } 41 | 42 | - (void)applicationDidBecomeActive:(UIApplication *)application 43 | { 44 | // 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. 45 | } 46 | 47 | - (void)applicationWillTerminate:(UIApplication *)application 48 | { 49 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 50 | } 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /Example/ISFIRVersionCheck/ISFIRVersionCheck-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSAllowsArbitraryLoads 30 | 31 | 32 | UILaunchStoryboardName 33 | LaunchScreen 34 | UIMainStoryboardFile 35 | Main 36 | UIRequiredDeviceCapabilities 37 | 38 | armv7 39 | 40 | UISupportedInterfaceOrientations 41 | 42 | UIInterfaceOrientationPortrait 43 | 44 | UISupportedInterfaceOrientations~ipad 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationPortraitUpsideDown 48 | UIInterfaceOrientationLandscapeLeft 49 | UIInterfaceOrientationLandscapeRight 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /Example/ISFIRVersionCheck/ISFIRVersionCheck-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | @import UIKit; 15 | @import Foundation; 16 | #endif 17 | -------------------------------------------------------------------------------- /Example/ISFIRVersionCheck/ISViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ISViewController.h 3 | // ISFIRVersionCheck 4 | // 5 | // Created by isaced on 07/26/2016. 6 | // Copyright (c) 2016 isaced. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | @interface ISViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/ISFIRVersionCheck/ISViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ISViewController.m 3 | // ISFIRVersionCheck 4 | // 5 | // Created by isaced on 07/26/2016. 6 | // Copyright (c) 2016 isaced. All rights reserved. 7 | // 8 | 9 | #import "ISViewController.h" 10 | #import "ISFIRVersionCheck.h" 11 | 12 | @interface ISViewController () 13 | 14 | @end 15 | 16 | @implementation ISViewController 17 | 18 | - (void)viewDidLoad 19 | { 20 | [super viewDidLoad]; 21 | } 22 | 23 | - (IBAction)checkVersion:(UIButton *)sender { 24 | [ISFIRVersionCheck check]; 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Example/ISFIRVersionCheck/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /Example/ISFIRVersionCheck/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "ipad", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "1x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "ipad", 13 | "extent" : "full-screen", 14 | "minimum-system-version" : "7.0", 15 | "scale" : "2x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Example/ISFIRVersionCheck/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Example/ISFIRVersionCheck/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Example/ISFIRVersionCheck/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Example/ISFIRVersionCheck/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ISFIRVersionCheck 4 | // 5 | // Created by isaced on 07/26/2016. 6 | // Copyright (c) 2016 isaced. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | #import "ISAppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) 13 | { 14 | @autoreleasepool { 15 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([ISAppDelegate class])); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'ISFIRVersionCheck_Example' do 4 | pod 'ISFIRVersionCheck', :path => '../' 5 | 6 | target 'ISFIRVersionCheck_Tests' do 7 | inherit! :search_paths 8 | 9 | 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - ISFIRVersionCheck (0.1.0) 3 | 4 | DEPENDENCIES: 5 | - ISFIRVersionCheck (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | ISFIRVersionCheck: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | ISFIRVersionCheck: 2f31f9596c63f218df6cea6b03079a14dad902c5 13 | 14 | PODFILE CHECKSUM: 864bb3da9bf8327c65daec21ce7345ae6350db09 15 | 16 | COCOAPODS: 1.0.1 17 | -------------------------------------------------------------------------------- /Example/Tests/Tests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Example/Tests/Tests-Prefix.pch: -------------------------------------------------------------------------------- 1 | // The contents of this file are implicitly included at the beginning of every test case source file. 2 | 3 | #ifdef __OBJC__ 4 | 5 | 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /Example/Tests/Tests.m: -------------------------------------------------------------------------------- 1 | // 2 | // ISFIRVersionCheckTests.m 3 | // ISFIRVersionCheckTests 4 | // 5 | // Created by isaced on 07/26/2016. 6 | // Copyright (c) 2016 isaced. All rights reserved. 7 | // 8 | 9 | @import XCTest; 10 | 11 | @interface Tests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation Tests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | 36 | -------------------------------------------------------------------------------- /Example/Tests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /ISFIRVersionCheck.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint ISFIRVersionCheck.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'ISFIRVersionCheck' 11 | s.version = '0.2.0' 12 | s.summary = 'fir 版本自动检测,有新版本弹 Alert 前往更新' 13 | 14 | s.description = <<-DESC 15 | 基于 fir 对比 build 版本号自动检测新版本信息,有新版本弹 Alert 前往更新。 16 | DESC 17 | 18 | s.homepage = 'https://github.com/isaced/ISFIRVersionCheck' 19 | s.screenshots = 'https://raw.githubusercontent.com/isaced/ISFIRVersionCheck/master/screenshot.png' 20 | s.license = { :type => 'MIT', :file => 'LICENSE' } 21 | s.author = { 'isaced' => 'isaced@163.com' } 22 | s.source = { :git => 'https://github.com/isaced/ISFIRVersionCheck.git', :tag => s.version.to_s } 23 | 24 | s.ios.deployment_target = '7.0' 25 | 26 | s.source_files = 'ISFIRVersionCheck/Classes/**/*' 27 | end 28 | -------------------------------------------------------------------------------- /ISFIRVersionCheck/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isaced/ISFIRVersionCheck/dc2a20214be4420c3b71b4dc42d9fbd658df429f/ISFIRVersionCheck/Assets/.gitkeep -------------------------------------------------------------------------------- /ISFIRVersionCheck/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isaced/ISFIRVersionCheck/dc2a20214be4420c3b71b4dc42d9fbd658df429f/ISFIRVersionCheck/Classes/.gitkeep -------------------------------------------------------------------------------- /ISFIRVersionCheck/Classes/ISFIRVersionCheck.h: -------------------------------------------------------------------------------- 1 | // 2 | // ISFIRVersionCheck.h 3 | // Pods 4 | // 5 | // Created by isaced on 16/7/26. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface ISFIRVersionCheck : NSObject 12 | 13 | /** 14 | * 配置 api_token,根据 bundle id 自动匹配应用 15 | */ 16 | + (void)setAPIToken:(NSString *)APIToken; 17 | 18 | /** 19 | * 配置 app_id 和 api_token 20 | */ 21 | + (void)setAppID:(NSString *)appID APIToken:(NSString *)APIToken; 22 | 23 | /** 24 | * 根据当前项目 build 版本号检查新版本,有则自动弹出 UIAlertView 提醒 25 | */ 26 | + (void)check; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /ISFIRVersionCheck/Classes/ISFIRVersionCheck.m: -------------------------------------------------------------------------------- 1 | // 2 | // ISFIRVersionCheck.m 3 | // Pods 4 | // 5 | // Created by isaced on 16/7/26. 6 | // 7 | // 8 | 9 | #import 10 | #import "ISFIRVersionCheck.h" 11 | 12 | @interface ISFIRVersionCheck() 13 | 14 | @property (nonatomic, copy) NSString *firAppID; 15 | @property (nonatomic, copy) NSString *firAPIToken; 16 | @property (nonatomic, copy) NSString *updateURL; 17 | 18 | @end 19 | 20 | @implementation ISFIRVersionCheck 21 | 22 | + (instancetype)sharedInstance 23 | { 24 | static ISFIRVersionCheck *sharedInstance = nil; 25 | static dispatch_once_t onceToken; 26 | dispatch_once(&onceToken, ^{ 27 | sharedInstance = [[ISFIRVersionCheck alloc] init]; 28 | }); 29 | return sharedInstance; 30 | } 31 | 32 | +(void)setAPIToken:(NSString *)APIToken{ 33 | [ISFIRVersionCheck sharedInstance].firAPIToken = APIToken; 34 | } 35 | 36 | + (void)setAppID:(NSString *)appID APIToken:(NSString *)APIToken{ 37 | [ISFIRVersionCheck sharedInstance].firAppID = appID; 38 | [ISFIRVersionCheck sharedInstance].firAPIToken = APIToken; 39 | } 40 | 41 | + (void)check{ 42 | NSString *idString = [ISFIRVersionCheck sharedInstance].firAppID; 43 | if (!idString) { 44 | idString = [[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleIdentifierKey]; 45 | } 46 | NSString *apiToken = [ISFIRVersionCheck sharedInstance].firAPIToken; 47 | NSString *idUrlString = [NSString stringWithFormat:@"http://api.fir.im/apps/latest/%@?api_token=%@",idString,apiToken]; 48 | NSURL *requestURL = [NSURL URLWithString:idUrlString]; 49 | NSURLRequest *request = [NSURLRequest requestWithURL:requestURL]; 50 | [NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) { 51 | if (connectionError) { 52 | NSLog(@"FIR - 新版本检测失败!"); 53 | }else { 54 | NSError *jsonError = nil; 55 | id object = [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonError]; 56 | if (!jsonError && [object isKindOfClass:[NSDictionary class]]) { 57 | NSString *code = object[@"code"]; 58 | NSString *errors = object[@"errors"]; 59 | 60 | if (code && errors) { 61 | NSLog(@"FIR - 新版本检测失败! (%@,%@)", code, errors); 62 | }else{ 63 | NSString *version = object[@"version"]; 64 | NSString *build = object[@"build"]; 65 | NSString *changelog = object[@"changelog"]; 66 | NSString *update_url = object[@"update_url"]; 67 | 68 | [ISFIRVersionCheck sharedInstance].updateURL = update_url; 69 | NSString *currentBuild = [[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey]; 70 | 71 | if ([build integerValue] > [currentBuild integerValue]) { 72 | NSLog(@"FIR - 检测到新版本 v%@(%@) ",version,build); 73 | NSLog(@"FIR - 更新内容: \n%@ ",changelog); 74 | 75 | UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"检测到新版本" message:changelog delegate:[ISFIRVersionCheck sharedInstance] cancelButtonTitle:@"暂不更新" otherButtonTitles:@"前去更新", nil]; 76 | [alertView show]; 77 | } 78 | } 79 | } 80 | } 81 | }]; 82 | } 83 | 84 | -(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{ 85 | if (buttonIndex == 1 && self.updateURL) { 86 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:self.updateURL]]; 87 | } 88 | } 89 | 90 | @end 91 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 isaced 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ISFIRVersionCheck 2 | 基于 fir 对比 build 版本号自动检测新版本信息,有新版本弹 Alert 前往更新。 3 | 4 | ![screenshot](https://raw.githubusercontent.com/isaced/ISFIRVersionCheck/master/screenshot.png) 5 | 6 | ### CocoaPods 7 | 8 | ``` 9 | pod 'ISFIRVersionCheck' 10 | ``` 11 | 12 | ### 设置 13 | 14 | 可以在 AppDelegate 中配置应用在 fir 上的 ID,和其帐号的 api_token. (可在 fir 后台查看),以下两种方式任选其一即可 15 | 16 | ``` 17 | // 使用 api_token 初始化,根据 bundle id 自动匹配应用 18 | [ISFIRVersionCheck setAPIToken:@""]; 19 | 20 | // 使用 app_id 和 api_token 初始化 21 | [ISFIRVersionCheck setAppID:@"" APIToken:@""]; 22 | ``` 23 | 24 | ### 检测更新 25 | 26 | 然后在想检测版本更新的地方执行如下方法,当然也可以在 AppDelegate 中执行,Alert 会在版本请求返回成功并比对 build 版本号弹出 27 | 28 | ``` 29 | [ISFIRVersionCheck check]; 30 | ``` 31 | ### 用到的接口 32 | 33 | - fir.im - 版本检测 : https://fir.im/docs/version_detection 34 | 35 | 版本比对:当前项目 build 如果小于最新的则弹出 Alert,前往更新 url 取的接口返回值中的 update_url 字段。 36 | 37 | 更新内容:Alert 中的 changlog 取的是 fir 后台每版本的 "更新日志",对应接口返回中的 changelog 字段,可以随时在 fir 后台修改即生效。 38 | 39 | ### Build 版本号递增 40 | 41 | 由于判断新版本是用的 build 字段,所以每次更新编译打包都需要同时更新项目 build 号,所以建议配置 build 自动递增,要是再配合上自动编译、上传脚本就更方便了。 42 | 43 | build 递增脚本可以参照如下脚本: 44 | 45 | ``` 46 | # 递增版本号 build 47 | buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") 48 | buildNumber=$(($buildNumber + 1)) 49 | /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE" 50 | ``` 51 | 52 | ### License 53 | 54 | MIT 55 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isaced/ISFIRVersionCheck/dc2a20214be4420c3b71b4dc42d9fbd658df429f/screenshot.png --------------------------------------------------------------------------------