手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆
浏览模式: 标准 | 列表分类:苹果相关

NSLog 输出格式

NSLog是IOS上面常用的做记录的方式,感觉有点象是php中的printf,因为常用,所以就记录了一下。
%@ 对象
• %d, %i 整数
• %u 无符整形
• %f 浮点/双字
• %x, %X 二进制整数
• %o 八进制整数
• %zu size_t
• %p 指针
• %e 浮点/双字 (科学计算)
• %g 浮点/双字
• %s C 字符串
• %.*s Pascal字符串
• %c 字符
• %C unichar
• %lld 64位长整数(long long)
• %llu 无符64位长整数
• %Lf 64位双字

反正纠结纠结就当printf了。也就@用的最多一点吧

苹果官方:Introduction to WebKit DOM Programming Topics

这是一篇来自苹果官方的教程,原来我也没想到过,居然可以用JS来调用Object-C中的东东。其实想想,这应该是可以,要知道,象maxthon这些浏览器,可就是早就能够调用他们的核心组件了,当然,也是用JS的。firefox也是类似。。。所以Safari应该也是可以支持的。
官方文章地址是:http://developer.apple.com/library/mac/#documentation/AppleApplications/Conceptual/SafariJSProgTopics/WebKitJavaScript.html

看看他们是怎么写的,
Important: This is a preliminary document. Although it has been reviewed for technical accuracy, it is not final. Apple is supplying this information to help you adopt the technologies and programming interfaces described herein. This information is subject to change, and software implemented according to this document should be vetted against final documentation. For information about updates to this and other developer documentation, you can check the ADC Reference Library Revision List. To receive notification of documentation updates, you can sign up for a free Apple Developer Connection Online membership and receive the bi-weekly ADC News e-mail newsletter. See http://developer.apple.com/products/for more details about ADC membership.)

还有。。。

Who Should Read This Document?

This document is designed for a number of different audiences:

  • If you are a web content developer—developing web sites and embedded JavaScript applications—you should read about Safari’s JavaScript support and how scripts operate within WebKit-based applications.

  • If you are a Cocoa and WebKit developer, you should read about how to integrate JavaScript into your WebKit views and how to enhance your user experience in doing so.

  • If you are a Dashboard developer, you should read about integrating JavaScript into your widgets to provide a better user experience and more advanced features to your users.

Organization of This Document

The topic contains the following articles:

See Also

  • Safari HTML Reference provides descriptions of HTML tags, attributes, and other markup.

  • Safari CSS Reference provides descriptions of CSS properties and constants.

  • Safari Web Content Guide provides information about designing web content for iPhone.

  • Dashboard Programming Topics provides information on the technologies available to you when creating a Dashboard widget. Additional Dashboard documents and sample code can be found in the Reference Library > Apple Applications > Dashboard.

  • Apple JavaScript Coding Guidelines provides general tips about the JavaScript programming language.

  • The Reference Library > Apple Applications > Safari section of the ADC Reference Library provides useful information on WebKit, the technology that provides Apple’s JavaScript runtime.

果然还是官方的资料最多,NND,平时搜点资料都搜不到,还是官方给的方案最多啊。

Tags: javascript, object-c, dom, webkit

笔记1

这段时间在和IOS开发的同事们互相配合,本来是有笔记都会记录下来的。然而那段时间网站备案出点问题。然后就没有记录下来。于是现在开始就要把当时遇到的一些问题开始记录了。
比如这个。原本程序写的时候没有考虑推送,但是在进行了一阵后,发现还是需要推送才行,但当时创建的版本是是类似xxx.xxx.*,如果用推送的话就不能xxx.xxx.*,而是要用具体的版本(因为不是我写的啦,所以说不太清楚),后来找到了官方的介绍:
http://developer.apple.com/library/ios/#qa/qa1680/_index.html

可以从这里看:

Updating from a wildcard App ID to an explicit App ID

Q:  My application is currently signed with a Provisioning Profile that uses a wildcard App ID. How do I enable my App ID to support In App Purchase or Apple Push Notification service?

A: My application is currently signed with a Provisioning Profile that uses a wildcard App ID. How do I enable my App ID to support In App Purchase or Apple Push Notification service?

In App Purchase and Apple Push Notification service require that your application is signed with a Provisioning Profile, which uses an explicit App ID such as com.mycompany.myappname. So, if you have shipped an application signed with a Provisioning Profile that uses a wildcard App ID such as com.mycompany.*, you may wonder how to enable that App ID to handle these features. The answer is to keep your project's Bundle ID the same and create a new App ID in the iPhone Portal that matches the Bundle ID you are currently using in your project. Follow the steps below to enable an App ID that supports In App Purchase or Apple Push Notification service:

  1. Identify your application's current Bundle ID

    You can find your Bundle ID by looking in your project's Info.plist file, however it is best to check what iTunes Connect says it is. Log in to iTunes Connect, navigate to the Manage Your Applications module present in the home page, then select the App Details link for the application you are updating, and copy the bundle identifier displayed in the ensuing page.

  2. Create a new App ID

    Your Team Agent or Team Admin should log in to the iPhone Portal and navigate to its App ID section to create a new App ID. In the App ID section, click on the New App ID button to navigate to the Create App ID form, which contains a Description field, a Bundle Identifier field, a Bundle Seed ID pop-up menu, and a Submit button as shown in Figure 1. Fill out the Description field with a meaningful name such as Explicit App ID for MyAppName for your App ID, select Generate New from the Bundle Seed ID pop-up menu, and paste the previously copied bundle identifier into the Bundle Identifier field. Click Submit to save the new App ID.

Figure 1  Create App ID form

大小: 91.6 K
尺寸: 500 x 329
浏览: 1226 次
点击打开新窗口浏览全图

  1. Enable the newly created App ID for In App Purchase or Apple Push Notification service

    Find your App ID in the App ID section of the Program Portal, click the Configure link next to it, and follow the instructions to enable your App ID for either In App Purchase or Apple Push Notification service.

  2. Update or create, download, and install a Provisioning Profile that uses your App ID enabled for In App Purchase or Apple Push Notifications

    Edit an existing Provisioning Profile or create a new one, and then associate it with your newly created App ID. Download and install this Provisioning Profile on your machine and select it in the Code Signing Identity section of your Target's Build pane in Xcode. Update the version number of your binary, build it, test it, and upload it to iTunes Connect for review.

看最后的两点就知道怎么操作了啦。。这些资料还是需要找英文的,MD,中文里就找不到类似的资料 。。。真TMD狗屎

Tags: 推送

转:申请苹果IDP流程

在苹果电脑没有到手先,先将这些信息备份下来,嗯,还有android的申请流程,过两天也会复制和转贴过来,免得以后真想找的时候找不到(听说android用国内的信用卡还不能申请?纠结中)
原文来自:http://blog.sina.com.cn/s/blog_53e2ac4d0100o06i.html
内容如下:

第一:IDP的申请

1.先在iPhone DevCenter上注册成为iphone developer
http://developer.apple.com/devcenter/ios/index.action

2.加入 iPhone开发程序项目iPhone Developer Program Apply Now
http://developer.apple.com/programs/start/standard/

3.你会得到一个PDF,打印出来,然后填写
填写IDP billing 表单的时候,注意,除开签名要手写(可以中文),其他的一定要全英文,不行就拼音。必须非常注意的是,billing address是你信用卡的账单地址,一定要和当时申请信用卡时的地址一致。

4,填好后发传真到指定号码,发完后给chinadev@asia.apple.com回一封信,告诉他们你已经传真过了。
您好:我已将表格填好并传真至+1 (408) 862-7602,还请劳烦贵公司工作人员帮忙与Billing 团队确认是否收到了我的传真。不胜感激。
最后查看信箱会有一自动回复的信件。

 

题外话:我公司的传真机不能发到美国,所以我用外国人的免费网站发了。

http://www.gotfreefax.com/

他说:Send Free Fax Online to the U.S. and Canada!

把你的传真件扫描一下,反正最后变成PDF格式。

网站上,填写各种信息,你的邮箱要写对,苹果号码4088627602,不要加1。

然后就到邮箱去,按照步骤操作,5分钟就会提示成功。

 

接下来就是等,苹果回复了,希望我的资料填写正确,一切顺利。

---------------------------
Over,现在developer.apple.com的用户登录好象也要翻墙了,真TMD纠结,其实以前developer.android.com也是要翻墙的。

Tags: apple, idp