ios - How to find out WHEN a user bought the app / installed it for the first time (possible without UDID?) -
i find out when user first bought app... far, havent found clean way , udid seemed option.
ideally there receipt can via storekit far.. nada
have missed ? have idea?
the situation have subscription , first issue (from time buy app should free). if reinstall @ later time.. should original issue)
example: buy app in 10.2010 install , run , subscription issue 10.2010 free (no in-app purchase) delete app install 1.2013 , subscription 10.2010 free! not new one
you can store flag in keychain. contents of keychain preserved across app reinstalls.
to first installation time of app, check when first time app binary has been written disk:
if (flag_in_keychain_not_present()) { // installed first time set_flag_in_keychain(); struct stat st; stat([nsbundle mainbundle].executablepath.utf8string, &st); time_t installed = st.st_mtime; }
Comments
Post a Comment