Skip to content

Commit

Permalink
settings update for swift3 and cocoapods
Browse files Browse the repository at this point in the history
  • Loading branch information
evermeer committed Oct 19, 2016
1 parent e32ffee commit ec38717
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions .swift-version
@@ -0,0 +1 @@
3.0
2 changes: 1 addition & 1 deletion .travis.yml
@@ -1,6 +1,6 @@
language: objective-c
podfile: Podfile
osx_image: xcode7.3
osx_image: xcode8

before_install:
- gem install cocoapods
Expand Down
4 changes: 4 additions & 0 deletions AlamofireXmlToObjects.xcodeproj/project.pbxproj
Expand Up @@ -13,6 +13,7 @@
7F64D0FE1CBD7F8A00AAB0B2 /* AlamofireXmlToObjects2Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F64D0FC1CBD7BF100AAB0B2 /* AlamofireXmlToObjects2Tests.swift */; };
7F7ED5151D8134BE00DB0BC2 /* Issue6Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F7ED5141D8134BE00DB0BC2 /* Issue6Test.swift */; };
7F7ED5171D81355400DB0BC2 /* Issue6_xml in Resources */ = {isa = PBXBuildFile; fileRef = 7F7ED5161D81355400DB0BC2 /* Issue6_xml */; };
7FAF28AF1DB7B60E008EB612 /* .swift-version in Resources */ = {isa = PBXBuildFile; fileRef = 7FAF28AE1DB7B60E008EB612 /* .swift-version */; };
7FB7B6A51D53694000DBCAB8 /* Issue4_xml in Resources */ = {isa = PBXBuildFile; fileRef = 7FB7B6A41D53694000DBCAB8 /* Issue4_xml */; };
7FB7B6A71D53696000DBCAB8 /* Issue4Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FB7B6A61D53696000DBCAB8 /* Issue4Test.swift */; };
7FC3AEB71BC964B400221BFB /* AlamofireXmlToObjects.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FC3AEB61BC964B400221BFB /* AlamofireXmlToObjects.swift */; };
Expand Down Expand Up @@ -45,6 +46,7 @@
7F64D0FC1CBD7BF100AAB0B2 /* AlamofireXmlToObjects2Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlamofireXmlToObjects2Tests.swift; sourceTree = "<group>"; };
7F7ED5141D8134BE00DB0BC2 /* Issue6Test.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Issue6Test.swift; sourceTree = "<group>"; };
7F7ED5161D81355400DB0BC2 /* Issue6_xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Issue6_xml; sourceTree = "<group>"; };
7FAF28AE1DB7B60E008EB612 /* .swift-version */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ".swift-version"; sourceTree = "<group>"; };
7FB7B6A41D53694000DBCAB8 /* Issue4_xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Issue4_xml; sourceTree = "<group>"; };
7FB7B6A61D53696000DBCAB8 /* Issue4Test.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Issue4Test.swift; sourceTree = "<group>"; };
7FC3AEB61BC964B400221BFB /* AlamofireXmlToObjects.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlamofireXmlToObjects.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -80,6 +82,7 @@
7F193CF61B36E628000C1C34 = {
isa = PBXGroup;
children = (
7FAF28AE1DB7B60E008EB612 /* .swift-version */,
7F4A36F71BDCD67100A0F73F /* .gitignore */,
7F4A36F81BDCD67100A0F73F /* .travis.yml */,
7F193D271B371199000C1C34 /* LICENSE */,
Expand Down Expand Up @@ -258,6 +261,7 @@
7F7ED5171D81355400DB0BC2 /* Issue6_xml in Resources */,
7FC3AECB1BC964BF00221BFB /* sample_xml in Resources */,
7F41B6341D041A68009D083B /* sample3_xml in Resources */,
7FAF28AF1DB7B60E008EB612 /* .swift-version in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
12 changes: 6 additions & 6 deletions README.md
Expand Up @@ -10,7 +10,7 @@
[![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/matteocrippa/awesome-swift#json)

[![Version](https://img.shields.io/cocoapods/v/AlamofireXmlToObjects.svg?style=flat)](http://cocoadocs.org/docsets/AlamofireXmlToObjects)
[![Language](https://img.shields.io/badge/language-swift2-f48041.svg?style=flat)](https://developer.apple.com/swift)
[![Language](https://img.shields.io/badge/language-swift3-f48041.svg?style=flat)](https://developer.apple.com/swift)
[![Platform](https://img.shields.io/cocoapods/p/AlamofireXmlToObjects.svg?style=flat)](http://cocoadocs.org/docsets/AlamofireXmlToObjects)
[![Support](https://img.shields.io/badge/support-iOS%208%2B%20|%20OSX%2010.9+%20-blue.svg?style=flat)](https://www.apple.com/nl/ios/)
[![License](https://img.shields.io/cocoapods/l/AlamofireXmlToObjects.svg?style=flat)](http://cocoadocs.org/docsets/AlamofireXmlToObjects)
Expand All @@ -32,12 +32,12 @@ AlamofireXmlToObjects is based on the folowing libraries:

If you have a JSON service and want the same functionality then have a look at [AlamofireJsonToObjects](https://github.com/evermeer/AlamofireJsonToObjects).

At this moment the master branch is for Swift3. If you want to continue using Swift 2.2 (or 2.3) then switch to the Swift2.2 branch.
Run the tests to see AlamofireXmlToObjects in action.

## Using AlamofireXmlToObjects in your own App

'AlamofireXmlToObjects' is available through the dependency manager [CocoaPods](http://cocoapods.org).
You do have to use cocoapods version 0.36 or later

You can just add AlamofireXmlToObjects to your workspace by adding the folowing 2 lines to your Podfile:

Expand All @@ -46,15 +46,12 @@ use_frameworks!
pod "AlamofireXmlToObjects"
```

Version 0.36 of cocoapods will make a dynamic framework of all the pods that you use. Because of that it's only supported in iOS 8.0 or later. When using a framework, you also have to add an import at the top of your swift file like this:
You also have to add an import at the top of your swift file like this:

```
import AlamofireXmlToObjects
```

If you want support for older versions than iOS 8.0, then you can also just copy the AlamofireXmlToObjects.swift to your project. (Also see the instructions for embedding the EVReflection, XMLDictionary and Alamofire libraries)


## Sample code

```
Expand Down Expand Up @@ -108,6 +105,9 @@ The code above will parse the folowing XML into the objects:
</wheather>
```

## Advanced object mapping
AlamofireJsonToObjects is based on [EVReflection](https://github.com/evermeer/EVReflection) and you can use all [EVReflection](https://github.com/evermeer/EVReflection) features like property mapping, converters, validators and key kleanup. See [EVReflection](https://github.com/evermeer/EVReflection) for more information.

## License

AlamofireXmlToObjects is available under the MIT 3 license. See the LICENSE file for more info.
Expand Down

0 comments on commit ec38717

Please sign in to comment.