├── .gitignore ├── Cartfile ├── Cartfile.resolved ├── Carthage └── Checkouts │ └── AEXML │ ├── .gitignore │ ├── AEXML.podspec │ ├── AEXML.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ ├── AEXML OSX.xcscheme │ │ ├── AEXML iOS.xcscheme │ │ ├── AEXML tvOS.xcscheme │ │ └── AEXML watchOS.xcscheme │ ├── CHANGELOG.md │ ├── Example │ ├── AEXMLDemo.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── AEXMLDemo.xcscheme │ ├── AEXMLDemo │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── ViewController.swift │ └── Resources │ │ ├── example.xml │ │ └── plant_catalog.xml │ ├── LICENSE │ ├── Package.swift │ ├── README.md │ ├── Sources │ ├── AEXML.h │ ├── Document.swift │ ├── Element.swift │ ├── Error.swift │ ├── Info.plist │ ├── Options.swift │ └── Parser.swift │ └── Tests │ ├── AEXMLTests │ └── AEXMLTests.swift │ └── Info.plist ├── Deamon.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── pawelkowalczuk.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── pawelkowalczuk.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── Deamon.xcscheme │ └── xcschememanagement.plist ├── Deamon ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ └── swift_icon.imageset │ │ ├── Contents.json │ │ └── swift_icon.pdf ├── Base.lproj │ └── Main.storyboard ├── Coordinators │ ├── DragAndDropCoordinator.swift │ └── WindowCoordinator.swift ├── DeamonWindow.swift ├── Info.plist ├── Mappers │ └── MobileMap.swift ├── Parsers │ └── Parser.swift ├── ReceiverView.swift ├── TestFiles │ ├── AllInOne.xib │ ├── Cell.xib │ ├── Segmented.xib │ └── View.xib ├── ViewController.swift └── ViewModel │ └── ReceiverViewModel.swift ├── LICENSE ├── README.md ├── XibDeamon └── Deamon.app │ └── Contents │ ├── Frameworks │ ├── AEXML.framework │ │ ├── AEXML │ │ ├── Resources │ │ └── Versions │ │ │ ├── A │ │ │ ├── AEXML │ │ │ ├── Resources │ │ │ │ └── Info.plist │ │ │ └── _CodeSignature │ │ │ │ └── CodeResources │ │ │ └── Current │ ├── libswiftAppKit.dylib │ ├── libswiftCore.dylib │ ├── libswiftCoreData.dylib │ ├── libswiftCoreGraphics.dylib │ ├── libswiftCoreImage.dylib │ ├── libswiftDarwin.dylib │ ├── libswiftDispatch.dylib │ ├── libswiftFoundation.dylib │ ├── libswiftIOKit.dylib │ ├── libswiftObjectiveC.dylib │ ├── libswiftQuartzCore.dylib │ └── libswiftXPC.dylib │ ├── Info.plist │ ├── MacOS │ └── Deamon │ ├── PkgInfo │ ├── Resources │ ├── Assets.car │ └── Base.lproj │ │ └── Main.storyboardc │ │ ├── Info.plist │ │ ├── MainMenu.nib │ │ ├── NSWindowController-B8D-0N-5wS.nib │ │ └── XfG-lQ-9wD-view-m2S-Jp-Qdl.nib │ └── _CodeSignature │ └── CodeResources └── images └── XibDeamon.gif /.gitignore: -------------------------------------------------------------------------------- 1 | ## Build generated 2 | build/ 3 | DerivedData/ 4 | 5 | ## Various settings 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | 16 | ## Other 17 | *.moved-aside 18 | *.xccheckout 19 | *.xcscmblueprint 20 | 21 | ### Xcode Patch ### 22 | *.xcodeproj/* 23 | !*.xcodeproj/project.pbxproj 24 | !*.xcodeproj/xcshareddata/ 25 | !*.xcworkspace/contents.xcworkspacedata 26 | -------------------------------------------------------------------------------- /Cartfile: -------------------------------------------------------------------------------- 1 | github "tadija/AEXML" 2 | -------------------------------------------------------------------------------- /Cartfile.resolved: -------------------------------------------------------------------------------- 1 | github "tadija/AEXML" "4.1.0" 2 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | 3 | ## Hidden 4 | 5 | *.DS_Store 6 | .AppleDouble 7 | .LSOverride 8 | 9 | ## Thumbnails 10 | ._* 11 | 12 | ## Files that might appear in the root of a volume 13 | .DocumentRevisions-V100 14 | .fseventsd 15 | .Spotlight-V100 16 | .TemporaryItems 17 | .Trashes 18 | .VolumeIcon.icns 19 | .com.apple.timemachine.donotpresent 20 | 21 | ## Directories potentially created on remote AFP share 22 | .AppleDB 23 | .AppleDesktop 24 | Network Trash Folder 25 | Temporary Items 26 | .apdisk 27 | 28 | # Xcode 29 | 30 | ## Build generated 31 | build/ 32 | DerivedData/ 33 | 34 | ## Various settings 35 | *.pbxuser 36 | !default.pbxuser 37 | *.mode1v3 38 | !default.mode1v3 39 | *.mode2v3 40 | !default.mode2v3 41 | *.perspectivev3 42 | !default.perspectivev3 43 | xcuserdata/ 44 | 45 | ## Other 46 | *.moved-aside 47 | *.xccheckout 48 | *.xcscmblueprint 49 | *.xcuserstate 50 | 51 | ## Objective-C / Swift 52 | 53 | ## Specific 54 | 55 | *.hmap 56 | *.ipa 57 | *.dSYM.zip 58 | *.dSYM 59 | 60 | ## Playgrounds 61 | timeline.xctimeline 62 | playground.xcworkspace 63 | 64 | # Swift Package Manager 65 | # 66 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 67 | # Packages/ 68 | .build/ 69 | 70 | # CocoaPods 71 | # 72 | # We recommend against adding the Pods directory to your .gitignore. However 73 | # you should judge for yourself, the pros and cons are mentioned at: 74 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 75 | # 76 | Pods/ 77 | 78 | # Carthage 79 | # 80 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 81 | Carthage/Checkouts 82 | Carthage/Build 83 | 84 | # fastlane 85 | # 86 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 87 | # screenshots whenever they are needed. 88 | # For more information about the recommended setup visit: 89 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 90 | 91 | fastlane/report.xml 92 | fastlane/Preview.html 93 | fastlane/screenshots 94 | fastlane/test_output -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/AEXML.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | 3 | s.name = 'AEXML' 4 | s.version = '4.1.0' 5 | s.license = { :type => 'MIT', :file => 'LICENSE' } 6 | s.summary = 'Simple and lightweight XML parser written in Swift' 7 | 8 | s.homepage = 'https://github.com/tadija/AEXML' 9 | s.author = { 'tadija' => 'tadija@me.com' } 10 | s.social_media_url = 'http://twitter.com/tadija' 11 | 12 | s.source = { :git => 'https://github.com/tadija/AEXML.git', :tag => s.version } 13 | s.source_files = 'Sources/*.swift' 14 | 15 | s.pod_target_xcconfig = { 'SWIFT_VERSION' => '3.0' } 16 | 17 | s.ios.deployment_target = '8.0' 18 | s.osx.deployment_target = '10.9' 19 | s.tvos.deployment_target = '9.0' 20 | s.watchos.deployment_target = '2.0' 21 | 22 | end 23 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/AEXML.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/AEXML.xcodeproj/xcshareddata/xcschemes/AEXML OSX.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 45 | 46 | 48 | 54 | 55 | 56 | 57 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 79 | 80 | 86 | 87 | 88 | 89 | 90 | 91 | 97 | 98 | 104 | 105 | 106 | 107 | 109 | 110 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/AEXML.xcodeproj/xcshareddata/xcschemes/AEXML iOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 45 | 46 | 48 | 54 | 55 | 56 | 57 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 79 | 80 | 86 | 87 | 88 | 89 | 90 | 91 | 97 | 98 | 104 | 105 | 106 | 107 | 109 | 110 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/AEXML.xcodeproj/xcshareddata/xcschemes/AEXML tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 45 | 46 | 48 | 54 | 55 | 56 | 57 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 79 | 80 | 86 | 87 | 88 | 89 | 90 | 91 | 97 | 98 | 104 | 105 | 106 | 107 | 109 | 110 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/AEXML.xcodeproj/xcshareddata/xcschemes/AEXML watchOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 35 | 36 | 46 | 47 | 53 | 54 | 55 | 56 | 57 | 58 | 64 | 65 | 71 | 72 | 73 | 74 | 76 | 77 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## Version 4.1.0 4 | 5 | - Convenience typed accessors are now optional instead of having default values 6 | - Minor bug fixes, improvements and refactoring: 7 | - Merged: PR#104, PR#108 8 | - Fixed: #105, #106 9 | 10 | ## Version 4.0.2 11 | 12 | - Merged few PRs & other minor fixes 13 | 14 | ## Version 4.0.1 15 | 16 | - Fixed minor issue with Xcode 17 | 18 | ## Version 4.0.0 19 | 20 | - Code updated for Swift 3.0 21 | - Sources reorganized from single to multiple files 22 | - Changed method and property names to fit better ("swiftyfying") 23 | - Fixed all build warnings and errors in Xcode 8.0 GM (8A218a) 24 | - Merged some PRs & fixed some reported issues 25 | 26 | ## Version 3.0.0 27 | 28 | - Fixed deprecation warnings in Xcode 7.3 (7D175) 29 | - Improved error handling logic (now returns empty element with `error` property) 30 | - Replaced `escapedStringValue` property with `xmlEscaped` property (String extension) 31 | - Added escaping of attribute values 32 | - Added `xmlStringCompact` property 33 | - Added support for Swift Package Manager 34 | - Added ability to create and configure `NSXMLParserOptions` from another package 35 | - Removed inheritance from NSObject (in AEXMLElement) 36 | - Created separate example project (AEXMLDemo) 37 | - Fixed several reported issues 38 | - Documentation improvements 39 | 40 | ## Version 2.1.0 41 | 42 | - Fixed deprecation warnings in Xcode 7.3 Beta (Swift 2.2) 43 | - Added possibility to configure options for NSXMLParser 44 | - Added Changelog :) 45 | 46 | ## Version 2.0.1 47 | 48 | - Added support for Carthage 49 | - Added support for watchOS and tvOS 50 | 51 | ## Version 2.0.0 52 | 53 | - API changes 54 | - Fixed build errors and warnings in Xcode 7.0 55 | - Bumped deployment target to iOS 8.0 56 | - Added error throwing instead of NSError & nil 57 | - Added support for OSX 58 | 59 | ## Version 1.3.1 60 | 61 | - Moved documentation from README.md to code 62 | 63 | ## Version 1.3.0 64 | 65 | - Fixed memory leak 66 | - Added option to remove element from parent 67 | - Some more unit tests 68 | 69 | ## Version 1.2.1 70 | 71 | - Released to CocoaPods 72 | 73 | ## Version 0.0.1 74 | 75 | - Initial version 76 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/Example/AEXMLDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8B8C73261CD80B6800A4E197 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B8C73251CD80B6800A4E197 /* AppDelegate.swift */; }; 11 | 8B8C73281CD80B6800A4E197 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B8C73271CD80B6800A4E197 /* ViewController.swift */; }; 12 | 8B8C732B1CD80B6800A4E197 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8B8C73291CD80B6800A4E197 /* Main.storyboard */; }; 13 | 8B8C732D1CD80B6800A4E197 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8B8C732C1CD80B6800A4E197 /* Assets.xcassets */; }; 14 | 8B8C73301CD80B6800A4E197 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8B8C732E1CD80B6800A4E197 /* LaunchScreen.storyboard */; }; 15 | 8B8C73501CD80D4D00A4E197 /* AEXML.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B8C73431CD80D4100A4E197 /* AEXML.framework */; }; 16 | 8B8C73511CD80D4D00A4E197 /* AEXML.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8B8C73431CD80D4100A4E197 /* AEXML.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 17 | 8B8C73661CD8101100A4E197 /* example.xml in Resources */ = {isa = PBXBuildFile; fileRef = 8B8C73641CD8101100A4E197 /* example.xml */; }; 18 | 8B8C73671CD8101100A4E197 /* plant_catalog.xml in Resources */ = {isa = PBXBuildFile; fileRef = 8B8C73651CD8101100A4E197 /* plant_catalog.xml */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | 8B8C73421CD80D4100A4E197 /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = 8B8C73381CD80D4100A4E197 /* AEXML.xcodeproj */; 25 | proxyType = 2; 26 | remoteGlobalIDString = 8B4A92791BDD47210011F36F; 27 | remoteInfo = "AEXML iOS"; 28 | }; 29 | 8B8C73441CD80D4100A4E197 /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = 8B8C73381CD80D4100A4E197 /* AEXML.xcodeproj */; 32 | proxyType = 2; 33 | remoteGlobalIDString = 8B4A92DF1BDD5D330011F36F; 34 | remoteInfo = "AEXML watchOS"; 35 | }; 36 | 8B8C73461CD80D4100A4E197 /* PBXContainerItemProxy */ = { 37 | isa = PBXContainerItemProxy; 38 | containerPortal = 8B8C73381CD80D4100A4E197 /* AEXML.xcodeproj */; 39 | proxyType = 2; 40 | remoteGlobalIDString = 8B4A92991BDD4CEF0011F36F; 41 | remoteInfo = "AEXML iOS Tests"; 42 | }; 43 | 8B8C73481CD80D4100A4E197 /* PBXContainerItemProxy */ = { 44 | isa = PBXContainerItemProxy; 45 | containerPortal = 8B8C73381CD80D4100A4E197 /* AEXML.xcodeproj */; 46 | proxyType = 2; 47 | remoteGlobalIDString = 8B4A92BE1BDD5B300011F36F; 48 | remoteInfo = "AEXML tvOS"; 49 | }; 50 | 8B8C734A1CD80D4100A4E197 /* PBXContainerItemProxy */ = { 51 | isa = PBXContainerItemProxy; 52 | containerPortal = 8B8C73381CD80D4100A4E197 /* AEXML.xcodeproj */; 53 | proxyType = 2; 54 | remoteGlobalIDString = 8B4A92CC1BDD5BB20011F36F; 55 | remoteInfo = "AEXML tvOS Tests"; 56 | }; 57 | 8B8C734C1CD80D4100A4E197 /* PBXContainerItemProxy */ = { 58 | isa = PBXContainerItemProxy; 59 | containerPortal = 8B8C73381CD80D4100A4E197 /* AEXML.xcodeproj */; 60 | proxyType = 2; 61 | remoteGlobalIDString = 8B4A928A1BDD49390011F36F; 62 | remoteInfo = "AEXML OSX"; 63 | }; 64 | 8B8C734E1CD80D4100A4E197 /* PBXContainerItemProxy */ = { 65 | isa = PBXContainerItemProxy; 66 | containerPortal = 8B8C73381CD80D4100A4E197 /* AEXML.xcodeproj */; 67 | proxyType = 2; 68 | remoteGlobalIDString = 8B4A92AB1BDD54F50011F36F; 69 | remoteInfo = "AEXML OSX Tests"; 70 | }; 71 | 8B8C73521CD80D4D00A4E197 /* PBXContainerItemProxy */ = { 72 | isa = PBXContainerItemProxy; 73 | containerPortal = 8B8C73381CD80D4100A4E197 /* AEXML.xcodeproj */; 74 | proxyType = 1; 75 | remoteGlobalIDString = 8B4A92781BDD47210011F36F; 76 | remoteInfo = "AEXML iOS"; 77 | }; 78 | /* End PBXContainerItemProxy section */ 79 | 80 | /* Begin PBXCopyFilesBuildPhase section */ 81 | 8B8C73541CD80D4D00A4E197 /* Embed Frameworks */ = { 82 | isa = PBXCopyFilesBuildPhase; 83 | buildActionMask = 2147483647; 84 | dstPath = ""; 85 | dstSubfolderSpec = 10; 86 | files = ( 87 | 8B8C73511CD80D4D00A4E197 /* AEXML.framework in Embed Frameworks */, 88 | ); 89 | name = "Embed Frameworks"; 90 | runOnlyForDeploymentPostprocessing = 0; 91 | }; 92 | /* End PBXCopyFilesBuildPhase section */ 93 | 94 | /* Begin PBXFileReference section */ 95 | 8B8C73221CD80B6800A4E197 /* AEXMLDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AEXMLDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 96 | 8B8C73251CD80B6800A4E197 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 97 | 8B8C73271CD80B6800A4E197 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 98 | 8B8C732A1CD80B6800A4E197 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 99 | 8B8C732C1CD80B6800A4E197 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 100 | 8B8C732F1CD80B6800A4E197 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 101 | 8B8C73311CD80B6800A4E197 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 102 | 8B8C73381CD80D4100A4E197 /* AEXML.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = AEXML.xcodeproj; path = ../AEXML.xcodeproj; sourceTree = ""; }; 103 | 8B8C73641CD8101100A4E197 /* example.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = example.xml; sourceTree = ""; }; 104 | 8B8C73651CD8101100A4E197 /* plant_catalog.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = plant_catalog.xml; sourceTree = ""; }; 105 | /* End PBXFileReference section */ 106 | 107 | /* Begin PBXFrameworksBuildPhase section */ 108 | 8B8C731F1CD80B6800A4E197 /* Frameworks */ = { 109 | isa = PBXFrameworksBuildPhase; 110 | buildActionMask = 2147483647; 111 | files = ( 112 | 8B8C73501CD80D4D00A4E197 /* AEXML.framework in Frameworks */, 113 | ); 114 | runOnlyForDeploymentPostprocessing = 0; 115 | }; 116 | /* End PBXFrameworksBuildPhase section */ 117 | 118 | /* Begin PBXGroup section */ 119 | 8B8C73191CD80B6800A4E197 = { 120 | isa = PBXGroup; 121 | children = ( 122 | 8B8C73241CD80B6800A4E197 /* AEXMLDemo */, 123 | 8B8C73231CD80B6800A4E197 /* Products */, 124 | 8B8C73381CD80D4100A4E197 /* AEXML.xcodeproj */, 125 | ); 126 | sourceTree = ""; 127 | }; 128 | 8B8C73231CD80B6800A4E197 /* Products */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | 8B8C73221CD80B6800A4E197 /* AEXMLDemo.app */, 132 | ); 133 | name = Products; 134 | sourceTree = ""; 135 | }; 136 | 8B8C73241CD80B6800A4E197 /* AEXMLDemo */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 8B8C73251CD80B6800A4E197 /* AppDelegate.swift */, 140 | 8B8C73271CD80B6800A4E197 /* ViewController.swift */, 141 | 8B8C73631CD8101100A4E197 /* Resources */, 142 | 8B8C73551CD80EC100A4E197 /* Supporting Files */, 143 | ); 144 | path = AEXMLDemo; 145 | sourceTree = ""; 146 | }; 147 | 8B8C73391CD80D4100A4E197 /* Products */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | 8B8C73431CD80D4100A4E197 /* AEXML.framework */, 151 | 8B8C73451CD80D4100A4E197 /* AEXML.framework */, 152 | 8B8C73471CD80D4100A4E197 /* AEXML iOS Tests.xctest */, 153 | 8B8C73491CD80D4100A4E197 /* AEXML.framework */, 154 | 8B8C734B1CD80D4100A4E197 /* AEXML tvOS Tests.xctest */, 155 | 8B8C734D1CD80D4100A4E197 /* AEXML.framework */, 156 | 8B8C734F1CD80D4100A4E197 /* AEXML OSX Tests.xctest */, 157 | ); 158 | name = Products; 159 | sourceTree = ""; 160 | }; 161 | 8B8C73551CD80EC100A4E197 /* Supporting Files */ = { 162 | isa = PBXGroup; 163 | children = ( 164 | 8B8C73291CD80B6800A4E197 /* Main.storyboard */, 165 | 8B8C732C1CD80B6800A4E197 /* Assets.xcassets */, 166 | 8B8C732E1CD80B6800A4E197 /* LaunchScreen.storyboard */, 167 | 8B8C73311CD80B6800A4E197 /* Info.plist */, 168 | ); 169 | name = "Supporting Files"; 170 | sourceTree = ""; 171 | }; 172 | 8B8C73631CD8101100A4E197 /* Resources */ = { 173 | isa = PBXGroup; 174 | children = ( 175 | 8B8C73641CD8101100A4E197 /* example.xml */, 176 | 8B8C73651CD8101100A4E197 /* plant_catalog.xml */, 177 | ); 178 | path = Resources; 179 | sourceTree = SOURCE_ROOT; 180 | }; 181 | /* End PBXGroup section */ 182 | 183 | /* Begin PBXNativeTarget section */ 184 | 8B8C73211CD80B6800A4E197 /* AEXMLDemo */ = { 185 | isa = PBXNativeTarget; 186 | buildConfigurationList = 8B8C73341CD80B6800A4E197 /* Build configuration list for PBXNativeTarget "AEXMLDemo" */; 187 | buildPhases = ( 188 | 8B8C731E1CD80B6800A4E197 /* Sources */, 189 | 8B8C731F1CD80B6800A4E197 /* Frameworks */, 190 | 8B8C73201CD80B6800A4E197 /* Resources */, 191 | 8B8C73541CD80D4D00A4E197 /* Embed Frameworks */, 192 | ); 193 | buildRules = ( 194 | ); 195 | dependencies = ( 196 | 8B8C73531CD80D4D00A4E197 /* PBXTargetDependency */, 197 | ); 198 | name = AEXMLDemo; 199 | productName = AEXMLDemo; 200 | productReference = 8B8C73221CD80B6800A4E197 /* AEXMLDemo.app */; 201 | productType = "com.apple.product-type.application"; 202 | }; 203 | /* End PBXNativeTarget section */ 204 | 205 | /* Begin PBXProject section */ 206 | 8B8C731A1CD80B6800A4E197 /* Project object */ = { 207 | isa = PBXProject; 208 | attributes = { 209 | LastSwiftUpdateCheck = 0730; 210 | LastUpgradeCheck = 0800; 211 | ORGANIZATIONNAME = AE; 212 | TargetAttributes = { 213 | 8B8C73211CD80B6800A4E197 = { 214 | CreatedOnToolsVersion = 7.3; 215 | LastSwiftMigration = 0800; 216 | }; 217 | }; 218 | }; 219 | buildConfigurationList = 8B8C731D1CD80B6800A4E197 /* Build configuration list for PBXProject "AEXMLDemo" */; 220 | compatibilityVersion = "Xcode 3.2"; 221 | developmentRegion = English; 222 | hasScannedForEncodings = 0; 223 | knownRegions = ( 224 | en, 225 | Base, 226 | ); 227 | mainGroup = 8B8C73191CD80B6800A4E197; 228 | productRefGroup = 8B8C73231CD80B6800A4E197 /* Products */; 229 | projectDirPath = ""; 230 | projectReferences = ( 231 | { 232 | ProductGroup = 8B8C73391CD80D4100A4E197 /* Products */; 233 | ProjectRef = 8B8C73381CD80D4100A4E197 /* AEXML.xcodeproj */; 234 | }, 235 | ); 236 | projectRoot = ""; 237 | targets = ( 238 | 8B8C73211CD80B6800A4E197 /* AEXMLDemo */, 239 | ); 240 | }; 241 | /* End PBXProject section */ 242 | 243 | /* Begin PBXReferenceProxy section */ 244 | 8B8C73431CD80D4100A4E197 /* AEXML.framework */ = { 245 | isa = PBXReferenceProxy; 246 | fileType = wrapper.framework; 247 | path = AEXML.framework; 248 | remoteRef = 8B8C73421CD80D4100A4E197 /* PBXContainerItemProxy */; 249 | sourceTree = BUILT_PRODUCTS_DIR; 250 | }; 251 | 8B8C73451CD80D4100A4E197 /* AEXML.framework */ = { 252 | isa = PBXReferenceProxy; 253 | fileType = wrapper.framework; 254 | path = AEXML.framework; 255 | remoteRef = 8B8C73441CD80D4100A4E197 /* PBXContainerItemProxy */; 256 | sourceTree = BUILT_PRODUCTS_DIR; 257 | }; 258 | 8B8C73471CD80D4100A4E197 /* AEXML iOS Tests.xctest */ = { 259 | isa = PBXReferenceProxy; 260 | fileType = wrapper.cfbundle; 261 | path = "AEXML iOS Tests.xctest"; 262 | remoteRef = 8B8C73461CD80D4100A4E197 /* PBXContainerItemProxy */; 263 | sourceTree = BUILT_PRODUCTS_DIR; 264 | }; 265 | 8B8C73491CD80D4100A4E197 /* AEXML.framework */ = { 266 | isa = PBXReferenceProxy; 267 | fileType = wrapper.framework; 268 | path = AEXML.framework; 269 | remoteRef = 8B8C73481CD80D4100A4E197 /* PBXContainerItemProxy */; 270 | sourceTree = BUILT_PRODUCTS_DIR; 271 | }; 272 | 8B8C734B1CD80D4100A4E197 /* AEXML tvOS Tests.xctest */ = { 273 | isa = PBXReferenceProxy; 274 | fileType = wrapper.cfbundle; 275 | path = "AEXML tvOS Tests.xctest"; 276 | remoteRef = 8B8C734A1CD80D4100A4E197 /* PBXContainerItemProxy */; 277 | sourceTree = BUILT_PRODUCTS_DIR; 278 | }; 279 | 8B8C734D1CD80D4100A4E197 /* AEXML.framework */ = { 280 | isa = PBXReferenceProxy; 281 | fileType = wrapper.framework; 282 | path = AEXML.framework; 283 | remoteRef = 8B8C734C1CD80D4100A4E197 /* PBXContainerItemProxy */; 284 | sourceTree = BUILT_PRODUCTS_DIR; 285 | }; 286 | 8B8C734F1CD80D4100A4E197 /* AEXML OSX Tests.xctest */ = { 287 | isa = PBXReferenceProxy; 288 | fileType = wrapper.cfbundle; 289 | path = "AEXML OSX Tests.xctest"; 290 | remoteRef = 8B8C734E1CD80D4100A4E197 /* PBXContainerItemProxy */; 291 | sourceTree = BUILT_PRODUCTS_DIR; 292 | }; 293 | /* End PBXReferenceProxy section */ 294 | 295 | /* Begin PBXResourcesBuildPhase section */ 296 | 8B8C73201CD80B6800A4E197 /* Resources */ = { 297 | isa = PBXResourcesBuildPhase; 298 | buildActionMask = 2147483647; 299 | files = ( 300 | 8B8C73301CD80B6800A4E197 /* LaunchScreen.storyboard in Resources */, 301 | 8B8C732D1CD80B6800A4E197 /* Assets.xcassets in Resources */, 302 | 8B8C73671CD8101100A4E197 /* plant_catalog.xml in Resources */, 303 | 8B8C73661CD8101100A4E197 /* example.xml in Resources */, 304 | 8B8C732B1CD80B6800A4E197 /* Main.storyboard in Resources */, 305 | ); 306 | runOnlyForDeploymentPostprocessing = 0; 307 | }; 308 | /* End PBXResourcesBuildPhase section */ 309 | 310 | /* Begin PBXSourcesBuildPhase section */ 311 | 8B8C731E1CD80B6800A4E197 /* Sources */ = { 312 | isa = PBXSourcesBuildPhase; 313 | buildActionMask = 2147483647; 314 | files = ( 315 | 8B8C73281CD80B6800A4E197 /* ViewController.swift in Sources */, 316 | 8B8C73261CD80B6800A4E197 /* AppDelegate.swift in Sources */, 317 | ); 318 | runOnlyForDeploymentPostprocessing = 0; 319 | }; 320 | /* End PBXSourcesBuildPhase section */ 321 | 322 | /* Begin PBXTargetDependency section */ 323 | 8B8C73531CD80D4D00A4E197 /* PBXTargetDependency */ = { 324 | isa = PBXTargetDependency; 325 | name = "AEXML iOS"; 326 | targetProxy = 8B8C73521CD80D4D00A4E197 /* PBXContainerItemProxy */; 327 | }; 328 | /* End PBXTargetDependency section */ 329 | 330 | /* Begin PBXVariantGroup section */ 331 | 8B8C73291CD80B6800A4E197 /* Main.storyboard */ = { 332 | isa = PBXVariantGroup; 333 | children = ( 334 | 8B8C732A1CD80B6800A4E197 /* Base */, 335 | ); 336 | name = Main.storyboard; 337 | sourceTree = ""; 338 | }; 339 | 8B8C732E1CD80B6800A4E197 /* LaunchScreen.storyboard */ = { 340 | isa = PBXVariantGroup; 341 | children = ( 342 | 8B8C732F1CD80B6800A4E197 /* Base */, 343 | ); 344 | name = LaunchScreen.storyboard; 345 | sourceTree = ""; 346 | }; 347 | /* End PBXVariantGroup section */ 348 | 349 | /* Begin XCBuildConfiguration section */ 350 | 8B8C73321CD80B6800A4E197 /* Debug */ = { 351 | isa = XCBuildConfiguration; 352 | buildSettings = { 353 | ALWAYS_SEARCH_USER_PATHS = NO; 354 | CLANG_ANALYZER_NONNULL = YES; 355 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 356 | CLANG_CXX_LIBRARY = "libc++"; 357 | CLANG_ENABLE_MODULES = YES; 358 | CLANG_ENABLE_OBJC_ARC = YES; 359 | CLANG_WARN_BOOL_CONVERSION = YES; 360 | CLANG_WARN_CONSTANT_CONVERSION = YES; 361 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 362 | CLANG_WARN_EMPTY_BODY = YES; 363 | CLANG_WARN_ENUM_CONVERSION = YES; 364 | CLANG_WARN_INFINITE_RECURSION = YES; 365 | CLANG_WARN_INT_CONVERSION = YES; 366 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 367 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 368 | CLANG_WARN_UNREACHABLE_CODE = YES; 369 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 370 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 371 | COPY_PHASE_STRIP = NO; 372 | DEBUG_INFORMATION_FORMAT = dwarf; 373 | ENABLE_STRICT_OBJC_MSGSEND = YES; 374 | ENABLE_TESTABILITY = YES; 375 | GCC_C_LANGUAGE_STANDARD = gnu99; 376 | GCC_DYNAMIC_NO_PIC = NO; 377 | GCC_NO_COMMON_BLOCKS = YES; 378 | GCC_OPTIMIZATION_LEVEL = 0; 379 | GCC_PREPROCESSOR_DEFINITIONS = ( 380 | "DEBUG=1", 381 | "$(inherited)", 382 | ); 383 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 384 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 385 | GCC_WARN_UNDECLARED_SELECTOR = YES; 386 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 387 | GCC_WARN_UNUSED_FUNCTION = YES; 388 | GCC_WARN_UNUSED_VARIABLE = YES; 389 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 390 | MTL_ENABLE_DEBUG_INFO = YES; 391 | ONLY_ACTIVE_ARCH = YES; 392 | SDKROOT = iphoneos; 393 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 394 | TARGETED_DEVICE_FAMILY = "1,2"; 395 | }; 396 | name = Debug; 397 | }; 398 | 8B8C73331CD80B6800A4E197 /* Release */ = { 399 | isa = XCBuildConfiguration; 400 | buildSettings = { 401 | ALWAYS_SEARCH_USER_PATHS = NO; 402 | CLANG_ANALYZER_NONNULL = YES; 403 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 404 | CLANG_CXX_LIBRARY = "libc++"; 405 | CLANG_ENABLE_MODULES = YES; 406 | CLANG_ENABLE_OBJC_ARC = YES; 407 | CLANG_WARN_BOOL_CONVERSION = YES; 408 | CLANG_WARN_CONSTANT_CONVERSION = YES; 409 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 410 | CLANG_WARN_EMPTY_BODY = YES; 411 | CLANG_WARN_ENUM_CONVERSION = YES; 412 | CLANG_WARN_INFINITE_RECURSION = YES; 413 | CLANG_WARN_INT_CONVERSION = YES; 414 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 415 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 416 | CLANG_WARN_UNREACHABLE_CODE = YES; 417 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 418 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 419 | COPY_PHASE_STRIP = NO; 420 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 421 | ENABLE_NS_ASSERTIONS = NO; 422 | ENABLE_STRICT_OBJC_MSGSEND = YES; 423 | GCC_C_LANGUAGE_STANDARD = gnu99; 424 | GCC_NO_COMMON_BLOCKS = YES; 425 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 426 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 427 | GCC_WARN_UNDECLARED_SELECTOR = YES; 428 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 429 | GCC_WARN_UNUSED_FUNCTION = YES; 430 | GCC_WARN_UNUSED_VARIABLE = YES; 431 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 432 | MTL_ENABLE_DEBUG_INFO = NO; 433 | SDKROOT = iphoneos; 434 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 435 | TARGETED_DEVICE_FAMILY = "1,2"; 436 | VALIDATE_PRODUCT = YES; 437 | }; 438 | name = Release; 439 | }; 440 | 8B8C73351CD80B6800A4E197 /* Debug */ = { 441 | isa = XCBuildConfiguration; 442 | buildSettings = { 443 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 444 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 445 | INFOPLIST_FILE = AEXMLDemo/Info.plist; 446 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 447 | PRODUCT_BUNDLE_IDENTIFIER = net.tadija.AEXMLDemo; 448 | PRODUCT_NAME = "$(TARGET_NAME)"; 449 | SWIFT_VERSION = 3.0; 450 | }; 451 | name = Debug; 452 | }; 453 | 8B8C73361CD80B6800A4E197 /* Release */ = { 454 | isa = XCBuildConfiguration; 455 | buildSettings = { 456 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 457 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 458 | INFOPLIST_FILE = AEXMLDemo/Info.plist; 459 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 460 | PRODUCT_BUNDLE_IDENTIFIER = net.tadija.AEXMLDemo; 461 | PRODUCT_NAME = "$(TARGET_NAME)"; 462 | SWIFT_VERSION = 3.0; 463 | }; 464 | name = Release; 465 | }; 466 | /* End XCBuildConfiguration section */ 467 | 468 | /* Begin XCConfigurationList section */ 469 | 8B8C731D1CD80B6800A4E197 /* Build configuration list for PBXProject "AEXMLDemo" */ = { 470 | isa = XCConfigurationList; 471 | buildConfigurations = ( 472 | 8B8C73321CD80B6800A4E197 /* Debug */, 473 | 8B8C73331CD80B6800A4E197 /* Release */, 474 | ); 475 | defaultConfigurationIsVisible = 0; 476 | defaultConfigurationName = Release; 477 | }; 478 | 8B8C73341CD80B6800A4E197 /* Build configuration list for PBXNativeTarget "AEXMLDemo" */ = { 479 | isa = XCConfigurationList; 480 | buildConfigurations = ( 481 | 8B8C73351CD80B6800A4E197 /* Debug */, 482 | 8B8C73361CD80B6800A4E197 /* Release */, 483 | ); 484 | defaultConfigurationIsVisible = 0; 485 | defaultConfigurationName = Release; 486 | }; 487 | /* End XCConfigurationList section */ 488 | }; 489 | rootObject = 8B8C731A1CD80B6800A4E197 /* Project object */; 490 | } 491 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/Example/AEXMLDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/Example/AEXMLDemo.xcodeproj/xcshareddata/xcschemes/AEXMLDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/Example/AEXMLDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // AEXMLExample 4 | // 5 | // Created by Marko Tadic on 10/16/14. 6 | // Copyright (c) 2014 ae. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 17 | return true 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/Example/AEXMLDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | } 88 | ], 89 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/Example/AEXMLDemo/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/Example/AEXMLDemo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 37 | 38 | 39 | READ - parses local XML file named "plant_catalog.xml" and shows some data 40 | 41 | WRITE - creates sample SOAP request 42 | 43 | TRY ANY XML - parses remote XML file from given URL and shows some data 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/Example/AEXMLDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSAppTransportSecurity 26 | 27 | NSAllowsArbitraryLoads 28 | 29 | 30 | UILaunchStoryboardName 31 | LaunchScreen 32 | UIMainStoryboardFile 33 | Main 34 | UIRequiredDeviceCapabilities 35 | 36 | armv7 37 | 38 | UISupportedInterfaceOrientations 39 | 40 | UIInterfaceOrientationPortrait 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UISupportedInterfaceOrientations~ipad 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationPortraitUpsideDown 48 | UIInterfaceOrientationLandscapeLeft 49 | UIInterfaceOrientationLandscapeRight 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/Example/AEXMLDemo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // AEXMLExample 4 | // 5 | // Created by Marko Tadic on 10/16/14. 6 | // Copyright (c) 2014 ae. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import AEXML 11 | 12 | class ViewController: UIViewController { 13 | 14 | @IBOutlet weak var textField: UITextField! 15 | @IBOutlet weak var textView: UITextView! 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | 20 | // example from README.md 21 | guard 22 | let xmlPath = Bundle.main.path(forResource: "example", ofType: "xml"), 23 | let data = try? Data(contentsOf: URL(fileURLWithPath: xmlPath)) 24 | else { 25 | print("resource not found!") 26 | return 27 | } 28 | 29 | // example of using NSXMLParserOptions 30 | var options = AEXMLOptions() 31 | options.parserSettings.shouldProcessNamespaces = false 32 | options.parserSettings.shouldReportNamespacePrefixes = false 33 | options.parserSettings.shouldResolveExternalEntities = false 34 | 35 | do { 36 | let xmlDoc = try AEXMLDocument(xml: data, options: options) 37 | 38 | // prints the same XML structure as original 39 | print(xmlDoc.xml) 40 | 41 | // prints cats, dogs 42 | for child in xmlDoc.root.children { 43 | print(child.name) 44 | } 45 | 46 | // prints Optional("Tinna") (first element) 47 | print(xmlDoc.root["cats"]["cat"].value) 48 | 49 | // prints Tinna (first element) 50 | print(xmlDoc.root["cats"]["cat"].string) 51 | 52 | // prints Optional("Kika") (last element) 53 | print(xmlDoc.root["dogs"]["dog"].last?.value) 54 | 55 | // prints Betty (3rd element) 56 | print(xmlDoc.root["dogs"].children[2].string) 57 | 58 | // prints Tinna, Rose, Caesar 59 | if let cats = xmlDoc.root["cats"]["cat"].all { 60 | for cat in cats { 61 | if let name = cat.value { 62 | print(name) 63 | } 64 | } 65 | } 66 | 67 | // prints Villy, Spot 68 | for dog in xmlDoc.root["dogs"]["dog"].all! { 69 | if let color = dog.attributes["color"] { 70 | if color == "white" { 71 | print(dog.string) 72 | } 73 | } 74 | } 75 | 76 | // prints Tinna 77 | if let cats = xmlDoc.root["cats"]["cat"].all(withValue: "Tinna") { 78 | for cat in cats { 79 | print(cat.string) 80 | } 81 | } 82 | 83 | // prints Caesar 84 | if let cats = xmlDoc.root["cats"]["cat"].all(withAttributes: ["breed" : "Domestic", "color" : "yellow"]) { 85 | for cat in cats { 86 | print(cat.string) 87 | } 88 | } 89 | 90 | // prints 4 91 | print(xmlDoc.root["cats"]["cat"].count) 92 | 93 | // prints Siberian 94 | print(xmlDoc.root["cats"]["cat"].attributes["breed"]!) 95 | 96 | // prints Tinna 97 | print(xmlDoc.root["cats"]["cat"].xmlCompact) 98 | 99 | // prints Optional(AEXML.AEXMLError.elementNotFound) 100 | print(xmlDoc["NotExistingElement"].error) 101 | } 102 | catch { 103 | print("\(error)") 104 | } 105 | } 106 | 107 | @IBAction func readXML(_ sender: UIBarButtonItem) { 108 | defer { 109 | resetTextField() 110 | } 111 | 112 | guard let 113 | xmlPath = Bundle.main.path(forResource: "plant_catalog", ofType: "xml"), 114 | let data = try? Data(contentsOf: URL(fileURLWithPath: xmlPath)) 115 | else { 116 | textView.text = "Sample XML Data error." 117 | return 118 | } 119 | 120 | do { 121 | let document = try AEXMLDocument(xml: data) 122 | var parsedText = String() 123 | // parse known structure 124 | for plant in document["CATALOG"]["PLANT"].all! { 125 | parsedText += plant["COMMON"].string + "\n" 126 | } 127 | textView.text = parsedText 128 | } catch { 129 | textView.text = "\(error)" 130 | } 131 | } 132 | 133 | @IBAction func writeXML(_ sender: UIBarButtonItem) { 134 | resetTextField() 135 | // sample SOAP request 136 | let soapRequest = AEXMLDocument() 137 | let attributes = ["xmlns:xsi" : "http://www.w3.org/2001/XMLSchema-instance", "xmlns:xsd" : "http://www.w3.org/2001/XMLSchema"] 138 | let envelope = soapRequest.addChild(name: "soap:Envelope", attributes: attributes) 139 | let header = envelope.addChild(name: "soap:Header") 140 | let body = envelope.addChild(name: "soap:Body") 141 | header.addChild(name: "m:Trans", value: "234", attributes: ["xmlns:m" : "http://www.w3schools.com/transaction/", "soap:mustUnderstand" : "1"]) 142 | let getStockPrice = body.addChild(name: "m:GetStockPrice") 143 | getStockPrice.addChild(name: "m:StockName", value: "AAPL") 144 | textView.text = soapRequest.xml 145 | } 146 | 147 | func resetTextField() { 148 | textField.resignFirstResponder() 149 | textField.text = "http://www.w3schools.com/xml/cd_catalog.xml" 150 | } 151 | 152 | @IBAction func tryRemoteXML(_ sender: UIButton) { 153 | defer { 154 | textField.resignFirstResponder() 155 | } 156 | 157 | guard 158 | let text = textField.text, 159 | let url = URL(string: text), 160 | let data = try? Data(contentsOf: url) 161 | else { 162 | textView.text = "Bad URL or XML Data." 163 | return 164 | } 165 | 166 | do { 167 | let document = try AEXMLDocument(xml: data) 168 | var parsedText = String() 169 | // parse unknown structure 170 | for child in document.root.children { 171 | parsedText += child.xml + "\n" 172 | } 173 | textView.text = parsedText 174 | } catch { 175 | textView.text = "\(error)" 176 | } 177 | } 178 | 179 | } 180 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/Example/Resources/example.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tinna 5 | Rose 6 | Caesar 7 | 8 | 9 | 10 | Villy 11 | Spot 12 | Betty 13 | Kika 14 | 15 | 16 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/Example/Resources/plant_catalog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Bloodroot\n\t 6 | Sanguinaria canadensis 7 | 4 8 | Mostly Shady 9 | 2.44 10 | 031599 11 | true 12 | false 13 | 14 | 15 | 16 | 17 | Columbine 18 | Aquilegia canadensis 19 | 3 20 | Mostly Shady 21 | 9.37 22 | 030699 23 | 24 | 25 | Marsh Marigold 26 | Caltha palustris 27 | 4 28 | Mostly Sunny 29 | 6.81 30 | 051799 31 | 32 | 33 | Cowslip 34 | Caltha palustris 35 | 4 36 | Mostly Shady 37 | 9.90 38 | 030699 39 | 40 | 41 | Dutchman's-Breeches 42 | Dicentra cucullaria 43 | 3 44 | Mostly Shady 45 | 6.44 46 | 012099 47 | 48 | 49 | Ginger, Wild 50 | Asarum canadense 51 | 3 52 | Mostly Shady 53 | 9.03 54 | 041899 55 | 56 | 57 | Hepatica 58 | Hepatica americana 59 | 4 60 | Mostly Shady 61 | 4.45 62 | 012699 63 | 64 | 65 | Liverleaf 66 | Hepatica americana 67 | 4 68 | Mostly Shady 69 | 3.99 70 | 010299 71 | 72 | 73 | Jack-In-The-Pulpit 74 | Arisaema triphyllum 75 | 4 76 | Mostly Shady 77 | 3.23 78 | 020199 79 | 80 | 81 | Mayapple 82 | Podophyllum peltatum 83 | 3 84 | Mostly Shady 85 | 2.98 86 | 060599 87 | 88 | 89 | Phlox, Woodland 90 | Phlox divaricata 91 | 3 92 | Sun or Shade 93 | 2.80 94 | 012299 95 | 96 | 97 | Phlox, Blue 98 | Phlox divaricata 99 | 3 100 | Sun or Shade 101 | 5.59 102 | 021699 103 | 104 | 105 | Spring-Beauty 106 | Claytonia Virginica 107 | 7 108 | Mostly Shady 109 | 6.59 110 | 020199 111 | 112 | 113 | Trillium 114 | Trillium grandiflorum 115 | 5 116 | Sun or Shade 117 | 3.90 118 | 042999 119 | 120 | 121 | Wake Robin 122 | Trillium grandiflorum 123 | 5 124 | Sun or Shade 125 | 3.20 126 | 022199 127 | 128 | 129 | Violet, Dog-Tooth 130 | Erythronium americanum 131 | 4 132 | Shade 133 | 9.04 134 | 020199 135 | 136 | 137 | Trout Lily 138 | Erythronium americanum 139 | 4 140 | Shade 141 | 6.94 142 | 032499 143 | 144 | 145 | Adder's-Tongue 146 | Erythronium americanum 147 | 4 148 | Shade 149 | 9.58 150 | 041399 151 | 152 | 153 | Anemone 154 | Anemone blanda 155 | 6 156 | Mostly Shady 157 | 8.86 158 | 122698 159 | 160 | 161 | Grecian Windflower 162 | Anemone blanda 163 | 6 164 | Mostly Shady 165 | 9.16 166 | 071099 167 | 168 | 169 | Bee Balm 170 | Monarda didyma 171 | 4 172 | Shade 173 | 4.59 174 | 050399 175 | 176 | 177 | Bergamot 178 | Monarda didyma 179 | 4 180 | Shade 181 | 7.16 182 | 042799 183 | 184 | 185 | Black-Eyed Susan 186 | Rudbeckia hirta 187 | Annual 188 | Sunny 189 | 9.80 190 | 061899 191 | 192 | 193 | Buttercup 194 | Ranunculus 195 | 4 196 | Shade 197 | 2.57 198 | 061099 199 | 200 | 201 | Crowfoot 202 | Ranunculus 203 | 4 204 | Shade 205 | 9.34 206 | 040399 207 | 208 | 209 | Butterfly Weed 210 | Asclepias tuberosa 211 | Annual 212 | Sunny 213 | 2.78 214 | 063099 215 | 216 | 217 | Cinquefoil 218 | Potentilla 219 | Annual 220 | Shade 221 | 7.06 222 | 052599 223 | 224 | 225 | Primrose 226 | Oenothera 227 | 3 - 5 228 | Sunny 229 | 6.56 230 | 013099 231 | 232 | 233 | Gentian 234 | Gentiana 235 | 4 236 | Sun or Shade 237 | 7.81 238 | 051899 239 | 240 | 241 | Blue Gentian 242 | Gentiana 243 | 4 244 | Sun or Shade 245 | 8.56 246 | 050299 247 | 248 | 249 | Jacob's Ladder 250 | Polemonium caeruleum 251 | Annual 252 | Shade 253 | 9.26 254 | 022199 255 | 256 | 257 | Greek Valerian 258 | Polemonium caeruleum 259 | Annual 260 | Shade 261 | 4.36 262 | 071499 263 | 264 | 265 | California Poppy 266 | Eschscholzia californica 267 | Annual 268 | Sun 269 | 7.89 270 | 032799 271 | 272 | 273 | Shooting Star 274 | Dodecatheon 275 | Annual 276 | Mostly Shady 277 | 8.60 278 | 051399 279 | 280 | 281 | Snakeroot 282 | Cimicifuga 283 | Annual 284 | Shade 285 | 5.63 286 | 071199 287 | 288 | 289 | Cardinal Flower 290 | Lobelia cardinalis 291 | 2 292 | Shade 293 | 3.02 294 | 022299 295 | 296 | 297 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-2017 Marko Tadić http://tadija.net 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/Package.swift: -------------------------------------------------------------------------------- 1 | import PackageDescription 2 | 3 | let package = Package( 4 | name: "AEXML" 5 | ) 6 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/README.md: -------------------------------------------------------------------------------- 1 | # AEXML 2 | **Simple and lightweight XML parser written in Swift** 3 | 4 | [![Language Swift 3.0](https://img.shields.io/badge/Language-Swift%203.0-orange.svg?style=flat)](https://swift.org) 5 | [![Platforms iOS | watchOS | tvOS | OSX](https://img.shields.io/badge/Platforms-iOS%20%7C%20watchOS%20%7C%20tvOS%20%7C%20OS%20X-lightgray.svg?style=flat)](http://www.apple.com) 6 | [![License MIT](https://img.shields.io/badge/License-MIT-lightgrey.svg?style=flat)](https://github.com/tadija/AEXML/blob/master/LICENSE) 7 | 8 | [![CocoaPods Version](https://img.shields.io/cocoapods/v/AEXML.svg?style=flat)](https://cocoapods.org/pods/AEXML) 9 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-brightgreen.svg?style=flat)](https://github.com/Carthage/Carthage) 10 | [![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager) 11 | 12 | > This is not a robust full featured XML parser, but rather simple, 13 | lightweight and easy to use utility for casual XML handling. 14 | 15 | ## Index 16 | - [Features](#features) 17 | - [Usage](#usage) 18 | - [Read XML](#read-xml) 19 | - [Write XML](#write-xml) 20 | - [Installation](#installation) 21 | - [License](#license) 22 | 23 | ## Features 24 | - **Read XML** data 25 | - **Write XML** string 26 | - Covered with [unit tests](https://github.com/tadija/AEXML/blob/master/Tests/AEXMLTests.swift) 27 | - Covered with inline docs 28 | 29 | ## Usage 30 | 31 | ### Read XML 32 | Let's say this is some XML string you picked up somewhere and made a variable `data: Data` from that. 33 | 34 | ```xml 35 | 36 | 37 | 38 | Tinna 39 | Rose 40 | Caesar 41 | 42 | 43 | 44 | Villy 45 | Spot 46 | Betty 47 | Kika 48 | 49 | 50 | ``` 51 | 52 | This is how you can use AEXML for working with this data: 53 | (for even more examples, look at the unit tests code included in project) 54 | 55 | ```swift 56 | guard let 57 | let xmlPath = Bundle.main.path(forResource: "example", ofType: "xml"), 58 | let data = try? Data(contentsOf: URL(fileURLWithPath: xmlPath)) 59 | else { return } 60 | 61 | do { 62 | let xmlDoc = try AEXMLDocument(xml: data, options: options) 63 | 64 | // prints the same XML structure as original 65 | print(xmlDoc.xml) 66 | 67 | // prints cats, dogs 68 | for child in xmlDoc.root.children { 69 | print(child.name) 70 | } 71 | 72 | // prints Optional("Tinna") (first element) 73 | print(xmlDoc.root["cats"]["cat"].value) 74 | 75 | // prints Tinna (first element) 76 | print(xmlDoc.root["cats"]["cat"].string) 77 | 78 | // prints Optional("Kika") (last element) 79 | print(xmlDoc.root["dogs"]["dog"].last?.value) 80 | 81 | // prints Betty (3rd element) 82 | print(xmlDoc.root["dogs"].children[2].string) 83 | 84 | // prints Tinna, Rose, Caesar 85 | if let cats = xmlDoc.root["cats"]["cat"].all { 86 | for cat in cats { 87 | if let name = cat.value { 88 | print(name) 89 | } 90 | } 91 | } 92 | 93 | // prints Villy, Spot 94 | for dog in xmlDoc.root["dogs"]["dog"].all! { 95 | if let color = dog.attributes["color"] { 96 | if color == "white" { 97 | print(dog.string) 98 | } 99 | } 100 | } 101 | 102 | // prints Tinna 103 | if let cats = xmlDoc.root["cats"]["cat"].all(withValue: "Tinna") { 104 | for cat in cats { 105 | print(cat.string) 106 | } 107 | } 108 | 109 | // prints Caesar 110 | if let cats = xmlDoc.root["cats"]["cat"].all(withAttributes: ["breed" : "Domestic", "color" : "yellow"]) { 111 | for cat in cats { 112 | print(cat.string) 113 | } 114 | } 115 | 116 | // prints 4 117 | print(xmlDoc.root["cats"]["cat"].count) 118 | 119 | // prints Siberian 120 | print(xmlDoc.root["cats"]["cat"].attributes["breed"]!) 121 | 122 | // prints Tinna 123 | print(xmlDoc.root["cats"]["cat"].xmlCompact) 124 | 125 | // prints Optional(AEXML.AEXMLError.elementNotFound) 126 | print(xmlDoc["NotExistingElement"].error) 127 | } 128 | catch { 129 | print("\(error)") 130 | } 131 | ``` 132 | 133 | ### Write XML 134 | Let's say this is some SOAP XML request you need to generate. 135 | Well, you could just build ordinary string for that? 136 | 137 | ```xml 138 | 139 | 140 | 141 | 234 142 | 143 | 144 | 145 | AAPL 146 | 147 | 148 | 149 | ``` 150 | 151 | Yes, but, you can also do it in a more structured and elegant way with AEXML: 152 | 153 | ```swift 154 | // create XML Document 155 | let soapRequest = AEXMLDocument() 156 | let attributes = ["xmlns:xsi" : "http://www.w3.org/2001/XMLSchema-instance", "xmlns:xsd" : "http://www.w3.org/2001/XMLSchema"] 157 | let envelope = soapRequest.addChild(name: "soap:Envelope", attributes: attributes) 158 | let header = envelope.addChild(name: "soap:Header") 159 | let body = envelope.addChild(name: "soap:Body") 160 | header.addChild(name: "m:Trans", value: "234", attributes: ["xmlns:m" : "http://www.w3schools.com/transaction/", "soap:mustUnderstand" : "1"]) 161 | let getStockPrice = body.addChild(name: "m:GetStockPrice") 162 | getStockPrice.addChild(name: "m:StockName", value: "AAPL") 163 | 164 | // prints the same XML structure as original 165 | print(soapRequest.xml) 166 | ``` 167 | 168 | ## Installation 169 | 170 | - [Swift Package Manager](https://swift.org/package-manager/): 171 | 172 | ``` 173 | .Package(url: "https://github.com/tadija/AEXML.git", majorVersion: 4) 174 | ``` 175 | 176 | - [Carthage](https://github.com/Carthage/Carthage): 177 | 178 | ```ogdl 179 | github "tadija/AEXML" 180 | ``` 181 | 182 | - [CocoaPods](http://cocoapods.org/): 183 | 184 | ```ruby 185 | pod 'AEXML' 186 | ``` 187 | 188 | ## License 189 | AEXML is released under the MIT license. See [LICENSE](LICENSE) for details. 190 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/Sources/AEXML.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | FOUNDATION_EXPORT double AEXMLVersionNumber; 4 | FOUNDATION_EXPORT const unsigned char AEXMLVersionString[]; 5 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/Sources/Document.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /** 4 | This class is inherited from `AEXMLElement` and has a few addons to represent **XML Document**. 5 | 6 | XML Parsing is also done with this object. 7 | */ 8 | open class AEXMLDocument: AEXMLElement { 9 | 10 | // MARK: - Properties 11 | 12 | /// Root (the first child element) element of XML Document **(Empty element with error if not exists)**. 13 | open var root: AEXMLElement { 14 | guard let rootElement = children.first else { 15 | let errorElement = AEXMLElement(name: "Error") 16 | errorElement.error = AEXMLError.rootElementMissing 17 | return errorElement 18 | } 19 | return rootElement 20 | } 21 | 22 | open let options: AEXMLOptions 23 | 24 | // MARK: - Lifecycle 25 | 26 | /** 27 | Designated initializer - Creates and returns new XML Document object. 28 | 29 | - parameter root: Root XML element for XML Document (defaults to `nil`). 30 | - parameter options: Options for XML Document header and parser settings (defaults to `AEXMLOptions()`). 31 | 32 | - returns: Initialized XML Document object. 33 | */ 34 | public init(root: AEXMLElement? = nil, options: AEXMLOptions = AEXMLOptions()) { 35 | self.options = options 36 | 37 | let documentName = String(describing: AEXMLDocument.self) 38 | super.init(name: documentName) 39 | 40 | // document has no parent element 41 | parent = nil 42 | 43 | // add root element to document (if any) 44 | if let rootElement = root { 45 | _ = addChild(rootElement) 46 | } 47 | } 48 | 49 | /** 50 | Convenience initializer - used for parsing XML data (by calling `loadXMLData:` internally). 51 | 52 | - parameter xmlData: XML data to parse. 53 | - parameter options: Options for XML Document header and parser settings (defaults to `AEXMLOptions()`). 54 | 55 | - returns: Initialized XML Document object containing parsed data. Throws error if data could not be parsed. 56 | */ 57 | public convenience init(xml: Data, options: AEXMLOptions = AEXMLOptions()) throws { 58 | self.init(options: options) 59 | try loadXML(xml) 60 | } 61 | 62 | /** 63 | Convenience initializer - used for parsing XML string (by calling `init(xmlData:options:)` internally). 64 | 65 | - parameter xmlString: XML string to parse. 66 | - parameter encoding: String encoding for creating `Data` from `xmlString` (defaults to `String.Encoding.utf8`) 67 | - parameter options: Options for XML Document header and parser settings (defaults to `AEXMLOptions()`). 68 | 69 | - returns: Initialized XML Document object containing parsed data. Throws error if data could not be parsed. 70 | */ 71 | public convenience init(xml: String, 72 | encoding: String.Encoding = String.Encoding.utf8, 73 | options: AEXMLOptions = AEXMLOptions()) throws 74 | { 75 | guard let data = xml.data(using: encoding) else { throw AEXMLError.parsingFailed } 76 | try self.init(xml: data, options: options) 77 | } 78 | 79 | // MARK: - Parse XML 80 | 81 | /** 82 | Creates instance of `AEXMLParser` (private class which is simple wrapper around `XMLParser`) 83 | and starts parsing the given XML data. Throws error if data could not be parsed. 84 | 85 | - parameter data: XML which should be parsed. 86 | */ 87 | open func loadXML(_ data: Data) throws { 88 | children.removeAll(keepingCapacity: false) 89 | let xmlParser = AEXMLParser(document: self, data: data) 90 | try xmlParser.parse() 91 | } 92 | 93 | // MARK: - Override 94 | 95 | /// Override of `xml` property of `AEXMLElement` - it just inserts XML Document header at the beginning. 96 | open override var xml: String { 97 | var xml = "\(options.documentHeader.xmlString)\n" 98 | xml += root.xml 99 | return xml 100 | } 101 | 102 | } 103 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/Sources/Element.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /** 4 | This is base class for holding XML structure. 5 | 6 | You can access its structure by using subscript like this: `element["foo"]["bar"]` which would 7 | return `` element from `` XML as an `AEXMLElement` object. 8 | */ 9 | open class AEXMLElement { 10 | 11 | // MARK: - Properties 12 | 13 | /// Every `AEXMLElement` should have its parent element instead of `AEXMLDocument` which parent is `nil`. 14 | open internal(set) weak var parent: AEXMLElement? 15 | 16 | /// Child XML elements. 17 | open internal(set) var children = [AEXMLElement]() 18 | 19 | /// XML Element name. 20 | open var name: String 21 | 22 | /// XML Element value. 23 | open var value: String? 24 | 25 | /// XML Element attributes. 26 | open var attributes: [String : String] 27 | 28 | /// Error value (`nil` if there is no error). 29 | open var error: AEXMLError? 30 | 31 | /// String representation of `value` property (if `value` is `nil` this is empty String). 32 | open var string: String { return value ?? String() } 33 | 34 | /// Boolean representation of `value` property (`nil` if `value` can't be represented as Bool). 35 | open var bool: Bool? { return Bool(string) } 36 | 37 | /// Integer representation of `value` property (`nil` if `value` can't be represented as Integer). 38 | open var int: Int? { return Int(string) } 39 | 40 | /// Double representation of `value` property (`nil` if `value` can't be represented as Double). 41 | open var double: Double? { return Double(string) } 42 | 43 | // MARK: - Lifecycle 44 | 45 | /** 46 | Designated initializer - all parameters are optional. 47 | 48 | - parameter name: XML element name. 49 | - parameter value: XML element value (defaults to `nil`). 50 | - parameter attributes: XML element attributes (defaults to empty dictionary). 51 | 52 | - returns: An initialized `AEXMLElement` object. 53 | */ 54 | public init(name: String, value: String? = nil, attributes: [String : String] = [String : String]()) { 55 | self.name = name 56 | self.value = value 57 | self.attributes = attributes 58 | } 59 | 60 | // MARK: - XML Read 61 | 62 | /// The first element with given name **(Empty element with error if not exists)**. 63 | open subscript(key: String) -> AEXMLElement { 64 | guard let 65 | first = children.first(where: { $0.name == key }) 66 | else { 67 | let errorElement = AEXMLElement(name: key) 68 | errorElement.error = AEXMLError.elementNotFound 69 | return errorElement 70 | } 71 | return first 72 | } 73 | 74 | /// Returns all of the elements with equal name as `self` **(nil if not exists)**. 75 | open var all: [AEXMLElement]? { return parent?.children.filter { $0.name == self.name } } 76 | 77 | /// Returns the first element with equal name as `self` **(nil if not exists)**. 78 | open var first: AEXMLElement? { return all?.first } 79 | 80 | /// Returns the last element with equal name as `self` **(nil if not exists)**. 81 | open var last: AEXMLElement? { return all?.last } 82 | 83 | /// Returns number of all elements with equal name as `self`. 84 | open var count: Int { return all?.count ?? 0 } 85 | 86 | /** 87 | Returns all elements with given value. 88 | 89 | - parameter value: XML element value. 90 | 91 | - returns: Optional Array of found XML elements. 92 | */ 93 | open func all(withValue value: String) -> [AEXMLElement]? { 94 | let found = all?.flatMap { 95 | $0.value == value ? $0 : nil 96 | } 97 | return found 98 | } 99 | 100 | /** 101 | Returns all elements containing given attributes. 102 | 103 | - parameter attributes: Array of attribute names. 104 | 105 | - returns: Optional Array of found XML elements. 106 | */ 107 | open func all(containingAttributeKeys keys: [String]) -> [AEXMLElement]? { 108 | let found = all?.flatMap { element in 109 | keys.reduce(true) { (result, key) in 110 | result && Array(element.attributes.keys).contains(key) 111 | } ? element : nil 112 | } 113 | return found 114 | } 115 | 116 | /** 117 | Returns all elements with given attributes. 118 | 119 | - parameter attributes: Dictionary of Keys and Values of attributes. 120 | 121 | - returns: Optional Array of found XML elements. 122 | */ 123 | open func all(withAttributes attributes: [String : String]) -> [AEXMLElement]? { 124 | let keys = Array(attributes.keys) 125 | let found = all(containingAttributeKeys: keys)?.flatMap { element in 126 | attributes.reduce(true) { (result, attribute) in 127 | result && element.attributes[attribute.key] == attribute.value 128 | } ? element : nil 129 | } 130 | return found 131 | } 132 | 133 | // MARK: - XML Write 134 | 135 | /** 136 | Adds child XML element to `self`. 137 | 138 | - parameter child: Child XML element to add. 139 | 140 | - returns: Child XML element with `self` as `parent`. 141 | */ 142 | @discardableResult open func addChild(_ child: AEXMLElement) -> AEXMLElement { 143 | child.parent = self 144 | children.append(child) 145 | return child 146 | } 147 | 148 | /** 149 | Adds child XML element to `self`. 150 | 151 | - parameter name: Child XML element name. 152 | - parameter value: Child XML element value (defaults to `nil`). 153 | - parameter attributes: Child XML element attributes (defaults to empty dictionary). 154 | 155 | - returns: Child XML element with `self` as `parent`. 156 | */ 157 | @discardableResult open func addChild(name: String, 158 | value: String? = nil, 159 | attributes: [String : String] = [String : String]()) -> AEXMLElement 160 | { 161 | let child = AEXMLElement(name: name, value: value, attributes: attributes) 162 | return addChild(child) 163 | } 164 | 165 | /// Removes `self` from `parent` XML element. 166 | open func removeFromParent() { 167 | parent?.removeChild(self) 168 | } 169 | 170 | fileprivate func removeChild(_ child: AEXMLElement) { 171 | if let childIndex = children.index(where: { $0 === child }) { 172 | children.remove(at: childIndex) 173 | } 174 | } 175 | 176 | fileprivate var parentsCount: Int { 177 | var count = 0 178 | var element = self 179 | 180 | while let parent = element.parent { 181 | count += 1 182 | element = parent 183 | } 184 | 185 | return count 186 | } 187 | 188 | fileprivate func indent(withDepth depth: Int) -> String { 189 | var count = depth 190 | var indent = String() 191 | 192 | while count > 0 { 193 | indent += "\t" 194 | count -= 1 195 | } 196 | 197 | return indent 198 | } 199 | 200 | /// Complete hierarchy of `self` and `children` in **XML** escaped and formatted String 201 | open var xml: String { 202 | var xml = String() 203 | 204 | // open element 205 | xml += indent(withDepth: parentsCount - 1) 206 | xml += "<\(name)" 207 | 208 | if attributes.count > 0 { 209 | // insert attributes 210 | for (key, value) in attributes { 211 | xml += " \(key)=\"\(value.xmlEscaped)\"" 212 | } 213 | } 214 | 215 | if value == nil && children.count == 0 { 216 | // close element 217 | xml += " />" 218 | } else { 219 | if children.count > 0 { 220 | // add children 221 | xml += ">\n" 222 | for child in children { 223 | xml += "\(child.xml)\n" 224 | } 225 | // add indentation 226 | xml += indent(withDepth: parentsCount - 1) 227 | xml += "" 228 | } else { 229 | // insert string value and close element 230 | xml += ">\(string.xmlEscaped)" 231 | } 232 | } 233 | 234 | return xml 235 | } 236 | 237 | /// Same as `xmlString` but without `\n` and `\t` characters 238 | open var xmlCompact: String { 239 | let chars = CharacterSet(charactersIn: "\n\t") 240 | return xml.components(separatedBy: chars).joined(separator: "") 241 | } 242 | 243 | } 244 | 245 | public extension String { 246 | 247 | /// String representation of self with XML special characters escaped. 248 | public var xmlEscaped: String { 249 | // we need to make sure "&" is escaped first. Not doing this may break escaping the other characters 250 | var escaped = replacingOccurrences(of: "&", with: "&", options: .literal) 251 | 252 | // replace the other four special characters 253 | let escapeChars = ["<" : "<", ">" : ">", "'" : "'", "\"" : """] 254 | for (char, echar) in escapeChars { 255 | escaped = escaped.replacingOccurrences(of: char, with: echar, options: .literal) 256 | } 257 | 258 | return escaped 259 | } 260 | 261 | } 262 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/Sources/Error.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A type representing error value that can be thrown or inside `error` property of `AEXMLElement`. 4 | public enum AEXMLError: Error { 5 | /// This will be inside `error` property of `AEXMLElement` when subscript is used for not-existing element. 6 | case elementNotFound 7 | 8 | /// This will be inside `error` property of `AEXMLDocument` when there is no root element. 9 | case rootElementMissing 10 | 11 | /// `AEXMLDocument` can throw this error on `init` or `loadXMLData` if parsing with `XMLParser` was not successful. 12 | case parsingFailed 13 | } 14 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/Sources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 4.1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/Sources/Options.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// Options used in `AEXMLDocument` 4 | public struct AEXMLOptions { 5 | 6 | /// Values used in XML Document header 7 | public struct DocumentHeader { 8 | /// Version value for XML Document header (defaults to 1.0). 9 | public var version = 1.0 10 | 11 | /// Encoding value for XML Document header (defaults to "utf-8"). 12 | public var encoding = "utf-8" 13 | 14 | /// Standalone value for XML Document header (defaults to "no"). 15 | public var standalone = "no" 16 | 17 | /// XML Document header 18 | public var xmlString: String { 19 | return "" 20 | } 21 | } 22 | 23 | /// Settings used by `Foundation.XMLParser` 24 | public struct ParserSettings { 25 | /// Parser reports the namespaces and qualified names of elements. (defaults to `false`) 26 | public var shouldProcessNamespaces = false 27 | 28 | /// Parser reports the prefixes indicating the scope of namespace declarations. (defaults to `false`) 29 | public var shouldReportNamespacePrefixes = false 30 | 31 | /// Parser reports declarations of external entities. (defaults to `false`) 32 | public var shouldResolveExternalEntities = false 33 | } 34 | 35 | /// Values used in XML Document header (defaults to `DocumentHeader()`) 36 | public var documentHeader = DocumentHeader() 37 | 38 | /// Settings used by `Foundation.XMLParser` (defaults to `ParserSettings()`) 39 | public var parserSettings = ParserSettings() 40 | 41 | /// Designated initializer - Creates and returns default `AEXMLOptions`. 42 | public init() {} 43 | 44 | } 45 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/Sources/Parser.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// Simple wrapper around `Foundation.XMLParser`. 4 | internal class AEXMLParser: NSObject, XMLParserDelegate { 5 | 6 | // MARK: - Properties 7 | 8 | let document: AEXMLDocument 9 | let data: Data 10 | 11 | var currentParent: AEXMLElement? 12 | var currentElement: AEXMLElement? 13 | var currentValue = String() 14 | 15 | var parseError: Error? 16 | 17 | // MARK: - Lifecycle 18 | 19 | init(document: AEXMLDocument, data: Data) { 20 | self.document = document 21 | self.data = data 22 | currentParent = document 23 | 24 | super.init() 25 | } 26 | 27 | // MARK: - API 28 | 29 | func parse() throws { 30 | let parser = XMLParser(data: data) 31 | parser.delegate = self 32 | 33 | parser.shouldProcessNamespaces = document.options.parserSettings.shouldProcessNamespaces 34 | parser.shouldReportNamespacePrefixes = document.options.parserSettings.shouldReportNamespacePrefixes 35 | parser.shouldResolveExternalEntities = document.options.parserSettings.shouldResolveExternalEntities 36 | 37 | let success = parser.parse() 38 | 39 | if !success { 40 | guard let error = parseError else { throw AEXMLError.parsingFailed } 41 | throw error 42 | } 43 | } 44 | 45 | // MARK: - XMLParserDelegate 46 | 47 | func parser(_ parser: XMLParser, 48 | didStartElement elementName: String, 49 | namespaceURI: String?, 50 | qualifiedName qName: String?, 51 | attributes attributeDict: [String : String]) 52 | { 53 | currentValue = String() 54 | currentElement = currentParent?.addChild(name: elementName, attributes: attributeDict) 55 | currentParent = currentElement 56 | } 57 | 58 | func parser(_ parser: XMLParser, foundCharacters string: String) { 59 | currentValue += string 60 | let newValue = currentValue.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines) 61 | currentElement?.value = newValue == String() ? nil : newValue 62 | } 63 | 64 | func parser(_ parser: XMLParser, 65 | didEndElement elementName: String, 66 | namespaceURI: String?, 67 | qualifiedName qName: String?) 68 | { 69 | currentParent = currentParent?.parent 70 | currentElement = nil 71 | } 72 | 73 | func parser(_ parser: XMLParser, parseErrorOccurred parseError: Error) { 74 | self.parseError = parseError 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/Tests/AEXMLTests/AEXMLTests.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import XCTest 3 | @testable import AEXML 4 | 5 | class AEXMLTests: XCTestCase { 6 | 7 | // MARK: - Properties 8 | 9 | var exampleDocument = AEXMLDocument() 10 | var plantsDocument = AEXMLDocument() 11 | 12 | // MARK: - Helpers 13 | 14 | func URLForResource(fileName: String, withExtension: String) -> URL { 15 | let bundle = Bundle(for: AEXMLTests.self) 16 | return bundle.url(forResource: fileName, withExtension: withExtension)! 17 | } 18 | 19 | func xmlDocumentFromURL(url: URL) -> AEXMLDocument { 20 | var xmlDocument = AEXMLDocument() 21 | 22 | do { 23 | let data = try Data.init(contentsOf: url) 24 | xmlDocument = try AEXMLDocument(xml: data) 25 | } catch { 26 | print(error) 27 | } 28 | 29 | return xmlDocument 30 | } 31 | 32 | func readXMLFromFile(filename: String) -> AEXMLDocument { 33 | let url = URLForResource(fileName: filename, withExtension: "xml") 34 | return xmlDocumentFromURL(url: url) 35 | } 36 | 37 | // MARK: - Setup & Teardown 38 | 39 | override func setUp() { 40 | super.setUp() 41 | 42 | // create some sample xml documents 43 | exampleDocument = readXMLFromFile(filename: "example") 44 | plantsDocument = readXMLFromFile(filename: "plant_catalog") 45 | } 46 | 47 | override func tearDown() { 48 | // reset sample xml document 49 | exampleDocument = AEXMLDocument() 50 | plantsDocument = AEXMLDocument() 51 | 52 | super.tearDown() 53 | } 54 | 55 | // MARK: - XML Document 56 | 57 | func testXMLDocumentManualDataLoading() { 58 | do { 59 | let url = URLForResource(fileName: "example", withExtension: "xml") 60 | let data = try Data.init(contentsOf: url) 61 | 62 | let testDocument = AEXMLDocument() 63 | try testDocument.loadXML(data) 64 | XCTAssertEqual(testDocument.root.name, "animals", "Should be able to find root element.") 65 | } catch { 66 | XCTFail("Should be able to load XML Document with given Data.") 67 | } 68 | } 69 | 70 | func testXMLDocumentInitFromString() { 71 | do { 72 | let testDocument = try AEXMLDocument(xml: exampleDocument.xml) 73 | XCTAssertEqual(testDocument.xml, exampleDocument.xml) 74 | } catch { 75 | XCTFail("Should be able to initialize XML Document from XML String.") 76 | } 77 | } 78 | 79 | func testXMLOptions() { 80 | do { 81 | var options = AEXMLOptions() 82 | options.documentHeader.version = 2.0 83 | options.documentHeader.encoding = "utf-16" 84 | options.documentHeader.standalone = "yes" 85 | 86 | let testDocument = try AEXMLDocument(xml: "hello", options: options) 87 | XCTAssertEqual(testDocument.xml, "\n\n\thello\n") 88 | XCTAssertEqual(testDocument.root["bar"].first?.string, "hello") 89 | } catch { 90 | XCTFail("Should be able to initialize XML Document with custom AEXMLOptions.") 91 | } 92 | } 93 | 94 | func testXMLParser() { 95 | do { 96 | let testDocument = AEXMLDocument() 97 | let url = URLForResource(fileName: "example", withExtension: "xml") 98 | let data = try Data.init(contentsOf: url) 99 | 100 | let parser = AEXMLParser(document: testDocument, data: data) 101 | try parser.parse() 102 | 103 | XCTAssertEqual(testDocument.root.name, "animals", "Should be able to find root element.") 104 | } catch { 105 | XCTFail("Should be able to parse XML Data into XML Document without throwing error.") 106 | } 107 | } 108 | 109 | func testXMLParserError() { 110 | do { 111 | let testDocument = AEXMLDocument() 112 | let testData = Data() 113 | let parser = AEXMLParser(document: testDocument, data: testData) 114 | try parser.parse() 115 | } catch { 116 | XCTAssertEqual(error.localizedDescription, AEXMLError.parsingFailed.localizedDescription) 117 | } 118 | } 119 | 120 | // MARK: - XML Read 121 | 122 | func testRootElement() { 123 | XCTAssertEqual(exampleDocument.root.name, "animals", "Should be able to find root element.") 124 | 125 | let documentWithoutRootElement = AEXMLDocument() 126 | let rootElement = documentWithoutRootElement.root 127 | XCTAssertEqual(rootElement.error, AEXMLError.rootElementMissing, "Should have RootElementMissing error.") 128 | } 129 | 130 | func testParentElement() { 131 | XCTAssertEqual(exampleDocument.root["cats"].parent!.name, "animals", "Should be able to find parent element.") 132 | } 133 | 134 | func testChildrenElements() { 135 | var count = 0 136 | for _ in exampleDocument.root["cats"].children { 137 | count += 1 138 | } 139 | XCTAssertEqual(count, 4, "Should be able to iterate children elements") 140 | } 141 | 142 | func testName() { 143 | let secondChildElementName = exampleDocument.root.children[1].name 144 | XCTAssertEqual(secondChildElementName, "dogs", "Should be able to return element name.") 145 | } 146 | 147 | func testAttributes() { 148 | let firstCatAttributes = exampleDocument.root["cats"]["cat"].attributes 149 | 150 | // iterate attributes 151 | var count = 0 152 | for _ in firstCatAttributes { 153 | count += 1 154 | } 155 | XCTAssertEqual(count, 2, "Should be able to iterate element attributes.") 156 | 157 | // get attribute value 158 | if let firstCatBreed = firstCatAttributes["breed"] { 159 | XCTAssertEqual(firstCatBreed, "Siberian", "Should be able to return attribute value.") 160 | } else { 161 | XCTFail("The first cat should have breed attribute.") 162 | } 163 | } 164 | 165 | func testValue() { 166 | let firstPlant = plantsDocument.root["PLANT"] 167 | 168 | let firstPlantCommon = firstPlant["COMMON"].value! 169 | XCTAssertEqual(firstPlantCommon, "Bloodroot", "Should be able to return element value as optional string.") 170 | 171 | let firstPlantElementWithoutValue = firstPlant["ELEMENTWITHOUTVALUE"].value 172 | XCTAssertNil(firstPlantElementWithoutValue, "Should be able to have nil value.") 173 | 174 | let firstPlantEmptyElement = firstPlant["EMPTYELEMENT"].value 175 | XCTAssertNil(firstPlantEmptyElement, "Should be able to have nil value.") 176 | } 177 | 178 | func testStringValue() { 179 | let firstPlant = plantsDocument.root["PLANT"] 180 | 181 | let firstPlantCommon = firstPlant["COMMON"].string 182 | XCTAssertEqual(firstPlantCommon, "Bloodroot", "Should be able to return element value as string.") 183 | 184 | let firstPlantElementWithoutValue = firstPlant["ELEMENTWITHOUTVALUE"].string 185 | XCTAssertEqual(firstPlantElementWithoutValue, "", "Should be able to return empty string if element has no value.") 186 | 187 | let firstPlantEmptyElement = firstPlant["EMPTYELEMENT"].string 188 | XCTAssertEqual(firstPlantEmptyElement, String(), "Should be able to return empty string if element has no value.") 189 | } 190 | 191 | func testBoolValue() { 192 | let firstTrueString = plantsDocument.root["PLANT"]["TRUESTRING"].bool 193 | XCTAssertEqual(firstTrueString, true, "Should be able to cast element value as Bool.") 194 | 195 | let firstFalseString = plantsDocument.root["PLANT"]["FALSESTRING"].bool 196 | XCTAssertEqual(firstFalseString, false, "Should be able to cast element value as Bool.") 197 | 198 | let firstElementWithoutValue = plantsDocument.root["ELEMENTWITHOUTVALUE"].bool 199 | XCTAssertNil(firstElementWithoutValue, "Should be able to return nil if value can't be represented as Bool.") 200 | } 201 | 202 | func testIntValue() { 203 | let firstPlantZone = plantsDocument.root["PLANT"]["ZONE"].int 204 | XCTAssertEqual(firstPlantZone, 4, "Should be able to cast element value as Integer.") 205 | 206 | let firstPlantPrice = plantsDocument.root["PLANT"]["PRICE"].int 207 | XCTAssertNil(firstPlantPrice, "Should be able to return nil if value can't be represented as Integer.") 208 | } 209 | 210 | func testDoubleValue() { 211 | let firstPlantPrice = plantsDocument.root["PLANT"]["PRICE"].double 212 | XCTAssertEqual(firstPlantPrice, 2.44, "Should be able to cast element value as Double.") 213 | 214 | let firstPlantBotanical = plantsDocument.root["PLANT"]["BOTANICAL"].double 215 | XCTAssertNil(firstPlantBotanical, "Should be able to return nil if value can't be represented as Double.") 216 | } 217 | 218 | func testNotExistingElement() { 219 | // non-optional 220 | XCTAssertNotNil(exampleDocument.root["ducks"]["duck"].error, "Should contain error inside element which does not exist.") 221 | XCTAssertEqual(exampleDocument.root["ducks"]["duck"].error, AEXMLError.elementNotFound, "Should have ElementNotFound error.") 222 | XCTAssertEqual(exampleDocument.root["ducks"]["duck"].string, String(), "Should have empty value.") 223 | 224 | // optional 225 | if let _ = exampleDocument.root["ducks"]["duck"].first { 226 | XCTFail("Should not be able to find ducks here.") 227 | } else { 228 | XCTAssert(true) 229 | } 230 | } 231 | 232 | func testAllElements() { 233 | var count = 0 234 | if let cats = exampleDocument.root["cats"]["cat"].all { 235 | for cat in cats { 236 | XCTAssertNotNil(cat.parent, "Each child element should have its parent element.") 237 | count += 1 238 | } 239 | } 240 | XCTAssertEqual(count, 4, "Should be able to iterate all elements") 241 | } 242 | 243 | func testFirstElement() { 244 | let catElement = exampleDocument.root["cats"]["cat"] 245 | let firstCatExpectedValue = "Tinna" 246 | 247 | // non-optional 248 | XCTAssertEqual(catElement.string, firstCatExpectedValue, "Should be able to find the first element as non-optional.") 249 | 250 | // optional 251 | if let cat = catElement.first { 252 | XCTAssertEqual(cat.string, firstCatExpectedValue, "Should be able to find the first element as optional.") 253 | } else { 254 | XCTFail("Should be able to find the first element.") 255 | } 256 | } 257 | 258 | func testLastElement() { 259 | if let dog = exampleDocument.root["dogs"]["dog"].last { 260 | XCTAssertEqual(dog.string, "Kika", "Should be able to find the last element.") 261 | } else { 262 | XCTFail("Should be able to find the last element.") 263 | } 264 | } 265 | 266 | func testCountElements() { 267 | let dogsCount = exampleDocument.root["dogs"]["dog"].count 268 | XCTAssertEqual(dogsCount, 4, "Should be able to count elements.") 269 | } 270 | 271 | func testAllWithValue() { 272 | let cats = exampleDocument.root["cats"] 273 | cats.addChild(name: "cat", value: "Tinna") 274 | 275 | var count = 0 276 | if let tinnas = cats["cat"].all(withValue: "Tinna") { 277 | for _ in tinnas { 278 | count += 1 279 | } 280 | } 281 | XCTAssertEqual(count, 2, "Should be able to return elements with given value.") 282 | } 283 | 284 | func testAllWithAttributes() { 285 | var count = 0 286 | if let bulls = exampleDocument.root["dogs"]["dog"].all(withAttributes: ["color" : "white"]) { 287 | for _ in bulls { 288 | count += 1 289 | } 290 | } 291 | XCTAssertEqual(count, 2, "Should be able to return elements with given attributes.") 292 | } 293 | 294 | func testAllContainingAttributes() { 295 | var count = 0 296 | if let bulls = exampleDocument.root["dogs"]["dog"].all(containingAttributeKeys: ["gender"]) { 297 | for _ in bulls { 298 | count += 1 299 | } 300 | } 301 | XCTAssertEqual(count, 2, "Should be able to return elements with given attribute keys.") 302 | } 303 | 304 | // MARK: - XML Write 305 | 306 | func testAddChild() { 307 | let ducks = exampleDocument.root.addChild(name: "ducks") 308 | ducks.addChild(name: "duck", value: "Donald") 309 | ducks.addChild(name: "duck", value: "Daisy") 310 | ducks.addChild(name: "duck", value: "Scrooge") 311 | 312 | let animalsCount = exampleDocument.root.children.count 313 | XCTAssertEqual(animalsCount, 3, "Should be able to add child elements to an element.") 314 | XCTAssertEqual(exampleDocument.root["ducks"]["duck"].last!.string, "Scrooge", "Should be able to iterate ducks now.") 315 | } 316 | 317 | func testAddChildWithAttributes() { 318 | let cats = exampleDocument.root["cats"] 319 | let dogs = exampleDocument.root["dogs"] 320 | 321 | cats.addChild(name: "cat", value: "Garfield", attributes: ["breed" : "tabby", "color" : "orange"]) 322 | dogs.addChild(name: "dog", value: "Snoopy", attributes: ["breed" : "beagle", "color" : "white"]) 323 | 324 | let catsCount = cats["cat"].count 325 | let dogsCount = dogs["dog"].count 326 | 327 | let lastCat = cats["cat"].last! 328 | let penultDog = dogs.children[3] 329 | 330 | XCTAssertEqual(catsCount, 5, "Should be able to add child element with attributes to an element.") 331 | XCTAssertEqual(dogsCount, 5, "Should be able to add child element with attributes to an element.") 332 | 333 | XCTAssertEqual(lastCat.attributes["color"], "orange", "Should be able to get attribute value from added element.") 334 | XCTAssertEqual(penultDog.string, "Kika", "Should be able to add child with attributes without overwrites existing elements. (Github Issue #28)") 335 | } 336 | 337 | func testAddAttributes() { 338 | let firstCat = exampleDocument.root["cats"]["cat"] 339 | 340 | firstCat.attributes["funny"] = "true" 341 | firstCat.attributes["speed"] = "fast" 342 | firstCat.attributes["years"] = "7" 343 | 344 | XCTAssertEqual(firstCat.attributes.count, 5, "Should be able to add attributes to an element.") 345 | XCTAssertEqual(Int(firstCat.attributes["years"]!), 7, "Should be able to get any attribute value now.") 346 | } 347 | 348 | func testRemoveChild() { 349 | let cats = exampleDocument.root["cats"] 350 | let lastCat = cats["cat"].last! 351 | let duplicateCat = cats.addChild(name: "cat", value: "Tinna", attributes: ["breed" : "Siberian", "color" : "lightgray"]) 352 | 353 | lastCat.removeFromParent() 354 | duplicateCat.removeFromParent() 355 | 356 | let catsCount = cats["cat"].count 357 | let firstCat = cats["cat"] 358 | XCTAssertEqual(catsCount, 3, "Should be able to remove element from parent.") 359 | XCTAssertEqual(firstCat.string, "Tinna", "Should be able to remove the exact element from parent.") 360 | } 361 | 362 | func testXMLEscapedString() { 363 | let string = "&<>'\"" 364 | let escapedString = string.xmlEscaped 365 | XCTAssertEqual(escapedString, "&<>'"") 366 | } 367 | 368 | func testXMLString() { 369 | let testDocument = AEXMLDocument() 370 | let children = testDocument.addChild(name: "children") 371 | children.addChild(name: "child", value: "value", attributes: ["attribute" : "attributeValue<&>"]) 372 | children.addChild(name: "child") 373 | children.addChild(name: "child", value: "&<>'\"") 374 | 375 | XCTAssertEqual(testDocument.xml, "\n\n\tvalue\n\t\n\t&<>'"\n", "Should be able to print XML formatted string.") 376 | 377 | XCTAssertEqual(testDocument.xmlCompact, "value&<>'"", "Should be able to print compact XML string.") 378 | } 379 | 380 | // MARK: - XML Parse Performance 381 | 382 | func testReadXMLPerformance() { 383 | self.measure() { 384 | _ = self.readXMLFromFile(filename: "plant_catalog") 385 | } 386 | } 387 | 388 | func testWriteXMLPerformance() { 389 | self.measure() { 390 | _ = self.plantsDocument.xml 391 | } 392 | } 393 | 394 | } 395 | -------------------------------------------------------------------------------- /Carthage/Checkouts/AEXML/Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Deamon.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 720E46A61EC0C7AB000D4464 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 720E46A51EC0C7AB000D4464 /* AppDelegate.swift */; }; 11 | 720E46A81EC0C7AB000D4464 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 720E46A71EC0C7AB000D4464 /* ViewController.swift */; }; 12 | 720E46AA1EC0C7AB000D4464 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 720E46A91EC0C7AB000D4464 /* Assets.xcassets */; }; 13 | 720E46AD1EC0C7AB000D4464 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 720E46AB1EC0C7AB000D4464 /* Main.storyboard */; }; 14 | 720E46B81EC36471000D4464 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 720E46B71EC36471000D4464 /* Cocoa.framework */; }; 15 | 720E46BE1EC83D6B000D4464 /* ReceiverView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 720E46BD1EC83D6B000D4464 /* ReceiverView.swift */; }; 16 | 72DC4A411ECDF6BC00597AE0 /* ReceiverViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72DC4A401ECDF6BC00597AE0 /* ReceiverViewModel.swift */; }; 17 | 72DDCF261ECE02D700FA4C9F /* DeamonWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72DDCF251ECE02D700FA4C9F /* DeamonWindow.swift */; }; 18 | 72DDCF291ECE03CF00FA4C9F /* MobileMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72DDCF281ECE03CF00FA4C9F /* MobileMap.swift */; }; 19 | 72EF1F401EC85C77002DB4F7 /* AEXML.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72EF1F3F1EC85C77002DB4F7 /* AEXML.framework */; }; 20 | 72EF1F441EC85FFE002DB4F7 /* DragAndDropCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72EF1F431EC85FFE002DB4F7 /* DragAndDropCoordinator.swift */; }; 21 | 72EF1F451EC86357002DB4F7 /* AEXML.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72EF1F3F1EC85C77002DB4F7 /* AEXML.framework */; }; 22 | 72EF1F461EC86357002DB4F7 /* AEXML.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 72EF1F3F1EC85C77002DB4F7 /* AEXML.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 23 | 72EF1F491EC866D0002DB4F7 /* Parser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72EF1F481EC866D0002DB4F7 /* Parser.swift */; }; 24 | 72EF1F581ECCBE2B002DB4F7 /* WindowCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72EF1F571ECCBE2B002DB4F7 /* WindowCoordinator.swift */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXCopyFilesBuildPhase section */ 28 | 72EF1F471EC86357002DB4F7 /* Embed Frameworks */ = { 29 | isa = PBXCopyFilesBuildPhase; 30 | buildActionMask = 2147483647; 31 | dstPath = ""; 32 | dstSubfolderSpec = 10; 33 | files = ( 34 | 72EF1F461EC86357002DB4F7 /* AEXML.framework in Embed Frameworks */, 35 | ); 36 | name = "Embed Frameworks"; 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXCopyFilesBuildPhase section */ 40 | 41 | /* Begin PBXFileReference section */ 42 | 720E46A21EC0C7AB000D4464 /* Deamon.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Deamon.app; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | 720E46A51EC0C7AB000D4464 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 44 | 720E46A71EC0C7AB000D4464 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 45 | 720E46A91EC0C7AB000D4464 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 46 | 720E46AC1EC0C7AB000D4464 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 47 | 720E46AE1EC0C7AB000D4464 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 48 | 720E46B71EC36471000D4464 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 49 | 720E46B91EC36478000D4464 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; }; 50 | 720E46BD1EC83D6B000D4464 /* ReceiverView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReceiverView.swift; sourceTree = ""; }; 51 | 72DC4A401ECDF6BC00597AE0 /* ReceiverViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ReceiverViewModel.swift; path = ViewModel/ReceiverViewModel.swift; sourceTree = ""; }; 52 | 72DDCF251ECE02D700FA4C9F /* DeamonWindow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeamonWindow.swift; sourceTree = ""; }; 53 | 72DDCF281ECE03CF00FA4C9F /* MobileMap.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MobileMap.swift; path = Mappers/MobileMap.swift; sourceTree = ""; }; 54 | 72EF1F3F1EC85C77002DB4F7 /* AEXML.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AEXML.framework; path = Carthage/Build/Mac/AEXML.framework; sourceTree = ""; }; 55 | 72EF1F431EC85FFE002DB4F7 /* DragAndDropCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DragAndDropCoordinator.swift; path = Coordinators/DragAndDropCoordinator.swift; sourceTree = ""; }; 56 | 72EF1F481EC866D0002DB4F7 /* Parser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Parser.swift; path = Parsers/Parser.swift; sourceTree = ""; }; 57 | 72EF1F4C1EC86A33002DB4F7 /* Cell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = Cell.xib; path = TestFiles/Cell.xib; sourceTree = ""; }; 58 | 72EF1F4E1EC86A6D002DB4F7 /* View.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = View.xib; path = TestFiles/View.xib; sourceTree = ""; }; 59 | 72EF1F501EC86A94002DB4F7 /* Segmented.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = Segmented.xib; path = TestFiles/Segmented.xib; sourceTree = ""; }; 60 | 72EF1F521EC86AC7002DB4F7 /* AllInOne.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = AllInOne.xib; path = TestFiles/AllInOne.xib; sourceTree = ""; }; 61 | 72EF1F571ECCBE2B002DB4F7 /* WindowCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WindowCoordinator.swift; path = Coordinators/WindowCoordinator.swift; sourceTree = ""; }; 62 | /* End PBXFileReference section */ 63 | 64 | /* Begin PBXFrameworksBuildPhase section */ 65 | 720E469F1EC0C7AB000D4464 /* Frameworks */ = { 66 | isa = PBXFrameworksBuildPhase; 67 | buildActionMask = 2147483647; 68 | files = ( 69 | 72EF1F401EC85C77002DB4F7 /* AEXML.framework in Frameworks */, 70 | 72EF1F451EC86357002DB4F7 /* AEXML.framework in Frameworks */, 71 | 720E46B81EC36471000D4464 /* Cocoa.framework in Frameworks */, 72 | ); 73 | runOnlyForDeploymentPostprocessing = 0; 74 | }; 75 | /* End PBXFrameworksBuildPhase section */ 76 | 77 | /* Begin PBXGroup section */ 78 | 720E46991EC0C7AB000D4464 = { 79 | isa = PBXGroup; 80 | children = ( 81 | 720E46A41EC0C7AB000D4464 /* Deamon */, 82 | 720E46A31EC0C7AB000D4464 /* Products */, 83 | 720E46B61EC36471000D4464 /* Frameworks */, 84 | ); 85 | sourceTree = ""; 86 | }; 87 | 720E46A31EC0C7AB000D4464 /* Products */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | 720E46A21EC0C7AB000D4464 /* Deamon.app */, 91 | ); 92 | name = Products; 93 | sourceTree = ""; 94 | }; 95 | 720E46A41EC0C7AB000D4464 /* Deamon */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | 72DDCF271ECE03B100FA4C9F /* Mappers */, 99 | 72EF1F4B1EC86A15002DB4F7 /* TestFiles */, 100 | 72EF1F4A1EC86809002DB4F7 /* Parsers */, 101 | 72EF1F421EC85FEF002DB4F7 /* Coordinators */, 102 | 72DC4A3F1ECDF69D00597AE0 /* ViewModel */, 103 | 72EF1F411EC85D25002DB4F7 /* Views */, 104 | 720E46A51EC0C7AB000D4464 /* AppDelegate.swift */, 105 | 720E46A71EC0C7AB000D4464 /* ViewController.swift */, 106 | 720E46A91EC0C7AB000D4464 /* Assets.xcassets */, 107 | 720E46AB1EC0C7AB000D4464 /* Main.storyboard */, 108 | 720E46AE1EC0C7AB000D4464 /* Info.plist */, 109 | 72DDCF251ECE02D700FA4C9F /* DeamonWindow.swift */, 110 | ); 111 | path = Deamon; 112 | sourceTree = ""; 113 | }; 114 | 720E46B61EC36471000D4464 /* Frameworks */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | 72EF1F3F1EC85C77002DB4F7 /* AEXML.framework */, 118 | 720E46B91EC36478000D4464 /* Carbon.framework */, 119 | 720E46B71EC36471000D4464 /* Cocoa.framework */, 120 | ); 121 | name = Frameworks; 122 | sourceTree = ""; 123 | }; 124 | 72DC4A3F1ECDF69D00597AE0 /* ViewModel */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | 72DC4A401ECDF6BC00597AE0 /* ReceiverViewModel.swift */, 128 | ); 129 | name = ViewModel; 130 | sourceTree = ""; 131 | }; 132 | 72DDCF271ECE03B100FA4C9F /* Mappers */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | 72DDCF281ECE03CF00FA4C9F /* MobileMap.swift */, 136 | ); 137 | name = Mappers; 138 | sourceTree = ""; 139 | }; 140 | 72EF1F411EC85D25002DB4F7 /* Views */ = { 141 | isa = PBXGroup; 142 | children = ( 143 | 720E46BD1EC83D6B000D4464 /* ReceiverView.swift */, 144 | ); 145 | name = Views; 146 | sourceTree = ""; 147 | }; 148 | 72EF1F421EC85FEF002DB4F7 /* Coordinators */ = { 149 | isa = PBXGroup; 150 | children = ( 151 | 72EF1F431EC85FFE002DB4F7 /* DragAndDropCoordinator.swift */, 152 | 72EF1F571ECCBE2B002DB4F7 /* WindowCoordinator.swift */, 153 | ); 154 | name = Coordinators; 155 | sourceTree = ""; 156 | }; 157 | 72EF1F4A1EC86809002DB4F7 /* Parsers */ = { 158 | isa = PBXGroup; 159 | children = ( 160 | 72EF1F481EC866D0002DB4F7 /* Parser.swift */, 161 | ); 162 | name = Parsers; 163 | sourceTree = ""; 164 | }; 165 | 72EF1F4B1EC86A15002DB4F7 /* TestFiles */ = { 166 | isa = PBXGroup; 167 | children = ( 168 | 72EF1F4C1EC86A33002DB4F7 /* Cell.xib */, 169 | 72EF1F4E1EC86A6D002DB4F7 /* View.xib */, 170 | 72EF1F501EC86A94002DB4F7 /* Segmented.xib */, 171 | 72EF1F521EC86AC7002DB4F7 /* AllInOne.xib */, 172 | ); 173 | name = TestFiles; 174 | sourceTree = ""; 175 | }; 176 | /* End PBXGroup section */ 177 | 178 | /* Begin PBXNativeTarget section */ 179 | 720E46A11EC0C7AB000D4464 /* Deamon */ = { 180 | isa = PBXNativeTarget; 181 | buildConfigurationList = 720E46B11EC0C7AB000D4464 /* Build configuration list for PBXNativeTarget "Deamon" */; 182 | buildPhases = ( 183 | 720E469E1EC0C7AB000D4464 /* Sources */, 184 | 720E469F1EC0C7AB000D4464 /* Frameworks */, 185 | 720E46A01EC0C7AB000D4464 /* Resources */, 186 | 72EF1F471EC86357002DB4F7 /* Embed Frameworks */, 187 | ); 188 | buildRules = ( 189 | ); 190 | dependencies = ( 191 | ); 192 | name = Deamon; 193 | productName = Deamon; 194 | productReference = 720E46A21EC0C7AB000D4464 /* Deamon.app */; 195 | productType = "com.apple.product-type.application"; 196 | }; 197 | /* End PBXNativeTarget section */ 198 | 199 | /* Begin PBXProject section */ 200 | 720E469A1EC0C7AB000D4464 /* Project object */ = { 201 | isa = PBXProject; 202 | attributes = { 203 | LastSwiftUpdateCheck = 0830; 204 | LastUpgradeCheck = 0830; 205 | ORGANIZATIONNAME = "Pawel Kowalczuk"; 206 | TargetAttributes = { 207 | 720E46A11EC0C7AB000D4464 = { 208 | CreatedOnToolsVersion = 8.3.2; 209 | DevelopmentTeam = EUR9M2AGH3; 210 | ProvisioningStyle = Automatic; 211 | }; 212 | }; 213 | }; 214 | buildConfigurationList = 720E469D1EC0C7AB000D4464 /* Build configuration list for PBXProject "Deamon" */; 215 | compatibilityVersion = "Xcode 3.2"; 216 | developmentRegion = English; 217 | hasScannedForEncodings = 0; 218 | knownRegions = ( 219 | en, 220 | Base, 221 | ); 222 | mainGroup = 720E46991EC0C7AB000D4464; 223 | productRefGroup = 720E46A31EC0C7AB000D4464 /* Products */; 224 | projectDirPath = ""; 225 | projectRoot = ""; 226 | targets = ( 227 | 720E46A11EC0C7AB000D4464 /* Deamon */, 228 | ); 229 | }; 230 | /* End PBXProject section */ 231 | 232 | /* Begin PBXResourcesBuildPhase section */ 233 | 720E46A01EC0C7AB000D4464 /* Resources */ = { 234 | isa = PBXResourcesBuildPhase; 235 | buildActionMask = 2147483647; 236 | files = ( 237 | 720E46AA1EC0C7AB000D4464 /* Assets.xcassets in Resources */, 238 | 720E46AD1EC0C7AB000D4464 /* Main.storyboard in Resources */, 239 | ); 240 | runOnlyForDeploymentPostprocessing = 0; 241 | }; 242 | /* End PBXResourcesBuildPhase section */ 243 | 244 | /* Begin PBXSourcesBuildPhase section */ 245 | 720E469E1EC0C7AB000D4464 /* Sources */ = { 246 | isa = PBXSourcesBuildPhase; 247 | buildActionMask = 2147483647; 248 | files = ( 249 | 720E46A81EC0C7AB000D4464 /* ViewController.swift in Sources */, 250 | 72DDCF261ECE02D700FA4C9F /* DeamonWindow.swift in Sources */, 251 | 72EF1F441EC85FFE002DB4F7 /* DragAndDropCoordinator.swift in Sources */, 252 | 72EF1F581ECCBE2B002DB4F7 /* WindowCoordinator.swift in Sources */, 253 | 72DC4A411ECDF6BC00597AE0 /* ReceiverViewModel.swift in Sources */, 254 | 72EF1F491EC866D0002DB4F7 /* Parser.swift in Sources */, 255 | 720E46BE1EC83D6B000D4464 /* ReceiverView.swift in Sources */, 256 | 720E46A61EC0C7AB000D4464 /* AppDelegate.swift in Sources */, 257 | 72DDCF291ECE03CF00FA4C9F /* MobileMap.swift in Sources */, 258 | ); 259 | runOnlyForDeploymentPostprocessing = 0; 260 | }; 261 | /* End PBXSourcesBuildPhase section */ 262 | 263 | /* Begin PBXVariantGroup section */ 264 | 720E46AB1EC0C7AB000D4464 /* Main.storyboard */ = { 265 | isa = PBXVariantGroup; 266 | children = ( 267 | 720E46AC1EC0C7AB000D4464 /* Base */, 268 | ); 269 | name = Main.storyboard; 270 | sourceTree = ""; 271 | }; 272 | /* End PBXVariantGroup section */ 273 | 274 | /* Begin XCBuildConfiguration section */ 275 | 720E46AF1EC0C7AB000D4464 /* Debug */ = { 276 | isa = XCBuildConfiguration; 277 | buildSettings = { 278 | ALWAYS_SEARCH_USER_PATHS = NO; 279 | CLANG_ANALYZER_NONNULL = YES; 280 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 281 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 282 | CLANG_CXX_LIBRARY = "libc++"; 283 | CLANG_ENABLE_MODULES = YES; 284 | CLANG_ENABLE_OBJC_ARC = YES; 285 | CLANG_WARN_BOOL_CONVERSION = YES; 286 | CLANG_WARN_CONSTANT_CONVERSION = YES; 287 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 288 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 289 | CLANG_WARN_EMPTY_BODY = YES; 290 | CLANG_WARN_ENUM_CONVERSION = YES; 291 | CLANG_WARN_INFINITE_RECURSION = YES; 292 | CLANG_WARN_INT_CONVERSION = YES; 293 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 294 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 295 | CLANG_WARN_UNREACHABLE_CODE = YES; 296 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 297 | CODE_SIGN_IDENTITY = "-"; 298 | COPY_PHASE_STRIP = NO; 299 | DEBUG_INFORMATION_FORMAT = dwarf; 300 | ENABLE_STRICT_OBJC_MSGSEND = YES; 301 | ENABLE_TESTABILITY = YES; 302 | GCC_C_LANGUAGE_STANDARD = gnu99; 303 | GCC_DYNAMIC_NO_PIC = NO; 304 | GCC_NO_COMMON_BLOCKS = YES; 305 | GCC_OPTIMIZATION_LEVEL = 0; 306 | GCC_PREPROCESSOR_DEFINITIONS = ( 307 | "DEBUG=1", 308 | "$(inherited)", 309 | ); 310 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 311 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 312 | GCC_WARN_UNDECLARED_SELECTOR = YES; 313 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 314 | GCC_WARN_UNUSED_FUNCTION = YES; 315 | GCC_WARN_UNUSED_VARIABLE = YES; 316 | MACOSX_DEPLOYMENT_TARGET = 10.12; 317 | MTL_ENABLE_DEBUG_INFO = YES; 318 | ONLY_ACTIVE_ARCH = YES; 319 | SDKROOT = macosx; 320 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 321 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 322 | }; 323 | name = Debug; 324 | }; 325 | 720E46B01EC0C7AB000D4464 /* Release */ = { 326 | isa = XCBuildConfiguration; 327 | buildSettings = { 328 | ALWAYS_SEARCH_USER_PATHS = NO; 329 | CLANG_ANALYZER_NONNULL = YES; 330 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 331 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 332 | CLANG_CXX_LIBRARY = "libc++"; 333 | CLANG_ENABLE_MODULES = YES; 334 | CLANG_ENABLE_OBJC_ARC = YES; 335 | CLANG_WARN_BOOL_CONVERSION = YES; 336 | CLANG_WARN_CONSTANT_CONVERSION = YES; 337 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 338 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 339 | CLANG_WARN_EMPTY_BODY = YES; 340 | CLANG_WARN_ENUM_CONVERSION = YES; 341 | CLANG_WARN_INFINITE_RECURSION = YES; 342 | CLANG_WARN_INT_CONVERSION = YES; 343 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 344 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 345 | CLANG_WARN_UNREACHABLE_CODE = YES; 346 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 347 | CODE_SIGN_IDENTITY = "-"; 348 | COPY_PHASE_STRIP = NO; 349 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 350 | ENABLE_NS_ASSERTIONS = NO; 351 | ENABLE_STRICT_OBJC_MSGSEND = YES; 352 | GCC_C_LANGUAGE_STANDARD = gnu99; 353 | GCC_NO_COMMON_BLOCKS = YES; 354 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 355 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 356 | GCC_WARN_UNDECLARED_SELECTOR = YES; 357 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 358 | GCC_WARN_UNUSED_FUNCTION = YES; 359 | GCC_WARN_UNUSED_VARIABLE = YES; 360 | MACOSX_DEPLOYMENT_TARGET = 10.12; 361 | MTL_ENABLE_DEBUG_INFO = NO; 362 | SDKROOT = macosx; 363 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 364 | }; 365 | name = Release; 366 | }; 367 | 720E46B21EC0C7AB000D4464 /* Debug */ = { 368 | isa = XCBuildConfiguration; 369 | buildSettings = { 370 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 371 | COMBINE_HIDPI_IMAGES = YES; 372 | DEVELOPMENT_TEAM = EUR9M2AGH3; 373 | FRAMEWORK_SEARCH_PATHS = ( 374 | "$(inherited)", 375 | "$(PROJECT_DIR)/Carthage/Build/Mac", 376 | ); 377 | INFOPLIST_FILE = Deamon/Info.plist; 378 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 379 | PRODUCT_BUNDLE_IDENTIFIER = appdev4everyone.Deamon; 380 | PRODUCT_NAME = "$(TARGET_NAME)"; 381 | SWIFT_VERSION = 3.0; 382 | }; 383 | name = Debug; 384 | }; 385 | 720E46B31EC0C7AB000D4464 /* Release */ = { 386 | isa = XCBuildConfiguration; 387 | buildSettings = { 388 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 389 | COMBINE_HIDPI_IMAGES = YES; 390 | DEVELOPMENT_TEAM = EUR9M2AGH3; 391 | FRAMEWORK_SEARCH_PATHS = ( 392 | "$(inherited)", 393 | "$(PROJECT_DIR)/Carthage/Build/Mac", 394 | ); 395 | INFOPLIST_FILE = Deamon/Info.plist; 396 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 397 | PRODUCT_BUNDLE_IDENTIFIER = appdev4everyone.Deamon; 398 | PRODUCT_NAME = "$(TARGET_NAME)"; 399 | SWIFT_VERSION = 3.0; 400 | }; 401 | name = Release; 402 | }; 403 | /* End XCBuildConfiguration section */ 404 | 405 | /* Begin XCConfigurationList section */ 406 | 720E469D1EC0C7AB000D4464 /* Build configuration list for PBXProject "Deamon" */ = { 407 | isa = XCConfigurationList; 408 | buildConfigurations = ( 409 | 720E46AF1EC0C7AB000D4464 /* Debug */, 410 | 720E46B01EC0C7AB000D4464 /* Release */, 411 | ); 412 | defaultConfigurationIsVisible = 0; 413 | defaultConfigurationName = Release; 414 | }; 415 | 720E46B11EC0C7AB000D4464 /* Build configuration list for PBXNativeTarget "Deamon" */ = { 416 | isa = XCConfigurationList; 417 | buildConfigurations = ( 418 | 720E46B21EC0C7AB000D4464 /* Debug */, 419 | 720E46B31EC0C7AB000D4464 /* Release */, 420 | ); 421 | defaultConfigurationIsVisible = 0; 422 | defaultConfigurationName = Release; 423 | }; 424 | /* End XCConfigurationList section */ 425 | }; 426 | rootObject = 720E469A1EC0C7AB000D4464 /* Project object */; 427 | } 428 | -------------------------------------------------------------------------------- /Deamon.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Deamon.xcodeproj/project.xcworkspace/xcuserdata/pawelkowalczuk.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riamf/XibDaemon/92affcaaef2a539f937da3f2ab844136d67e0a01/Deamon.xcodeproj/project.xcworkspace/xcuserdata/pawelkowalczuk.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Deamon.xcodeproj/xcuserdata/pawelkowalczuk.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 12 | 13 | 14 | 16 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Deamon.xcodeproj/xcuserdata/pawelkowalczuk.xcuserdatad/xcschemes/Deamon.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /Deamon.xcodeproj/xcuserdata/pawelkowalczuk.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Deamon.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 720E46A11EC0C7AB000D4464 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Deamon/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Deamon 4 | // 5 | // Created by Pawel Kowalczuk on 08/05/2017. 6 | // Copyright © 2017 Pawel Kowalczuk. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import ApplicationServices 11 | 12 | @NSApplicationMain 13 | class AppDelegate: NSObject, NSApplicationDelegate { 14 | 15 | lazy var windowCoordinator: WindowCoordinatorType = { 16 | return WindowCoordinator() 17 | }() 18 | 19 | func applicationDidFinishLaunching(_ aNotification: Notification) { 20 | // Insert code here to initialize your application 21 | } 22 | 23 | func applicationWillTerminate(_ aNotification: Notification) { 24 | // Insert code here to tear down your application 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Deamon/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "size" : "16x16", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "size" : "16x16", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "size" : "32x32", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "size" : "32x32", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "size" : "128x128", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "size" : "128x128", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "size" : "256x256", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "size" : "256x256", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "size" : "512x512", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "size" : "512x512", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /Deamon/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Deamon/Assets.xcassets/swift_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "swift_icon.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /Deamon/Assets.xcassets/swift_icon.imageset/swift_icon.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riamf/XibDaemon/92affcaaef2a539f937da3f2ab844136d67e0a01/Deamon/Assets.xcassets/swift_icon.imageset/swift_icon.pdf -------------------------------------------------------------------------------- /Deamon/Coordinators/DragAndDropCoordinator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DragAndDropCoordinator.swift 3 | // Deamon 4 | // 5 | // Created by Pawel Kowalczuk on 14/05/2017. 6 | // Copyright © 2017 Pawel Kowalczuk. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | protocol DragAndDropCoordinatorType { 12 | 13 | var acceptableTypes: [String] { get } 14 | 15 | func shouldAllowDrag(_ draggingInfo: NSDraggingInfo) -> Bool 16 | func performDragOperation(_ sender: NSDraggingInfo) -> Bool 17 | func prepareForDragOperation(_ sender: NSDraggingInfo) -> Bool 18 | func draggingEntered(_ sender: NSDraggingInfo) -> (NSDragOperation, Bool) 19 | } 20 | 21 | class DragAndDropCoordinator: DragAndDropCoordinatorType { 22 | 23 | let parser: Parser 24 | 25 | init(parser: Parser) { 26 | self.parser = parser 27 | } 28 | 29 | var acceptableTypes: [String] { 30 | return [NSURLPboardType] 31 | } 32 | 33 | func shouldAllowDrag(_ draggingInfo: NSDraggingInfo) -> Bool { 34 | 35 | var canAccept = false 36 | 37 | let pasteBoard = draggingInfo.draggingPasteboard() 38 | 39 | if let urls = pasteBoard.readObjects(forClasses: [NSURL.self], options: nil) as? [URL], 40 | urls.count > 0, AcceptableTypes.isAcceptable(urls.first?.pathExtension) { 41 | canAccept = true 42 | } 43 | 44 | return canAccept 45 | } 46 | 47 | func performDragOperation(_ sender: NSDraggingInfo) -> Bool { 48 | 49 | let pasteBoard = sender.draggingPasteboard() 50 | 51 | if let urls = pasteBoard.readObjects(forClasses: [NSURL.self], options: nil) as? [URL], 52 | let first = urls.first { 53 | parser.parse(url: first) 54 | return true 55 | } 56 | return false 57 | } 58 | 59 | func prepareForDragOperation(_ sender: NSDraggingInfo) -> Bool { 60 | let allow = shouldAllowDrag(sender) 61 | return allow 62 | } 63 | 64 | func draggingEntered(_ sender: NSDraggingInfo) -> (NSDragOperation, Bool) { 65 | let allow = shouldAllowDrag(sender) 66 | return allow ? (.copy, allow) : (NSDragOperation(), allow) 67 | } 68 | 69 | private enum AcceptableTypes { 70 | static let xib = "xib" 71 | static let storyboard = "storyboard" 72 | private static var allTypes: [String] { 73 | return [AcceptableTypes.xib, AcceptableTypes.storyboard] 74 | } 75 | 76 | static func isAcceptable(_ type: String?) -> Bool { 77 | guard let type = type else { return false } 78 | return AcceptableTypes.allTypes.contains(type.lowercased()) 79 | } 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /Deamon/Coordinators/WindowCoordinator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WindowCoordinator.swift 3 | // Deamon 4 | // 5 | // Created by Pawel Kowalczuk on 17/05/2017. 6 | // Copyright © 2017 Pawel Kowalczuk. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | protocol WindowCoordinatorAccessible { 12 | var windowCoordinator: WindowCoordinatorType { get } 13 | } 14 | 15 | extension WindowCoordinatorAccessible { 16 | var windowCoordinator: WindowCoordinatorType { 17 | return (NSApplication.shared().delegate as! AppDelegate).windowCoordinator 18 | } 19 | } 20 | 21 | protocol WindowCoordinatorType { 22 | func displayWindow(with result: String) 23 | } 24 | 25 | class WindowCoordinator: WindowCoordinatorType { 26 | 27 | var presentingWindow: NSWindow? 28 | 29 | func displayWindow(with result: String) { 30 | 31 | let mainWindow = NSApplication.shared().windows.first(where: { $0 is DeamonWindow}) 32 | let receiverView = (mainWindow?.contentViewController as? ViewController)?.receiverView 33 | let viewModel = ReceiverViewModel(shouldRegister: false, disableTextField: false, textViewResult: result) 34 | 35 | receiverView?.load(with: viewModel) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Deamon/DeamonWindow.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DeamonWindow.swift 3 | // Deamon 4 | // 5 | // Created by Pawel Kowalczuk on 18/05/2017. 6 | // Copyright © 2017 Pawel Kowalczuk. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class DeamonWindow: NSWindow {} 12 | -------------------------------------------------------------------------------- /Deamon/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | LSUIElement 26 | 27 | NSHumanReadableCopyright 28 | Copyright © 2017 Pawel Kowalczuk. All rights reserved. 29 | NSMainStoryboardFile 30 | Main 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /Deamon/Mappers/MobileMap.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MobileMap.swift 3 | // Deamon 4 | // 5 | // Created by Pawel Kowalczuk on 18/05/2017. 6 | // Copyright © 2017 Pawel Kowalczuk. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | protocol MapperType { 12 | func value(with key: String) -> String 13 | } 14 | 15 | struct Mapper: MapperType { 16 | let mapper: MapperType 17 | 18 | init(mapper: MapperType = MobileMap()) { 19 | self.mapper = mapper 20 | } 21 | 22 | func value(with key: String) -> String { 23 | return mapper.value(with:key) 24 | } 25 | } 26 | 27 | struct MobileMap: MapperType { 28 | private let prefix = "UI" 29 | private let map = [ 30 | "mapView" : "MKMapView" 31 | ] 32 | 33 | func value(with key: String) -> String { 34 | return map[key] ?? prefix + key.UICapitalized 35 | } 36 | } 37 | 38 | private extension String { 39 | 40 | var UICapitalized: String { 41 | 42 | let capitalizeWords = [ 43 | "view", "cell", "indicator", "control", "field", "picker" 44 | ] 45 | var capitalized = self.capitalized 46 | 47 | for word in capitalizeWords { 48 | capitalized = capitalized.replacingOccurrences(of: word, with: word.capitalized) 49 | } 50 | return capitalized 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Deamon/Parsers/Parser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Parser.swift 3 | // Deamon 4 | // 5 | // Created by Pawel Kowalczuk on 14/05/2017. 6 | // Copyright © 2017 Pawel Kowalczuk. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import AEXML 11 | import Cocoa 12 | 13 | protocol Parser { 14 | func parse(url: URL) 15 | } 16 | 17 | class XMLParser: Parser { 18 | 19 | enum XIBAttribute { 20 | static let customClass = "customClass" 21 | static let userLabel = "userLabel" 22 | } 23 | 24 | enum XIBElements { 25 | static let objects = "objects" 26 | static let placeholder = "placeholder" 27 | static let subviews = "subviews" 28 | static let tableViewCellContentView = "tableViewCellContentView" 29 | } 30 | 31 | func parse(url: URL) { 32 | guard let data = try? Data(contentsOf: url) else { return } 33 | guard let xml = try? AEXMLDocument(xml: data) else { return } 34 | 35 | let activeDesigns = xml.root[XIBElements.objects].children.filter({ $0.name != XIBElements.placeholder }) 36 | let mapper = Mapper() 37 | 38 | for design in activeDesigns { 39 | 40 | let className = design.attributes[XIBAttribute.customClass] ?? 41 | url.lastPathComponentWithoutExtension 42 | let viewModelType = "\(className)ViewModel" 43 | let superClass = mapper.value(with: design.className) 44 | var subviews = design[XIBElements.subviews] 45 | if subviews.all == nil { 46 | subviews = design[XIBElements.tableViewCellContentView][XIBElements.subviews] 47 | } 48 | 49 | var resulting = "class \(className): \(superClass) { \r\n \r\n" 50 | 51 | for (index,view) in subviews.children.enumerated() { 52 | let subviewType = mapper.value(with: view.attributes[XIBAttribute.customClass] ?? view.className) 53 | let name = view.attributes[XIBAttribute.userLabel] ?? "outlet_\(index)" 54 | 55 | resulting += "\t @IBOutlet private weak var \(name): \(subviewType)!\r\n" 56 | } 57 | 58 | resulting += "\r\n \t func load(viewModel: \(viewModelType)) {\r\n" 59 | 60 | resulting += "\t }\r\n}\r\n \r\n" 61 | 62 | resulting += "struct \(viewModelType) { \r\n" 63 | resulting += "\t \r\n}\r\n" 64 | 65 | windowCoordinator.displayWindow(with: resulting) 66 | } 67 | } 68 | } 69 | 70 | extension XMLParser: WindowCoordinatorAccessible {} 71 | 72 | fileprivate extension AEXMLElement { 73 | var className: String { 74 | return name 75 | } 76 | } 77 | 78 | fileprivate extension URL { 79 | var lastPathComponentWithoutExtension: String { 80 | return lastPathComponent.replacingOccurrences(of: ".\(pathExtension)", with: "") 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /Deamon/ReceiverView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ReceiverView.swift 3 | // Deamon 4 | // 5 | // Created by Pawel Kowalczuk on 14/05/2017. 6 | // Copyright © 2017 Pawel Kowalczuk. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class ReceiverView: NSView { 12 | 13 | @IBOutlet private weak var textView: NSTextView! 14 | 15 | fileprivate let dragAndDropCoordinator: DragAndDropCoordinatorType = DragAndDropCoordinator(parser: XMLParser()) 16 | 17 | fileprivate var isReceivingDrag = false { 18 | didSet { 19 | needsDisplay = true 20 | } 21 | } 22 | 23 | override func draw(_ dirtyRect: NSRect) { 24 | super.draw(dirtyRect) 25 | 26 | if isReceivingDrag { 27 | NSColor.selectedControlColor.set() 28 | let path = NSBezierPath(rect: bounds) 29 | path.lineWidth = 8.0 30 | path.stroke() 31 | } 32 | } 33 | 34 | func load(with viewModel: ReceiverViewModel) { 35 | 36 | textView.isHidden = viewModel.disableTextField 37 | textView.string = viewModel.textViewResult 38 | viewModel.shouldRegister ? register() : unregister() 39 | } 40 | } 41 | //MARK: Dragging 42 | extension ReceiverView { 43 | 44 | fileprivate func register() { 45 | register(forDraggedTypes: dragAndDropCoordinator.acceptableTypes) 46 | } 47 | 48 | fileprivate func unregister() { 49 | unregisterDraggedTypes() 50 | } 51 | 52 | override func performDragOperation(_ sender: NSDraggingInfo) -> Bool { 53 | 54 | isReceivingDrag = false 55 | return dragAndDropCoordinator.performDragOperation(sender) 56 | } 57 | 58 | override func prepareForDragOperation(_ sender: NSDraggingInfo) -> Bool { 59 | return dragAndDropCoordinator.prepareForDragOperation(sender) 60 | } 61 | 62 | override func draggingExited(_ sender: NSDraggingInfo?) { 63 | isReceivingDrag = false 64 | } 65 | 66 | override func draggingEntered(_ sender: NSDraggingInfo) -> NSDragOperation { 67 | let result = dragAndDropCoordinator.draggingEntered(sender) 68 | isReceivingDrag = result.1 69 | return result.0 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Deamon/TestFiles/AllInOne.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | -------------------------------------------------------------------------------- /Deamon/TestFiles/Cell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /Deamon/TestFiles/Segmented.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Deamon/TestFiles/View.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Deamon/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Deamon 4 | // 5 | // Created by Pawel Kowalczuk on 08/05/2017. 6 | // Copyright © 2017 Pawel Kowalczuk. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class ViewController: NSViewController { 12 | 13 | @IBOutlet private weak var resetButton: NSButton! 14 | var receiverView: ReceiverView? { 15 | return (view as? ReceiverView) 16 | } 17 | 18 | var receiverViewModel: ReceiverViewModel = ReceiverViewModel() 19 | 20 | override func viewDidLoad() { 21 | super.viewDidLoad() 22 | receiverView?.load(with: receiverViewModel) 23 | 24 | // Do any additional setup after loading the view. 25 | } 26 | 27 | override var representedObject: Any? { 28 | didSet { 29 | // Update the view, if already loaded. 30 | } 31 | } 32 | 33 | @IBAction fileprivate func resetContent(_ sender: NSButton) { 34 | receiverView?.load(with: receiverViewModel) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Deamon/ViewModel/ReceiverViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ReceiverViewModel.swift 3 | // Deamon 4 | // 5 | // Created by Pawel Kowalczuk on 18/05/2017. 6 | // Copyright © 2017 Pawel Kowalczuk. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | struct ReceiverViewModel { 12 | 13 | let shouldRegister: Bool 14 | let disableTextField: Bool 15 | let textViewResult: String 16 | 17 | init(shouldRegister: Bool = true, 18 | disableTextField: Bool = true, 19 | textViewResult: String = "") { 20 | 21 | self.shouldRegister = shouldRegister 22 | self.disableTextField = disableTextField 23 | self.textViewResult = textViewResult 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Ruoyu Fu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # XibDaemon 2 | 3 | ## Sample Gif: 4 | 5 |

6 | 7 | ## Description 8 | 9 | It is a simple Mac OS X application to generate iOS swift code from *.xib files. 10 | 11 | ## How to use 12 | 13 | After designing all UI items in xib the last thing that needs to be done is to write some code that will mirror the UI. 14 | This is waste of time and can (should be) automated. 15 | There used to be some Xcode plugins, but now there is no possibility to write them and enable them to do code generation for us. 16 | 17 | So here is a simple application that with simple Drag&Drop will automatically generate whole source from designed xib file. 18 | 19 | - Design your UI in xib file in your iOS project. 20 | - Run the Deamon app. 21 | - Drag&Drop designed xib from your Xcode ProjectNavigator or from directory both ways are ok. 22 | - ...and that is it, Deamon will present generated code that you can copy and paste to your project. 23 | - The only thing left is to connect all the outlets from your project with generated ones. 24 | - If you want to generate new file then press the BIG reset button in Deamon app. 25 | 26 | 27 | ## License 28 | The MIT License (MIT) 29 | -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/Frameworks/AEXML.framework/AEXML: -------------------------------------------------------------------------------- 1 | Versions/Current/AEXML -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/Frameworks/AEXML.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/Frameworks/AEXML.framework/Versions/A/AEXML: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riamf/XibDaemon/92affcaaef2a539f937da3f2ab844136d67e0a01/XibDeamon/Deamon.app/Contents/Frameworks/AEXML.framework/Versions/A/AEXML -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/Frameworks/AEXML.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 16E195 7 | CFBundleDevelopmentRegion 8 | en 9 | CFBundleExecutable 10 | AEXML 11 | CFBundleIdentifier 12 | net.tadija.AEXML 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | AEXML 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 4.1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleSupportedPlatforms 24 | 25 | MacOSX 26 | 27 | CFBundleVersion 28 | 1 29 | DTCompiler 30 | com.apple.compilers.llvm.clang.1_0 31 | DTPlatformBuild 32 | 8E2002 33 | DTPlatformVersion 34 | GM 35 | DTSDKBuild 36 | 16E185 37 | DTSDKName 38 | macosx10.12 39 | DTXcode 40 | 0832 41 | DTXcodeBuild 42 | 8E2002 43 | UIDeviceFamily 44 | 45 | 1 46 | 2 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/Frameworks/AEXML.framework/Versions/A/_CodeSignature/CodeResources: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | files 6 | 7 | Resources/Info.plist 8 | 9 | Be+0r05ttHDP2q/b1XazlUYKrs0= 10 | 11 | 12 | files2 13 | 14 | Resources/Info.plist 15 | 16 | hash 17 | 18 | Be+0r05ttHDP2q/b1XazlUYKrs0= 19 | 20 | hash2 21 | 22 | LGzwd71sjE9cDPKFXx7XyoPT9nUhyfzYcL5J2zKLeNk= 23 | 24 | 25 | 26 | rules 27 | 28 | ^Resources/ 29 | 30 | ^Resources/.*\.lproj/ 31 | 32 | optional 33 | 34 | weight 35 | 1000 36 | 37 | ^Resources/.*\.lproj/locversion.plist$ 38 | 39 | omit 40 | 41 | weight 42 | 1100 43 | 44 | ^Resources/Base\.lproj/ 45 | 46 | weight 47 | 1010 48 | 49 | ^version.plist$ 50 | 51 | 52 | rules2 53 | 54 | .*\.dSYM($|/) 55 | 56 | weight 57 | 11 58 | 59 | ^(.*/)?\.DS_Store$ 60 | 61 | omit 62 | 63 | weight 64 | 2000 65 | 66 | ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ 67 | 68 | nested 69 | 70 | weight 71 | 10 72 | 73 | ^.* 74 | 75 | ^Info\.plist$ 76 | 77 | omit 78 | 79 | weight 80 | 20 81 | 82 | ^PkgInfo$ 83 | 84 | omit 85 | 86 | weight 87 | 20 88 | 89 | ^Resources/ 90 | 91 | weight 92 | 20 93 | 94 | ^Resources/.*\.lproj/ 95 | 96 | optional 97 | 98 | weight 99 | 1000 100 | 101 | ^Resources/.*\.lproj/locversion.plist$ 102 | 103 | omit 104 | 105 | weight 106 | 1100 107 | 108 | ^Resources/Base\.lproj/ 109 | 110 | weight 111 | 1010 112 | 113 | ^[^/]+$ 114 | 115 | nested 116 | 117 | weight 118 | 10 119 | 120 | ^embedded\.provisionprofile$ 121 | 122 | weight 123 | 20 124 | 125 | ^version\.plist$ 126 | 127 | weight 128 | 20 129 | 130 | 131 | 132 | 133 | -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/Frameworks/AEXML.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/Frameworks/libswiftAppKit.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riamf/XibDaemon/92affcaaef2a539f937da3f2ab844136d67e0a01/XibDeamon/Deamon.app/Contents/Frameworks/libswiftAppKit.dylib -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/Frameworks/libswiftCore.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riamf/XibDaemon/92affcaaef2a539f937da3f2ab844136d67e0a01/XibDeamon/Deamon.app/Contents/Frameworks/libswiftCore.dylib -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/Frameworks/libswiftCoreData.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riamf/XibDaemon/92affcaaef2a539f937da3f2ab844136d67e0a01/XibDeamon/Deamon.app/Contents/Frameworks/libswiftCoreData.dylib -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/Frameworks/libswiftCoreGraphics.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riamf/XibDaemon/92affcaaef2a539f937da3f2ab844136d67e0a01/XibDeamon/Deamon.app/Contents/Frameworks/libswiftCoreGraphics.dylib -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/Frameworks/libswiftCoreImage.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riamf/XibDaemon/92affcaaef2a539f937da3f2ab844136d67e0a01/XibDeamon/Deamon.app/Contents/Frameworks/libswiftCoreImage.dylib -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/Frameworks/libswiftDarwin.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riamf/XibDaemon/92affcaaef2a539f937da3f2ab844136d67e0a01/XibDeamon/Deamon.app/Contents/Frameworks/libswiftDarwin.dylib -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/Frameworks/libswiftDispatch.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riamf/XibDaemon/92affcaaef2a539f937da3f2ab844136d67e0a01/XibDeamon/Deamon.app/Contents/Frameworks/libswiftDispatch.dylib -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/Frameworks/libswiftFoundation.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riamf/XibDaemon/92affcaaef2a539f937da3f2ab844136d67e0a01/XibDeamon/Deamon.app/Contents/Frameworks/libswiftFoundation.dylib -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/Frameworks/libswiftIOKit.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riamf/XibDaemon/92affcaaef2a539f937da3f2ab844136d67e0a01/XibDeamon/Deamon.app/Contents/Frameworks/libswiftIOKit.dylib -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/Frameworks/libswiftObjectiveC.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riamf/XibDaemon/92affcaaef2a539f937da3f2ab844136d67e0a01/XibDeamon/Deamon.app/Contents/Frameworks/libswiftObjectiveC.dylib -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/Frameworks/libswiftQuartzCore.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riamf/XibDaemon/92affcaaef2a539f937da3f2ab844136d67e0a01/XibDeamon/Deamon.app/Contents/Frameworks/libswiftQuartzCore.dylib -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/Frameworks/libswiftXPC.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riamf/XibDaemon/92affcaaef2a539f937da3f2ab844136d67e0a01/XibDeamon/Deamon.app/Contents/Frameworks/libswiftXPC.dylib -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 16F73 7 | CFBundleDevelopmentRegion 8 | en 9 | CFBundleExecutable 10 | Deamon 11 | CFBundleIdentifier 12 | appdev4everyone.Deamon 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | Deamon 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSupportedPlatforms 22 | 23 | MacOSX 24 | 25 | CFBundleVersion 26 | 1 27 | DTCompiler 28 | com.apple.compilers.llvm.clang.1_0 29 | DTPlatformBuild 30 | 8E2002 31 | DTPlatformVersion 32 | GM 33 | DTSDKBuild 34 | 16E185 35 | DTSDKName 36 | macosx10.12 37 | DTXcode 38 | 0832 39 | DTXcodeBuild 40 | 8E2002 41 | LSMinimumSystemVersion 42 | 10.12 43 | LSUIElement 44 | 45 | NSHumanReadableCopyright 46 | Copyright © 2017 Pawel Kowalczuk. All rights reserved. 47 | NSMainStoryboardFile 48 | Main 49 | NSPrincipalClass 50 | NSApplication 51 | 52 | 53 | -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/MacOS/Deamon: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riamf/XibDaemon/92affcaaef2a539f937da3f2ab844136d67e0a01/XibDeamon/Deamon.app/Contents/MacOS/Deamon -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/PkgInfo: -------------------------------------------------------------------------------- 1 | APPL???? -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/Resources/Assets.car: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riamf/XibDaemon/92affcaaef2a539f937da3f2ab844136d67e0a01/XibDeamon/Deamon.app/Contents/Resources/Assets.car -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/Resources/Base.lproj/Main.storyboardc/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riamf/XibDaemon/92affcaaef2a539f937da3f2ab844136d67e0a01/XibDeamon/Deamon.app/Contents/Resources/Base.lproj/Main.storyboardc/Info.plist -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/Resources/Base.lproj/Main.storyboardc/MainMenu.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riamf/XibDaemon/92affcaaef2a539f937da3f2ab844136d67e0a01/XibDeamon/Deamon.app/Contents/Resources/Base.lproj/Main.storyboardc/MainMenu.nib -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/Resources/Base.lproj/Main.storyboardc/NSWindowController-B8D-0N-5wS.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riamf/XibDaemon/92affcaaef2a539f937da3f2ab844136d67e0a01/XibDeamon/Deamon.app/Contents/Resources/Base.lproj/Main.storyboardc/NSWindowController-B8D-0N-5wS.nib -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/Resources/Base.lproj/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riamf/XibDaemon/92affcaaef2a539f937da3f2ab844136d67e0a01/XibDeamon/Deamon.app/Contents/Resources/Base.lproj/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib -------------------------------------------------------------------------------- /XibDeamon/Deamon.app/Contents/_CodeSignature/CodeResources: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | files 6 | 7 | Resources/Assets.car 8 | 9 | Z2ASXzXzIfP/L0lC4WmVfUizMaM= 10 | 11 | Resources/Base.lproj/Main.storyboardc/Info.plist 12 | 13 | mGNXRcFcQO8zQFWlSMOLrPTZwfk= 14 | 15 | Resources/Base.lproj/Main.storyboardc/MainMenu.nib 16 | 17 | g/mt3T9o2LsjwqZE/GmbfdoO2Ro= 18 | 19 | Resources/Base.lproj/Main.storyboardc/NSWindowController-B8D-0N-5wS.nib 20 | 21 | LELgfBnQ1Vr/rvaqNDWXgTAx1C8= 22 | 23 | Resources/Base.lproj/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib 24 | 25 | guqB+LMFBdK1AunkxaFxxGCbfSw= 26 | 27 | 28 | files2 29 | 30 | Frameworks/AEXML.framework 31 | 32 | cdhash 33 | 34 | FaDIEJf1xMOYlH9Ij8tCkszKyzI= 35 | 36 | requirement 37 | cdhash H"50fae76052a65c8346dcd4cda9979987cad4b230" or cdhash H"15a0c81097f5c4c398947f488fcb4292cccacb32" 38 | 39 | Frameworks/libswiftAppKit.dylib 40 | 41 | cdhash 42 | 43 | Q5XAaHl/nPNINw+XrH+l1ePb15s= 44 | 45 | requirement 46 | cdhash H"18d9d198c06ffca1b5bdc17b60efe15d4b626e69" or cdhash H"4395c068797f9cf348370f97ac7fa5d5e3dbd79b" 47 | 48 | Frameworks/libswiftCore.dylib 49 | 50 | cdhash 51 | 52 | Kkv7HI09OvUaxrIFL2WhSDZ1TcY= 53 | 54 | requirement 55 | cdhash H"c5219a73a598d0b8a7ba2488d3510c0d5301d1c3" or cdhash H"2a4bfb1c8d3d3af51ac6b2052f65a14836754dc6" 56 | 57 | Frameworks/libswiftCoreData.dylib 58 | 59 | cdhash 60 | 61 | Ww9ZYMDvJR0dC4/xCcHN+EM5c9M= 62 | 63 | requirement 64 | cdhash H"535cd4d45be346846a0571b94881c3a46f951309" or cdhash H"5b0f5960c0ef251d1d0b8ff109c1cdf8433973d3" 65 | 66 | Frameworks/libswiftCoreGraphics.dylib 67 | 68 | cdhash 69 | 70 | hkGpBJTRumyKpxPPKZ5OYMJk9yw= 71 | 72 | requirement 73 | cdhash H"ba4237c3fc1212886a0b443182eaea511d63caa3" or cdhash H"8641a90494d1ba6c8aa713cf299e4e60c264f72c" 74 | 75 | Frameworks/libswiftCoreImage.dylib 76 | 77 | cdhash 78 | 79 | oGZxXu+jtTpuV2gmGlMfxPYV+7g= 80 | 81 | requirement 82 | cdhash H"9ca43a6fdf33f91333795a625a90fd8f1c63b67e" or cdhash H"a066715eefa3b53a6e5768261a531fc4f615fbb8" 83 | 84 | Frameworks/libswiftDarwin.dylib 85 | 86 | cdhash 87 | 88 | lEyya6q9KZZGdu8VgvbCn9us294= 89 | 90 | requirement 91 | cdhash H"587f8624ac4d9f08736db81dcb96e1aa067bf245" or cdhash H"944cb26baabd29964676ef1582f6c29fdbacdbde" 92 | 93 | Frameworks/libswiftDispatch.dylib 94 | 95 | cdhash 96 | 97 | z8Rkk8O54NTH6BmDI7UUhFHAGIo= 98 | 99 | requirement 100 | cdhash H"d013111aed3e50fe620c7f0e46ac45185f3138da" or cdhash H"cfc46493c3b9e0d4c7e8198323b5148451c0188a" 101 | 102 | Frameworks/libswiftFoundation.dylib 103 | 104 | cdhash 105 | 106 | Nqt7KPrCwKMTT4qVWiczsJBqHpU= 107 | 108 | requirement 109 | cdhash H"38d36d4938f4b9384c4a237c437f5bf64d82c224" or cdhash H"36ab7b28fac2c0a3134f8a955a2733b0906a1e95" 110 | 111 | Frameworks/libswiftIOKit.dylib 112 | 113 | cdhash 114 | 115 | xWInx7/HJ6dVntNLrffuEiNRGu0= 116 | 117 | requirement 118 | cdhash H"ae12f58a7da7e84af93cbad47852762313b35f72" or cdhash H"c56227c7bfc727a7559ed34badf7ee1223511aed" 119 | 120 | Frameworks/libswiftObjectiveC.dylib 121 | 122 | cdhash 123 | 124 | 9vrJQ5jhYV3E/zZEMSj1prd4Sl0= 125 | 126 | requirement 127 | cdhash H"bbe63190a6b449d84a4877657c505a35bf9cbcb4" or cdhash H"f6fac94398e1615dc4ff36443128f5a6b7784a5d" 128 | 129 | Frameworks/libswiftQuartzCore.dylib 130 | 131 | cdhash 132 | 133 | RTR03IAl0AyHPwhZC+fccbbEZfI= 134 | 135 | requirement 136 | cdhash H"2e2d262db73f35d56d35aaca1c3c302a68d3579b" or cdhash H"453474dc8025d00c873f08590be7dc71b6c465f2" 137 | 138 | Frameworks/libswiftXPC.dylib 139 | 140 | cdhash 141 | 142 | pxOdKM3DiSFJG8/fgUUpgEkrUzI= 143 | 144 | requirement 145 | cdhash H"0c96a46f148cc24648fa58aad9da4719d0134c2e" or cdhash H"a7139d28cdc38921491bcfdf81452980492b5332" 146 | 147 | Resources/Assets.car 148 | 149 | hash2 150 | 151 | WFA3Y54VNKPVq2wZsHsDSuFXJK5bHptuoxisTZd9buc= 152 | 153 | 154 | Resources/Base.lproj/Main.storyboardc/Info.plist 155 | 156 | hash2 157 | 158 | o4xP2BM9s/OJc1Xajyw+ugIJr5D3ykr5hciQ+mEIJSw= 159 | 160 | 161 | Resources/Base.lproj/Main.storyboardc/MainMenu.nib 162 | 163 | hash2 164 | 165 | 6Xjf0NXk9Buw3VJzjdpFjPFsAbPBqaw62i/QJiHEK1k= 166 | 167 | 168 | Resources/Base.lproj/Main.storyboardc/NSWindowController-B8D-0N-5wS.nib 169 | 170 | hash2 171 | 172 | OlWyTxzUewCGA5pzQHgVy66lBYIZjPlhNsTyc9kjp0Q= 173 | 174 | 175 | Resources/Base.lproj/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib 176 | 177 | hash2 178 | 179 | zeR90xUuA6HIInM4eiExeFqDIs1G9WV1jAR/KpZiTOk= 180 | 181 | 182 | 183 | rules 184 | 185 | ^Resources/ 186 | 187 | ^Resources/.*\.lproj/ 188 | 189 | optional 190 | 191 | weight 192 | 1000 193 | 194 | ^Resources/.*\.lproj/locversion.plist$ 195 | 196 | omit 197 | 198 | weight 199 | 1100 200 | 201 | ^Resources/Base\.lproj/ 202 | 203 | weight 204 | 1010 205 | 206 | ^version.plist$ 207 | 208 | 209 | rules2 210 | 211 | .*\.dSYM($|/) 212 | 213 | weight 214 | 11 215 | 216 | ^(.*/)?\.DS_Store$ 217 | 218 | omit 219 | 220 | weight 221 | 2000 222 | 223 | ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ 224 | 225 | nested 226 | 227 | weight 228 | 10 229 | 230 | ^.* 231 | 232 | ^Info\.plist$ 233 | 234 | omit 235 | 236 | weight 237 | 20 238 | 239 | ^PkgInfo$ 240 | 241 | omit 242 | 243 | weight 244 | 20 245 | 246 | ^Resources/ 247 | 248 | weight 249 | 20 250 | 251 | ^Resources/.*\.lproj/ 252 | 253 | optional 254 | 255 | weight 256 | 1000 257 | 258 | ^Resources/.*\.lproj/locversion.plist$ 259 | 260 | omit 261 | 262 | weight 263 | 1100 264 | 265 | ^Resources/Base\.lproj/ 266 | 267 | weight 268 | 1010 269 | 270 | ^[^/]+$ 271 | 272 | nested 273 | 274 | weight 275 | 10 276 | 277 | ^embedded\.provisionprofile$ 278 | 279 | weight 280 | 20 281 | 282 | ^version\.plist$ 283 | 284 | weight 285 | 20 286 | 287 | 288 | 289 | 290 | -------------------------------------------------------------------------------- /images/XibDeamon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/riamf/XibDaemon/92affcaaef2a539f937da3f2ab844136d67e0a01/images/XibDeamon.gif --------------------------------------------------------------------------------