Skip to content
This repository
Browse code

* Moved FTJSON stuff out to another project

 * Some refactoring of FTAnimation
  * Added FTAnimation.h meta-header
  * Moved UIView category out to FTAnimation+UIView.h/.m to make it optional
  • Loading branch information...
commit 882c1edd3b46b61768db148dc6da29317b427e89 1 parent 35c0e62
Nathan Eror authored

Showing 138 changed files with 387 additions and 10,148 deletions. Show diff stats Hide diff stats

  1. +189 0 Classes/FTAnimation+UIView.m
  2. +6 165 Classes/FTAnimationManager.m
  3. +0 308 Classes/FTJSONParser.m
  4. +0 249 Classes/FTJSONWriter.m
  5. +24 0 Classes/FTUtils+NSObject.m
  6. +17 102 FTUtils.xcodeproj/project.pbxproj
  7. +28 0 Headers/FTAnimation.h
  8. +67 0 Headers/FTUtils/FTAnimation+UIView.h
  9. +1 44 Headers/FTUtils/FTAnimationManager.h
  10. +0 75 Headers/FTUtils/FTJSONParser.h
  11. +0 76 Headers/FTUtils/FTJSONWriter.h
  12. +24 0 Headers/FTUtils/FTUtils+NSObject.h
  13. +24 0 Headers/FTUtils/FTUtils.h
  14. +5 54 README.mdown
  15. +0 19 Support/yajl/BUILDING
  16. +0 13 Support/yajl/BUILDING.win32
  17. +0 82 Support/yajl/CMakeLists.txt
  18. +0 29 Support/yajl/COPYING
  19. +0 80 Support/yajl/ChangeLog
  20. +0 25 Support/yajl/Makefile
  21. +0 68 Support/yajl/README
  22. +0 9 Support/yajl/TODO
  23. +0 26 Support/yajl/YAJLDoc.cmake
  24. +0 94 Support/yajl/configure
  25. +0 55 Support/yajl/reformatter/CMakeLists.txt
  26. +0 202 Support/yajl/reformatter/json_reformat.c
  27. +0 563 Support/yajl/rfc4627.txt
  28. +0 78 Support/yajl/src/CMakeLists.txt
  29. +0 1,258 Support/yajl/src/YAJL.dxy
  30. +0 85 Support/yajl/src/api/yajl_common.h
  31. +0 123 Support/yajl/src/api/yajl_gen.h
  32. +0 179 Support/yajl/src/api/yajl_parse.h
  33. +0 196 Support/yajl/src/yajl
  34. +0 152 Support/yajl/src/yajl.c
  35. +0 65 Support/yajl/src/yajl_alloc.c
  36. +0 50 Support/yajl/src/yajl_alloc.h
  37. +0 119 Support/yajl/src/yajl_buf.c
  38. +0 73 Support/yajl/src/yajl_buf.h
  39. +0 85 Support/yajl/src/yajl_bytestack.h
  40. +0 179 Support/yajl/src/yajl_encode.c
  41. +0 44 Support/yajl/src/yajl_encode.h
  42. +0 295 Support/yajl/src/yajl_gen.c
  43. +0 737 Support/yajl/src/yajl_lex.c
  44. +0 133 Support/yajl/src/yajl_lex.h
  45. +0 445 Support/yajl/src/yajl_parser.c
  46. +0 79 Support/yajl/src/yajl_parser.h
  47. +0 39 Support/yajl/test/CMakeLists.txt
  48. +0 6 Support/yajl/test/cases/array.json
  49. +0 22 Support/yajl/test/cases/array.json.gold
  50. +0 1  Support/yajl/test/cases/array_close.json
  51. +0 2  Support/yajl/test/cases/array_close.json.gold
  52. +0 1  Support/yajl/test/cases/array_open.json
  53. +0 2  Support/yajl/test/cases/array_open.json.gold
  54. +0 4 Support/yajl/test/cases/bogus_char.json
  55. +0 10 Support/yajl/test/cases/bogus_char.json.gold
  56. +0 1  Support/yajl/test/cases/codepoints_from_unicode_org.json
  57. +0 2  Support/yajl/test/cases/codepoints_from_unicode_org.json.gold
  58. +0 11 Support/yajl/test/cases/dc_simple_with_comments.json
  59. +0 5 Support/yajl/test/cases/dc_simple_with_comments.json.gold
  60. +0 1  Support/yajl/test/cases/deep_arrays.json
  61. +0 2,049 Support/yajl/test/cases/deep_arrays.json.gold
  62. +0 1  Support/yajl/test/cases/difficult_json_c_test_case.json
  63. +0 36 Support/yajl/test/cases/difficult_json_c_test_case.json.gold
  64. +0 1  Support/yajl/test/cases/difficult_json_c_test_case_with_comments.json
  65. +0 36 Support/yajl/test/cases/difficult_json_c_test_case_with_comments.json.gold
  66. +0 1  Support/yajl/test/cases/doubles.json
  67. +0 7 Support/yajl/test/cases/doubles.json.gold
  68. +0 1  Support/yajl/test/cases/empty_array.json
  69. +0 3  Support/yajl/test/cases/empty_array.json.gold
  70. +0 1  Support/yajl/test/cases/empty_string.json
  71. +0 2  Support/yajl/test/cases/empty_string.json.gold
  72. +0 4 Support/yajl/test/cases/escaped_bulgarian.json
  73. +0 7 Support/yajl/test/cases/escaped_bulgarian.json.gold
  74. +0 1  Support/yajl/test/cases/escaped_foobar.json
  75. +0 2  Support/yajl/test/cases/escaped_foobar.json.gold
  76. +0 1  Support/yajl/test/cases/false.json
  77. +0 2  Support/yajl/test/cases/false.json.gold
  78. +0 1  Support/yajl/test/cases/false_then_garbage.json
  79. +0 2  Support/yajl/test/cases/false_then_garbage.json.gold
  80. +0 2  Support/yajl/test/cases/four_byte_utf8.json
  81. +0 5 Support/yajl/test/cases/four_byte_utf8.json.gold
  82. +0 4 Support/yajl/test/cases/integers.json
  83. +0 14 Support/yajl/test/cases/integers.json.gold
  84. +0 1  Support/yajl/test/cases/invalid_utf8.json
  85. +0 3  Support/yajl/test/cases/invalid_utf8.json.gold
  86. +0 1  Support/yajl/test/cases/isolated_surrogate_marker.json
  87. +0 2  Support/yajl/test/cases/isolated_surrogate_marker.json.gold
  88. +0 1  Support/yajl/test/cases/leading_zero_in_number.json
  89. +0 5 Support/yajl/test/cases/leading_zero_in_number.json.gold
  90. +0 7 Support/yajl/test/cases/lonely_minus_sign.json
  91. +0 9 Support/yajl/test/cases/lonely_minus_sign.json.gold
  92. +0 1  Support/yajl/test/cases/lonely_number.json
  93. +0 2  Support/yajl/test/cases/lonely_number.json.gold
  94. +0 1  Support/yajl/test/cases/map_close.json
  95. +0 2  Support/yajl/test/cases/map_close.json.gold
  96. +0 1  Support/yajl/test/cases/map_open.json
  97. +0 2  Support/yajl/test/cases/map_open.json.gold
  98. +0 1  Support/yajl/test/cases/missing_integer_after_decimal_point.json
  99. +0 2  Support/yajl/test/cases/missing_integer_after_decimal_point.json.gold
  100. +0 1  Support/yajl/test/cases/missing_integer_after_exponent.json
  101. +0 2  Support/yajl/test/cases/missing_integer_after_exponent.json.gold
  102. +0 1  Support/yajl/test/cases/non_utf8_char_in_string.json
  103. +0 8 Support/yajl/test/cases/non_utf8_char_in_string.json.gold
  104. +0 1  Support/yajl/test/cases/null.json
  105. +0 2  Support/yajl/test/cases/null.json.gold
  106. +0 1  Support/yajl/test/cases/null_then_garbage.json
  107. +0 2  Support/yajl/test/cases/null_then_garbage.json.gold
  108. +0 5 Support/yajl/test/cases/nulls_and_bools.json
  109. +0 9 Support/yajl/test/cases/nulls_and_bools.json.gold
  110. +0 5 Support/yajl/test/cases/simple.json
  111. +0 9 Support/yajl/test/cases/simple.json.gold
  112. +0 11 Support/yajl/test/cases/simple_with_comments.json
  113. +0 9 Support/yajl/test/cases/simple_with_comments.json.gold
  114. +0 1  Support/yajl/test/cases/string_invalid_escape.json
  115. +0 3  Support/yajl/test/cases/string_invalid_escape.json.gold
  116. +0 1  Support/yajl/test/cases/string_invalid_hex_char.json
  117. +0 2  Support/yajl/test/cases/string_invalid_hex_char.json.gold
  118. +0 3  Support/yajl/test/cases/string_with_escapes.json
  119. +0 7 Support/yajl/test/cases/string_with_escapes.json.gold
  120. +0 2  Support/yajl/test/cases/string_with_invalid_newline.json
  121. +0 2  Support/yajl/test/cases/string_with_invalid_newline.json.gold
  122. +0 1  Support/yajl/test/cases/three_byte_utf8.json
  123. +0 7 Support/yajl/test/cases/three_byte_utf8.json.gold
  124. +0 1  Support/yajl/test/cases/true.json
  125. +0 2  Support/yajl/test/cases/true.json.gold
  126. +0 1  Support/yajl/test/cases/true_then_garbage.json
  127. +0 2  Support/yajl/test/cases/true_then_garbage.json.gold
  128. +0 1  Support/yajl/test/cases/unescaped_bulgarian.json
  129. +0 4 Support/yajl/test/cases/unescaped_bulgarian.json.gold
  130. +0 61 Support/yajl/test/run_tests.sh
  131. +0 291 Support/yajl/test/yajl_test.c
  132. +0 55 Support/yajl/verify/CMakeLists.txt
  133. +0 129 Support/yajl/verify/json_verify.c
  134. +0 1  Support/yajl/yajl_iphone/yajl
  135. +0 269 Support/yajl/yajl_iphone/yajl_iphone.xcodeproj/project.pbxproj
  136. +0 55 Tests/TestData/FTJSONTestData.plist
  137. +2 1  Tests/TestFTAnimationManager.m
  138. +0 136 Tests/TestFTJSON.m
189 Classes/FTAnimation+UIView.m
... ... @@ -0,0 +1,189 @@
  1 +/*
  2 + The MIT License
  3 +
  4 + Copyright (c) 2009 Free Time Studios and Nathan Eror
  5 +
  6 + Permission is hereby granted, free of charge, to any person obtaining a copy
  7 + of this software and associated documentation files (the "Software"), to deal
  8 + in the Software without restriction, including without limitation the rights
  9 + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  10 + copies of the Software, and to permit persons to whom the Software is
  11 + furnished to do so, subject to the following conditions:
  12 +
  13 + The above copyright notice and this permission notice shall be included in
  14 + all copies or substantial portions of the Software.
  15 +
  16 + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17 + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18 + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  19 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  20 + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  21 + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  22 + THE SOFTWARE.
  23 +*/
  24 +
  25 +#import "FTAnimation+UIView.h"
  26 +#import "FTUtils.h"
  27 +#import "FTUtils+NSObject.h"
  28 +
  29 +
  30 +@implementation UIView (FTAnimationAdditions)
  31 +
  32 +#pragma mark Slide Animations
  33 +
  34 +- (void)slideInFrom:(FTAnimationDirection)direction duration:(NSTimeInterval)duration delegate:(id)delegate
  35 + startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
  36 + CAAnimation *slideInAnim = [[FTAnimationManager sharedManager] slideInAnimationFor:self direction:direction
  37 + duration:duration delegate:delegate
  38 + startSelector:startSelector stopSelector:stopSelector];
  39 + [self.layer addAnimation:slideInAnim forKey:kFTAnimationSlideIn];
  40 +}
  41 +
  42 +- (void)slideInFrom:(FTAnimationDirection)direction duration:(NSTimeInterval)duration delegate:(id)delegate {
  43 + [self slideInFrom:direction duration:duration delegate:delegate startSelector:nil stopSelector:nil];
  44 +}
  45 +
  46 +- (void)slideOutTo:(FTAnimationDirection)direction duration:(NSTimeInterval)duration
  47 + delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
  48 + CAAnimation *slideOutAnim = [[FTAnimationManager sharedManager] slideOutAnimationFor:self direction:direction
  49 + duration:duration delegate:delegate
  50 + startSelector:startSelector stopSelector:stopSelector];
  51 + [self.layer addAnimation:slideOutAnim forKey:kFTAnimationSlideOut];
  52 +}
  53 +
  54 +
  55 +- (void)slideOutTo:(FTAnimationDirection)direction duration:(NSTimeInterval)duration delegate:(id)delegate {
  56 + [self slideOutTo:direction duration:duration delegate:delegate startSelector:nil stopSelector:nil];
  57 +}
  58 +
  59 +#pragma mark Back In/Out Animations
  60 +
  61 +- (void)backOutTo:(FTAnimationDirection)direction withFade:(BOOL)fade duration:(NSTimeInterval)duration delegate:(id)delegate
  62 + startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
  63 + CAAnimation *backOutAnim = [[FTAnimationManager sharedManager] backOutAnimationFor:self withFade:fade direction:direction
  64 + duration:duration delegate:delegate
  65 + startSelector:startSelector stopSelector:stopSelector];
  66 + [self.layer addAnimation:backOutAnim forKey:kFTAnimationBackOut];
  67 +}
  68 +
  69 +- (void)backOutTo:(FTAnimationDirection)direction withFade:(BOOL)fade duration:(NSTimeInterval)duration delegate:(id)delegate {
  70 + [self backOutTo:direction withFade:fade duration:duration delegate:delegate startSelector:nil stopSelector:nil];
  71 +}
  72 +
  73 +- (void)backInFrom:(FTAnimationDirection)direction withFade:(BOOL)fade duration:(NSTimeInterval)duration delegate:(id)delegate
  74 + startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
  75 + CAAnimation *backInAnim = [[FTAnimationManager sharedManager] backInAnimationFor:self withFade:fade direction:direction
  76 + duration:duration delegate:delegate
  77 + startSelector:startSelector stopSelector:stopSelector];
  78 + [self.layer addAnimation:backInAnim forKey:kFTAnimationBackIn];
  79 +}
  80 +
  81 +- (void)backInFrom:(FTAnimationDirection)direction withFade:(BOOL)fade duration:(NSTimeInterval)duration delegate:(id)delegate {
  82 + [self backInFrom:direction withFade:fade duration:duration delegate:delegate startSelector:nil stopSelector:nil];
  83 +}
  84 +
  85 +#pragma mark -
  86 +#pragma mark Fade Animations
  87 +
  88 +- (void)fadeIn:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
  89 + CAAnimation *anim = [[FTAnimationManager sharedManager] fadeAnimationFor:self duration:duration delegate:delegate
  90 + startSelector:startSelector stopSelector:stopSelector fadeOut:NO];
  91 + [self.layer addAnimation:anim forKey:kFTAnimationFadeIn];
  92 +}
  93 +
  94 +- (void)fadeIn:(NSTimeInterval)duration delegate:(id)delegate {
  95 + [self fadeIn:duration delegate:delegate startSelector:nil stopSelector:nil];
  96 +}
  97 +
  98 +- (void)fadeOut:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
  99 + CAAnimation *anim = [[FTAnimationManager sharedManager] fadeAnimationFor:self duration:duration delegate:delegate
  100 + startSelector:startSelector stopSelector:stopSelector fadeOut:YES];
  101 + [self.layer addAnimation:anim forKey:kFTAnimationFadeOut];
  102 +}
  103 +
  104 +- (void)fadeOut:(NSTimeInterval)duration delegate:(id)delegate {
  105 + [self fadeOut:duration delegate:delegate startSelector:nil stopSelector:nil];
  106 +}
  107 +
  108 +- (void)fadeBackgroundColorIn:(NSTimeInterval)duration delegate:(id)delegate
  109 + startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
  110 + CAAnimation *anim = [[FTAnimationManager sharedManager] fadeBackgroundColorAnimationFor:self duration:duration
  111 + delegate:delegate startSelector:startSelector
  112 + stopSelector:stopSelector fadeOut:NO];
  113 + [self.layer addAnimation:anim forKey:kFTAnimationFadeBackgroundIn];
  114 +}
  115 +
  116 +- (void)fadeBackgroundColorIn:(NSTimeInterval)duration delegate:(id)delegate {
  117 + [self fadeBackgroundColorIn:duration delegate:delegate startSelector:nil stopSelector:nil];
  118 +}
  119 +
  120 +- (void)fadeBackgroundColorOut:(NSTimeInterval)duration delegate:(id)delegate
  121 + startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
  122 + CAAnimation *anim = [[FTAnimationManager sharedManager] fadeBackgroundColorAnimationFor:self duration:duration
  123 + delegate:delegate startSelector:startSelector
  124 + stopSelector:stopSelector fadeOut:YES];
  125 + [self.layer addAnimation:anim forKey:kFTAnimationFadeBackgroundOut];
  126 +}
  127 +
  128 +- (void)fadeBackgroundColorOut:(NSTimeInterval)duration delegate:(id)delegate {
  129 + [self fadeBackgroundColorOut:duration delegate:delegate startSelector:nil stopSelector:nil];
  130 +}
  131 +
  132 +#pragma mark -
  133 +#pragma mark Pop Animations
  134 +
  135 +- (void)popIn:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
  136 + CAAnimation *anim = [[FTAnimationManager sharedManager] popInAnimationFor:self duration:duration delegate:delegate
  137 + startSelector:startSelector stopSelector:stopSelector];
  138 + [self.layer addAnimation:anim forKey:kFTAnimationPopIn];
  139 +}
  140 +
  141 +- (void)popIn:(NSTimeInterval)duration delegate:(id)delegate {
  142 + [self popIn:duration delegate:delegate startSelector:nil stopSelector:nil];
  143 +}
  144 +
  145 +- (void)popOut:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
  146 + CAAnimation *anim = [[FTAnimationManager sharedManager] popOutAnimationFor:self duration:duration delegate:delegate
  147 + startSelector:startSelector stopSelector:stopSelector];
  148 + [self.layer addAnimation:anim forKey:kFTAnimationPopOut];
  149 +}
  150 +
  151 +- (void)popOut:(NSTimeInterval)duration delegate:(id)delegate {
  152 + [self popOut:duration delegate:delegate startSelector:nil stopSelector:nil];
  153 +}
  154 +
  155 +#pragma mark -
  156 +#pragma mark Fall In and Fly Out
  157 +
  158 +- (void)fallIn:(NSTimeInterval)duration delegate:(id)delegate {
  159 + [self fallIn:duration delegate:delegate startSelector:nil stopSelector:nil];
  160 +}
  161 +
  162 +- (void)fallIn:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
  163 + CAAnimation *anim = [[FTAnimationManager sharedManager] fallInAnimationFor:self duration:duration delegate:delegate
  164 + startSelector:startSelector stopSelector:stopSelector];
  165 + [self.layer addAnimation:anim forKey:kFTAnimationFallIn];
  166 +}
  167 +
  168 +- (void)fallOut:(NSTimeInterval)duration delegate:(id)delegate {
  169 + [self fallOut:duration delegate:delegate startSelector:nil stopSelector:nil];
  170 +}
  171 +
  172 +- (void)fallOut:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
  173 + CAAnimation *anim = [[FTAnimationManager sharedManager] fallOutAnimationFor:self duration:duration delegate:delegate
  174 + startSelector:startSelector stopSelector:stopSelector];
  175 + [self.layer addAnimation:anim forKey:kFTAnimationFallOut];
  176 +}
  177 +
  178 +- (void)flyOut:(NSTimeInterval)duration delegate:(id)delegate {
  179 + [self flyOut:duration delegate:delegate startSelector:nil stopSelector:nil];
  180 +}
  181 +
  182 +- (void)flyOut:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
  183 + CAAnimation *anim = [[FTAnimationManager sharedManager] flyOutAnimationFor:self duration:duration delegate:delegate
  184 + startSelector:startSelector stopSelector:stopSelector];
  185 + [self.layer addAnimation:anim forKey:kFTAnimationFlyOut];
  186 +}
  187 +
  188 +
  189 +@end
171 Classes/FTAnimationManager.m
@@ -20,8 +20,12 @@ of this software and associated documentation files (the "Software"), to deal
20 20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 22 THE SOFTWARE.
23   -*/
  23 +*/
  24 +
24 25 #import "FTAnimationManager.h"
  26 +#import "FTUtils.h"
  27 +#import "FTUtils+NSObject.h"
  28 +
25 29
26 30 NSString *const kFTAnimationName = @"kFTAnimationName";
27 31 NSString *const kFTAnimationType = @"kFTAnimationType";
@@ -470,7 +474,7 @@ - (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)finished {
470 474 + (FTAnimationManager *)sharedManager {
471 475 @synchronized(self) {
472 476 if (sharedAnimationManager == nil) {
473   - sharedAnimationManager = [[self alloc] init]; // assignment not done here
  477 + sharedAnimationManager = [[self alloc] init];
474 478 }
475 479 }
476 480 return sharedAnimationManager;
@@ -502,166 +506,3 @@ - (void)setStopSelector:(SEL)selector withTarget:(id)target {
502 506
503 507 @end
504 508
505   -
506   -#pragma mark -
507   -
508   -@implementation UIView (FTAnimationAdditions)
509   -
510   -#pragma mark Slide Animations
511   -
512   -- (void)slideInFrom:(FTAnimationDirection)direction duration:(NSTimeInterval)duration delegate:(id)delegate
513   - startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
514   - CAAnimation *slideInAnim = [[FTAnimationManager sharedManager] slideInAnimationFor:self direction:direction
515   - duration:duration delegate:delegate
516   - startSelector:startSelector stopSelector:stopSelector];
517   - [self.layer addAnimation:slideInAnim forKey:kFTAnimationSlideIn];
518   -}
519   -
520   -- (void)slideInFrom:(FTAnimationDirection)direction duration:(NSTimeInterval)duration delegate:(id)delegate {
521   - [self slideInFrom:direction duration:duration delegate:delegate startSelector:nil stopSelector:nil];
522   -}
523   -
524   -- (void)slideOutTo:(FTAnimationDirection)direction duration:(NSTimeInterval)duration
525   - delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
526   - CAAnimation *slideOutAnim = [[FTAnimationManager sharedManager] slideOutAnimationFor:self direction:direction
527   - duration:duration delegate:delegate
528   - startSelector:startSelector stopSelector:stopSelector];
529   - [self.layer addAnimation:slideOutAnim forKey:kFTAnimationSlideOut];
530   -}
531   -
532   -
533   -- (void)slideOutTo:(FTAnimationDirection)direction duration:(NSTimeInterval)duration delegate:(id)delegate {
534   - [self slideOutTo:direction duration:duration delegate:delegate startSelector:nil stopSelector:nil];
535   -}
536   -
537   -#pragma mark Back In/Out Animations
538   -
539   -- (void)backOutTo:(FTAnimationDirection)direction withFade:(BOOL)fade duration:(NSTimeInterval)duration delegate:(id)delegate
540   - startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
541   - CAAnimation *backOutAnim = [[FTAnimationManager sharedManager] backOutAnimationFor:self withFade:fade direction:direction
542   - duration:duration delegate:delegate
543   - startSelector:startSelector stopSelector:stopSelector];
544   - [self.layer addAnimation:backOutAnim forKey:kFTAnimationBackOut];
545   -}
546   -
547   -- (void)backOutTo:(FTAnimationDirection)direction withFade:(BOOL)fade duration:(NSTimeInterval)duration delegate:(id)delegate {
548   - [self backOutTo:direction withFade:fade duration:duration delegate:delegate startSelector:nil stopSelector:nil];
549   -}
550   -
551   -- (void)backInFrom:(FTAnimationDirection)direction withFade:(BOOL)fade duration:(NSTimeInterval)duration delegate:(id)delegate
552   - startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
553   - CAAnimation *backInAnim = [[FTAnimationManager sharedManager] backInAnimationFor:self withFade:fade direction:direction
554   - duration:duration delegate:delegate
555   - startSelector:startSelector stopSelector:stopSelector];
556   - [self.layer addAnimation:backInAnim forKey:kFTAnimationBackIn];
557   -}
558   -
559   -- (void)backInFrom:(FTAnimationDirection)direction withFade:(BOOL)fade duration:(NSTimeInterval)duration delegate:(id)delegate {
560   - [self backInFrom:direction withFade:fade duration:duration delegate:delegate startSelector:nil stopSelector:nil];
561   -}
562   -
563   -#pragma mark -
564   -#pragma mark Fade Animations
565   -
566   -- (void)fadeIn:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
567   - CAAnimation *anim = [[FTAnimationManager sharedManager] fadeAnimationFor:self duration:duration delegate:delegate
568   - startSelector:startSelector stopSelector:stopSelector fadeOut:NO];
569   - [self.layer addAnimation:anim forKey:kFTAnimationFadeIn];
570   -}
571   -
572   -- (void)fadeIn:(NSTimeInterval)duration delegate:(id)delegate {
573   - [self fadeIn:duration delegate:delegate startSelector:nil stopSelector:nil];
574   -}
575   -
576   -- (void)fadeOut:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
577   - CAAnimation *anim = [[FTAnimationManager sharedManager] fadeAnimationFor:self duration:duration delegate:delegate
578   - startSelector:startSelector stopSelector:stopSelector fadeOut:YES];
579   - [self.layer addAnimation:anim forKey:kFTAnimationFadeOut];
580   -}
581   -
582   -- (void)fadeOut:(NSTimeInterval)duration delegate:(id)delegate {
583   - [self fadeOut:duration delegate:delegate startSelector:nil stopSelector:nil];
584   -}
585   -
586   -- (void)fadeBackgroundColorIn:(NSTimeInterval)duration delegate:(id)delegate
587   - startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
588   - CAAnimation *anim = [[FTAnimationManager sharedManager] fadeBackgroundColorAnimationFor:self duration:duration
589   - delegate:delegate startSelector:startSelector
590   - stopSelector:stopSelector fadeOut:NO];
591   - [self.layer addAnimation:anim forKey:kFTAnimationFadeBackgroundIn];
592   -}
593   -
594   -- (void)fadeBackgroundColorIn:(NSTimeInterval)duration delegate:(id)delegate {
595   - [self fadeBackgroundColorIn:duration delegate:delegate startSelector:nil stopSelector:nil];
596   -}
597   -
598   -- (void)fadeBackgroundColorOut:(NSTimeInterval)duration delegate:(id)delegate
599   - startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
600   - CAAnimation *anim = [[FTAnimationManager sharedManager] fadeBackgroundColorAnimationFor:self duration:duration
601   - delegate:delegate startSelector:startSelector
602   - stopSelector:stopSelector fadeOut:YES];
603   - [self.layer addAnimation:anim forKey:kFTAnimationFadeBackgroundOut];
604   -}
605   -
606   -- (void)fadeBackgroundColorOut:(NSTimeInterval)duration delegate:(id)delegate {
607   - [self fadeBackgroundColorOut:duration delegate:delegate startSelector:nil stopSelector:nil];
608   -}
609   -
610   -#pragma mark -
611   -#pragma mark Pop Animations
612   -
613   -- (void)popIn:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
614   - CAAnimation *anim = [[FTAnimationManager sharedManager] popInAnimationFor:self duration:duration delegate:delegate
615   - startSelector:startSelector stopSelector:stopSelector];
616   - [self.layer addAnimation:anim forKey:kFTAnimationPopIn];
617   -}
618   -
619   -- (void)popIn:(NSTimeInterval)duration delegate:(id)delegate {
620   - [self popIn:duration delegate:delegate startSelector:nil stopSelector:nil];
621   -}
622   -
623   -- (void)popOut:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
624   - CAAnimation *anim = [[FTAnimationManager sharedManager] popOutAnimationFor:self duration:duration delegate:delegate
625   - startSelector:startSelector stopSelector:stopSelector];
626   - [self.layer addAnimation:anim forKey:kFTAnimationPopOut];
627   -}
628   -
629   -- (void)popOut:(NSTimeInterval)duration delegate:(id)delegate {
630   - [self popOut:duration delegate:delegate startSelector:nil stopSelector:nil];
631   -}
632   -
633   -#pragma mark -
634   -#pragma mark Fall In and Fly Out
635   -
636   -- (void)fallIn:(NSTimeInterval)duration delegate:(id)delegate {
637   - [self fallIn:duration delegate:delegate startSelector:nil stopSelector:nil];
638   -}
639   -
640   -- (void)fallIn:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
641   - CAAnimation *anim = [[FTAnimationManager sharedManager] fallInAnimationFor:self duration:duration delegate:delegate
642   - startSelector:startSelector stopSelector:stopSelector];
643   - [self.layer addAnimation:anim forKey:kFTAnimationFallIn];
644   -}
645   -
646   -- (void)fallOut:(NSTimeInterval)duration delegate:(id)delegate {
647   - [self fallOut:duration delegate:delegate startSelector:nil stopSelector:nil];
648   -}
649   -
650   -- (void)fallOut:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
651   - CAAnimation *anim = [[FTAnimationManager sharedManager] fallOutAnimationFor:self duration:duration delegate:delegate
652   - startSelector:startSelector stopSelector:stopSelector];
653   - [self.layer addAnimation:anim forKey:kFTAnimationFallOut];
654   -}
655   -
656   -- (void)flyOut:(NSTimeInterval)duration delegate:(id)delegate {
657   - [self flyOut:duration delegate:delegate startSelector:nil stopSelector:nil];
658   -}
659   -
660   -- (void)flyOut:(NSTimeInterval)duration delegate:(id)delegate startSelector:(SEL)startSelector stopSelector:(SEL)stopSelector {
661   - CAAnimation *anim = [[FTAnimationManager sharedManager] flyOutAnimationFor:self duration:duration delegate:delegate
662   - startSelector:startSelector stopSelector:stopSelector];
663   - [self.layer addAnimation:anim forKey:kFTAnimationFlyOut];
664   -}
665   -
666   -
667   -@end
308 Classes/FTJSONParser.m
... ... @@ -1,308 +0,0 @@
1   -/*
2   - The MIT License
3   -
4   - Copyright (c) 2009 Free Time Studios and Nathan Eror
5   -
6   - Permission is hereby granted, free of charge, to any person obtaining a copy
7   - of this software and associated documentation files (the "Software"), to deal
8   - in the Software without restriction, including without limitation the rights
9   - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10   - copies of the Software, and to permit persons to whom the Software is
11   - furnished to do so, subject to the following conditions:
12   -
13   - The above copyright notice and this permission notice shall be included in
14   - all copies or substantial portions of the Software.
15   -
16   - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17   - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18   - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19   - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20   - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21   - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22   - THE SOFTWARE.
23   -*/
24   -#import "FTJSONParser.h"
25   -
26   -#define SAFE_RELEASE_HANDLE if(handle_ != NULL) { yajl_free(handle_), handle_ = NULL; }
27   -
28   -NSString *const FTJSONParserErrorDomain = @"FTJSONParserError";
29   -
30   -//Forward declaration, the struct is defined at the bottom of the file
31   -static yajl_callbacks ftjsonCallbacks;
32   -
33   -@interface FTJSONParser (YAJLParserCallbacks)
34   -
35   -- (BOOL)objectIsDictionary:(id)obj;
36   -
37   -- (void)startCollectionWithKey:(NSString *)key collection:(id)collection;
38   -
39   -- (void)startDictionaryWithKey:(NSString *)key;
40   -- (void)endDictionary;
41   -
42   -- (void)startArrayWithKey:(NSString *)key;
43   -- (void)endArray;
44   -
45   -- (void)addObject:(id)obj forKey:(NSString *)key;
46   -
47   -@end
48   -
49   -@implementation FTJSONParser (YAJLParserCallbacks)
50   -
51   -- (BOOL)objectIsDictionary:(id)obj {
52   - //NSDictionary is the only class that implements allKeys
53   - return [obj respondsToSelector:@selector(allKeys)];
54   -}
55   -
56   -- (void)addObject:(id)obj forKey:(NSString *)key {
57   - id stackTop = [collectionObjectStack_ lastObject];
58   - if([self objectIsDictionary:stackTop]) {
59   - [stackTop setObject:obj forKey:key];
60   - } else {
61   - [stackTop addObject:obj];
62   - }
63   -}
64   -
65   -- (void)startCollectionWithKey:(NSString *)key collection:(id)collection {
66   - id stackTop = [collectionObjectStack_ lastObject];
67   - if(stackTop == nil) {
68   - rootObject_ = [collection retain];
69   - } else {
70   - if([self objectIsDictionary:stackTop]) {
71   - [stackTop setObject:collection forKey:key];
72   - } else {
73   - [stackTop addObject:collection];
74   - }
75   - }
76   - [collectionObjectStack_ addObject:collection];
77   -}
78   -
79   -- (void)startDictionaryWithKey:(NSString *)key {
80   - if([collectionObjectStack_ count] == 0) {
81   - isDictionary_ = YES;
82   - }
83   - [self startCollectionWithKey:key collection:[NSMutableDictionary dictionary]];
84   -}
85   -
86   -- (void)endDictionary {
87   - NSAssert([self objectIsDictionary:[collectionObjectStack_ lastObject]], @"I need to pop a dictionary off of the type stack!");
88   - [collectionObjectStack_ removeLastObject];
89   -}
90   -
91   -- (void)startArrayWithKey:(NSString *)key {
92   - if([collectionObjectStack_ count] == 0) {
93   - isDictionary_ = NO;
94   - }
95   - [self startCollectionWithKey:key collection:[NSMutableArray array]];
96   -}
97   -- (void)endArray {
98   - NSAssert(![self objectIsDictionary:[collectionObjectStack_ lastObject]], @"I need to pop an array off of the type stack!");
99   - [collectionObjectStack_ removeLastObject];
100   -}
101   -
102   -@end
103   -
104   -
105   -@implementation FTJSONParser
106   -
107   -@synthesize delegate = delegate_;
108   -@synthesize isDictionary = isDictionary_;
109   -@synthesize allowComments = allowComments_;
110   -@synthesize forceUTF8 = forceUTF8_;
111   -@synthesize status = parsingStatus_;
112   -
113   -#pragma mark init/dealloc
114   -
115   -- (id) init {
116   - self = [super init];
117   - if (self != nil) {
118   - collectionObjectStack_ = [[NSMutableArray alloc] init];
119   - allowComments_ = YES;
120   - forceUTF8_ = YES;
121   - }
122   - return self;
123   -}
124   -
125   -- (void) dealloc {
126   - FTRELEASE(rootObject_);
127   - FTRELEASE(collectionObjectStack_);
128   - [super dealloc];
129   -}
130   -
131   -#pragma mark Result and Status Accessors
132   -
133   -- (NSDictionary *)dictionary {
134   - if(isDictionary_) {
135   - return [NSDictionary dictionaryWithDictionary:rootObject_];
136   - }
137   - return nil;
138   -}
139   -- (NSArray *)array {
140   - if(isDictionary_) {
141   - return [NSArray arrayWithObject:rootObject_];
142   - }
143   - return [NSArray arrayWithArray:rootObject_];
144   -}
145   -
146   -- (NSString *)statusString {
147   - return [NSString stringWithCString:yajl_status_to_string((yajl_status)parsingStatus_) encoding:NSUTF8StringEncoding];
148   -}
149   -
150   -#pragma mark Error Handling Helpers
151   -
152   -- (NSString *)getYAJLErrorStringFor:(NSData *)data {
153   - unsigned char *yajlError = yajl_get_error(handle_, 0, [data bytes], [data length]);
154   - //Put the error string into an NSString and lop off the trailing newline
155   - NSString *errorString = [NSString stringWithUTF8String:(const char *)yajlError];
156   - yajl_free_error(handle_, yajlError);
157   - return errorString;
158   -}
159   -
160   -#pragma mark Parse NSData Stream
161   -
162   -- (BOOL)prepareParser {
163   - SAFE_RELEASE_HANDLE
164   - yajl_parser_config parserConfig = {allowComments_, forceUTF8_};
165   - handle_ = yajl_alloc(&ftjsonCallbacks, &parserConfig, NULL, self);
166   - return (handle_ != NULL);
167   -}
168   -
169   -- (FTJSONParsingStatus)parseChunk:(NSData *)dataChunk error:(NSError **)error {
170   - parsingStatus_ = (FTJSONParsingStatus)yajl_parse(handle_, [dataChunk bytes], [dataChunk length]);
171   - if (parsingStatus_ != kFTJSONParsingStatusInsufficientData && parsingStatus_ != kFTJSONParsingStatusOK) {
172   - if(error != NULL) {
173   - *error = [NSError errorWithDomain:FTJSONParserErrorDomain
174   - code:parsingStatus_
175   - userInfo:[NSDictionary dictionaryWithObjectsAndKeys:
176   - [self getYAJLErrorStringFor:dataChunk], NSLocalizedFailureReasonErrorKey, nil]];
177   - }
178   - }
179   - return parsingStatus_;
180   -}
181   -
182   -- (void)finishedParsing {
183   - parsingStatus_ = yajl_parse_complete(handle_);
184   - SAFE_RELEASE_HANDLE
185   -}
186   -
187   -#pragma mark Parse Stream From URL
188   -
189   -- (BOOL)parseUrl:(NSURL *)url {
190   - return !![NSURLConnection connectionWithRequest:[NSURLRequest requestWithURL:url] delegate:self];
191   -}
192   -
193   -#pragma mark NSURLConnection Delegate Methods
194   -
195   -- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response {
196   - [self prepareParser];
197   -}
198   -
199   -- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
200   - NSError *error = nil;
201   - [self parseChunk:data error:&error];
202   - if (parsingStatus_ != kFTJSONParsingStatusInsufficientData && parsingStatus_ != kFTJSONParsingStatusOK) {
203   - [connection cancel];
204   - if (delegate_ != nil && [delegate_ respondsToSelector:@selector(jsonRequestFailed:)]) {
205   - [delegate_ jsonRequestFailed:error];
206   - }
207   - }
208   -}
209   -
210   -- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error {
211   - [self finishedParsing];
212   - if (delegate_ != nil && [delegate_ respondsToSelector:@selector(jsonRequestFailed:)]) {
213   - [delegate_ jsonRequestFailed:error];
214   - }
215   -
216   -}
217   -
218   -- (void)connectionDidFinishLoading:(NSURLConnection *)connection {
219   - [self finishedParsing];
220   - if (delegate_ != nil && [delegate_ respondsToSelector:@selector(jsonRequestFinished:)]) {
221   - [delegate_ jsonRequestFinished:self];
222   - }
223   -}
224   -
225   -#pragma mark Parse a plain ole' NSString
226   -
227   -- (FTJSONParsingStatus)parseString:(NSString *)jsonString error:(NSError **)error {
228   - NSData *data = [NSData dataWithBytes:[jsonString UTF8String] length:[jsonString lengthOfBytesUsingEncoding:NSUTF8StringEncoding]];
229   - [self prepareParser];
230   - [self parseChunk:data error:error];
231   - [self finishedParsing];
232   - return parsingStatus_;
233   -}
234   -
235   -@end
236   -
237   -#pragma mark -
238   -#pragma mark YAJL Callbacks
239   -
240   -static NSString *currentKey;
241   -
242   -static int ftjson_null(void *ctx) {
243   - [(FTJSONParser *)ctx addObject:nil forKey:currentKey];
244   - return 1;
245   -}
246   -
247   -static int ftjson_boolean(void *ctx, int boolean) {
248   - [(FTJSONParser *)ctx addObject:[NSNumber numberWithBool:boolean] forKey:currentKey];
249   - return 1;
250   -}
251   -
252   -static int ftjson_integer(void *ctx, long value) {
253   - [(FTJSONParser *)ctx addObject:[NSNumber numberWithLong:value] forKey:currentKey];
254   - return 1;
255   -
256   -}
257   -
258   -static int ftjson_double(void *ctx, double value) {
259   - [(FTJSONParser *)ctx addObject:[NSNumber numberWithDouble:value] forKey:currentKey];
260   - return 1;
261   -}
262   -
263   -static int ftjson_string(void *ctx, const unsigned char *stringVal, unsigned int stringLen) {
264   - NSString *value = [[NSString alloc] initWithBytes:stringVal length:stringLen encoding:NSUTF8StringEncoding];
265   - [(FTJSONParser *)ctx addObject:value forKey:currentKey];
266   - [value release];
267   - return 1;
268   -}
269   -
270   -static int ftjson_map_key(void *ctx, const unsigned char *stringVal, unsigned int stringLen) {
271   - FTRELEASE(currentKey);
272   - currentKey = [[NSString alloc] initWithBytes:stringVal length:stringLen encoding:NSUTF8StringEncoding];
273   - return 1;
274   -}
275   -
276   -static int ftjson_start_map(void *ctx) {
277   - [(FTJSONParser *)ctx startDictionaryWithKey:currentKey];
278   - return 1;
279   -}
280   -
281   -static int ftjson_end_map(void *ctx) {
282   - [(FTJSONParser *)ctx endDictionary];
283   - return 1;
284   -}
285   -
286   -static int ftjson_start_array(void *ctx) {
287   - [(FTJSONParser *)ctx startArrayWithKey:currentKey];
288   - return 1;
289   -}
290   -
291   -static int ftjson_end_array(void *ctx) {
292   - [(FTJSONParser *)ctx endArray];
293   - return 1;
294   -}
295   -
296   -static yajl_callbacks ftjsonCallbacks = {
297   - ftjson_null,
298   - ftjson_boolean,
299   - ftjson_integer,
300   - ftjson_double,
301   - NULL,
302   - ftjson_string,
303   - ftjson_start_map,
304   - ftjson_map_key,
305   - ftjson_end_map,
306   - ftjson_start_array,
307   - ftjson_end_array
308   -};
249 Classes/FTJSONWriter.m
... ... @@ -1,249 +0,0 @@
1   -/*
2   - The MIT License
3   -
4   - Copyright (c) 2009 Free Time Studios and Nathan Eror
5   -
6   - Permission is hereby granted, free of charge, to any person obtaining a copy
7   - of this software and associated documentation files (the "Software"), to deal
8   - in the Software without restriction, including without limitation the rights
9   - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10   - copies of the Software, and to permit persons to whom the Software is
11   - furnished to do so, subject to the following conditions:
12   -
13   - The above copyright notice and this permission notice shall be included in
14   - all copies or substantial portions of the Software.
15   -
16   - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17   - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18   - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19   - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20   - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21   - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22   - THE SOFTWARE.
23   -*/
24   -#import "FTJSONWriter.h"
25   -
26   -#define SAFE_RELEASE_HANDLE \
27   - if(handle_ != NULL) { \
28   - yajl_gen_free(handle_); \
29   - handle_ = NULL; \
30   - }
31   -
32   -#define CHECK_STATUS_NO_ERROR(_status, _method_call) \
33   - _status = _method_call; \
34   - if(_status != kFTJSONEncStatusOK) { \
35   - return _status; \
36   - }
37   -
38   -#define THROW_ERROR_FOR_STATUS(_status, _err) \
39   - if (_status != kFTJSONEncStatusOK) { \
40   - if(_err != NULL) { \
41   - *_err = [NSError errorWithDomain:FTJSONWriterErrorDomain \
42   - code:_status \
43   - userInfo:[NSDictionary dictionaryWithObjectsAndKeys: \
44   - [NSString stringWithUTF8String:friendlyErrorMessages[_status]], \
45   - NSLocalizedFailureReasonErrorKey, nil] \
46   - ]; \
47   - } \
48   - return _status; \
49   - }
50   -
51   -
52   -#define GEN_FUNC_OR_ERROR(_err, _status, _func, ...) \
53   - _status = (FTJSONEncodingStatus)_func(__VA_ARGS__); \
54   - THROW_ERROR_FOR_STATUS(_status, _err)
55   -
56   -static const char *friendlyErrorMessages[] = {
57   - "OK!",
58   - "All keys must be strings.",
59   - "Max stack depth exceeded.",
60   - "A generator function was called while the generator was in an error state.",
61   - "Generation complete.",
62   - "Could not encode into a JSON string"
63   -};
64   -
65   -NSString *const FTJSONWriterErrorDomain = @"FTJSONWriterError";
66   -
67   -@interface FTJSONWriter (PrivateEncodingMethods)
68   -
69   -- (FTJSONEncodingStatus)flushBuffer:(NSError **)error;
70   -- (FTJSONType)guessType:(id)value;
71   -- (FTJSONEncodingStatus)encodeString:(NSString *)value error:(NSError **)error;
72   -- (FTJSONEncodingStatus)encodeNSValue:(NSNumber *)value forType:(FTJSONType)type error:(NSError **)error;
73   -- (FTJSONEncodingStatus)encodeObject:(id)value forType:(FTJSONType)type error:(NSError **)error;
74   -- (FTJSONEncodingStatus)encodeObject:(id)value forKey:(NSString *)key error:(NSError **)error;
75   -
76   -@end
77   -
78   -@implementation FTJSONWriter (PrivateEncodingMethods)
79   -
80   -- (FTJSONEncodingStatus)flushBuffer:(NSError **)error {
81   - const unsigned char *buffer;
82   - unsigned int length;
83   - FTJSONEncodingStatus status;
84   - GEN_FUNC_OR_ERROR(error, status, yajl_gen_get_buf, handle_, &buffer, &length)
85   - [encodedString_ appendString:[NSString stringWithUTF8String:(const char *)buffer]];
86   - yajl_gen_clear(handle_);
87   - return status;
88   -}
89   -
90   -- (FTJSONType)guessType:(id)value {
91   - return kFTJSONTypeUnknown;
92   -}
93   -
94   -- (FTJSONEncodingStatus)encodeNSValue:(NSNumber *)value forType:(FTJSONType)type error:(NSError **)error {
95   - FTJSONEncodingStatus status = kFTJSONEncStatusCannotEncode;
96   - switch (type) {
97   - case kFTJSONTypeInteger:
98   - GEN_FUNC_OR_ERROR(error, status, yajl_gen_integer, handle_, [value longValue])
99   - break;
100   - case kFTJSONTypeDouble:
101   - GEN_FUNC_OR_ERROR(error, status, yajl_gen_double, handle_, [value doubleValue])
102   - break;
103   - case kFTJSONTypeBOOL:
104   - GEN_FUNC_OR_ERROR(error, status, yajl_gen_bool, handle_, [value boolValue])
105   - break;
106   - }
107   - return status;
108   -}
109   -
110   -- (FTJSONEncodingStatus)encodeString:(NSString *)value error:(NSError **)error {
111   - FTJSONEncodingStatus status;
112   - const char *str = [value UTF8String];
113   - GEN_FUNC_OR_ERROR(error, status, yajl_gen_string, handle_, (const unsigned char *)str, strlen(str))
114   - return status;
115   -}
116   -
117   -- (FTJSONEncodingStatus)encodeObject:(id)obj forType:(FTJSONType)type error:(NSError **)error {
118   - switch (type) {
119   - case kFTJSONTypeDictionary:
120   - return [self encodeDictionary:obj error:error];
121   - case kFTJSONTypeArray:
122   - return [self encodeArray:obj error:error];
123   - case kFTJSONTypeString:
124   - return [self encodeString:obj error:error];
125   - case kFTJSONTypeInteger:
126   - case kFTJSONTypeDouble:
127   - case kFTJSONTypeBOOL:
128   - return [self encodeNSValue:obj forType:type error:error];
129   - }
130   - THROW_ERROR_FOR_STATUS(kFTJSONEncStatusCannotEncode, error)
131   -}
132   -
133   -- (FTJSONEncodingStatus)encodeObject:(id)obj forKey:(NSString *)key error:(NSError **)error {
134   - FTJSONType type = kFTJSONTypeUnknown;
135   -
136   - if(delegate_ != nil && [delegate_ respondsToSelector:@selector(typeOfValue:forKey:)]) {
137   - type = [delegate_ typeOfValue:obj forKey:key];
138   - }
139   -
140   - if(type == kFTJSONTypeUnknown)
141   - {
142   - if([obj isKindOfClass:[NSValue class]])
143   - {
144   - const char *objCType = [obj objCType];
145   - if(strncmp(objCType, "i", 1)==0 || strncmp(objCType, "l", 1)==0 || strncmp(objCType, "q", 1)==0 ||
146   - strncmp(objCType, "I", 1)==0 || strncmp(objCType, "L", 1)==0 || strncmp(objCType, "Q", 1)==0)
147   - {
148   - type = kFTJSONTypeInteger;
149   - }
150   - else if(strncmp(objCType, "f", 1)==0 || strncmp(objCType, "d", 1)==0)
151   - {
152   - type = kFTJSONTypeDouble;
153   - }
154   - else if(strncmp(objCType, "B", 1)==0 || (strncmp(objCType, "c", 1)==0 && ([obj charValue]==0 || [obj charValue]==1))) {
155   - type = kFTJSONTypeBOOL;
156   - }
157   - }
158   - else if([obj respondsToSelector:@selector(initWithArray:)])
159   - {
160   - type = kFTJSONTypeArray;
161   - }
162   - else if([obj respondsToSelector:@selector(initWithDictionary:)] ||
163   - [obj respondsToSelector:@selector(addEntriesFromDictionary:)])
164   - {
165   - type = kFTJSONTypeDictionary;
166   - }
167   - else
168   - {
169   - //This is a fall through default and the NSString handler becuase
170   - //[NSString -descrption] just returns its receiver
171   - obj = [obj description];
172   - type = kFTJSONTypeString;
173   - }
174   - }
175   - return [self encodeObject:obj forType:type error:error];
176   -}
177   -
178   -@end
179   -
180   -@implementation FTJSONWriter
181   -
182   -@synthesize beautify = beautify_;
183   -@synthesize indentString = indentString_;
184   -@synthesize delegate = delegate_;
185   -@dynamic encodedString;
186   -
187   -- (id) init {
188   - self = [super init];
189   - if (self != nil) {
190   - beautify_ = NO;
191   - self.indentString = @" ";
192   - }
193   - return self;
194   -}
195   -
196   -- (void) dealloc {
197   - SAFE_RELEASE_HANDLE
198   - FTRELEASE(encodedString_);
199   - FTRELEASE(indentString_);
200   - [super dealloc];
201   -}
202   -
203   -- (NSString *)encodedString {
204   - return [NSString stringWithString:encodedString_];
205   -}
206   -
207   -- (BOOL)prepareWriter {
208   - FTRELEASE(encodedString_);
209   - encodedString_ = [[NSMutableString alloc] init];
210   - SAFE_RELEASE_HANDLE
211   - yajl_gen_config yajlGeneratorConf = {beautify_, [indentString_ UTF8String]};
212   - handle_ = yajl_gen_alloc(&yajlGeneratorConf, NULL);
213   - return (handle_ != NULL);
214   -}
215   -
216   -- (FTJSONEncodingStatus)encodeDictionary:(NSDictionary *)dictionary error:(NSError **)error {
217   - NSAssert(handle_, @"The writer must be prepared before encoding can begin.");
218   -
219   - FTJSONEncodingStatus status;
220   - GEN_FUNC_OR_ERROR(error, status, yajl_gen_map_open, handle_)
221   - for(id key in dictionary) {
222   - //Force Dictionary keys to NSStrings. We can use description since
223   - //it just returns the receiver when called on NSString
224   - CHECK_STATUS_NO_ERROR(status, [self encodeObject:[key description] forKey:nil error:error])
225   - CHECK_STATUS_NO_ERROR(status, [self encodeObject:[dictionary objectForKey:key] forKey:key error:error])
226   - }
227   - GEN_FUNC_OR_ERROR(error, status, yajl_gen_map_close, handle_)
228   - return [self flushBuffer:error];
229   -}
230   -
231   -- (FTJSONEncodingStatus)encodeArray:(NSArray *)array error:(NSError **)error {
232   - NSAssert(handle_, @"The writer must be prepared before encoding can begin.");
233   -
234   - FTJSONEncodingStatus status;
235   - GEN_FUNC_OR_ERROR(error, status, yajl_gen_array_open, handle_)
236   - for(NSString *item in array) {
237   - [self encodeObject:item forKey:nil error:error];
238   - }
239   - GEN_FUNC_OR_ERROR(error, status, yajl_gen_array_close, handle_)
240   - return [self flushBuffer:error];
241   -}
242   -
243   -- (FTJSONEncodingStatus)encodeObject:(id)obj error:(NSError **)error {
244   - FTJSONEncodingStatus status;
245   - CHECK_STATUS_NO_ERROR(status, [self encodeObject:obj forKey:nil error:error])
246   - return [self flushBuffer:error];
247   -}
248   -
249   -@end
24 Classes/FTUtils+NSObject.m
... ... @@ -1,3 +1,27 @@
  1 +/*
  2 + The MIT License
  3 +
  4 + Copyright (c) 2009 Free Time Studios and Nathan Eror
  5 +
  6 + Permission is hereby granted, free of charge, to any person obtaining a copy
  7 + of this software and associated documentation files (the "Software"), to deal
  8 + in the Software without restriction, including without limitation the rights
  9 + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  10 + copies of the Software, and to permit persons to whom the Software is
  11 + furnished to do so, subject to the following conditions:
  12 +
  13 + The above copyright notice and this permission notice shall be included in
  14 + all copies or substantial portions of the Software.
  15 +
  16 + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17 + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18 + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  19 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  20 + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  21 + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  22 + THE SOFTWARE.
  23 +*/
  24 +
1 25 #import "FTUtils+NSObject.h"
2 26 #import <QuartzCore/QuartzCore.h>
3 27
119 FTUtils.xcodeproj/project.pbxproj
@@ -8,60 +8,33 @@
8 8
9 9 /* Begin PBXBuildFile section */
10 10 AA747D9F0F9514B9006C5449 /* FTUtils_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = AA747D9E0F9514B9006C5449 /* FTUtils_Prefix.pch */; };
  11 + DF1E44EF10C29C1500F80FC0 /* FTAnimation+UIView.m in Sources */ = {isa = PBXBuildFile; fileRef = DF1E44EE10C29C1500F80FC0 /* FTAnimation+UIView.m */; };
  12 + DF1E44F010C29C1500F80FC0 /* FTAnimation+UIView.h in Headers */ = {isa = PBXBuildFile; fileRef = DF1E44ED10C29C1500F80FC0 /* FTAnimation+UIView.h */; };
  13 + DF1E44F110C29C1500F80FC0 /* FTAnimation+UIView.m in Sources */ = {isa = PBXBuildFile; fileRef = DF1E44EE10C29C1500F80FC0 /* FTAnimation+UIView.m */; };
  14 + DF1E44F510C29D7500F80FC0 /* FTAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = DF1E44F410C29D7500F80FC0 /* FTAnimation.h */; };
11 15 DF287AAE0FE19638001E9F62 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DF287AA20FE19638001E9F62 /* CoreGraphics.framework */; };
12 16 DF287AAF0FE19638001E9F62 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DF287AA30FE19638001E9F62 /* Foundation.framework */; };
13 17 DF287AB00FE19638001E9F62 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DF287AA40FE19638001E9F62 /* QuartzCore.framework */; };
14 18 DF287AB10FE19638001E9F62 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DF287AA50FE19638001E9F62 /* UIKit.framework */; };
15 19 DF2962EE0FE18E0000B9D71D /* FTAnimationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = DF2962E40FE18E0000B9D71D /* FTAnimationManager.h */; };
16   - DF2962EF0FE18E0000B9D71D /* FTJSONParser.h in Headers */ = {isa = PBXBuildFile; fileRef = DF2962E50FE18E0000B9D71D /* FTJSONParser.h */; };
17   - DF2962F00FE18E0000B9D71D /* FTJSONWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = DF2962E60FE18E0000B9D71D /* FTJSONWriter.h */; };
18 20 DF2962F20FE18E0000B9D71D /* FTAnimationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = DF2962E90FE18E0000B9D71D /* FTAnimationManager.m */; };
19   - DF2962F30FE18E0000B9D71D /* FTJSONParser.m in Sources */ = {isa = PBXBuildFile; fileRef = DF2962EA0FE18E0000B9D71D /* FTJSONParser.m */; };
20   - DF2962F40FE18E0000B9D71D /* FTJSONWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = DF2962EB0FE18E0000B9D71D /* FTJSONWriter.m */; };
21   - DF29631F0FE18F3F00B9D71D /* libyajl_iphone.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DF29631E0FE18F3D00B9D71D /* libyajl_iphone.a */; };
22 21 DFE4EF141035CC4D006A7598 /* OCMock.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DFE4EF131035CC4D006A7598 /* OCMock.framework */; };
23 22 DFE4EF1C1035CC97006A7598 /* OCMock.framework in Copy OCMock */ = {isa = PBXBuildFile; fileRef = DFE4EF131035CC4D006A7598 /* OCMock.framework */; };
24 23 DFE4EF241035CCC1006A7598 /* TestFTAnimationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = DF2962E10FE18E0000B9D71D /* TestFTAnimationManager.m */; };
25   - DFE4EF251035CCC1006A7598 /* TestFTJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = DF2962E20FE18E0000B9D71D /* TestFTJSON.m */; };
26   - DFE4EF261035CCC5006A7598 /* FTJSONTestData.plist in Resources */ = {isa = PBXBuildFile; fileRef = DF2962E00FE18E0000B9D71D /* FTJSONTestData.plist */; };
27 24 DFE4EFE21035CCCD006A7598 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DF287AA20FE19638001E9F62 /* CoreGraphics.framework */; };
28 25 DFE4EFE31035CCCD006A7598 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DF287AA30FE19638001E9F62 /* Foundation.framework */; };
29 26 DFE4EFE41035CCCD006A7598 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DF287AA40FE19638001E9F62 /* QuartzCore.framework */; };
30 27 DFE4EFE51035CCCD006A7598 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DF287AA50FE19638001E9F62 /* UIKit.framework */; };
31 28 DFF7F0601035CE350067ED5B /* FTAnimationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = DF2962E90FE18E0000B9D71D /* FTAnimationManager.m */; };
32   - DFF7F0611035CE350067ED5B /* FTJSONParser.m in Sources */ = {isa = PBXBuildFile; fileRef = DF2962EA0FE18E0000B9D71D /* FTJSONParser.m */; };
33   - DFF7F0621035CE350067ED5B /* FTJSONWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = DF2962EB0FE18E0000B9D71D /* FTJSONWriter.m */; };
34   - DFF7F0641035CE440067ED5B /* libyajl_iphone.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DF29631E0FE18F3D00B9D71D /* libyajl_iphone.a */; };
35 29 DFFBF80A10ADF405008DB0B9 /* FTUtils+NSObject.m in Sources */ = {isa = PBXBuildFile; fileRef = DFFBF80910ADF405008DB0B9 /* FTUtils+NSObject.m */; };
36 30 /* End PBXBuildFile section */
37 31
38 32 /* Begin PBXContainerItemProxy section */
39   - DF287F340FE19DAA001E9F62 /* PBXContainerItemProxy */ = {
40   - isa = PBXContainerItemProxy;
41   - containerPortal = DF2963170FE18F3D00B9D71D /* yajl_iphone.xcodeproj */;
42   - proxyType = 1;
43   - remoteGlobalIDString = D2AAC045055464E500DB518D;
44   - remoteInfo = libyajl;
45   - };
46   - DF29631D0FE18F3D00B9D71D /* PBXContainerItemProxy */ = {
47   - isa = PBXContainerItemProxy;
48   - containerPortal = DF2963170FE18F3D00B9D71D /* yajl_iphone.xcodeproj */;
49   - proxyType = 2;
50   - remoteGlobalIDString = D2AAC046055464E500DB518D;
51   - remoteInfo = libyajl;
52   - };
53   - DFF7F0651035CE540067ED5B /* PBXContainerItemProxy */ = {
54   - isa = PBXContainerItemProxy;
55   - containerPortal = DF2963170FE18F3D00B9D71D /* yajl_iphone.xcodeproj */;
56   - proxyType = 1;
57   - remoteGlobalIDString = D2AAC045055464E500DB518D;
58   - remoteInfo = libyajl;
59   - };
60 33 DFFBF86110ADF7A1008DB0B9 /* PBXContainerItemProxy */ = {
61 34 isa = PBXContainerItemProxy;
62 35 containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
63 36 proxyType = 1;
64   - remoteGlobalIDString = DFE4EF0A1035CBCB006A7598 /* UnitTests */;
  37 + remoteGlobalIDString = DFE4EF0A1035CBCB006A7598;
65 38 remoteInfo = UnitTests;
66 39 };
67 40 /* End PBXContainerItemProxy section */
@@ -83,21 +56,17 @@
83 56 /* Begin PBXFileReference section */
84 57 AA747D9E0F9514B9006C5449 /* FTUtils_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FTUtils_Prefix.pch; sourceTree = SOURCE_ROOT; };
85 58 D2AAC07E0554694100DB518D /* libFTUtils.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libFTUtils.a; sourceTree = BUILT_PRODUCTS_DIR; };
  59 + DF1E44ED10C29C1500F80FC0 /* FTAnimation+UIView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "FTAnimation+UIView.h"; path = "FTUtils/FTAnimation+UIView.h"; sourceTree = "<group>"; };
  60 + DF1E44EE10C29C1500F80FC0 /* FTAnimation+UIView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "FTAnimation+UIView.m"; sourceTree = "<group>"; };
  61 + DF1E44F410C29D7500F80FC0 /* FTAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FTAnimation.h; sourceTree = "<group>"; };
86 62 DF2879B50FE192A1001E9F62 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
87 63 DF287AA20FE19638001E9F62 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
88 64 DF287AA30FE19638001E9F62 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
89 65 DF287AA40FE19638001E9F62 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
90 66 DF287AA50FE19638001E9F62 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
91   - DF2962E00FE18E0000B9D71D /* FTJSONTestData.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = FTJSONTestData.plist; sourceTree = "<group>"; };
92 67 DF2962E10FE18E0000B9D71D /* TestFTAnimationManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestFTAnimationManager.m; sourceTree = "<group>"; };
93   - DF2962E20FE18E0000B9D71D /* TestFTJSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestFTJSON.m; sourceTree = "<group>"; };
94 68 DF2962E40FE18E0000B9D71D /* FTAnimationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FTAnimationManager.h; path = FTUtils/FTAnimationManager.h; sourceTree = "<group>"; };
95   - DF2962E50FE18E0000B9D71D /* FTJSONParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FTJSONParser.h; path = FTUtils/FTJSONParser.h; sourceTree = "<group>"; };
96   - DF2962E60FE18E0000B9D71D /* FTJSONWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FTJSONWriter.h; path = FTUtils/FTJSONWriter.h; sourceTree = "<group>"; };
97 69 DF2962E90FE18E0000B9D71D /* FTAnimationManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FTAnimationManager.m; sourceTree = "<group>"; };
98   - DF2962EA0FE18E0000B9D71D /* FTJSONParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FTJSONParser.m; sourceTree = "<group>"; };
99   - DF2962EB0FE18E0000B9D71D /* FTJSONWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FTJSONWriter.m; sourceTree = "<group>"; };
100   - DF2963170FE18F3D00B9D71D /* yajl_iphone.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = yajl_iphone.xcodeproj; path = Support/yajl/yajl_iphone/yajl_iphone.xcodeproj; sourceTree = SOURCE_ROOT; };
101 70 DF6D06470FE1A6F200CC44C6 /* README.mdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.mdown; sourceTree = "<group>"; };
102 71 DFE4EF0B1035CBCB006A7598 /* UnitTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UnitTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
103 72 DFE4EF0C1035CBCB006A7598 /* UnitTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "UnitTests-Info.plist"; sourceTree = "<group>"; };
@@ -112,7 +81,6 @@
112 81 isa = PBXFrameworksBuildPhase;
113 82 buildActionMask = 2147483647;
114 83 files = (
115   - DF29631F0FE18F3F00B9D71D /* libyajl_iphone.a in Frameworks */,
116 84 DF287AAE0FE19638001E9F62 /* CoreGraphics.framework in Frameworks */,
117 85 DF287AAF0FE19638001E9F62 /* Foundation.framework in Frameworks */,
118 86 DF287AB00FE19638001E9F62 /* QuartzCore.framework in Frameworks */,
@@ -129,7 +97,6 @@
129 97 DFE4EFE41035CCCD006A7598 /* QuartzCore.framework in Frameworks */,
130 98 DFE4EFE51035CCCD006A7598 /* UIKit.framework in Frameworks */,
131 99 DFE4EF141035CC4D006A7598 /* OCMock.framework in Frameworks */,
132   - DFF7F0641035CE440067ED5B /* libyajl_iphone.a in Frameworks */,
133 100 );