diff --git a/.gitignore b/.gitignore index 0b64641..8c26242 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,11 @@ -# Xcode -build/* +# Finder/Mac OS X +# +.DS_Store + +# Xcode / Swift +# +.build/ +build/ *.pbxuser !default.pbxuser *.mode1v3 @@ -8,8 +14,21 @@ build/* !default.mode2v3 *.perspectivev3 !default.perspectivev3 -*.xcworkspace -!default.xcworkspace xcuserdata -profile -*.moved-aside \ No newline at end of file +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate +*.xcscmblueprint + +# jazzy documentation generator +# +undocumented.json + +# Carthage: we --use-submodules for our non-leaf dependencies +# +Carthage/* +!Carthage/Checkouts/ +**/Carthage/ diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..dc59059 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,42 @@ +language: objective-c +xcode_project: RaptureXML.xcodeproj +os: osx +osx_image: xcode9 + +branches: + only: + - master + +git: + depth: 1 + submodules: false + +before_install: + - sudo systemsetup -settimezone America/New_York # temporary hack: NYC timezone is required for some MBDataEnvironment date-related unit tests + - travis_wait 30 git submodule update --init + +install: + - gem install xcpretty --no-rdoc --no-ri --no-document --quiet + - rm -rf ~/Library/Developer/CoreSimulator # these two lines are a hack around a recurring Travis problem: multiple versions of the + - sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService # same simulator: https://github.com/travis-ci/travis-ci/issues/7580#issuecomment-292974395 + +script: + - travis_wait 30 ./BuildControl/bin/travisBuildHelper.sh build iOS + - travis_wait 30 ./BuildControl/bin/travisBuildHelper.sh test iOS + - travis_wait 30 ./BuildControl/bin/travisBuildHelper.sh build macOS + - travis_wait 30 ./BuildControl/bin/travisBuildHelper.sh test macOS + - travis_wait 30 ./BuildControl/bin/travisBuildHelper.sh build tvOS + - travis_wait 30 ./BuildControl/bin/travisBuildHelper.sh test tvOS + - travis_wait 30 ./BuildControl/bin/travisBuildHelper.sh build watchOS + +after_failure: + - test -f "RaptureXML-iOS-build.log" && tail -n 2500 "RaptureXML-iOS-build.log" + - test -f "RaptureXML-iOS-test.log" && tail -n 2500 "RaptureXML-iOS-test.log" + - test -f "RaptureXML-iOS-test.log" && LINE_BEFORE=`cat "RaptureXML-iOS-test.log" | grep -n "IDETestOperationsObserverDebug. Writing diagnostic log for test session to." | awk -F':' '{print $1}'` && LINE=`expr $LINE_BEFORE + 1` && LOG_FILE=`head -n $LINE "RaptureXML-iOS-test.log" | tail -n 1` && cat "$LOG_FILE" + - test -f "RaptureXML-macOS-build.log" && tail -n 2500 "RaptureXML-macOS-build.log" + - test -f "RaptureXML-macOS-test.log" && tail -n 2500 "RaptureXML-macOS-test.log" + - test -f "RaptureXML-macOS-test.log" && LINE_BEFORE=`cat "RaptureXML-macOS-test.log" | grep -n "IDETestOperationsObserverDebug. Writing diagnostic log for test session to." | awk -F':' '{print $1}'` && LINE=`expr $LINE_BEFORE + 1` && LOG_FILE=`head -n $LINE "RaptureXML-macOS-test.log" | tail -n 1` && cat "$LOG_FILE" + - test -f "RaptureXML-tvOS-build.log" && tail -n 2500 "RaptureXML-tvOS-build.log" + - test -f "RaptureXML-tvOS-test.log" && tail -n 2500 "RaptureXML-tvOS-test.log" + - test -f "RaptureXML-tvOS-test.log" && LINE_BEFORE=`cat "RaptureXML-tvOS-test.log" | grep -n "IDETestOperationsObserverDebug. Writing diagnostic log for test session to." | awk -F':' '{print $1}'` && LINE=`expr $LINE_BEFORE + 1` && LOG_FILE=`head -n $LINE "RaptureXML-tvOS-test.log" | tail -n 1` && cat "$LOG_FILE" + - test -f "RaptureXML-watchOS-build.log" && tail -n 2500 "RaptureXML-watchOS-build.log" diff --git a/BuildControl/Info-Target.plist b/BuildControl/Info-Target.plist new file mode 100644 index 0000000..900e0ae --- /dev/null +++ b/BuildControl/Info-Target.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 3.1.1 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSHumanReadableCopyright + Copyright © 2016 Rapture In Venice. All rights reserved. + NSPrincipalClass + + + diff --git a/BuildControl/Info-Tests.plist b/BuildControl/Info-Tests.plist new file mode 100644 index 0000000..7a09667 --- /dev/null +++ b/BuildControl/Info-Tests.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 0.0.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + + diff --git a/BuildControl/RaptureXML.xml b/BuildControl/RaptureXML.xml new file mode 100644 index 0000000..4c0c923 --- /dev/null +++ b/BuildControl/RaptureXML.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + A simple, sensible, block-based XML API for Apple Platforms development. + + + + + + + + diff --git a/BuildControl/bin/buildCheck.sh b/BuildControl/bin/buildCheck.sh new file mode 100755 index 0000000..7bc6890 --- /dev/null +++ b/BuildControl/bin/buildCheck.sh @@ -0,0 +1,146 @@ +#!/bin/bash + +# +# checks that the project builds & passes all unit tests +# +# by emaloney, 11 September 2017 +# + +set -o pipefail # to ensure xcodebuild pipeline errors are propagated correctly + +SCRIPT_NAME=$(basename "$0") +SCRIPT_DIR=$(cd "$PWD" ; cd `dirname "$0"` ; echo "$PWD") + +source "${SCRIPT_DIR}/include-common.sh" + +showHelp() +{ + define HELP < /dev/null +if [[ $? != 0 ]]; then + exitWithErrorSuggestHelp "You must invoke this script from within a git repo" +fi + +# +# parse the command-line arguments +# +while [[ $1 ]]; do + case $1 in + --skip-tests) + SKIP_TESTS=1 + ;; + + --quiet|-q) + QUIET=1 + QUIET_ARG="-q" + ;; + + --help|-help|-h|-\?) + SHOW_HELP=1 + ;; + + -*) + exitWithErrorSuggestHelp "Unrecognized argument: $1" + ;; + + *) + if [[ -z $ARGS ]]; then + ARGS=$1 + else + ARGS="$ARGS $1" + fi + esac + shift +done + +if [[ $SHOW_HELP ]]; then + showHelp + exit 1 +fi + +for ARG in $ARGS; do + exitWithErrorSuggestHelp "Unrecognized argument: $ARG" +done + +# +# make sure it builds +# +PROJECT_NAME="RaptureXML" +XCODEBUILD=/usr/bin/xcodebuild +XCODEBUILD_CMD="$XCODEBUILD" +if [[ $SKIP_TESTS ]]; then + updateStatus "Verifying that $PROJECT_NAME builds" +else + updateStatus "Verifying that $PROJECT_NAME builds and passes unit tests" +fi +if [[ $QUIET ]]; then + XCODEBUILD_CMD="$XCODEBUILD -quiet" +fi +if [[ ! -x "$XCODEBUILD" ]]; then + exitWithErrorSuggestHelp "Expected to find xcodebuild at path $XCODEBUILD" +fi + +# +# use xcpretty if it is available +# +XCODEBUILD_PIPETO="" +XCPRETTY=`which xcpretty` +if [[ $? == 0 ]]; then + XCODEBUILD_PIPETO="| $XCPRETTY" +fi + +# +# determine build settings +# +PROJECT_SPECIFIER="-project RaptureXML.xcodeproj" +COMPILE_PLATFORMS="iOS macOS tvOS watchOS" + +# +# build for each platform +# +for PLATFORM in $COMPILE_PLATFORMS; do + updateStatus "Building: $PROJECT_NAME for $PLATFORM..." + if [[ $SKIP_TESTS ]]; then + BUILD_ACTION="clean build" + else + BUILD_ACTION="clean $(testActionForPlatform $PLATFORM)" + fi + RUN_DESTINATION="$(runDestinationForPlatform $PLATFORM)" + if [[ $QUIET ]]; then + executeCommand "$XCODEBUILD_CMD $PROJECT_SPECIFIER -scheme \"${PROJECT_NAME}\" -configuration Debug -destination \"$RUN_DESTINATION\" $BUILD_ACTION $XCODEBUILD_PIPETO" 2&> /dev/null + else + executeCommand "$XCODEBUILD_CMD $PROJECT_SPECIFIER -scheme \"${PROJECT_NAME}\" -configuration Debug -destination \"$RUN_DESTINATION\" $BUILD_ACTION $XCODEBUILD_PIPETO" + fi +done diff --git a/BuildControl/bin/carthageUpdate.sh b/BuildControl/bin/carthageUpdate.sh new file mode 100755 index 0000000..b0ebd20 --- /dev/null +++ b/BuildControl/bin/carthageUpdate.sh @@ -0,0 +1 @@ +carthage update $@ --use-submodules --no-build diff --git a/BuildControl/bin/generateDocumentationForAPI.sh b/BuildControl/bin/generateDocumentationForAPI.sh new file mode 100755 index 0000000..70f2033 --- /dev/null +++ b/BuildControl/bin/generateDocumentationForAPI.sh @@ -0,0 +1,97 @@ +#!/bin/bash + +# set -x + +# constant values +DOCSET_PLATFORM_FAMILY="iphoneos" + +# allow the APPLEDOC_PATH environment variable to override +# the default installation location of the appledoc tool +if [[ -z "$APPLEDOC_PATH" ]]; then + APPLEDOC_PATH=`which appledoc` +fi +if [[ -z "$APPLEDOC_PATH" ]]; then + APPLEDOC_PATH=/usr/local/bin/appledoc +fi +if [[ -z "$APPLEDOC_PATH" || ! -x "$APPLEDOC_PATH" ]]; then + printf "error: 'appledoc' must be installed in order to generate documentation. + + You may download it from: + + https://github.com/tomaz/appledoc" + exit 1 +fi + +exitWithError() +{ + echo "error: $1" + exit 2 +} + +verifyResult() +{ + if [[ $1 != 0 ]]; then + exitWithError "Command failed; exiting" + fi +} + +# settings +DOCSET_PUBLISHER_ID="com.raptureinvenice.documentation" +DOCSET_BUNDLE_ID="${DOCSET_PUBLISHER_ID}.RaptureXML" +DOCSET_FILENAME="${DOCSET_BUNDLE_ID}.docset" +TEMP_DIR=`mktemp -d` +APPLEDOC_OUTPUT_DIR="${TEMP_DIR}/appledoc-generated" +INDEX_OUTPUT_FILE="${TEMP_DIR}/README-rewritten.md" +HTML_OUTPUT_DIR="${APPLEDOC_OUTPUT_DIR}/html" +HTML_INSTALL_DIR="Documentation/API" +DOCSET_OUTPUT_DIR="${APPLEDOC_OUTPUT_DIR}/docset" +DOCSET_INSTALL_DIR="${HTML_INSTALL_DIR}/docsets/${DOCSET_FILENAME}" +ONLINE_ROOT_URL="https://rawgit.com/emaloney/RaptureXML/master/Documentation/API/" + +# verify that we can find the source code +SOURCE_DIR="Sources" +if [[ -z "$SOURCE_DIR" || ! -d "$SOURCE_DIR" ]]; then + exitWithError "Couldn't find source directory: $SOURCE_DIR"; +fi + +# rewrite the links in the README.md file to work properly in the docset +cat "$SOURCE_DIR/README.md" | sed sq${ONLINE_ROOT_URL}qqg > "${INDEX_OUTPUT_FILE}" + +echo "Building documentation..." + +# create the documentation +find "$SOURCE_DIR" -name "*.h" ! -path "*/Private/*" -print0 | xargs -0 \ +$APPLEDOC_PATH \ + --output "$APPLEDOC_OUTPUT_DIR" \ + --clean-output \ + --project-name "RaptureXML" \ + --project-company "Rapture In Venice" \ + --company-id "$DOCSET_PUBLISHER_ID" \ + --docset-bundle-id "$DOCSET_BUNDLE_ID" \ + --docset-platform-family "$DOCSET_PLATFORM_FAMILY" \ + --create-html \ + --create-docset \ + --install-docset \ + --keep-intermediate-files \ + --keep-undocumented-objects \ + --keep-undocumented-members \ + --no-repeat-first-par \ + --no-merge-categories \ + --logformat xcode \ + --index-desc "${INDEX_OUTPUT_FILE}" > /dev/null + +if [[ $? != 0 ]]; then + echo "warning: HTML documentation generation finished with errors or warnings." +fi + +# install the HTML and docset in the project's Documentation dir +rm -rf "$HTML_INSTALL_DIR" +mkdir -p "$HTML_INSTALL_DIR" +cp -R "$HTML_OUTPUT_DIR"/* "$HTML_INSTALL_DIR"/. +verifyResult $? + +mkdir -p "$DOCSET_INSTALL_DIR" +cp -R "$DOCSET_OUTPUT_DIR" "$DOCSET_INSTALL_DIR" +verifyResult $? + +echo "Success!" diff --git a/BuildControl/bin/include-common.sh b/BuildControl/bin/include-common.sh new file mode 100755 index 0000000..eefcb7c --- /dev/null +++ b/BuildControl/bin/include-common.sh @@ -0,0 +1,114 @@ +#!/bin/bash + +define() +{ + IFS='\n' read -r -d '' ${1} || true +} + +printError() +{ + echo "error: $1" + echo + if [[ ! -z $2 ]]; then + printf " $2\n\n" + fi +} + +exitWithError() +{ + printError "$1" "$2" + exit 1 +} + +exitWithErrorSuggestHelp() +{ + printError "$1" "$2" + printf " To display help, run:\n\n\t$0 --help\n" + exit 1 +} + +updateStatus() +{ + if [[ ! $QUIET ]]; then + echo + echo "$1" + echo + fi +} + +summarize() +{ + if [[ $SUMMARIZE ]]; then + printf "\t...%s\n" "$1" + fi +} + +confirmationPrompt() +{ + if [[ ! $QUIET || ! $AUTOMATED_MODE ]]; then + echo + echo $1 + fi + if [[ -z $AUTOMATED_MODE ]]; then + echo + read -p "Are you sure you want to do this? " -n 1 -r + echo + if [[ ! $REPLY =~ ^[Yy]$ ]]; then + exit -1 + fi + fi +} + +executeCommand() +{ + unset _CMD + if [[ $QUIET ]]; then + _CMD="set -o pipefail && $1 > /dev/null" + else + _CMD="set -o pipefail && $1" + fi + eval $_CMD + if [[ $? != 0 ]]; then + exitWithError "Command failed: $_CMD" + fi +} + +# +# these functions compensate for the fact that macOS is still on bash 3.x +# and therefore a more sensible implementation using associative +# arrays is not currently possible +# +testActionForPlatform() +{ + case $1 in + iOS) echo "test";; + macOS) echo "test";; + tvOS) echo "test";; + watchOS) echo "build";; + esac +} + +runDestinationForPlatform() +{ + case $1 in + iOS) + SIMULATOR_ID=`xcrun simctl list | grep -v unavailable | grep "iPad Pro" | grep inch | tail -1 | sed "s/^.*inch) (//" | sed "s/).*$//"` + echo "id=$SIMULATOR_ID" + ;; + + macOS) + echo "platform=macOS" + ;; + + tvOS) + SIMULATOR_ID=`xcrun simctl list | grep -v unavailable | grep "Apple TV" | grep -v "(at " | tail -1 | sed "s/) (.*)\$//" | sed "s/^.*(//"` + echo "id=$SIMULATOR_ID" + ;; + + watchOS) + SIMULATOR_ID=`xcrun simctl list | grep -v unavailable | grep -v "Watch:" | grep "Apple Watch Series" | tail -1 | sed "s/) (.*)\$//" | sed "s/^.*(//"` + echo "id=$SIMULATOR_ID" + ;; + + esac +} diff --git a/BuildControl/bin/processBoilerplate.sh b/BuildControl/bin/processBoilerplate.sh new file mode 100755 index 0000000..468709b --- /dev/null +++ b/BuildControl/bin/processBoilerplate.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +SCRIPT_NAME=$(basename "$0") +SCRIPT_DIR=$(cd "$PWD" ; cd `dirname "$0"` ; echo "$PWD") + +PLATE_EXECUTABLE=$( which plate ) +if [[ $? != 0 ]]; then + echo "error: Couldn't find 'plate' executable; available at https://github.com/emaloney/Boilerplate" + exit 1 +fi + +cd "${SCRIPT_DIR}/../../" + +PROJECT_XML=BuildControl/RaptureXML.xml +REPOS_XML=BuildControl/repos.xml +FILE_COUNT=0 + +echo "Searching for boilerplate files in $PWD" + +for f in `find . -name "*.boilerplate"` +do + BOILERPLATE_FILE="$f" + OUTPUT_FILE=$( echo $f | sed sq.boilerplate\$qq ) + + ECHO_OUTPUT_FILE=$( basename "$OUTPUT_FILE" ) + echo " $BOILERPLATE_FILE -> $ECHO_OUTPUT_FILE" + "$PLATE_EXECUTABLE" -t "$BOILERPLATE_FILE" -d "$PROJECT_XML" -m "$REPOS_XML" -o "$OUTPUT_FILE" + if [[ $? == 0 ]]; then + FILE_COUNT=$(( $FILE_COUNT + 1 )) + else + exit 2 + fi +done + +if [[ $FILE_COUNT == 0 ]]; then + echo "No boilerplate files found." +elif [[ $FILE_COUNT == 1 ]]; then + echo "Successfully processed $FILE_COUNT boilerplate file" +else + echo "Successfully processed $FILE_COUNT boilerplate files" +fi diff --git a/BuildControl/bin/releaseMe.sh b/BuildControl/bin/releaseMe.sh new file mode 100755 index 0000000..ace0406 --- /dev/null +++ b/BuildControl/bin/releaseMe.sh @@ -0,0 +1,548 @@ +#!/bin/bash + +# +# Cleanroom Project release generator script +# +# by emaloney, 7 June 2015 +# + +set -o pipefail # to ensure xcodebuild pipeline errors are propagated correctly + +SCRIPT_NAME=$(basename "$0") +SCRIPT_DIR=$(cd "$PWD" ; cd `dirname "$0"` ; echo "$PWD") + +source "${SCRIPT_DIR}/include-common.sh" + +showHelp() +{ + define HELP < [...] + +Where: + + is 'major', 'minor' or 'patch', depending on which portion + of the version number should be incremented for this release. + +Optional arguments: + + --set-version + Make the version number being released + + --auto + Run automatically without awaiting user confirmation + + --tag + Tags the repo with the version number upon success + + --push + Push all changes upon success + + --amend + Causes any commits to be amends to the previous commit + + --branch + Specifies be used as the git branch for operations + + --commit-message-file + Specifies the contents should be used as the commit message + + --no-commit + Skips committing any changes; implies --no-tag + + --no-tag + Overrides --tag if specified; --no-tag is the default + + --stash-dirty-files + Stashes dirty files before attempting to release + + --commit-dirty-files + Commits dirty files before attempting to release + + --ignore-dirty-files + Ignores dirty files; implies --no-commit --no-tag + + --skip-docs + Skips generating the documentation + + --skip-tests + Skips running the unit tests :-( + + --quiet + Silences output + + --summarize + Minimizes output (ideal for invoking from other scripts) + + Further detail can be found below. + +How it works + + By default, the script inspects the appropriate property list file(s) + to determine the current version of the project. The script then + increments the version number according to the release type + specified: + + major — When the major release type is specified, the major version + component is incremented, and both the minor and patch + components are reset to zero. 2.1.3 becomes 3.0.0. + + minor — When the minor release type is specified, the major version + component is not changed, while the minor component is + incremented and patch component is reset to zero. + 2.1.3 becomes 2.2.0. + + patch — When the patch release type is specified, the major and minor + version components remain unchanged, while the patch component + is incremented. 2.1.3 becomes 2.1.4. + + The script then updates all necessary references to the version + elsewhere in the project. + + Then, the API documentation is rebuilt, and the repository is tagged + with the appropriate version number for the release. + + Finally, if the --push argument was supplied, the entire release is + pushed to the repo's origin remote. + +Specifying the version explicitly + + The --set-version argument can be supplied along with a version number + if you wish to specify the exact version number to use. + + The version number is expected to contain exactly three integer + components separated by periods; trailing zeros are used if + necessary. + + If you wanted to set a release version of 4.2.1, for example, you + could call the script as follows: + + $SCRIPT_NAME --set-version 4.2.1 + + NOTE: When the --set-version argument is supplied, the release-type + argument does not need to be specified (and it will be ignored + if it is). + +User Confirmation + + By default, this script requires user confirmation before making + any changes. + + To allow this script to be invoked by other scripts, an automated + mode is also supported. + + When this script is run in automated mode, the user will not be + asked to confirm any actions; all actions are performed immediately. + + To enable automated mode, supply the --auto argument. + +Releasing with uncommitted changes + + Normally, this script will refuse to continue if the repository + is dirty; that is, if there are any modified files that haven't + yet been committed. + + However, you can force a release to be issued from a dirty repo + using either the --stash-dirty-files or the --commit-dirty-files + argument. + + The --stash-dirty-files option causes a git stash operation to + occur at the start of the release process, and a stash pop at the + end. This safely moves the dirty files out of the way when the + script it doing its thing, and restores them when it is done. + + The --commit-dirty-files option causes the dirty files to be + committed along with the other changes that occur during the + release process. + + In addition, an --ignore-dirty-files option is available, which + lets you go through the entire release process, but stops short + of committing and tagging. This allows you to run through the + entire release process without committing you to committing. + + Note that these options are mutually exclusive and may not be + used with each other. + +Help + + This documentation is displayed when supplying the --help (or -help, -h, + or -?) argument. + + Note that when this script displays help documentation, all other + command line arguments are ignored and no other actions are performed. + +HELP + printf "$HELP" | less +} + +validateVersion() +{ + if [[ ! ($1 =~ ^[0-9]+\.[0-9]+\.[0-9]+$) ]]; then + exitWithErrorSuggestHelp "Expected $2 to contain three period-separated numeric components (eg., 3.6.1, 4.0.0, etc.); got $1 instead" + fi +} + +cleanupDirtyStash() +{ + updateStatus "Restoring previously-stashed modified files" + executeCommand "git stash pop" +} + +# +# make sure we're in a git repo +# +cd "$SCRIPT_DIR/../../." +git status 2&> /dev/null +if [[ $? != 0 ]]; then + exitWithErrorSuggestHelp "You must invoke this script from within a git repo" +fi + +# +# parse the command-line arguments +# +AMEND_ARGS="" +BRANCH=master +STASH_DIRTY_FILES=0 +COMMIT_DIRTY_FILES=0 +IGNORE_DIRTY_FILES=0 +while [[ $1 ]]; do + case $1 in + --set-version) + shift + if [[ -z $1 ]]; then + exitWithErrorSuggestHelp "The $1 argument expects a value" + else + validateVersion $1 "the version passed with the --set-version argument" + SET_VERSION=$1 + fi + ;; + + --auto|-a) + AUTOMATED_MODE=1 + ;; + + --amend) + AMEND_ARGS="--amend --no-edit" + ;; + + --stash-dirty-files) + STASH_DIRTY_FILES=1 + ;; + + --commit-dirty-files) + COMMIT_DIRTY_FILES=1 + ;; + + --ignore-dirty-files) + IGNORE_DIRTY_FILES=1 + NO_COMMIT=1 + NO_TAG=1 + ;; + + --no-commit) + NO_COMMIT=1 + NO_TAG=1 + ;; + + --no-tag) + NO_TAG=1 + ;; + + --tag) + TAG_WHEN_DONE=1 + ;; + + --push) + PUSH_WHEN_DONE=1 + ;; + + --branch|-b) + if [[ $2 ]]; then + BRANCH="$2" + shift + fi + ;; + + --commit-message-file|-m) + if [[ $2 ]]; then + COMMIT_MESSAGE=`cat "$2"` + shift + fi + ;; + + --skip-docs) + SKIP_DOCUMENTATION=1 + ;; + + --skip-tests) + SKIP_TESTS=1 + ;; + + --quiet|-q) + QUIET=1 + QUIET_ARG="-q" + ;; + + --summarize|-z) + SUMMARIZE=1 + QUIET=1 + QUIET_ARG="-q" + ;; + + --rebase) + REBASE=1 + ;; + + --help|-help|-h|-\?) + SHOW_HELP=1 + ;; + + -*) + exitWithErrorSuggestHelp "Unrecognized argument: $1" + ;; + + *) + if [[ -z $ARGS ]]; then + ARGS=$1 + else + ARGS="$ARGS $1" + fi + esac + shift +done + +if [[ $SHOW_HELP ]]; then + showHelp + exit 1 +fi + +for ARG in $ARGS; do + if [[ -z $RELEASE_TYPE ]]; then + RELEASE_TYPE="$ARG" + else + exitWithErrorSuggestHelp "Unrecognized argument: $ARG" + fi +done + +# +# validate the input +# +if [[ $(( $STASH_DIRTY_FILES + $COMMIT_DIRTY_FILES + $IGNORE_DIRTY_FILES )) > 1 ]]; then + exitWithErrorSuggestHelp "The --stash-dirty-files, --commit-dirty-files and --ignore-dirty-files arguments are mutually exclusive and can't be used with each other" +fi +if [[ ! -z $RELEASE_TYPE ]]; then + if [[ ! -z $SET_VERSION ]]; then + exitWithErrorSuggestHelp "The release type can't be specified when --set-version is used" + elif [[ $RELEASE_TYPE != "major" && $RELEASE_TYPE != "minor" && $RELEASE_TYPE != "patch" ]]; then + exitWithErrorSuggestHelp "The release type argument must be one of: 'major', 'minor' or 'patch'" + fi +elif [[ -z $SET_VERSION ]]; then + if [[ -z $RELEASE_TYPE ]]; then + exitWithErrorSuggestHelp "The release type ('major', 'minor' or 'patch') must be specified as an argument." + fi +fi + +# +# figure out what the current version is +# +FRAMEWORK_PLIST_FILE="Info-Target.plist" +FRAMEWORK_PLIST_PATH="$SCRIPT_DIR/../$FRAMEWORK_PLIST_FILE" +PLIST_BUDDY=/usr/libexec/PlistBuddy +CURRENT_VERSION=`$PLIST_BUDDY "$FRAMEWORK_PLIST_PATH" -c "Print :CFBundleShortVersionString"` +validateVersion "$CURRENT_VERSION" "the CFBundleShortVersionString value in the $FRAMEWORK_PLIST_FILE file" + +# +# now, do the right thing depending on the command-line arguments +# +if [[ ! -z $SET_VERSION ]]; then + VERSION=$SET_VERSION +elif [[ ! -z $RELEASE_TYPE ]]; then + MAJOR_VERSION=`echo $CURRENT_VERSION | awk -F . '{print int($1)}'` + MINOR_VERSION=`echo $CURRENT_VERSION | awk -F . '{print int($2)}'` + PATCH_VERSION=`echo $CURRENT_VERSION | awk -F . '{print int($3)}'` + + case $RELEASE_TYPE in + major) + MAJOR_VERSION=$(( $MAJOR_VERSION + 1 )) + MINOR_VERSION=0 + PATCH_VERSION=0 + ;; + + minor) + MINOR_VERSION=$(( $MINOR_VERSION + 1 )) + PATCH_VERSION=0 + ;; + + patch) + PATCH_VERSION=$(( $PATCH_VERSION + 1 )) + ;; + esac + + VERSION="${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}" +fi + +# +# try to figure out the origin repo name +# +REPO_NAME=$(git remote -v | grep "^origin" | grep "(fetch)" | awk '{print $2}' | xargs basename | sed 'sq.git$qq') +if [[ -z "$REPO_NAME" ]]; then + exitWithErrorSuggestHelp "Couldn't determine repo name" +fi + +# +# output a warning if there are conflicting tag flags +# +if [[ $TAG_WHEN_DONE && $NO_TAG ]]; then + exitWithErrorSuggestHelp "--tag can't be specified with --no-tag, --no-commit or --ignore-dirty-files" +fi + +# +# see if we've got uncommitted changes +# +git rev-parse --quiet --verify HEAD > /dev/null +if [[ $? == 0 ]]; then + git diff-index --quiet HEAD -- ; REPO_IS_DIRTY=$? +else + # if HEAD doesn't exist (which is how we get here), then treat the + # repo as if it were dirty + REPO_IS_DIRTY=1 +fi +if [[ $REPO_IS_DIRTY != 0 && $(( $STASH_DIRTY_FILES + $COMMIT_DIRTY_FILES + $IGNORE_DIRTY_FILES )) == 0 ]]; then + exitWithErrorSuggestHelp "You have uncommitted changes in this repo; won't do anything" "(use --stash-dirty-files, --commit-dirty-files or\n\t--ignore-dirty-files to bypass this error)" +fi +REPO_URL=`git remote get-url --push origin 2> /dev/null` +if [[ $? == 0 ]]; then + git ls-remote --heads $REPO_URL $BRANCH | grep "refs/heads/$BRANCH" > /dev/null + if [[ $? == 0 ]]; then + REMOTE_BRANCH_EXISTS=1 + fi +fi +if [[ ! $REMOTE_BRANCH_EXISTS ]]; then + GIT_PUSH_ARGS="--set-upstream origin $BRANCH" +fi + +confirmationPrompt "Releasing $REPO_NAME $VERSION (current is $CURRENT_VERSION)" + +if [[ $REPO_IS_DIRTY && $STASH_DIRTY_FILES > 0 ]]; then + updateStatus "Stashing modified files" + executeCommand "git stash" + trap cleanupDirtyStash EXIT +fi + +# +# make sure it builds +# +XCODEBUILD=/usr/bin/xcodebuild +XCODEBUILD_CMD="$XCODEBUILD" +updateStatus "Verifying that $REPO_NAME builds" +if [[ $QUIET ]]; then + XCODEBUILD_CMD="$XCODEBUILD -quiet" +fi +if [[ ! -x "$XCODEBUILD" ]]; then + exitWithErrorSuggestHelp "Expected to find xcodebuild at path $XCODEBUILD" +fi + +# +# use xcpretty if it is available +# +XCODEBUILD_PIPETO="" +XCPRETTY=`which xcpretty` +if [[ $? == 0 ]]; then + XCODEBUILD_PIPETO="| $XCPRETTY" +fi + +# +# determine build settings +# +PROJECT_SPECIFIER="-project RaptureXML.xcodeproj" +COMPILE_PLATFORMS="iOS macOS tvOS watchOS" +PROJECT_NAME="RaptureXML" + +# +# build for each platform +# +for PLATFORM in $COMPILE_PLATFORMS; do + updateStatus "Building: $PROJECT_NAME for $PLATFORM..." + summarize "building $PROJECT_NAME for $PLATFORM" + if [[ $SKIP_TESTS ]]; then + BUILD_ACTION="clean build" + else + BUILD_ACTION="clean $(testActionForPlatform $PLATFORM)" + fi + RUN_DESTINATION="$(runDestinationForPlatform $PLATFORM)" + if [[ $QUIET ]]; then + executeCommand "$XCODEBUILD_CMD $PROJECT_SPECIFIER -scheme \"${REPO_NAME}\" -configuration Debug -destination \"$RUN_DESTINATION\" $BUILD_ACTION $XCODEBUILD_PIPETO" 2&> /dev/null + else + executeCommand "$XCODEBUILD_CMD $PROJECT_SPECIFIER -scheme \"${REPO_NAME}\" -configuration Debug -destination \"$RUN_DESTINATION\" $BUILD_ACTION $XCODEBUILD_PIPETO" + fi +done + +# +# bump version numbers +# +updateStatus "Adjusting version numbers" +executeCommand "$PLIST_BUDDY \"$FRAMEWORK_PLIST_PATH\" -c \"Set :CFBundleShortVersionString $VERSION\"" +agvtool bump > /dev/null +summarize "bumped version to $VERSION from $CURRENT_VERSION for $RELEASE_TYPE release" + +# +# commit changes +# +BUILD_NUMBER=`agvtool vers -terse` +if [[ -z $COMMIT_MESSAGE ]]; then + COMMIT_MESSAGE="Release $VERSION (build $BUILD_NUMBER)" + if [[ $REPO_IS_DIRTY && $COMMIT_DIRTY_FILES > 0 ]]; then + COMMIT_MESSAGE="$COMMIT_MESSAGE -- committed with other changes" + fi +else + COMMIT_MESSAGE="[$VERSION] $COMMIT_MESSAGE" +fi +if [[ -z $NO_COMMIT ]]; then + updateStatus "Committing changes" + printf "%s" "$COMMIT_MESSAGE" | git commit -a $QUIET_ARG $AMEND_ARGS -F - + summarize "committed changes to \"$BRANCH\" branch" +else + updateStatus "! Not committing changes; --no-commit or --ignore-dirty-files was specified" + printf "> To commit manually, use:\n\n git commit -a -m '$COMMIT_MESSAGE'\n" +fi + +# +# rebase with existing changes if needed +# +if [[ $REBASE && $REMOTE_BRANCH_EXISTS ]]; then + updateStatus "Rebasing with existing $BRANCH branch" + executeCommand "git pull origin $BRANCH $QUIET_ARG --rebase --allow-unrelated-histories --strategy=recursive -Xtheirs" + summarize "rebased \"$BRANCH\" branch" +fi + +# +# tag repo with new version number +# +if [[ $TAG_WHEN_DONE && -z $NO_COMMIT && -z $NO_TAG ]]; then + updateStatus "Tagging repo for $VERSION release" + executeCommand "git tag -a $VERSION -m 'Release $VERSION issued by $SCRIPT_NAME'" + summarize "tagged \"$BRANCH\" branch with $VERSION" +else + updateStatus "! Not tagging repo; --tag was not specified" + printf "> To tag manually, use:\n\n git tag -a $VERSION -m 'Release $VERSION issued by $SCRIPT_NAME'\n" +fi + +# +# push if we should +# +if [[ $PUSH_WHEN_DONE && -z $NO_COMMIT ]]; then + ORIGIN_URL=`git remote get-url --push origin` + updateStatus "Pushing changes to \"$BRANCH\" branch of $ORIGIN_URL" + executeCommand "git push $QUIET_ARG $GIT_PUSH_ARGS" + if [[ $TAG_WHEN_DONE && !$NO_TAG ]]; then + executeCommand "git push --tags $QUIET_ARG" + fi + summarize "pushed changes to \"$BRANCH\" branch of $ORIGIN_URL" +else + printf "\n> REMEMBER: The release isn't done until you push the changes! Don't forget to:\n\n git push && git push --tags\n" +fi diff --git a/BuildControl/bin/travisBuildHelper.sh b/BuildControl/bin/travisBuildHelper.sh new file mode 100755 index 0000000..addbe16 --- /dev/null +++ b/BuildControl/bin/travisBuildHelper.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +set -o pipefail + +if [[ $# != 2 ]]; then + echo "error: Expecting 2 arguments; " + exit 1 +fi + +OPERATION="$1" +PLATFORM="$2" + +SCRIPT_NAME=$(basename "$0") +SCRIPT_DIR=$(cd "$PWD" ; cd `dirname "$0"` ; echo "$PWD") + +source "${SCRIPT_DIR}/include-common.sh" + +BUILD_ACTION="clean $(testActionForPlatform $PLATFORM)" +DESTINATION=$(runDestinationForPlatform $PLATFORM) + +( set -o pipefail && xcodebuild -project RaptureXML.xcodeproj -configuration Debug -scheme "RaptureXML" -destination "$DESTINATION" -destination-timeout 300 $BUILD_ACTION 2>&1 | tee "RaptureXML-$PLATFORM-$OPERATION.log" | xcpretty ) +XCODE_RESULT="${PIPESTATUS[0]}" +if [[ "$XCODE_RESULT" == "0" ]]; then + rm "RaptureXML-$PLATFORM-$OPERATION.log" + exit 0 +fi + +exit $XCODE_RESULT diff --git a/BuildControl/bin/validatePullRequest.sh b/BuildControl/bin/validatePullRequest.sh new file mode 100755 index 0000000..b772793 --- /dev/null +++ b/BuildControl/bin/validatePullRequest.sh @@ -0,0 +1,157 @@ +#!/bin/bash + +# +# validates that a pull request builds & passes all unit tests +# +# by emaloney, 11 September 2017 +# + +set -o pipefail # to ensure xcodebuild pipeline errors are propagated correctly + +SCRIPT_NAME=$(basename "$0") +SCRIPT_DIR=$(cd "$PWD" ; cd `dirname "$0"` ; echo "$PWD") + +source "${SCRIPT_DIR}/include-common.sh" + +showHelp() +{ + define HELP < [--owner ] + +Where: + + is the GitHub branch published by that corresponds to the + given pull request being validated. + + is the GitHub organization or user under which the pull request + was posted. This argument may be omitted if is the same as the + owner of this repo. + +Optional arguments: + + -o + Shorthand for --owner + + --skip-tests + Skips running the unit tests :-( + + --quiet (or -q) + Silences output + +Help + + This documentation is displayed when supplying the --help (or -help, -h, + or -?) argument. + + Note that when this script displays help documentation, all other + command line arguments are ignored and no other actions are performed. + +HELP + printf "$HELP" | less +} + +# +# make sure we're in a git repo +# +cd "$SCRIPT_DIR/../../." +git status 2&> /dev/null +if [[ $? != 0 ]]; then + exitWithErrorSuggestHelp "You must invoke this script from within a git repo" +fi + +# +# figure out the default --owner +# +ORIGIN_URL=`git remote get-url origin` +if [[ `echo $ORIGIN_URL | grep -c "^https://"` > 0 ]]; then + DEFAULT_OWNER=`echo $ORIGIN_URL | sed "sq^https://.*github.com/qq" | sed "sq/.*qq"` +elif [[ `echo $ORIGIN_URL | grep -c "^ssh://"` > 0 ]]; then + DEFAULT_OWNER=`echo $ORIGIN_URL | sed "sq^ssh://.*github.com/qq" | sed "sq/.*qq"` +else + DEFAULT_OWNER=`echo $ORIGIN_URL | sed "sq.*:qq" | sed "sq/.*qq"` +fi + +# +# parse the command-line arguments +# +QUIET_ARG="" +OWNER="$DEFAULT_OWNER" +while [[ $1 ]]; do + case $1 in + --owner|-o) + if [[ $2 ]]; then + OWNER="$2" + shift + fi + ;; + + --skip-tests) + SKIP_TESTS=1 + ;; + + --quiet|-q) + QUIET=1 + QUIET_ARG="-q" + ;; + + --help|-help|-h|-\?) + SHOW_HELP=1 + ;; + + -*) + exitWithErrorSuggestHelp "Unrecognized argument: $1" + ;; + + *) + if [[ -z $BRANCH ]]; then + BRANCH=$1 + elif [[ -z $ARGS ]]; then + ARGS=$1 + else + ARGS="$ARGS $1" + fi + esac + shift +done + +if [[ $SHOW_HELP ]]; then + showHelp + exit 1 +fi + +if [[ -z $BRANCH ]]; then + exitWithErrorSuggestHelp "The pull request branch name must be specified" +fi + +for ARG in $ARGS; do + exitWithErrorSuggestHelp "Unrecognized argument: $ARG" +done + +# +# clone the repo using the pull request branch +# +PROJECT_NAME="RaptureXML" +REPO_URL="ssh://github.com/$OWNER/$PROJECT_NAME" +REPO_TEMP_DIR=`mktemp -d` +updateStatus "Cloning $BRANCH from $REPO_URL into $REPO_TEMP_DIR" +cd "$REPO_TEMP_DIR" +executeCommand "git clone --recursive $QUIET_ARG -b $BRANCH $REPO_URL" +cd "$PROJECT_NAME" + +# +# execute buildCheck.sh, preferring the one in the repo (if any) +# +BUILD_CHECK_SCRIPT="BuildControl/bin/buildCheck.sh" +if [[ -e "$BUILD_CHECK_SCRIPT" ]]; then + executeCommand "$BUILD_CHECK_SCRIPT $QUIET_ARG" +else + exitWithError "Couldn't find expected script at $PWD/$BUILD_CHECK_SCRIPT" +fi + +updateStatus "Success! The $BRANCH branch of $PROJECT_NAME passes all checks." diff --git a/BuildControl/config/Debug.xcconfig b/BuildControl/config/Debug.xcconfig new file mode 100644 index 0000000..f1d6b8c --- /dev/null +++ b/BuildControl/config/Debug.xcconfig @@ -0,0 +1,6 @@ +#include "Target.xcconfig" + +ONLY_ACTIVE_ARCH = YES +SWIFT_OPTIMIZATION_LEVEL = -Onone +SWIFT_ACTIVE_COMPILATION_CONDITIONS = $(inherited) DEBUG +ENABLE_BITCODE = NO diff --git a/BuildControl/config/Project.xcconfig b/BuildControl/config/Project.xcconfig new file mode 100644 index 0000000..d6a0aae --- /dev/null +++ b/BuildControl/config/Project.xcconfig @@ -0,0 +1,56 @@ +SUPPORTED_PLATFORMS = iphoneos iphonesimulator macosx appletvos appletvsimulator watchos watchsimulator +TARGETED_DEVICE_FAMILY = 1,2,3,4 + +//////////////////////////////////////////////////////////////////////////////// +// +// iOS-specific settings +// +IPHONEOS_DEPLOYMENT_TARGET = 9.0 + +VALID_ARCHS[sdk=iphoneos*] = arm64 armv7 armv7s +VALID_ARCHS[sdk=iphonesimulator*] = i386 x86_64 + +LD_RUNPATH_SEARCH_PATHS[sdk=iphoneos*] = @executable_path/Frameworks @loader_path/Frameworks +LD_RUNPATH_SEARCH_PATHS[sdk=iphonesimulator*] = @executable_path/Frameworks @loader_path/Frameworks + +ENABLE_BITCODE[sdk=iphone*] = YES + +//////////////////////////////////////////////////////////////////////////////// +// +// macOS-specific settings +// +MACOSX_DEPLOYMENT_TARGET = 10.11 + +VALID_ARCHS[sdk=macosx*] = i386 x86_64 + +LD_RUNPATH_SEARCH_PATHS[sdk=macosx*] = @executable_path/../Frameworks @loader_path/../Frameworks + +ENABLE_BITCODE[sdk=macosx*] = NO + +//////////////////////////////////////////////////////////////////////////////// +// +// tvOS-specific settings +// +TVOS_DEPLOYMENT_TARGET = 9.0 + +VALID_ARCHS[sdk=appletvos*] = arm64 +VALID_ARCHS[sdk=appletvsimulator*] = x86_64 + +LD_RUNPATH_SEARCH_PATHS[sdk=appletvos*] = @executable_path/Frameworks @loader_path/Frameworks +LD_RUNPATH_SEARCH_PATHS[sdk=appletvsimulator*] = @executable_path/Frameworks @loader_path/Frameworks + +ENABLE_BITCODE[sdk=appletv*] = YES + +//////////////////////////////////////////////////////////////////////////////// +// +// watchOS-specific settings +// +WATCHOS_DEPLOYMENT_TARGET = 2.0 + +VALID_ARCHS[sdk=watchos*] = armv7k +VALID_ARCHS[sdk=watchsimulator*] = i386 + +LD_RUNPATH_SEARCH_PATHS[sdk=watchos*] = @executable_path/Frameworks @loader_path/Frameworks +LD_RUNPATH_SEARCH_PATHS[sdk=watchsimulator*] = @executable_path/Frameworks @loader_path/Frameworks + +ENABLE_BITCODE[sdk=watch*] = YES diff --git a/BuildControl/config/Release.xcconfig b/BuildControl/config/Release.xcconfig new file mode 100644 index 0000000..4bc5365 --- /dev/null +++ b/BuildControl/config/Release.xcconfig @@ -0,0 +1,5 @@ +#include "Target.xcconfig" + +ONLY_ACTIVE_ARCH = NO +SWIFT_OPTIMIZATION_LEVEL = -Owholemodule +BITCODE_GENERATION_MODE = bitcode diff --git a/BuildControl/config/Target.xcconfig b/BuildControl/config/Target.xcconfig new file mode 100644 index 0000000..a98190b --- /dev/null +++ b/BuildControl/config/Target.xcconfig @@ -0,0 +1,5 @@ +PRODUCT_NAME = RaptureXML +PRODUCT_BUNDLE_IDENTIFIER = com.raptureinvenice.$(PRODUCT_NAME:rfc1034identifier) +INFOPLIST_FILE = BuildControl/Info-Target.plist +DYLIB_CURRENT_VERSION = $(CURRENT_PROJECT_VERSION) + diff --git a/BuildControl/config/Tests.xcconfig b/BuildControl/config/Tests.xcconfig new file mode 100644 index 0000000..5cfdfa4 --- /dev/null +++ b/BuildControl/config/Tests.xcconfig @@ -0,0 +1,5 @@ +INFOPLIST_FILE = BuildControl/Info-Tests.plist +PRODUCT_NAME = RaptureXMLUnitTests +PRODUCT_BUNDLE_IDENTIFIER = com.raptureinvenice.test.$(PRODUCT_NAME:rfc1034identifier) +SWIFT_OPTIMIZATION_LEVEL = -Onone +ONLY_ACTIVE_ARCH = YES diff --git a/BuildControl/repos.xml b/BuildControl/repos.xml new file mode 100644 index 0000000..82ede10 --- /dev/null +++ b/BuildControl/repos.xml @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The Cleanroom Project began as an experiment to re-imagine Gilt’s iOS codebase in a legacy-free, Swift-based incarnation. + +Since then, we’ve expanded the Cleanroom Project to include multi-platform support. Much of our codebase now supports tvOS in addition to iOS, and our lower-level code is usable on macOS and watchOS as well. + +Cleanroom Project code serves as the foundation of Gilt on TV, our tvOS app [featured by Apple during the launch of the new Apple TV](http://www.apple.com/apple-events/september-2015/). And as time goes on, we'll be replacing more and more of our existing Objective-C codebase with Cleanroom implementations. + +In the meantime, we’ll be tracking the latest releases of Swift & Xcode, and [open-sourcing major portions of our codebase](https://github.com/gilt/Cleanroom#open-source-by-default) along the way. + If you’d like to contribute to this or any other Cleanroom Project repo, please read [the contribution guidelines](https://github.com/gilt/Cleanroom#contributing-to-the-cleanroom-project). + API documentation is generated using [Realm](http://realm.io)’s [jazzy](https://github.com/realm/jazzy/) project, maintained by [JP Simard](https://github.com/jpsim) and [Samuel E. Giddins](https://github.com/segiddins). + + + + + + Over the years, Gilt Groupe has used and refined Mockingbird Library as the base for its various Apple Platform projects. + +Mockingbird began life as AppFramework, created by Jesse Boyes. + +AppFramework found a home at Gilt Groupe and eventually became Mockingbird Library. + +In recent years, Mockingbird Library has been developed and maintained by Evan Maloney. + API documentation is generated using [appledoc](http://gentlebytes.com/appledoc/) from [Gentle Bytes](http://gentlebytes.com/). + + + + + + + + + + + + + + + + + + + + + diff --git a/Documentation/API/Blocks/RXMLBlock.html b/Documentation/API/Blocks/RXMLBlock.html new file mode 100644 index 0000000..1d4781e --- /dev/null +++ b/Documentation/API/Blocks/RXMLBlock.html @@ -0,0 +1,109 @@ + + + + + + RXMLBlock Block Reference + + + + + + +
+
+ +

+ RaptureXML +

+ +

+ Rapture In Venice +

+ +
+
+ + + +
+
+
+
+

RXMLBlock Block Reference

+ + +
+ + + + +
Declared inRXMLElement.h
+ + + + + + + + + + +

Block Definition

+

RXMLBlock

+ + +typedef void (^RXMLBlock) (RXMLElement *element) + + + + + +
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/Documentation/API/Classes/RXMLDocHolder.html b/Documentation/API/Classes/RXMLDocHolder.html new file mode 100644 index 0000000..cb10abf --- /dev/null +++ b/Documentation/API/Classes/RXMLDocHolder.html @@ -0,0 +1,166 @@ + + + + + + RXMLDocHolder Class Reference + + + + + + +
+
+ +

+ RaptureXML +

+ +

+ Rapture In Venice +

+ +
+
+ + + +
+
+
+
+

RXMLDocHolder Class Reference

+ + +
+ + + + + + + +
Inherits fromNSObject
Declared inRXMLElement.h
+ + + + + + +
+ + + + + + +
+
+ +

– initWithDocPtr: +

+ +
+
+ +
+ + +
- (id)initWithDocPtr:(xmlDocPtr)doc
+ + +
+
+
+ +

– doc +

+ +
+
+ +
+ + +
- (xmlDocPtr)doc
+ + +
+
+
+
+ +
+ + + + + + +
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/Documentation/API/Classes/RXMLElement.html b/Documentation/API/Classes/RXMLElement.html new file mode 100644 index 0000000..8654138 --- /dev/null +++ b/Documentation/API/Classes/RXMLElement.html @@ -0,0 +1,987 @@ + + + + + + RXMLElement Class Reference + + + + + + +
+
+ +

+ RaptureXML +

+ +

+ Rapture In Venice +

+ +
+
+ + + +
+
+
+
+

RXMLElement Class Reference

+ + +
+ + + + + + + + + + +
Inherits fromNSObject
Conforms toNSCopying
Declared inRXMLElement.h
+ + + + + + +
+ + + + + + +
+
+ +

– initFromXMLString:encoding: +

+ +
+
+ +
+ + +
- (id)initFromXMLString:(NSString *)xmlString encoding:(NSStringEncoding)encoding
+ + +
+
+
+ +

– initFromXMLFile: +

+ +
+
+ +
+ + +
- (id)initFromXMLFile:(NSString *)filename
+ + +
+
+
+ +

– initFromXMLFile:fileExtension: +

+ +
+
+ +
+ + +
- (id)initFromXMLFile:(NSString *)filename fileExtension:(NSString *)extension
+ + +
+
+
+ +

– initFromXMLFilePath: +

+ +
+
+ +
+ + +
- (id)initFromXMLFilePath:(NSString *)fullPath
+ + +
+
+
+ +

– initFromURL: +

+ +
+
+ +
+ + +
- (id)initFromURL:(NSURL *)url
+ + +
+
+
+ +

– initFromXMLData: +

+ +
+
+ +
+ + +
- (id)initFromXMLData:(NSData *)data
+ + +
+
+
+ +

– initFromXMLDoc:node: +

+ +
+
+ +
+ + +
- (id)initFromXMLDoc:(RXMLDocHolder *)doc node:(xmlNodePtr)node
+ + +
+
+
+ +

– initFromHTMLString:encoding: +

+ +
+
+ +
+ + +
- (id)initFromHTMLString:(NSString *)xmlString encoding:(NSStringEncoding)encoding
+ + +
+
+
+ +

– initFromHTMLFile: +

+ +
+
+ +
+ + +
- (id)initFromHTMLFile:(NSString *)filename
+ + +
+
+
+ +

– initFromHTMLFile:fileExtension: +

+ +
+
+ +
+ + +
- (id)initFromHTMLFile:(NSString *)filename fileExtension:(NSString *)extension
+ + +
+
+
+ +

– initFromHTMLFilePath: +

+ +
+
+ +
+ + +
- (id)initFromHTMLFilePath:(NSString *)fullPath
+ + +
+
+
+ +

– initFromHTMLData: +

+ +
+
+ +
+ + +
- (id)initFromHTMLData:(NSData *)data
+ + +
+
+
+ +

+ elementFromXMLString:encoding: +

+ +
+
+ +
+ + +
+ (id)elementFromXMLString:(NSString *)xmlString encoding:(NSStringEncoding)encoding
+ + +
+
+
+ +

+ elementFromXMLFile: +

+ +
+
+ +
+ + +
+ (id)elementFromXMLFile:(NSString *)filename
+ + +
+
+
+ +

+ elementFromXMLFilename:fileExtension: +

+ +
+
+ +
+ + +
+ (id)elementFromXMLFilename:(NSString *)filename fileExtension:(NSString *)extension
+ + +
+
+
+ +

+ elementFromXMLFilePath: +

+ +
+
+ +
+ + +
+ (id)elementFromXMLFilePath:(NSString *)fullPath
+ + +
+
+
+ +

+ elementFromURL: +

+ +
+
+ +
+ + +
+ (id)elementFromURL:(NSURL *)url
+ + +
+
+
+ +

+ elementFromXMLData: +

+ +
+
+ +
+ + +
+ (id)elementFromXMLData:(NSData *)data
+ + +
+
+
+ +

+ elementFromXMLDoc:node: +

+ +
+
+ +
+ + +
+ (id)elementFromXMLDoc:(RXMLDocHolder *)doc node:(xmlNodePtr)node
+ + +
+
+
+ +

+ elementFromHTMLString:encoding: +

+ +
+
+ +
+ + +
+ (id)elementFromHTMLString:(NSString *)xmlString encoding:(NSStringEncoding)encoding
+ + +
+
+
+ +

+ elementFromHTMLFile: +

+ +
+
+ +
+ + +
+ (id)elementFromHTMLFile:(NSString *)filename
+ + +
+
+
+ +

+ elementFromHTMLFile:fileExtension: +

+ +
+
+ +
+ + +
+ (id)elementFromHTMLFile:(NSString *)filename fileExtension:(NSString *)extension
+ + +
+
+
+ +

+ elementFromHTMLFilePath: +

+ +
+
+ +
+ + +
+ (id)elementFromHTMLFilePath:(NSString *)fullPath
+ + +
+
+
+ +

+ elementFromHTMLData: +

+ +
+
+ +
+ + +
+ (id)elementFromHTMLData:(NSData *)data
+ + +
+
+
+ +

– attribute: +

+ +
+
+ +
+ + +
- (NSString *)attribute:(NSString *)attributeName
+ + +
+
+
+ +

– attribute:inNamespace: +

+ +
+
+ +
+ + +
- (NSString *)attribute:(NSString *)attributeName inNamespace:(NSString *)ns
+ + +
+
+
+ +

– attributeNames +

+ +
+
+ +
+ + +
- (NSArray *)attributeNames
+ + +
+
+
+ +

– attributeAsInt: +

+ +
+
+ +
+ + +
- (NSInteger)attributeAsInt:(NSString *)attributeName
+ + +
+
+
+ +

– attributeAsInt:inNamespace: +

+ +
+
+ +
+ + +
- (NSInteger)attributeAsInt:(NSString *)attributeName inNamespace:(NSString *)ns
+ + +
+
+
+ +

– attributeAsDouble: +

+ +
+
+ +
+ + +
- (double)attributeAsDouble:(NSString *)attributeName
+ + +
+
+
+ +

– attributeAsDouble:inNamespace: +

+ +
+
+ +
+ + +
- (double)attributeAsDouble:(NSString *)attributeName inNamespace:(NSString *)ns
+ + +
+
+
+ +

– child: +

+ +
+
+ +
+ + +
- (RXMLElement *)child:(NSString *)tag
+ + +
+
+
+ +

– child:inNamespace: +

+ +
+
+ +
+ + +
- (RXMLElement *)child:(NSString *)tag inNamespace:(NSString *)ns
+ + +
+
+
+ +

– children: +

+ +
+
+ +
+ + +
- (NSArray *)children:(NSString *)tag
+ + +
+
+
+ +

– children:inNamespace: +

+ +
+
+ +
+ + +
- (NSArray *)children:(NSString *)tag inNamespace:(NSString *)ns
+ + +
+
+
+ +

– childrenWithRootXPath: +

+ +
+
+ +
+ + +
- (NSArray *)childrenWithRootXPath:(NSString *)xpath
+ + +
+
+
+ +

– iterate:usingBlock: +

+ +
+
+ +
+ + +
- (void)iterate:(NSString *)query usingBlock:(void ( ^ ) ( RXMLElement *))blk
+ + +
+
+
+ +

– iterateWithRootXPath:usingBlock: +

+ +
+
+ +
+ + +
- (void)iterateWithRootXPath:(NSString *)xpath usingBlock:(void ( ^ ) ( RXMLElement *))blk
+ + +
+
+
+ +

– iterateElements:usingBlock: +

+ +
+
+ +
+ + +
- (void)iterateElements:(NSArray *)elements usingBlock:(void ( ^ ) ( RXMLElement *))blk
+ + +
+
+
+ +

  xmlDoc +

+ +
+
+ +
+ + +
@property (nonatomic, strong) RXMLDocHolder *xmlDoc
+ + +
+
+
+ +

  tag +

+ +
+
+ +
+ + +
@property (nonatomic, readonly) NSString *tag
+ + +
+
+
+ +

  text +

+ +
+
+ +
+ + +
@property (nonatomic, readonly) NSString *text
+ + +
+
+
+ +

  xml +

+ +
+
+ +
+ + +
@property (nonatomic, readonly) NSString *xml
+ + +
+
+
+ +

  innerXml +

+ +
+
+ +
+ + +
@property (nonatomic, readonly) NSString *innerXml
+ + +
+
+
+ +

  textAsInt +

+ +
+
+ +
+ + +
@property (nonatomic, readonly) NSInteger textAsInt
+ + +
+
+
+ +

  textAsDouble +

+ +
+
+ +
+ + +
@property (nonatomic, readonly) double textAsDouble
+ + +
+
+
+ +

  isValid +

+ +
+
+ +
+ + +
@property (nonatomic, readonly) BOOL isValid
+ + +
+
+
+
+ +
+ + + + + + +
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/Documentation/API/css/scss/_index.scss b/Documentation/API/css/scss/_index.scss new file mode 100644 index 0000000..6a57ec5 --- /dev/null +++ b/Documentation/API/css/scss/_index.scss @@ -0,0 +1,17 @@ +.index-container { + -webkit-flex-direction: column; + flex-direction: column; + + @media (min-width: $desktop-min-width) { + display: flex; + -webkit-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: wrap; + flex-wrap: wrap; + } + + .index-column { + -webkit-flex: 1 1 33%; + flex: 1 1 33%; + } +} diff --git a/Documentation/API/css/scss/_layout.scss b/Documentation/API/css/scss/_layout.scss new file mode 100644 index 0000000..da46aef --- /dev/null +++ b/Documentation/API/css/scss/_layout.scss @@ -0,0 +1,302 @@ +* { + box-sizing: border-box; +} + +.clear { + clear: both; +} + +.clearfix { + &:before, &:after { + clear: both; + display: table; + content: ""; + } +} + +.xcode .hide-in-xcode { + display: none; +} + +body { + font: 62.5% $body-font; + background: $body-background; + + @media (max-width: $mobile-max-width) { + background-color: $content-background; + } +} + +h1, h2, h3 { + font-weight: 300; + color: #808080; +} + +h1 { + font-size: 2em; + color: #000; +} + +h4 { + font-size: 13px; + line-height: 1.5; + margin: 21px 0 0 0; +} + +a { + color: $tint-color; + text-decoration: none; +} + +pre, code { + font-family: $code-font; + word-wrap: break-word; +} + +pre > code, .method-declaration code { + display: inline-block; + font-size: .85em; + padding: 4px 0 4px 10px; + border-left: 5px solid rgba(0, 155, 51, .2); + + &:before { + content: "Objective-C"; + display: block; + + font: 9px/1 $body-font; + color: #009b33; + text-transform: uppercase; + letter-spacing: 2px; + padding-bottom: 6px; + } +} + +pre > code { + font-size: inherit; +} + +table, th, td { + border: 1px solid #e9e9e9; +} + +table { + width: 100%; +} + +th, td { + padding: 7px; + + > :first-child { + margin-top: 0; + } + + > :last-child { + margin-bottom: 0; + } +} + +.container { + @extend .clearfix; + + max-width: 980px; + padding: 0 10px; + margin: 0 auto; + + @media (max-width: $mobile-max-width) { + padding: 0; + } +} + +header { + position: fixed; + top: 0; + left: 0; + width: 100%; + z-index: 2; + + background: #414141; + color: #fff; + font-size: 1.1em; + line-height: 25px; + letter-spacing: .05em; + + #library-title { + float: left; + } + + #developer-home { + float: right; + } + + h1 { + font-size: inherit; + font-weight: inherit; + margin: 0; + } + + p { + margin: 0; + } + + h1, a { + color: inherit; + } + + @media (max-width: $mobile-max-width) { + .container { + padding: 0 10px; + } + } +} + +aside { + position: fixed; + top: 25px; + left: 0; + width: 100%; + height: 25px; + z-index: 2; + + font-size: 1.1em; + + #header-buttons { + background: rgba(255, 255, 255, .8); + margin: 0 1px; + padding: 0; + list-style: none; + text-align: right; + line-height: 32px; + + li { + display: inline-block; + cursor: pointer; + padding: 0 10px; + } + + label, select { + cursor: inherit; + } + + #on-this-page { + position: relative; + + .chevron { + display: inline-block; + width: 14px; + height: 4px; + position: relative; + + .chevy { + background: #878787; + height: 2px; + position: absolute; + width: 10px; + + &.chevron-left { + left: 0; + transform: rotateZ(45deg) scale(0.6); + } + + &.chevron-right { + right: 0; + transform: rotateZ(-45deg) scale(0.6); + } + } + } + + #jump-to { + opacity: 0; + font-size: 16px; + + position: absolute; + top: 5px; + left: 0; + width: 100%; + height: 100%; + } + } + } +} + +article { + margin-top: 25px; + + #content { + @extend .clearfix; + + background: $content-background; + border: 1px solid $content-border; + padding: 15px 25px 30px 25px; + + font-size: 1.4em; + line-height: 1.45; + + position: relative; + + @media (max-width: $mobile-max-width) { + padding: 15px 10px 20px 10px; + border: none; + } + + .navigation-top { + position: absolute; + top: 15px; + right: 25px; + } + + .title { + margin: 21px 0 0 0; + padding: 15px 0; + } + + p { + color: #414141; + margin: 0 0 15px 0; + } + + th, td { + p:last-child { + margin-bottom: 0; + } + } + + main { + ul { + list-style: none; + margin-left: 24px; + margin-bottom: 12px; + padding: 0; + + li { + position: relative; + padding-left: 1.3em; + + &:before { + content: "\02022"; + + color: #414141; + font-size: 1.08em; + line-height: 1; + + position: absolute; + left: 0; + padding-top: 2px; + } + } + } + } + + footer { + @extend .clearfix; + + .footer-copyright { + margin: 70px 25px 10px 0; + } + + p { + font-size: .71em; + color: #a0a0a0; + } + } + } +} diff --git a/Documentation/API/css/scss/_normalize.scss b/Documentation/API/css/scss/_normalize.scss new file mode 100644 index 0000000..9b8848a --- /dev/null +++ b/Documentation/API/css/scss/_normalize.scss @@ -0,0 +1,581 @@ +/* ========================================================================== + Normalize.scss settings + ========================================================================== */ +/** + * Includes legacy browser support IE6/7 + * + * Set to false if you want to drop support for IE6 and IE7 + */ + +$legacy_browser_support: false !default; + +/* Base + ========================================================================== */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + * 3. Corrects text resizing oddly in IE 6/7 when body `font-size` is set using + * `em` units. + */ + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ + @if $legacy_browser_support { + *font-size: 100%; /* 3 */ + } +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* HTML5 display definitions + ========================================================================== */ + +/** + * Correct `block` display not defined for any HTML5 element in IE 8/9. + * Correct `block` display not defined for `details` or `summary` in IE 10/11 + * and Firefox. + * Correct `block` display not defined for `main` in IE 11. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} + +/** + * 1. Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ + +audio, +canvas, +progress, +video { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ + @if $legacy_browser_support { + *display: inline; + *zoom: 1; + } +} + +/** + * Prevents modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9/10. + * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. + */ + +[hidden], +template { + display: none; +} + +/* Links + ========================================================================== */ + +/** + * Remove the gray background color from active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ + +a { + &:active, &:hover { + outline: 0; + }; +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Address styling not present in IE 8/9/10/11, Safari, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +@if $legacy_browser_support { + blockquote { + margin: 1em 40px; + } +} + +/** + * Address styling not present in Safari and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +@if $legacy_browser_support { + h2 { + font-size: 1.5em; + margin: 0.83em 0; + } + + h3 { + font-size: 1.17em; + margin: 1em 0; + } + + h4 { + font-size: 1em; + margin: 1.33em 0; + } + + h5 { + font-size: 0.83em; + margin: 1.67em 0; + } + + h6 { + font-size: 0.67em; + margin: 2.33em 0; + } +} + +/** + * Addresses styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +@if $legacy_browser_support { + + /** + * Addresses margins set differently in IE 6/7. + */ + + p, + pre { + *margin: 1em 0; + } + + /* + * Addresses CSS quotes not supported in IE 6/7. + */ + + q { + *quotes: none; + } + + /* + * Addresses `quotes` property not supported in Safari 4. + */ + + q:before, + q:after { + content: ''; + content: none; + } +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +@if $legacy_browser_support { + + /* ========================================================================== + Lists + ========================================================================== */ + + /* + * Addresses margins set differently in IE 6/7. + */ + + dl, + menu, + ol, + ul { + *margin: 1em 0; + } + + dd { + *margin: 0 0 0 40px; + } + + /* + * Addresses paddings set differently in IE 6/7. + */ + + menu, + ol, + ul { + *padding: 0 0 0 40px; + } + + /* + * Corrects list images handled incorrectly in IE 7. + */ + + nav ul, + nav ol { + *list-style: none; + *list-style-image: none; + } + +} + +/* Embedded content + ========================================================================== */ + +/** + * 1. Remove border when inside `a` element in IE 8/9/10. + * 2. Improves image quality when scaled in IE 7. + */ + +img { + border: 0; + @if $legacy_browser_support { + *-ms-interpolation-mode: bicubic; /* 2 */ + } +} + +/** + * Correct overflow not hidden in IE 9/10/11. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Grouping content + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari. + */ + +figure { + margin: 1em 40px; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +/** + * Contain overflow in all browsers. + */ + +pre { + overflow: auto; +} + +/** + * Address odd `em`-unit font size rendering in all browsers. + * Correct font family set oddly in IE 6, Safari 4/5, and Chrome. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + @if $legacy_browser_support { + _font-family: 'courier new', monospace; + } + font-size: 1em; +} + +/* Forms + ========================================================================== */ + +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ + +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. + * 4. Improves appearance and consistency in all browsers. + */ + +button, +input, +optgroup, +select, +textarea { + color: inherit; /* 1 */ + font: inherit; /* 2 */ + margin: 0; /* 3 */ + @if $legacy_browser_support { + vertical-align: baseline; /* 3 */ + *vertical-align: middle; /* 3 */ + } +} + +/** + * Address `overflow` set to `hidden` in IE 8/9/10/11. + */ + +button { + overflow: visible; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. + * Correct `select` style inheritance in Firefox. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + * 4. Removes inner spacing in IE 7 without affecting normal text inputs. + * Known issue: inner spacing remains in IE 6. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ + @if $legacy_browser_support { + *overflow: visible; /* 4 */ + } +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +input { + line-height: normal; +} + +/** + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + * Known issue: excess padding remains in IE 6. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ + @if $legacy_browser_support { + *height: 13px; /* 3 */ + *width: 13px; /* 3 */ + } +} + +/** + * Fix the cursor style for Chrome's increment/decrement buttons. For certain + * `font-size` values of the `input`, it causes the cursor style of the + * decrement button to change from `default` to `text`. + */ + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9/10/11. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + * 3. Corrects text not wrapping in Firefox 3. + * 4. Corrects alignment displayed oddly in IE 6/7. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ + @if $legacy_browser_support { + white-space: normal; /* 3 */ + *margin-left: -7px; /* 4 */ + } +} + +/** + * Remove default vertical scrollbar in IE 8/9/10/11. + */ + +textarea { + overflow: auto; +} + +/** + * Don't inherit the `font-weight` (applied by a rule above). + * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + */ + +optgroup { + font-weight: bold; +} + +/* Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} diff --git a/Documentation/API/css/scss/_object.scss b/Documentation/API/css/scss/_object.scss new file mode 100644 index 0000000..22eebd8 --- /dev/null +++ b/Documentation/API/css/scss/_object.scss @@ -0,0 +1,89 @@ +.section-specification { + table { + width: auto; + + th { + text-align: left; + } + } +} + +.method-title { + margin-left: -15px; + margin-bottom: 8px; + transition: margin-left .3s ease-out; + + .section-method.hide & { + margin-left: 0; + } + + code { + font-weight: 400; + font-size: .85em; + } +} + +.method-info { + background: $object-background; + border-bottom: 1px solid $object-border; + margin: 0 -25px; + padding: 20px 25px 0 25px; + transition: height .3s ease-out; + + position: relative; + + .pointy-thing { + background: $content-background; + height: 10px; + border-bottom: 1px solid $object-border; + margin: -20px -25px 16px -25px; + + &:before { + display: inline-block; + content: ""; + + background: $object-background; + border: 1px solid $object-border; + border-bottom: 0; + border-right: 0; + + position: absolute; + left: 21px; + top: 3px; + width: 12px; + height: 12px; + transform: rotate(45deg); + } + } + + .method-subsection { + margin-bottom: 15px; + + .argument-name { + width: 1px; + text-align: right; + + code { + color: #808080; + font-style: italic; + font-weight: 400; + } + } + } +} + +.section-method { + &.hide .method-info { + height: 0 !important; + overflow: hidden; + display: none; + } + + &.hide.animating .method-info { + display: block; + } + + &.animating .method-info { + overflow: hidden; + } +} diff --git a/Documentation/API/css/scss/_print.scss b/Documentation/API/css/scss/_print.scss new file mode 100644 index 0000000..61bdf99 --- /dev/null +++ b/Documentation/API/css/scss/_print.scss @@ -0,0 +1,42 @@ +@media print { + body { + background: #fff; + padding: 8px; + } + + header { + position: static; + background: #fff; + color: #000; + } + + aside { + display: none; + } + + .container { + max-width: none; + padding: 0; + } + + article { + margin-top: 0; + + #content { + border: 0; + background: #fff; + padding: 15px 0 0 0; + + .title { + margin-top: 0; + padding-top: 0; + } + } + } + + .method-info { + &, & .pointy-thing { + background: #fff; + } + } +} diff --git a/Documentation/API/css/scss/_variables.scss b/Documentation/API/css/scss/_variables.scss new file mode 100644 index 0000000..38e072d --- /dev/null +++ b/Documentation/API/css/scss/_variables.scss @@ -0,0 +1,12 @@ +$body-font: -apple-system-font, "Helvetica Neue", Helvetica, sans-serif; +$code-font: "Source Code Pro", Monaco, Menlo, Consolas, monospace; + +$body-background: #f2f2f2; +$content-background: #fff; +$content-border: #e9e9e9; +$tint-color: #08c; +$object-background: #f9f9f9; +$object-border: #e9e9e9; + +$mobile-max-width: 650px; +$desktop-min-width: 768px; \ No newline at end of file diff --git a/Documentation/API/css/scss/_xcode.scss b/Documentation/API/css/scss/_xcode.scss new file mode 100644 index 0000000..340b1f6 --- /dev/null +++ b/Documentation/API/css/scss/_xcode.scss @@ -0,0 +1,29 @@ +.xcode { + header, aside { + display: none; + } + + .container { + padding: 0; + } + + article { + margin-top: 0; + + #content { + border: 0; + margin: 0; + } + } + + .method-info { + &, .section-method.hide & { + max-height: auto; + overflow: visible; + + &.hiding { + display: block; + } + } + } +} diff --git a/Documentation/API/css/scss/style.scss b/Documentation/API/css/scss/style.scss new file mode 100644 index 0000000..648a608 --- /dev/null +++ b/Documentation/API/css/scss/style.scss @@ -0,0 +1 @@ +@import "variables", "normalize", "layout", "index", "object", "print", "xcode"; diff --git a/Documentation/API/css/style.css b/Documentation/API/css/style.css new file mode 100644 index 0000000..d9d59dd --- /dev/null +++ b/Documentation/API/css/style.css @@ -0,0 +1,2 @@ +html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}*{box-sizing:border-box}.clear{clear:both}.clearfix:before,.container:before,article #content:before,article #content footer:before,.clearfix:after,.container:after,article #content:after,article #content footer:after{clear:both;display:table;content:""}.xcode .hide-in-xcode{display:none}body{font:62.5% -apple-system-font,"Helvetica Neue",Helvetica,sans-serif;background:#f2f2f2}@media (max-width: 650px){body{background-color:#fff}}h1,h2,h3{font-weight:300;color:#808080}h1{font-size:2em;color:#000}h4{font-size:13px;line-height:1.5;margin:21px 0 0 0}a{color:#08c;text-decoration:none}pre,code{font-family:"Source Code Pro",Monaco,Menlo,Consolas,monospace;word-wrap:break-word}pre>code,.method-declaration code{display:inline-block;font-size:.85em;padding:4px 0 4px 10px;border-left:5px solid rgba(0,155,51,0.2)}pre>code:before,.method-declaration code:before{content:"Objective-C";display:block;font:9px/1 -apple-system-font,"Helvetica Neue",Helvetica,sans-serif;color:#009b33;text-transform:uppercase;letter-spacing:2px;padding-bottom:6px}pre>code{font-size:inherit}table,th,td{border:1px solid #e9e9e9}table{width:100%}th,td{padding:7px}th>:first-child,td>:first-child{margin-top:0}th>:last-child,td>:last-child{margin-bottom:0}.container{max-width:980px;padding:0 10px;margin:0 auto}@media (max-width: 650px){.container{padding:0}}header{position:fixed;top:0;left:0;width:100%;z-index:2;background:#414141;color:#fff;font-size:1.1em;line-height:25px;letter-spacing:.05em}header #library-title{float:left}header #developer-home{float:right}header h1{font-size:inherit;font-weight:inherit;margin:0}header p{margin:0}header h1,header a{color:inherit}@media (max-width: 650px){header .container{padding:0 10px}}aside{position:fixed;top:25px;left:0;width:100%;height:25px;z-index:2;font-size:1.1em}aside #header-buttons{background:rgba(255,255,255,0.8);margin:0 1px;padding:0;list-style:none;text-align:right;line-height:32px}aside #header-buttons li{display:inline-block;cursor:pointer;padding:0 10px}aside #header-buttons label,aside #header-buttons select{cursor:inherit}aside #header-buttons #on-this-page{position:relative}aside #header-buttons #on-this-page .chevron{display:inline-block;width:14px;height:4px;position:relative}aside #header-buttons #on-this-page .chevron .chevy{background:#878787;height:2px;position:absolute;width:10px}aside #header-buttons #on-this-page .chevron .chevy.chevron-left{left:0;transform:rotateZ(45deg) scale(0.6)}aside #header-buttons #on-this-page .chevron .chevy.chevron-right{right:0;transform:rotateZ(-45deg) scale(0.6)}aside #header-buttons #on-this-page #jump-to{opacity:0;font-size:16px;position:absolute;top:5px;left:0;width:100%;height:100%}article{margin-top:25px}article #content{background:#fff;border:1px solid #e9e9e9;padding:15px 25px 30px 25px;font-size:1.4em;line-height:1.45;position:relative}@media (max-width: 650px){article #content{padding:15px 10px 20px 10px;border:none}}article #content .navigation-top{position:absolute;top:15px;right:25px}article #content .title{margin:21px 0 0 0;padding:15px 0}article #content p{color:#414141;margin:0 0 15px 0}article #content th p:last-child,article #content td p:last-child{margin-bottom:0}article #content main ul{list-style:none;margin-left:24px;margin-bottom:12px;padding:0}article #content main ul li{position:relative;padding-left:1.3em}article #content main ul li:before{content:"\02022";color:#414141;font-size:1.08em;line-height:1;position:absolute;left:0;padding-top:2px}article #content footer .footer-copyright{margin:70px 25px 10px 0}article #content footer p{font-size:.71em;color:#a0a0a0}.index-container{-webkit-flex-direction:column;flex-direction:column}@media (min-width: 768px){.index-container{display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;flex-wrap:wrap}}.index-container .index-column{-webkit-flex:1 1 33%;flex:1 1 33%}.section-specification table{width:auto}.section-specification table th{text-align:left}.method-title{margin-left:-15px;margin-bottom:8px;transition:margin-left .3s ease-out}.section-method.hide .method-title{margin-left:0}.method-title code{font-weight:400;font-size:.85em}.method-info{background:#f9f9f9;border-bottom:1px solid #e9e9e9;margin:0 -25px;padding:20px 25px 0 25px;transition:height .3s ease-out;position:relative}.method-info .pointy-thing{background:#fff;height:10px;border-bottom:1px solid #e9e9e9;margin:-20px -25px 16px -25px}.method-info .pointy-thing:before{display:inline-block;content:"";background:#f9f9f9;border:1px solid #e9e9e9;border-bottom:0;border-right:0;position:absolute;left:21px;top:3px;width:12px;height:12px;-webkit-transform:rotate(45deg);transform:rotate(45deg) }.method-info .method-subsection{margin-bottom:15px}.method-info .method-subsection .argument-name{width:1px;text-align:right}.method-info .method-subsection .argument-name code{color:#808080;font-style:italic;font-weight:400}.section-method.hide .method-info{height:0 !important;overflow:hidden;display:none}.section-method.hide.animating .method-info{display:block}.section-method.animating .method-info{overflow:hidden}@media print{body{background:#fff;padding:8px}header{position:static;background:#fff;color:#000}aside{display:none}.container{max-width:none;padding:0}article{margin-top:0}article #content{border:0;background:#fff;padding:15px 0 0 0}article #content .title{margin-top:0;padding-top:0}.method-info,.method-info .pointy-thing{background:#fff}}.xcode header,.xcode aside{display:none}.xcode .container{padding:0}.xcode article{margin-top:0}.xcode article #content{border:0;margin:0}.xcode .method-info,.section-method.hide .xcode .method-info{max-height:auto;overflow:visible}.xcode .method-info.hiding,.section-method.hide .xcode .method-info.hiding{display:block} + diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Info.plist b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Info.plist new file mode 100644 index 0000000..83f65d6 --- /dev/null +++ b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Info.plist @@ -0,0 +1,35 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleIdentifier + com.raptureinvenice.documentation.RaptureXML + CFBundleName + RaptureXML Documentation + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + + + + + DocSetFeedName + RaptureXML Documentation + + DocSetMinimumXcodeVersion + 3.0 + DocSetPlatformFamily + iphoneos + DashDocSetFamily + appledoc + DocSetPublisherIdentifier + com.raptureinvenice.documentation.documentation + DocSetPublisherName + Rapture In Venice + NSHumanReadableCopyright + Copyright © 2017 Rapture In Venice. All rights reserved. + + diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/Blocks/RXMLBlock.html b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/Blocks/RXMLBlock.html new file mode 100644 index 0000000..1d4781e --- /dev/null +++ b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/Blocks/RXMLBlock.html @@ -0,0 +1,109 @@ + + + + + + RXMLBlock Block Reference + + + + + + +
+
+ +

+ RaptureXML +

+ +

+ Rapture In Venice +

+ +
+
+ + + +
+
+
+
+

RXMLBlock Block Reference

+ + +
+ + + + +
Declared inRXMLElement.h
+ + + + + + + + + + +

Block Definition

+

RXMLBlock

+ + +typedef void (^RXMLBlock) (RXMLElement *element) + + + + + +
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/Classes/RXMLDocHolder.html b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/Classes/RXMLDocHolder.html new file mode 100644 index 0000000..cb10abf --- /dev/null +++ b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/Classes/RXMLDocHolder.html @@ -0,0 +1,166 @@ + + + + + + RXMLDocHolder Class Reference + + + + + + +
+
+ +

+ RaptureXML +

+ +

+ Rapture In Venice +

+ +
+
+ + + +
+
+
+
+

RXMLDocHolder Class Reference

+ + +
+ + + + + + + +
Inherits fromNSObject
Declared inRXMLElement.h
+ + + + + + +
+ + + + + + +
+
+ +

– initWithDocPtr: +

+ +
+
+ +
+ + +
- (id)initWithDocPtr:(xmlDocPtr)doc
+ + +
+
+
+ +

– doc +

+ +
+
+ +
+ + +
- (xmlDocPtr)doc
+ + +
+
+
+
+ +
+ + + + + + +
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/Classes/RXMLElement.html b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/Classes/RXMLElement.html new file mode 100644 index 0000000..8654138 --- /dev/null +++ b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/Classes/RXMLElement.html @@ -0,0 +1,987 @@ + + + + + + RXMLElement Class Reference + + + + + + +
+
+ +

+ RaptureXML +

+ +

+ Rapture In Venice +

+ +
+
+ + + +
+
+
+
+

RXMLElement Class Reference

+ + +
+ + + + + + + + + + +
Inherits fromNSObject
Conforms toNSCopying
Declared inRXMLElement.h
+ + + + + + +
+ + + + + + +
+
+ +

– initFromXMLString:encoding: +

+ +
+
+ +
+ + +
- (id)initFromXMLString:(NSString *)xmlString encoding:(NSStringEncoding)encoding
+ + +
+
+
+ +

– initFromXMLFile: +

+ +
+
+ +
+ + +
- (id)initFromXMLFile:(NSString *)filename
+ + +
+
+
+ +

– initFromXMLFile:fileExtension: +

+ +
+
+ +
+ + +
- (id)initFromXMLFile:(NSString *)filename fileExtension:(NSString *)extension
+ + +
+
+
+ +

– initFromXMLFilePath: +

+ +
+
+ +
+ + +
- (id)initFromXMLFilePath:(NSString *)fullPath
+ + +
+
+
+ +

– initFromURL: +

+ +
+
+ +
+ + +
- (id)initFromURL:(NSURL *)url
+ + +
+
+
+ +

– initFromXMLData: +

+ +
+
+ +
+ + +
- (id)initFromXMLData:(NSData *)data
+ + +
+
+
+ +

– initFromXMLDoc:node: +

+ +
+
+ +
+ + +
- (id)initFromXMLDoc:(RXMLDocHolder *)doc node:(xmlNodePtr)node
+ + +
+
+
+ +

– initFromHTMLString:encoding: +

+ +
+
+ +
+ + +
- (id)initFromHTMLString:(NSString *)xmlString encoding:(NSStringEncoding)encoding
+ + +
+
+
+ +

– initFromHTMLFile: +

+ +
+
+ +
+ + +
- (id)initFromHTMLFile:(NSString *)filename
+ + +
+
+
+ +

– initFromHTMLFile:fileExtension: +

+ +
+
+ +
+ + +
- (id)initFromHTMLFile:(NSString *)filename fileExtension:(NSString *)extension
+ + +
+
+
+ +

– initFromHTMLFilePath: +

+ +
+
+ +
+ + +
- (id)initFromHTMLFilePath:(NSString *)fullPath
+ + +
+
+
+ +

– initFromHTMLData: +

+ +
+
+ +
+ + +
- (id)initFromHTMLData:(NSData *)data
+ + +
+
+
+ +

+ elementFromXMLString:encoding: +

+ +
+
+ +
+ + +
+ (id)elementFromXMLString:(NSString *)xmlString encoding:(NSStringEncoding)encoding
+ + +
+
+
+ +

+ elementFromXMLFile: +

+ +
+
+ +
+ + +
+ (id)elementFromXMLFile:(NSString *)filename
+ + +
+
+
+ +

+ elementFromXMLFilename:fileExtension: +

+ +
+
+ +
+ + +
+ (id)elementFromXMLFilename:(NSString *)filename fileExtension:(NSString *)extension
+ + +
+
+
+ +

+ elementFromXMLFilePath: +

+ +
+
+ +
+ + +
+ (id)elementFromXMLFilePath:(NSString *)fullPath
+ + +
+
+
+ +

+ elementFromURL: +

+ +
+
+ +
+ + +
+ (id)elementFromURL:(NSURL *)url
+ + +
+
+
+ +

+ elementFromXMLData: +

+ +
+
+ +
+ + +
+ (id)elementFromXMLData:(NSData *)data
+ + +
+
+
+ +

+ elementFromXMLDoc:node: +

+ +
+
+ +
+ + +
+ (id)elementFromXMLDoc:(RXMLDocHolder *)doc node:(xmlNodePtr)node
+ + +
+
+
+ +

+ elementFromHTMLString:encoding: +

+ +
+
+ +
+ + +
+ (id)elementFromHTMLString:(NSString *)xmlString encoding:(NSStringEncoding)encoding
+ + +
+
+
+ +

+ elementFromHTMLFile: +

+ +
+
+ +
+ + +
+ (id)elementFromHTMLFile:(NSString *)filename
+ + +
+
+
+ +

+ elementFromHTMLFile:fileExtension: +

+ +
+
+ +
+ + +
+ (id)elementFromHTMLFile:(NSString *)filename fileExtension:(NSString *)extension
+ + +
+
+
+ +

+ elementFromHTMLFilePath: +

+ +
+
+ +
+ + +
+ (id)elementFromHTMLFilePath:(NSString *)fullPath
+ + +
+
+
+ +

+ elementFromHTMLData: +

+ +
+
+ +
+ + +
+ (id)elementFromHTMLData:(NSData *)data
+ + +
+
+
+ +

– attribute: +

+ +
+
+ +
+ + +
- (NSString *)attribute:(NSString *)attributeName
+ + +
+
+
+ +

– attribute:inNamespace: +

+ +
+
+ +
+ + +
- (NSString *)attribute:(NSString *)attributeName inNamespace:(NSString *)ns
+ + +
+
+
+ +

– attributeNames +

+ +
+
+ +
+ + +
- (NSArray *)attributeNames
+ + +
+
+
+ +

– attributeAsInt: +

+ +
+
+ +
+ + +
- (NSInteger)attributeAsInt:(NSString *)attributeName
+ + +
+
+
+ +

– attributeAsInt:inNamespace: +

+ +
+
+ +
+ + +
- (NSInteger)attributeAsInt:(NSString *)attributeName inNamespace:(NSString *)ns
+ + +
+
+
+ +

– attributeAsDouble: +

+ +
+
+ +
+ + +
- (double)attributeAsDouble:(NSString *)attributeName
+ + +
+
+
+ +

– attributeAsDouble:inNamespace: +

+ +
+
+ +
+ + +
- (double)attributeAsDouble:(NSString *)attributeName inNamespace:(NSString *)ns
+ + +
+
+
+ +

– child: +

+ +
+
+ +
+ + +
- (RXMLElement *)child:(NSString *)tag
+ + +
+
+
+ +

– child:inNamespace: +

+ +
+
+ +
+ + +
- (RXMLElement *)child:(NSString *)tag inNamespace:(NSString *)ns
+ + +
+
+
+ +

– children: +

+ +
+
+ +
+ + +
- (NSArray *)children:(NSString *)tag
+ + +
+
+
+ +

– children:inNamespace: +

+ +
+
+ +
+ + +
- (NSArray *)children:(NSString *)tag inNamespace:(NSString *)ns
+ + +
+
+
+ +

– childrenWithRootXPath: +

+ +
+
+ +
+ + +
- (NSArray *)childrenWithRootXPath:(NSString *)xpath
+ + +
+
+
+ +

– iterate:usingBlock: +

+ +
+
+ +
+ + +
- (void)iterate:(NSString *)query usingBlock:(void ( ^ ) ( RXMLElement *))blk
+ + +
+
+
+ +

– iterateWithRootXPath:usingBlock: +

+ +
+
+ +
+ + +
- (void)iterateWithRootXPath:(NSString *)xpath usingBlock:(void ( ^ ) ( RXMLElement *))blk
+ + +
+
+
+ +

– iterateElements:usingBlock: +

+ +
+
+ +
+ + +
- (void)iterateElements:(NSArray *)elements usingBlock:(void ( ^ ) ( RXMLElement *))blk
+ + +
+
+
+ +

  xmlDoc +

+ +
+
+ +
+ + +
@property (nonatomic, strong) RXMLDocHolder *xmlDoc
+ + +
+
+
+ +

  tag +

+ +
+
+ +
+ + +
@property (nonatomic, readonly) NSString *tag
+ + +
+
+
+ +

  text +

+ +
+
+ +
+ + +
@property (nonatomic, readonly) NSString *text
+ + +
+
+
+ +

  xml +

+ +
+
+ +
+ + +
@property (nonatomic, readonly) NSString *xml
+ + +
+
+
+ +

  innerXml +

+ +
+
+ +
+ + +
@property (nonatomic, readonly) NSString *innerXml
+ + +
+
+
+ +

  textAsInt +

+ +
+
+ +
+ + +
@property (nonatomic, readonly) NSInteger textAsInt
+ + +
+
+
+ +

  textAsDouble +

+ +
+
+ +
+ + +
@property (nonatomic, readonly) double textAsDouble
+ + +
+
+
+ +

  isValid +

+ +
+
+ +
+ + +
@property (nonatomic, readonly) BOOL isValid
+ + +
+
+
+
+ +
+ + + + + + +
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/scss/_index.scss b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/scss/_index.scss new file mode 100644 index 0000000..6a57ec5 --- /dev/null +++ b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/scss/_index.scss @@ -0,0 +1,17 @@ +.index-container { + -webkit-flex-direction: column; + flex-direction: column; + + @media (min-width: $desktop-min-width) { + display: flex; + -webkit-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: wrap; + flex-wrap: wrap; + } + + .index-column { + -webkit-flex: 1 1 33%; + flex: 1 1 33%; + } +} diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/scss/_layout.scss b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/scss/_layout.scss new file mode 100644 index 0000000..da46aef --- /dev/null +++ b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/scss/_layout.scss @@ -0,0 +1,302 @@ +* { + box-sizing: border-box; +} + +.clear { + clear: both; +} + +.clearfix { + &:before, &:after { + clear: both; + display: table; + content: ""; + } +} + +.xcode .hide-in-xcode { + display: none; +} + +body { + font: 62.5% $body-font; + background: $body-background; + + @media (max-width: $mobile-max-width) { + background-color: $content-background; + } +} + +h1, h2, h3 { + font-weight: 300; + color: #808080; +} + +h1 { + font-size: 2em; + color: #000; +} + +h4 { + font-size: 13px; + line-height: 1.5; + margin: 21px 0 0 0; +} + +a { + color: $tint-color; + text-decoration: none; +} + +pre, code { + font-family: $code-font; + word-wrap: break-word; +} + +pre > code, .method-declaration code { + display: inline-block; + font-size: .85em; + padding: 4px 0 4px 10px; + border-left: 5px solid rgba(0, 155, 51, .2); + + &:before { + content: "Objective-C"; + display: block; + + font: 9px/1 $body-font; + color: #009b33; + text-transform: uppercase; + letter-spacing: 2px; + padding-bottom: 6px; + } +} + +pre > code { + font-size: inherit; +} + +table, th, td { + border: 1px solid #e9e9e9; +} + +table { + width: 100%; +} + +th, td { + padding: 7px; + + > :first-child { + margin-top: 0; + } + + > :last-child { + margin-bottom: 0; + } +} + +.container { + @extend .clearfix; + + max-width: 980px; + padding: 0 10px; + margin: 0 auto; + + @media (max-width: $mobile-max-width) { + padding: 0; + } +} + +header { + position: fixed; + top: 0; + left: 0; + width: 100%; + z-index: 2; + + background: #414141; + color: #fff; + font-size: 1.1em; + line-height: 25px; + letter-spacing: .05em; + + #library-title { + float: left; + } + + #developer-home { + float: right; + } + + h1 { + font-size: inherit; + font-weight: inherit; + margin: 0; + } + + p { + margin: 0; + } + + h1, a { + color: inherit; + } + + @media (max-width: $mobile-max-width) { + .container { + padding: 0 10px; + } + } +} + +aside { + position: fixed; + top: 25px; + left: 0; + width: 100%; + height: 25px; + z-index: 2; + + font-size: 1.1em; + + #header-buttons { + background: rgba(255, 255, 255, .8); + margin: 0 1px; + padding: 0; + list-style: none; + text-align: right; + line-height: 32px; + + li { + display: inline-block; + cursor: pointer; + padding: 0 10px; + } + + label, select { + cursor: inherit; + } + + #on-this-page { + position: relative; + + .chevron { + display: inline-block; + width: 14px; + height: 4px; + position: relative; + + .chevy { + background: #878787; + height: 2px; + position: absolute; + width: 10px; + + &.chevron-left { + left: 0; + transform: rotateZ(45deg) scale(0.6); + } + + &.chevron-right { + right: 0; + transform: rotateZ(-45deg) scale(0.6); + } + } + } + + #jump-to { + opacity: 0; + font-size: 16px; + + position: absolute; + top: 5px; + left: 0; + width: 100%; + height: 100%; + } + } + } +} + +article { + margin-top: 25px; + + #content { + @extend .clearfix; + + background: $content-background; + border: 1px solid $content-border; + padding: 15px 25px 30px 25px; + + font-size: 1.4em; + line-height: 1.45; + + position: relative; + + @media (max-width: $mobile-max-width) { + padding: 15px 10px 20px 10px; + border: none; + } + + .navigation-top { + position: absolute; + top: 15px; + right: 25px; + } + + .title { + margin: 21px 0 0 0; + padding: 15px 0; + } + + p { + color: #414141; + margin: 0 0 15px 0; + } + + th, td { + p:last-child { + margin-bottom: 0; + } + } + + main { + ul { + list-style: none; + margin-left: 24px; + margin-bottom: 12px; + padding: 0; + + li { + position: relative; + padding-left: 1.3em; + + &:before { + content: "\02022"; + + color: #414141; + font-size: 1.08em; + line-height: 1; + + position: absolute; + left: 0; + padding-top: 2px; + } + } + } + } + + footer { + @extend .clearfix; + + .footer-copyright { + margin: 70px 25px 10px 0; + } + + p { + font-size: .71em; + color: #a0a0a0; + } + } + } +} diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/scss/_normalize.scss b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/scss/_normalize.scss new file mode 100644 index 0000000..9b8848a --- /dev/null +++ b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/scss/_normalize.scss @@ -0,0 +1,581 @@ +/* ========================================================================== + Normalize.scss settings + ========================================================================== */ +/** + * Includes legacy browser support IE6/7 + * + * Set to false if you want to drop support for IE6 and IE7 + */ + +$legacy_browser_support: false !default; + +/* Base + ========================================================================== */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + * 3. Corrects text resizing oddly in IE 6/7 when body `font-size` is set using + * `em` units. + */ + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ + @if $legacy_browser_support { + *font-size: 100%; /* 3 */ + } +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* HTML5 display definitions + ========================================================================== */ + +/** + * Correct `block` display not defined for any HTML5 element in IE 8/9. + * Correct `block` display not defined for `details` or `summary` in IE 10/11 + * and Firefox. + * Correct `block` display not defined for `main` in IE 11. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} + +/** + * 1. Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ + +audio, +canvas, +progress, +video { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ + @if $legacy_browser_support { + *display: inline; + *zoom: 1; + } +} + +/** + * Prevents modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9/10. + * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. + */ + +[hidden], +template { + display: none; +} + +/* Links + ========================================================================== */ + +/** + * Remove the gray background color from active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ + +a { + &:active, &:hover { + outline: 0; + }; +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Address styling not present in IE 8/9/10/11, Safari, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +@if $legacy_browser_support { + blockquote { + margin: 1em 40px; + } +} + +/** + * Address styling not present in Safari and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +@if $legacy_browser_support { + h2 { + font-size: 1.5em; + margin: 0.83em 0; + } + + h3 { + font-size: 1.17em; + margin: 1em 0; + } + + h4 { + font-size: 1em; + margin: 1.33em 0; + } + + h5 { + font-size: 0.83em; + margin: 1.67em 0; + } + + h6 { + font-size: 0.67em; + margin: 2.33em 0; + } +} + +/** + * Addresses styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +@if $legacy_browser_support { + + /** + * Addresses margins set differently in IE 6/7. + */ + + p, + pre { + *margin: 1em 0; + } + + /* + * Addresses CSS quotes not supported in IE 6/7. + */ + + q { + *quotes: none; + } + + /* + * Addresses `quotes` property not supported in Safari 4. + */ + + q:before, + q:after { + content: ''; + content: none; + } +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +@if $legacy_browser_support { + + /* ========================================================================== + Lists + ========================================================================== */ + + /* + * Addresses margins set differently in IE 6/7. + */ + + dl, + menu, + ol, + ul { + *margin: 1em 0; + } + + dd { + *margin: 0 0 0 40px; + } + + /* + * Addresses paddings set differently in IE 6/7. + */ + + menu, + ol, + ul { + *padding: 0 0 0 40px; + } + + /* + * Corrects list images handled incorrectly in IE 7. + */ + + nav ul, + nav ol { + *list-style: none; + *list-style-image: none; + } + +} + +/* Embedded content + ========================================================================== */ + +/** + * 1. Remove border when inside `a` element in IE 8/9/10. + * 2. Improves image quality when scaled in IE 7. + */ + +img { + border: 0; + @if $legacy_browser_support { + *-ms-interpolation-mode: bicubic; /* 2 */ + } +} + +/** + * Correct overflow not hidden in IE 9/10/11. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Grouping content + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari. + */ + +figure { + margin: 1em 40px; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +/** + * Contain overflow in all browsers. + */ + +pre { + overflow: auto; +} + +/** + * Address odd `em`-unit font size rendering in all browsers. + * Correct font family set oddly in IE 6, Safari 4/5, and Chrome. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + @if $legacy_browser_support { + _font-family: 'courier new', monospace; + } + font-size: 1em; +} + +/* Forms + ========================================================================== */ + +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ + +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. + * 4. Improves appearance and consistency in all browsers. + */ + +button, +input, +optgroup, +select, +textarea { + color: inherit; /* 1 */ + font: inherit; /* 2 */ + margin: 0; /* 3 */ + @if $legacy_browser_support { + vertical-align: baseline; /* 3 */ + *vertical-align: middle; /* 3 */ + } +} + +/** + * Address `overflow` set to `hidden` in IE 8/9/10/11. + */ + +button { + overflow: visible; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. + * Correct `select` style inheritance in Firefox. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + * 4. Removes inner spacing in IE 7 without affecting normal text inputs. + * Known issue: inner spacing remains in IE 6. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ + @if $legacy_browser_support { + *overflow: visible; /* 4 */ + } +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +input { + line-height: normal; +} + +/** + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + * Known issue: excess padding remains in IE 6. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ + @if $legacy_browser_support { + *height: 13px; /* 3 */ + *width: 13px; /* 3 */ + } +} + +/** + * Fix the cursor style for Chrome's increment/decrement buttons. For certain + * `font-size` values of the `input`, it causes the cursor style of the + * decrement button to change from `default` to `text`. + */ + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9/10/11. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + * 3. Corrects text not wrapping in Firefox 3. + * 4. Corrects alignment displayed oddly in IE 6/7. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ + @if $legacy_browser_support { + white-space: normal; /* 3 */ + *margin-left: -7px; /* 4 */ + } +} + +/** + * Remove default vertical scrollbar in IE 8/9/10/11. + */ + +textarea { + overflow: auto; +} + +/** + * Don't inherit the `font-weight` (applied by a rule above). + * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + */ + +optgroup { + font-weight: bold; +} + +/* Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/scss/_object.scss b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/scss/_object.scss new file mode 100644 index 0000000..22eebd8 --- /dev/null +++ b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/scss/_object.scss @@ -0,0 +1,89 @@ +.section-specification { + table { + width: auto; + + th { + text-align: left; + } + } +} + +.method-title { + margin-left: -15px; + margin-bottom: 8px; + transition: margin-left .3s ease-out; + + .section-method.hide & { + margin-left: 0; + } + + code { + font-weight: 400; + font-size: .85em; + } +} + +.method-info { + background: $object-background; + border-bottom: 1px solid $object-border; + margin: 0 -25px; + padding: 20px 25px 0 25px; + transition: height .3s ease-out; + + position: relative; + + .pointy-thing { + background: $content-background; + height: 10px; + border-bottom: 1px solid $object-border; + margin: -20px -25px 16px -25px; + + &:before { + display: inline-block; + content: ""; + + background: $object-background; + border: 1px solid $object-border; + border-bottom: 0; + border-right: 0; + + position: absolute; + left: 21px; + top: 3px; + width: 12px; + height: 12px; + transform: rotate(45deg); + } + } + + .method-subsection { + margin-bottom: 15px; + + .argument-name { + width: 1px; + text-align: right; + + code { + color: #808080; + font-style: italic; + font-weight: 400; + } + } + } +} + +.section-method { + &.hide .method-info { + height: 0 !important; + overflow: hidden; + display: none; + } + + &.hide.animating .method-info { + display: block; + } + + &.animating .method-info { + overflow: hidden; + } +} diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/scss/_print.scss b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/scss/_print.scss new file mode 100644 index 0000000..61bdf99 --- /dev/null +++ b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/scss/_print.scss @@ -0,0 +1,42 @@ +@media print { + body { + background: #fff; + padding: 8px; + } + + header { + position: static; + background: #fff; + color: #000; + } + + aside { + display: none; + } + + .container { + max-width: none; + padding: 0; + } + + article { + margin-top: 0; + + #content { + border: 0; + background: #fff; + padding: 15px 0 0 0; + + .title { + margin-top: 0; + padding-top: 0; + } + } + } + + .method-info { + &, & .pointy-thing { + background: #fff; + } + } +} diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/scss/_variables.scss b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/scss/_variables.scss new file mode 100644 index 0000000..38e072d --- /dev/null +++ b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/scss/_variables.scss @@ -0,0 +1,12 @@ +$body-font: -apple-system-font, "Helvetica Neue", Helvetica, sans-serif; +$code-font: "Source Code Pro", Monaco, Menlo, Consolas, monospace; + +$body-background: #f2f2f2; +$content-background: #fff; +$content-border: #e9e9e9; +$tint-color: #08c; +$object-background: #f9f9f9; +$object-border: #e9e9e9; + +$mobile-max-width: 650px; +$desktop-min-width: 768px; \ No newline at end of file diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/scss/_xcode.scss b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/scss/_xcode.scss new file mode 100644 index 0000000..340b1f6 --- /dev/null +++ b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/scss/_xcode.scss @@ -0,0 +1,29 @@ +.xcode { + header, aside { + display: none; + } + + .container { + padding: 0; + } + + article { + margin-top: 0; + + #content { + border: 0; + margin: 0; + } + } + + .method-info { + &, .section-method.hide & { + max-height: auto; + overflow: visible; + + &.hiding { + display: block; + } + } + } +} diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/scss/style.scss b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/scss/style.scss new file mode 100644 index 0000000..648a608 --- /dev/null +++ b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/scss/style.scss @@ -0,0 +1 @@ +@import "variables", "normalize", "layout", "index", "object", "print", "xcode"; diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/style.css b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/style.css new file mode 100644 index 0000000..d9d59dd --- /dev/null +++ b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/css/style.css @@ -0,0 +1,2 @@ +html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}*{box-sizing:border-box}.clear{clear:both}.clearfix:before,.container:before,article #content:before,article #content footer:before,.clearfix:after,.container:after,article #content:after,article #content footer:after{clear:both;display:table;content:""}.xcode .hide-in-xcode{display:none}body{font:62.5% -apple-system-font,"Helvetica Neue",Helvetica,sans-serif;background:#f2f2f2}@media (max-width: 650px){body{background-color:#fff}}h1,h2,h3{font-weight:300;color:#808080}h1{font-size:2em;color:#000}h4{font-size:13px;line-height:1.5;margin:21px 0 0 0}a{color:#08c;text-decoration:none}pre,code{font-family:"Source Code Pro",Monaco,Menlo,Consolas,monospace;word-wrap:break-word}pre>code,.method-declaration code{display:inline-block;font-size:.85em;padding:4px 0 4px 10px;border-left:5px solid rgba(0,155,51,0.2)}pre>code:before,.method-declaration code:before{content:"Objective-C";display:block;font:9px/1 -apple-system-font,"Helvetica Neue",Helvetica,sans-serif;color:#009b33;text-transform:uppercase;letter-spacing:2px;padding-bottom:6px}pre>code{font-size:inherit}table,th,td{border:1px solid #e9e9e9}table{width:100%}th,td{padding:7px}th>:first-child,td>:first-child{margin-top:0}th>:last-child,td>:last-child{margin-bottom:0}.container{max-width:980px;padding:0 10px;margin:0 auto}@media (max-width: 650px){.container{padding:0}}header{position:fixed;top:0;left:0;width:100%;z-index:2;background:#414141;color:#fff;font-size:1.1em;line-height:25px;letter-spacing:.05em}header #library-title{float:left}header #developer-home{float:right}header h1{font-size:inherit;font-weight:inherit;margin:0}header p{margin:0}header h1,header a{color:inherit}@media (max-width: 650px){header .container{padding:0 10px}}aside{position:fixed;top:25px;left:0;width:100%;height:25px;z-index:2;font-size:1.1em}aside #header-buttons{background:rgba(255,255,255,0.8);margin:0 1px;padding:0;list-style:none;text-align:right;line-height:32px}aside #header-buttons li{display:inline-block;cursor:pointer;padding:0 10px}aside #header-buttons label,aside #header-buttons select{cursor:inherit}aside #header-buttons #on-this-page{position:relative}aside #header-buttons #on-this-page .chevron{display:inline-block;width:14px;height:4px;position:relative}aside #header-buttons #on-this-page .chevron .chevy{background:#878787;height:2px;position:absolute;width:10px}aside #header-buttons #on-this-page .chevron .chevy.chevron-left{left:0;transform:rotateZ(45deg) scale(0.6)}aside #header-buttons #on-this-page .chevron .chevy.chevron-right{right:0;transform:rotateZ(-45deg) scale(0.6)}aside #header-buttons #on-this-page #jump-to{opacity:0;font-size:16px;position:absolute;top:5px;left:0;width:100%;height:100%}article{margin-top:25px}article #content{background:#fff;border:1px solid #e9e9e9;padding:15px 25px 30px 25px;font-size:1.4em;line-height:1.45;position:relative}@media (max-width: 650px){article #content{padding:15px 10px 20px 10px;border:none}}article #content .navigation-top{position:absolute;top:15px;right:25px}article #content .title{margin:21px 0 0 0;padding:15px 0}article #content p{color:#414141;margin:0 0 15px 0}article #content th p:last-child,article #content td p:last-child{margin-bottom:0}article #content main ul{list-style:none;margin-left:24px;margin-bottom:12px;padding:0}article #content main ul li{position:relative;padding-left:1.3em}article #content main ul li:before{content:"\02022";color:#414141;font-size:1.08em;line-height:1;position:absolute;left:0;padding-top:2px}article #content footer .footer-copyright{margin:70px 25px 10px 0}article #content footer p{font-size:.71em;color:#a0a0a0}.index-container{-webkit-flex-direction:column;flex-direction:column}@media (min-width: 768px){.index-container{display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;flex-wrap:wrap}}.index-container .index-column{-webkit-flex:1 1 33%;flex:1 1 33%}.section-specification table{width:auto}.section-specification table th{text-align:left}.method-title{margin-left:-15px;margin-bottom:8px;transition:margin-left .3s ease-out}.section-method.hide .method-title{margin-left:0}.method-title code{font-weight:400;font-size:.85em}.method-info{background:#f9f9f9;border-bottom:1px solid #e9e9e9;margin:0 -25px;padding:20px 25px 0 25px;transition:height .3s ease-out;position:relative}.method-info .pointy-thing{background:#fff;height:10px;border-bottom:1px solid #e9e9e9;margin:-20px -25px 16px -25px}.method-info .pointy-thing:before{display:inline-block;content:"";background:#f9f9f9;border:1px solid #e9e9e9;border-bottom:0;border-right:0;position:absolute;left:21px;top:3px;width:12px;height:12px;-webkit-transform:rotate(45deg);transform:rotate(45deg) }.method-info .method-subsection{margin-bottom:15px}.method-info .method-subsection .argument-name{width:1px;text-align:right}.method-info .method-subsection .argument-name code{color:#808080;font-style:italic;font-weight:400}.section-method.hide .method-info{height:0 !important;overflow:hidden;display:none}.section-method.hide.animating .method-info{display:block}.section-method.animating .method-info{overflow:hidden}@media print{body{background:#fff;padding:8px}header{position:static;background:#fff;color:#000}aside{display:none}.container{max-width:none;padding:0}article{margin-top:0}article #content{border:0;background:#fff;padding:15px 0 0 0}article #content .title{margin-top:0;padding-top:0}.method-info,.method-info .pointy-thing{background:#fff}}.xcode header,.xcode aside{display:none}.xcode .container{padding:0}.xcode article{margin-top:0}.xcode article #content{border:0;margin:0}.xcode .method-info,.section-method.hide .xcode .method-info{max-height:auto;overflow:visible}.xcode .method-info.hiding,.section-method.hide .xcode .method-info.hiding{display:block} + diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/hierarchy.html b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/hierarchy.html new file mode 100644 index 0000000..074b14e --- /dev/null +++ b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/hierarchy.html @@ -0,0 +1,89 @@ + + + + + + RaptureXML Hierarchy + + + + + + +
+
+ +

+ RaptureXML +

+ +

+ Rapture In Venice +

+ +
+
+ + + +
+
+
+
+

RaptureXML Hierarchy

+ + +
+

Class Hierarchy

+ + + +
+ + + +
+ + + +
+ + +
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/img/button_bar_background.png b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/img/button_bar_background.png new file mode 100644 index 0000000..71d1019 Binary files /dev/null and b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/img/button_bar_background.png differ diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/img/disclosure.png b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/img/disclosure.png new file mode 100644 index 0000000..4c5cbf4 Binary files /dev/null and b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/img/disclosure.png differ diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/img/disclosure_open.png b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/img/disclosure_open.png new file mode 100644 index 0000000..82396fe Binary files /dev/null and b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/img/disclosure_open.png differ diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/img/library_background.png b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/img/library_background.png new file mode 100644 index 0000000..3006248 Binary files /dev/null and b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/img/library_background.png differ diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/img/title_background.png b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/img/title_background.png new file mode 100644 index 0000000..846e496 Binary files /dev/null and b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/img/title_background.png differ diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/index.html b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/index.html new file mode 100644 index 0000000..36cc988 --- /dev/null +++ b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/index.html @@ -0,0 +1,276 @@ + + + + + + RaptureXML Reference + + + + + + +
+
+ +

+ RaptureXML +

+ +

+ Rapture In Venice +

+ +
+
+ + + +
+
+
+
+

RaptureXML Reference

+ + +
+ + +

RaptureXML is a simple, block-based XML library for the iOS platform that provides an expressive API that makes XML processing freakin' fun for once in my life.

+ +

Why do we need another XML library?

+ +

You tell me. Processing XML in Objective-C is an awful, frustrating experience and the resulting code is never readable. I’m tired of it! RaptureXML solves this by providing a powerful new interface on top of libxml2. Imagine for a minute the code you’d write to process the XML for a list of baseball team members, retrieving their numbers, names, and positions using your favorite XML processing library. Now, take a look at how you do it with RaptureXML:

+ +
RXMLElement *rootXML = [RXMLElement elementFromXMLFile:@"players.xml"];
+
+[rootXML iterate:@"players.player" usingBlock: ^(RXMLElement *e) {
+    NSLog(@"Player #%@: %@", [e attribute:@"number"], [e child:@"name"].text);
+}];    
+
+ +

RaptureXML changes the game when it comes to XML processing in Objective-C. As you can see from the code, it takes only seconds to understand what this code does. There are no wasted arrays and verbose looping you have to do. The code is a breeze to read and maintain.

+ +

I don’t think any more needs to be said.

+ +

Adding RaptureXML to Your Project

+ +

The recommended way to add RaptureXML to your project is through CocoaPods. Simply add ‘RaptureXML’ into your Podfile.

+ +

To install manually, there’s just a few simple steps:

+ +
    +
  • Copy the RaptureXML/RaptureXML folder into your own project and import “RXMLElement.h” somewhere (e.g., your PCH file).
  • +
  • Link in libz.dylib to your target.
  • +
  • Link in libxml2.dylib to your target.
  • +
  • In your build settings, for the key “Header Search Paths”, add “$(SDK_DIR)”/usr/include/libxml2
  • +
+ + +

RaptureXML supports ARC. You are free to use any version of LLVM or gcc as well! (Though you should be using LLVM by now.)

+ +

ARC isn’t just supported, it’s required!

+ +

RaptureXML supports ARC. In fact, it only supports ARC. If you’re still running a project that doesn’t use ARC, RaptureXML won’t be your cup of tea.

+ +

Getting Started

+ +

RaptureXML processes XML in two steps: load and path. This means that you first load the XML from any source you want such as file, data, or string. Then, you simply use its query language to find what you need.

+ +

You can load the XML with any of the following constructors:

+ +
RXMLElement *rootXML = [RXMLElement elementFromXMLString:@"...my xml..." encoding:NSUTF8StringEncoding];
+RXMLElement *rootXML = [RXMLElement elementFromXMLFile:@"myfile.xml"];
+RXMLElement *rootXML = [RXMLElement elementFromXMLFilename:@"myfile" elementFromXMLFilename:@"xml"];
+RXMLElement *rootXML = [RXMLElement elementFromXMLData:myData];
+
+ +

These constructors return an RXMLElement object that represents the top-level tags. Now, you can query the data in any number of ways.

+ +

Let’s pretend your XML looks like this:

+ +
<team year="2011" name="New York Mets">
+    <players>
+        <coach>
+            <name>Terry Collins</name>
+            <year>1</year>
+        </coach>
+
+        <player number="7">
+            <name>Jose Reyes</name>
+            <position>SS</position>
+        </player>
+
+        <player number="16">
+            <name>Angel Pagan</name>
+            <position>CF</position>
+        </player>
+
+        <player number="5">
+            <name>David Wright</name>
+            <position>3B</position>
+        </player>
+
+        ...
+
+    </players>
+</team>
+
+ +

First, we’d load the XML:

+ +
RXMLElement *rootXML = [RXMLElement elementFromXMLFile:@"players.xml"];
+
+ +

We can immediately query the top-level tag name:

+ +
rootXML.tag --> @"team"
+
+ +

We can read attributes with:

+ +
[rootXML attribute:@"year"] --> @"2011"
+[rootXML attribute:@"name"] --> @"New York Mets"
+
+ +

We can get the players tag with:

+ +
RXMLElement *rxmlPlayers = [rootXML child:@"players"];
+
+ +

If we like, we can get all the individual player tags with:

+ +
NSArray *rxmlIndividualPlayers = [rxmlPlayers children:@"player"];
+
+ +

From there, we can process the individual players and be happy. Now, this is already much better than any other XML library we’ve seen, but RaptureXML can use query paths to make this ridiculously easy. Let’s use query paths to improve the conciseness our code:

+ +
[rootXML iterate:@"players.player" usingBlock: ^(RXMLElement *player) {
+    NSLog(@"Player: %@ (#%@)", [player child:@"name"].text, [player attribute:@"number"]);
+}];    
+
+ +

Your block is passed an RXMLElement representing each player in just one line! Alternatively, you could have shortened it with:

+ +
[rootXML iterate:@"players.player" usingBlock: ^(RXMLElement *player) {
+    NSLog(@"Player: %@ (#%@)", [player child:@"name"], [player attribute:@"number"]);
+}];    
+
+ +

This also works because RXMLElement#description returns the text of the tag. Query paths are even more powerful with wildcards. Let’s say we wanted the name of every person on the team, player or coach. We use the wildcard to get it:

+ +
[rootXML iterate:@"players.*.name" usingBlock: ^(RXMLElement *name) {
+    NSLog(@"Name: %@", name.text);
+}];
+
+ +

The wildcard processes every tag rather than the one you would’ve named. You can also use the wildcard to iterate all the children of an element:

+ +
[rootXML iterate:@"players.coach.*" usingBlock: ^(RXMLElement *e) {
+    NSLog(@"Tag: %@, Text: %@", e.tag, e.text);
+}];
+
+ +

This gives us all the tags for the coach. Easy enough?

+ +

XPath

+ +

If you don’t want to use the custom RaptureXML iteration query syntax, you can use the standard XPath query language as well. Here’s how you query all players with XPath:

+ +
[rootXML iterateWithRootXPath:@"//player" usingBlock: ^(RXMLElement *player) {
+    NSLog(@"Player: %@ (#%@)", [player child:@"name"], [player attribute:@"number"]);
+}];    
+
+ +

And remember, you can also test attributes using XPath as well. Here’s how you can find the player with #5:

+ +
[rootXML iterateWithRootXPath:@"//player[@number='5']" usingBlock: ^(RXMLElement *player) {
+    NSLog(@"Player #5: %@", [player child:@"name"]);
+}];    
+
+ +

Note that you can only use XPath from the document root and it won’t matter what RXMLElement you have. If you have a derived RXMLElement, you can still build from the document root. If you’re not familiar with XPath, you can use this handy guide.

+ +

Namespaces

+ +

Namespaces are supported for most methods, however not for iterations. If you want to use namespaces for that kind of thing, use the -children method manually. When specifying namespaces, be sure to specify the namespace URI and not the prefix. For example, if your XML looked like:

+ +
<team xmlns:sport="*" sport:year="2011" sport:name="New York Mets">
+    ...
+</team>
+
+ +

You would access the attributes with:

+ +
NSLog(@"Team Name: %@", [e attribute:@"name" inNamespace:@"*"]);
+
+ +

RubyMotion Support

+ +

RaptureXML is easily integrated into RubyMotion! Here’s how.

+ +

Unit Tests as Documentation

+ +

You can see the full usage of RaptureXML by reading the unit tests in the project. Not only does it show you all the code, but you’ll know it works! (You can run the unit tests by pressing Command-U in Xcode)

+ +

Who Created RaptureXML?

+ +

RaptureXML was created by John Blanco john.blanco@raptureinvenice.com of Rapture In Venice because he got sick of using all of the bizarre XML solutions for iPhone development. If you like this code and/or need an iOS consultant, get in touch with me via my website, Rapture In Venice.

+ + +
+ + +
+ + + +
+

Class References

+ +
+ + + +
+ + + + + +
+ +
+ +
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/js/script.js b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/js/script.js new file mode 100644 index 0000000..4074361 --- /dev/null +++ b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Documents/js/script.js @@ -0,0 +1,59 @@ +function $() { + return document.querySelector.apply(document, arguments); +} + +if (navigator.userAgent.indexOf("Xcode") != -1) { + document.documentElement.classList.add("xcode"); +} + +var jumpTo = $("#jump-to"); + +if (jumpTo) { + jumpTo.addEventListener("change", function(e) { + location.hash = this.options[this.selectedIndex].value; + }); +} + +function hashChanged() { + if (/^#\/\/api\//.test(location.hash)) { + var element = document.querySelector("a[name='" + location.hash.substring(1) + "']"); + + if (!element) { + return; + } + + element = element.parentNode; + + element.classList.remove("hide"); + fixScrollPosition(element); + } +} + +function fixScrollPosition(element) { + var scrollTop = element.offsetTop - 150; + document.documentElement.scrollTop = scrollTop; + document.body.scrollTop = scrollTop; +} + +[].forEach.call(document.querySelectorAll(".section-method"), function(element) { + element.classList.add("hide"); + + element.querySelector(".method-title a").addEventListener("click", function(e) { + var info = element.querySelector(".method-info"), + infoContainer = element.querySelector(".method-info-container"); + + element.classList.add("animating"); + info.style.height = (infoContainer.clientHeight + 40) + "px"; + fixScrollPosition(element); + element.classList.toggle("hide"); + if (element.classList.contains("hide")) { + e.preventDefault(); + } + setTimeout(function() { + element.classList.remove("animating"); + }, 300); + }); +}); + +window.addEventListener("hashchange", hashChanged); +hashChanged(); diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Nodes.xml b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Nodes.xml new file mode 100644 index 0000000..4363843 --- /dev/null +++ b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Nodes.xml @@ -0,0 +1,115 @@ + + + + + RaptureXML + index.html + + + + + Classes + index.html + + + + + + + + + + + + + Blocks + index.html + + + + + + + + + + + + + RXMLDocHolder + Classes/RXMLDocHolder.html + + + + Classes/RXMLDocHolder.html + Overview + overview + + + Classes/RXMLDocHolder.html + Tasks + tasks + + + + + + Classes/RXMLDocHolder.html + Instance Methods + instance_methods + + + + + + + RXMLElement + Classes/RXMLElement.html + + + + Classes/RXMLElement.html + Overview + overview + + + Classes/RXMLElement.html + Tasks + tasks + + + + Classes/RXMLElement.html + Properties + properties + + + + + Classes/RXMLElement.html + Class Methods + class_methods + + + + + Classes/RXMLElement.html + Instance Methods + instance_methods + + + + + + + + + + + RXMLBlock + Blocks/RXMLBlock.html + + + + + \ No newline at end of file diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Tokens1.xml b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Tokens1.xml new file mode 100644 index 0000000..8e4767f --- /dev/null +++ b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Tokens1.xml @@ -0,0 +1,42 @@ + + + + + + //apple_ref/occ/cl/RXMLDocHolder + + RXMLElement.h + + + + + + + + //apple_ref/occ/instm/RXMLDocHolder/initWithDocPtr: + + RXMLElement.h + + - (id)initWithDocPtr:(xmlDocPtr)doc + + + //api/name/initWithDocPtr: + + + + + //apple_ref/occ/instm/RXMLDocHolder/doc + + RXMLElement.h + + - (xmlDocPtr)doc + + + //api/name/doc + + + + + + + \ No newline at end of file diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Tokens2.xml b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Tokens2.xml new file mode 100644 index 0000000..6fe654e --- /dev/null +++ b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Tokens2.xml @@ -0,0 +1,774 @@ + + + + + + //apple_ref/occ/cl/RXMLElement + + RXMLElement.h + + + + + + + + //apple_ref/occ/instm/RXMLElement/initFromXMLString:encoding: + + RXMLElement.h + + - (id)initFromXMLString:(NSString *)xmlString encoding:(NSStringEncoding)encoding + + + //api/name/initFromXMLString:encoding: + + + + + //apple_ref/occ/instm/RXMLElement/initFromXMLFile: + + RXMLElement.h + + - (id)initFromXMLFile:(NSString *)filename + + + //api/name/initFromXMLFile: + + + + + //apple_ref/occ/instm/RXMLElement/initFromXMLFile:fileExtension: + + RXMLElement.h + + - (id)initFromXMLFile:(NSString *)filename fileExtension:(NSString *)extension + + + //api/name/initFromXMLFile:fileExtension: + + + + + //apple_ref/occ/instm/RXMLElement/initFromXMLFilePath: + + RXMLElement.h + + - (id)initFromXMLFilePath:(NSString *)fullPath + + + //api/name/initFromXMLFilePath: + + + + + //apple_ref/occ/instm/RXMLElement/initFromURL: + + RXMLElement.h + + - (id)initFromURL:(NSURL *)url + + + //api/name/initFromURL: + + + + + //apple_ref/occ/instm/RXMLElement/initFromXMLData: + + RXMLElement.h + + - (id)initFromXMLData:(NSData *)data + + + //api/name/initFromXMLData: + + + + + //apple_ref/occ/instm/RXMLElement/initFromXMLDoc:node: + + RXMLElement.h + + - (id)initFromXMLDoc:(RXMLDocHolder *)doc node:(xmlNodePtr)node + + + //api/name/initFromXMLDoc:node: + + + + + //apple_ref/occ/instm/RXMLElement/initFromHTMLString:encoding: + + RXMLElement.h + + - (id)initFromHTMLString:(NSString *)xmlString encoding:(NSStringEncoding)encoding + + + //api/name/initFromHTMLString:encoding: + + + + + //apple_ref/occ/instm/RXMLElement/initFromHTMLFile: + + RXMLElement.h + + - (id)initFromHTMLFile:(NSString *)filename + + + //api/name/initFromHTMLFile: + + + + + //apple_ref/occ/instm/RXMLElement/initFromHTMLFile:fileExtension: + + RXMLElement.h + + - (id)initFromHTMLFile:(NSString *)filename fileExtension:(NSString *)extension + + + //api/name/initFromHTMLFile:fileExtension: + + + + + //apple_ref/occ/instm/RXMLElement/initFromHTMLFilePath: + + RXMLElement.h + + - (id)initFromHTMLFilePath:(NSString *)fullPath + + + //api/name/initFromHTMLFilePath: + + + + + //apple_ref/occ/instm/RXMLElement/initFromHTMLData: + + RXMLElement.h + + - (id)initFromHTMLData:(NSData *)data + + + //api/name/initFromHTMLData: + + + + + //apple_ref/occ/clm/RXMLElement/elementFromXMLString:encoding: + + RXMLElement.h + + + (id)elementFromXMLString:(NSString *)xmlString encoding:(NSStringEncoding)encoding + + + //api/name/elementFromXMLString:encoding: + + + + + //apple_ref/occ/clm/RXMLElement/elementFromXMLFile: + + RXMLElement.h + + + (id)elementFromXMLFile:(NSString *)filename + + + //api/name/elementFromXMLFile: + + + + + //apple_ref/occ/clm/RXMLElement/elementFromXMLFilename:fileExtension: + + RXMLElement.h + + + (id)elementFromXMLFilename:(NSString *)filename fileExtension:(NSString *)extension + + + //api/name/elementFromXMLFilename:fileExtension: + + + + + //apple_ref/occ/clm/RXMLElement/elementFromXMLFilePath: + + RXMLElement.h + + + (id)elementFromXMLFilePath:(NSString *)fullPath + + + //api/name/elementFromXMLFilePath: + + + + + //apple_ref/occ/clm/RXMLElement/elementFromURL: + + RXMLElement.h + + + (id)elementFromURL:(NSURL *)url + + + //api/name/elementFromURL: + + + + + //apple_ref/occ/clm/RXMLElement/elementFromXMLData: + + RXMLElement.h + + + (id)elementFromXMLData:(NSData *)data + + + //api/name/elementFromXMLData: + + + + + //apple_ref/occ/clm/RXMLElement/elementFromXMLDoc:node: + + RXMLElement.h + + + (id)elementFromXMLDoc:(RXMLDocHolder *)doc node:(xmlNodePtr)node + + + //api/name/elementFromXMLDoc:node: + + + + + //apple_ref/occ/clm/RXMLElement/elementFromHTMLString:encoding: + + RXMLElement.h + + + (id)elementFromHTMLString:(NSString *)xmlString encoding:(NSStringEncoding)encoding + + + //api/name/elementFromHTMLString:encoding: + + + + + //apple_ref/occ/clm/RXMLElement/elementFromHTMLFile: + + RXMLElement.h + + + (id)elementFromHTMLFile:(NSString *)filename + + + //api/name/elementFromHTMLFile: + + + + + //apple_ref/occ/clm/RXMLElement/elementFromHTMLFile:fileExtension: + + RXMLElement.h + + + (id)elementFromHTMLFile:(NSString *)filename fileExtension:(NSString *)extension + + + //api/name/elementFromHTMLFile:fileExtension: + + + + + //apple_ref/occ/clm/RXMLElement/elementFromHTMLFilePath: + + RXMLElement.h + + + (id)elementFromHTMLFilePath:(NSString *)fullPath + + + //api/name/elementFromHTMLFilePath: + + + + + //apple_ref/occ/clm/RXMLElement/elementFromHTMLData: + + RXMLElement.h + + + (id)elementFromHTMLData:(NSData *)data + + + //api/name/elementFromHTMLData: + + + + + //apple_ref/occ/instm/RXMLElement/attribute: + + RXMLElement.h + + - (NSString *)attribute:(NSString *)attributeName + + + //api/name/attribute: + + + + + //apple_ref/occ/instm/RXMLElement/attribute:inNamespace: + + RXMLElement.h + + - (NSString *)attribute:(NSString *)attributeName inNamespace:(NSString *)ns + + + //api/name/attribute:inNamespace: + + + + + //apple_ref/occ/instm/RXMLElement/attributeNames + + RXMLElement.h + + - (NSArray *)attributeNames + + + //api/name/attributeNames + + + + + //apple_ref/occ/instm/RXMLElement/attributeAsInt: + + RXMLElement.h + + - (NSInteger)attributeAsInt:(NSString *)attributeName + + + //api/name/attributeAsInt: + + + + + //apple_ref/occ/instm/RXMLElement/attributeAsInt:inNamespace: + + RXMLElement.h + + - (NSInteger)attributeAsInt:(NSString *)attributeName inNamespace:(NSString *)ns + + + //api/name/attributeAsInt:inNamespace: + + + + + //apple_ref/occ/instm/RXMLElement/attributeAsDouble: + + RXMLElement.h + + - (double)attributeAsDouble:(NSString *)attributeName + + + //api/name/attributeAsDouble: + + + + + //apple_ref/occ/instm/RXMLElement/attributeAsDouble:inNamespace: + + RXMLElement.h + + - (double)attributeAsDouble:(NSString *)attributeName inNamespace:(NSString *)ns + + + //api/name/attributeAsDouble:inNamespace: + + + + + //apple_ref/occ/instm/RXMLElement/child: + + RXMLElement.h + + - (RXMLElement *)child:(NSString *)tag + + + //api/name/child: + + + + + //apple_ref/occ/instm/RXMLElement/child:inNamespace: + + RXMLElement.h + + - (RXMLElement *)child:(NSString *)tag inNamespace:(NSString *)ns + + + //api/name/child:inNamespace: + + + + + //apple_ref/occ/instm/RXMLElement/children: + + RXMLElement.h + + - (NSArray *)children:(NSString *)tag + + + //api/name/children: + + + + + //apple_ref/occ/instm/RXMLElement/children:inNamespace: + + RXMLElement.h + + - (NSArray *)children:(NSString *)tag inNamespace:(NSString *)ns + + + //api/name/children:inNamespace: + + + + + //apple_ref/occ/instm/RXMLElement/childrenWithRootXPath: + + RXMLElement.h + + - (NSArray *)childrenWithRootXPath:(NSString *)xpath + + + //api/name/childrenWithRootXPath: + + + + + //apple_ref/occ/instm/RXMLElement/iterate:usingBlock: + + RXMLElement.h + + - (void)iterate:(NSString *)query usingBlock:(void ( ^ ) ( RXMLElement *))blk + + + //api/name/iterate:usingBlock: + + + + + //apple_ref/occ/instm/RXMLElement/iterateWithRootXPath:usingBlock: + + RXMLElement.h + + - (void)iterateWithRootXPath:(NSString *)xpath usingBlock:(void ( ^ ) ( RXMLElement *))blk + + + //api/name/iterateWithRootXPath:usingBlock: + + + + + //apple_ref/occ/instm/RXMLElement/iterateElements:usingBlock: + + RXMLElement.h + + - (void)iterateElements:(NSArray *)elements usingBlock:(void ( ^ ) ( RXMLElement *))blk + + + //api/name/iterateElements:usingBlock: + + + + + //apple_ref/occ/instm/RXMLElement/setXmlDoc: + + RXMLElement.h + + @property (nonatomic, strong) RXMLDocHolder *xmlDoc + + + //api/name/xmlDoc + + + + + //apple_ref/occ/instm/RXMLElement/xmlDoc + + RXMLElement.h + + @property (nonatomic, strong) RXMLDocHolder *xmlDoc + + + //api/name/xmlDoc + + + + + //apple_ref/occ/instp/RXMLElement/xmlDoc + + RXMLElement.h + + @property (nonatomic, strong) RXMLDocHolder *xmlDoc + + + //api/name/xmlDoc + + + + + //apple_ref/occ/instm/RXMLElement/setTag: + + RXMLElement.h + + @property (nonatomic, readonly) NSString *tag + + + //api/name/tag + + + + + //apple_ref/occ/instm/RXMLElement/tag + + RXMLElement.h + + @property (nonatomic, readonly) NSString *tag + + + //api/name/tag + + + + + //apple_ref/occ/instp/RXMLElement/tag + + RXMLElement.h + + @property (nonatomic, readonly) NSString *tag + + + //api/name/tag + + + + + //apple_ref/occ/instm/RXMLElement/setText: + + RXMLElement.h + + @property (nonatomic, readonly) NSString *text + + + //api/name/text + + + + + //apple_ref/occ/instm/RXMLElement/text + + RXMLElement.h + + @property (nonatomic, readonly) NSString *text + + + //api/name/text + + + + + //apple_ref/occ/instp/RXMLElement/text + + RXMLElement.h + + @property (nonatomic, readonly) NSString *text + + + //api/name/text + + + + + //apple_ref/occ/instm/RXMLElement/setXml: + + RXMLElement.h + + @property (nonatomic, readonly) NSString *xml + + + //api/name/xml + + + + + //apple_ref/occ/instm/RXMLElement/xml + + RXMLElement.h + + @property (nonatomic, readonly) NSString *xml + + + //api/name/xml + + + + + //apple_ref/occ/instp/RXMLElement/xml + + RXMLElement.h + + @property (nonatomic, readonly) NSString *xml + + + //api/name/xml + + + + + //apple_ref/occ/instm/RXMLElement/setInnerXml: + + RXMLElement.h + + @property (nonatomic, readonly) NSString *innerXml + + + //api/name/innerXml + + + + + //apple_ref/occ/instm/RXMLElement/innerXml + + RXMLElement.h + + @property (nonatomic, readonly) NSString *innerXml + + + //api/name/innerXml + + + + + //apple_ref/occ/instp/RXMLElement/innerXml + + RXMLElement.h + + @property (nonatomic, readonly) NSString *innerXml + + + //api/name/innerXml + + + + + //apple_ref/occ/instm/RXMLElement/setTextAsInt: + + RXMLElement.h + + @property (nonatomic, readonly) NSInteger textAsInt + + + //api/name/textAsInt + + + + + //apple_ref/occ/instm/RXMLElement/textAsInt + + RXMLElement.h + + @property (nonatomic, readonly) NSInteger textAsInt + + + //api/name/textAsInt + + + + + //apple_ref/occ/instp/RXMLElement/textAsInt + + RXMLElement.h + + @property (nonatomic, readonly) NSInteger textAsInt + + + //api/name/textAsInt + + + + + //apple_ref/occ/instm/RXMLElement/setTextAsDouble: + + RXMLElement.h + + @property (nonatomic, readonly) double textAsDouble + + + //api/name/textAsDouble + + + + + //apple_ref/occ/instm/RXMLElement/textAsDouble + + RXMLElement.h + + @property (nonatomic, readonly) double textAsDouble + + + //api/name/textAsDouble + + + + + //apple_ref/occ/instp/RXMLElement/textAsDouble + + RXMLElement.h + + @property (nonatomic, readonly) double textAsDouble + + + //api/name/textAsDouble + + + + + //apple_ref/occ/instm/RXMLElement/setIsValid: + + RXMLElement.h + + @property (nonatomic, readonly) BOOL isValid + + + //api/name/isValid + + + + + //apple_ref/occ/instm/RXMLElement/isValid + + RXMLElement.h + + @property (nonatomic, readonly) BOOL isValid + + + //api/name/isValid + + + + + //apple_ref/occ/instp/RXMLElement/isValid + + RXMLElement.h + + @property (nonatomic, readonly) BOOL isValid + + + //api/name/isValid + + + + + + + \ No newline at end of file diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Tokens3.xml b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Tokens3.xml new file mode 100644 index 0000000..3fc40be --- /dev/null +++ b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/Tokens3.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/docSet.dsidx b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/docSet.dsidx new file mode 100644 index 0000000..e905197 Binary files /dev/null and b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/docSet.dsidx differ diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/docSet.dsidx-shm b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/docSet.dsidx-shm new file mode 100644 index 0000000..d71a4fc Binary files /dev/null and b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/docSet.dsidx-shm differ diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/docSet.dsidx-wal b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/docSet.dsidx-wal new file mode 100644 index 0000000..3923534 Binary files /dev/null and b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/docSet.dsidx-wal differ diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/docSet.mom b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/docSet.mom new file mode 100644 index 0000000..35b91bd Binary files /dev/null and b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/docSet.mom differ diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/docSet.skidx b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/docSet.skidx new file mode 100644 index 0000000..5666d12 Binary files /dev/null and b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/docSet.skidx differ diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/docSet.toc b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/docSet.toc new file mode 100644 index 0000000..84fed6c Binary files /dev/null and b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/docSet.toc differ diff --git a/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/docSet.tokencache b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/docSet.tokencache new file mode 100644 index 0000000..c7c2c8e Binary files /dev/null and b/Documentation/API/docsets/com.raptureinvenice.documentation.RaptureXML.docset/docset/Contents/Resources/docSet.tokencache differ diff --git a/Documentation/API/hierarchy.html b/Documentation/API/hierarchy.html new file mode 100644 index 0000000..074b14e --- /dev/null +++ b/Documentation/API/hierarchy.html @@ -0,0 +1,89 @@ + + + + + + RaptureXML Hierarchy + + + + + + +
+
+ +

+ RaptureXML +

+ +

+ Rapture In Venice +

+ +
+
+ + + +
+
+
+
+

RaptureXML Hierarchy

+ + +
+

Class Hierarchy

+ + + +
+ + + +
+ + + +
+ + +
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/Documentation/API/img/button_bar_background.png b/Documentation/API/img/button_bar_background.png new file mode 100644 index 0000000..71d1019 Binary files /dev/null and b/Documentation/API/img/button_bar_background.png differ diff --git a/Documentation/API/img/disclosure.png b/Documentation/API/img/disclosure.png new file mode 100644 index 0000000..4c5cbf4 Binary files /dev/null and b/Documentation/API/img/disclosure.png differ diff --git a/Documentation/API/img/disclosure_open.png b/Documentation/API/img/disclosure_open.png new file mode 100644 index 0000000..82396fe Binary files /dev/null and b/Documentation/API/img/disclosure_open.png differ diff --git a/Documentation/API/img/library_background.png b/Documentation/API/img/library_background.png new file mode 100644 index 0000000..3006248 Binary files /dev/null and b/Documentation/API/img/library_background.png differ diff --git a/Documentation/API/img/title_background.png b/Documentation/API/img/title_background.png new file mode 100644 index 0000000..846e496 Binary files /dev/null and b/Documentation/API/img/title_background.png differ diff --git a/Documentation/API/index.html b/Documentation/API/index.html new file mode 100644 index 0000000..36cc988 --- /dev/null +++ b/Documentation/API/index.html @@ -0,0 +1,276 @@ + + + + + + RaptureXML Reference + + + + + + +
+
+ +

+ RaptureXML +

+ +

+ Rapture In Venice +

+ +
+
+ + + +
+
+
+
+

RaptureXML Reference

+ + +
+ + +

RaptureXML is a simple, block-based XML library for the iOS platform that provides an expressive API that makes XML processing freakin' fun for once in my life.

+ +

Why do we need another XML library?

+ +

You tell me. Processing XML in Objective-C is an awful, frustrating experience and the resulting code is never readable. I’m tired of it! RaptureXML solves this by providing a powerful new interface on top of libxml2. Imagine for a minute the code you’d write to process the XML for a list of baseball team members, retrieving their numbers, names, and positions using your favorite XML processing library. Now, take a look at how you do it with RaptureXML:

+ +
RXMLElement *rootXML = [RXMLElement elementFromXMLFile:@"players.xml"];
+
+[rootXML iterate:@"players.player" usingBlock: ^(RXMLElement *e) {
+    NSLog(@"Player #%@: %@", [e attribute:@"number"], [e child:@"name"].text);
+}];    
+
+ +

RaptureXML changes the game when it comes to XML processing in Objective-C. As you can see from the code, it takes only seconds to understand what this code does. There are no wasted arrays and verbose looping you have to do. The code is a breeze to read and maintain.

+ +

I don’t think any more needs to be said.

+ +

Adding RaptureXML to Your Project

+ +

The recommended way to add RaptureXML to your project is through CocoaPods. Simply add ‘RaptureXML’ into your Podfile.

+ +

To install manually, there’s just a few simple steps:

+ +
    +
  • Copy the RaptureXML/RaptureXML folder into your own project and import “RXMLElement.h” somewhere (e.g., your PCH file).
  • +
  • Link in libz.dylib to your target.
  • +
  • Link in libxml2.dylib to your target.
  • +
  • In your build settings, for the key “Header Search Paths”, add “$(SDK_DIR)”/usr/include/libxml2
  • +
+ + +

RaptureXML supports ARC. You are free to use any version of LLVM or gcc as well! (Though you should be using LLVM by now.)

+ +

ARC isn’t just supported, it’s required!

+ +

RaptureXML supports ARC. In fact, it only supports ARC. If you’re still running a project that doesn’t use ARC, RaptureXML won’t be your cup of tea.

+ +

Getting Started

+ +

RaptureXML processes XML in two steps: load and path. This means that you first load the XML from any source you want such as file, data, or string. Then, you simply use its query language to find what you need.

+ +

You can load the XML with any of the following constructors:

+ +
RXMLElement *rootXML = [RXMLElement elementFromXMLString:@"...my xml..." encoding:NSUTF8StringEncoding];
+RXMLElement *rootXML = [RXMLElement elementFromXMLFile:@"myfile.xml"];
+RXMLElement *rootXML = [RXMLElement elementFromXMLFilename:@"myfile" elementFromXMLFilename:@"xml"];
+RXMLElement *rootXML = [RXMLElement elementFromXMLData:myData];
+
+ +

These constructors return an RXMLElement object that represents the top-level tags. Now, you can query the data in any number of ways.

+ +

Let’s pretend your XML looks like this:

+ +
<team year="2011" name="New York Mets">
+    <players>
+        <coach>
+            <name>Terry Collins</name>
+            <year>1</year>
+        </coach>
+
+        <player number="7">
+            <name>Jose Reyes</name>
+            <position>SS</position>
+        </player>
+
+        <player number="16">
+            <name>Angel Pagan</name>
+            <position>CF</position>
+        </player>
+
+        <player number="5">
+            <name>David Wright</name>
+            <position>3B</position>
+        </player>
+
+        ...
+
+    </players>
+</team>
+
+ +

First, we’d load the XML:

+ +
RXMLElement *rootXML = [RXMLElement elementFromXMLFile:@"players.xml"];
+
+ +

We can immediately query the top-level tag name:

+ +
rootXML.tag --> @"team"
+
+ +

We can read attributes with:

+ +
[rootXML attribute:@"year"] --> @"2011"
+[rootXML attribute:@"name"] --> @"New York Mets"
+
+ +

We can get the players tag with:

+ +
RXMLElement *rxmlPlayers = [rootXML child:@"players"];
+
+ +

If we like, we can get all the individual player tags with:

+ +
NSArray *rxmlIndividualPlayers = [rxmlPlayers children:@"player"];
+
+ +

From there, we can process the individual players and be happy. Now, this is already much better than any other XML library we’ve seen, but RaptureXML can use query paths to make this ridiculously easy. Let’s use query paths to improve the conciseness our code:

+ +
[rootXML iterate:@"players.player" usingBlock: ^(RXMLElement *player) {
+    NSLog(@"Player: %@ (#%@)", [player child:@"name"].text, [player attribute:@"number"]);
+}];    
+
+ +

Your block is passed an RXMLElement representing each player in just one line! Alternatively, you could have shortened it with:

+ +
[rootXML iterate:@"players.player" usingBlock: ^(RXMLElement *player) {
+    NSLog(@"Player: %@ (#%@)", [player child:@"name"], [player attribute:@"number"]);
+}];    
+
+ +

This also works because RXMLElement#description returns the text of the tag. Query paths are even more powerful with wildcards. Let’s say we wanted the name of every person on the team, player or coach. We use the wildcard to get it:

+ +
[rootXML iterate:@"players.*.name" usingBlock: ^(RXMLElement *name) {
+    NSLog(@"Name: %@", name.text);
+}];
+
+ +

The wildcard processes every tag rather than the one you would’ve named. You can also use the wildcard to iterate all the children of an element:

+ +
[rootXML iterate:@"players.coach.*" usingBlock: ^(RXMLElement *e) {
+    NSLog(@"Tag: %@, Text: %@", e.tag, e.text);
+}];
+
+ +

This gives us all the tags for the coach. Easy enough?

+ +

XPath

+ +

If you don’t want to use the custom RaptureXML iteration query syntax, you can use the standard XPath query language as well. Here’s how you query all players with XPath:

+ +
[rootXML iterateWithRootXPath:@"//player" usingBlock: ^(RXMLElement *player) {
+    NSLog(@"Player: %@ (#%@)", [player child:@"name"], [player attribute:@"number"]);
+}];    
+
+ +

And remember, you can also test attributes using XPath as well. Here’s how you can find the player with #5:

+ +
[rootXML iterateWithRootXPath:@"//player[@number='5']" usingBlock: ^(RXMLElement *player) {
+    NSLog(@"Player #5: %@", [player child:@"name"]);
+}];    
+
+ +

Note that you can only use XPath from the document root and it won’t matter what RXMLElement you have. If you have a derived RXMLElement, you can still build from the document root. If you’re not familiar with XPath, you can use this handy guide.

+ +

Namespaces

+ +

Namespaces are supported for most methods, however not for iterations. If you want to use namespaces for that kind of thing, use the -children method manually. When specifying namespaces, be sure to specify the namespace URI and not the prefix. For example, if your XML looked like:

+ +
<team xmlns:sport="*" sport:year="2011" sport:name="New York Mets">
+    ...
+</team>
+
+ +

You would access the attributes with:

+ +
NSLog(@"Team Name: %@", [e attribute:@"name" inNamespace:@"*"]);
+
+ +

RubyMotion Support

+ +

RaptureXML is easily integrated into RubyMotion! Here’s how.

+ +

Unit Tests as Documentation

+ +

You can see the full usage of RaptureXML by reading the unit tests in the project. Not only does it show you all the code, but you’ll know it works! (You can run the unit tests by pressing Command-U in Xcode)

+ +

Who Created RaptureXML?

+ +

RaptureXML was created by John Blanco john.blanco@raptureinvenice.com of Rapture In Venice because he got sick of using all of the bizarre XML solutions for iPhone development. If you like this code and/or need an iOS consultant, get in touch with me via my website, Rapture In Venice.

+ + +
+ + +
+ + + +
+

Class References

+ +
+ + + +
+ + + + + +
+ +
+ +
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/Documentation/API/js/script.js b/Documentation/API/js/script.js new file mode 100644 index 0000000..4074361 --- /dev/null +++ b/Documentation/API/js/script.js @@ -0,0 +1,59 @@ +function $() { + return document.querySelector.apply(document, arguments); +} + +if (navigator.userAgent.indexOf("Xcode") != -1) { + document.documentElement.classList.add("xcode"); +} + +var jumpTo = $("#jump-to"); + +if (jumpTo) { + jumpTo.addEventListener("change", function(e) { + location.hash = this.options[this.selectedIndex].value; + }); +} + +function hashChanged() { + if (/^#\/\/api\//.test(location.hash)) { + var element = document.querySelector("a[name='" + location.hash.substring(1) + "']"); + + if (!element) { + return; + } + + element = element.parentNode; + + element.classList.remove("hide"); + fixScrollPosition(element); + } +} + +function fixScrollPosition(element) { + var scrollTop = element.offsetTop - 150; + document.documentElement.scrollTop = scrollTop; + document.body.scrollTop = scrollTop; +} + +[].forEach.call(document.querySelectorAll(".section-method"), function(element) { + element.classList.add("hide"); + + element.querySelector(".method-title a").addEventListener("click", function(e) { + var info = element.querySelector(".method-info"), + infoContainer = element.querySelector(".method-info-container"); + + element.classList.add("animating"); + info.style.height = (infoContainer.clientHeight + 40) + "px"; + fixScrollPosition(element); + element.classList.toggle("hide"); + if (element.classList.contains("hide")) { + e.preventDefault(); + } + setTimeout(function() { + element.classList.remove("animating"); + }, 300); + }); +}); + +window.addEventListener("hashchange", hashChanged); +hashChanged(); diff --git a/License.txt b/LICENSE similarity index 100% rename from License.txt rename to LICENSE diff --git a/Library-Prefix.pch b/Library-Prefix.pch deleted file mode 100644 index 27c1907..0000000 --- a/Library-Prefix.pch +++ /dev/null @@ -1,4 +0,0 @@ -#ifdef __OBJC__ - #import - #import -#endif diff --git a/README.md b/README.md index 845a473..7830c42 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,7 @@ RaptureXML is easily integrated into RubyMotion! [Here's how.](http://rapturein # Unit Tests as Documentation # -You can see the full usage of RaptureXML by reading the unit tests in the project. Not only does it show you all the code, but you'll know it works! (You can run the unit tests by pressing Command-U in XCode) +You can see the full usage of RaptureXML by reading the unit tests in the project. Not only does it show you all the code, but you'll know it works! (You can run the unit tests by pressing Command-U in Xcode) # Who Created RaptureXML? # diff --git a/RaptureXML.podspec b/RaptureXML.podspec deleted file mode 100644 index bf23ef8..0000000 --- a/RaptureXML.podspec +++ /dev/null @@ -1,15 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'RaptureXML' - s.version = '1.0.1' - s.license = 'MIT' - s.summary = 'A simple, sensible, block-based XML API for iOS and Mac development.' - s.homepage = 'https://github.com/ZaBlanc/RaptureXML' - s.author = { 'John Blanco' => 'zablanc@gmail.com' } - s.source = { :git => 'https://github.com/ZaBlanc/RaptureXML.git', :tag => s.version.to_s } - s.platform = :ios - s.source_files = 'RaptureXML/*' - - s.libraries = 'z', 'xml2' - s.xcconfig = { 'HEADER_SEARCH_PATHS' => '$(SDKROOT)/usr/include/libxml2' } - s.requires_arc = true -end \ No newline at end of file diff --git a/RaptureXML.xcodeproj/project.pbxproj b/RaptureXML.xcodeproj/project.pbxproj index 580da9f..9461138 100644 --- a/RaptureXML.xcodeproj/project.pbxproj +++ b/RaptureXML.xcodeproj/project.pbxproj @@ -6,578 +6,512 @@ objectVersion = 46; objects = { -/* Begin PBXAggregateTarget section */ - 6BD1BD9D1558B7FA00F1D055 /* RaptureXMLFramework */ = { - isa = PBXAggregateTarget; - buildConfigurationList = 6BD1BD9E1558B7FA00F1D055 /* Build configuration list for PBXAggregateTarget "RaptureXMLFramework" */; - buildPhases = ( - 6BD1BDA61558B82400F1D055 /* Build static lib */, - 6BD1BDA71558B85A00F1D055 /* Assemble Framework */, - 6BD1BDA81558B90300F1D055 /* Copy Headers */, - ); - dependencies = ( - ); - name = RaptureXMLFramework; - productName = RaptureXMLKit; - }; -/* End PBXAggregateTarget section */ - /* Begin PBXBuildFile section */ - 02041DB81526A71200D1F36A /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 02041DB71526A71200D1F36A /* libxml2.dylib */; }; - 02041DBA1526B0DE00D1F36A /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 02041DB71526A71200D1F36A /* libxml2.dylib */; }; - 0252B2DF142ADFC60018B75D /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0252B2DE142ADFC60018B75D /* SenTestingKit.framework */; }; - 0252B2E0142ADFC60018B75D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0252B2C3142ADFC60018B75D /* UIKit.framework */; }; - 0252B2E1142ADFC60018B75D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0252B2C5142ADFC60018B75D /* Foundation.framework */; }; - 0252B2E2142ADFC60018B75D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0252B2C7142ADFC60018B75D /* CoreGraphics.framework */; }; - 02565F9916E6320700A882F9 /* CopyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1413670716D9BEC700501ABB /* CopyTests.m */; }; - 027B3571153C624700A4EDF2 /* DeepChildrenTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DEB8EC71467ED9C00024989 /* DeepChildrenTests.m */; }; - 027DAC3314FBF443001BA563 /* RXMLElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 027DAC2F14FBF443001BA563 /* RXMLElement.m */; }; - 027DAC3614FBF465001BA563 /* RXMLElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 027DAC2F14FBF443001BA563 /* RXMLElement.m */; }; - 02ADE6A216A0E33A008643D5 /* AttributeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 02ADE6A116A0E33A008643D5 /* AttributeTests.m */; }; - 02ADE6A316A0E491008643D5 /* BoundaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DEB8EC61467ED9C00024989 /* BoundaryTests.m */; }; - 02ADE6A416A0E491008643D5 /* DeepTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DEB8EC81467ED9C00024989 /* DeepTests.m */; }; - 02ADE6A516A0E491008643D5 /* ErrorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DEB8EC91467ED9C00024989 /* ErrorTests.m */; }; - 02ADE6A616A0E491008643D5 /* SimpleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DEB8ECA1467ED9C00024989 /* SimpleTests.m */; }; - 02ADE6A716A0E491008643D5 /* TextConversionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DEB8ECB1467ED9C00024989 /* TextConversionTests.m */; }; - 02ADE6A816A0E491008643D5 /* WildcardTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DEB8ECC1467ED9C00024989 /* WildcardTests.m */; }; - 02ADE6A916A0E491008643D5 /* EncodingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 02F3A4041526D7BC00E8C822 /* EncodingTests.m */; }; - 02ADE6AA16A0E491008643D5 /* XPathTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 027B6BCF153C652E00A4EDF2 /* XPathTests.m */; }; - 02F3A3FF1526D22600E8C822 /* players.xml in Resources */ = {isa = PBXBuildFile; fileRef = 0DEB8F2D14681BD800024989 /* players.xml */; }; - 0DEB8EB51467EC9B00024989 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0252B2C5142ADFC60018B75D /* Foundation.framework */; }; - 0DEB8F2C14681A9400024989 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 0252B305142AE3FF0018B75D /* libz.dylib */; }; - 5415BE4216FC638100AFC566 /* HTMLTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5415BE4116FC638100AFC566 /* HTMLTests.m */; }; - 6BD1BDA91558B91400F1D055 /* RXMLElement.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 027DAC2E14FBF443001BA563 /* RXMLElement.h */; }; + 3B3B9D6D1E95CEC8005AB4DE /* RaptureXML.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B3B9D6A1E95CEC8005AB4DE /* RaptureXML.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3B3B9D6E1E95CEC8005AB4DE /* RXMLElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B3B9D6B1E95CEC8005AB4DE /* RXMLElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3B3B9D6F1E95CEC8005AB4DE /* RXMLElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B3B9D6C1E95CEC8005AB4DE /* RXMLElement.m */; }; + 3B3B9D801E95CEE5005AB4DE /* AttributeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B3B9D711E95CEE5005AB4DE /* AttributeTests.m */; }; + 3B3B9D811E95CEE5005AB4DE /* BoundaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B3B9D721E95CEE5005AB4DE /* BoundaryTests.m */; }; + 3B3B9D821E95CEE5005AB4DE /* CopyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B3B9D731E95CEE5005AB4DE /* CopyTests.m */; }; + 3B3B9D831E95CEE5005AB4DE /* DeepChildrenTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B3B9D741E95CEE5005AB4DE /* DeepChildrenTests.m */; }; + 3B3B9D841E95CEE5005AB4DE /* DeepTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B3B9D751E95CEE5005AB4DE /* DeepTests.m */; }; + 3B3B9D851E95CEE5005AB4DE /* EncodingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B3B9D761E95CEE5005AB4DE /* EncodingTests.m */; }; + 3B3B9D861E95CEE5005AB4DE /* ErrorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B3B9D771E95CEE5005AB4DE /* ErrorTests.m */; }; + 3B3B9D871E95CEE5005AB4DE /* HTMLTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B3B9D781E95CEE5005AB4DE /* HTMLTests.m */; }; + 3B3B9D881E95CEE5005AB4DE /* players.xml in Resources */ = {isa = PBXBuildFile; fileRef = 3B3B9D7A1E95CEE5005AB4DE /* players.xml */; }; + 3B3B9D891E95CEE5005AB4DE /* SimpleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B3B9D7B1E95CEE5005AB4DE /* SimpleTests.m */; }; + 3B3B9D8A1E95CEE5005AB4DE /* TextConversionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B3B9D7D1E95CEE5005AB4DE /* TextConversionTests.m */; }; + 3B3B9D8B1E95CEE5005AB4DE /* WildcardTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B3B9D7E1E95CEE5005AB4DE /* WildcardTests.m */; }; + 3B3B9D8C1E95CEE5005AB4DE /* XPathTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B3B9D7F1E95CEE5005AB4DE /* XPathTests.m */; }; + 3B3B9D8F1E95CF8B005AB4DE /* libxml2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B3B9D8E1E95CF8B005AB4DE /* libxml2.tbd */; }; + 3B3B9D921E95D5C8005AB4DE /* RaptureTestSuite.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B3B9D911E95D5C8005AB4DE /* RaptureTestSuite.m */; }; + 3B90590D1DAECB5200B4EEC0 /* RaptureXML.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B9059031DAECB5200B4EEC0 /* RaptureXML.framework */; }; /* End PBXBuildFile section */ -/* Begin PBXCopyFilesBuildPhase section */ - 6BD1BDA81558B90300F1D055 /* Copy Headers */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = "${BUILD_DIR}/${CONFIGURATION}-iphoneuniversal/${PRODUCT_NAME}.framework/Versions/A/Headers/"; - dstSubfolderSpec = 0; - files = ( - 6BD1BDA91558B91400F1D055 /* RXMLElement.h in Copy Headers */, - ); - name = "Copy Headers"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ +/* Begin PBXContainerItemProxy section */ + 3B90590E1DAECB5200B4EEC0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 3B9058FA1DAECB5200B4EEC0 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3B9059021DAECB5200B4EEC0; + remoteInfo = RaptureXML; + }; +/* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 02041DB71526A71200D1F36A /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; - 02041DC21526D03A00D1F36A /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; }; - 0252B2C3142ADFC60018B75D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 0252B2C5142ADFC60018B75D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 0252B2C7142ADFC60018B75D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 0252B2DD142ADFC60018B75D /* RaptureXMLTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RaptureXMLTests.octest; sourceTree = BUILT_PRODUCTS_DIR; }; - 0252B2DE142ADFC60018B75D /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; }; - 0252B305142AE3FF0018B75D /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; - 027B6BCF153C652E00A4EDF2 /* XPathTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = XPathTests.m; path = Tests/XPathTests.m; sourceTree = SOURCE_ROOT; }; - 027DAC2E14FBF443001BA563 /* RXMLElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RXMLElement.h; sourceTree = ""; }; - 027DAC2F14FBF443001BA563 /* RXMLElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RXMLElement.m; sourceTree = ""; }; - 027DAC3814FBF4B5001BA563 /* Library-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Library-Prefix.pch"; sourceTree = ""; }; - 02ADE6A116A0E33A008643D5 /* AttributeTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AttributeTests.m; sourceTree = SOURCE_ROOT; }; - 02F3A4041526D7BC00E8C822 /* EncodingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EncodingTests.m; sourceTree = SOURCE_ROOT; }; - 0DEB8EB41467EC9B00024989 /* libRaptureXML.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRaptureXML.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 0DEB8EC61467ED9C00024989 /* BoundaryTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BoundaryTests.m; path = Tests/BoundaryTests.m; sourceTree = SOURCE_ROOT; }; - 0DEB8EC71467ED9C00024989 /* DeepChildrenTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DeepChildrenTests.m; path = Tests/DeepChildrenTests.m; sourceTree = SOURCE_ROOT; }; - 0DEB8EC81467ED9C00024989 /* DeepTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DeepTests.m; path = Tests/DeepTests.m; sourceTree = SOURCE_ROOT; }; - 0DEB8EC91467ED9C00024989 /* ErrorTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ErrorTests.m; path = Tests/ErrorTests.m; sourceTree = SOURCE_ROOT; }; - 0DEB8ECA1467ED9C00024989 /* SimpleTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SimpleTests.m; path = Tests/SimpleTests.m; sourceTree = SOURCE_ROOT; }; - 0DEB8ECB1467ED9C00024989 /* TextConversionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TextConversionTests.m; path = Tests/TextConversionTests.m; sourceTree = SOURCE_ROOT; }; - 0DEB8ECC1467ED9C00024989 /* WildcardTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WildcardTests.m; path = Tests/WildcardTests.m; sourceTree = SOURCE_ROOT; }; - 0DEB8F2B14681A0800024989 /* Tests-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Tests-Prefix.pch"; path = "Tests/Tests-Prefix.pch"; sourceTree = SOURCE_ROOT; }; - 0DEB8F2D14681BD800024989 /* players.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = players.xml; path = Tests/players.xml; sourceTree = SOURCE_ROOT; }; - 1413670716D9BEC700501ABB /* CopyTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CopyTests.m; path = Tests/CopyTests.m; sourceTree = SOURCE_ROOT; }; - 5415BE4116FC638100AFC566 /* HTMLTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HTMLTests.m; path = Tests/HTMLTests.m; sourceTree = SOURCE_ROOT; }; - 6BD1BD951558B7A800F1D055 /* RaptureXML-StaticLib-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RaptureXML-StaticLib-Prefix.pch"; sourceTree = ""; }; + 3B3B9D6A1E95CEC8005AB4DE /* RaptureXML.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RaptureXML.h; sourceTree = ""; }; + 3B3B9D6B1E95CEC8005AB4DE /* RXMLElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RXMLElement.h; sourceTree = ""; }; + 3B3B9D6C1E95CEC8005AB4DE /* RXMLElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RXMLElement.m; sourceTree = ""; }; + 3B3B9D711E95CEE5005AB4DE /* AttributeTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AttributeTests.m; sourceTree = ""; }; + 3B3B9D721E95CEE5005AB4DE /* BoundaryTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BoundaryTests.m; sourceTree = ""; }; + 3B3B9D731E95CEE5005AB4DE /* CopyTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CopyTests.m; sourceTree = ""; }; + 3B3B9D741E95CEE5005AB4DE /* DeepChildrenTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DeepChildrenTests.m; sourceTree = ""; }; + 3B3B9D751E95CEE5005AB4DE /* DeepTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DeepTests.m; sourceTree = ""; }; + 3B3B9D761E95CEE5005AB4DE /* EncodingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EncodingTests.m; sourceTree = ""; }; + 3B3B9D771E95CEE5005AB4DE /* ErrorTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ErrorTests.m; sourceTree = ""; }; + 3B3B9D781E95CEE5005AB4DE /* HTMLTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTMLTests.m; sourceTree = ""; }; + 3B3B9D7A1E95CEE5005AB4DE /* players.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = players.xml; sourceTree = ""; }; + 3B3B9D7B1E95CEE5005AB4DE /* SimpleTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleTests.m; sourceTree = ""; }; + 3B3B9D7D1E95CEE5005AB4DE /* TextConversionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TextConversionTests.m; sourceTree = ""; }; + 3B3B9D7E1E95CEE5005AB4DE /* WildcardTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WildcardTests.m; sourceTree = ""; }; + 3B3B9D7F1E95CEE5005AB4DE /* XPathTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPathTests.m; sourceTree = ""; }; + 3B3B9D8E1E95CF8B005AB4DE /* libxml2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libxml2.tbd; path = usr/lib/libxml2.tbd; sourceTree = SDKROOT; }; + 3B3B9D901E95D5C8005AB4DE /* RaptureTestSuite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RaptureTestSuite.h; sourceTree = ""; }; + 3B3B9D911E95D5C8005AB4DE /* RaptureTestSuite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RaptureTestSuite.m; sourceTree = ""; }; + 3B6E351D1F67C67C000741A0 /* Info-Target.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-Target.plist"; sourceTree = ""; }; + 3B6E351E1F67C688000741A0 /* Target.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Target.xcconfig; sourceTree = ""; }; + 3B9059031DAECB5200B4EEC0 /* RaptureXML.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RaptureXML.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B90590C1DAECB5200B4EEC0 /* RaptureXMLUnitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RaptureXMLUnitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B9059251DAECB9E00B4EEC0 /* Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; + 3B9059271DAECB9E00B4EEC0 /* Project.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Project.xcconfig; sourceTree = ""; }; + 3B9059281DAECB9E00B4EEC0 /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 3B9059291DAECB9E00B4EEC0 /* Tests.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Tests.xcconfig; sourceTree = ""; }; + 3B90592C1DAECD9800B4EEC0 /* Info-Tests.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-Tests.plist"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 0252B2D9142ADFC60018B75D /* Frameworks */ = { + 3B9058FF1DAECB5200B4EEC0 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 02041DBA1526B0DE00D1F36A /* libxml2.dylib in Frameworks */, - 0DEB8F2C14681A9400024989 /* libz.dylib in Frameworks */, - 0252B2DF142ADFC60018B75D /* SenTestingKit.framework in Frameworks */, - 0252B2E0142ADFC60018B75D /* UIKit.framework in Frameworks */, - 0252B2E1142ADFC60018B75D /* Foundation.framework in Frameworks */, - 0252B2E2142ADFC60018B75D /* CoreGraphics.framework in Frameworks */, + 3B3B9D8F1E95CF8B005AB4DE /* libxml2.tbd in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 0DEB8EB11467EC9B00024989 /* Frameworks */ = { + 3B9059091DAECB5200B4EEC0 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 02041DB81526A71200D1F36A /* libxml2.dylib in Frameworks */, - 0DEB8EB51467EC9B00024989 /* Foundation.framework in Frameworks */, + 3B90590D1DAECB5200B4EEC0 /* RaptureXML.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 0252B2B4142ADFC60018B75D = { + 3B3B9D701E95CEE5005AB4DE /* Tests */ = { isa = PBXGroup; children = ( - 027DAC3814FBF4B5001BA563 /* Library-Prefix.pch */, - 027DAC2B14FBF443001BA563 /* RaptureXML */, - 0252B2E5142ADFC60018B75D /* Tests */, - 6BD1BD931558B7A800F1D055 /* RaptureXML-StaticLib */, - 0252B2C2142ADFC60018B75D /* Frameworks */, - 0252B2C0142ADFC60018B75D /* Products */, - ); + 3B3B9D791E95CEE5005AB4DE /* Resources */, + 3B3B9D711E95CEE5005AB4DE /* AttributeTests.m */, + 3B3B9D721E95CEE5005AB4DE /* BoundaryTests.m */, + 3B3B9D731E95CEE5005AB4DE /* CopyTests.m */, + 3B3B9D741E95CEE5005AB4DE /* DeepChildrenTests.m */, + 3B3B9D751E95CEE5005AB4DE /* DeepTests.m */, + 3B3B9D761E95CEE5005AB4DE /* EncodingTests.m */, + 3B3B9D771E95CEE5005AB4DE /* ErrorTests.m */, + 3B3B9D781E95CEE5005AB4DE /* HTMLTests.m */, + 3B3B9D901E95D5C8005AB4DE /* RaptureTestSuite.h */, + 3B3B9D911E95D5C8005AB4DE /* RaptureTestSuite.m */, + 3B3B9D7B1E95CEE5005AB4DE /* SimpleTests.m */, + 3B3B9D7D1E95CEE5005AB4DE /* TextConversionTests.m */, + 3B3B9D7E1E95CEE5005AB4DE /* WildcardTests.m */, + 3B3B9D7F1E95CEE5005AB4DE /* XPathTests.m */, + ); + path = Tests; sourceTree = ""; }; - 0252B2C0142ADFC60018B75D /* Products */ = { + 3B3B9D791E95CEE5005AB4DE /* Resources */ = { isa = PBXGroup; children = ( - 0252B2DD142ADFC60018B75D /* RaptureXMLTests.octest */, - 0DEB8EB41467EC9B00024989 /* libRaptureXML.a */, + 3B3B9D7A1E95CEE5005AB4DE /* players.xml */, ); - name = Products; + path = Resources; sourceTree = ""; }; - 0252B2C2142ADFC60018B75D /* Frameworks */ = { + 3B3B9D8D1E95CF8B005AB4DE /* Frameworks */ = { isa = PBXGroup; children = ( - 02041DC21526D03A00D1F36A /* MediaPlayer.framework */, - 02041DB71526A71200D1F36A /* libxml2.dylib */, - 0252B305142AE3FF0018B75D /* libz.dylib */, - 0252B2C3142ADFC60018B75D /* UIKit.framework */, - 0252B2C5142ADFC60018B75D /* Foundation.framework */, - 0252B2C7142ADFC60018B75D /* CoreGraphics.framework */, - 0252B2DE142ADFC60018B75D /* SenTestingKit.framework */, + 3B3B9D8E1E95CF8B005AB4DE /* libxml2.tbd */, ); name = Frameworks; sourceTree = ""; }; - 0252B2E5142ADFC60018B75D /* Tests */ = { + 3B9058F91DAECB5200B4EEC0 = { + isa = PBXGroup; + children = ( + 3B90592F1DAECF7400B4EEC0 /* Sources */, + 3B3B9D701E95CEE5005AB4DE /* Tests */, + 3B90591D1DAECB9E00B4EEC0 /* BuildControl */, + 3B9059041DAECB5200B4EEC0 /* Products */, + 3B3B9D8D1E95CF8B005AB4DE /* Frameworks */, + ); + sourceTree = ""; + }; + 3B9059041DAECB5200B4EEC0 /* Products */ = { isa = PBXGroup; children = ( - 1413670716D9BEC700501ABB /* CopyTests.m */, - 0DEB8F2D14681BD800024989 /* players.xml */, - 0DEB8F2B14681A0800024989 /* Tests-Prefix.pch */, - 0DEB8EC61467ED9C00024989 /* BoundaryTests.m */, - 0DEB8EC71467ED9C00024989 /* DeepChildrenTests.m */, - 0DEB8EC81467ED9C00024989 /* DeepTests.m */, - 0DEB8EC91467ED9C00024989 /* ErrorTests.m */, - 0DEB8ECA1467ED9C00024989 /* SimpleTests.m */, - 0DEB8ECB1467ED9C00024989 /* TextConversionTests.m */, - 0DEB8ECC1467ED9C00024989 /* WildcardTests.m */, - 02F3A4041526D7BC00E8C822 /* EncodingTests.m */, - 027B6BCF153C652E00A4EDF2 /* XPathTests.m */, - 02ADE6A116A0E33A008643D5 /* AttributeTests.m */, - 5415BE4116FC638100AFC566 /* HTMLTests.m */, + 3B9059031DAECB5200B4EEC0 /* RaptureXML.framework */, + 3B90590C1DAECB5200B4EEC0 /* RaptureXMLUnitTests.xctest */, ); - name = Tests; - path = RaptureXMLTests; + name = Products; sourceTree = ""; }; - 027DAC2B14FBF443001BA563 /* RaptureXML */ = { + 3B90591D1DAECB9E00B4EEC0 /* BuildControl */ = { isa = PBXGroup; children = ( - 027DAC2E14FBF443001BA563 /* RXMLElement.h */, - 027DAC2F14FBF443001BA563 /* RXMLElement.m */, + 3B9059241DAECB9E00B4EEC0 /* config */, + 3B6E351D1F67C67C000741A0 /* Info-Target.plist */, + 3B90592C1DAECD9800B4EEC0 /* Info-Tests.plist */, ); - path = RaptureXML; + path = BuildControl; sourceTree = ""; }; - 6BD1BD931558B7A800F1D055 /* RaptureXML-StaticLib */ = { + 3B9059241DAECB9E00B4EEC0 /* config */ = { isa = PBXGroup; children = ( - 6BD1BD941558B7A800F1D055 /* Supporting Files */, + 3B9059251DAECB9E00B4EEC0 /* Debug.xcconfig */, + 3B9059271DAECB9E00B4EEC0 /* Project.xcconfig */, + 3B9059281DAECB9E00B4EEC0 /* Release.xcconfig */, + 3B6E351E1F67C688000741A0 /* Target.xcconfig */, + 3B9059291DAECB9E00B4EEC0 /* Tests.xcconfig */, ); - path = "RaptureXML-StaticLib"; + path = config; sourceTree = ""; }; - 6BD1BD941558B7A800F1D055 /* Supporting Files */ = { + 3B90592F1DAECF7400B4EEC0 /* Sources */ = { isa = PBXGroup; children = ( - 6BD1BD951558B7A800F1D055 /* RaptureXML-StaticLib-Prefix.pch */, + 3B3B9D6A1E95CEC8005AB4DE /* RaptureXML.h */, + 3B3B9D6B1E95CEC8005AB4DE /* RXMLElement.h */, + 3B3B9D6C1E95CEC8005AB4DE /* RXMLElement.m */, ); - name = "Supporting Files"; + path = Sources; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 0DEB8EB21467EC9B00024989 /* Headers */ = { + 3B9059001DAECB5200B4EEC0 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 3B3B9D6E1E95CEC8005AB4DE /* RXMLElement.h in Headers */, + 3B3B9D6D1E95CEC8005AB4DE /* RaptureXML.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 0252B2DC142ADFC60018B75D /* RaptureXMLTests */ = { + 3B9059021DAECB5200B4EEC0 /* RaptureXML */ = { isa = PBXNativeTarget; - buildConfigurationList = 0252B2F4142ADFC70018B75D /* Build configuration list for PBXNativeTarget "RaptureXMLTests" */; + buildConfigurationList = 3B9059171DAECB5200B4EEC0 /* Build configuration list for PBXNativeTarget "RaptureXML" */; buildPhases = ( - 0252B2D8142ADFC60018B75D /* Sources */, - 0252B2D9142ADFC60018B75D /* Frameworks */, - 0252B2DA142ADFC60018B75D /* Resources */, - 0252B2DB142ADFC60018B75D /* ShellScript */, + 3B9058FE1DAECB5200B4EEC0 /* Sources */, + 3B9058FF1DAECB5200B4EEC0 /* Frameworks */, + 3B9059001DAECB5200B4EEC0 /* Headers */, + 3B9059011DAECB5200B4EEC0 /* Resources */, ); buildRules = ( ); dependencies = ( ); - name = RaptureXMLTests; - productName = RaptureXMLTests; - productReference = 0252B2DD142ADFC60018B75D /* RaptureXMLTests.octest */; - productType = "com.apple.product-type.bundle"; + name = RaptureXML; + productName = RaptureXML; + productReference = 3B9059031DAECB5200B4EEC0 /* RaptureXML.framework */; + productType = "com.apple.product-type.framework"; }; - 0DEB8EB31467EC9B00024989 /* RaptureXML */ = { + 3B90590B1DAECB5200B4EEC0 /* RaptureXMLTests */ = { isa = PBXNativeTarget; - buildConfigurationList = 0DEB8EBC1467EC9B00024989 /* Build configuration list for PBXNativeTarget "RaptureXML" */; + buildConfigurationList = 3B90591A1DAECB5200B4EEC0 /* Build configuration list for PBXNativeTarget "RaptureXMLTests" */; buildPhases = ( - 0DEB8EB01467EC9B00024989 /* Sources */, - 0DEB8EB11467EC9B00024989 /* Frameworks */, - 0DEB8EB21467EC9B00024989 /* Headers */, + 3B9059081DAECB5200B4EEC0 /* Sources */, + 3B9059091DAECB5200B4EEC0 /* Frameworks */, + 3B90590A1DAECB5200B4EEC0 /* Resources */, ); buildRules = ( ); dependencies = ( + 3B90590F1DAECB5200B4EEC0 /* PBXTargetDependency */, ); - name = RaptureXML; - productName = RaptureXML; - productReference = 0DEB8EB41467EC9B00024989 /* libRaptureXML.a */; - productType = "com.apple.product-type.library.static"; + name = RaptureXMLTests; + productName = RaptureXMLTests; + productReference = 3B90590C1DAECB5200B4EEC0 /* RaptureXMLUnitTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - 0252B2B6142ADFC60018B75D /* Project object */ = { + 3B9058FA1DAECB5200B4EEC0 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0460; - ORGANIZATIONNAME = "Rapture In Venice"; + LastSwiftUpdateCheck = 0800; + LastUpgradeCheck = 0900; + ORGANIZATIONNAME = "Gilt Groupe"; + TargetAttributes = { + 3B9059021DAECB5200B4EEC0 = { + CreatedOnToolsVersion = 8.0; + DevelopmentTeam = MTP6A36P8K; + ProvisioningStyle = Automatic; + }; + 3B90590B1DAECB5200B4EEC0 = { + CreatedOnToolsVersion = 8.0; + DevelopmentTeam = MTP6A36P8K; + LastSwiftMigration = 0830; + ProvisioningStyle = Automatic; + }; + }; }; - buildConfigurationList = 0252B2B9142ADFC60018B75D /* Build configuration list for PBXProject "RaptureXML" */; + buildConfigurationList = 3B9058FD1DAECB5200B4EEC0 /* Build configuration list for PBXProject "RaptureXML" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, - English, - de, - el, - es, - fr, - it, - ru, ); - mainGroup = 0252B2B4142ADFC60018B75D; - productRefGroup = 0252B2C0142ADFC60018B75D /* Products */; + mainGroup = 3B9058F91DAECB5200B4EEC0; + productRefGroup = 3B9059041DAECB5200B4EEC0 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 0DEB8EB31467EC9B00024989 /* RaptureXML */, - 0252B2DC142ADFC60018B75D /* RaptureXMLTests */, - 6BD1BD9D1558B7FA00F1D055 /* RaptureXMLFramework */, + 3B9059021DAECB5200B4EEC0 /* RaptureXML */, + 3B90590B1DAECB5200B4EEC0 /* RaptureXMLTests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 0252B2DA142ADFC60018B75D /* Resources */ = { + 3B9059011DAECB5200B4EEC0 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; - files = ( - 02F3A3FF1526D22600E8C822 /* players.xml in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 0252B2DB142ADFC60018B75D /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; - }; - 6BD1BDA61558B82400F1D055 /* Build static lib */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; files = ( ); - inputPaths = ( - ); - name = "Build static lib"; - outputPaths = ( - ); runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/usr/bin/xcodebuild -project ${PROJECT_NAME}.xcodeproj -sdk iphonesimulator -target ${PROJECT_NAME} -configuration ${CONFIGURATION} clean build\n/usr/bin/xcodebuild -project ${PROJECT_NAME}.xcodeproj -sdk iphoneos -target ${PROJECT_NAME} -configuration ${CONFIGURATION} clean build\n"; }; - 6BD1BDA71558B85A00F1D055 /* Assemble Framework */ = { - isa = PBXShellScriptBuildPhase; + 3B90590A1DAECB5200B4EEC0 /* Resources */ = { + isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - ); - inputPaths = ( - ); - name = "Assemble Framework"; - outputPaths = ( + 3B3B9D881E95CEE5005AB4DE /* players.xml in Resources */, ); runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin\nSIMULATOR_LIBRARY_PATH=\"${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/lib${PROJECT_NAME}.a\" &&\nDEVICE_LIBRARY_PATH=\"${BUILD_DIR}/${CONFIGURATION}-iphoneos/lib${PROJECT_NAME}.a\" &&\nUNIVERSAL_LIBRARY_DIR=\"${BUILD_DIR}/${CONFIGURATION}-iphoneuniversal\" &&\nUNIVERSAL_LIBRARY_PATH=\"${UNIVERSAL_LIBRARY_DIR}/${PRODUCT_NAME}\" &&\nFRAMEWORK=\"${UNIVERSAL_LIBRARY_DIR}/${PRODUCT_NAME}.framework\" &&\n\n# Create framework directory structure.\nrm -rf \"${FRAMEWORK}\" &&\nmkdir -p \"${UNIVERSAL_LIBRARY_DIR}\" &&\nmkdir -p \"${FRAMEWORK}/Versions/A/Headers\" &&\nmkdir -p \"${FRAMEWORK}/Versions/A/Resources\" &&\n\n# Generate universal binary from desktop, device, and simulator builds.\nlipo \"${SIMULATOR_LIBRARY_PATH}\" \"${DEVICE_LIBRARY_PATH}\" -create -output \"${UNIVERSAL_LIBRARY_PATH}\" &&\n\n# Move files to appropriate locations in framework paths.\ncp \"${UNIVERSAL_LIBRARY_PATH}\" \"${FRAMEWORK}/Versions/A\" &&\nln -s \"A\" \"${FRAMEWORK}/Versions/Current\" &&\nln -s \"Versions/Current/Headers\" \"${FRAMEWORK}/Headers\" &&\nln -s \"Versions/Current/Resources\" \"${FRAMEWORK}/Resources\" &&\nln -s \"Versions/Current/${PRODUCT_NAME}\" \"${FRAMEWORK}/${PRODUCT_NAME}\"\n#cp \"${SRCROOT}/Resources/Info.plist\" \"${FRAMEWORK}/Resources/Info.plist\""; }; -/* End PBXShellScriptBuildPhase section */ +/* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 0252B2D8142ADFC60018B75D /* Sources */ = { + 3B9058FE1DAECB5200B4EEC0 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 027DAC3314FBF443001BA563 /* RXMLElement.m in Sources */, - 027B3571153C624700A4EDF2 /* DeepChildrenTests.m in Sources */, - 02ADE6A216A0E33A008643D5 /* AttributeTests.m in Sources */, - 02ADE6A316A0E491008643D5 /* BoundaryTests.m in Sources */, - 02ADE6A416A0E491008643D5 /* DeepTests.m in Sources */, - 02ADE6A516A0E491008643D5 /* ErrorTests.m in Sources */, - 02ADE6A616A0E491008643D5 /* SimpleTests.m in Sources */, - 02ADE6A716A0E491008643D5 /* TextConversionTests.m in Sources */, - 02ADE6A816A0E491008643D5 /* WildcardTests.m in Sources */, - 02ADE6A916A0E491008643D5 /* EncodingTests.m in Sources */, - 02ADE6AA16A0E491008643D5 /* XPathTests.m in Sources */, - 02565F9916E6320700A882F9 /* CopyTests.m in Sources */, - 5415BE4216FC638100AFC566 /* HTMLTests.m in Sources */, + 3B3B9D6F1E95CEC8005AB4DE /* RXMLElement.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 0DEB8EB01467EC9B00024989 /* Sources */ = { + 3B9059081DAECB5200B4EEC0 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 027DAC3614FBF465001BA563 /* RXMLElement.m in Sources */, + 3B3B9D851E95CEE5005AB4DE /* EncodingTests.m in Sources */, + 3B3B9D8B1E95CEE5005AB4DE /* WildcardTests.m in Sources */, + 3B3B9D831E95CEE5005AB4DE /* DeepChildrenTests.m in Sources */, + 3B3B9D8C1E95CEE5005AB4DE /* XPathTests.m in Sources */, + 3B3B9D821E95CEE5005AB4DE /* CopyTests.m in Sources */, + 3B3B9D801E95CEE5005AB4DE /* AttributeTests.m in Sources */, + 3B3B9D841E95CEE5005AB4DE /* DeepTests.m in Sources */, + 3B3B9D811E95CEE5005AB4DE /* BoundaryTests.m in Sources */, + 3B3B9D8A1E95CEE5005AB4DE /* TextConversionTests.m in Sources */, + 3B3B9D871E95CEE5005AB4DE /* HTMLTests.m in Sources */, + 3B3B9D921E95D5C8005AB4DE /* RaptureTestSuite.m in Sources */, + 3B3B9D861E95CEE5005AB4DE /* ErrorTests.m in Sources */, + 3B3B9D891E95CEE5005AB4DE /* SimpleTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 3B90590F1DAECB5200B4EEC0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3B9059021DAECB5200B4EEC0 /* RaptureXML */; + targetProxy = 3B90590E1DAECB5200B4EEC0 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin XCBuildConfiguration section */ - 0252B2EF142ADFC70018B75D /* Debug */ = { + 3B9059151DAECB5200B4EEC0 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 3B9059271DAECB9E00B4EEC0 /* Project.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_SUSPICIOUS_MOVES = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 5; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; - SDKROOT = iphoneos; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 0252B2F0142ADFC70018B75D /* Release */ = { + 3B9059161DAECB5200B4EEC0 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 3B9059271DAECB9E00B4EEC0 /* Project.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_SUSPICIOUS_MOVES = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 5; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - SDKROOT = iphoneos; + MTL_ENABLE_DEBUG_INFO = NO; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; name = Release; }; - 0252B2F5142ADFC70018B75D /* Debug */ = { + 3B9059181DAECB5200B4EEC0 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 3B9059251DAECB9E00B4EEC0 /* Debug.xcconfig */; buildSettings = { - CLANG_ENABLE_OBJC_ARC = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(DEVELOPER_LIBRARY_DIR)/Frameworks", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; - GCC_VERSION = ""; - HEADER_SEARCH_PATHS = "\"$(SDK_DIR)\"/usr/include/libxml2/**"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_AFTER_BUILD = YES; - TEST_HOST = "$(BUNDLE_LOADER)"; - WRAPPER_EXTENSION = octest; - }; - name = Debug; - }; - 0252B2F6142ADFC70018B75D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_OBJC_ARC = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(DEVELOPER_LIBRARY_DIR)/Frameworks", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; - GCC_VERSION = ""; - HEADER_SEARCH_PATHS = "\"$(SDK_DIR)\"/usr/include/libxml2/**"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_AFTER_BUILD = YES; - TEST_HOST = "$(BUNDLE_LOADER)"; - WRAPPER_EXTENSION = octest; - }; - name = Release; - }; - 0DEB8EBD1467EC9B00024989 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_OBJC_ARC = YES; - DSTROOT = /tmp/RaptureXML.dst; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/../.metadata/.plugins/org.eclipse.debug.core/.launches/System/Library/Frameworks\"", - "\"$(SRCROOT)/../Cognitive\"", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Library-Prefix.pch"; - GCC_VERSION = ""; - HEADER_SEARCH_PATHS = "\"$(SDK_DIR)\"/usr/include/libxml2/**"; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/../FuzzAlert/AdMob\"", - "\"$(SRCROOT)/../FuzzAlert/FlurryLibWithLocation\"", - "\"$(SRCROOT)/../FuzzAlert/libGHUnitIPhone4_0-0.4.21\"", - "\"$(SRCROOT)/../FuzzAlert/three20/Build/Products/Debug-iphonesimulator\"", - "\"$(SRCROOT)/../FuzzAlert/three20/Build/Products/Release-iphonesimulator\"", - "\"$(SRCROOT)/../InnerBand/libGHUnitIPhone4_0-0.4.22\"", - "\"$(SRCROOT)/../TaskList/FlurryLib\"", - "\"$(SRCROOT)/../WordsWithPractice/WordsWithPractice/GoogleAdMobAdsSDK\"", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 5; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + HEADER_SEARCH_PATHS = "\"$(SDK_DIR)\"/usr/include/libxml2"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; SKIP_INSTALL = YES; }; name = Debug; }; - 0DEB8EBE1467EC9B00024989 /* Release */ = { + 3B9059191DAECB5200B4EEC0 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 3B9059281DAECB9E00B4EEC0 /* Release.xcconfig */; buildSettings = { - CLANG_ENABLE_OBJC_ARC = YES; - DSTROOT = /tmp/RaptureXML.dst; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/../.metadata/.plugins/org.eclipse.debug.core/.launches/System/Library/Frameworks\"", - "\"$(SRCROOT)/../Cognitive\"", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Library-Prefix.pch"; - GCC_VERSION = ""; - HEADER_SEARCH_PATHS = "\"$(SDK_DIR)\"/usr/include/libxml2/**"; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/../FuzzAlert/AdMob\"", - "\"$(SRCROOT)/../FuzzAlert/FlurryLibWithLocation\"", - "\"$(SRCROOT)/../FuzzAlert/libGHUnitIPhone4_0-0.4.21\"", - "\"$(SRCROOT)/../FuzzAlert/three20/Build/Products/Debug-iphonesimulator\"", - "\"$(SRCROOT)/../FuzzAlert/three20/Build/Products/Release-iphonesimulator\"", - "\"$(SRCROOT)/../InnerBand/libGHUnitIPhone4_0-0.4.22\"", - "\"$(SRCROOT)/../TaskList/FlurryLib\"", - "\"$(SRCROOT)/../WordsWithPractice/WordsWithPractice/GoogleAdMobAdsSDK\"", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 5; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + HEADER_SEARCH_PATHS = "\"$(SDK_DIR)\"/usr/include/libxml2"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; SKIP_INSTALL = YES; }; name = Release; }; - 6BD1BD9F1558B7FA00F1D055 /* Debug */ = { + 3B90591B1DAECB5200B4EEC0 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 3B9059291DAECB9E00B4EEC0 /* Tests.xcconfig */; buildSettings = { - PRODUCT_NAME = RaptureXML; + SWIFT_VERSION = 3.0; }; name = Debug; }; - 6BD1BDA01558B7FA00F1D055 /* Release */ = { + 3B90591C1DAECB5200B4EEC0 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 3B9059291DAECB9E00B4EEC0 /* Tests.xcconfig */; buildSettings = { - PRODUCT_NAME = RaptureXML; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 3.0; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 0252B2B9142ADFC60018B75D /* Build configuration list for PBXProject "RaptureXML" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 0252B2EF142ADFC70018B75D /* Debug */, - 0252B2F0142ADFC70018B75D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 0252B2F4142ADFC70018B75D /* Build configuration list for PBXNativeTarget "RaptureXMLTests" */ = { + 3B9058FD1DAECB5200B4EEC0 /* Build configuration list for PBXProject "RaptureXML" */ = { isa = XCConfigurationList; buildConfigurations = ( - 0252B2F5142ADFC70018B75D /* Debug */, - 0252B2F6142ADFC70018B75D /* Release */, + 3B9059151DAECB5200B4EEC0 /* Debug */, + 3B9059161DAECB5200B4EEC0 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 0DEB8EBC1467EC9B00024989 /* Build configuration list for PBXNativeTarget "RaptureXML" */ = { + 3B9059171DAECB5200B4EEC0 /* Build configuration list for PBXNativeTarget "RaptureXML" */ = { isa = XCConfigurationList; buildConfigurations = ( - 0DEB8EBD1467EC9B00024989 /* Debug */, - 0DEB8EBE1467EC9B00024989 /* Release */, + 3B9059181DAECB5200B4EEC0 /* Debug */, + 3B9059191DAECB5200B4EEC0 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 6BD1BD9E1558B7FA00F1D055 /* Build configuration list for PBXAggregateTarget "RaptureXMLFramework" */ = { + 3B90591A1DAECB5200B4EEC0 /* Build configuration list for PBXNativeTarget "RaptureXMLTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 6BD1BD9F1558B7FA00F1D055 /* Debug */, - 6BD1BDA01558B7FA00F1D055 /* Release */, + 3B90591B1DAECB5200B4EEC0 /* Debug */, + 3B90591C1DAECB5200B4EEC0 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; - rootObject = 0252B2B6142ADFC60018B75D /* Project object */; + rootObject = 3B9058FA1DAECB5200B4EEC0 /* Project object */; } diff --git a/RaptureXML.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/RaptureXML.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..30826c0 --- /dev/null +++ b/RaptureXML.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/RaptureXML.xcodeproj/xcshareddata/xcschemes/RaptureXML.xcscheme b/RaptureXML.xcodeproj/xcshareddata/xcschemes/RaptureXML.xcscheme new file mode 100644 index 0000000..676dd10 --- /dev/null +++ b/RaptureXML.xcodeproj/xcshareddata/xcschemes/RaptureXML.xcscheme @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RaptureXML/RXMLElement.h b/Sources/RXMLElement.h similarity index 96% rename from RaptureXML/RXMLElement.h rename to Sources/RXMLElement.h index 6bc81a0..e5a74f1 100644 --- a/RaptureXML/RXMLElement.h +++ b/Sources/RXMLElement.h @@ -29,11 +29,11 @@ // #import -#import -#import -#import -#import -#import + +#ifndef __XML_TREE_H__ +typedef void* xmlDocPtr; +typedef void* xmlNodePtr; +#endif @interface RXMLDocHolder : NSObject { xmlDocPtr doc_; diff --git a/RaptureXML/RXMLElement.m b/Sources/RXMLElement.m similarity index 98% rename from RaptureXML/RXMLElement.m rename to Sources/RXMLElement.m index eaf0733..8fccb89 100644 --- a/RaptureXML/RXMLElement.m +++ b/Sources/RXMLElement.m @@ -28,7 +28,15 @@ // ================================================================================================ // -#import "RXMLElement.h" +// XML library dependencies + +#import +#import +#import +#import +#import + +#import @implementation RXMLDocHolder diff --git a/Sources/RaptureXML.h b/Sources/RaptureXML.h new file mode 100644 index 0000000..3a7effd --- /dev/null +++ b/Sources/RaptureXML.h @@ -0,0 +1,19 @@ +// +// RaptureXML.h +// RaptureXML +// +// Created by emaloney on 3/4/16. +// Copyright © 2016 Rapture In Venice. All rights reserved. +// + +#import + +//! Project version number for RaptureXML. +FOUNDATION_EXPORT double RaptureXMLVersionNumber; + +//! Project version string for RaptureXML. +FOUNDATION_EXPORT const unsigned char RaptureXMLVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +#import diff --git a/AttributeTests.m b/Tests/AttributeTests.m similarity index 65% rename from AttributeTests.m rename to Tests/AttributeTests.m index b7e15f0..0325069 100644 --- a/AttributeTests.m +++ b/Tests/AttributeTests.m @@ -6,9 +6,10 @@ // Copyright (c) 2011 Rapture In Venice. All rights reserved. // +#import #import "RXMLElement.h" -@interface AttributeTests : SenTestCase { +@interface AttributeTests : XCTestCase { NSString *attributedXML_; } @@ -28,16 +29,16 @@ - (void)setUp { - (void)testAttributedText { RXMLElement *rxml = [RXMLElement elementFromXMLString:attributedXML_ encoding:NSUTF8StringEncoding]; NSArray *atts = [rxml attributeNames]; - STAssertEquals(atts.count, 2U, nil); - STAssertTrue([atts containsObject:@"count"], nil); - STAssertTrue([atts containsObject:@"style"], nil); + XCTAssertEqual(atts.count, 2U); + XCTAssertTrue([atts containsObject:@"count"]); + XCTAssertTrue([atts containsObject:@"style"]); RXMLElement *squarexml = [rxml child:@"square"]; atts = [squarexml attributeNames]; - STAssertEquals(atts.count, 3U, nil); - STAssertTrue([atts containsObject:@"name"], nil); - STAssertTrue([atts containsObject:@"id"], nil); - STAssertTrue([atts containsObject:@"sideLength"], nil); + XCTAssertEqual(atts.count, 3U); + XCTAssertTrue([atts containsObject:@"name"]); + XCTAssertTrue([atts containsObject:@"id"]); + XCTAssertTrue([atts containsObject:@"sideLength"]); } @end diff --git a/Tests/BoundaryTests.m b/Tests/BoundaryTests.m index aa218ed..acd8874 100644 --- a/Tests/BoundaryTests.m +++ b/Tests/BoundaryTests.m @@ -6,9 +6,10 @@ // Copyright (c) 2011 Rapture In Venice. All rights reserved. // +#import #import "RXMLElement.h" -@interface BoundaryTests : SenTestCase { +@interface BoundaryTests : XCTestCase { NSString *emptyXML_; NSString *emptyTopTagXML_; NSString *childXML_; @@ -34,52 +35,52 @@ - (void)setUp { - (void)testEmptyXML { RXMLElement *rxml = [RXMLElement elementFromXMLString:emptyXML_ encoding:NSUTF8StringEncoding]; - STAssertFalse(rxml.isValid, nil); + XCTAssertFalse(rxml.isValid); } - (void)testEmptyTopTagXML { RXMLElement *rxml = [RXMLElement elementFromXMLString:emptyTopTagXML_ encoding:NSUTF8StringEncoding]; - STAssertTrue(rxml.isValid, nil); - STAssertEqualObjects(rxml.text, @"", nil); - STAssertEqualObjects([rxml childrenWithRootXPath:@"*"], [NSArray array], nil); + XCTAssertTrue(rxml.isValid); + XCTAssertEqualObjects(rxml.text, @""); + XCTAssertEqualObjects([rxml childrenWithRootXPath:@"*"], [NSArray array]); } - (void)testAttribute { RXMLElement *rxml = [RXMLElement elementFromXMLString:attributeXML_ encoding:NSUTF8StringEncoding]; - STAssertTrue(rxml.isValid, nil); - STAssertEqualObjects([rxml attribute:@"foo"], @"bar", nil); + XCTAssertTrue(rxml.isValid); + XCTAssertEqualObjects([rxml attribute:@"foo"], @"bar"); } - (void)testNamespaceAttribute { RXMLElement *rxml = [RXMLElement elementFromXMLString:namespaceXML_ encoding:NSUTF8StringEncoding]; - STAssertTrue(rxml.isValid, nil); - STAssertEqualObjects([rxml attribute:@"foo" inNamespace:@"*"], @"bar", nil); - STAssertEquals([rxml attributeAsInt:@"one" inNamespace:@"*"], 1, nil); + XCTAssertTrue(rxml.isValid); + XCTAssertEqualObjects([rxml attribute:@"foo" inNamespace:@"*"], @"bar"); + XCTAssertEqual([rxml attributeAsInt:@"one" inNamespace:@"*"], 1); } - (void)testChild { RXMLElement *rxml = [RXMLElement elementFromXMLString:childXML_ encoding:NSUTF8StringEncoding]; - STAssertTrue(rxml.isValid, nil); - STAssertEqualObjects([rxml child:@"empty_child"].text, @"", nil); - STAssertEqualObjects([rxml child:@"text_child"].text, @"foo", nil); + XCTAssertTrue(rxml.isValid); + XCTAssertEqualObjects([rxml child:@"empty_child"].text, @""); + XCTAssertEqualObjects([rxml child:@"text_child"].text, @"foo"); } - (void)testNamespaceChild { RXMLElement *rxml = [RXMLElement elementFromXMLString:namespaceXML_ encoding:NSUTF8StringEncoding]; - STAssertTrue(rxml.isValid, nil); - STAssertEqualObjects([rxml child:@"text" inNamespace:@"*"].text, @"something", nil); + XCTAssertTrue(rxml.isValid); + XCTAssertEqualObjects([rxml child:@"text" inNamespace:@"*"].text, @"something"); } - (void)testChildren { RXMLElement *rxml = [RXMLElement elementFromXMLString:childrenXML_ encoding:NSUTF8StringEncoding]; - STAssertTrue(rxml.isValid, nil); - STAssertEquals([rxml children:@"child"].count, 3U, nil); + XCTAssertTrue(rxml.isValid); + XCTAssertEqual([rxml children:@"child"].count, 3U); } - (void)testNamespaceChildren { RXMLElement *rxml = [RXMLElement elementFromXMLString:namespaceXML_ encoding:NSUTF8StringEncoding]; - STAssertTrue(rxml.isValid, nil); - STAssertEquals([rxml children:@"text" inNamespace:@"*"].count, 1U, nil); + XCTAssertTrue(rxml.isValid); + XCTAssertEqual([rxml children:@"text" inNamespace:@"*"].count, 1U); } @end diff --git a/Tests/CopyTests.m b/Tests/CopyTests.m index 92d43c8..ee377d6 100644 --- a/Tests/CopyTests.m +++ b/Tests/CopyTests.m @@ -7,9 +7,10 @@ // Copyright (c) 2011 Rapture In Venice. All rights reserved. // +#import #import "RXMLElement.h" -@interface CopyTests : SenTestCase { +@interface CopyTests : XCTestCase { NSString *simplifiedXML_; NSString *attributedXML_; NSString *interruptedTextXML_; @@ -41,13 +42,13 @@ - (void)setUp { - (void)testInterruptedText { RXMLElement *rxml = [RXMLElement elementFromXMLString:interruptedTextXML_ encoding:NSUTF8StringEncoding]; RXMLElement *rxml2 = [rxml copy]; - STAssertEqualObjects(rxml2.text, @"thisisinterruptedtext", nil); + XCTAssertEqualObjects(rxml2.text, @"thisisinterruptedtext"); } - (void)testCDataText { RXMLElement *rxml = [RXMLElement elementFromXMLString:cdataXML_ encoding:NSUTF8StringEncoding]; RXMLElement *rxml2 = [rxml copy]; - STAssertEqualObjects(rxml2.text, @"thisiscdata", nil); + XCTAssertEqualObjects(rxml2.text, @"thisiscdata"); } - (void)testTags { @@ -57,20 +58,20 @@ - (void)testTags { [rxml2 iterate:@"*" usingBlock:^(RXMLElement *e) { if (i == 0) { - STAssertEqualObjects(e.tag, @"square", nil); - STAssertEqualObjects(e.text, @"Square", nil); + XCTAssertEqualObjects(e.tag, @"square"); + XCTAssertEqualObjects(e.text, @"Square"); } else if (i == 1) { - STAssertEqualObjects(e.tag, @"triangle", nil); - STAssertEqualObjects(e.text, @"Triangle", nil); + XCTAssertEqualObjects(e.tag, @"triangle"); + XCTAssertEqualObjects(e.text, @"Triangle"); } else if (i == 2) { - STAssertEqualObjects(e.tag, @"circle", nil); - STAssertEqualObjects(e.text, @"Circle", nil); + XCTAssertEqualObjects(e.tag, @"circle"); + XCTAssertEqualObjects(e.text, @"Circle"); } i++; }]; - STAssertEquals(i, 3, nil); + XCTAssertEqual(i, 3); } - (void)testAttributes { @@ -80,17 +81,17 @@ - (void)testAttributes { [rxml2 iterate:@"*" usingBlock:^(RXMLElement *e) { if (i == 0) { - STAssertEqualObjects([e attribute:@"name"], @"Square", nil); + XCTAssertEqualObjects([e attribute:@"name"], @"Square"); } else if (i == 1) { - STAssertEqualObjects([e attribute:@"name"], @"Triangle", nil); + XCTAssertEqualObjects([e attribute:@"name"], @"Triangle"); } else if (i == 2) { - STAssertEqualObjects([e attribute:@"name"], @"Circle", nil); + XCTAssertEqualObjects([e attribute:@"name"], @"Circle"); } i++; }]; - STAssertEquals(i, 3, nil); + XCTAssertEqual(i, 3); } @end diff --git a/Tests/DeepChildrenTests.m b/Tests/DeepChildrenTests.m index 7579b96..23f0dec 100644 --- a/Tests/DeepChildrenTests.m +++ b/Tests/DeepChildrenTests.m @@ -6,9 +6,9 @@ // Copyright (c) 2011 Rapture In Venice. All rights reserved. // -#import "RXMLElement.h" +#import "RaptureTestSuite.h" -@interface DeepChildrenTests : SenTestCase { +@interface DeepChildrenTests : RaptureTestSuite { } @end @@ -18,7 +18,7 @@ @interface DeepChildrenTests : SenTestCase { @implementation DeepChildrenTests - (void)testQuery { - RXMLElement *rxml = [RXMLElement elementFromXMLFile:@"players.xml"]; + RXMLElement *rxml = [self testXML]; __block NSInteger i = 0; // count the players @@ -29,26 +29,26 @@ - (void)testQuery { i++; }]; - STAssertEquals(i, 9, nil); + XCTAssertEqual(i, 9); } - (void)testDeepChildQuery { - RXMLElement *rxml = [RXMLElement elementFromXMLFile:@"players.xml"]; - + RXMLElement *rxml = [self testXML]; + // count the players RXMLElement *coachingYears = [rxml child:@"players.coach.experience.years"]; - STAssertEquals(coachingYears.textAsInt, 1, nil); + XCTAssertEqual(coachingYears.textAsInt, 1); } - (void)testDeepChildQueryWithWildcard { - RXMLElement *rxml = [RXMLElement elementFromXMLFile:@"players.xml"]; + RXMLElement *rxml = [self testXML]; // count the players RXMLElement *coachingYears = [rxml child:@"players.coach.experience.teams.*"]; // first team returned - STAssertEquals(coachingYears.textAsInt, 53, nil); + XCTAssertEqual(coachingYears.textAsInt, 53); } @end diff --git a/Tests/DeepTests.m b/Tests/DeepTests.m index f595091..e40f6a5 100644 --- a/Tests/DeepTests.m +++ b/Tests/DeepTests.m @@ -6,9 +6,9 @@ // Copyright (c) 2011 Rapture In Venice. All rights reserved. // -#import "RXMLElement.h" +#import "RaptureTestSuite.h" -@interface DeepTests : SenTestCase { +@interface DeepTests : RaptureTestSuite { } @end @@ -18,7 +18,7 @@ @interface DeepTests : SenTestCase { @implementation DeepTests - (void)testQuery { - RXMLElement *rxml = [RXMLElement elementFromXMLFile:@"players.xml"]; + RXMLElement *rxml = [self testXML]; __block NSInteger i; // count the players @@ -28,7 +28,7 @@ - (void)testQuery { i++; }]; - STAssertEquals(i, 9, nil); + XCTAssertEqual(i, 9); // count the first player's name i = 0; @@ -37,7 +37,7 @@ - (void)testQuery { i++; }]; - STAssertEquals(i, 1, nil); + XCTAssertEqual(i, 1); // count the coaches i = 0; @@ -46,7 +46,7 @@ - (void)testQuery { i++; }]; - STAssertEquals(i, 1, nil); + XCTAssertEqual(i, 1); } @end diff --git a/EncodingTests.m b/Tests/EncodingTests.m similarity index 76% rename from EncodingTests.m rename to Tests/EncodingTests.m index 6890af8..5330462 100644 --- a/EncodingTests.m +++ b/Tests/EncodingTests.m @@ -6,9 +6,10 @@ // Copyright (c) 2012 Rapture In Venice. All rights reserved. // +#import #import "RXMLElement.h" -@interface EncodingTests : SenTestCase { +@interface EncodingTests : XCTestCase { NSString *chineseXML_; } @@ -24,7 +25,7 @@ - (void)setUp { - (void)testChinese { RXMLElement *rxml = [RXMLElement elementFromXMLString:chineseXML_ encoding:NSUTF8StringEncoding]; - STAssertEqualObjects([rxml attribute:@"data"], @"以晴为主", nil); + XCTAssertEqualObjects([rxml attribute:@"data"], @"以晴为主"); } @end diff --git a/Tests/ErrorTests.m b/Tests/ErrorTests.m index c6370c2..d2dc9ce 100644 --- a/Tests/ErrorTests.m +++ b/Tests/ErrorTests.m @@ -6,9 +6,10 @@ // Copyright (c) 2011 Rapture In Venice. All rights reserved. // +#import #import "RXMLElement.h" -@interface ErrorTests : SenTestCase { +@interface ErrorTests : XCTestCase { NSString *simplifiedXML_; NSString *badXML_; } @@ -31,14 +32,14 @@ - (void)setUp { - (void)testBadXML { RXMLElement *rxml = [RXMLElement elementFromXMLString:badXML_ encoding:NSUTF8StringEncoding]; - STAssertFalse([rxml isValid], nil); + XCTAssertFalse([rxml isValid]); } - (void)testMissingTag { RXMLElement *rxml = [RXMLElement elementFromXMLString:simplifiedXML_ encoding:NSUTF8StringEncoding]; RXMLElement *hexagon = [rxml child:@"hexagon"]; - STAssertNil(hexagon, nil); + XCTAssertNil(hexagon); } - (void)testMissingTagIteration { @@ -49,14 +50,14 @@ - (void)testMissingTagIteration { i++; }]; - STAssertEquals(i, 0, nil); + XCTAssertEqual(i, 0); } - (void)testMissingAttribute { RXMLElement *rxml = [RXMLElement elementFromXMLString:simplifiedXML_ encoding:NSUTF8StringEncoding]; NSString *missingName = [rxml attribute:@"name"]; - STAssertNil(missingName, nil); + XCTAssertNil(missingName); } @end diff --git a/Tests/HTMLTests.m b/Tests/HTMLTests.m index 8f1552e..94a8d6e 100644 --- a/Tests/HTMLTests.m +++ b/Tests/HTMLTests.m @@ -6,9 +6,10 @@ // Copyright (c) 2013 Rapture In Venice. All rights reserved. // +#import #import "RXMLElement.h" -@interface HTMLTests : SenTestCase { +@interface HTMLTests : XCTestCase { NSString *simpleHTML_; } @end @@ -32,25 +33,25 @@ - (void)setUp { - (void)testBasicXHTML { RXMLElement *html = [RXMLElement elementFromHTMLString:simpleHTML_ encoding:NSUTF8StringEncoding]; NSArray *atts = [html attributeNames]; - STAssertEquals(atts.count, 2U, nil); + XCTAssertEqual(atts.count, 2U); NSArray* children = [html childrenWithRootXPath:@"//html/body/p"]; - STAssertTrue([children count] > 0, nil); + XCTAssertTrue([children count] > 0); RXMLElement* child = [children objectAtIndex:0]; NSLog(@"content: %@", [child text]); - STAssertEqualObjects([child text], @"This is a minimal XHTML 1.1 document.", nil); + XCTAssertEqualObjects([child text], @"This is a minimal XHTML 1.1 document."); } -(void) testHtmlEntity { RXMLElement* html = [RXMLElement elementFromHTMLString:@"

Don't say "lazy"

" encoding:NSUTF8StringEncoding]; - STAssertEqualObjects([html text], @"Don't say \"lazy\"", nil); + XCTAssertEqualObjects([html text], @"Don't say \"lazy\""); } -(void) testFixBrokenHtml { RXMLElement* html = [RXMLElement elementFromHTMLString:@"

Test

Broken HTML" encoding:NSUTF8StringEncoding]; - STAssertEqualObjects([html text], @"Test Broken HTML", nil); - STAssertEqualObjects([html xml], @"

Test

Broken HTML", nil); + XCTAssertEqualObjects([html text], @"Test Broken HTML"); + XCTAssertEqualObjects([html xml], @"

Test

Broken HTML"); } @end diff --git a/Tests/RaptureTestSuite.h b/Tests/RaptureTestSuite.h new file mode 100644 index 0000000..b788d52 --- /dev/null +++ b/Tests/RaptureTestSuite.h @@ -0,0 +1,16 @@ +// +// RaptureTestSuite.h +// RaptureXML +// +// Created by Evan Maloney on 4/5/17. +// Copyright © 2017 Gilt Groupe. All rights reserved. +// + +#import +#import "RXMLElement.h" + +@interface RaptureTestSuite : XCTestCase + +- (RXMLElement*) testXML; + +@end diff --git a/Tests/RaptureTestSuite.m b/Tests/RaptureTestSuite.m new file mode 100644 index 0000000..bd6fd7d --- /dev/null +++ b/Tests/RaptureTestSuite.m @@ -0,0 +1,22 @@ +// +// RaptureTestSuite.m +// RaptureXML +// +// Created by Evan Maloney on 4/5/17. +// Copyright © 2017 Gilt Groupe. All rights reserved. +// + +#import "RaptureTestSuite.h" + +@implementation RaptureTestSuite + +- (RXMLElement*) testXML +{ + NSBundle* bundle = [NSBundle bundleForClass:[self class]]; + NSString* xmlPath = [bundle pathForResource:@"players" ofType:@"xml"]; + RXMLElement* rxml = [RXMLElement elementFromXMLFilePath:xmlPath]; + XCTAssertTrue(rxml.isValid); + return rxml; +} + +@end diff --git a/Tests/players.xml b/Tests/Resources/players.xml similarity index 100% rename from Tests/players.xml rename to Tests/Resources/players.xml diff --git a/Tests/SimpleTests.m b/Tests/SimpleTests.m index c6f6463..3378ff2 100644 --- a/Tests/SimpleTests.m +++ b/Tests/SimpleTests.m @@ -6,9 +6,10 @@ // Copyright (c) 2011 Rapture In Venice. All rights reserved. // +#import #import "RXMLElement.h" -@interface SimpleTests : SenTestCase { +@interface SimpleTests : XCTestCase { NSString *simplifiedXML_; NSString *attributedXML_; NSString *interruptedTextXML_; @@ -43,12 +44,12 @@ - (void)setUp { - (void)testInterruptedText { RXMLElement *rxml = [RXMLElement elementFromXMLString:interruptedTextXML_ encoding:NSUTF8StringEncoding]; - STAssertEqualObjects(rxml.text, @"thisisinterruptedtext", nil); + XCTAssertEqualObjects(rxml.text, @"thisisinterruptedtext"); } - (void)testCDataText { RXMLElement *rxml = [RXMLElement elementFromXMLString:cdataXML_ encoding:NSUTF8StringEncoding]; - STAssertEqualObjects(rxml.text, @"thisiscdata", nil); + XCTAssertEqualObjects(rxml.text, @"thisiscdata"); } - (void)testTags { @@ -57,20 +58,20 @@ - (void)testTags { [rxml iterate:@"*" usingBlock:^(RXMLElement *e) { if (i == 0) { - STAssertEqualObjects(e.tag, @"square", nil); - STAssertEqualObjects(e.text, @"Square", nil); + XCTAssertEqualObjects(e.tag, @"square"); + XCTAssertEqualObjects(e.text, @"Square"); } else if (i == 1) { - STAssertEqualObjects(e.tag, @"triangle", nil); - STAssertEqualObjects(e.text, @"Triangle", nil); + XCTAssertEqualObjects(e.tag, @"triangle"); + XCTAssertEqualObjects(e.text, @"Triangle"); } else if (i == 2) { - STAssertEqualObjects(e.tag, @"circle", nil); - STAssertEqualObjects(e.text, @"Circle", nil); + XCTAssertEqualObjects(e.tag, @"circle"); + XCTAssertEqualObjects(e.text, @"Circle"); } i++; }]; - STAssertEquals(i, 3, nil); + XCTAssertEqual(i, 3); } - (void)testAttributes { @@ -79,17 +80,17 @@ - (void)testAttributes { [rxml iterate:@"*" usingBlock:^(RXMLElement *e) { if (i == 0) { - STAssertEqualObjects([e attribute:@"name"], @"Square", nil); + XCTAssertEqualObjects([e attribute:@"name"], @"Square"); } else if (i == 1) { - STAssertEqualObjects([e attribute:@"name"], @"Triangle", nil); + XCTAssertEqualObjects([e attribute:@"name"], @"Triangle"); } else if (i == 2) { - STAssertEqualObjects([e attribute:@"name"], @"Circle", nil); + XCTAssertEqualObjects([e attribute:@"name"], @"Circle"); } i++; }]; - STAssertEquals(i, 3, nil); + XCTAssertEqual(i, 3); } -(void) testInnerXml { @@ -100,16 +101,16 @@ -(void) testInnerXml { RXMLElement *rxml = [RXMLElement elementFromXMLString:treeXML_ encoding:NSUTF8StringEncoding]; RXMLElement* shapes = [rxml child:@"shapes"]; - STAssertEqualObjects(shapes.xml, @"Circle", nil); - STAssertEqualObjects(shapes.innerXml, @"Circle", nil); + XCTAssertEqualObjects(shapes.xml, @"Circle"); + XCTAssertEqualObjects(shapes.innerXml, @"Circle"); RXMLElement* colors = [rxml child:@"colors"]; - STAssertEqualObjects(colors.xml, @"TESTBlackdefault color", nil); - STAssertEqualObjects(colors.innerXml, @"TESTBlackdefault color", nil); + XCTAssertEqualObjects(colors.xml, @"TESTBlackdefault color"); + XCTAssertEqualObjects(colors.innerXml, @"TESTBlackdefault color"); RXMLElement *cdata = [RXMLElement elementFromXMLString:cdataXML_ encoding:NSUTF8StringEncoding]; - STAssertEqualObjects(cdata.xml, @"", nil); - STAssertEqualObjects(cdata.innerXml, @"", nil); + XCTAssertEqualObjects(cdata.xml, @""); + XCTAssertEqualObjects(cdata.innerXml, @""); } @end diff --git a/Tests/Tests-Prefix.pch b/Tests/Tests-Prefix.pch deleted file mode 100644 index 75038aa..0000000 --- a/Tests/Tests-Prefix.pch +++ /dev/null @@ -1,5 +0,0 @@ -#ifdef __OBJC__ - #import - #import - #import -#endif diff --git a/Tests/TextConversionTests.m b/Tests/TextConversionTests.m index 9c98ef3..86b4875 100644 --- a/Tests/TextConversionTests.m +++ b/Tests/TextConversionTests.m @@ -6,9 +6,10 @@ // Copyright (c) 2011 Rapture In Venice. All rights reserved. // +#import #import "RXMLElement.h" -@interface TextConversionTests : SenTestCase { +@interface TextConversionTests : XCTestCase { NSString *simplifiedXML_; NSString *attributedXML_; } @@ -49,9 +50,9 @@ - (void)testIntTags { [rxml iterate:@"*" usingBlock:^(RXMLElement *e) { if (i == 0) { - STAssertEquals([e child:@"id"].textAsInt, 1, nil); + XCTAssertEqual([e child:@"id"].textAsInt, 1); } else if (i == 1) { - STAssertEqualsWithAccuracy([e child:@"id"].textAsDouble, 2.5, 0.01, nil); + XCTAssertEqualWithAccuracy([e child:@"id"].textAsDouble, 2.5, 0.01); } i++; @@ -64,11 +65,11 @@ - (void)testIntAttributes { [rxml iterate:@"*" usingBlock:^(RXMLElement *e) { if (i == 0) { - STAssertEquals([e attributeAsInt:@"id"], 1, nil); + XCTAssertEqual([e attributeAsInt:@"id"], 1); } else if (i == 1) { - STAssertEqualsWithAccuracy([e attributeAsDouble:@"id"], 2.5, 0.01, nil); + XCTAssertEqualWithAccuracy([e attributeAsDouble:@"id"], 2.5, 0.01); } else if (i == 2) { - STAssertEquals([e attributeAsInt:@"id"], 3, nil); + XCTAssertEqual([e attributeAsInt:@"id"], 3); } i++; diff --git a/Tests/WildcardTests.m b/Tests/WildcardTests.m index 1819c98..53b8b8a 100644 --- a/Tests/WildcardTests.m +++ b/Tests/WildcardTests.m @@ -6,19 +6,17 @@ // Copyright (c) 2011 Rapture In Venice. All rights reserved. // -#import "RXMLElement.h" +#import "RaptureTestSuite.h" -@interface WildcardTests : SenTestCase { +@interface WildcardTests : RaptureTestSuite { } @end - - @implementation WildcardTests - (void)testEndingWildcard { - RXMLElement *rxml = [RXMLElement elementFromXMLFile:@"players.xml"]; + RXMLElement *rxml = [self testXML]; __block NSInteger i; // count the players and coaches @@ -28,11 +26,11 @@ - (void)testEndingWildcard { i++; }]; - STAssertEquals(i, 10, nil); + XCTAssertEqual(i, 10); } - (void)testMidstreamWildcard { - RXMLElement *rxml = [RXMLElement elementFromXMLFile:@"players.xml"]; + RXMLElement *rxml = [self testXML]; __block NSInteger i; // count the tags that have a name @@ -42,7 +40,7 @@ - (void)testMidstreamWildcard { i++; }]; - // STAssertEquals(i, 10, nil); + // XCTAssertEqual(i, 10); // count the tags that have a position i = 0; @@ -51,7 +49,7 @@ - (void)testMidstreamWildcard { i++; }]; - // STAssertEquals(i, 9, nil); + // XCTAssertEqual(i, 9); } @end diff --git a/Tests/XPathTests.m b/Tests/XPathTests.m index 71d11d2..74977a7 100644 --- a/Tests/XPathTests.m +++ b/Tests/XPathTests.m @@ -6,9 +6,10 @@ // Copyright (c) 2012 Rapture In Venice. All rights reserved. // +#import #import "RXMLElement.h" -@interface XPathTests : SenTestCase { +@interface XPathTests : XCTestCase { NSString *simplifiedXML_; NSString *attributedXML_; NSString *interruptedTextXML_; @@ -45,11 +46,11 @@ - (void)testBasicPath { RXMLElement *rxml = [RXMLElement elementFromXMLString:simplifiedXML_ encoding:NSUTF8StringEncoding]; [rxml iterateWithRootXPath:@"//circle" usingBlock:^(RXMLElement *element) { - STAssertEqualObjects(element.text, @"Circle", nil); + XCTAssertEqualObjects(element.text, @"Circle"); i++; }]; - STAssertEquals(i, 1, nil); + XCTAssertEqual(i, 1); } - (void)testAttributePath { @@ -58,11 +59,11 @@ - (void)testAttributePath { RXMLElement *rxml = [RXMLElement elementFromXMLString:attributedXML_ encoding:NSUTF8StringEncoding]; [rxml iterateWithRootXPath:@"//circle[@name='Circle']" usingBlock:^(RXMLElement *element) { - STAssertEqualObjects([element attribute:@"name"], @"Circle", nil); + XCTAssertEqualObjects([element attribute:@"name"], @"Circle"); i++; }]; - STAssertEquals(i, 1, nil); + XCTAssertEqual(i, 1); } @end diff --git a/icon.png b/icon.png deleted file mode 100644 index 84d1855..0000000 Binary files a/icon.png and /dev/null differ