How to add cocoapod in ios framework

I am working on an ios project where I use the EVReflection library in the project, I have one user environment there, I use EVReflection, for which I took the cocoapod, which I added after trying to create an environment that it does not build, and another My project also uses Evreflection, so if I add my own infrastructure to the project, it will also automatically add Evreflection there.

SampleFramwork i add evreflection

the code:

 platform :ios, '9.0'

target 'SampleFramework' do
   use_frameworks!
  pod "EVReflection"

end
+7
source share
3 answers

Install POD

[1] Type of open terminal n:

sudo gem install cocoapods

Gem Ruby . 10.11 Mac OSX El Capitan, :

sudo gem install -n /usr/local/bin cocoapods

, " activesupport Ruby >= 2.xx", activesupport, .

sudo gem install activesupport -v 4.2.6

[2] , , , , cocoapods . - cocoapods. :

pod setup

, -. (370,0 2016 ). . , "" " " git -remote-https. verbose :

pod setup --verbose

[3] "Setup Complete", XCode .

[4] cd " XCode" ( .xcodeproj) :

pod init

[5] , :

open -a Xcode Podfile

[6] . . . , podfile

pod 'EVReflection'

( AFNetworking ).

:

Uncomment platform: ios, '8.0' Uncomment user_frameworks! Swift

podfile, XCode.

[7] , :

pod install

, , .

"Pod installation complete! There are X dependencies from the Podfile and X total pods installed."

xcode xcodepace xcode .:)

+5

:

1)

2) : pod init

3) : atom podfile ( nano/vim/- )

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

# Public spec repository
source 'https://github.com/CocoaPods/Specs.git'

use_frameworks!

target 'ProjectName' do

    # Pods for ProjectName
    pod 'EVReflection'


end

4) :

5) xcode project.xcworkspace

+1
  • Podfile

    use_frameworks! target "YourProjectName" do pod 'EVReflection' end

  • ,

enter image description here

+1
source

Source: https://habr.com/ru/post/1680614/


All Articles