Swift CocoaPods部署 - 无法访问任何功能

时间:2015-11-14 14:22:28

标签: swift github cocoapods

我是CocoaPods的新手,希望通过部署开源github项目来探索它(好奇的横幅通知)

因此,我一步一步地遵循Cocoapods指南和Trunk指南进行部署。行。

所以我的pod被称为AWBanner(github:https://github.com/Aymenworks/AWBanner),我可以在任何使用这样的pod的项目中添加它:pod 'AWBanner'。没问题。

我的pod库只包含一个我想要提供的文件,即:AWBanner.swift

pod lib lintpod spec lint 成功。 ✅

这是我的spec文件

#
# Be sure to run `pod lib lint AWBanner.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
  s.name             = "AWBanner"
  s.version          = "0.1.1"
  s.summary          = 'An easy, customizable and soft Swift banner notification for iOS applications.'

# This description is used to generate tags and improve search results.
#   * Think: What does it do? Why did you write it? What is the focus?
#   * Try to keep it short, snappy and to the point.
#   * Write the description between the DESC delimiters below.
#   * Finally, don't worry about the indent, CocoaPods strips it!  
  s.description      = <<-DESC
An easy, customizable and soft banner notification for iOS applications.
AWBanner library provides an easy to use class to show a banner view on the screen ( wherever you want, you can specify the Y origin ).
The banner moves from the Y origin ( default 0, but you can change it ) and stays there until the duration you choose elapse ( Personally I choose in general 2.5s ).
To dismiss the banner before the time elapse, the user can tap it.
                       DESC

  s.homepage         = "https://github.com/Aymenworks/AWBanner"
  # s.screenshots     = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
  s.license          = 'MIT'
  s.author           = { "Rebouh Aymen" => ".." }
  s.source           = { :git => "https://github.com/Aymenworks/AWBanner.git", :tag => s.version.to_s }

  s.platform     = :ios, '8.0'
  s.requires_arc = true

  s.source_files = 'Pod/Classes/AWBanner.swift'
  s.resource_bundles = {
    'AWBanner' => ['Pod/Assets/*.png']
  }

  s.frameworks = 'UIKit'
end

所以问题是在我的swift项目中导入lib时,就像这样: import AWBanner

没有发现任何错误,但我无法使用我制作的任何功能。这就像是一个空模块。即使将它们公开,我也无法访问我的任何功能。

如果我错过了什么,有人可以指点我吗?

0 个答案:

没有答案