IBDesignables, no suitable image found, required code signature missing
Asked Answered
A

3

10

I recently made some changes to Assets.xcassets and this caused absolute chaos for XCode. I ended up with multiple errors of this kind: Failed to render and update auto layout status for *MyViewController* (6jf-cd-DYU) dlopen (AFramework.framework, 1): no suitable image found. Did find: Aframework.framwork: required code signature missing for 'Aframework.framework' in both .storyboard and .xib files.

Aframework is a placeholder for multiple Pod frameworks I have as dependencies. These worked fine before I modified xcassets.

I tried everything I could find related to this but I've gotten nowhere: Cleaned Derived Data, ran clean/build, removed all XCode cache folders, reinstalled XCode entirely, Refresh all views etc. It compiles and runs fine, everything works in the app (and no images or resources are missing), but all my Storyboards are blank (all white), which makes it pretty hard to work.

I also tried pod deintegrate, removed the xcworkspace-file and reinstalling pods (since the error points to a Pod framework). I also revoked and re-issued all my certificates through XCode since it points to code signing as a problem.

EDIT: I Completely reinstalled OSX and cloned the repo from Git from a working configuration. No change. This must be something other than the xcassets-theory, because even if I check out commits from weeks ago (where I know for sure this wasn't a problem) I still get the error. Maybe something was updated by Apple between now and the last time it worked. I've given up and moved on for now. I'll just click through the views in the explorer on the left side instead of inside the storyboard. Hopefully someone somewhere figures this out at some point.

Astrionics answered 9/4, 2018 at 17:46 Comment(0)
A
9

It turns out this was related to cocoapods. 1.5 has issues with XCode 9.3 it seems. I downgraded to cocoapods 1.4 and the issue went away. Please see this thread on GitHub.

Edit: This issue has been fixed. The latest version of CocoaPods no longer suffers from this problem, so all you have to do is update.

Astrionics answered 11/4, 2018 at 15:46 Comment(0)
H
12

This issue looks like Cocoapods bug and caused by CODE_SIGNING_ALLOWED and CODE_SIGNING_REQUIRED keys in settings of Pods.

Adding this code in the end of pod file will fix an issue (don't forget do then pod install):

# Workaround for Cocoapods v.1.5 issue #7606
post_install do |installer|
    installer.pods_project.build_configurations.each do |config|
        config.build_settings.delete('CODE_SIGNING_ALLOWED')
        config.build_settings.delete('CODE_SIGNING_REQUIRED')
    end
end
Heda answered 25/5, 2018 at 10:1 Comment(0)
A
9

It turns out this was related to cocoapods. 1.5 has issues with XCode 9.3 it seems. I downgraded to cocoapods 1.4 and the issue went away. Please see this thread on GitHub.

Edit: This issue has been fixed. The latest version of CocoaPods no longer suffers from this problem, so all you have to do is update.

Astrionics answered 11/4, 2018 at 15:46 Comment(0)
T
1

Just adding a complete version of Igor's answer

Please don't downgrade cocoapods. Instead modify pod files as bellow.

#Replace 9.0 with your project ios version
platform :ios, '9.0'

target 'YourProject' do

frameworks
  use_frameworks!

  pod 'Alamofire', '~> 4.7'
  pod 'AlamofireObjectMapper', '~> 5.0'
  pod 'SDWebImage', '~> 4.0'

end

post_install do |installer|
    installer.pods_project.build_configurations.each do |config|
        config.build_settings.delete('CODE_SIGNING_ALLOWED')
        config.build_settings.delete('CODE_SIGNING_REQUIRED')
    end
end
Taneka answered 24/7, 2018 at 8:30 Comment(1)
This should be fixed by CocoaPods, not by the user. Until then, using 1.4 is a perfectly valid workaround. Adding this to your Podfile may have consequences in the future (perhaps after CocoaPods fix it on their own). Just in rebuttal to "please don't downgrade".Astrionics

© 2022 - 2024 — McMap. All rights reserved.