2010 Archives

iPAD 链接外置显示器

| No Comments | No TrackBacks

iPhone SDK 3.2 /4.0 模拟器支持电视输出,可选分辨率为
640*480
1024*168
1280*720 720p

屏幕快照 2010-05-02 上午01.27.22.png
ipad_extern_displayer.png


RegexKitLite 使用

| No Comments | No TrackBacks

RegexKitLite 之前搞过,但是内弄清楚,这次必须搞好。

下面是测试代码,在SDK 4.0 上通过。3.2一下NSRegularExpressionSearch 不支持,自己想办法吧。


-(void)test

{

NSString *html=[NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"1.html" ofType:nil] encoding:NSUTF8StringEncoding error:nil];

//NSString *exp=@"/(https?)://(\\d+))?((?:/[a-zA-Z0-9\\-._?,'+\\&%$=~*!():@\\]*)+)?/";

NSString *exp=@"http://[^ ]*.(png|jpeg|PNG|JPEG|JPG|jpg)";

NSRange r;

for(NSString *match in [html componentsMatchedByRegex:exp]) {

NSLog(@"111Phone number is %@", match);

}

r = [html rangeOfString:exp options:NSRegularExpressionSearch];

if (r.location != NSNotFound) {

NSLog(@"Phone number is %@", [html substringWithRange:r]);

} else {

NSLog(@"Not found.");

}

}

1 需要PushMebaby 原代码,简单的demo 程序
2 参考其他文档做就可以了
  唯一不有问题的是PushMebaby 没有针对ADHoc 做调整,需要调整的代码
dev 环境

result = MakeServerConnection("gateway.sandbox.push.apple.com", 2195, &socket, &peer);

result = SSLSetPeerDomainName(context, "gateway.push.apple.com", 30);


ADHOC

result = MakeServerConnection("gateway.push.apple.com", 2195, &socket, &peer);

result = SSLSetPeerDomainName(context, "gateway.push.apple.com", 22);


这这个地方要注意DomainName 长度变了,是22不是30。在这个地方上浪费时间了,反复生成cert 文件好几次。

上图

epad_push_notification.png

后面是app delegate class 需要增加的代码

操蛋的代码

| No Comments | No TrackBacks

if( homeViewObj != nil )

{

channelViewObj = [[CChannelsView alloc] init];

if( channelViewObj != nil

{

searchViewObj = [[CSearchView alloc] init];

if( searchViewObj != nil )

{

downloadViewObj = [[CDownloadView alloc] init];

if( downloadViewObj != nil )

{

topicNaviObj = [[CTopicNavi alloc] init];

if ( topicNaviObj != nil )

{

rankingNaviObj = [[CRankingNaviView alloc] init];

if ( rankingNaviObj != nil )

{

collectionNaviObj = [[CollectionNavi alloc] init];

if ( collectionNaviObj != nil )

iPad 256M 内存

| No Comments | No TrackBacks
sysctl.png

iPhone 4.0 来了

| No Comments | No TrackBacks
iPhone4.PNG
1 多任务支持
2 iAD 广告系统
3 GameCenter
4 企业功能增强,运行企业内部发布,不需要iTunes 同步了,这个很好。
多个 Exchange 账户
6 Mail 增强
 
mail.PNG
详细细节看发布会视频或者新闻吧。

另外
iPhone OS 4.0 基于Darwin 10.3,既 SnowLeopard 10.6.3 
baseband 5.13.03 (3GS) 不同于 3.1.3