0

Xcode 10 beta (10L176w) version has been released a few days ago. So as a developer I downloaded a beta version to try it. I compiled my current project, run it on iOS 10.3.3 iPhone and get an exception throwed by UICollectionView view

[12215:4622208] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle (loaded)' with name 'AwesomeViewCell'' * First throw call stack: (0x1cb53b3d 0x1bddb067 0x1cb53a85 0x222553a7 0x226128ed 0x21de768b 0x3419d7 0x33de0b 0x22607851 0x21de75e1 0x21de5a93 0x21de03d7 0x331273 0x21d83483 0x1f9dbcb7 0x1f9cfd77 0x1f9cfc05 0x1f95e839 0x1f97cfdb 0x1f97db2f 0x1cb0f803 0x1cb0da55 0x1cb0e017 0x1ca611af 0x1ca60fd1 0x1e20bb41 0x21de9a53 0x26d77d 0x1c24e4eb) libc++abi.dylib: terminating with uncaught exception of type NSException

The project is not crashing if I run it in on Xcode 9.4(9F1027a). I register the cell via nib and it's loaded

UINib *nib = [UINib nibWithNibName:@"AwesomeViewCell" bundle:_currentBundle];
    [collectionView registerNib:nib forCellWithReuseIdentifier:@"AwesomeViewCell"]; 

The only the thing that the _currentBundle - is not the main application bundle, but it's a bundle of cocoapod's library. Maybe the issue is related with that.

Also I understand that Xcode is beta yet. But does anyone also met the same error in the Xcode 10 beta?

Ihar Katkavets
  • 1,510
  • 14
  • 25

2 Answers2

1

The issue is related with Copy CocoaPods resources Build Phase

Xcode 10 beta doesn't copy the resources.

enter image description here

Ihar Katkavets
  • 1,510
  • 14
  • 25
1

It's approved that the project which created by CocoaPods version 1.3.1 or before can't run on Xcode10 beta. Simply, don't do any remove operation, just pod install again after upgrade CocoaPods, the problem is gone. If the project is newly created by CocoaPods version 1.5.3(1.4.0 or later), it's unnecessary to worry about this issue. https://github.com/CocoaPods/CocoaPods/issues/7823