Discovering the iOS App Purchase Date

前端 未结 3 1290
难免孤独
难免孤独 2021-01-14 06:35

I\'m explicitly NOT referring to in-app purchases.

Is it possible to discover the purchase date of the application itself on iOS?

I\'d like to reward early

3条回答
  •  北恋
    北恋 (楼主)
    2021-01-14 07:27

    I am almost positive this is impossible by any method.

    HOWEVER you could potentially store the date of their first "launch" of the application then do whatever you wanted with it.

    if ([[[[NSUserDefaults standardUserDefaults] dictionaryRepresentation] allKeys] containsObject:@"firstLaunch"]) {
        [[NSUserDefaults standardUserDefaults] setObject:[NSDate date] forKey:@"firstLaunch"];
    }
    
    NSDate *firstLaunch = [[NSUserDefaults standardUserDefaults] objectForKey:@"firstLaunch"];
    
    if (firstLaunch < Cutoff) {
        // Do Something
    }
    

提交回复
热议问题