Xcode 8 "symbol not found" and IBDesignable

I'm getting a lot of build errors showing up under my main app target that are related to the Storyboard, but don't appear to affect actual builds, running in Simulator/Device, or archiving. In searching for the error online I found another thread, not related to Storyboards, where people attributed not finding "__TMPVs12SetGenerator" symbol to Xcode using the Swift 3.0 toolchain instead of the Swift 2.3 toolchain. My app includes several subprojects that contain Swift but all have been migrated to Swift 2.3. It seems like the Swift version mismatch is only affecting compilation occuring in support of IBDesignable UIView subclasses in my Storyboard. Has anyone else seen this issue or found a workaround?


In the full-text of the error below, I notice one potential issue which is that dlopen is referencing libswiftCore.dylib from "XcodeDefault.xctoolchain" (Swift 3.0) instead of the Swift2.3 toolchain also available in the same directory.


<omitted>/Base.lproj/Main.storyboard: error: IB Designables: Failed to update auto layout status: dlopen(<omitted>.app, 1): Symbol not found: __TMPVs12SetGenerator

Referenced from: /Users/<omitted>/Library/Developer/Xcode/DerivedData/<omitted>-agzqvrgxrsapolhdbgndaesvhghw/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/<omitted>.framework/<omitted>

Expected in: /Applications/Xcode8.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/../../../../../../Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftCore.dylib

in /Users/cc99283/Library/Developer/Xcode/DerivedData/<omitted>-agzqvrgxrsapolhdbgndaesvhghw/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/<omitted>.framework/<omitted>

Having exactly the same issue. Any help would be greatly appreciated.

Same here.

Accepted Answer

I encountered the same problem last night. It took a few hours of digging, but it's also the issue of Interface Builder seeming to use the Swift 3.0 runtime. I fixed it by modifying the LD_RUNPATH_SEARCH_PATHS to include the path to the 2.3 runtime: /Applications/Xcode.app/Contents/Developer/Toolchains/Swift_2.3.xctoolchain/usr/lib/swift/iphonesimulator


You need to add that to the LD_RUNPATH_SEARCH_PATHS setting on the target containing the IBDesignable. After that clear DerivedData, restart Xcode and cross your fingers 🙂


It worked for me, but now I'm faced with issues where IB seems to randomly make all my UI go white with misplaced views. Things seem seriously broken in Xcode 8 :/

Ha, I spoke too soon. It would appear that IBDesignables no longer communicate their intrinsicContentSize to Xcode so it now makes them 10,000 x 10,000 thus covering my entire UI.


I just put some 'remove at build time' constraints and now they're rendering fine.

I just tried with Xcode 8.1 and, fingers crossed, it seems to be OK so far. Still having to manually fix some frames that got set to 1000x1000pt to get back to normal.

EDIT: I take that back. It just took some time for the errors to show back up. 😟

I'm seeing the same thing now. After manually adding the library search path I found that I could fix frames and get all the warnings to go away. However on reopening the project it seems to incorrectly size a lot of the frames again, requireing that they be re-set.

Similar issues here with Xcode 8.0.


I get the following errors:

file:///Users/<omitted>/Entwicklung/Git-Workspaces/<omitted>/<omitted>/<omitted>/UI/Login/Login.storyboard: error: IB Designables: Failed to render and update auto layout status for LoginViewController (nNd-yb-y64): dlopen(<omitted>.framework, 1): Symbol not found: __TMPVs24ReverseRandomAccessIndex

Referenced from: XRCore.framework

Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/../../../../../../Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftCore.dylib

in <omitted>.framework


file:///Users/jarosz/Entwicklung/Git-Workspaces/<omitted>/<omitted>/<omitted>/UI/Login/Login.storyboard: error: IB Designables: Failed to update auto layout status: dlopen(<omitted>.framework, 1): Symbol not found: __TMPVs24ReverseRandomAccessIndex

Referenced from: <omitted>.framework

Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/../../../../../../Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftCore.dylib

in <omitted>.framework

Xcode 8 "symbol not found" and IBDesignable
 
 
Q