2017-09-20 13 views
7

W projekcie Xcode8.3.3 nie będzie problemu, ale po uaktualnieniu do xcode9, kompilator ma problemu!Nie można zbudować moduł Objective-C „_SwiftUIKitOverlayShims”

Pokazuje ostatnie problemy

CompileSwift normalny arm64

/Users/leekexi/Documents/macsrc/mtom/modules/ScrollerRefresh/RefreshConst.swift 
    cd /Users/leekexi/Documents/macsrc/mtom 
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -filelist /var/folders/cz/jq8bwvds0j52yy2j0p7_2kf40000gn/T/sources-86be14 -primary-file /Users/leekexi/Documents/macsrc/mtom/modules/ScrollerRefresh/RefreshConst.swift -target arm64-apple-ios8.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk -I /Users/leekexi/Library/Developer/Xcode/DerivedData/mtom-aecafhlecijtaebzvztitxjcabvr/Build/Products/Debug-iphoneos -F /Users/leekexi/Library/Developer/Xcode/DerivedData/mtom-aecafhlecijtaebzvztitxjcabvr/Build/Products/Debug-iphoneos -F /Users/leekexi/Documents/macsrc/mtom/Pods/RongCloudIM/RongCloudIM -F /Users/leekexi/Documents/macsrc/mtom/modules -F /Users/leekexi/Documents/macsrc/mtom/modules/Live/IJKMediaPlayer -F /Users/leekexi/Documents/macsrc/mtom -enable-testing -g -module-cache-path /Users/leekexi/Library/Developer/Xcode/DerivedData/ModuleCache -swift-version 4 -enforce-exclusivity=checked -D DEBUG -serialize-debugging-options -Xcc -I/Users/leekexi/Library/Developer/Xcode/DerivedData/mtom-aecafhlecijtaebzvztitxjcabvr/Build/Intermediates.noindex/mtom.build/Debug-iphoneos/mtom.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/leekexi/Library/Developer/Xcode/DerivedData/mtom-aecafhlecijtaebzvztitxjcabvr/Build/Intermediates.noindex/mtom.build/Debug-iphoneos/mtom.build/mtom-generated-files.hmap -Xcc -I/Users/leekexi/Library/Developer/Xcode/DerivedData/mtom-aecafhlecijtaebzvztitxjcabvr/Build/Intermediates.noindex/mtom.build/Debug-iphoneos/mtom.build/mtom-own-target-headers.hmap -Xcc -I/Users/leekexi/Library/Developer/Xcode/DerivedData/mtom-aecafhlecijtaebzvztitxjcabvr/Build/Intermediates.noindex/mtom.build/Debug-iphoneos/mtom.build/mtom-all-target-headers.hmap -Xcc -iquote -Xcc /Users/leekexi/Library/Developer/Xcode/DerivedData/mtom-aecafhlecijtaebzvztitxjcabvr/Build/Intermediates.noindex/mtom.build/Debug-iphoneos/mtom.build/mtom-project-headers.hmap -Xcc -I/Users/leekexi/Library/Developer/Xcode/DerivedData/mtom-aecafhlecijtaebzvztitxjcabvr/Build/Products/Debug-iphoneos/include -Xcc -I/Users/leekexi/Documents/macsrc/mtom/Pods/Headers/Public -Xcc -I/Users/leekexi/Documents/macsrc/mtom/Pods/Headers/Public/RongCloudIM -Xcc -I/Users/leekexi/Library/Developer/Xcode/DerivedData/mtom-aecafhlecijtaebzvztitxjcabvr/Build/Intermediates.noindex/mtom.build/Debug-iphoneos/mtom.build/DerivedSources/arm64 -Xcc -I/Users/leekexi/Library/Developer/Xcode/DerivedData/mtom-aecafhlecijtaebzvztitxjcabvr/Build/Intermediates.noindex/mtom.build/Debug-iphoneos/mtom.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -DCOCOAPODS=1 -Xcc -working-directory/Users/leekexi/Documents/macsrc/mtom -emit-module-doc-path /Users/leekexi/Library/Developer/Xcode/DerivedData/mtom-aecafhlecijtaebzvztitxjcabvr/Build/Intermediates.noindex/mtom.build/Debug-iphoneos/mtom.build/Objects-normal/arm64/RefreshConst~partial.swiftdoc -serialize-diagnostics-path /Users/leekexi/Library/Developer/Xcode/DerivedData/mtom-aecafhlecijtaebzvztitxjcabvr/Build/Intermediates.noindex/mtom.build/Debug-iphoneos/mtom.build/Objects-normal/arm64/RefreshConst.dia -import-objc-header /Users/leekexi/Documents/macsrc/mtom/mtom-bridging.h -pch-output-dir /Users/leekexi/Library/Developer/Xcode/DerivedData/mtom-aecafhlecijtaebzvztitxjcabvr/Build/Intermediates.noindex/PrecompiledHeaders -pch-disable-validation -Onone -module-name mtom -emit-module-path /Users/leekexi/Library/Developer/Xcode/DerivedData/mtom-aecafhlecijtaebzvztitxjcabvr/Build/Intermediates.noindex/mtom.build/Debug-iphoneos/mtom.build/Objects-normal/arm64/RefreshConst~partial.swiftmodule -emit-dependencies-path /Users/leekexi/Library/Developer/Xcode/DerivedData/mtom-aecafhlecijtaebzvztitxjcabvr/Build/Intermediates.noindex/mtom.build/Debug-iphoneos/mtom.build/Objects-normal/arm64/RefreshConst.d -emit-reference-dependencies-path /Users/leekexi/Library/Developer/Xcode/DerivedData/mtom-aecafhlecijtaebzvztitxjcabvr/Build/Intermediates.noindex/mtom.build/Debug-iphoneos/mtom.build/Objects-normal/arm64/RefreshConst.swiftdeps -o /Users/leekexi/Library/Developer/Xcode/DerivedData/mtom-aecafhlecijtaebzvztitxjcabvr/Build/Intermediates.noindex/mtom.build/Debug-iphoneos/mtom.build/Objects-normal/arm64/RefreshConst.o -index-store-path /Users/leekexi/Library/Developer/Xcode/DerivedData/mtom-aecafhlecijtaebzvztitxjcabvr/Index/DataStore -index-system-modules 

<module-includes>:1:9: note: in file included from <module-includes>:1: 
#import "UIKitOverlayShims.h" 
     ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/shims/UIKitOverlayShims.h:24:11: error: use of undeclared identifier 'UIFocusSystem' 
    return [UIFocusSystem environment:environment containsEnvironment:otherEnvironment]; 
     ^
<unknown>:0: error: could not build Objective-C module '_SwiftUIKitOverlayShims' 
+1

Proszę sprawdzić https: // forums.developer.apple.com/thread/84400 –

+3

Napisałem radar na temat tego problemu: http://www.openradar.me/34601923 –

+0

To zdarza się dla symulatorów 10.3 dla mnie, ale nie dla 11.0 simu lators – rfodge

Odpowiedz

13

Ta poprawka z the mentioned forum thread stałe to dla mnie: po prostu usunąć kod naruszające!

  1. Otwórz plik wskazujący błąd (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/shims/UIKitOverlayShims.h dla większości osób).
  2. Usuń metodę _swift_UIKit_UIFocusEnvironmentContainsEnvironment oraz otaczające dyrektywy kompilatora.

Przebudowałem po tym, żeby się upewnić, ale to może nie być konieczne.

Jest to zdecydowanie obejście; mam nadzieję, że zostanie to naprawione w przyszłej wersji Xcode.

+0

Właśnie skomentowałem jedno z oświadczeń, ale nie wiem, czy istnieje jakikolwiek wpływ –

+1

Otrzymuję ten błąd z Xcode 9.1. Wyciszyłem go, edytując mapę modułu/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/shims/module.modulemap, aby skomentować nagłówek wiersza "UIKitOverlayShims.h" –

+0

To będzie faktycznie pozbędziemy się ogólnej wiadomości i ujawnimy prawdziwe podstawowe problemy. W moim przypadku zmieszałem import ramowy. @import i #import zmieszane w tym samym pliku, którego Xcode nie lubił – Pacu

4

Dla mnie na Xcode 9.0.1 Rozwiązanie zostało typowe rozwiązanie inżynier:

  1. Clean projekt
  2. Erase DerivedData
  3. komputer Reboot
+0

Pomógł mi też - nie powinien być naprawdę zaskoczony. – hybridcattt

+0

Nie trzeba ponownie uruchamiać obliczonych. Czyszczenie i przebudowa też powinny to zrobić, może zrestartuj Xcode. Jeśli to się nie powiedzie, usunęłabym DrivedData i tylko wtedy, gdyby to się nie udało, uruchomiłbym ponownie komputer. – bauerMusic