2017-10-05 1 views
2

Je suis coincé avec cette erreur sur un projet Xcode qui a été construit l'année dernière dans Xcode 8 et maintenant je J'essaie de l'ouvrir dans Xcode 9 GM.Xcode 9 erreur Main.storyboard lors de la construction application « Erreur interne. S'il vous plaît fichier un bug à bugreport.apple.com et attacher »

EDIT sur double vérification, j'ai remarqué qu'il n'utilisait pas GM, j'utilisais Xcode 9.1 beta 2. La solution ci-dessous fonctionne!

Erreur:

/Users/XXXX/Documents/App Development/Final Apps/XXXX/Base.lproj/Main.storyboard: Internal error. Please file a bug at bugreport.apple.com and attach "/var/folders/ln/n28_nbyn2cg9_5dfqfsj8_7w0000gn/T/IB-agent-diagnostics_2017-10-04_21-24-39_279000". 

J'ai essayé les suggestions des autres postes similaires:

  1. projet propre à l'aide Commande + Maj + k
  2. Supprimer build dossier de données obtenues à l'aide Option Commande + + Maj + l
  3. Quit Xcode et a réouvert ses portes il
  4. Aussi redémarré Mac

Si je vais au message d'erreur de dossier dirige, je vois le contenu comme:

CoreSimulatorLogs Document.storyboard Log.txt   system.log 

Dans le Log.txt, je vois ceci:

Failed to compile nib consisting of IBProxyObject, IBProxyObject, IBProxyObject, IBProxyObject, IBProxyObject, IBProxyObject, IBProxyObject, IBProxyObject, IBProxyObject, IBProxyObject, IBProxyObject, IBProxyObject, IBProxyObject, IBUIBarButtonItem, IBUIBarButtonItem, IBUIBarButtonItem, IBUIBarButtonItem, IBUIBarButtonItem, IBUIBarButtonItem, IBUICollectionViewController, IBUINavigationBar, IBUINavigationBar, IBUINavigationBar, IBUINavigationBar, IBUINavigationBar, IBUINavigationController, IBUINavigationController, IBUINavigationController, IBUINavigationController, IBUINavigationController, IBUINavigationItem, IBUINavigationItem, IBUINavigationItem, IBUINavigationItem, IBUINavigationItem, IBUIStoryboardEmbedSegueTemplate, IBUIStoryboardEmbedSegueTemplate, IBUIStoryboardShowSegueTemplate, IBUITabBar, IBUITabBarController, IBUITabBarItem, IBUITabBarItem, IBUITabBarItem, IBUITabBarItem, IBUITabBarItem, IBUITableViewController, IBUIViewController, IBUIViewController, and IBUIViewController. 

Exception name: NSInvalidArgumentException 
Exception reason: System-provided UIImage instances cannot be encoded in NIBs - raised for instance '<UIImage: 0x7f945db51a90>, {18, 20}' 
Exception backtrace: 
    0. CoreFoundation   0x000000010800d023 __exceptionPreprocess 
    1. libobjc.A.dylib   0x0000000106de3f41 objc_exception_throw 
    2. IBCocoaTouchToolFoundation 0x0000000103071a8a -[IBCocoaTouchToolNibFactory nibCoder:willEncodeObject:] 
    3. IBCocoaTouchToolFoundation 0x0000000103071b77 -[IBCocoaTouchToolNibFactory nibCoder:willEncodeObject:forObject:forKey:] 
    4. UIKit     0x00000001038111f5 -[UINibEncoder replacementObjectForObject:forKey:] 
    5. UIKit     0x0000000103811d4d -[UINibEncoder encodeObject:forKey:] 
    6. UIKit     0x0000000103a4a6de -[UITabBarItem encodeWithCoder:] 
    7. UIKit     0x0000000103811ea0 -[UINibEncoder encodeObject:forKey:] 
    8. IBCocoaTouchToolFoundation 0x000000010305ed41 -[UIViewControllerTemplate encodeWithCoder:] 
    9. IBCocoaTouchToolFoundation 0x0000000103055018 -[UINavigationControllerTemplate encodeWithCoder:] 
10. UIKit     0x0000000103811ea0 -[UINibEncoder encodeObject:forKey:] 
11. UIKit     0x0000000103811354 -[UINibEncoder serializeArray:] 
12. UIKit     0x0000000103811ea0 -[UINibEncoder encodeObject:forKey:] 
13. IBCocoaTouchToolFoundation 0x000000010305ef3c -[UIViewControllerTemplate encodeWithCoder:] 
14. IBCocoaTouchToolFoundation 0x00000001030704d9 -[UITabBarControllerTemplate encodeWithCoder:] 
15. IBCocoaTouchToolFoundation 0x0000000103071e57 -[UIClassSwapper(IBHooksFor6767205) designTimeEncodeWithCoder:] 
16. UIKit     0x0000000103811ea0 -[UINibEncoder encodeObject:forKey:] 
17. UIKit     0x0000000103811354 -[UINibEncoder serializeArray:] 
18. UIKit     0x0000000103811ea0 -[UINibEncoder encodeObject:forKey:] 
19. IBCocoaTouchToolFoundation 0x000000010307166c -[IBCocoaTouchToolNibFactory encodeNibContentWithCoder:] 
20. IBCocoaTouchToolFoundation 0x0000000103071801 -[IBCocoaTouchToolNibFactory nibDataWithMinimumCompatibility:] 
21. IBCocoaTouchToolFoundation 0x0000000103071d43 +[IBCocoaTouchToolNibFactory nibDataFromObjects:customClasses:topLevelObjects:traitStorageLists:accessibilityConfigurations:connections:keyValuePairs:visibleWindows:minimumCompatibility:] 
22. IBCocoaTouchToolFoundation 0x00000001030379d5 -[IBCocoaTouchTool compileNibForRequest:minimumCompatibility:layoutInfo:imagesToImageNames:] 
23. IBFoundation    0x000000010640009b __80-[IBMessageReceiveChannel deliverMessage:toTarget:withArguments:context:result:]_block_invoke 
24. IBFoundation    0x00000001063ffe98 -[IBMessageReceiveChannel deliverMessage:toTarget:withArguments:context:result:] 
25. IBFoundation    0x00000001063ff80a __88-[IBMessageReceiveChannel runBlockingReceiveLoopNotifyingQueue:notifyingTarget:context:]_block_invoke 
26. libdispatch.dylib  0x000000010cf352b5 _dispatch_client_callout 
27. libdispatch.dylib  0x000000010cf40999 _dispatch_sync_thread_bound_invoke 
28. libdispatch.dylib  0x000000010cf352b5 _dispatch_client_callout 
29. libdispatch.dylib  0x000000010cf3f496 _dispatch_main_queue_callback_4CF 
30. CoreFoundation   0x0000000107fcfd79 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ 
31. CoreFoundation   0x0000000107f94422 __CFRunLoopRun 
32. CoreFoundation   0x0000000107f93849 CFRunLoopRunSpecific 
33. Foundation    0x00000001067dfe5e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] 
34. IBFoundation    0x00000001063c1cf5 -[IBAbstractPlatformTool startServingReceiveChannel:] 
35. IBFoundation    0x00000001063c1fb0 -[IBAbstractPlatformTool startServingWriteDescriptor:readDescriptor:] 
36. IBFoundation    0x00000001063c2ac9 +[IBAbstractPlatformTool main] 
37. ???      0x0000000102f9aba7 ??? 
38. libdyld.dylib   0x000000010cfa9d81 start 
Exception info:{ 
} 

Je n'ai aucune idée de comment procéder. Aucune suggestion?

Que signifie cette erreur?

System-provided UIImage instances cannot be encoded in NIBs - raised for instance '<UIImage: 0x7f945db51a90>, {18, 20}' 

Répondre

4

Des Xcode 9.1 beta 2 Notes de publication:

Interface Builder

A UITabBarItem configured as a system item in a storyboard or xib causes a build failure. (34197132)

Workaround: Configure as a custom item in Interface Builder, then reset the tab bar item to the desired system item in the awakeFromNib method of the view controller.

J'ai eu la même question que vous avez et cela semble être la cause puisque le journal a un de mes UITabBarItems.

EDIT: Je peux confirmer que cela fonctionne. Changez tous les TabBarItems de votre système en custom et il sera compilé! EDIT2: Êtes-vous sûr de ne pas utiliser la bêta 9.1? Parce que je n'ai jamais eu ce problème avant aujourd'hui, quand j'ai testé Xcode 9.1 beta 2 (après avoir précédemment utilisé Xcode 9).

+0

Vous aviez raison! J'ai à la fois GM et bêta de Xcode installé sur la machine et ensuite vérifié et remarqué que j'avais réellement le problème en utilisant la version bêta seulement. La solution de contournement a parfaitement fonctionné! Je vous remercie! –

+0

Que voulez-vous dire personnalisé? J'ai créé une sous-classe personnalisée de 'UITabBarItem' que j'ai assignée pour ces éléments de la barre d'onglets et je reçois toujours l'erreur. – micnguyen

+3

@micnguyen par custom Je veux dire un'UITabBarItem' dont l'apparence dans le volet Attributs d'Interface Builder est définie sur Custom et non sur un système tel queSearch ou Downloads. Vous devez faire ce changement dans IB apparemment. –

0

Curage le dossier DerivedData (dans ~/Library/Développeur/Xcode/DerivedData) est ce que résolu le problème pour moi.

+0

Comme indiqué dans mon post original, je l'ai déjà fait. –

0

Il est peu contre-intuitif, mais plein redémarrage seulement aidé. Pas de nettoyage, suppression des données dérivées ou nouveau storyboard aidé