diff --git a/README.md b/README.md index 95a58235c..439d54262 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,8 @@ If you are using [vcpkg](https://github.com/Microsoft/vcpkg/) on your project fo If you are using [cget](http://cget.readthedocs.io/en/latest/), you can install the latest development version with `cget install nlohmann/json`. A specific version can be installed with `cget install nlohmann/json@v3.1.0`. Also, the multiple header version can be installed by adding the `-DJSON_MultipleHeaders=ON` flag (i.e., `cget install nlohmann/json -DJSON_MultipleHeaders=ON`). +If you are using [cocoapods](https://cocoapods.org/), add `pod "nlohmann_json", '~>3.1.2'` to your podfile. + ## Examples Beside the examples below, you may want to check the [documentation](https://nlohmann.github.io/json/) where each function contains a separate code example (e.g., check out [`emplace()`](https://nlohmann.github.io/json/classnlohmann_1_1basic__json_a5338e282d1d02bed389d852dd670d98d.html#a5338e282d1d02bed389d852dd670d98d)). All [example files](https://github.com/nlohmann/json/tree/develop/doc/examples) can be compiled and executed on their own (e.g., file [emplace.cpp](https://github.com/nlohmann/json/blob/develop/doc/examples/emplace.cpp)). diff --git a/nlohmann_json.podspec b/nlohmann_json.podspec new file mode 100644 index 000000000..49f9fe041 --- /dev/null +++ b/nlohmann_json.podspec @@ -0,0 +1,51 @@ +# upgrades how to: +# 1. update s.version +# 2. run `pod spec lint nlohmann_json.podspec` +# 3. register a session with cocoapods +# 4. run `pod trunk push ./` + +# see cocoapods documentation http://docs.cocoapods.org/specification.html for +# more details. +Pod::Spec.new do |s| + + # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + s.name = "nlohmann_json" + s.version = "3.1.2" + s.summary = "JSON for Modern C++" + + + # CocoaPods strips indentation for description + s.description = <<-DESC + JSON library for modern c++, it can read & write JSON. If you know how to + use std::vector or std::map, you are already set. + DESC + + s.homepage = "https://github.com/nlohmann/json" + s.screenshots = "https://raw.githubusercontent.com/nlohmann/json/master/doc/json.gif" + + + license_text = File.read("LICENSE.MIT") + # cocoapods checks extension and expects it to be a txt. so instead + # we read the file and pass it in as text. + s.license = { :type => "MIT", :text => license_text } + + + s.authors = { + "Niels Lohmann" => "mail@nlohmann.me" + } + + s.platform = :ios, "8.0" + + # When using multiple platforms. I haven't tested integration with other + # platforms. Theoretically it should just work without problem. + # s.ios.deployment_target = "8.0" + # s.osx.deployment_target = "10.7" + # s.watchos.deployment_target = "2.0" + # s.tvos.deployment_target = "9.0" + + + s.source = { :git => "https://github.com/nlohmann/json.git", :tag => "v#{s.version}" } + + s.source_files = "single_include/**/*.hpp" + s.public_header_files = "single_include/nlohmann/json.hpp" +end