拓展阅读:2018 年 8 月 31 日,iOS 12 beta 疯狂弹窗提示"A new iOS update is now available. Please update from iOS 12 beta.",但吃瓜网友点进设置之后发现啥也没有,其实是 Apple 的程序员直接硬编码了 beta 更新时间:

这次的淘宝也一样。 如下图:

伪代码:
- (void)check{ NSDateFormatter* dateFormatter = [[NSDateFormatter alloc]init]; NSLocale* locale = [[NSLocale alloc]initWithLocaleIdentifier:@"en_US"]; [dateFormatter setLocale:locale]; NSString* dateString = @"Mar 13 2020"; NSDate* baseDate = [dateFormatter dateFromString:dateString]; NSTimeInterval currentDateTimeInterval = [[NSDate date] timeIntervalSince1970]; NSTimeInterval baseDateTimeInterval = [baseDate timeIntervalSince1970]; if (currentDateTimeInterval - baseDateTimeInterval >= 15 * 24 * 60 * 60){ UIAlertView* alertView = [[UIAlertView alloc]initWithTitle:@"您使用的程序是测试版本,目前已经过期,请更新到最新版本" message:NULL delegate:nil cancelButtonTitle:@"确定" otherButtonTitles: nil]; [alertView show]; [kill]; } else if (currentDateTimeInterval - baseDateTimeInterval >= 12 * 24 * 60 * 60) { //"您使用的程序是内测版本,将于当地时间%@到期,到期后将无法使用,请尽快下载最新版本" [kill] } } 这么简单的一件事为啥总有人喜欢扯阴谋论?不是很懂,从什么时候开始几张微信聊天记录和朋友圈都能当作证据了?就没人会真正动手去看看么,大家好歹也是个程序员吧?
