{"id":3040,"url":"https://github.com/Stunner/App-Update-Tracker","last_synced_at":"2025-08-03T13:31:48.223Z","repository":{"id":5619204,"uuid":"6826890","full_name":"Stunner/App-Update-Tracker","owner":"Stunner","description":"Simple app install/update behavior detection.","archived":false,"fork":false,"pushed_at":"2016-01-07T06:12:35.000Z","size":67,"stargazers_count":26,"open_issues_count":0,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-25T23:11:45.203Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://h4ckish.com/2014/12/23/how-use-appupdatetracker-to-determine-installupdate-behavior-in-your-ios-app/","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Stunner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-11-23T12:09:31.000Z","updated_at":"2024-09-22T20:14:41.000Z","dependencies_parsed_at":"2022-08-20T18:50:40.531Z","dependency_job_id":null,"html_url":"https://github.com/Stunner/App-Update-Tracker","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stunner%2FApp-Update-Tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stunner%2FApp-Update-Tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stunner%2FApp-Update-Tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stunner%2FApp-Update-Tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Stunner","download_url":"https://codeload.github.com/Stunner/App-Update-Tracker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228548567,"owners_count":17935221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:16:29.691Z","updated_at":"2024-12-07T01:30:30.326Z","avatar_url":"https://github.com/Stunner.png","language":"Objective-C","funding_links":[],"categories":["Utility"],"sub_categories":["Web View","Other free courses"],"readme":"App-Update-Tracker\n==================\n\nAppUpdateTracker is a simple, lightweight iOS library intended to determine basic app install/update behavior. The following is a list of when events are triggered:\n\n* when the user launches the app for the first time, provides:\n  * **timestamp** of when user opened app for the first time, in seconds since epoch\n  * **installation count** representing the number of times the user has opened the app for the first time on the same device\n* when the user opens the app for the first time after updating, provides:\n  * the **previous version** the user updated from\n  * the **current version** of the app (provided for convenience)\n* when the user brings the app to the foreground, provides:\n  * **usage count** representing how many times the app has been opened (includes bringing app to foreground after resigning active, not only cold start)\n\nThis library posts an alert or executes a block with information on one (and only one) of the 3 aforementioned behaviors per app session (each time the app is run).\n\n# How to Add to Your Project\n\n### CocoaPods\n\nTo install with [CocoaPods](http://cocoapods.org/) include the following in your Podfile:\n\n```ruby\npod 'App-Update-Tracker', '~\u003e 2.0'\n```\n\nThen install:\n\n```ruby\n$ pod install\n```\n\nConsult the [\"Getting Started\"](https://github.com/AFNetworking/AFNetworking/wiki/Getting-Started-with-AFNetworking) guide (taken from the lovely AFNetworking project) for more information.\n\n### The Old Fashioned Way\n\nMerely copy the AppUpdateTracker folder (and its contents) to your project.\n\n# Usage\n\n\nImport `AppUpdateTracker.h` in your `AppDelegate` class and register for `AppUpdateTracker` events within the `application:didFinishLaunchingWithOptions:` method:\n\n```\n#import \"AppUpdateTracker.h\"\n\n//...\n\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\n{\n    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];\n    // Override point for customization after application launch.\n    \n    [AppUpdateTracker registerForAppUpdatesWithBlock:^(NSString *previousVersion, NSString *currentVersion) {\n        NSLog(@\"app updated from: %@ to: %@\", previousVersion, currentVersion);\n    }];\n    [AppUpdateTracker registerForFirstInstallWithBlock:^(NSTimeInterval installTimeSinceEpoch, NSUInteger installCount) {\n        NSLog(@\"first install detected at: %f amount of times app was (re)installed: %lu\", installTimeSinceEpoch, (unsigned long)installCount);\n    }];\n    [AppUpdateTracker registerForIncrementedUseCountWithBlock:^(NSUInteger useCount) {\n        NSLog(@\"incremented use count to: %lu\", (unsigned long)useCount);\n    }];\n    \n    //...\n}\n```\n\nConsult the sample project for more info.\n\n# Migration\n\n### 1.x to 2.0\n\nPotential codebreaking changes:\n* Added `installCount` to first install event, this changes the first install block registration method to `+ (void)registerForFirstInstallWithBlock:(void (^)(NSTimeInterval installTimeSinceEpoch, NSUInteger installCount))block`.\n* Changed `oldVersion` to `previousVersion` for app updated event, this changes the notification previous version key to `kAUTNotificationUserInfoPreviousVersionKey`.\n* Added `currentVersion` to app updateded event, this changes the app updated block registration method to `+ (void)registerForAppUpdatesWithBlock:(void (^)(NSString *previousVersion, NSString *currentVersion))block`.\n* Changed `+ (BOOL)getUserUpgradedApp` to `+ (BOOL)getUserUpdatedApp`.\n\n# License\n\nMIT License\n\nCopyright (c) 2012, Aaron Jubbal\nAll rights reserved.\n \nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n \nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n \nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStunner%2FApp-Update-Tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FStunner%2FApp-Update-Tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStunner%2FApp-Update-Tracker/lists"}