ios - How to make pod with Swift -


i try create pod swift, can't make work on swift project.

i create simple swift extension

import uikit  public extension uiview {     public func sw_foo() {         println("bar")     } } 

and podfile

source 'https://github.com/cocoapods/specs.git'  use_frameworks!  pod "testswift", :path => "../" 

in objective-c project can import #import <testswift/testswift-swift.h> , use method [self.view sw_foo];

but in swift project can't when command+click header import testswift

i can't see method declare public

import testswift import uikit   var testswiftversionnumber: double 

it simple class, don't know wrong.

tried on pod 0.36.3 , 0.36.4

here project: https://www.dropbox.com/s/h6yyq8207iajlsv/testswift.zip?dl=0

and podspec

pod::spec.new |s|   s.name             = "testswift"   s.version          = "0.1.0"   s.summary          = "a short description of testswift."   s.description      = <<-desc                        optional longer description of testswift                         * markdown format.                        * don't worry indent, strip it!                        desc   s.homepage         = "https://github.com/<github_username>/testswift"   # s.screenshots     = "www.example.com/screenshots_1", "www.example.com/screenshots_2"   s.license          = 'mit'   s.author           = { "sarun wongpatcharapakorn" => "artwork.th@gmail.com" }   s.source           = { :git => "https://github.com/<github_username>/testswift.git", :tag => s.version.to_s }   # s.social_media_url = 'https://twitter.com/<twitter_username>'    s.platform     = :ios, '7.0'   s.requires_arc = true    s.source_files = 'pod/classes/**/*'   s.resource_bundles = {     'testswift' => ['pod/assets/*.png']   }    # s.public_header_files = 'pod/classes/**/*.h'   s.frameworks = 'uikit'   # s.dependency 'afnetworking', '~> 2.3' end 

seems file isn't visible project.
if .swift file, not .framework, try adding file to
build phases -> compile sources

it should this:

enter image description here

provided have have done everything right - correct podspec file, ect - , project structure looks this:

enter image description here


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -