1

I just added a pod called "SwiftyButton" into my Podfile and pod install. Then I added both "PureLayout" and "SwiftyButton" into the "Linked Framework and Libraries" thingy.

In the storyboard, I changed a UIButton's class to "SwiftyButton" and this error pops up:

Failed to render instance of Swifty Button: dlopen(SwiftyButton.framework, 1): Library not loaded: @rpath/PureLayout.frameowrk/PureLayout Referenced from: SwiftyButton.framework Reasom: image not found.

I have searched a lot of stack overflow posts and I tried a lot of the solutions, including

  • setting the Runpath search path in Build Settings
  • removing the frameworks from the Linked Frameworks and libraries
  • cleaning the project
  • pod install

But they all didn't work. The error is still there!

I have also seen this question but I have no idea what the answer is talking about. It seems not related to Cocoapods.

Sweeper
  • 213,210
  • 22
  • 193
  • 313

1 Answers1

1

I solved the problem by uninstalling the prerelease version of cocoapods.

First, I ran this command:

sudo gem uninstall cocoapods

Then it prompted me to choose a version of the gem to uninstall, so I chose 2, which is the prerelease version.

After that I checked the version of cocoapods to see whether it is the newest stable version:

pod --version

and it is! (0.39.0)

And then I navigated back to the project directory and did:

pod update

Finally, I opened Xcode and it seems to be working!

Sweeper
  • 213,210
  • 22
  • 193
  • 313