ios – 无法使用iphonesimulator9.2构建模拟器

前端之家收集整理的这篇文章主要介绍了ios – 无法使用iphonesimulator9.2构建模拟器前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
当我使用 xcodebuild来构建我的模拟器项目时,我面临着奇怪的错误(直接使用 Xcode构建时工作正常).
  1. 09:54:55 - tito@lt0311 Game> xcrun xcodebuild -verbose -scheme Game -configuration Debug -sdk iphoneos9.2 -derivedDataPath builds clean build | xcpretty
  2. Cleaning Game/Game [Debug]
  3. Check Dependencies
  4. Clean Succeeded
  5. Building Game/Game [Debug]
  6. Check Dependencies
  7. Compiling AppDelegate.m
  8. Compiling main.m
  9. Compiling ViewController.m
  10. Compiling ViewController.m
  11. Compiling AppDelegate.m
  12. Compiling main.m
  13. Compiling Main.storyboard
  14. Compiling LaunchScreen.storyboard
  15. Processing Info.plist
  16. Touching Game.app
  17. Signing builds/Build/Products/Debug-iphoneos/Game.app
  18. Build Succeeded
  19.  
  20. 09:55:06 - tito@lt0311 Game> xcrun xcodebuild -verbose -scheme Game -configuration Debug -sdk iphonesimulator9.2 -derivedDataPath builds clean build | xcpretty
  21. Cleaning Game/Game [Debug]
  22. Check Dependencies
  23. Clean Succeeded
  24. Building Game/Game [Debug]
  25. Check Dependencies
  26. Compiling ViewController.m
  27.  
  28. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/cdefs.h:707:2: Unsupported architecture
  29.  
  30. #error Unsupported architecture
  31. ^
  32.  
  33.  
  34.  
  35. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/machine/_types.h:34:2: architecture not supported
  36.  
  37. #error architecture not supported
  38. ^
  39.  
  40.  
  41.  
  42. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:55:9: unknown type name '__int64_t'
  43.  
  44. typedef __int64_t __darwin_blkcnt_t; /* total blocks */
  45. ^
  46.  
  47.  
  48.  
  49. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:56:9: unknown type name '__int32_t'
  50.  
  51. typedef __int32_t __darwin_blksize_t; /* preferred block size */
  52. ^
  53.  
  54.  
  55.  
  56. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:57:9: unknown type name '__int32_t'
  57.  
  58. typedef __int32_t __darwin_dev_t; /* dev_t */
  59. ^
  60.  
  61.  
  62.  
  63. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:60:9: unknown type name '__uint32_t'
  64.  
  65. typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */
  66. ^
  67.  
  68.  
  69.  
  70. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:61:9: unknown type name '__uint32_t'
  71.  
  72. typedef __uint32_t __darwin_id_t; /* [XSI] pid_t,uid_t,or gid_t*/
  73. ^
  74.  
  75.  
  76.  
  77. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:62:9: unknown type name '__uint64_t'; did you mean 'uint64_t'?
  78.  
  79. typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */
  80. ^
  81.  
  82.  
  83.  
  84. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:68:9: unknown type name '__darwin_natural_t'
  85.  
  86. typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
  87. ^
  88.  
  89.  
  90.  
  91. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:70:9: unknown type name '__uint16_t'
  92.  
  93. typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */
  94. ^
  95.  
  96.  
  97.  
  98. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:71:9: unknown type name '__int64_t'
  99.  
  100. typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */
  101. ^
  102.  
  103.  
  104.  
  105. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:72:9: unknown type name '__int32_t'
  106.  
  107. typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */
  108. ^
  109.  
  110.  
  111.  
  112. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:73:9: unknown type name '__uint32_t'
  113.  
  114. typedef __uint32_t __darwin_sigset_t; /* [???] signal set */
  115. ^
  116.  
  117.  
  118.  
  119. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:74:9: unknown type name '__int32_t'
  120.  
  121. typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */
  122. ^
  123.  
  124.  
  125.  
  126. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:75:9: unknown type name '__uint32_t'
  127.  
  128. typedef __uint32_t __darwin_uid_t; /* [???] user IDs */
  129. ^
  130.  
  131.  
  132.  
  133. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:76:9: unknown type name '__uint32_t'
  134.  
  135. typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */
  136. ^
  137.  
  138.  
  139.  
  140. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types/_intptr_t.h:30:9: unknown type name '__darwin_intptr_t'
  141.  
  142. typedef __darwin_intptr_t intptr_t;
  143. ^
  144.  
  145.  
  146.  
  147. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/_types.h:42:9: unknown type name '__uint32_t'
  148.  
  149. typedef __uint32_t __darwin_wctype_t;
  150. ^
  151.  
  152.  
  153.  
  154. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types/_size_t.h:30:9: unknown type name '__darwin_size_t'; did you mean '__darwin_ino_t'?
  155.  
  156. typedef __darwin_size_t size_t;
  157. ^
  158.  
  159.  
  160.  
  161. fatal error: too many errors emitted,stopping now [-ferror-limit=]
  162.  
  163.  
  164.  
  165. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKitDefines.h:8:9: could not build module 'Darwin'
  166.  
  167. #import <Availability.h>
  168. ^
  169.  
  170.  
  171.  
  172. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:11:10: could not build module 'Darwin'
  173.  
  174. #include <sys/types.h>
  175. ~~~~~~~^
  176.  
  177.  
  178.  
  179. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:10: could not build module 'CoreFoundation'
  180.  
  181. #include <CoreFoundation/CoreFoundation.h>
  182. ~~~~~~~~^
  183.  
  184.  
  185.  
  186. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/objc/objc.h:31:10: could not build module 'Darwin'
  187.  
  188. #include <sys/types.h> // for __DARWIN_NULL
  189. ~~~~~~~~^
  190.  
  191.  
  192.  
  193. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/mach-o/arch.h:32:10: could not build module 'Darwin'
  194.  
  195. #include <stdint.h>
  196. ~~~~~~~~^
  197.  
  198.  
  199.  
  200. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/dispatch/dispatch.h:25:10: could not build module 'Darwin'
  201.  
  202. #include <Availability.h>
  203. ~~~~~~~~^
  204.  
  205.  
  206.  
  207. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/os/base.h:24:10: could not build module 'Darwin'
  208.  
  209. #include <sys/cdefs.h>
  210. ~~~~~~~~^
  211.  
  212.  
  213.  
  214. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/Security.framework/Headers/SecBase.h:32:10: could not build module 'Darwin'
  215.  
  216. #include <Availability.h>
  217. ~~~~~~~~^
  218.  
  219.  
  220.  
  221. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h:8:10: could not build module 'Darwin'
  222.  
  223. #include <stdbool.h>
  224. ~~~~~~~~^
  225.  
  226.  
  227.  
  228. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImageDefines.h:10:10: could not build module 'Darwin'
  229.  
  230. #include <TargetConditionals.h>
  231. ~~~~~~~~^
  232.  
  233.  
  234.  
  235. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CoreVideo.h:16:10: could not build module 'Darwin'
  236.  
  237. #include <TargetConditionals.h>
  238. ~~~~~~~~^
  239.  
  240.  
  241.  
  242. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTDefines.h:12:10: could not build module 'Darwin'
  243.  
  244. #include <Availability.h>
  245. ~~~~~~~~^
  246.  
  247.  
  248.  
  249. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h:11:10: could not build module 'Darwin'
  250.  
  251. #include <stdbool.h>
  252. ~~~~~~~~^
  253.  
  254.  
  255.  
  256. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/EAGL.h:8:10: could not build module 'Foundation'
  257.  
  258. #include <Foundation/Foundation.h>
  259. ~~~~~~~~^
  260.  
  261.  
  262.  
  263. /Users/tito/Documents/workspace/Game/Game/ViewController.h:9:9: could not build module 'UIKit'
  264.  
  265. #import <UIKit/UIKit.h>
  266. ~~~~~~~~^
  267.  
  268.  
  269. Compiling AppDelegate.m
  270.  
  271. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/cdefs.h:707:2: Unsupported architecture
  272.  
  273. #error Unsupported architecture
  274. ~~~~~~~^
  275.  
  276.  
  277.  
  278. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/machine/_types.h:34:2: architecture not supported
  279.  
  280. #error architecture not supported
  281. ^
  282.  
  283.  
  284.  
  285. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:55:9: unknown type name '__int64_t'
  286.  
  287. typedef __int64_t __darwin_blkcnt_t; /* total blocks */
  288. ^
  289.  
  290.  
  291.  
  292. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:56:9: unknown type name '__int32_t'
  293.  
  294. typedef __int32_t __darwin_blksize_t; /* preferred block size */
  295. ^
  296.  
  297.  
  298.  
  299. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:57:9: unknown type name '__int32_t'
  300.  
  301. typedef __int32_t __darwin_dev_t; /* dev_t */
  302. ^
  303.  
  304.  
  305.  
  306. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:60:9: unknown type name '__uint32_t'; did you mean 'uint32_t'?
  307.  
  308. typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */
  309. ^
  310.  
  311.  
  312.  
  313. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:61:9: unknown type name '__uint32_t'; did you mean 'uint32_t'?
  314.  
  315. typedef __uint32_t __darwin_id_t; /* [XSI] pid_t,or gid_t*/
  316. ^
  317.  
  318.  
  319.  
  320. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:62:9: unknown type name '__uint64_t'; did you mean 'uint64_t'?
  321.  
  322. typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */
  323. ^
  324.  
  325.  
  326.  
  327. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:68:9: unknown type name '__darwin_natural_t'
  328.  
  329. typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
  330. ^
  331.  
  332.  
  333.  
  334. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:70:9: unknown type name '__uint16_t'; did you mean 'uint16_t'?
  335.  
  336. typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */
  337. ^
  338.  
  339.  
  340.  
  341. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:71:9: unknown type name '__int64_t'
  342.  
  343. typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */
  344. ^
  345.  
  346.  
  347.  
  348. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:72:9: unknown type name '__int32_t'
  349.  
  350. typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */
  351. ^
  352.  
  353.  
  354.  
  355. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:73:9: unknown type name '__uint32_t'; did you mean 'uint32_t'?
  356.  
  357. typedef __uint32_t __darwin_sigset_t; /* [???] signal set */
  358. ^
  359.  
  360.  
  361.  
  362. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:74:9: unknown type name '__int32_t'
  363.  
  364. typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */
  365. ^
  366.  
  367.  
  368.  
  369. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:75:9: unknown type name '__uint32_t'; did you mean 'uint32_t'?
  370.  
  371. typedef __uint32_t __darwin_uid_t; /* [???] user IDs */
  372. ^
  373.  
  374.  
  375.  
  376. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types.h:76:9: unknown type name '__uint32_t'; did you mean 'uint32_t'?
  377.  
  378. typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */
  379. ^
  380.  
  381.  
  382.  
  383. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types/_intptr_t.h:30:9: unknown type name '__darwin_intptr_t'
  384.  
  385. typedef __darwin_intptr_t intptr_t;
  386. ^
  387.  
  388.  
  389.  
  390. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types/_size_t.h:30:9: unknown type name '__darwin_size_t'
  391.  
  392. typedef __darwin_size_t size_t;
  393. ^
  394.  
  395.  
  396.  
  397. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/_types/_ct_rune_t.h:31:9: unknown type name '__darwin_ct_rune_t'; did you mean '__darwin_wctrans_t'?
  398.  
  399. typedef __darwin_ct_rune_t ct_rune_t;
  400. ^
  401.  
  402.  
  403.  
  404. fatal error: too many errors emitted,stopping now [-ferror-limit=]
  405.  
  406.  
  407.  
  408. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKitDefines.h:8:9: could not build module 'Darwin'
  409.  
  410. #import <Availability.h>
  411. ^
  412.  
  413.  
  414.  
  415. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:11:10: could not build module 'Darwin'
  416.  
  417. #include <sys/types.h>
  418. ~~~~~~~^
  419.  
  420.  
  421.  
  422. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:10: could not build module 'CoreFoundation'
  423.  
  424. #include <CoreFoundation/CoreFoundation.h>
  425. ~~~~~~~~^
  426.  
  427.  
  428.  
  429. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/objc/objc.h:31:10: could not build module 'Darwin'
  430.  
  431. #include <sys/types.h> // for __DARWIN_NULL
  432. ~~~~~~~~^
  433.  
  434.  
  435.  
  436. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/mach-o/arch.h:32:10: could not build module 'Darwin'
  437.  
  438. #include <stdint.h>
  439. ~~~~~~~~^
  440.  
  441.  
  442.  
  443. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/dispatch/dispatch.h:25:10: could not build module 'Darwin'
  444.  
  445. #include <Availability.h>
  446. ~~~~~~~~^
  447.  
  448.  
  449.  
  450. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/os/base.h:24:10: could not build module 'Darwin'
  451.  
  452. #include <sys/cdefs.h>
  453. ~~~~~~~~^
  454.  
  455.  
  456.  
  457. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/Security.framework/Headers/SecBase.h:32:10: could not build module 'Darwin'
  458.  
  459. #include <Availability.h>
  460. ~~~~~~~~^
  461.  
  462.  
  463.  
  464. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h:8:10: could not build module 'Darwin'
  465.  
  466. #include <stdbool.h>
  467. ~~~~~~~~^
  468.  
  469.  
  470.  
  471. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImageDefines.h:10:10: could not build module 'Darwin'
  472.  
  473. #include <TargetConditionals.h>
  474. ~~~~~~~~^
  475.  
  476.  
  477.  
  478. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CoreVideo.h:16:10: could not build module 'Darwin'
  479.  
  480. #include <TargetConditionals.h>
  481. ~~~~~~~~^
  482.  
  483.  
  484.  
  485. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTDefines.h:12:10: could not build module 'Darwin'
  486.  
  487. #include <Availability.h>
  488. ~~~~~~~~^
  489.  
  490.  
  491.  
  492. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h:11:10: could not build module 'Darwin'
  493.  
  494. #include <stdbool.h>
  495. ~~~~~~~~^
  496.  
  497.  
  498.  
  499. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/EAGL.h:8:10: could not build module 'Foundation'
  500.  
  501. #include <Foundation/Foundation.h>
  502. ~~~~~~~~^
  503.  
  504.  
  505.  
  506. /Users/tito/Documents/workspace/Game/Game/AppDelegate.h:9:9: could not build module 'UIKit'
  507.  
  508. #import <UIKit/UIKit.h>
  509. ~~~~~~~~^
  510.  
  511.  
  512. Compiling main.m
  513. Compiling AppDelegate.m
  514. ** BUILD Failed **
  515.  
  516.  
  517. The following build commands Failed:
  518. CompileC builds/Build/Intermediates/Game.build/Debug-iphoneos/Game.build/Objects-normal/arm64/ViewController.o Game/ViewController.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
  519. CompileC builds/Build/Intermediates/Game.build/Debug-iphoneos/Game.build/Objects-normal/armv7/AppDelegate.o Game/AppDelegate.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
  520. (2 failures)

这个命令已经在我刚刚使用Xcode7.2创建的项目上执行.

有谁知道如何解决这些错误

解决方法

解决方法是在建立时指定目标参数 –
  1. xcodebuild ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -workspace "${PROJECT_NAME}.xcworkspace" -scheme "${TARGET_NAME}" -sdk iphonesimulator BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" **-destination 'platform=iOS Simulator,id=DC050A0D-6041-40F5-9D0E-EAEFA1D1EA42,OS=9.2'** clean build

(如果您只有一个特定类型的模拟器,请将名称替换为“id”,如name = iPhone 6)

猜你在找的iOS相关文章