Skip to content
This repository has been archived by the owner on Feb 20, 2021. It is now read-only.

Commit

Permalink
Merge pull request #59 from tang3w/fix/use_object_id_to_get_feedback_…
Browse files Browse the repository at this point in the history
…directly

Use object id to get feedback directly
  • Loading branch information
tang3w committed May 9, 2017
2 parents 80a2ee9 + 722082b commit 08c6ef2
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 28 deletions.
14 changes: 7 additions & 7 deletions LeanCloudFeedback.xcodeproj/project.pbxproj
Expand Up @@ -210,12 +210,12 @@
isa = PBXNativeTarget;
buildConfigurationList = 5CCAE1111B09B0FE009276B9 /* Build configuration list for PBXNativeTarget "LeanCloudFeedback" */;
buildPhases = (
84898830CC4C08815C7F6A2D /* Check Pods Manifest.lock */,
84898830CC4C08815C7F6A2D /* [CP] Check Pods Manifest.lock */,
5CCAE0F61B09B0FE009276B9 /* Sources */,
5CCAE0F71B09B0FE009276B9 /* Frameworks */,
5CCAE0F81B09B0FE009276B9 /* Headers */,
5CCAE0F91B09B0FE009276B9 /* Resources */,
96A4361C0F19D5AEB1038786 /* Copy Pods Resources */,
96A4361C0F19D5AEB1038786 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -294,29 +294,29 @@
shellPath = /bin/sh;
shellScript = "# This script is based on Jacob Van Order's answer on apple dev forums\n\n# https://devforums.apple.com/message/971277\n# See also http://spin.atomicobject.com/2011/12/13/building-a-universal-framework-for-ios/ for the start\n\n\n# To get this to work with a Xcode 6 Cocoa Touch Framework, create Framework\n# Then create a new Aggregate Target. Throw this script into a Build Script Phrase on the Aggregate\n\n\n######################\n# Options\n######################\n\nREVEAL_ARCHIVE_IN_FINDER=true\n\nFRAMEWORK_NAME=\"${PROJECT_NAME}\"\n\nSIMULATOR_LIBRARY_PATH=\"${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${FRAMEWORK_NAME}.framework\"\n\nDEVICE_LIBRARY_PATH=\"${BUILD_DIR}/${CONFIGURATION}-iphoneos/${FRAMEWORK_NAME}.framework\"\n\nUNIVERSAL_LIBRARY_DIR=\"./build/${CONFIGURATION}-iphoneuniversal\"\n\nFRAMEWORK=\"${UNIVERSAL_LIBRARY_DIR}/${FRAMEWORK_NAME}.framework\"\n\n\n######################\n# Build Frameworks\n######################\n\nxcodebuild -project ${PROJECT_NAME}.xcodeproj -sdk iphonesimulator -target ${PROJECT_NAME} -configuration ${CONFIGURATION} clean build CONFIGURATION_BUILD_DIR=${BUILD_DIR}/${CONFIGURATION}-iphonesimulator | echo\n\nxcodebuild -project ${PROJECT_NAME}.xcodeproj -sdk iphoneos -target ${PROJECT_NAME} -configuration ${CONFIGURATION} clean build CONFIGURATION_BUILD_DIR=${BUILD_DIR}/${CONFIGURATION}-iphoneos | echo\n\n#xcodebuild -target ${PROJECT_NAME} ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR=\"${BUILD_DIR}\" BUILD_ROOT=\"${BUILD_ROOT}\" | echo\n\n#xcodebuild -target ${PROJECT_NAME} ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphonesimulator BUILD_DIR=\"${BUILD_DIR}\" BUILD_ROOT=\"${BUILD_ROOT}\" | echo\n\n\n######################\n# Create directory for universal\n######################\n\nrm -rf \"${UNIVERSAL_LIBRARY_DIR}\"\n\nmkdir \"${UNIVERSAL_LIBRARY_DIR}\"\n\nmkdir \"${FRAMEWORK}\"\n\n\n######################\n# Copy files Framework\n######################\n\ncp -r \"${DEVICE_LIBRARY_PATH}/.\" \"${FRAMEWORK}\"\n\n\n######################\n# Make fat universal binary\n######################\n\nlipo \"${SIMULATOR_LIBRARY_PATH}/${FRAMEWORK_NAME}\" \"${DEVICE_LIBRARY_PATH}/${FRAMEWORK_NAME}\" -create -output \"${FRAMEWORK}/${FRAMEWORK_NAME}\" | echo\n\nchmod -x \"${FRAMEWORK}/${FRAMEWORK_NAME}\"\n\nopen \"${UNIVERSAL_LIBRARY_DIR}/\"\n######################\n# On Release, copy the result to desktop folder\n######################\n\n#if [ \"${CONFIGURATION}\" == \"Release\" ]; then\n#mkdir \"${HOME}/Desktop/${FRAMEWORK_NAME}-${CONFIGURATION}-iphoneuniversal/\"\n#cp -r \"${FRAMEWORK}\" \"${HOME}/Desktop/${FRAMEWORK_NAME}-${CONFIGURATION}-iphoneuniversal/\"\n#fi\n\n\n######################\n# If needed, open the Framework folder\n######################\n\n#if [ ${REVEAL_ARCHIVE_IN_FINDER} = true ]; then\n#if [ \"${CONFIGURATION}\" == \"Release\" ]; then\n#open \"${HOME}/Desktop/${FRAMEWORK_NAME}-${CONFIGURATION}-iphoneuniversal/\"\n#else\n#open \"${UNIVERSAL_LIBRARY_DIR}/\"\n#fi\n#fi";
};
84898830CC4C08815C7F6A2D /* Check Pods Manifest.lock */ = {
84898830CC4C08815C7F6A2D /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Check Pods Manifest.lock";
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
96A4361C0F19D5AEB1038786 /* Copy Pods Resources */ = {
96A4361C0F19D5AEB1038786 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Copy Pods Resources";
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
12 changes: 6 additions & 6 deletions LeanCloudFeedback/LCUserFeedbackThread.m
Expand Up @@ -82,16 +82,16 @@ +(void)fetchFeedbackWithBlock:(LCUserFeedbackBlock)block {
block(nil, nil);
} else {
LCHttpClient *client = [LCHttpClient sharedInstance];
[client getObject:[LCUserFeedbackThread objectPath] withParameters:@{@"objectId":feedbackObjectId} block:^(id object, NSError *error) {
NSString *path = [[LCUserFeedbackThread objectPath] stringByAppendingPathComponent:feedbackObjectId];
[client getObject:path withParameters:nil block:^(id object, NSError *error) {
if (error) {
[LCUtils callIdResultBlock:block object:nil error:error];
} else {
NSArray* results = [(NSDictionary*)object objectForKey:@"results"];
if (results.count == 0) {
[LCUtils callIdResultBlock:block object:nil error:nil];
} else {
LCUserFeedbackThread *feedback = [[LCUserFeedbackThread alloc] initWithDictionary:results[0]];
if (object) {
LCUserFeedbackThread *feedback = [[LCUserFeedbackThread alloc] initWithDictionary:object];
[LCUtils callIdResultBlock:block object:feedback error:nil];
} else {
[LCUtils callIdResultBlock:block object:nil error:nil];
}
}
}];
Expand Down
Expand Up @@ -129,12 +129,12 @@
isa = PBXNativeTarget;
buildConfigurationList = 5CC505041B0F01D3004D0CB1 /* Build configuration list for PBXNativeTarget "LeanCloudFeedbackDemo" */;
buildPhases = (
4769E60FE17A8611CF49B3CF /* Check Pods Manifest.lock */,
4769E60FE17A8611CF49B3CF /* [CP] Check Pods Manifest.lock */,
5CC504DD1B0F01D3004D0CB1 /* Sources */,
5CC504DE1B0F01D3004D0CB1 /* Frameworks */,
5CC504DF1B0F01D3004D0CB1 /* Resources */,
F0D0DCD723CCC6F13FF48330 /* Embed Pods Frameworks */,
3BC15B31DE1EE218A416CB6C /* Copy Pods Resources */,
F0D0DCD723CCC6F13FF48330 /* [CP] Embed Pods Frameworks */,
3BC15B31DE1EE218A416CB6C /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -190,44 +190,44 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
3BC15B31DE1EE218A416CB6C /* Copy Pods Resources */ = {
3BC15B31DE1EE218A416CB6C /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Copy Pods Resources";
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods-LeanCloudFeedbackDemo/Pods-LeanCloudFeedbackDemo-resources.sh\"\n";
showEnvVarsInLog = 0;
};
4769E60FE17A8611CF49B3CF /* Check Pods Manifest.lock */ = {
4769E60FE17A8611CF49B3CF /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Check Pods Manifest.lock";
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
F0D0DCD723CCC6F13FF48330 /* Embed Pods Frameworks */ = {
F0D0DCD723CCC6F13FF48330 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
9 changes: 4 additions & 5 deletions Podfile
Expand Up @@ -3,18 +3,17 @@
# Uncomment this line if you're using Swift
# use_frameworks!

workspace 'LeanCloudFeedback.xcworkspace'
platform :ios, '8.0'

platform :ios, '6.0'
workspace 'LeanCloudFeedback.xcworkspace'

target 'LeanCloudFeedback' do
xcodeproj 'LeanCloudFeedback.xcodeproj'
project 'LeanCloudFeedback.xcodeproj'
pod 'AVOSCloud'
end

target 'LeanCloudFeedbackDemo' do

xcodeproj 'LeanCloudFeedbackDemo/LeanCloudFeedbackDemo.xcodeproj'
project 'LeanCloudFeedbackDemo/LeanCloudFeedbackDemo.xcodeproj'
pod 'AVOSCloud'
pod 'LeanCloudFeedback', :path => '.'
end

0 comments on commit 08c6ef2

Please sign in to comment.