[UIWindow setRootViewController:]需要4.0以上支持

问题描述:今天Touch Team出Stupid测试版,安装20多台iPhone、iTouch、iPad,都可以安装。但是有一台iPhone(3.1.2)报错,不能安装。注:其他设备基本都在4.0以上。

问题分析:因为是调试安装,所以能看到报错信息,如下:

GNU gdb 6.3.50-20050815 (Apple version gdb-1518) (Sat Feb 12 02:56:02 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=x86_64-apple-darwin --target=arm-apple-darwin".tty /dev/ttys000
target remote-mobile /tmp/.XcodeGDBRemote-16799-38
Switching to remote-macosx protocol
mem 0x1000 0x3fffffff cache
mem 0x40000000 0xffffffff none
mem 0x00000000 0x0fff none
[Switching to process 11779 thread 0x0]
[Switching to process 11779 thread 0x0]
sharedlibrary apply-load-rules all
warning: Unable to read symbols for /Library/MobileSubstrate/MobileSubstrate.dylib (file not found).
warning: Unable to read symbols for /Library/Frameworks/CydiaSubstrate.framework/Libraries/SubstrateLoader.dylib (file not found).
2011-09-27 17:40:14.990 FSStupid[2874:207] MS:Notice: Installing: com.flipscript.stupid [FSStupid] (478.52)
2011-09-27 17:40:15.368 FSStupid[2874:207] MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/Backgrounder.dylib
warning: Unable to read symbols for /Library/MobileSubstrate/DynamicLibraries/Backgrounder.dylib (file not found).
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.1.3/Symbols/usr/lib/libsubstrate.dylib (file not found).
2011-09-27 17:40:17.131 FSStupid[2874:207] MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/Multitasking.dylib
warning: Unable to read symbols for /Library/MobileSubstrate/DynamicLibraries/Multitasking.dylib (file not found).
2011-09-27 17:40:18.007 FSStupid[2874:207] *** -[UIWindow setRootViewController:]: unrecognized selector sent to instance 0x23fe20
2011-09-27 17:40:18.016 FSStupid[2874:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UIWindow setRootViewController:]: unrecognized selector sent to instance 0x23fe20'
2011-09-27 17:40:18.034 FSStupid[2874:207] Stack: (
843263261,
825818644,
843267069,
842763033,
842725440,
11685,
843742792,
843741800,
844074496,
844072508,
844071060,
860907492,
843011371,
843009055,
843738120,
843731504,
11481,
11404
)
terminate called after throwing an instance of 'NSException'
(gdb)

 

报错的语句是:

self.window.rootViewController = startViewController;

仔细查看报错信息,发现这句报错:-[UIWindow setRootViewController:]: unrecognized selector sent to instance。查看setRootViewController方法,发现需要4.0以上支持。

解决方案:把出错代码:

self.window.rootViewController = startViewController;

替换为:

if( [[[UIDevice currentDevice] systemVersion] compare:@"4.0" options:NSNumericSearch] == NSOrderedAscending )
[self.window addSubview:self.mainViewController.view];
else self.window.rootViewController = self.mainViewController;

一切ok了。

后台运行App导致无法调试

问题描述:Touch Team做Stupid,调试的时候console报以下问题:
warning: Unable to read symbols for /Library/MobileSubstrate/MobileSubstrate.dylib (file not found). warning: Unable to read symbols for /Library/Frameworks/CydiaSubstrate.framework/Libraries/SubstrateLoader.dylib (file not found). 2011-09-21 12:46:54.465 FSStupid[18953:607] MS:Notice: Installing: com.flipscript.stupid [FSStupid] (550.58) 2011-09-21 12:46:54.489 FSStupid[18953:607] MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/Activator.dylib warning: Unable to read symbols for /Library/MobileSubstrate/DynamicLibraries/Activator.dylib (file not found). 2011-09-21 12:46:54.752 FSStupid[18953:607] MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/QQInput.dylib warning: Unable to read symbols for /Library/MobileSubstrate/DynamicLibraries/QQInput.dylib (file not found). warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3.3 (8J3)/Symbols/usr/lib/libsubstrate.dylib (file not found). 2011-09-21 12:46:54.889 FSStupid[18953:607] MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/libstatusbar.dylib warning: Unable to read symbols for /Library/MobileSubstrate/DynamicLibraries/libstatusbar.dylib (file not found).

问题分析:用其他的几台设备测试,一切正常。用有问题的那台机器,然后直接运行,也一切正常。网上查了下,是一些后台运行的程序可能搞鬼(如报错信息中的:QQInput.dylib、libstatusbar.dylib等)

问题解决:用Cydia删除一些dylib,就没有问题了。

《部落:一呼百应的力量》

部落指的是任何一群人,规模可大可小,他们因追随领导、志同道合而相互联系在一起。人类其实数百万年前就有部落的出现,随之还形成了宗教、种族、政治或甚至音乐。

“没有领导不成部落---没有部落也就无所谓领导。”

“领导者有追随者,而管理者只有员工。管理者制造产品,而领导者实现变革。”

“多数组织将时间花在针对所谓目标人群的营销上,聪明的组织创建部落。”

《窃听风云》

  • 2010年
  • 香港电影评论学会奖 最佳导演
  • 庄文强
  • 2010年
  • 香港电影评论学会奖 最佳导演
  • 麦兆辉

  刘青云:搞了兄弟的老婆,一面忍着女人和兄弟纠缠不清(何其屈辱!),一面瞒着兄弟不敢见光(何其内疚!)。这件事的关键在于,是那对原配夫妻感情破裂在先,所以刘青云的介入其实并无太多道德错误。由此我们也看出了刘青云的性格:受绑于人情,优柔寡断近乎妇人之仁。毫无侵略性,不能伤害任何人。
  
  古天乐:被家庭负担逼到焦头烂额。工作上,级别低却资历老,一幅屌样儿,毫无前途。中年潦倒最是水深火热,所以他对金钱的态度最分裂。红着眼睛仇富的是他:“他们随便一赚一千万,我们辛辛苦苦一个月赚两万,不把他们送进监狱我不是人!”而当机会出现时最早暴露贪念,行为越轨的也是他:我儿子治病要一大笔钱!
  
  吴彦祖:青年才俊,却被准岳父指为入错行:做警察做到顶,薪水还不如在岳父的财团里做个低级员工。各位,这样的质疑,绝非只是经济能力的上的质疑,乃至是对一个人存在价值的质疑:你以为是事业和理想的那样东西,被人条理分明有理有据的贬做一文不值。这对任何男人来说都是奇耻大辱,如不能予以反击,只怕自尊自信都会被彻底摧毁。所以比起古天乐的现实需要,吴彦祖对金钱的渴望更近乎形而上:他需要用钱来解决自己的价值危机,用钱在准岳父面前证明自己一点什么。这也就是为什么吴彦祖貌似低调内敛,一出手却比古天乐还疯狂得多。

最后三个一瞬间都堕落了,而活着的只有刘青云。