Git Product home page Git Product logo

Comments (34)

michaelcarroll avatar michaelcarroll commented on August 25, 2024 7

I had this same issue and fixed it by adding a signature fix and the code @lukaskirner mentioned above.

Here is what my pod file looks like:

# Uncomment the next line to define a global platform for your project
# platform :ios, '11.0'

target 'CardTest' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for CardTest
	pod 'Cards'

post_install do |installer|
  installer.pods_project.build_configurations.each do |config|
    config.build_settings['LD_RUNPATH_SEARCH_PATHS'] = [
      '$(FRAMEWORK_SEARCH_PATHS)'
    ]
    installer.pods_project.build_configurations.each do |config|
        config.build_settings.delete('CODE_SIGNING_ALLOWED')
        config.build_settings.delete('CODE_SIGNING_REQUIRED')
   end
end
end
end

from cards.

lukaskirner avatar lukaskirner commented on August 25, 2024 6

@QinGuan2004 suggested to downgrade Cocoapods which didn't completly removed the problem but after I added this little code to the Podfile it workes.

post_install do |installer|
  installer.pods_project.build_configurations.each do |config|
    config.build_settings['LD_RUNPATH_SEARCH_PATHS'] = [
      '$(FRAMEWORK_SEARCH_PATHS)'
    ]
  end
end

from cards.

PaoloCuscela avatar PaoloCuscela commented on August 25, 2024 1

Good news :D
v1.2.4 out.
Now it should display the preview on the storyboard correctly.

from cards.

PaoloCuscela avatar PaoloCuscela commented on August 25, 2024

Thank you very much :D
Try to check the attribute inspector and make sure the "module" field is set to Cards

from cards.

wqfan avatar wqfan commented on August 25, 2024

Thanks for the quick response!

It's set to "Cards", but I still got this error.

screen shot 2017-10-27 at 7 37 56 am

from cards.

PaoloCuscela avatar PaoloCuscela commented on August 25, 2024

Got it.
You have to do "import Cards" in the top of the file. I'll add this to the readme.
Thank you :)

from cards.

wqfan avatar wqfan commented on August 25, 2024

I also tried that. But there is an error "Cannot load underlying module for 'Cards'".

from cards.

wqfan avatar wqfan commented on August 25, 2024

I cleaned the project and then rebuild it. "Cannot load underlying module for 'Cards'" disappears, but I still have the "Use of undeclared type 'CardHightlight'" error.

screen shot 2017-10-27 at 7 58 38 am

from cards.

wqfan avatar wqfan commented on August 25, 2024

Hello @PaoloCuscela, sorry for the random messages.

I just found I installed Cards 1.1 instead of the newest 1.2.3. After upgrading to the 1.2.3, the undeclared problem disappears but I got this error:

IB Designables: Failed to render and update auto layout status for ViewController (BYZ-38-t0r): dlopen(Cards.framework, 1): Library not loaded: @rpath/Player.framework/Player
Referenced from: Cards.framework
Reason: image not found

screen shot 2017-10-27 at 8 14 09 am

from cards.

PaoloCuscela avatar PaoloCuscela commented on August 25, 2024

Looks strange. I've done a test right now and all seems to work well.
Try this:
New xcode project
Pod init
Add "pod 'Cards'"
Pod install
Pod update
Open 'project.workspace'
Add UIView in storyboard
Class 'CardHighlight'
Module 'Cards'

from cards.

wqfan avatar wqfan commented on August 25, 2024

Still got the same IB Designables issue. I'm working on Xcode Version 9.0.1 (9A1004). Probably an issue with my Xcode?

screen shot 2017-10-27 at 10 00 03 am

from cards.

PaoloCuscela avatar PaoloCuscela commented on August 25, 2024

Can you post your sample project so I can have a look ?

from cards.

wqfan avatar wqfan commented on August 25, 2024

Sure! Thank you very much for your help!
project.zip

from cards.

PaoloCuscela avatar PaoloCuscela commented on August 25, 2024

schermata 2017-10-27 alle 17 18 06

It's working fine here. I'm on 9.0.1 too ... 🤔
Maybe reinstalling XCode ?

from cards.

wqfan avatar wqfan commented on August 25, 2024

Thank you @PaoloCuscela. Sorry I forget to tell you that I'm able to build the project now, though it has a storyboard error. Before, when I'm using Cards 1.1, the prototype of a card can appear on the storyboard, but currently it can't show up, so I think it's that error causes the UI to fail to display.

Also I tried reinstalling Xcode. The error is still here...

from cards.

PaoloCuscela avatar PaoloCuscela commented on August 25, 2024

I googled about it yesterday. It turned out that is a common issue, probably about some optional vars stopping IBDesignables to be rendered.
I'll try to fix that in these days

from cards.

wqfan avatar wqfan commented on August 25, 2024

Thanks for your efforts!

from cards.

wqfan avatar wqfan commented on August 25, 2024

Sorry @PaoloCuscela I missed your last comment. I just upgraded it to 1.2.4 and the preview is still blank. Probably it's a weird problem happened on my macOS only. Thanks very much for your help!

from cards.

PaoloCuscela avatar PaoloCuscela commented on August 25, 2024

Already tried with Editor -> Refresh all views ?

from cards.

wqfan avatar wqfan commented on August 25, 2024

Yes. And the storyboard error is still here:

Designables: Failed to render and update auto layout status for ViewController (BYZ-38-t0r): dlopen(Cards.framework, 1): Library not loaded: @rpath/Player.framework/Player
  Referenced from: Cards.framework
  Reason: image not found

from cards.

PaoloCuscela avatar PaoloCuscela commented on August 25, 2024

Do you get this error only with my repo ?

from cards.

wqfan avatar wqfan commented on August 25, 2024

Yes. And I find it works fine on your Demo project. I'm very confused why the error happens on my projects.

from cards.

wqfan avatar wqfan commented on August 25, 2024

Hello @PaoloCuscela, I upgraded the Xcode to the newest 9.1. The storyboard error disappeared but I still can't see the preview.

screen shot 2017-10-31 at 3 25 03 pm

from cards.

FranciscoPereira avatar FranciscoPereira commented on August 25, 2024

I'm having the same error too but in my case I'm trying to use it on a UICollectionViewCell by adding a subview with Card class type.

from cards.

PaoloCuscela avatar PaoloCuscela commented on August 25, 2024

I've done some testing.
Looks really strange, with the sdk installed from cocoapods repo preview are not rendered.
With a local copy ( pod 'Cards', :path => '../' ) it's all fine.
I've to do some research on it.

from cards.

AshleyDeng avatar AshleyDeng commented on August 25, 2024

We have the same issue as @wqfan reported. There is an error on Storyboard saying

IB Designables: Failed to render and update auto layout status for EventsTableViewController (ZmE-MU-FrL): dlopen(Cards.framework, 1): Library not loaded: @rpath/Player.framework/Player Referenced from: Cards.framework Reason: image not found

The UI was not able to be rendered on Storyboard neither.

Me and my guy are on Cards 1.3.0 and XCode 9.1 and 9.2

from cards.

PaoloCuscela avatar PaoloCuscela commented on August 25, 2024

I found a workaround that might work, try adding this in your podfile.
CocoaPods/CocoaPods#5334 (comment)

from cards.

avjiang avatar avjiang commented on August 25, 2024

Hi, just found out this library and i face the same issue as stated above, failed to render IB designable error. is there any update for this issue? I am using Xcode 9.2

Thanks!

from cards.

MhndMousa avatar MhndMousa commented on August 25, 2024

I had the same error trying to use cocoapods, I worked around it by adding the library manually.

from cards.

qin-guan avatar qin-guan commented on August 25, 2024

i assume its a cocoapods error since the same problem doesnt come up when adding the library manually...

from cards.

dannylnz avatar dannylnz commented on August 25, 2024

Hi, any update on this bug?
does anyone found a workaround for this?
Thanks 👍

from cards.

lukaskirner avatar lukaskirner commented on August 25, 2024

I still get this bug in 1.3.2. With pod I get the IBDesignables error and if I install it manually it wont find the Cards module.
Is there no fix out there for any of these problems?

from cards.

qin-guan avatar qin-guan commented on August 25, 2024

This issue is not because of the Cards its due to the latest Cocoapods version to fix it just downgrade your cp to about 1.4< and it shouldnt show the error anymore

@lukaskirner if you install it manually from what i know you wouldnt need to import Cards like its already imported somehow

from cards.

jctaoo avatar jctaoo commented on August 25, 2024

It works for me.
xcode: 11.3
macOS: 10.15
CocoaPods: 1.8.1

@QinGuan2004 suggested to downgrade Cocoapods which didn't completly removed the problem but after I added this little code to the Podfile it workes.

post_install do |installer|
  installer.pods_project.build_configurations.each do |config|
    config.build_settings['LD_RUNPATH_SEARCH_PATHS'] = [
      '$(FRAMEWORK_SEARCH_PATHS)'
    ]
  end
end

from cards.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.