-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* travis * xcode_sdk * README
- Loading branch information
Showing
10 changed files
with
2,242 additions
and
1 deletion.
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,5 @@ | ||
language: swift | ||
osx_image: xcode9.2 | ||
xcode_project: XMLDecoder.xcodeproj | ||
xcode_scheme: XMLDecoder | ||
xcode_sdk: iphonesimulator |
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 |
---|---|---|
@@ -1,2 +1,40 @@ | ||
# XMLDecoder | ||
XMLDecoder for Swift | ||
|
||
[![Build Status](https://travis-ci.org/uny/XMLDecoder.svg?branch=feature%2Ffirst)](https://travis-ci.org/uny/XMLDecoder) | ||
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) | ||
|
||
XMLDecoder for Swift. | ||
|
||
## Requirements | ||
|
||
- iOS 8.0+ | ||
- Xcode 9.0+ | ||
- Swift 4.0+ | ||
|
||
## Installation | ||
|
||
### Carthage | ||
|
||
To integrate XMLDecoder into your Xcode project using Carthage, specify it in your `Cartfile`: | ||
``` | ||
github "uny/XMLDecoder" | ||
``` | ||
|
||
## Usage | ||
You can use XMLDecoder like JSONDecoder: | ||
```swift | ||
struct Object { | ||
let string: String | ||
let int: Int | ||
} | ||
|
||
let data = "<root><string>string</string><int>100</int></root>".data(using: .utf8)! | ||
let decoder = XMLDecoder() | ||
do { | ||
let object = try decoder.decode(Object.self, from: data) | ||
print(object) | ||
} catch let error { | ||
// ... | ||
} | ||
``` | ||
XMLDecoder currently does not support attributes. |
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,24 @@ | ||
<?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>$(DEVELOPMENT_LANGUAGE)</string> | ||
<key>CFBundleExecutable</key> | ||
<string>$(EXECUTABLE_NAME)</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>CFBundleVersion</key> | ||
<string>$(CURRENT_PROJECT_VERSION)</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,18 @@ | ||
// | ||
// XMLDecoder.h | ||
// XMLDecoder | ||
// | ||
// Created by Yuki Nagai on 2017/12/17. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
//! Project version number for XMLDecoder. | ||
FOUNDATION_EXPORT double XMLDecoderVersionNumber; | ||
|
||
//! Project version string for XMLDecoder. | ||
FOUNDATION_EXPORT const unsigned char XMLDecoderVersionString[]; | ||
|
||
// In this header, you should import all the public headers of your framework using statements like #import <XMLDecoder/PublicHeader.h> | ||
|
||
|
Oops, something went wrong.