如何运行这个使用cocoapods的应用程序?
How to run this app that uses cocoa pods?
我下载了这个 zip https://github.com/Loadex/MessageBanner,但不知道如何将它正确安装到 运行。该应用程序所做的只是显示自定义 iOS 横幅。我希望有 cocoa pods 经验的人将此应用程序下载到本地 运行 并从下载过程中解释他们在一个很好的紧凑答案中做了什么。我想一步步解释如何将其设置为 运行。谢谢。到目前为止,我已经尝试过这个但是在终端和 Xcode 在 运行 时间发出大量警告后删除了项目文件夹。我安装了 cocoa pods。
WTL2:~ Apple$ cd desktop
WTL2:desktop Apple$ cd m
WTL2:m Apple$ cd MessageBannerDemo
WTL2:MessageBannerDemo Apple$ touch podfile
WTL2:MessageBannerDemo Apple$ pod install
Analyzing dependencies
CocoaPods 0.36.0.beta.2 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.
Downloading dependencies
Generating Pods project
Integrating client project
[!] From now on use `MessageBannerDemo.xcworkspace`.
[!] [!] The Podfile does not contain any dependencies.
WTL2:MessageBannerDemo Apple$
还将此添加到 podfile
source 'git@github.com:CocoaPods/Specs.git'
platform :ios, '7.0'
pod 'MessageBanner', '~> 1.0'
像那样更改 Podfile 并 运行 pod install :
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
pod 'MessageBanner'
确保您的 Podfile 格式正确:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
workspace 'MessageBannerDemo.xcworkspace'
# Make sure xcodeproj is in correct path. Or update path here.
xcodeproj 'MessageBannerDemo/MessageBannerDemo.xcodeproj'
pod 'MessageBanner'
# Specify Xcode project targets to link the default pod with.
link_with 'MessageBannerDemo'
尝试 "rm -rf Pods Podfile.lock",然后再 "pod install"。
如果你还没有更新 ruby gem 并且没有安装 cocoa pod,那么按照“设置使用 cocoa pods” 然后“到 运行 项目”。如果您已经安装了 cocoapod,那么您可以保留选项“A”。但建议先“A”再“B”。
一个。设置使用 cocoa pods
Open terminal and follow the following steps
- update ruby gem
“sudo gem update —system”
Enter you system password when requested. wait it until it finished.
it may take little time
After successful installation you will see something like this.
Ruby Interactive (ri) documentation was installed. ri is kind of like man
pages for ruby libraries. You may access it like this:
ri Classname
ri Classname.class_method
ri Classname#instance_method
If you do not wish to install this documentation in the future, use the
--no-document flag, or set it as the default in your ~/.gemrc file. See
'gem help env' for details.
RubyGems system software updated
- Install cocoapods
“sudo gem install cocoapods”
you may get this to override press just enter Y to continue.
after successful installation you will see something similar to this
Installing ri documentation for cocoapods-core-0.36.0
Parsing documentation for cocoapods-0.36.0
Installing ri documentation for cocoapods-0.36.0
20 gems installed
- to complete the setup of CocoaPods
“pod setup”
after successful, you will see something similar to this.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin14/rbconfig.rb:213: warning: Insecure world writable dir /usr/local in PATH, mode 040777
Setting up CocoaPods master repo
Setup completed
乙。要运行 下载项目
Open Terminal and follow the these steps
- go to the location of your project.
ex cd ~/desktop/myProjects/TestCocoapod
- tell cocoapod to install the dependencies for your project.
“pod install”
After successful install, you will see something like this
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use `TestCocoapod.xcworkspace` for this project from now on.
3.Note: after this open the folder containing that project. You must
always open the .xcworkspace (ex. TestCocoapod.xcworkspace).
4Now run the project. you can successfully run it.
我下载了这个 zip https://github.com/Loadex/MessageBanner,但不知道如何将它正确安装到 运行。该应用程序所做的只是显示自定义 iOS 横幅。我希望有 cocoa pods 经验的人将此应用程序下载到本地 运行 并从下载过程中解释他们在一个很好的紧凑答案中做了什么。我想一步步解释如何将其设置为 运行。谢谢。到目前为止,我已经尝试过这个但是在终端和 Xcode 在 运行 时间发出大量警告后删除了项目文件夹。我安装了 cocoa pods。
WTL2:~ Apple$ cd desktop
WTL2:desktop Apple$ cd m
WTL2:m Apple$ cd MessageBannerDemo
WTL2:MessageBannerDemo Apple$ touch podfile
WTL2:MessageBannerDemo Apple$ pod install
Analyzing dependencies
CocoaPods 0.36.0.beta.2 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.
Downloading dependencies
Generating Pods project
Integrating client project
[!] From now on use `MessageBannerDemo.xcworkspace`.
[!] [!] The Podfile does not contain any dependencies.
WTL2:MessageBannerDemo Apple$
还将此添加到 podfile
source 'git@github.com:CocoaPods/Specs.git'
platform :ios, '7.0'
pod 'MessageBanner', '~> 1.0'
像那样更改 Podfile 并 运行 pod install :
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
pod 'MessageBanner'
确保您的 Podfile 格式正确:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
workspace 'MessageBannerDemo.xcworkspace'
# Make sure xcodeproj is in correct path. Or update path here.
xcodeproj 'MessageBannerDemo/MessageBannerDemo.xcodeproj'
pod 'MessageBanner'
# Specify Xcode project targets to link the default pod with.
link_with 'MessageBannerDemo'
尝试 "rm -rf Pods Podfile.lock",然后再 "pod install"。
如果你还没有更新 ruby gem 并且没有安装 cocoa pod,那么按照“设置使用 cocoa pods” 然后“到 运行 项目”。如果您已经安装了 cocoapod,那么您可以保留选项“A”。但建议先“A”再“B”。
一个。设置使用 cocoa pods
Open terminal and follow the following steps
- update ruby gem
“sudo gem update —system”
Enter you system password when requested. wait it until it finished. it may take little time After successful installation you will see something like this.
Ruby Interactive (ri) documentation was installed. ri is kind of like man
pages for ruby libraries. You may access it like this:
ri Classname
ri Classname.class_method
ri Classname#instance_method
If you do not wish to install this documentation in the future, use the
--no-document flag, or set it as the default in your ~/.gemrc file. See
'gem help env' for details.
RubyGems system software updated
- Install cocoapods
“sudo gem install cocoapods”
you may get this to override press just enter Y to continue. after successful installation you will see something similar to this
Installing ri documentation for cocoapods-core-0.36.0
Parsing documentation for cocoapods-0.36.0
Installing ri documentation for cocoapods-0.36.0
20 gems installed
- to complete the setup of CocoaPods
“pod setup”
after successful, you will see something similar to this.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin14/rbconfig.rb:213: warning: Insecure world writable dir /usr/local in PATH, mode 040777
Setting up CocoaPods master repo
Setup completed
乙。要运行 下载项目
Open Terminal and follow the these steps
- go to the location of your project.
ex cd ~/desktop/myProjects/TestCocoapod
- tell cocoapod to install the dependencies for your project.
“pod install”
After successful install, you will see something like this
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use `TestCocoapod.xcworkspace` for this project from now on.
3.Note: after this open the folder containing that project. You must always open the .xcworkspace (ex. TestCocoapod.xcworkspace).
4Now run the project. you can successfully run it.