userom
userom

Reputation: 411

pod update/install did not fetch framework as listed in podfile

After lots of reading and trial I am posting this for help.

Just like "google-cast-sdk" (https://github.com/CocoaPods/Specs/blob/master/Specs/8/1/2/google-cast-sdk/3.3.0/google-cast-sdk.podspec.json), I am trying to include framework as pod to my project. All is to explore feasibility, if I can create pod out of my frameworks and include to my project directly by a simple "pod install".

My s.source file is a ZIP file at http location as like "google-cast-sdk". I am using "s.vendored_frameworks" to have framework.

Below is my podspec file snippet (only main stuff listed)

s.source = {:http => "http://sdf.samsungcloudcdn.com/Public/UwBWAEMAMAAwADAAMAAyAA==/MwA3ADgANQBvAGEAYQA1ADkANgBlADcAZwA=/SmartViewSDK/SmartViewSDK-iOS-XCode8.1-2.3.8.zip" }
s.source_files = "SmartViewSDK-iOS/iphoneos+iphonesimulator/SmartView.framework/Headers/*.h"
s.preserve_paths = "SmartViewSDK-iOS/iphoneos+iphonesimulator/SmartView.framework"
s.vendored_frameworks = "SmartViewSDK-iOS/iphoneos+iphonesimulator/SmartView.framework"

My podspec file is good as "pod spec lint" is successful without any problem. Even I checked my cache for this pod and I see framework there (./Library/Caches/CocoaPods/Pods/External/SmartViewSDK-iOS/3031ec9b173d86f80c7871a46ab3193b/...)

Below is my podfile file for a sample project taken from net

inhibit_all_warnings!
use_frameworks!
target 'Phonercise' do
pod "google-cast-idk"
pod 'SmartViewSDK-iOS', :git =>'https://github.com/littlepod/DemoSmartPod.git'

end

now, when I do

$ pod install

I do not get "SmartViewSDK.framework" framework in "../Phonercise/Pods/SmartViewSDK-iOS" project and pod location as like I do get for google-cast-sdk. Rather I get two general README and LICENSE files that is there on my git repository where my pod spec lies.

What I am missing?

Upvotes: 2

Views: 837

Answers (1)

userom
userom

Reputation: 411

I got it solved. Everything was fine, except that my pod install was not able to locate "podspec" rightly as it was not added to my local "repo".

I think guide for private pods, https://guides.cocoapods.org/making/private-cocoapods.htmlwas little confusing for me.

What I did?

Instead of keeping my pod at my private repo at git, I just published to cocoa pods spec repo.

$pod trunk register <> 'Full Name' $pod trunk push DemoSmartPod.podspec

Then from my app (terminal), I modified podfile to get pod from standard cocoa pods source. $ pod install It worked like champ.

Once public spec repo worked well, I followed the link for private repo (which I missed to get correctly) from below link and again it worked great.

https://eladnava.com/publish-a-universal-binary-ios-framework-in-swift-using-cocoapods/

Upvotes: 1

Related Questions