因為你用來做 Code Sign 的 Certificate 是幾個月前產生的,所以你的 App 會 Crash

這篇 blog 就是我在 2015 年四月份台北 Cocoaheads 在台上講的事情。

在過年期間,我把去年 11 月時寫的捷運轉乘這個個人的小 iOS App 改了改,在年假結束的前幾天 submit 一個版本,結果,過了一週,被 reject。

蘋果的 reviewer 說,他們只要一安裝這個 App 的 binary,就會馬上 crash;可是在我自己的開發環境中,完全無法重現這個狀況,由於過完年公司的事情就一件一件接著來,所以也就擱在一邊不管了,我到今天才知道為什麼會 crash,而且理由還頂荒唐的。

這兩天我們把公司產品 code 裡頭的一條新功能的開發分支(講 feature branch 不知道會不會比較好懂)併回主線,然後讓主線的程式進入 Jenkins build,讓公司的 QA 部門做出貨前的測試。狀況很奇妙,原本的 App 也是跑得好好的,在支線開發的過程中,也跑得好好的,但是從 Jenkins 編出來的 build,只要一跑起來,就會 crash。

Continue reading

WatchKit

??

Xcode 6.2 beta 4 ??????+ openParentApplication:reply:?????????????? Watch App Extension ? Hosting App ????????????? code 6.2 beta 1 ??????

???Hosting App ??? Watch App Extension???????? CFNotificationCenter?

?????

??????? WatchKit ?? Apple Watch ??????????? Xcode 6.2 Beta ??? iOS 8.2 SDK???? File ?????? New Target??? Apple Watch ????? Watch App?

Xcode 6.2 Beta ???? Bug?????????????Build Phases ????? Run Script Phase??????? Watch App ???Xcode Beta ????????????

?????? Apple Watch ???????????? Beta ??????????????????????????????????????? WatchKit ??????? Watch App ?????? Run Script Phase ??????????????? Run Script Phase ???????????????

Continue reading

Swift 會不會取代 Objective-C?

?? Swift ??????? Objective-C????????? iOS 8 ???????????????? Swift ????? Framework ??????? Objective-C ???

???????? Objective-C ? Swift ? run time ??????????? Objective-C ? Swift ???? class ??? method?????? virtual method table ????? vtable?????????????

Objective-C ? vtable ???? dictionary ????table ???????? C ??? key??? selector???????? C Function pointer????????? Objective-C ????? method????????? objc_msgSend ? function?????????? key????????? function—???????????? Class ????? forwardInvocation: ?? method??????????????? method ? exception??????????????????

?? Swift ? vtable ???? array?????????? method ??????????? function array ?????? function??? Mike Ash ?????

???????????? Swift ???????? method ?????????? Objective-C ??????????????? Swfit ?????????? Objective-C ????????Swift ? vtable ??? function ????????????????vatble ????????????????????????????????????? runtime??????????????? function?

??????? compile ???? runtime ????? runtime ????????????????????Xcode ?????? Swift runtime ???????? bundle ?????????????? Swift ??????????? Swift runtime?Swift ? runtime ????????????????????? iOS ???????? Foundation?UIKit…???? Framework??????? Framework ????????????????????? Swift ???Objective-C ?????? key??????????????? DLL Hell ??????

?????????????????? Framework???????? iOS ?????????????????? Swift ??????????

?? iOS 8 ??????????????? bundle ??????????????? Framework?Mac OS X ????????????????? Framework????? Framework ???????? Target ????? Xcode project ????????? Target ??????????????????????????????? Framrwork???????—??????????? Framework??????????????????? Swift runtime?

iOS 8 ?????????? extension??? extension ???????? Mac OS X ?? plug-in bundle??? dynamic loading ????? library????? extension ? Swift ????????—?????????? plug-in??? plug-in ???????? Swift runtime????????????????????????????????