今天终于通过 BT 的方式下完了 iPhone SDK beta3。安装过程中发现几点仍在使用 PowerPC Mac 的开发人员需要注意的地方:

  • 已有多个网站报道虽然 Apple 官方申明 iPhone SDK 只能用于使用 Intel 处理器的 Mac 上,而且 SDK 安装包在 PowerPC Mac 上默认会跳过 iPhone SDK 的安装,但是你可以使用 Pacifist 安装之。然而这些报道都忽略了一点:iPhone SDK 可被安装至任何路径之下,只要安装完成后的文件夹内部结构不被改动即可,所以用 Pacifist 安装的话,安装路径为 ./ ,即启动磁盘的根目录,这样就全乱套了。本人在此感谢 iPhoneAtlas相应文章中留下评论的 gigeamircearaul 提供的解决方案:
    1. 用 Disk Utility 将 iPhone SDK.dmg 转换为可读写格式。
    2. 打开转换好的 R/W dmg。
    3. 你可能需要删除一些文件,因为镜像几乎完全填满了。我选择了删除镜像根目录中的 PDF 文件
    4. 修改 /Volumes/iPhone SDK/iPhone SDK.mpkg/Contents/iPhoneSDK.dist :

      - Line 71 (in function agreedToSLA() ) - modify “return false;” to “return true;”

      - Line 81 ( in function SDKPresent() ) - modify “return false;” to “return true;”
    5. 这样之后,你就可直接使用安装包安装 iPhone SDK 而无须使用 Pacifist 了。

  • 如想在 iPhone Simulator 中使用 pinching 的话,你只需在使用鼠标左键或触摸板的同时按下 Option。
    ( /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app )
Posted in Apple, Develope, Leopard, Tip at April 23rd, 2008. No Comments.

Just tested it out, and it works:

When inserting links in your posts, especially links to resources on your own blog, you can actually use absolute paths like “/wp-content/uploads/****.anyExtension”. This way if you ever decided to move your blog, say, another hosting, you save yourself tons of time wasted on editing these links.

The only limitations here are:

  1. It may require your blog to be self-hosted, meaning, it is not using any blog service provided by companies like WordPress.com, yo2.cn (this one is for us, Chinese), cause you probably don’t know how they store your uploaded files.
  2. On the new serve, you have to upload the files as originally structured on the old one. This requirement is not that hard to meet, I guess, since usually when you move your blog, you would want to make sure it is in almost the same structure for better search engine friendliness.

OK! And that’s it for today !

Posted in Tip, WordPress at April 5th, 2008. 1 Comment.

由于本文较长,所以在此先给出本文相应的 PDF 以供下载。

于去年 10 月 26 日上市的 Mac OS X 10.5 ( a.k.a Leopard )中加强了对 Ruby on Rails、Python、Perl 等 Scripting 语言的官方支持1、更新的 Scripting Bridge ( 这一项使得开发人员可以用上述编程语言编写原生 Mac 程序)以及丰富的全新或改进了的框架 ( AppleScript 2.0, Core Animation, PubSub, PDF Kit, ImageKit, QT Kit, Quartz 2D, Core Image, Core Data…the list will go on for about a couple of miles ! ^o^)。相信所有这些将会吸引越来越多的开发人员迁移至 Mac 平台,更何况 Apple 提供的开发工具是完全免费的,购买 Mac 随机附带的系统安装盘上就有。而这决不是猜测,大家只需查下去年 WWDC 上教主公布的 Apple Developer Connection 的注册会员数就知道了。将来这样的开发人员与 Interface Builder 打交道的机会决不会少。

鉴于国内有关 Mac 开发的文档不足,而且大多数人都认为开发人员的英语水平都还过得去,阅读技术文档不会有多少障碍。但我个人认为还是阅读用自己母语写的文档更容易,也更亲切。所以我决定自己动手丰衣足食。

Interface Builder 3 icon今天先从相对而言较简单的 Interface Builder,简而言之,开发人员将用此工具设计程序的图形用户界面的大部分。之所以说是大部分是因为图形用户界面还可用代码定义,在特殊情况下需要借助代码完成图形用户界面的设计。下面为该工具的图标,左侧为 Interface Builder 3.0 所采用的新图标,右侧为 3.0 以前版本所用图标。大家可以明显看到新图标更为细腻,通常 Apple 将这一点用于指示程序在较大程度上的改进。那 Interface Builder 为像你我一样的业余爱好者或是专业开发人员带来了哪些功能上的改进和新功能呢?Let’s find out, shall we ?!

Interface Builder 2 icon
Read More…

Posted in Apple, Develope, Leopard at January 29th, 2008. No Comments.

As it clearly states on the web page “AppleScript: Features” :

APPLESCRIPT LANGUAGE GUIDE
Have examples and constructs of the AppleScript language at your fingertips. AppleScript Language Guide, updated for Leopard, is the essential guide for scripters and developers.

However, the updated AppleScript Language Guide is nowhere to be found. It’s just so frustrating! So I sent a feedback regarding this matter.

Today while checking out my Gmail inbox, I’m surprised to find that there is a message titled “Re: ADC Feedback”. Here’s the reply from ADC:

Please include the line below in follow-up emails for this request.

Follow-up: 39503001

Re: AppleScript Language Guide

Hello,

This email is in response to your query regarding the AppleScript Language Guide.

Please know that this guide has been updated for Mac OS X Leopard and should be published shortly. We ask that you please stay tuned to the ADC website for any late breaking updates.

I hope you find this information useful. Please do not hesitate to contact us again should you have any further problems or queries.

Best regards,

Barry Stark
Apple Developer Connection
Worldwide Developer Relations

I just can’t believe they would actually respond to my feedback! This is Apple way of company-customer/user/developer interaction, which only a few other companies can match ( I think Google is one of the “a few companies” ) ! And please stay tuned to the ADC website for any late breaking updates just in case that you are anxiously awaiting the updated AppleScript Language Guide !

You can subscribe to this feed using Safari, Google Reader, NetNewsWire, Vienna or any other feed aggregator you want. The feed is AppleScript Headlines: feed://developer.apple.com/rss/topic/applescript.rss

Posted in Apple, Leopard, 杂谈 at January 24th, 2008. No Comments.

最新的 iPhone 软件更新 1.1.3 中加入了将网页作为 WebClip 添加至 Home Screen 的功能。不知细心的你在观看 Macworld 2008 上 Steve Jobs 的演讲视频时是否发现 Google 搜索被添加至 Home Screen 时图标并不是像 纽约时报 那样的网页截图,而是一个精心设计的图标。

想知道如何为你的网站设置一个 WebClip 图标吗?本文将教会你。

官方文档见:Create a WebClip Bookmark Icon

要为你的网站的所有页面设置 WebClip 图标,将你制作好的 PNG 格式的图标命名为 “apple-touch-icon.png” ,并将它放至网站的根目录。这一点类似于传统的 “favicon.ico”。

如果想为某一页面设置不同于网站其它页面的 WebClip 图标,你还需在页面的 “head” 元素内添加一个类似于

<link rel="apple-touch-icon" href="/customIcon.png" />

的 “link” 元素。

WebClip 图标的尺寸至少应该为 57×57 像素。如果图标尺寸不同于此,图标将被缩放并裁剪至合适尺寸。

Safari 将会自动合成”玻璃材质”效果以使其看起来像内置 iPhone 或 iPod 程序。所以这个特殊效果可不要在设计图标时多加了噢!^o^

就到这里!Resting.

Posted in Apple, Design, Tip at January 22nd, 2008. No Comments.