【iOS开发-119】ipa打包、单元测试test、本地通知UILocalNotification
来源:互联网 发布:美丽折淘客软件下载 编辑:程序博客网 时间:2024/06/13 03:43
(1)ipa打包,可以用Xcode,也可以用iTunes,用后者比较快。
具体教程:使用XCode和iTunes打包ipa i OS_ipa打包的方法
(2)单元测试(一般用于测试某一个方法是否可行等等)
——轻量化
——和程序target是单独分开的
——比较直观快读地知道测试结果
相对而言,还有集群测试(一般测试一些模块和功能)、压力测试(加大数据或者用户进行测试)
(3)本地通知
#import "ViewController.h"@interface ViewController ()- (IBAction)addLocalNotification:(id)sender;@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; if ([[UIDevice currentDevice].systemVersion doubleValue]>=8.0) { UIUserNotificationSettings *setting=[UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound categories:nil]; [[UIApplication sharedApplication]registerUserNotificationSettings:setting]; }}- (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated.}- (IBAction)addLocalNotification:(id)sender { //创建 UILocalNotification *localNoti=[[UILocalNotification alloc]init]; //设置 localNoti.alertAction=@"开始玩游戏";//操作提示 localNoti.alertBody=@"这是alertBody";//提示内容 localNoti.repeatInterval=NSCalendarUnitDay;//提示间隔 localNoti.applicationIconBadgeNumber=3;//badge number localNoti.fireDate=[NSDate dateWithTimeIntervalSinceNow:3];//什么时候开始提示 //注册,先删除之前所有的,再添加,防止重复 [[UIApplication sharedApplication] cancelAllLocalNotifications]; [[UIApplication sharedApplication] scheduleLocalNotification:localNoti];}@end
如果需要点击本地通知,到特定的页面,则需要判断。
——程序在运行时,点击本地通知的话,会调用AppDelegate.m的如下方法。直接点击icon图标的话,就正常启动。
-(void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification{ }
0 0
- 【iOS开发-119】ipa打包、单元测试test、本地通知UILocalNotification
- [IOS开发] 本地通知:UILocalNotification
- iOS开发之UILocalNotification本地通知
- iOS开发之本地通知UILocalNotification
- iOS开发---本地通知(UILocalNotification)
- iOS本地通知UILocalNotification
- IOS 本地通知 UILocalNotification
- ios本地通知UILocalNotification
- iOS UILocalNotification本地通知
- iOS本地通知:UILocalNotification
- iOS本地通知:UILocalNotification
- iOS UILocalNotification本地通知
- iOS本地通知:UILocalNotification
- iOS本地通知:UILocalNotification
- iOS UILocalNotification本地通知
- iOS本地通知 UILocalNotification
- iOS 本地通知:UILocalNotification
- ios推送:本地通知UILocalNotification
- 使用axis2 部署webservice服务
- Spring prototype bean 怎么了
- CUDA Review
- C#之浅析面向对象编程思想(一)
- ACM #1015 KMP算法
- 【iOS开发-119】ipa打包、单元测试test、本地通知UILocalNotification
- Same Tree
- 为什么openstack中的oslo模块总喜欢发生代码冲突? (by quqi99)
- 一个简单的C共享库的创建及python调用此库的方法
- CPU及Linux内核中不同地址概念
- Java虚拟机运行时数据区域
- crontab中执行其他账号运行的程序 免密码
- cocos2dx2.0 ----- cocos2dx3.0
- 常见错误总结