IBDesignables not showing up in Xcode

Well, I went through all the forums and websites, but have not yet found a solution or even the cause of the problem that we have regarding the use of IBDesignables in a large project that uses many frameworks (about 30 via Cocoapods or internal). Xcode 8.0, although it returned to Xcode 7.x. Frames are a combination of Swift and Objective-C.

Actual error messages in Xcode:

 "Failed to render and update auto layout status for XXXX: dlopen(xxxx, 1): Library not loaded: @rpath/YYYY/YYYY.framework" and "Failed to update auto layout status: dlopen(xxxx, 1): Library not loaded: @rpath/YYYY/YYYY.framework" 

We do not seem to have a problem with smaller projects that use different combinations of the same frameworks.

I managed to get errors in order to complain that different libraries are not loading, deleting some of the project, so it seems that it is not directly connected to the real library that they are complaining about. I removed -ObjC and all_load as possible culprits, making sure that where there are no project files or xxconfig .

Many of the frameworks share the same dependencies. Things like AFNetworking , ActionSheetPicker , ReactiveCocoa , etc., but removing them only moves the errors.

Has anyone else seen a problem with IBDesignables not working on larger projects?

+5
source share
1 answer

This is a workaround, but seems to work (for now). We found that if we add $(FRAMEWORK_SEARCH_PATHS) and "/Applications/Xcode.app/Contents/Developer/Toolchains/Swift_2.3.xctoolchain/usr/lib/swift/iphonesimulator" to each level of the pod project. LD_RUNPATH_SEARCH_PATHS we can avoid errors without visible side effects.

Here is a snippet from our subfile:

 installer.pods_project.build_configurations.each do |config| config.build_settings['LD_RUNPATH_SEARCH_PATHS'] = [ '$(FRAMEWORK_SEARCH_PATHS)', '"/Applications/Xcode.app/Contents/Developer/Toolchains/Swift_2.3.xctoolchain/usr/lib/swift/iphonesimulator"' ] end 
0
source

Source: https://habr.com/ru/post/1258615/


All Articles