yellokrow
yellokrow

Reputation: 1

App crashes with dyld when using private cocoapod

I'm trying to make a pod from a framework similar to how Google has done it using GoogleMaps where there is a Frameworks folder and a Resource folder, under Pods/AboutUI where my framework is called AboutUI. I have managed to do it using the podspec file below

Pod::Spec.new do |s|
 s.name          = 'AboutUI'
 s.version       = '0.1.2'
 s.summary       = 'AboutUI for customers to customize.'
 s.author        = 'bob'
 s.license       = {:file=>'LICENSE',:type => 'BSD'}
 s.source        = {:http => 'http://localhost/AboutUI_0.1.2.zip'}
 s.platform      = :ios, '8.0'
 s.homepage      = 'https://some.url.com'
 s.resource      = 'AboutUI.framework/Resources.bundle'
 s.preserve_paths = 'AboutUI.framework'
 s.vendored_frameworks = 'AboutUI.framework'
end

But I get the error below when trying to run the app that uses AboutUI pod...

dyld: Library not loaded: @rpath/AboutUI.framework/AboutUI Referenced from: /private/var/mobile/Containers/Bundle/Application/E4498BB8-A3FF-4949-ABFB-13D7C2AEA9EC/FavoriteCars.app/FavoriteCars Reason: image not found

Upvotes: 0

Views: 202

Answers (1)

yellokrow
yellokrow

Reputation: 1

My solution for this problem was to follow https://medium.com/@syshen/create-an-ios-universal-framework-148eb130a46c and Xcode 6 and Embedded Frameworks only supported in iOS8. Besides trying those I set my framework mach-o as a static library. I did not have to manually include the framework to the project as part of the Embedded Binaries.

Upvotes: 0

Related Questions