This repository has been archived by the owner on Jul 5, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 26c92cc
Showing
1,216 changed files
with
272,374 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/Library/* linguist-vendored=true | ||
/PacketProcessor/tun2socks-iOS/* linguist-vendored=true | ||
/Carthage/* linguist-vendored=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
.DS_Store | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
.idea/ | ||
|
||
|
||
# iOS | ||
# Xcode | ||
# | ||
build/ | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
xcuserdata | ||
*.xccheckout | ||
*.moved-aside | ||
DerivedData | ||
*.hmap | ||
*.ipa | ||
*.xcuserstate | ||
|
||
# CocoaPods | ||
# | ||
# We recommend against adding the Pods directory to your .gitignore. However | ||
# you should judge for yourself, the pros and cons are mentioned at: | ||
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control | ||
# | ||
Pods/ | ||
Podfile.lock | ||
|
||
# Carthage | ||
Carthage/Build | ||
|
||
# fastlane | ||
fastlane | ||
|
||
Gemfile.lock | ||
|
||
Confidential/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "Library/ShadowPath/ShadowPath/shadowsocks-libev"] | ||
path = Library/ShadowPath/ShadowPath/shadowsocks-libev | ||
url = [email protected]:icodesign/shadowsocks-libev.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
github "mirek/YAML.framework" "master" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
github "mirek/YAML.framework" "c099c4b9756d116f5fb08bc588d49a43a6c6176c" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.DS_Store | ||
build | ||
*.mode1v3 | ||
*.pbxuser | ||
xcuserdata | ||
test/yaml/bigboy.yaml |
2 changes: 2 additions & 0 deletions
2
Carthage/Checkouts/YAML.framework/English.lproj/InfoPlist.strings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/* Localized versions of Info.plist keys */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>English</string> | ||
<key>CFBundleExecutable</key> | ||
<string>${EXECUTABLE_NAME}</string> | ||
<key>CFBundleIconFile</key> | ||
<string></string> | ||
<key>CFBundleIdentifier</key> | ||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>${PRODUCT_NAME}</string> | ||
<key>CFBundlePackageType</key> | ||
<string>FMWK</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
<key>CFBundleVersion</key> | ||
<string>1</string> | ||
<key>NSPrincipalClass</key> | ||
<string></string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
# YAML.framework for Objective-C | ||
|
||
Based on C `LibYAML` library (`http://pyyaml.org/wiki/LibYAML`) by Kirill Simonov. | ||
|
||
`YAML.framework` provides support for YAML (de/)serialisation similarly to standard `NSPropertyListSerialization`. | ||
|
||
It's fast and compatible with iOS. | ||
|
||
## Example usage | ||
|
||
```objc | ||
NSInputStream *stream = [[NSInputStream alloc] initWithFileAtPath: @"yaml/items.yaml"]; | ||
// or [[NSInputStream alloc] initWithURL: ...] | ||
|
||
// You can use objectsWithYAMLStream:options:error instead to get all YAML documents. | ||
// | ||
// Alternativelly object(s)WithYAMLData:options:error or object(s)WithYAMLString:options:error. | ||
id yaml = [YAMLSerialization objectWithYAMLStream: stream | ||
options: kYAMLReadOptionStringScalars | ||
error: nil]; | ||
|
||
// Dump Objective-C object description. | ||
printf("%s", [[yaml description] UTF8String]); | ||
``` | ||
For input YAML file: | ||
```yaml | ||
items: | ||
- name: Foo | ||
- name: Bar | ||
``` | ||
|
||
Should print dump string similar to: | ||
|
||
``` | ||
( | ||
{ | ||
items = ( | ||
{ | ||
name = Foo; | ||
}, | ||
{ | ||
name = Bar; | ||
} | ||
); | ||
} | ||
) | ||
``` | ||
|
||
## API | ||
|
||
The following class methods are defined on `YAMLSerialization` class. | ||
|
||
### Reading YAML | ||
|
||
```objc | ||
// Returns all document objects from parsed YAML stream. | ||
+ (NSMutableArray *) objectsWithYAMLStream: (NSInputStream *) stream | ||
options: (YAMLReadOptions) opt | ||
error: (NSError **) error; | ||
|
||
// Returns all document objects from parsed YAML data. | ||
+ (NSMutableArray *) objectsWithYAMLData: (NSData *) data | ||
options: (YAMLReadOptions) opt | ||
error: (NSError **) error; | ||
|
||
// Returns all document objects from parsed YAML string. | ||
+ (NSMutableArray *) objectsWithYAMLString: (NSString *) string | ||
options: (YAMLReadOptions) opt | ||
error: (NSError **) error; | ||
|
||
// Returns first object from parsed YAML stream. | ||
+ (id) objectWithYAMLStream: (NSInputStream *) stream | ||
options: (YAMLReadOptions) opt | ||
error: (NSError **) error; | ||
|
||
// Returns first object from parsed YAML data. | ||
+ (id) objectWithYAMLData: (NSData *) data | ||
options: (YAMLReadOptions) opt | ||
error: (NSError **) error; | ||
|
||
// Returns first object from parsed YAML string. | ||
+ (id) objectWithYAMLString: (NSString *) string | ||
options: (YAMLReadOptions) opt | ||
error: (NSError **) error; | ||
``` | ||
|
||
### Writing YAML | ||
|
||
```objc | ||
// Returns YES on success, NO otherwise. | ||
+ (BOOL) writeObject: (id) object | ||
toYAMLStream: (NSOutputStream *) stream | ||
options: (YAMLWriteOptions) opt | ||
error: (NSError **) error; | ||
|
||
// Caller is responsible for releasing returned object. | ||
+ (NSData *) createYAMLDataWithObject: (id) object | ||
options: (YAMLWriteOptions) opt | ||
error: (NSError **) error NS_RETURNS_RETAINED; | ||
|
||
// Returns autoreleased object. | ||
+ (NSData *) YAMLDataWithObject: (id) object | ||
options: (YAMLWriteOptions) opt | ||
error: (NSError **) error; | ||
|
||
// Caller is responsible for releasing returned object. | ||
+ (NSString *) createYAMLStringWithObject: (id) object | ||
options: (YAMLWriteOptions) opt | ||
error: (NSError **) error NS_RETURNS_RETAINED; | ||
|
||
// Returns autoreleased object. | ||
+ (NSString *) YAMLStringWithObject: (id) object | ||
options: (YAMLWriteOptions) opt | ||
error: (NSError **) error; | ||
``` | ||
|
||
## License | ||
|
||
`YAML.framework` is released under the MIT license. | ||
|
||
Copyright (c) 2010 Mirek Rusin (YAML.framework) | ||
2006 Kirill Simonov (LibYAML) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | ||
of the Software, and to permit persons to whom the Software is furnished to do | ||
so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>English</string> | ||
<key>CFBundleExecutable</key> | ||
<string>${EXECUTABLE_NAME}</string> | ||
<key>CFBundleIconFile</key> | ||
<string></string> | ||
<key>CFBundleIdentifier</key> | ||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>${PRODUCT_NAME}</string> | ||
<key>CFBundlePackageType</key> | ||
<string>FMWK</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
<key>CFBundleVersion</key> | ||
<string>1</string> | ||
<key>NSPrincipalClass</key> | ||
<string></string> | ||
</dict> | ||
</plist> |
Oops, something went wrong.