Reputation: 1263
I downloaded this zip https://github.com/Loadex/MessageBanner but have no idea to install it correctly to run. All the app does is show custom iOS banners. I'd like for someone with cocoa pods experience to get this app to run locally and explain from the download process, what they did in a nice compact answer. I'd like a step by step explaining how to get it to run. Thanks. So far I've tried this but deleted the project folder after numerous warnings from the terminal and from Xcode at run time. I have cocoa pods installed.
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$
Also added this to podfile
source '[email protected]:CocoaPods/Specs.git'
platform :ios, '7.0'
pod 'MessageBanner', '~> 1.0'
Upvotes: 2
Views: 3665
Reputation: 920
if you have not updated ruby gem and not installed cocoa pod, then follow “setup to use cocoa pods ” and after that “To run the project”. If you have already installed cocoapod,then you may leave option ‘A’. but it is recommended to follow ‘A’ then ‘B” both.
A. setup to use 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
B. To Run downloaded Project
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.
Upvotes: 3
Reputation: 4244
Make sure your Podfile is correctly formatted:
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'
Try "rm -rf Pods Podfile.lock" and then "pod install" again.
Upvotes: 1
Reputation: 288
Change the Podfile like that and run pod install :
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
pod 'MessageBanner'
Upvotes: 0