给app加上时间限制

简介: 给app加上时间限制
 NSDate *  senddate=[NSDate date];
    NSCalendar  * cal=[NSCalendar  currentCalendar];
    NSUInteger  unitFlags=NSDayCalendarUnit|NSMonthCalendarUnit|NSYearCalendarUnit;
    NSDateComponents * conponent= [cal components:unitFlags fromDate:senddate];
    NSInteger year=[conponent year];
    NSInteger month=[conponent month];
    NSInteger day=[conponent day];
    int dayNum = year*10000+month*100+day;
    if(dayNum>20130222&&dayNum<20130310)
    {
     if(g_sqlite==nil)
     {
        g_sqlite = [[CSqlite alloc]init];
        [g_sqlite openSqlite];
     }
    }
    else{
        UIAlertView *alert = [[UIAlertView alloc]initWithTitle:nil message:@"您当前使用的是测试版本,已过测试期限,请联系开发商" delegate:self cancelButtonTitle:@"确定" otherButtonTitles: nil];
        [alert show];
    }
相关文章
|
小程序 测试技术 程序员
APP - APP开发耗费时间长,原来还有这么个说法,又学到了
APP - APP开发耗费时间长,原来还有这么个说法,又学到了
124 0
APP - APP开发耗费时间长,原来还有这么个说法,又学到了
|
移动开发 达摩院 算法
2021年度友盟+ APP消息推送白皮书:工作日6-8点通勤时间消息送达率每日最高
友盟+基于卓越的数据技术与算法能力,于2021年联合阿里巴巴达摩院,推出国内首款智能推送,在保障高送达率的基础上提升消息内容可读性和点击率。友盟+推出《2021 年度APP消息推送白皮书》,该白皮书从送达通道、用户送达偏好、分行业送达率等多个角度解读,带您了解行业推送现状的同时,有效提升APP的消息推送送达率。
2021年度友盟+ APP消息推送白皮书:工作日6-8点通勤时间消息送达率每日最高
一对一视频聊天APP源码,根据系统显示时间
一对一视频聊天APP源码,根据系统显示时间
229 0
Confluence 6 移动应用 app 限制和已知的问题
Confluence 6 移动应用 app 限制和已知的问题
336 0
|
Web App开发 Windows Android开发
App版本迭代时间安排(思路重要)
<p><br></p> <p style="text-align:center"><span style="font-size:24px; color:#cc33cc"><strong>App 2周版本迭代时间安排</strong></span><br></p> <p style="text-align:center"><span style="font-size:24px; colo
5651 0