Failed to render and update auto layout status for UIViewController : dlopen(Cosmos.framework, 1): no suitable image found
Asked Answered
M

2

8

I'm using Cosmos Pod in my project as stars rating. I have error in one of my Storyboard after set view class to CosmosView:

file:///Users/FedericoVivian/Documents/Documenti%20personali/CSMApp/CSMApp/LogBook/LogBook.storyboard: error: IB Designables: Failed to render and update auto layout status for UIViewController (GJw-lE-8co): dlopen(Cosmos.framework, 1): no suitable image found. Did find: Cosmos.framework: required code signature missing for 'Cosmos.framework'

I using this release

Cosmos release 15.0.0 Xcode 9.3 Swift

How I can fix this error? It causes whole storyboard to be blank.

Help me please !!

Mealtime answered 10/4, 2018 at 23:4 Comment(0)
S
16

In case you are using Cocoapods try this solution fixed the problem for me:

https://github.com/CocoaPods/CocoaPods/issues/7606#issuecomment-381279098

Just add code below to your Podfile and update your dependencies.

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings.delete('CODE_SIGNING_ALLOWED')
            config.build_settings.delete('CODE_SIGNING_REQUIRED')
        end
    end
    installer.pods_project.build_configurations.each do |config|
        config.build_settings.delete('CODE_SIGNING_ALLOWED')
        config.build_settings.delete('CODE_SIGNING_REQUIRED')
    end
end
Sterigma answered 20/4, 2018 at 7:23 Comment(4)
I will get the issue when I close and reopen the particular view controller of storyboard. Can you share any suggestions about the issue.Allopatric
I don't have such behaviour in my project. Everything works fine for now. But I've revealed another issue related to this one. Code signing options was also defined in root Pods project. My answer is updated to handle this problem too.Sterigma
@Sterigma Can you please explain the purpose of this code?Ur
Does this still work? I can't seem to get it to work unfortunately.Gmt
C
0

I encounter the same issue after upgrading to Xcode 11, and an iPhone with iOS 13.

I found at Apple's Xcode 11 release note, which said something about it.

When using Xcode on macOS 10.15, some files — especially .xib files and storyboard files — might be copied rather than compiled, resulting in an incorrect build product. (49351105)

Workaround: In the File Inspector for the file which is being copied, toggle the Type popup away from Default - then back to Default. This resets the file type in the project file to the correct type and enables the build system to match it to the correct tool to process it.


The File Inspector, and Type is as following image. Hope it could help someone else.

Storyboard file

Carom answered 24/9, 2019 at 8:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.