chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gavincornw...@apache.org
Subject svn commit: r1575945 - in /chemistry/objectivecmis/trunk: ./ ObjectiveCMIS.xcodeproj/ ObjectiveCMIS/Bindings/ ObjectiveCMIS/Bindings/AtomPub/ ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/ ObjectiveCMIS/Client/ ObjectiveCMIS/Common/ ObjectiveCMIS/Utils/
Date Mon, 10 Mar 2014 14:07:46 GMT
Author: gavincornwell
Date: Mon Mar 10 14:07:45 2014
New Revision: 1575945

URL: http://svn.apache.org/r1575945
Log:
Bug fixes (network requests continue on background threads, CMISDateUtil was not thread safe,
title element not XML escaped), code tidy and fixed typos.
Build also now produces a debug and release static library (release build no longer contains
debug symbols).

Modified:
    chemistry/objectivecmis/trunk/ObjectiveCMIS.xcodeproj/project.pbxproj
    chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISAtomEntryWriter.m
    chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISRepositoryInfoParser.h
    chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubBaseService+Protected.h
    chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISQueryResult.h
    chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISDocument.h
    chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISDocument.m
    chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISSession.m
    chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISConstants.h
    chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISConstants.m
    chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISNetworkProvider.h
    chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISDateUtil.m
    chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISHttpRequest.m
    chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISHttpUploadRequest.h
    chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISLog.h
    chemistry/objectivecmis/trunk/release.sh

Modified: chemistry/objectivecmis/trunk/ObjectiveCMIS.xcodeproj/project.pbxproj
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS.xcodeproj/project.pbxproj?rev=1575945&r1=1575944&r2=1575945&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS.xcodeproj/project.pbxproj (original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS.xcodeproj/project.pbxproj Mon Mar 10 14:07:45
2014
@@ -947,7 +947,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "# [JORAM] Added check for variable: when running a regular build in XCode,
this causes not to trigger the universal lib building.\n\necho \"BUILD_UNIVERSAL_LIB =  $BUILD_UNIVERSAL_LIB\"\nif
[ -z $BUILD_UNIVERSAL_LIB ]\nthen\necho \"Not building universal lib\"\nexit 0\nelse\necho
\"Building universal lib\"\nfi\n\n# --------------------------------------------------------------------------------------------------------------------------------------------------------\n#\n#
Following code is integral from http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4\n#\n#
Version 2.0 (updated for Xcode 4, with some fixes)\n# Changes:\n#    - Works with xcode 4,
even when running xcode 3 projects (Workarounds for apple bugs)\n#    - Faster / better: only
runs lipo once, instead of once per recursion\n#    - Added some debugging statemetns that
can be switched on/off by changing the DEBUG_THIS_SCRIPT variable to \"true\"\n#  
   - Fixed some typos\n# \n# Purpose:\n#   Create a static library for iPhone from within
XCode\n#   Because Apple staff DELIBERATELY broke Xcode to make this impossible from the GUI
(Xcode 3.2.3 specifically states this in the Release notes!)\n#   ...no, I don't understand
why they did this!\n#\n# Author: Adam Martin - http://twitter.com/redglassesapps\n# Based
on: original script from Eonil (main changes: Eonil's script WILL NOT WORK in Xcode GUI -
it WILL CRASH YOUR COMPUTER)\n#\n# More info: see this Stack Overflow question: http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4\n\n#################[
Tests: helps workaround any future bugs in Xcode ]########\n#\nDEBUG_THIS_SCRIPT=\"true\"\n\nif
[ $DEBUG_THIS_SCRIPT = \"true\" ]\nthen\necho \"########### TESTS #############\"\necho \"Use
the following variables when debugging this script; note that they may change on recursions\"\necho
\"BUILD_DIR = $BUILD_DIR\"\necho \"BUILD_ROO
 T = $BUILD_ROOT\"\necho \"CONFIGURATION_BUILD_DIR = $CONFIGURATION_BUILD_DIR\"\necho \"BUILT_PRODUCTS_DIR
= $BUILT_PRODUCTS_DIR\"\necho \"CONFIGURATION_TEMP_DIR = $CONFIGURATION_TEMP_DIR\"\necho \"TARGET_BUILD_DIR
= $TARGET_BUILD_DIR\"\nfi\n\n#####################[ part 1 ]##################\n# First, work
out the BASESDK version number (NB: Apple ought to report this, but they hide it)\n#    (incidental:
searching for substrings in sh is a nightmare! Sob)\n\nSDK_VERSION=$(echo ${SDK_NAME} | grep
-o '.\\{3\\}$')\n\n# Next, work out if we're in SIM or DEVICE\n\nif [ ${PLATFORM_NAME} = \"iphonesimulator\"
]\nthen\nOTHER_SDK_TO_BUILD=iphoneos${SDK_VERSION}\nelse\nOTHER_SDK_TO_BUILD=iphonesimulator${SDK_VERSION}\nfi\n\necho
\"XCode has selected SDK: ${PLATFORM_NAME} with version: ${SDK_VERSION} (although back-targetting:
${IPHONEOS_DEPLOYMENT_TARGET})\"\necho \"...therefore, OTHER_SDK_TO_BUILD = ${OTHER_SDK_TO_BUILD}\"\n#\n#####################[
end of part 1 ]##################\n\n####
 #################[ part 2 ]##################\n#\n# IF this is the original invocation, invoke
WHATEVER other builds are required\n#\n# Xcode is already building ONE target...\n#\n# ...but
this is a LIBRARY, so Apple is wrong to set it to build just one.\n# ...we need to build ALL
targets\n# ...we MUST NOT re-build the target that is ALREADY being built: Xcode WILL CRASH
YOUR COMPUTER if you try this (infinite recursion!)\n#\n#\n# So: build ONLY the missing platforms/configurations.\n\nif
[ \"true\" == ${ALREADYINVOKED:-false} ]\nthen\necho \"RECURSION: I am NOT the root invocation,
so I'm NOT going to recurse\"\nelse\n# CRITICAL:\n# Prevent infinite recursion (Xcode sucks)\nexport
ALREADYINVOKED=\"true\"\n\necho \"RECURSION: I am the root ... recursing all missing build
targets NOW...\"\necho \"RECURSION: ...about to invoke: xcodebuild -configuration \\\"${CONFIGURATION}\\\"
-target \\\"${TARGET_NAME}\\\" -sdk \\\"${OTHER_SDK_TO_BUILD}\\\" ${ACTION} RUN_CLANG_STATIC_ANALYZER=NO\"\n
 xcodebuild -configuration \"${CONFIGURATION}\" -target \"${TARGET_NAME}\" -sdk \"${OTHER_SDK_TO_BUILD}\"
${ACTION} RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR=\"${BUILD_DIR}\" BUILD_ROOT=\"${BUILD_ROOT}\"\n\nACTION=\"build\"\n\n#Merge
all platform binaries as a fat binary for each configurations.\n\n# Calculate where the (multiple)
built files are coming from:\nCURRENTCONFIG_DEVICE_DIR=${SYMROOT}/${CONFIGURATION}-iphoneos\nCURRENTCONFIG_SIMULATOR_DIR=${SYMROOT}/${CONFIGURATION}-iphonesimulator\n\necho
\"Taking device build from: ${CURRENTCONFIG_DEVICE_DIR}\"\necho \"Taking simulator build from:
${CURRENTCONFIG_SIMULATOR_DIR}\"\n\nCREATING_UNIVERSAL_DIR=${SYMROOT}/${CONFIGURATION}-universal\necho
\"\"\necho \"...I will output a universal build to: ${CREATING_UNIVERSAL_DIR}\"\necho \"\"\n\n#
... remove the products of previous runs of this script\n#      NB: this directory is ONLY
created by this script - it should be safe to delete!\n\nrm -rf \"${CREATING_UNIVERSAL_DIR}\"\nmkdir
\"${CREAT
 ING_UNIVERSAL_DIR}\"\n\n#\necho \"lipo: for current configuration (${CONFIGURATION}) creating
output file: ${CREATING_UNIVERSAL_DIR}/${EXECUTABLE_NAME}\"\nlipo -create -output \"${CREATING_UNIVERSAL_DIR}/${EXECUTABLE_NAME}\"
\"${CURRENTCONFIG_DEVICE_DIR}/${EXECUTABLE_NAME}\" \"${CURRENTCONFIG_SIMULATOR_DIR}/${EXECUTABLE_NAME}\"\n\n#########\n#\n#
Added: StackOverflow suggestion to also copy \"include\" files\n#    (untested, but should
work OK)\n#\nif [ -d \"${CURRENTCONFIG_DEVICE_DIR}/ObjectiveCMIS\" ]\nthen\nmkdir -p \"${CREATING_UNIVERSAL_DIR}/ObjectiveCMIS\"\n#mkdir
-p \"${CREATING_UNIVERSAL_DIR}/usr/local/include\"\n# * needs to be outside the double quotes?\ncp
\"${CURRENTCONFIG_DEVICE_DIR}/ObjectiveCMIS/\"* \"${CREATING_UNIVERSAL_DIR}/ObjectiveCMIS\"\nfi\nfi\n\n";
+			shellScript = "# [JORAM] Added check for variable: when running a regular build in XCode,
this causes not to trigger the universal lib building.\n\necho \"BUILD_UNIVERSAL_LIB =  $BUILD_UNIVERSAL_LIB\"\nif
[ -z $BUILD_UNIVERSAL_LIB ]\nthen\necho \"Not building universal lib\"\nexit 0\nelse\necho
\"Building universal lib\"\nfi\n\n# --------------------------------------------------------------------------------------------------------------------------------------------------------\n#\n#
Following code is integral from http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4\n#\n#
Version 2.0 (updated for Xcode 4, with some fixes)\n# Changes:\n#    - Works with xcode 4,
even when running xcode 3 projects (Workarounds for apple bugs)\n#    - Faster / better: only
runs lipo once, instead of once per recursion\n#    - Added some debugging statemetns that
can be switched on/off by changing the DEBUG_THIS_SCRIPT variable to \"true\"\n#  
   - Fixed some typos\n# \n# Purpose:\n#   Create a static library for iPhone from within
XCode\n#   Because Apple staff DELIBERATELY broke Xcode to make this impossible from the GUI
(Xcode 3.2.3 specifically states this in the Release notes!)\n#   ...no, I don't understand
why they did this!\n#\n# Author: Adam Martin - http://twitter.com/redglassesapps\n# Based
on: original script from Eonil (main changes: Eonil's script WILL NOT WORK in Xcode GUI -
it WILL CRASH YOUR COMPUTER)\n#\n# More info: see this Stack Overflow question: http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4\n\n#################[
Tests: helps workaround any future bugs in Xcode ]########\n#\nDEBUG_THIS_SCRIPT=\"true\"\n\nif
[ $DEBUG_THIS_SCRIPT = \"true\" ]\nthen\necho \"########### TESTS #############\"\necho \"Use
the following variables when debugging this script; note that they may change on recursions\"\necho
\"BUILD_DIR = $BUILD_DIR\"\necho \"BUILD_ROO
 T = $BUILD_ROOT\"\necho \"CONFIGURATION_BUILD_DIR = $CONFIGURATION_BUILD_DIR\"\necho \"BUILT_PRODUCTS_DIR
= $BUILT_PRODUCTS_DIR\"\necho \"CONFIGURATION_TEMP_DIR = $CONFIGURATION_TEMP_DIR\"\necho \"TARGET_BUILD_DIR
= $TARGET_BUILD_DIR\"\nfi\n\n#####################[ part 1 ]##################\n# First, work
out the BASESDK version number (NB: Apple ought to report this, but they hide it)\n#    (incidental:
searching for substrings in sh is a nightmare! Sob)\n\nSDK_VERSION=$(echo ${SDK_NAME} | grep
-o '.\\{3\\}$')\n\n# Next, work out if we're in SIM or DEVICE\n\nif [ ${PLATFORM_NAME} = \"iphonesimulator\"
]\nthen\nOTHER_SDK_TO_BUILD=iphoneos${SDK_VERSION}\nelse\nOTHER_SDK_TO_BUILD=iphonesimulator${SDK_VERSION}\nfi\n\necho
\"XCode has selected SDK: ${PLATFORM_NAME} with version: ${SDK_VERSION} (although back-targetting:
${IPHONEOS_DEPLOYMENT_TARGET})\"\necho \"...therefore, OTHER_SDK_TO_BUILD = ${OTHER_SDK_TO_BUILD}\"\n#\n#####################[
end of part 1 ]##################\n\n####
 #################[ part 2 ]##################\n#\n# IF this is the original invocation, invoke
WHATEVER other builds are required\n#\n# Xcode is already building ONE target...\n#\n# ...but
this is a LIBRARY, so Apple is wrong to set it to build just one.\n# ...we need to build ALL
targets\n# ...we MUST NOT re-build the target that is ALREADY being built: Xcode WILL CRASH
YOUR COMPUTER if you try this (infinite recursion!)\n#\n#\n# So: build ONLY the missing platforms/configurations.\n\nif
[ \"true\" == ${ALREADYINVOKED:-false} ]\nthen\necho \"RECURSION: I am NOT the root invocation,
so I'm NOT going to recurse\"\nelse\n# CRITICAL:\n# Prevent infinite recursion (Xcode sucks)\nexport
ALREADYINVOKED=\"true\"\n\necho \"RECURSION: I am the root ... recursing all missing build
targets NOW...\"\necho \"RECURSION: ...about to invoke: xcodebuild -configuration \\\"${CONFIGURATION}\\\"
-target \\\"${TARGET_NAME}\\\" -sdk \\\"${OTHER_SDK_TO_BUILD}\\\" clean ${ACTION} RUN_CLANG_STATIC_ANALYZER=
 NO\"\nxcodebuild -configuration \"${CONFIGURATION}\" -target \"${TARGET_NAME}\" -sdk \"${OTHER_SDK_TO_BUILD}\"
clean ${ACTION} RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR=\"${BUILD_DIR}\" BUILD_ROOT=\"${BUILD_ROOT}\"\n\nACTION=\"build\"\n\n#Merge
all platform binaries as a fat binary for each configurations.\n\n# Calculate where the (multiple)
built files are coming from:\nCURRENTCONFIG_DEVICE_DIR=${SYMROOT}/${CONFIGURATION}-iphoneos\nCURRENTCONFIG_SIMULATOR_DIR=${SYMROOT}/${CONFIGURATION}-iphonesimulator\n\necho
\"Taking device build from: ${CURRENTCONFIG_DEVICE_DIR}\"\necho \"Taking simulator build from:
${CURRENTCONFIG_SIMULATOR_DIR}\"\n\nCREATING_UNIVERSAL_DIR=${SYMROOT}/${CONFIGURATION}-universal\necho
\"\"\necho \"...I will output a universal build to: ${CREATING_UNIVERSAL_DIR}\"\necho \"\"\n\n#
... remove the products of previous runs of this script\n#      NB: this directory is ONLY
created by this script - it should be safe to delete!\n\nrm -rf \"${CREATING_UNIVERSAL_DIR}\"\nmkd
 ir \"${CREATING_UNIVERSAL_DIR}\"\n\n# [MIKEH] Rename universal library depending on build
configuration type\nif [ ${CONFIGURATION} = \"Debug\" ]\nthen\nUNIVERSAL_FILE=${EXECUTABLE_NAME%.a}-debug.a\nelse\nUNIVERSAL_FILE=${EXECUTABLE_NAME}\nfi\n\n#\necho
\"lipo: for current configuration (${CONFIGURATION}) creating output file: ${CREATING_UNIVERSAL_DIR}/${UNIVERSAL_FILE}\"\nlipo
-create -output \"${CREATING_UNIVERSAL_DIR}/${UNIVERSAL_FILE}\" \"${CURRENTCONFIG_DEVICE_DIR}/${EXECUTABLE_NAME}\"
\"${CURRENTCONFIG_SIMULATOR_DIR}/${EXECUTABLE_NAME}\"\n\n#########\n#\n# Added: StackOverflow
suggestion to also copy \"include\" files\n#    (untested, but should work OK)\n#\nif [ -d
\"${CURRENTCONFIG_DEVICE_DIR}/ObjectiveCMIS\" ]\nthen\nmkdir -p \"${CREATING_UNIVERSAL_DIR}/ObjectiveCMIS\"\n#mkdir
-p \"${CREATING_UNIVERSAL_DIR}/usr/local/include\"\n# * needs to be outside the double quotes?\ncp
\"${CURRENTCONFIG_DEVICE_DIR}/ObjectiveCMIS/\"* \"${CREATING_UNIVERSAL_DIR}/ObjectiveCMIS\"\nfi\nfi\n
 \n";
 			showEnvVarsInLog = 0;
 		};
 /* End PBXShellScriptBuildPhase section */
@@ -1135,6 +1135,7 @@
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
 				COPY_PHASE_STRIP = YES;
 				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
 				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;

Modified: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISAtomEntryWriter.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISAtomEntryWriter.m?rev=1575945&r1=1575944&r2=1575945&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISAtomEntryWriter.m
(original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISAtomEntryWriter.m
Mon Mar 10 14:07:45 2014
@@ -78,7 +78,7 @@
     // Determine format of title element depending on nil status of namePropertyValue
     if (nil != namePropertyValue)
     {
-        startElement = [startElement stringByAppendingFormat:@"<title>%@</title>",
namePropertyValue];
+        startElement = [startElement stringByAppendingFormat:@"<title>%@</title>",
[namePropertyValue stringByAddingXMLEntities]];
     }
     else
     {

Modified: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISRepositoryInfoParser.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISRepositoryInfoParser.h?rev=1575945&r1=1575944&r2=1575945&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISRepositoryInfoParser.h
(original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISRepositoryInfoParser.h
Mon Mar 10 14:07:45 2014
@@ -26,7 +26,7 @@
 @protocol CMISRepositoryInfoParserDelegate <NSObject>
 @required
 /// parses repository info delegate method
-- (void)repositoryInfoParser:(CMISRepositoryInfoParser *)epositoryInfoParser didFinishParsingRepositoryInfo:(CMISRepositoryInfo
*)repositoryInfo;
+- (void)repositoryInfoParser:(CMISRepositoryInfoParser *)repositoryInfoParser didFinishParsingRepositoryInfo:(CMISRepositoryInfo
*)repositoryInfo;
 @end
 
 

Modified: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubBaseService+Protected.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubBaseService%2BProtected.h?rev=1575945&r1=1575944&r2=1575945&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubBaseService+Protected.h
(original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubBaseService+Protected.h
Mon Mar 10 14:07:45 2014
@@ -26,7 +26,7 @@
 @interface CMISAtomPubBaseService (Protected)
 
 /** retrieve object from cache
- * completionBlock returns the object (as id) or nil if unsuccessul
+ * completionBlock returns the object (as id) or nil if unsuccessful
  */
 - (void)retrieveFromCache:(NSString *)cacheKey
               cmisRequest:(CMISRequest *)cmisRequest
@@ -51,7 +51,7 @@
                completionBlock:(void (^)(CMISObjectData *objectData, NSError *error))completionBlock;
 
 /** Full-blown object retrieval version 
- * completionBlock returns CMISObjectData instance or nil if unsuccessul
+ * completionBlock returns CMISObjectData instance or nil if unsuccessful
  */
 - (void)retrieveObjectInternal:(NSString *)objectId
                  returnVersion:(CMISReturnVersion)cmisReturnVersion
@@ -65,7 +65,7 @@
                completionBlock:(void (^)(CMISObjectData *objectData, NSError *error))completionBlock;
 
 /** retrieve object for a given path name
- * completionBlock returns CMISObjectData instance or nil if unsuccessul
+ * completionBlock returns CMISObjectData instance or nil if unsuccessful
  */
 - (void)retrieveObjectByPathInternal:(NSString *)path
                               filter:(NSString *)filter

Modified: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISQueryResult.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISQueryResult.h?rev=1575945&r1=1575944&r2=1575945&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISQueryResult.h (original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISQueryResult.h Mon Mar 10 14:07:45
2014
@@ -38,7 +38,7 @@
 - (id)initWithCmisObjectData:(CMISObjectData *)cmisObjectData session:(CMISSession *)session;
 
 /**
- * Convience method for the initializer.
+ * Convenience method for the initializer.
  */
 + (CMISQueryResult *)queryResultUsingCmisObjectData:(CMISObjectData *)cmisObjectData session:(CMISSession
*)session;
 

Modified: chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISDocument.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISDocument.h?rev=1575945&r1=1575944&r2=1575945&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISDocument.h (original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISDocument.h Mon Mar 10 14:07:45
2014
@@ -48,13 +48,13 @@
 - (CMISRequest*)retrieveAllVersionsWithOperationContext:(CMISOperationContext *)operationContext
completionBlock:(void (^)(CMISCollection *collection, NSError *error))completionBlock;
 
 /**
- * Retrieves the lastest version of this document.
+ * Retrieves the latest version of this document.
  * The completionBlock returns the CMIS document or nil if unsuccessful
  */
 - (CMISRequest*)retrieveObjectOfLatestVersionWithMajorVersion:(BOOL)major completionBlock:(void
(^)(CMISDocument *document, NSError *error))completionBlock;
 
 /**
- * Retrieves the lastest version of this document with paging options.
+ * Retrieves the latest version of this document with paging options.
  * The completionBlock returns the CMIS document or nil if unsuccessful
  */
 - (CMISRequest*)retrieveObjectOfLatestVersionWithMajorVersion:(BOOL)major

Modified: chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISDocument.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISDocument.m?rev=1575945&r1=1575944&r2=1575945&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISDocument.m (original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISDocument.m Mon Mar 10 14:07:45
2014
@@ -49,7 +49,7 @@
 {
     self = [super initWithObjectData:objectData session:session];
     if (self){
-        self.contentStreamId = [[objectData.properties.propertiesDictionary objectForKey:kCMISProperyContentStreamId]
firstValue];
+        self.contentStreamId = [[objectData.properties.propertiesDictionary objectForKey:kCMISPropertyContentStreamId]
firstValue];
         self.contentStreamMediaType = [[objectData.properties.propertiesDictionary objectForKey:kCMISPropertyContentStreamMediaType]
firstValue];
         self.contentStreamLength = [[[objectData.properties.propertiesDictionary objectForKey:kCMISPropertyContentStreamLength]
firstValue] unsignedLongLongValue];
         self.contentStreamFileName = [[objectData.properties.propertiesDictionary objectForKey:kCMISPropertyContentStreamFileName]
firstValue];

Modified: chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISSession.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISSession.m?rev=1575945&r1=1575944&r2=1575945&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISSession.m (original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISSession.m Mon Mar 10 14:07:45 2014
@@ -252,7 +252,6 @@
                                                                 }];
                                          } else {
                                              if (error == nil) {
-                                                 NSError *error = [[NSError alloc] init];
                                                  error = [CMISErrors cmisError:error cmisErrorCode:kCMISErrorCodeObjectNotFound];

                                              }
                                              completionBlock(nil, error);

Modified: chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISConstants.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISConstants.h?rev=1575945&r1=1575944&r2=1575945&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISConstants.h (original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISConstants.h Mon Mar 10 14:07:45
2014
@@ -27,7 +27,7 @@ extern NSString * const kCMISPropertyCre
 extern NSString * const kCMISPropertyCreationDate;
 extern NSString * const kCMISPropertyModifiedBy;
 extern NSString * const kCMISPropertyModificationDate;
-extern NSString * const kCMISProperyContentStreamId;
+extern NSString * const kCMISPropertyContentStreamId;
 extern NSString * const kCMISPropertyContentStreamFileName;
 extern NSString * const kCMISPropertyContentStreamLength;
 extern NSString * const kCMISPropertyContentStreamMediaType;

Modified: chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISConstants.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISConstants.m?rev=1575945&r1=1575944&r2=1575945&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISConstants.m (original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISConstants.m Mon Mar 10 14:07:45
2014
@@ -28,7 +28,7 @@ NSString * const kCMISPropertyCreatedBy 
 NSString * const kCMISPropertyCreationDate = @"cmis:creationDate";
 NSString * const kCMISPropertyModifiedBy = @"cmis:lastModifiedBy";
 NSString * const kCMISPropertyModificationDate = @"cmis:lastModificationDate";
-NSString * const kCMISProperyContentStreamId = @"cmis:contentStreamId";
+NSString * const kCMISPropertyContentStreamId = @"cmis:contentStreamId";
 NSString * const kCMISPropertyContentStreamFileName = @"cmis:contentStreamFileName";
 NSString * const kCMISPropertyContentStreamLength = @"cmis:contentStreamLength";
 NSString * const kCMISPropertyContentStreamMediaType = @"cmis:contentStreamMimeType";

Modified: chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISNetworkProvider.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISNetworkProvider.h?rev=1575945&r1=1575944&r2=1575945&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISNetworkProvider.h (original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISNetworkProvider.h Mon Mar 10 14:07:45
2014
@@ -102,7 +102,7 @@ completionBlock:(void (^)(CMISHttpRespon
  * @param inputStream the stream pointing to the source to be uploaded. Must be an instance
or extension of NSInputStream
  * @param headers any additional headers to be used in the request (maybe nil)
  * @param bytesExpected the size of the content to be uploaded
- * @param cmisRequest will be used to set the cancellable request to the one created by the
invode method
+ * @param cmisRequest will be used to set the cancellable request to the one created by the
invoked method
  * @param cmisProperties 
  * @param mimeType
  * @param completionBlock returns an instance of the HTTPResponse if successful or nil otherwise

Modified: chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISDateUtil.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISDateUtil.m?rev=1575945&r1=1575944&r2=1575945&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISDateUtil.m (original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISDateUtil.m Mon Mar 10 14:07:45 2014
@@ -23,29 +23,47 @@
 #import "CMISDateUtil.h"
 #import "CMISLog.h"
 
+static const NSString *kDateFormatterKey = @"CMISDateFormatter";
+static const NSString *kCalendarKey = @"CMISCalendar";
+
 @implementation CMISDateUtil
 
 + (NSDateFormatter *)CMISDateFormatter
 {
-    static dispatch_once_t predicate = 0;
-      __strong static NSDateFormatter *dateFormatter = nil;
-      dispatch_once(&predicate, ^ {
-          dateFormatter = [[NSDateFormatter alloc] init];
-          dateFormatter.locale = [NSLocale systemLocale];
-          dateFormatter.calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
// ISO8601 calendar not available
-          NSTimeZone *timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0];
-          dateFormatter.calendar.timeZone = timeZone;
-          dateFormatter.timeZone = timeZone;
-          dateFormatter.dateFormat = @"yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'";
-      });
-      return dateFormatter;
+    NSMutableDictionary *threadDictionary = [[NSThread currentThread] threadDictionary];
+    NSDateFormatter *dateFormatter = [threadDictionary objectForKey:kDateFormatterKey];
+    if (dateFormatter == nil) {
+        dateFormatter = [[NSDateFormatter alloc] init];
+        dateFormatter.locale = [NSLocale systemLocale];
+        dateFormatter.calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
// ISO8601 calendar not available
+        NSTimeZone *timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0];
+        dateFormatter.calendar.timeZone = timeZone;
+        dateFormatter.timeZone = timeZone;
+        dateFormatter.dateFormat = @"yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'";
+
+        [threadDictionary setObject:dateFormatter forKey:kDateFormatterKey];
+    }
+    return dateFormatter;
+}
+
++ (NSCalendar *)CMISCalendar
+{
+    NSMutableDictionary *threadDictionary = [[NSThread currentThread] threadDictionary];
+    NSCalendar *calendar = [threadDictionary objectForKey:kCalendarKey];
+    if (calendar == nil) {
+        calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; //
ISO8601 calendar not available
+        calendar.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0]; // default for formats
without time
+        
+        [threadDictionary setObject:calendar forKey:kCalendarKey];
+    }
+    
+    return calendar;
 }
 
 
-+ (NSString*)stringFromDate:(NSDate*)date
++ (NSString *)stringFromDate:(NSDate *)date
 {
-    NSString *string = [[CMISDateUtil CMISDateFormatter] stringFromDate:date];
-    return string;
+    return [[CMISDateUtil CMISDateFormatter] stringFromDate:date];
 }
 
 
@@ -141,7 +159,7 @@
                     if (![scanner scanString:@":" intoString:nil]) {
                         tzMinute = 0;
                     }
-                    else{
+                    else {
                         if (![scanner scanInteger:&tzMinute]) {
                             CMISLogDebug(@"No timezone minute found in time string '%@'",
string);
                             return nil;
@@ -161,14 +179,7 @@
         return nil;
     }
     
-    static NSCalendar *gregorianCalendar = nil;
-    if (gregorianCalendar == nil) {
-        gregorianCalendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
// ISO8601 calendar not available
-        gregorianCalendar.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0]; // default
for formats without time
-    }
-
-    NSDate *date = [gregorianCalendar dateFromComponents:components];
-    return date;
+    return [[CMISDateUtil CMISCalendar] dateFromComponents:components];
 }
 
 

Modified: chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISHttpRequest.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISHttpRequest.m?rev=1575945&r1=1575944&r2=1575945&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISHttpRequest.m (original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISHttpRequest.m Mon Mar 10 14:07:45
2014
@@ -93,8 +93,10 @@ NSString * const kCMISExceptionVersionin
         [urlRequest addValue:header forHTTPHeaderField:headerName];
     }];
     
-    self.connection = [NSURLConnection connectionWithRequest:urlRequest delegate:self];
+    self.connection = [[NSURLConnection alloc] initWithRequest:urlRequest delegate:self startImmediately:NO];
     if (self.connection) {
+        [self.connection scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes];
+        [self.connection start];
         return YES;
     } else {
         if (self.completionBlock) {
@@ -168,7 +170,6 @@ NSString * const kCMISExceptionVersionin
     }
     
     self.completionBlock = nil;
-    
     self.connection = nil;
 }
 
@@ -188,7 +189,6 @@ NSString * const kCMISExceptionVersionin
     }
     
     self.completionBlock = nil;
-    
     self.connection = nil;
 }
 
@@ -274,9 +274,8 @@ NSString * const kCMISExceptionVersionin
             }
         }
         return NO;
-    } else {
-        return YES;
     }
+    return YES;
 }
 
 @end

Modified: chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISHttpUploadRequest.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISHttpUploadRequest.h?rev=1575945&r1=1575944&r2=1575945&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISHttpUploadRequest.h (original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISHttpUploadRequest.h Mon Mar 10 14:07:45
2014
@@ -25,14 +25,14 @@
 @property (nonatomic, readonly) unsigned long long bytesUploaded;
 
 /**
- * starts a URL request with a provided input stream. The input stream provided will be used
directly to send the data upstrean.
+ * starts a URL request with a provided input stream. The input stream provided will be used
directly to send the data upstream.
  * For this the class sets the HTTPBodyStream property (method) to this input stream. No
base64 encoding will be done using this method.
  * completionBlock returns CMISHttpResponse instance or nil if unsuccessful
  */
 + (id)startRequest:(NSMutableURLRequest *)urlRequest
                             httpMethod:(CMISHttpRequestMethod)httpRequestMethod
                            inputStream:(NSInputStream*)inputStream
-                               headers:(NSDictionary*)addionalHeaders
+                               headers:(NSDictionary*)additionalHeaders
                          bytesExpected:(unsigned long long)bytesExpected
                 authenticationProvider:(id<CMISAuthenticationProvider>) authenticationProvider
                        completionBlock:(void (^)(CMISHttpResponse *httpResponse, NSError
*error))completionBlock
@@ -48,7 +48,7 @@
 + (id)startRequest:(NSMutableURLRequest *)urlRequest
         httpMethod:(CMISHttpRequestMethod)httpRequestMethod
        inputStream:(NSInputStream*)sourceInputStream
-           headers:(NSDictionary*)addionalHeaders
+           headers:(NSDictionary*)additionalHeaders
      bytesExpected:(unsigned long long)bytesExpected
 authenticationProvider:(id<CMISAuthenticationProvider>) authenticationProvider
     cmisProperties:(CMISProperties *)cmisProperties

Modified: chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISLog.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISLog.h?rev=1575945&r1=1575944&r2=1575945&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISLog.h (original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISLog.h Mon Mar 10 14:07:45 2014
@@ -16,7 +16,7 @@
  * Default logging level
  *
  * The default logging level is Info for release builds and Debug for debug builds.
- * This can easily be overriden in your app's .pch file, e.g.
+ * This can easily be overridden in your app's .pch file, e.g.
  *     #define CMIS_LOG_LEVEL CMISLogLevelTrace
  */
 #if !defined(CMISLogError)

Modified: chemistry/objectivecmis/trunk/release.sh
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/release.sh?rev=1575945&r1=1575944&r2=1575945&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/release.sh (original)
+++ chemistry/objectivecmis/trunk/release.sh Mon Mar 10 14:07:45 2014
@@ -81,9 +81,10 @@ echo "Building static library..."
 BUILD_UNIVERSAL_LIB='TRUE'
 export BUILD_UNIVERSAL_LIB
 xcodebuild -project ObjectiveCMIS.xcodeproj -target ObjectiveCMIS -configuration Debug clean
build
+xcodebuild -project ObjectiveCMIS.xcodeproj -target ObjectiveCMIS -configuration Release
clean build
 
 cp -R build/Debug-universal/* release-pack/bin
-
+cp build/Release-universal/*.a release-pack/bin
 
 echo "Creating package..."
 



Mime
View raw message