问题
I have a project XyzAbc with proj structure
--LICENSE
--XyzAbc
----XyzAbc.h
----Info.plist
----file1.swift
----file2.swift
--Products
----XyzAbc.framework
After building this project I pick this XyzAbc.framework
and push it in github account that has folder structure
--XyzAbc.framework
--.gitignore
--LICENSE
--XyzAbc.podspec
--README.md
I created XyzAbc.podspec
file in my local machine its structure is
Pod::Spec.new do |s|
s.name = ""
s.version = "0.1.1"
s.summary = ""
s.description = ""
s.homepage = ""
s.swift_versions = "4.2"
s.license = {
:type => "MIT",
:file => "LICENSE"
}
s.author = "xyyyy"
s.platform = :ios, "10.0"
s.source = {
:git => "https://github.com/xyz/pqr.git", # github link where I uploaded my compiled library
:tag => "0.1.1"
}
s.source_files = "XyzAbc.framework/Headers/*.h"
s.public_header_files = "XyzAbc.framework/Headers/*.h"
s.vendored_frameworks = "XyzAbc.framework"
s.framework = 'Foundation'
end
I am refering this podspec file in my app like
target 'TestApp' do
use_frameworks!
pod 'XyzAbc', :path => "../../../../Desktop/XyzAbc.podspec"
end
But I am not able to see any header inside pod library. In my project TestApp it looks something like this
--Pods
----Podfile
----Development Pods
------XyzAbc
--------Pods
--------SupportFiles
--------<Frameworks is missing>
I tried using :http
then when I provide zip .framework
folder in http link, it is not working but when I provide unziped .framework
folder then I am able to use this library.
I am following this https://medium.com/onfido-tech/distributing-compiled-swift-frameworks-via-cocoapods-8cb67a584d57
UPDATE - elaborated
来源:https://stackoverflow.com/questions/57155791/pod-library-not-installing-properly