SDK 5.4.0.GA 无法构建 iOS 应用程序

SDK 5.4.0.GA Fails to build iOS Application

今天,我在Appcelerator Studio内升级到SDK 5.4.0。

我将 tiapp.xml 更改为在该项目中使用 5.4.0。

构建失败,出现以下错误

[TRACE] :  CompileC build/Intermediates/REL.build/Debug-iphoneos/REL.build/Objects-normal/armv7/TiUITextWidget.o Classes/TiUITextWidget.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
[TRACE] :      cd /Users/chris/Ti/APPCGenieWS/GenieProject/Genie.Alloy/build/iphone
[TRACE] :      export LANG=en_US.US-ASCII
[TRACE] :      export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bin:/Users/chris/.nvm/versions/node/v0.12.7/bin:/usr/local/git/bin:/Users/chris/opt/ant/bin:/Applications/usr/sdk/Android/tools:/Applications/usr/sdk/Android/platform-tools:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin"
[TRACE] :      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c99 -fmodules -fmodules-cache-path=/Users/chris/Ti/APPCGenieWS/GenieProject/Genie.Alloy/build/iphone/ModuleCache -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wno-parentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wno-unused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -DDEPLOYTYPE=test -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min=7.1 -iquote /Users/chris/Ti/APPCGenieWS/GenieProject/Genie.Alloy/build/iphone/build/Intermediates/REL.build/Debug-iphoneos/REL.build/REL-generated-files.hmap -I/Users/chris/Ti/APPCGenieWS/GenieProject/Genie.Alloy/build/iphone/build/Intermediates/REL.build/Debug-iphoneos/REL.build/REL-own-target-headers.hmap -I/Users/chris/Ti/APPCGenieWS/GenieProject/Genie.Alloy/build/iphone/build/Intermediates/REL.build/Debug-iphoneos/REL.build/REL-all-target-headers.hmap -iquote /Users/chris/Ti/APPCGenieWS/GenieProject/Genie.Alloy/build/iphone/build/Intermediates/REL.build/Debug-iphoneos/REL.build/REL-project-headers.hmap -I/Users/chris/Ti/APPCGenieWS/GenieProject/Genie.Alloy/build/iphone/build/Products/Debug-iphoneos/include -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/libxml2 -Iheaders -I/Users/chris/Ti/APPCGenieWS/GenieProject/Genie.Alloy/build/iphone/build/Intermediates/REL.build/Debug-iphoneos/REL.build/DerivedSources/armv7 -I/Users/chris/Ti/APPCGenieWS/GenieProject/Genie.Alloy/build/iphone/build/Intermediates/REL.build/Debug-iphoneos/REL.build/DerivedSources -F/Users/chris/Ti/APPCGenieWS/GenieProject/Genie.Alloy/build/iphone/build/Products/Debug-iphoneos -F/Users/chris/Ti/APPCGenieWS/GenieProject/Genie.Alloy/build/iphone/../../modules/iphone/au.com.mobilogica.wfios/1.0.1/platform -DDEBUG -include /Users/chris/Ti/APPCGenieWS/GenieProject/Genie.Alloy/build/iphone/build/Intermediates/PrecompiledHeaders/REL_Prefix-fnpnudzjjmqgaablsyfodhzdkqxp/REL_Prefix.pch -MMD -MT dependencies -MF /Users/chris/Ti/APPCGenieWS/GenieProject/Genie.Alloy/build/iphone/build/Intermediates/REL.build/Debug-iphoneos/REL.build/Objects-normal/armv7/TiUITextWidget.d --serialize-diagnostics /Users/chris/Ti/APPCGenieWS/GenieProject/Genie.Alloy/build/iphone/build/Intermediates/REL.build/Debug-iphoneos/REL.build/Objects-normal/armv7/TiUITextWidget.dia -c /Users/chris/Ti/APPCGenieWS/GenieProject/Genie.Alloy/build/iphone/Classes/TiUITextWidget.m -o /Users/chris/Ti/APPCGenieWS/GenieProject/Genie.Alloy/build/iphone/build/Intermediates/REL.build/Debug-iphoneos/REL.build/Objects-normal/armv7/TiUITextWidget.o
[TRACE] :  In file included from /Users/chris/Ti/APPCGenieWS/GenieProject/Genie.Alloy/build/iphone/Classes/TiUITextWidget.m:14:
[TRACE] :  /Users/chris/Ti/APPCGenieWS/GenieProject/Genie.Alloy/build/iphone/Classes/TiApp.h:69:5: error: unknown type name 'UIApplicationShortcutItem'; did you mean 'UIApplicationState'?
[TRACE] :      UIApplicationShortcutItem *launchedShortcutItem;
[TRACE] :      ^~~~~~~~~~~~~~~~~~~~~~~~~
[TRACE] :      UIApplicationState
[TRACE] :  In module 'UIKit' imported from /Users/chris/Ti/APPCGenieWS/GenieProject/Genie.Alloy/build/iphone/Classes/TiBase.h:10:
[TRACE] :  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:81:28: note: 'UIApplicationState' declared here
[TRACE] :  typedef NS_ENUM(NSInteger, UIApplicationState) {
[TRACE] :                             ^
[TRACE] :  In module 'Foundation' imported from /Users/chris/Ti/APPCGenieWS/GenieProject/Genie.Alloy/build/iphone/Classes/TiEvaluator.h:9:
[TRACE] :  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:268:46: note: expanded from macro 'NS_ENUM'
[TRACE] :  #define NS_ENUM(_type, _name) CF_ENUM(_type, _name)
[TRACE] :                                               ^
[TRACE] :  In module 'CoreFoundation' imported from headers/JavaScriptCore/WebKitAvailability.h:53:
[TRACE] :  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h:171:50: note: expanded from macro 'CF_ENUM'
[TRACE] :  #define CF_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
[TRACE] :                                                   ^
[TRACE] :  1 error generated.
[ERROR] :  ** BUILD FAILED **
[ERROR] :  The following build commands failed:
[ERROR] :   CompileC build/Intermediates/REL.build/Debug-iphoneos/REL.build/Objects-normal/armv7/TiUITextWidget.o Classes/TiUITextWidget.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
[ERROR] :  (1 failure)

我改回了以前的版本,事实上我试过了

这些都有效并构建了应用程序,并且 运行 正如预期的那样。

我检查了提到的 TiApp.h 并看到了对该类型的引用,它是 Apple 从 UIKit 定义的类型。我发现列出的所有这些版本还引用了 UIApplicationShortcutItem.

我想知道是否有人发现了类似的问题,他们是否找到了解决方案。

系统:

请将 Xcode 升级到 7.3.1,它是 iOS 9 API 需要 Xcode 7 或更高版本。谢谢!