Closed bluecitymoon closed 9 years ago
Fetching external sources
-> Pre-downloading: Mustache
from https://github.com/groue/GRMustache.swift.git
Git download Git download $ /usr/bin/git clone https://github.com/groue/GRMustache.swift.git /Users/jerryjiang/Documents/workspace/trunk/Pods/Mustache --single-branch --depth 1 Cloning into '/Users/jerryjiang/Documents/workspace/trunk/Pods/Mustache'... [!] No podspec exists at path
/Users/jerryjiang/Documents/workspace/trunk/Pods/Mustache/Mustache.podspec.json
.
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.36.4/lib/cocoapods-core/specification.rb:527:in from_file' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/lib/cocoapods/external_sources/abstract_external_source.rb:142:in
store_podspec'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/lib/cocoapods/external_sources/abstract_external_source.rb:112:in block in pre_download' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/lib/cocoapods/user_interface.rb:70:in
titled_section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/lib/cocoapods/external_sources/abstract_external_source.rb:99:in pre_download' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/lib/cocoapods/external_sources/downloader_source.rb:13:in
fetch'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/lib/cocoapods/installer/analyzer.rb:347:in fetch_external_source' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/lib/cocoapods/installer/analyzer.rb:324:in
block (2 levels) in fetch_external_sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/lib/cocoapods/installer/analyzer.rb:323:in each' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/lib/cocoapods/installer/analyzer.rb:323:in
block in fetch_external_sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/lib/cocoapods/user_interface.rb:49:in section' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/lib/cocoapods/installer/analyzer.rb:322:in
fetch_external_sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/lib/cocoapods/installer/analyzer.rb:57:in analyze' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/lib/cocoapods/installer.rb:189:in
analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/lib/cocoapods/installer.rb:111:in block in resolve_dependencies' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/lib/cocoapods/user_interface.rb:49:in
section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/lib/cocoapods/installer.rb:110:in resolve_dependencies' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/lib/cocoapods/installer.rb:90:in
install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/lib/cocoapods/command/project.rb:71:in run_install_with_update' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/lib/cocoapods/command/project.rb:101:in
run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.8.1/lib/claide/command.rb:312:in run' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/lib/cocoapods/command.rb:46:in
run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.4/bin/pod:44:in <top (required)>' /usr/bin/pod:23:in
load'
/usr/bin/pod:23:in `
I'd be very happy if GRMustache.swift had a cocoapod. Could you would help making it?
Are you in for building the cocoapods spec, @bluecitymoon ?
thanks for the trust but I am really new to iOS development so that I am really sorry about I can't help on it...
right now I drag the project into mine and use it as a embedded framework. Do you have some full example on rendering html file?
thanks for the trust but I am really new to iOS development so that I am really sorry about I can't help on it...
OK @bluecitymoon, that's fine, and welcome on board!
right now I drag the project into mine and use it as a embedded framework.
Good, this is quite a valid technique.
Do you have some full example on rendering html file?
One you have a template resource in your project, rendering it is easy as:
let template: Template = Template(named: "Document")!
let data = ...
let rendering: String = template.render(Box(data))!
Open Mustache.xcworkspace
, have a look at the MustacheDemoiOS project inside, and its Document.mustache
resource.
If you don't know what is a resource, then you need to learn a really important core concept in iOS development. I strongly suggest your read the documentation: https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/Introduction/Introduction.html#//apple_ref/doc/uid/10000123i. If this is too much reading for you, check StackOverflow about bundle resources.
If you don't know where to put the rendering code (the three lines above), then you may check again MustacheDemoiOS. But it is likely that you need to read some more documentation, about UIViewController this time: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/
It works!! Thanks a lot!
I find that I can't include this framework with command pod install. could you please add cocoapods support? I tried obj-c version and it is supported