Browse Source

Removing Appentive. :(

v1.2.1 v1.2
Abhishek Banthia 9 years ago
parent
commit
8bf5cd08bb
  1. 114
      Clocker.xcodeproj/project.pbxproj
  2. BIN
      Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate
  3. 28
      Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  4. 4
      Clocker/AboutUsWindow/CLAboutUsViewController.m
  5. 6
      Clocker/ApplicationDelegate.m
  6. 939
      Clocker/ApptentiveConnect/ApptentiveConnect/ApptentiveConnect.xcodeproj/project.pbxproj
  7. 7
      Clocker/ApptentiveConnect/ApptentiveConnect/ApptentiveConnect.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  8. BIN
      Clocker/ApptentiveConnect/ApptentiveConnect/ApptentiveConnect.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate
  9. 80
      Clocker/ApptentiveConnect/ApptentiveConnect/ApptentiveConnect.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/ApptentiveConnect.xcscheme
  10. 80
      Clocker/ApptentiveConnect/ApptentiveConnect/ApptentiveConnect.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/ApptentiveUnitTests.xcscheme
  11. 32
      Clocker/ApptentiveConnect/ApptentiveConnect/ApptentiveConnect.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/xcschememanagement.plist
  12. 4
      Clocker/ApptentiveConnect/ApptentiveConnect/source/Controllers/ATFeedbackWindowController.m
  13. 21
      Clocker/ApptentiveConnect/apptentive-ios/.gitignore
  14. 1328
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/ApptentiveConnect.xcodeproj/project.pbxproj
  15. 7
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/ApptentiveConnect.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  16. 85
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/ApptentiveConnect.xcodeproj/xcshareddata/xcschemes/ApptentiveConnect.xcscheme
  17. 75
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/ApptentiveConnect.xcodeproj/xcshareddata/xcschemes/ApptentiveResources.xcscheme
  18. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/Checkmark.opacity
  19. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/button_shadow_overlay.psd
  20. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/button_shadow_overlay@2x.psd
  21. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/camera icon button
  22. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/camera icon.opacity
  23. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/camera icon.png
  24. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/cancel_bg.psd
  25. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_apptentive_icon_small.png
  26. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_apptentive_icon_small@2x.png
  27. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_button_shadow_overlay.png
  28. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_button_shadow_overlay@2x.png
  29. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_cancel_bg.png
  30. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_cancel_bg@2x.png
  31. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_cancel_highlighted_bg.png
  32. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_cancel_highlighted_bg@2x.png
  33. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_checkmark.png
  34. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_checkmark@2x.png
  35. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_dialog_paper_bg.png
  36. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_dialog_paper_bg@2x.png
  37. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_dotted_red_line.png
  38. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_dotted_red_line@2x.png
  39. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_gray_line.png
  40. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_gray_line@2x.png
  41. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_logo_info.png
  42. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_logo_info@2x.png
  43. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_paperclip_background.png
  44. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_paperclip_background@2x.png
  45. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_paperclip_foreground.png
  46. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_paperclip_foreground@2x.png
  47. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_photo.png
  48. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_photo@2x.png
  49. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_send_bg.png
  50. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_send_bg@2x.png
  51. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_send_disabled_bg.png
  52. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_send_disabled_bg@2x.png
  53. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_send_highlighted_bg.png
  54. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_send_highlighted_bg@2x.png
  55. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/placard.opacity
  56. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/popup.opacity
  57. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/send_bg.psd
  58. 33
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/ext/NSData+ATBase64.h
  59. 300
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/ext/NSData+ATBase64.m
  60. 389
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/ext/PrefixedJSONKit/CHANGELOG.md
  61. 260
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/ext/PrefixedJSONKit/PJSONKit.h
  62. 3084
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/ext/PrefixedJSONKit/PJSONKit.m
  63. 316
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/ext/PrefixedJSONKit/README.md
  64. 8
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/resources/ApptentiveResources/Info.plist
  65. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/resources/localization/English.lproj/Localizable.strings
  66. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/resources/localization/de.lproj/Localizable.strings
  67. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/resources/localization/es.lproj/Localizable.strings
  68. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/resources/localization/ja.lproj/Localizable.strings
  69. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/resources/localization/pt.lproj/Localizable.strings
  70. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/resources/localization/ru.lproj/Localizable.strings
  71. BIN
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/resources/localization/zh-Hans.lproj/Localizable.strings
  72. 95
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/ATConnect.h
  73. 206
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/ATConnect.m
  74. 13
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/ATConnect_Private.h
  75. 8
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/ApptentiveConnect-Prefix.pch
  76. 66
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Controllers/ATFeedbackController.h
  77. 1069
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Controllers/ATFeedbackController.m
  78. 12
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Controllers/ATFeedbackTypes.h
  79. 30
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Controllers/ATInfoViewController.h
  80. 274
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Controllers/ATInfoViewController.m
  81. 16
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Controllers/ATLogViewController.h
  82. 69
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Controllers/ATLogViewController.m
  83. 18
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATCenteringImageScrollView.h
  84. 53
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATCenteringImageScrollView.m
  85. 29
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATCustomButton.h
  86. 125
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATCustomButton.m
  87. 18
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATDefaultTextView.h
  88. 103
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATDefaultTextView.m
  89. 28
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATHUDView.h
  90. 191
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATHUDView.m
  91. 18
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATShadowView.h
  92. 107
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATShadowView.m
  93. 46
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATSimpleImageViewController.h
  94. 272
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATSimpleImageViewController.m
  95. 14
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATToolbar.h
  96. 88
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATToolbar.m
  97. 25
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Metrics/ATFeedbackMetrics.h
  98. 15
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Metrics/ATFeedbackMetrics.m
  99. 22
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Metrics/ATMetric.h
  100. 93
      Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Metrics/ATMetric.m
  101. Some files were not shown because too many files have changed in this diff Show More

114
Clocker.xcodeproj/project.pbxproj

@ -14,7 +14,6 @@
9A392EED1C1CE9950072C10A /* CLPreferencesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A392EEB1C1CE9950072C10A /* CLPreferencesViewController.m */; };
9A392EEE1C1CE9950072C10A /* CLPreferencesView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9A392EEC1C1CE9950072C10A /* CLPreferencesView.xib */; };
9A4379251BEC223900F4E27F /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A4379211BEC223900F4E27F /* Security.framework */; };
9A4379261BEC223900F4E27F /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A4379221BEC223900F4E27F /* SystemConfiguration.framework */; };
9A4379271BEC223900F4E27F /* Fabric.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A4379231BEC223900F4E27F /* Fabric.framework */; };
9A43792A1BEC230A00F4E27F /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A4379291BEC230A00F4E27F /* libc++.tbd */; };
9A43792C1BEC231100F4E27F /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A43792B1BEC231100F4E27F /* libz.tbd */; };
@ -25,7 +24,6 @@
9A5951BD1C1D0A8D009C17AA /* CommonStrings.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A5951BB1C1D0A8D009C17AA /* CommonStrings.m */; };
9A5951C01C1D0AA0009C17AA /* CLOneWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A5951BE1C1D0AA0009C17AA /* CLOneWindowController.m */; };
9A5951C21C1D0AAD009C17AA /* CLOneWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9A5951C11C1D0AAD009C17AA /* CLOneWindow.xib */; };
9A5951EB1C1D1EAB009C17AA /* ApptentiveConnect.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A5951E81C1D1E92009C17AA /* ApptentiveConnect.framework */; };
9A5951EC1C1D1EB4009C17AA /* ApptentiveConnect.framework in Resources */ = {isa = PBXBuildFile; fileRef = 9A5951D11C1D1D94009C17AA /* ApptentiveConnect.framework */; };
9A5951F51C1D3D81009C17AA /* CLTimezoneCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A5951F41C1D3D81009C17AA /* CLTimezoneCellView.m */; };
9A5951FA1C1D5214009C17AA /* iVersion.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A5951F91C1D5214009C17AA /* iVersion.m */; };
@ -58,41 +56,6 @@
remoteGlobalIDString = 49626B6D13942A2B0093534C;
remoteInfo = ApptentiveUnitTests;
};
9A5951DC1C1D1E35009C17AA /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 9A5951D61C1D1E35009C17AA /* ApptentiveConnect.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 496DC37F1333D35600743F65;
remoteInfo = ApptentiveConnect;
};
9A5951DE1C1D1E35009C17AA /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 9A5951D61C1D1E35009C17AA /* ApptentiveConnect.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 496DC38C1333D35600743F65;
remoteInfo = ApptentiveConnectTests;
};
9A5951E01C1D1E35009C17AA /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 9A5951D61C1D1E35009C17AA /* ApptentiveConnect.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 49D1118C13341A7C00603373;
remoteInfo = ApptentiveResources;
};
9A5951E71C1D1E92009C17AA /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 9A5951E21C1D1E91009C17AA /* ApptentiveConnect.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 8DC2EF5B0486A6940098B216;
remoteInfo = ApptentiveConnect;
};
9A5951E91C1D1E92009C17AA /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 9A5951E21C1D1E91009C17AA /* ApptentiveConnect.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 49626B6D13942A2B0093534C;
remoteInfo = ApptentiveUnitTests;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
@ -106,7 +69,6 @@
9A392EEB1C1CE9950072C10A /* CLPreferencesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CLPreferencesViewController.m; path = Clocker/Preferences/CLPreferencesViewController.m; sourceTree = "<group>"; };
9A392EEC1C1CE9950072C10A /* CLPreferencesView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = CLPreferencesView.xib; path = Clocker/Preferences/CLPreferencesView.xib; sourceTree = "<group>"; };
9A4379211BEC223900F4E27F /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Security.framework; sourceTree = "<group>"; };
9A4379221BEC223900F4E27F /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = SystemConfiguration.framework; sourceTree = "<group>"; };
9A4379231BEC223900F4E27F /* Fabric.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Fabric.framework; sourceTree = "<group>"; };
9A4379291BEC230A00F4E27F /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
9A43792B1BEC231100F4E27F /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
@ -121,9 +83,6 @@
9A5951C11C1D0AAD009C17AA /* CLOneWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = CLOneWindow.xib; path = Clocker/CLOneWindow/CLOneWindow.xib; sourceTree = "<group>"; };
9A5951C71C1D1B6F009C17AA /* ApptentiveConnect.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ApptentiveConnect.xcodeproj; path = Clocker/ApptentiveConnect/ApptentiveConnect.xcodeproj; sourceTree = "<group>"; };
9A5951D11C1D1D94009C17AA /* ApptentiveConnect.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApptentiveConnect.framework; path = Clocker/ApptentiveConnect/ApptentiveConnect.framework; sourceTree = "<group>"; };
9A5951D41C1D1E1D009C17AA /* apptentive-ios */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "apptentive-ios"; path = "Clocker/ApptentiveConnect/apptentive-ios"; sourceTree = "<group>"; };
9A5951D61C1D1E35009C17AA /* ApptentiveConnect.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ApptentiveConnect.xcodeproj; path = "Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/ApptentiveConnect.xcodeproj"; sourceTree = "<group>"; };
9A5951E21C1D1E91009C17AA /* ApptentiveConnect.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ApptentiveConnect.xcodeproj; path = Clocker/ApptentiveConnect/ApptentiveConnect/ApptentiveConnect.xcodeproj; sourceTree = "<group>"; };
9A5951F31C1D3D81009C17AA /* CLTimezoneCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CLTimezoneCellView.h; path = "Clocker/Custom Table Cell Views/CLTimezoneCellView.h"; sourceTree = "<group>"; };
9A5951F41C1D3D81009C17AA /* CLTimezoneCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CLTimezoneCellView.m; path = "Clocker/Custom Table Cell Views/CLTimezoneCellView.m"; sourceTree = "<group>"; };
9A5951F81C1D5214009C17AA /* iVersion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = iVersion.h; path = "Clocker/Updated Version/iVersion.h"; sourceTree = "<group>"; };
@ -153,8 +112,6 @@
DD4F7C0413C30F9F00825C6E /* Clocker.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Clocker.app; sourceTree = BUILT_PRODUCTS_DIR; };
DD4F7C0813C30F9F00825C6E /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
DD4F7C0B13C30F9F00825C6E /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
DD4F7C0C13C30F9F00825C6E /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
DD4F7C0D13C30F9F00825C6E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -162,13 +119,11 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
9A5951EB1C1D1EAB009C17AA /* ApptentiveConnect.framework in Frameworks */,
9AC678E41C1ABAB9003B4F6B /* QuartzCore.framework in Frameworks */,
9A43792C1BEC231100F4E27F /* libz.tbd in Frameworks */,
9A5951BA1C1D0A22009C17AA /* Crashlytics.framework in Frameworks */,
9A43792A1BEC230A00F4E27F /* libc++.tbd in Frameworks */,
9A4379251BEC223900F4E27F /* Security.framework in Frameworks */,
9A4379261BEC223900F4E27F /* SystemConfiguration.framework in Frameworks */,
DD4F7C0913C30F9F00825C6E /* Cocoa.framework in Frameworks */,
9A4379271BEC223900F4E27F /* Fabric.framework in Frameworks */,
);
@ -216,25 +171,6 @@
name = Products;
sourceTree = "<group>";
};
9A5951D71C1D1E35009C17AA /* Products */ = {
isa = PBXGroup;
children = (
9A5951DD1C1D1E35009C17AA /* libApptentiveConnect.a */,
9A5951DF1C1D1E35009C17AA /* ApptentiveConnectTests.octest */,
9A5951E11C1D1E35009C17AA /* ApptentiveResources.bundle */,
);
name = Products;
sourceTree = "<group>";
};
9A5951E31C1D1E91009C17AA /* Products */ = {
isa = PBXGroup;
children = (
9A5951E81C1D1E92009C17AA /* ApptentiveConnect.framework */,
9A5951EA1C1D1E92009C17AA /* ApptentiveUnitTests.octest */,
);
name = Products;
sourceTree = "<group>";
};
9A5951F01C1D3D35009C17AA /* Table Cell Views */ = {
isa = PBXGroup;
children = (
@ -331,7 +267,6 @@
DD4F7C0713C30F9F00825C6E /* Frameworks */,
9A5951FB1C1D5222009C17AA /* Check for Updated Version */,
DD4F7C0513C30F9F00825C6E /* Products */,
9A5951E21C1D1E91009C17AA /* ApptentiveConnect.xcodeproj */,
9A25F7481C1A5E21007D369B /* Rate */,
);
sourceTree = "<group>";
@ -347,20 +282,15 @@
DD4F7C0713C30F9F00825C6E /* Frameworks */ = {
isa = PBXGroup;
children = (
9A5951D61C1D1E35009C17AA /* ApptentiveConnect.xcodeproj */,
9A5951D41C1D1E1D009C17AA /* apptentive-ios */,
9A5951D11C1D1D94009C17AA /* ApptentiveConnect.framework */,
9A5951C71C1D1B6F009C17AA /* ApptentiveConnect.xcodeproj */,
9A5951B91C1D0A22009C17AA /* Crashlytics.framework */,
9AC678E31C1ABAB9003B4F6B /* QuartzCore.framework */,
9A4379211BEC223900F4E27F /* Security.framework */,
9A4379221BEC223900F4E27F /* SystemConfiguration.framework */,
9A4379231BEC223900F4E27F /* Fabric.framework */,
9A43792B1BEC231100F4E27F /* libz.tbd */,
9A4379291BEC230A00F4E27F /* libc++.tbd */,
DD4F7C0B13C30F9F00825C6E /* AppKit.framework */,
DD4F7C0C13C30F9F00825C6E /* CoreData.framework */,
DD4F7C0D13C30F9F00825C6E /* Foundation.framework */,
DD4F7C0813C30F9F00825C6E /* Cocoa.framework */,
);
name = Frameworks;
@ -421,14 +351,6 @@
ProductGroup = 9A5951C81C1D1B6F009C17AA /* Products */;
ProjectRef = 9A5951C71C1D1B6F009C17AA /* ApptentiveConnect.xcodeproj */;
},
{
ProductGroup = 9A5951D71C1D1E35009C17AA /* Products */;
ProjectRef = 9A5951D61C1D1E35009C17AA /* ApptentiveConnect.xcodeproj */;
},
{
ProductGroup = 9A5951E31C1D1E91009C17AA /* Products */;
ProjectRef = 9A5951E21C1D1E91009C17AA /* ApptentiveConnect.xcodeproj */;
},
);
projectRoot = "";
targets = (
@ -452,41 +374,6 @@
remoteRef = 9A5951CE1C1D1B6F009C17AA /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
9A5951DD1C1D1E35009C17AA /* libApptentiveConnect.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libApptentiveConnect.a;
remoteRef = 9A5951DC1C1D1E35009C17AA /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
9A5951DF1C1D1E35009C17AA /* ApptentiveConnectTests.octest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = ApptentiveConnectTests.octest;
remoteRef = 9A5951DE1C1D1E35009C17AA /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
9A5951E11C1D1E35009C17AA /* ApptentiveResources.bundle */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = ApptentiveResources.bundle;
remoteRef = 9A5951E01C1D1E35009C17AA /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
9A5951E81C1D1E92009C17AA /* ApptentiveConnect.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = ApptentiveConnect.framework;
remoteRef = 9A5951E71C1D1E92009C17AA /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
9A5951EA1C1D1E92009C17AA /* ApptentiveUnitTests.octest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = ApptentiveUnitTests.octest;
remoteRef = 9A5951E91C1D1E92009C17AA /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
@ -705,6 +592,7 @@
GCC_PREFIX_HEADER = "Clocker/Clocker-Prefix.pch";
INFOPLIST_FILE = "Clocker/Clocker-Info.plist";
MACOSX_DEPLOYMENT_TARGET = 10.10;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"-ObjC",
"-all_load",

BIN
Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate generated

Binary file not shown.

28
Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@ -2,32 +2,4 @@
<Bucket
type = "1"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
scope = "0"
stopOnStyle = "0">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Clocker/Updated Version/iVersion.m"
timestampString = "471684604.922529"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1143"
endingLineNumber = "1143"
landmarkName = "-didDismissAlert:withButtonAtIndex:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>

4
Clocker/AboutUsWindow/CLAboutUsViewController.m

@ -7,7 +7,6 @@
//
#import "CLAboutUsViewController.h"
#import <ApptentiveConnect/ATConnect.h>
@interface CLAboutUsViewController ()
@ -39,8 +38,7 @@ NSString *const CLFacebookPageURL = @"https://www.facebook.com/ClockerMenubarClo
- (IBAction)reportIssue:(id)sender
{
//
ATConnect *connection = [ATConnect sharedConnection];
[connection showFeedbackWindow:sender];
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:CLIssueURL]];
}
- (IBAction)openFacebookPage:(id)sender

6
Clocker/ApplicationDelegate.m

@ -31,7 +31,6 @@
#import "iRate.h"
#import "CommonStrings.h"
#import "iVersion.h"
#import <ApptentiveConnect/ATConnect.h>
@implementation ApplicationDelegate
@ -71,10 +70,7 @@ void *kContextActivePanel = &kContextActivePanel;
#pragma mark - NSApplicationDelegate
- (void)applicationDidFinishLaunching:(NSNotification *)notification
{
ATConnect *connection = [ATConnect sharedConnection];
connection.apiKey = @"b9bff3e37b738748b671a751f09fea3a419661bac3e6e11fa5e854b463db3ba0";
{
NSArray *defaultPreference = [[NSUserDefaults standardUserDefaults] objectForKey:CLDefaultPreferenceKey];
NSMutableArray *newDefaults = [[NSMutableArray alloc] init];

939
Clocker/ApptentiveConnect/ApptentiveConnect/ApptentiveConnect.xcodeproj/project.pbxproj

@ -1,939 +0,0 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
491CA39015F019E20003BC38 /* PJSONKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 491CA38E15F019E20003BC38 /* PJSONKit.h */; };
491CA39115F019E20003BC38 /* PJSONKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 491CA38F15F019E20003BC38 /* PJSONKit.m */; };
491CA39215F019E20003BC38 /* PJSONKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 491CA38F15F019E20003BC38 /* PJSONKit.m */; };
491CA3B515F029630003BC38 /* ATPlaceholderTextView.h in Headers */ = {isa = PBXBuildFile; fileRef = 491CA3B315F029630003BC38 /* ATPlaceholderTextView.h */; };
491CA3B615F029630003BC38 /* ATPlaceholderTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 491CA3B415F029630003BC38 /* ATPlaceholderTextView.m */; };
491CA3B715F029630003BC38 /* ATPlaceholderTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 491CA3B415F029630003BC38 /* ATPlaceholderTextView.m */; };
491CA3BB15F0663C0003BC38 /* at_logo_info@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 491CA3BA15F0663C0003BC38 /* at_logo_info@2x.png */; };
49598DBC15C62F1B00DF4ABD /* ATAppConfigurationUpdateTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 49598DBA15C62F1B00DF4ABD /* ATAppConfigurationUpdateTask.h */; };
49598DBD15C62F1B00DF4ABD /* ATAppConfigurationUpdateTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 49598DBB15C62F1B00DF4ABD /* ATAppConfigurationUpdateTask.m */; };
49598DBE15C62F1B00DF4ABD /* ATAppConfigurationUpdateTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 49598DBB15C62F1B00DF4ABD /* ATAppConfigurationUpdateTask.m */; };
49626B7913942A7E0093534C /* ApptentiveConnect.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* ApptentiveConnect.framework */; };
49626B7E13942A9A0093534C /* ATSampleTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 49626B7D13942A9A0093534C /* ATSampleTest.m */; };
49626C36139437070093534C /* ATAPIRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 49626C2B139437070093534C /* ATAPIRequest.h */; };
49626C37139437070093534C /* ATAPIRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 49626C2C139437070093534C /* ATAPIRequest.m */; };
49626C38139437070093534C /* ATConnectionChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 49626C2D139437070093534C /* ATConnectionChannel.h */; };
49626C39139437070093534C /* ATConnectionChannel.m in Sources */ = {isa = PBXBuildFile; fileRef = 49626C2E139437070093534C /* ATConnectionChannel.m */; };
49626C3A139437070093534C /* ATConnectionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 49626C2F139437070093534C /* ATConnectionManager.h */; };
49626C3B139437070093534C /* ATConnectionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 49626C30139437070093534C /* ATConnectionManager.m */; };
49626C3C139437070093534C /* ATURLConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 49626C31139437070093534C /* ATURLConnection.h */; };
49626C3D139437070093534C /* ATURLConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 49626C32139437070093534C /* ATURLConnection.m */; };
49626C3E139437070093534C /* ATURLConnection_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 49626C33139437070093534C /* ATURLConnection_Private.h */; };
49626C3F139437070093534C /* ATWebClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 49626C34139437070093534C /* ATWebClient.h */; };
49626C40139437070093534C /* ATWebClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 49626C35139437070093534C /* ATWebClient.m */; };
49626C46139437580093534C /* NSData+ATBase64.h in Headers */ = {isa = PBXBuildFile; fileRef = 49626C44139437580093534C /* NSData+ATBase64.h */; };
49626C47139437580093534C /* NSData+ATBase64.m in Sources */ = {isa = PBXBuildFile; fileRef = 49626C45139437580093534C /* NSData+ATBase64.m */; };
49626C58139437690093534C /* ATUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 49626C56139437690093534C /* ATUtilities.h */; };
49626C59139437690093534C /* ATUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 49626C57139437690093534C /* ATUtilities.m */; };
49626C67139437DD0093534C /* ATConnect.h in Headers */ = {isa = PBXBuildFile; fileRef = 49626C65139437DD0093534C /* ATConnect.h */; settings = {ATTRIBUTES = (Public, ); }; };
49626C68139437DD0093534C /* ATConnect.m in Sources */ = {isa = PBXBuildFile; fileRef = 49626C66139437DD0093534C /* ATConnect.m */; };
49626C7A139439050093534C /* ATBackend.h in Headers */ = {isa = PBXBuildFile; fileRef = 49626C72139439050093534C /* ATBackend.h */; };
49626C7B139439050093534C /* ATBackend.m in Sources */ = {isa = PBXBuildFile; fileRef = 49626C73139439050093534C /* ATBackend.m */; };
49626C7C139439050093534C /* ATContactStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 49626C74139439050093534C /* ATContactStorage.h */; };
49626C7D139439050093534C /* ATContactStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 49626C75139439050093534C /* ATContactStorage.m */; };
49626C80139439050093534C /* ATFeedback.h in Headers */ = {isa = PBXBuildFile; fileRef = 49626C78139439050093534C /* ATFeedback.h */; };
49626C81139439050093534C /* ATFeedback.m in Sources */ = {isa = PBXBuildFile; fileRef = 49626C79139439050093534C /* ATFeedback.m */; };
49626C9113943C310093534C /* ATReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 49626C8F13943C310093534C /* ATReachability.h */; };
49626C9213943C310093534C /* ATReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 49626C9013943C310093534C /* ATReachability.m */; };
49626C9613943C520093534C /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 49626C9513943C520093534C /* SystemConfiguration.framework */; };
49626D19139444C20093534C /* ATFeedbackTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 49626D13139444C20093534C /* ATFeedbackTask.h */; };
49626D1A139444C20093534C /* ATFeedbackTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 49626D14139444C20093534C /* ATFeedbackTask.m */; };
49626D1B139444C20093534C /* ATTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 49626D15139444C20093534C /* ATTask.h */; };
49626D1C139444C20093534C /* ATTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 49626D16139444C20093534C /* ATTask.m */; };
49626D1D139444C20093534C /* ATTaskQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 49626D17139444C20093534C /* ATTaskQueue.h */; };
49626D1E139444C20093534C /* ATTaskQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 49626D18139444C20093534C /* ATTaskQueue.m */; };
49626D4F1397047A0093534C /* ATFeedbackWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 49626D4E1397047A0093534C /* ATFeedbackWindow.xib */; };
49626D53139704D00093534C /* ATFeedbackWindowController.h in Headers */ = {isa = PBXBuildFile; fileRef = 49626D51139704D00093534C /* ATFeedbackWindowController.h */; };
49626D54139704D00093534C /* ATFeedbackWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 49626D52139704D00093534C /* ATFeedbackWindowController.m */; };
4964BF2E17C5D12B000DC2E8 /* ATStaticLibraryBootstrap.h in Headers */ = {isa = PBXBuildFile; fileRef = 4964BF2C17C5D12B000DC2E8 /* ATStaticLibraryBootstrap.h */; };
4964BF2F17C5D12B000DC2E8 /* ATStaticLibraryBootstrap.m in Sources */ = {isa = PBXBuildFile; fileRef = 4964BF2D17C5D12B000DC2E8 /* ATStaticLibraryBootstrap.m */; };
4964BF3017C5D12B000DC2E8 /* ATStaticLibraryBootstrap.m in Sources */ = {isa = PBXBuildFile; fileRef = 4964BF2D17C5D12B000DC2E8 /* ATStaticLibraryBootstrap.m */; };
4964BF3417C5D13F000DC2E8 /* ATLog.h in Headers */ = {isa = PBXBuildFile; fileRef = 4964BF3117C5D13E000DC2E8 /* ATLog.h */; };
4964BF3517C5D13F000DC2E8 /* ATLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 4964BF3217C5D13F000DC2E8 /* ATLogger.h */; };
4964BF3617C5D13F000DC2E8 /* ATLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 4964BF3317C5D13F000DC2E8 /* ATLogger.m */; };
4964BF3717C5D13F000DC2E8 /* ATLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 4964BF3317C5D13F000DC2E8 /* ATLogger.m */; };
4964BF3917C5D2A8000DC2E8 /* ATURLConnection_Private.m in Sources */ = {isa = PBXBuildFile; fileRef = 4964BF3817C5D2A8000DC2E8 /* ATURLConnection_Private.m */; };
4964BF3A17C5D2A8000DC2E8 /* ATURLConnection_Private.m in Sources */ = {isa = PBXBuildFile; fileRef = 4964BF3817C5D2A8000DC2E8 /* ATURLConnection_Private.m */; };
4964BF3D17C5D2B5000DC2E8 /* ATWebClient_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 4964BF3B17C5D2B5000DC2E8 /* ATWebClient_Private.h */; };
4964BF3E17C5D2B5000DC2E8 /* ATWebClient_Private.m in Sources */ = {isa = PBXBuildFile; fileRef = 4964BF3C17C5D2B5000DC2E8 /* ATWebClient_Private.m */; };
4964BF3F17C5D2B5000DC2E8 /* ATWebClient_Private.m in Sources */ = {isa = PBXBuildFile; fileRef = 4964BF3C17C5D2B5000DC2E8 /* ATWebClient_Private.m */; };
4971AFF513BA871600774B70 /* ATImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 4971AFF313BA871600774B70 /* ATImageView.h */; };
4971AFF613BA871600774B70 /* ATImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4971AFF413BA871600774B70 /* ATImageView.m */; };
4971B07913BAB12F00774B70 /* ATConnect_FeedbackWindowPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 4971B07713BAB12F00774B70 /* ATConnect_FeedbackWindowPrivate.h */; };
4971B07A13BAB12F00774B70 /* ATConnect_FeedbackWindowPrivate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4971B07813BAB12F00774B70 /* ATConnect_FeedbackWindowPrivate.m */; };
4971B47413BFBB7C00774B70 /* at_logo_info.png in Resources */ = {isa = PBXBuildFile; fileRef = 4971B47313BFBB7C00774B70 /* at_logo_info.png */; };
4971B4CB13BFBEFF00774B70 /* ATImageButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 4971B4C913BFBEFF00774B70 /* ATImageButton.h */; };
4971B4CC13BFBEFF00774B70 /* ATImageButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 4971B4CA13BFBEFF00774B70 /* ATImageButton.m */; };
4972847713CA625D002AD591 /* ATAppRatingFlow.h in Headers */ = {isa = PBXBuildFile; fileRef = 4972847513CA625D002AD591 /* ATAppRatingFlow.h */; settings = {ATTRIBUTES = (Public, ); }; };
4972847813CA625D002AD591 /* ATAppRatingFlow.m in Sources */ = {isa = PBXBuildFile; fileRef = 4972847613CA625D002AD591 /* ATAppRatingFlow.m */; };
4982FE74157C0BEF00A1ED63 /* ApptentiveMetrics.h in Headers */ = {isa = PBXBuildFile; fileRef = 4982FE69157C0BEF00A1ED63 /* ApptentiveMetrics.h */; };
4982FE75157C0BEF00A1ED63 /* ApptentiveMetrics.m in Sources */ = {isa = PBXBuildFile; fileRef = 4982FE6A157C0BEF00A1ED63 /* ApptentiveMetrics.m */; };
4982FE76157C0BEF00A1ED63 /* ApptentiveMetrics.m in Sources */ = {isa = PBXBuildFile; fileRef = 4982FE6A157C0BEF00A1ED63 /* ApptentiveMetrics.m */; };
4982FE77157C0BEF00A1ED63 /* ATFeedbackMetrics.h in Headers */ = {isa = PBXBuildFile; fileRef = 4982FE6B157C0BEF00A1ED63 /* ATFeedbackMetrics.h */; };
4982FE78157C0BEF00A1ED63 /* ATFeedbackMetrics.m in Sources */ = {isa = PBXBuildFile; fileRef = 4982FE6C157C0BEF00A1ED63 /* ATFeedbackMetrics.m */; };
4982FE79157C0BEF00A1ED63 /* ATFeedbackMetrics.m in Sources */ = {isa = PBXBuildFile; fileRef = 4982FE6C157C0BEF00A1ED63 /* ATFeedbackMetrics.m */; };
4982FE7A157C0BEF00A1ED63 /* ATMetric.h in Headers */ = {isa = PBXBuildFile; fileRef = 4982FE6D157C0BEF00A1ED63 /* ATMetric.h */; };
4982FE7B157C0BEF00A1ED63 /* ATMetric.m in Sources */ = {isa = PBXBuildFile; fileRef = 4982FE6E157C0BEF00A1ED63 /* ATMetric.m */; };
4982FE7C157C0BEF00A1ED63 /* ATMetric.m in Sources */ = {isa = PBXBuildFile; fileRef = 4982FE6E157C0BEF00A1ED63 /* ATMetric.m */; };
4982FE7D157C0BEF00A1ED63 /* ATSurveyMetrics.h in Headers */ = {isa = PBXBuildFile; fileRef = 4982FE6F157C0BEF00A1ED63 /* ATSurveyMetrics.h */; };
4982FE7E157C0BEF00A1ED63 /* ATSurveyMetrics.m in Sources */ = {isa = PBXBuildFile; fileRef = 4982FE70157C0BEF00A1ED63 /* ATSurveyMetrics.m */; };
4982FE7F157C0BEF00A1ED63 /* ATSurveyMetrics.m in Sources */ = {isa = PBXBuildFile; fileRef = 4982FE70157C0BEF00A1ED63 /* ATSurveyMetrics.m */; };
4982FE80157C0BEF00A1ED63 /* ATWebClient+Metrics.h in Headers */ = {isa = PBXBuildFile; fileRef = 4982FE72157C0BEF00A1ED63 /* ATWebClient+Metrics.h */; };
4982FE81157C0BEF00A1ED63 /* ATWebClient+Metrics.m in Sources */ = {isa = PBXBuildFile; fileRef = 4982FE73157C0BEF00A1ED63 /* ATWebClient+Metrics.m */; };
4982FE82157C0BEF00A1ED63 /* ATWebClient+Metrics.m in Sources */ = {isa = PBXBuildFile; fileRef = 4982FE73157C0BEF00A1ED63 /* ATWebClient+Metrics.m */; };
4982FE86157C0C2700A1ED63 /* ATAppConfigurationUpdater.h in Headers */ = {isa = PBXBuildFile; fileRef = 4982FE84157C0C2700A1ED63 /* ATAppConfigurationUpdater.h */; };
4982FE87157C0C2700A1ED63 /* ATAppConfigurationUpdater.m in Sources */ = {isa = PBXBuildFile; fileRef = 4982FE85157C0C2700A1ED63 /* ATAppConfigurationUpdater.m */; };
4982FE88157C0C2700A1ED63 /* ATAppConfigurationUpdater.m in Sources */ = {isa = PBXBuildFile; fileRef = 4982FE85157C0C2700A1ED63 /* ATAppConfigurationUpdater.m */; };
4982FE8D157C0C3D00A1ED63 /* ATAppRatingFlow_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 4982FE89157C0C3D00A1ED63 /* ATAppRatingFlow_Private.h */; };
4982FE8E157C0C3D00A1ED63 /* ATAppRatingFlow_Private.m in Sources */ = {isa = PBXBuildFile; fileRef = 4982FE8A157C0C3D00A1ED63 /* ATAppRatingFlow_Private.m */; };
4982FE8F157C0C3D00A1ED63 /* ATAppRatingFlow_Private.m in Sources */ = {isa = PBXBuildFile; fileRef = 4982FE8A157C0C3D00A1ED63 /* ATAppRatingFlow_Private.m */; };
4982FE90157C0C3D00A1ED63 /* ATAppRatingMetrics.h in Headers */ = {isa = PBXBuildFile; fileRef = 4982FE8B157C0C3D00A1ED63 /* ATAppRatingMetrics.h */; };
4982FE91157C0C3D00A1ED63 /* ATAppRatingMetrics.m in Sources */ = {isa = PBXBuildFile; fileRef = 4982FE8C157C0C3D00A1ED63 /* ATAppRatingMetrics.m */; };
4982FE92157C0C3D00A1ED63 /* ATAppRatingMetrics.m in Sources */ = {isa = PBXBuildFile; fileRef = 4982FE8C157C0C3D00A1ED63 /* ATAppRatingMetrics.m */; };
4982FE94157C0C4D00A1ED63 /* ATWebClient_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 4982FE93157C0C4D00A1ED63 /* ATWebClient_Private.h */; };
4982FE97157C0C5A00A1ED63 /* ATRecord.h in Headers */ = {isa = PBXBuildFile; fileRef = 4982FE95157C0C5A00A1ED63 /* ATRecord.h */; };
4982FE98157C0C5A00A1ED63 /* ATRecord.m in Sources */ = {isa = PBXBuildFile; fileRef = 4982FE96157C0C5A00A1ED63 /* ATRecord.m */; };
4982FE99157C0C5A00A1ED63 /* ATRecord.m in Sources */ = {isa = PBXBuildFile; fileRef = 4982FE96157C0C5A00A1ED63 /* ATRecord.m */; };
4982FE9C157C0C6700A1ED63 /* ATRecordTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 4982FE9A157C0C6700A1ED63 /* ATRecordTask.h */; };
4982FE9D157C0C6700A1ED63 /* ATRecordTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 4982FE9B157C0C6700A1ED63 /* ATRecordTask.m */; };
4982FE9E157C0C6700A1ED63 /* ATRecordTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 4982FE9B157C0C6700A1ED63 /* ATRecordTask.m */; };
4989203013B539D6007967BA /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4989202F13B539D6007967BA /* AddressBook.framework */; };
4989204B13B53B04007967BA /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4989202F13B539D6007967BA /* AddressBook.framework */; };
8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; };
9A5951EF1C1D332B009C17AA /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A5951EE1C1D332B009C17AA /* QuartzCore.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
49626B7713942A760093534C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 8DC2EF4F0486A6940098B216;
remoteInfo = ApptentiveConnect;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
0867D69BFE84028FC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
089C1667FE841158C02AAC07 /* InfoPlist.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = InfoPlist.strings; path = resources/English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
32DBCF5E0370ADEE00C91783 /* ApptentiveConnect_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ApptentiveConnect_Prefix.pch; path = source/ApptentiveConnect_Prefix.pch; sourceTree = "<group>"; };
491CA38E15F019E20003BC38 /* PJSONKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PJSONKit.h; path = PrefixedJSONKit/PJSONKit.h; sourceTree = "<group>"; };
491CA38F15F019E20003BC38 /* PJSONKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PJSONKit.m; path = PrefixedJSONKit/PJSONKit.m; sourceTree = "<group>"; };
491CA3B315F029630003BC38 /* ATPlaceholderTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ATPlaceholderTextView.h; path = source/Misc/ATPlaceholderTextView.h; sourceTree = "<group>"; };
491CA3B415F029630003BC38 /* ATPlaceholderTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ATPlaceholderTextView.m; path = source/Misc/ATPlaceholderTextView.m; sourceTree = "<group>"; };
491CA3BA15F0663C0003BC38 /* at_logo_info@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "at_logo_info@2x.png"; path = "../apptentive-ios/ApptentiveConnect/art/generated/at_logo_info@2x.png"; sourceTree = "<group>"; };
49598DBA15C62F1B00DF4ABD /* ATAppConfigurationUpdateTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATAppConfigurationUpdateTask.h; sourceTree = "<group>"; };
49598DBB15C62F1B00DF4ABD /* ATAppConfigurationUpdateTask.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATAppConfigurationUpdateTask.m; sourceTree = "<group>"; };
49626B6D13942A2B0093534C /* ApptentiveUnitTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ApptentiveUnitTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
49626B6E13942A2B0093534C /* ApptentiveUnitTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "ApptentiveUnitTests-Info.plist"; path = "tests/ApptentiveUnitTests-Info.plist"; sourceTree = "<group>"; };
49626B7C13942A9A0093534C /* ATSampleTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ATSampleTest.h; path = tests/ATSampleTest.h; sourceTree = "<group>"; };
49626B7D13942A9A0093534C /* ATSampleTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ATSampleTest.m; path = tests/ATSampleTest.m; sourceTree = "<group>"; };
49626C2B139437070093534C /* ATAPIRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATAPIRequest.h; sourceTree = "<group>"; };
49626C2C139437070093534C /* ATAPIRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATAPIRequest.m; sourceTree = "<group>"; };
49626C2D139437070093534C /* ATConnectionChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATConnectionChannel.h; sourceTree = "<group>"; };
49626C2E139437070093534C /* ATConnectionChannel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATConnectionChannel.m; sourceTree = "<group>"; };
49626C2F139437070093534C /* ATConnectionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATConnectionManager.h; sourceTree = "<group>"; };
49626C30139437070093534C /* ATConnectionManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATConnectionManager.m; sourceTree = "<group>"; };
49626C31139437070093534C /* ATURLConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATURLConnection.h; sourceTree = "<group>"; };
49626C32139437070093534C /* ATURLConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATURLConnection.m; sourceTree = "<group>"; };
49626C33139437070093534C /* ATURLConnection_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATURLConnection_Private.h; sourceTree = "<group>"; };
49626C34139437070093534C /* ATWebClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATWebClient.h; sourceTree = "<group>"; };
49626C35139437070093534C /* ATWebClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATWebClient.m; sourceTree = "<group>"; };
49626C44139437580093534C /* NSData+ATBase64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+ATBase64.h"; sourceTree = "<group>"; };
49626C45139437580093534C /* NSData+ATBase64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+ATBase64.m"; sourceTree = "<group>"; };
49626C56139437690093534C /* ATUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATUtilities.h; sourceTree = "<group>"; };
49626C57139437690093534C /* ATUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATUtilities.m; sourceTree = "<group>"; };
49626C65139437DD0093534C /* ATConnect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ATConnect.h; path = "../apptentive-ios/ApptentiveConnect/source/ATConnect.h"; sourceTree = SOURCE_ROOT; };
49626C66139437DD0093534C /* ATConnect.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ATConnect.m; path = "../apptentive-ios/ApptentiveConnect/source/ATConnect.m"; sourceTree = SOURCE_ROOT; };
49626C72139439050093534C /* ATBackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATBackend.h; sourceTree = "<group>"; };
49626C73139439050093534C /* ATBackend.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATBackend.m; sourceTree = "<group>"; };
49626C74139439050093534C /* ATContactStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATContactStorage.h; sourceTree = "<group>"; };
49626C75139439050093534C /* ATContactStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATContactStorage.m; sourceTree = "<group>"; };
49626C78139439050093534C /* ATFeedback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATFeedback.h; sourceTree = "<group>"; };
49626C79139439050093534C /* ATFeedback.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATFeedback.m; sourceTree = "<group>"; };
49626C8F13943C310093534C /* ATReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATReachability.h; sourceTree = "<group>"; };
49626C9013943C310093534C /* ATReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATReachability.m; sourceTree = "<group>"; };
49626C9513943C520093534C /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
49626D13139444C20093534C /* ATFeedbackTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATFeedbackTask.h; sourceTree = "<group>"; };
49626D14139444C20093534C /* ATFeedbackTask.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATFeedbackTask.m; sourceTree = "<group>"; };
49626D15139444C20093534C /* ATTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATTask.h; sourceTree = "<group>"; };
49626D16139444C20093534C /* ATTask.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATTask.m; sourceTree = "<group>"; };
49626D17139444C20093534C /* ATTaskQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATTaskQueue.h; sourceTree = "<group>"; };
49626D18139444C20093534C /* ATTaskQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATTaskQueue.m; sourceTree = "<group>"; };
49626D4E1397047A0093534C /* ATFeedbackWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ATFeedbackWindow.xib; sourceTree = "<group>"; };
49626D51139704D00093534C /* ATFeedbackWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ATFeedbackWindowController.h; path = source/Controllers/ATFeedbackWindowController.h; sourceTree = "<group>"; };
49626D52139704D00093534C /* ATFeedbackWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ATFeedbackWindowController.m; path = source/Controllers/ATFeedbackWindowController.m; sourceTree = "<group>"; };
4964BF2C17C5D12B000DC2E8 /* ATStaticLibraryBootstrap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATStaticLibraryBootstrap.h; sourceTree = "<group>"; };
4964BF2D17C5D12B000DC2E8 /* ATStaticLibraryBootstrap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATStaticLibraryBootstrap.m; sourceTree = "<group>"; };
4964BF3117C5D13E000DC2E8 /* ATLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATLog.h; sourceTree = "<group>"; };
4964BF3217C5D13F000DC2E8 /* ATLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATLogger.h; sourceTree = "<group>"; };
4964BF3317C5D13F000DC2E8 /* ATLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATLogger.m; sourceTree = "<group>"; };
4964BF3817C5D2A8000DC2E8 /* ATURLConnection_Private.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATURLConnection_Private.m; sourceTree = "<group>"; };
4964BF3B17C5D2B5000DC2E8 /* ATWebClient_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATWebClient_Private.h; sourceTree = "<group>"; };
4964BF3C17C5D2B5000DC2E8 /* ATWebClient_Private.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATWebClient_Private.m; sourceTree = "<group>"; };
4971AFF313BA871600774B70 /* ATImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ATImageView.h; path = source/Misc/ATImageView.h; sourceTree = "<group>"; };
4971AFF413BA871600774B70 /* ATImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ATImageView.m; path = source/Misc/ATImageView.m; sourceTree = "<group>"; };
4971B07713BAB12F00774B70 /* ATConnect_FeedbackWindowPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ATConnect_FeedbackWindowPrivate.h; path = source/Misc/ATConnect_FeedbackWindowPrivate.h; sourceTree = "<group>"; };
4971B07813BAB12F00774B70 /* ATConnect_FeedbackWindowPrivate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ATConnect_FeedbackWindowPrivate.m; path = source/Misc/ATConnect_FeedbackWindowPrivate.m; sourceTree = "<group>"; };
4971B47313BFBB7C00774B70 /* at_logo_info.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = at_logo_info.png; path = "../apptentive-ios/ApptentiveConnect/art/generated/at_logo_info.png"; sourceTree = SOURCE_ROOT; };
4971B4C913BFBEFF00774B70 /* ATImageButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ATImageButton.h; path = source/Misc/ATImageButton.h; sourceTree = "<group>"; };
4971B4CA13BFBEFF00774B70 /* ATImageButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ATImageButton.m; path = source/Misc/ATImageButton.m; sourceTree = "<group>"; };
4972847513CA625D002AD591 /* ATAppRatingFlow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATAppRatingFlow.h; sourceTree = "<group>"; };
4972847613CA625D002AD591 /* ATAppRatingFlow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATAppRatingFlow.m; sourceTree = "<group>"; };
4982FE69157C0BEF00A1ED63 /* ApptentiveMetrics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApptentiveMetrics.h; sourceTree = "<group>"; };
4982FE6A157C0BEF00A1ED63 /* ApptentiveMetrics.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ApptentiveMetrics.m; sourceTree = "<group>"; };
4982FE6B157C0BEF00A1ED63 /* ATFeedbackMetrics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATFeedbackMetrics.h; sourceTree = "<group>"; };
4982FE6C157C0BEF00A1ED63 /* ATFeedbackMetrics.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATFeedbackMetrics.m; sourceTree = "<group>"; };
4982FE6D157C0BEF00A1ED63 /* ATMetric.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATMetric.h; sourceTree = "<group>"; };
4982FE6E157C0BEF00A1ED63 /* ATMetric.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATMetric.m; sourceTree = "<group>"; };
4982FE6F157C0BEF00A1ED63 /* ATSurveyMetrics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATSurveyMetrics.h; sourceTree = "<group>"; };
4982FE70157C0BEF00A1ED63 /* ATSurveyMetrics.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATSurveyMetrics.m; sourceTree = "<group>"; };
4982FE72157C0BEF00A1ED63 /* ATWebClient+Metrics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ATWebClient+Metrics.h"; sourceTree = "<group>"; };
4982FE73157C0BEF00A1ED63 /* ATWebClient+Metrics.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "ATWebClient+Metrics.m"; sourceTree = "<group>"; };
4982FE84157C0C2700A1ED63 /* ATAppConfigurationUpdater.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATAppConfigurationUpdater.h; sourceTree = "<group>"; };
4982FE85157C0C2700A1ED63 /* ATAppConfigurationUpdater.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATAppConfigurationUpdater.m; sourceTree = "<group>"; };
4982FE89157C0C3D00A1ED63 /* ATAppRatingFlow_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATAppRatingFlow_Private.h; sourceTree = "<group>"; };
4982FE8A157C0C3D00A1ED63 /* ATAppRatingFlow_Private.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATAppRatingFlow_Private.m; sourceTree = "<group>"; };
4982FE8B157C0C3D00A1ED63 /* ATAppRatingMetrics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATAppRatingMetrics.h; sourceTree = "<group>"; };
4982FE8C157C0C3D00A1ED63 /* ATAppRatingMetrics.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATAppRatingMetrics.m; sourceTree = "<group>"; };
4982FE93157C0C4D00A1ED63 /* ATWebClient_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATWebClient_Private.h; sourceTree = "<group>"; };
4982FE95157C0C5A00A1ED63 /* ATRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATRecord.h; sourceTree = "<group>"; };
4982FE96157C0C5A00A1ED63 /* ATRecord.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATRecord.m; sourceTree = "<group>"; };
4982FE9A157C0C6700A1ED63 /* ATRecordTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATRecordTask.h; sourceTree = "<group>"; };
4982FE9B157C0C6700A1ED63 /* ATRecordTask.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ATRecordTask.m; sourceTree = "<group>"; };
4989202F13B539D6007967BA /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = resources/Info.plist; sourceTree = "<group>"; };
8DC2EF5B0486A6940098B216 /* ApptentiveConnect.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ApptentiveConnect.framework; sourceTree = BUILT_PRODUCTS_DIR; };
9A5951EE1C1D332B009C17AA /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
D2F7E79907B2D74100F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
49626B6A13942A2B0093534C /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
49626B7913942A7E0093534C /* ApptentiveConnect.framework in Frameworks */,
4989203013B539D6007967BA /* AddressBook.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
8DC2EF560486A6940098B216 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
9A5951EF1C1D332B009C17AA /* QuartzCore.framework in Frameworks */,
8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */,
49626C9613943C520093534C /* SystemConfiguration.framework in Frameworks */,
4989204B13B53B04007967BA /* AddressBook.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
034768DFFF38A50411DB9C8B /* Products */ = {
isa = PBXGroup;
children = (
8DC2EF5B0486A6940098B216 /* ApptentiveConnect.framework */,
49626B6D13942A2B0093534C /* ApptentiveUnitTests.octest */,
);
name = Products;
sourceTree = "<group>";
};
0867D691FE84028FC02AAC07 /* ApptentiveConnect */ = {
isa = PBXGroup;
children = (
9A5951EE1C1D332B009C17AA /* QuartzCore.framework */,
49626BF5139436580093534C /* ext */,
49626B7313942A4D0093534C /* source */,
49626D4B139703D40093534C /* xibs */,
49626B7413942A560093534C /* resources */,
49626B7613942A630093534C /* tests */,
0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */,
034768DFFF38A50411DB9C8B /* Products */,
);
name = ApptentiveConnect;
sourceTree = "<group>";
};
0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = {
isa = PBXGroup;
children = (
1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */,
1058C7B2FEA5585E11CA2CBB /* Other Frameworks */,
);
name = "External Frameworks and Libraries";
sourceTree = "<group>";
};
1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */ = {
isa = PBXGroup;
children = (
1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */,
49626C9513943C520093534C /* SystemConfiguration.framework */,
4989202F13B539D6007967BA /* AddressBook.framework */,
);
name = "Linked Frameworks";
sourceTree = "<group>";
};
1058C7B2FEA5585E11CA2CBB /* Other Frameworks */ = {
isa = PBXGroup;
children = (
0867D6A5FE840307C02AAC07 /* AppKit.framework */,
D2F7E79907B2D74100F64583 /* CoreData.framework */,
0867D69BFE84028FC02AAC07 /* Foundation.framework */,
);
name = "Other Frameworks";
sourceTree = "<group>";
};
49626B7313942A4D0093534C /* source */ = {
isa = PBXGroup;
children = (
32DBCF5E0370ADEE00C91783 /* ApptentiveConnect_Prefix.pch */,
49626D51139704D00093534C /* ATFeedbackWindowController.h */,
49626D52139704D00093534C /* ATFeedbackWindowController.m */,
4971AFF313BA871600774B70 /* ATImageView.h */,
4971AFF413BA871600774B70 /* ATImageView.m */,
4971B07713BAB12F00774B70 /* ATConnect_FeedbackWindowPrivate.h */,
4971B07813BAB12F00774B70 /* ATConnect_FeedbackWindowPrivate.m */,
4971B4C913BFBEFF00774B70 /* ATImageButton.h */,
4971B4CA13BFBEFF00774B70 /* ATImageButton.m */,
491CA3B315F029630003BC38 /* ATPlaceholderTextView.h */,
491CA3B415F029630003BC38 /* ATPlaceholderTextView.m */,
);
name = source;
sourceTree = "<group>";
};
49626B7413942A560093534C /* resources */ = {
isa = PBXGroup;
children = (
4971B47313BFBB7C00774B70 /* at_logo_info.png */,
491CA3BA15F0663C0003BC38 /* at_logo_info@2x.png */,
8DC2EF5A0486A6940098B216 /* Info.plist */,
089C1666FE841158C02AAC07 /* InfoPlist.strings */,
);
name = resources;
sourceTree = "<group>";
};
49626B7613942A630093534C /* tests */ = {
isa = PBXGroup;
children = (
49626B6E13942A2B0093534C /* ApptentiveUnitTests-Info.plist */,
49626B7C13942A9A0093534C /* ATSampleTest.h */,
49626B7D13942A9A0093534C /* ATSampleTest.m */,
);
name = tests;
sourceTree = "<group>";
};
49626BF5139436580093534C /* ext */ = {
isa = PBXGroup;
children = (
49626BF6139436600093534C /* apptentive-ios */,
);
name = ext;
sourceTree = "<group>";
};
49626BF6139436600093534C /* apptentive-ios */ = {
isa = PBXGroup;
children = (
49626C43139437580093534C /* ext */,
49626BFB1394367B0093534C /* source */,
);
name = "apptentive-ios";
sourceTree = "<group>";
};
49626BFB1394367B0093534C /* source */ = {
isa = PBXGroup;
children = (
49626C65139437DD0093534C /* ATConnect.h */,
49626C66139437DD0093534C /* ATConnect.m */,
4982FE68157C0BEF00A1ED63 /* Metrics */,
49626C55139437690093534C /* Misc */,
4972847413CA625D002AD591 /* Rating Flow */,
49626C71139439050093534C /* Persistence */,
49626C8E13943C310093534C /* Reachability */,
49626D12139444C20093534C /* Tasks */,
49626C2A139437070093534C /* URL Loading */,
);
name = source;
sourceTree = "<group>";
};
49626C2A139437070093534C /* URL Loading */ = {
isa = PBXGroup;
children = (
4982FE93157C0C4D00A1ED63 /* ATWebClient_Private.h */,
49626C2B139437070093534C /* ATAPIRequest.h */,
49626C2C139437070093534C /* ATAPIRequest.m */,
49626C2D139437070093534C /* ATConnectionChannel.h */,
49626C2E139437070093534C /* ATConnectionChannel.m */,
49626C2F139437070093534C /* ATConnectionManager.h */,
49626C30139437070093534C /* ATConnectionManager.m */,
49626C31139437070093534C /* ATURLConnection.h */,
49626C32139437070093534C /* ATURLConnection.m */,
49626C33139437070093534C /* ATURLConnection_Private.h */,
4964BF3817C5D2A8000DC2E8 /* ATURLConnection_Private.m */,
49626C34139437070093534C /* ATWebClient.h */,
49626C35139437070093534C /* ATWebClient.m */,
4964BF3B17C5D2B5000DC2E8 /* ATWebClient_Private.h */,
4964BF3C17C5D2B5000DC2E8 /* ATWebClient_Private.m */,
);
name = "URL Loading";
path = "../apptentive-ios/ApptentiveConnect/source/URL Loading";
sourceTree = SOURCE_ROOT;
};
49626C43139437580093534C /* ext */ = {
isa = PBXGroup;
children = (
49626C44139437580093534C /* NSData+ATBase64.h */,
49626C45139437580093534C /* NSData+ATBase64.m */,
491CA38E15F019E20003BC38 /* PJSONKit.h */,
491CA38F15F019E20003BC38 /* PJSONKit.m */,
);
name = ext;
path = "../apptentive-ios/ApptentiveConnect/ext";
sourceTree = SOURCE_ROOT;
};
49626C55139437690093534C /* Misc */ = {
isa = PBXGroup;
children = (
4964BF3117C5D13E000DC2E8 /* ATLog.h */,
4964BF3217C5D13F000DC2E8 /* ATLogger.h */,
4964BF3317C5D13F000DC2E8 /* ATLogger.m */,
49626C56139437690093534C /* ATUtilities.h */,
49626C57139437690093534C /* ATUtilities.m */,
4964BF2C17C5D12B000DC2E8 /* ATStaticLibraryBootstrap.h */,
4964BF2D17C5D12B000DC2E8 /* ATStaticLibraryBootstrap.m */,
);
name = Misc;
path = "../apptentive-ios/ApptentiveConnect/source/Misc";
sourceTree = SOURCE_ROOT;
};
49626C71139439050093534C /* Persistence */ = {
isa = PBXGroup;
children = (
49626C72139439050093534C /* ATBackend.h */,
49626C73139439050093534C /* ATBackend.m */,
49626C74139439050093534C /* ATContactStorage.h */,
49626C75139439050093534C /* ATContactStorage.m */,
49626C78139439050093534C /* ATFeedback.h */,
49626C79139439050093534C /* ATFeedback.m */,
4982FE84157C0C2700A1ED63 /* ATAppConfigurationUpdater.h */,
4982FE85157C0C2700A1ED63 /* ATAppConfigurationUpdater.m */,
4982FE95157C0C5A00A1ED63 /* ATRecord.h */,
4982FE96157C0C5A00A1ED63 /* ATRecord.m */,
);
name = Persistence;
path = "../apptentive-ios/ApptentiveConnect/source/Persistence";
sourceTree = SOURCE_ROOT;
};
49626C8E13943C310093534C /* Reachability */ = {
isa = PBXGroup;
children = (
49626C8F13943C310093534C /* ATReachability.h */,
49626C9013943C310093534C /* ATReachability.m */,
);
name = Reachability;
path = "../apptentive-ios/ApptentiveConnect/source/Reachability";
sourceTree = SOURCE_ROOT;
};
49626D12139444C20093534C /* Tasks */ = {
isa = PBXGroup;
children = (
49598DBA15C62F1B00DF4ABD /* ATAppConfigurationUpdateTask.h */,
49598DBB15C62F1B00DF4ABD /* ATAppConfigurationUpdateTask.m */,
4982FE9A157C0C6700A1ED63 /* ATRecordTask.h */,
4982FE9B157C0C6700A1ED63 /* ATRecordTask.m */,
49626D13139444C20093534C /* ATFeedbackTask.h */,
49626D14139444C20093534C /* ATFeedbackTask.m */,
49626D15139444C20093534C /* ATTask.h */,
49626D16139444C20093534C /* ATTask.m */,
49626D17139444C20093534C /* ATTaskQueue.h */,
49626D18139444C20093534C /* ATTaskQueue.m */,
);
name = Tasks;
path = "../apptentive-ios/ApptentiveConnect/source/Tasks";
sourceTree = SOURCE_ROOT;
};
49626D4B139703D40093534C /* xibs */ = {
isa = PBXGroup;
children = (
49626D4E1397047A0093534C /* ATFeedbackWindow.xib */,
);
path = xibs;
sourceTree = "<group>";
};
4972847413CA625D002AD591 /* Rating Flow */ = {
isa = PBXGroup;
children = (
4972847513CA625D002AD591 /* ATAppRatingFlow.h */,
4972847613CA625D002AD591 /* ATAppRatingFlow.m */,
4982FE89157C0C3D00A1ED63 /* ATAppRatingFlow_Private.h */,
4982FE8A157C0C3D00A1ED63 /* ATAppRatingFlow_Private.m */,
4982FE8B157C0C3D00A1ED63 /* ATAppRatingMetrics.h */,
4982FE8C157C0C3D00A1ED63 /* ATAppRatingMetrics.m */,
);
name = "Rating Flow";
path = "../apptentive-ios/ApptentiveConnect/source/Rating Flow";
sourceTree = SOURCE_ROOT;
};
4982FE68157C0BEF00A1ED63 /* Metrics */ = {
isa = PBXGroup;
children = (
4982FE69157C0BEF00A1ED63 /* ApptentiveMetrics.h */,
4982FE6A157C0BEF00A1ED63 /* ApptentiveMetrics.m */,
4982FE6B157C0BEF00A1ED63 /* ATFeedbackMetrics.h */,
4982FE6C157C0BEF00A1ED63 /* ATFeedbackMetrics.m */,
4982FE6D157C0BEF00A1ED63 /* ATMetric.h */,
4982FE6E157C0BEF00A1ED63 /* ATMetric.m */,
4982FE6F157C0BEF00A1ED63 /* ATSurveyMetrics.h */,
4982FE70157C0BEF00A1ED63 /* ATSurveyMetrics.m */,
4982FE71157C0BEF00A1ED63 /* URL Loading */,
);
name = Metrics;
path = "../apptentive-ios/ApptentiveConnect/source/Metrics";
sourceTree = "<group>";
};
4982FE71157C0BEF00A1ED63 /* URL Loading */ = {
isa = PBXGroup;
children = (
4982FE72157C0BEF00A1ED63 /* ATWebClient+Metrics.h */,
4982FE73157C0BEF00A1ED63 /* ATWebClient+Metrics.m */,
);
path = "URL Loading";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
8DC2EF500486A6940098B216 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
49626C36139437070093534C /* ATAPIRequest.h in Headers */,
49626C38139437070093534C /* ATConnectionChannel.h in Headers */,
49626C3A139437070093534C /* ATConnectionManager.h in Headers */,
49626C3C139437070093534C /* ATURLConnection.h in Headers */,
49626C3E139437070093534C /* ATURLConnection_Private.h in Headers */,
49626C3F139437070093534C /* ATWebClient.h in Headers */,
49626C46139437580093534C /* NSData+ATBase64.h in Headers */,
49626C58139437690093534C /* ATUtilities.h in Headers */,
49626C67139437DD0093534C /* ATConnect.h in Headers */,
49626C7A139439050093534C /* ATBackend.h in Headers */,
49626C7C139439050093534C /* ATContactStorage.h in Headers */,
49626C80139439050093534C /* ATFeedback.h in Headers */,
49626C9113943C310093534C /* ATReachability.h in Headers */,
49626D19139444C20093534C /* ATFeedbackTask.h in Headers */,
49626D1B139444C20093534C /* ATTask.h in Headers */,
49626D1D139444C20093534C /* ATTaskQueue.h in Headers */,
49626D53139704D00093534C /* ATFeedbackWindowController.h in Headers */,
4971AFF513BA871600774B70 /* ATImageView.h in Headers */,
4971B07913BAB12F00774B70 /* ATConnect_FeedbackWindowPrivate.h in Headers */,
4971B4CB13BFBEFF00774B70 /* ATImageButton.h in Headers */,
4972847713CA625D002AD591 /* ATAppRatingFlow.h in Headers */,
4982FE74157C0BEF00A1ED63 /* ApptentiveMetrics.h in Headers */,
4982FE77157C0BEF00A1ED63 /* ATFeedbackMetrics.h in Headers */,
4982FE7A157C0BEF00A1ED63 /* ATMetric.h in Headers */,
4982FE7D157C0BEF00A1ED63 /* ATSurveyMetrics.h in Headers */,
4982FE80157C0BEF00A1ED63 /* ATWebClient+Metrics.h in Headers */,
4982FE86157C0C2700A1ED63 /* ATAppConfigurationUpdater.h in Headers */,
4982FE8D157C0C3D00A1ED63 /* ATAppRatingFlow_Private.h in Headers */,
4982FE90157C0C3D00A1ED63 /* ATAppRatingMetrics.h in Headers */,
4982FE94157C0C4D00A1ED63 /* ATWebClient_Private.h in Headers */,
4982FE97157C0C5A00A1ED63 /* ATRecord.h in Headers */,
4982FE9C157C0C6700A1ED63 /* ATRecordTask.h in Headers */,
49598DBC15C62F1B00DF4ABD /* ATAppConfigurationUpdateTask.h in Headers */,
491CA39015F019E20003BC38 /* PJSONKit.h in Headers */,
491CA3B515F029630003BC38 /* ATPlaceholderTextView.h in Headers */,
4964BF2E17C5D12B000DC2E8 /* ATStaticLibraryBootstrap.h in Headers */,
4964BF3417C5D13F000DC2E8 /* ATLog.h in Headers */,
4964BF3517C5D13F000DC2E8 /* ATLogger.h in Headers */,
4964BF3D17C5D2B5000DC2E8 /* ATWebClient_Private.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
49626B6C13942A2B0093534C /* ApptentiveUnitTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 49626B7213942A2B0093534C /* Build configuration list for PBXNativeTarget "ApptentiveUnitTests" */;
buildPhases = (
49626B6813942A2B0093534C /* Resources */,
49626B6913942A2B0093534C /* Sources */,
49626B6A13942A2B0093534C /* Frameworks */,
49626B6B13942A2B0093534C /* ShellScript */,
);
buildRules = (
);
dependencies = (
49626B7813942A760093534C /* PBXTargetDependency */,
);
name = ApptentiveUnitTests;
productName = ApptentiveUnitTests;
productReference = 49626B6D13942A2B0093534C /* ApptentiveUnitTests.octest */;
productType = "com.apple.product-type.bundle.ocunit-test";
};
8DC2EF4F0486A6940098B216 /* ApptentiveConnect */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "ApptentiveConnect" */;
buildPhases = (
4964BF4717C5D74E000DC2E8 /* Localize (Release Only) */,
8DC2EF500486A6940098B216 /* Headers */,
8DC2EF520486A6940098B216 /* Resources */,
8DC2EF540486A6940098B216 /* Sources */,
8DC2EF560486A6940098B216 /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = ApptentiveConnect;
productInstallPath = "$(HOME)/Library/Frameworks";
productName = ApptentiveConnect;
productReference = 8DC2EF5B0486A6940098B216 /* ApptentiveConnect.framework */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0420;
ORGANIZATIONNAME = "Apptentive, Inc.";
};
buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "ApptentiveConnect" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
Japanese,
French,
German,
);
mainGroup = 0867D691FE84028FC02AAC07 /* ApptentiveConnect */;
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
8DC2EF4F0486A6940098B216 /* ApptentiveConnect */,
49626B6C13942A2B0093534C /* ApptentiveUnitTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
49626B6813942A2B0093534C /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
8DC2EF520486A6940098B216 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */,
49626D4F1397047A0093534C /* ATFeedbackWindow.xib in Resources */,
4971B47413BFBB7C00774B70 /* at_logo_info.png in Resources */,
491CA3BB15F0663C0003BC38 /* at_logo_info@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
49626B6B13942A2B0093534C /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
};
4964BF4717C5D74E000DC2E8 /* Localize (Release Only) */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Localize (Release Only)";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "echo \"Configuration is: ${CONFIGURATION}\"\nif [ \"${CONFIGURATION}\" = 'Release' ]; then\n if [ -e \"${PROJECT_DIR}/resources/English.lproj/Localizable.strings\" ]; then\n rm \"${PROJECT_DIR}/resources/English.lproj/Localizable.strings\"\n fi\n find \"${PROJECT_DIR}/source/\" -name *.m -print0 | xargs -0 genstrings -s ATLocalizedString -o \"${PROJECT_DIR}/resources/English.lproj\"\nfi";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
49626B6913942A2B0093534C /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
49626B7E13942A9A0093534C /* ATSampleTest.m in Sources */,
4982FE76157C0BEF00A1ED63 /* ApptentiveMetrics.m in Sources */,
4982FE79157C0BEF00A1ED63 /* ATFeedbackMetrics.m in Sources */,
4982FE7C157C0BEF00A1ED63 /* ATMetric.m in Sources */,
4982FE7F157C0BEF00A1ED63 /* ATSurveyMetrics.m in Sources */,
4982FE82157C0BEF00A1ED63 /* ATWebClient+Metrics.m in Sources */,
4982FE88157C0C2700A1ED63 /* ATAppConfigurationUpdater.m in Sources */,
4982FE8F157C0C3D00A1ED63 /* ATAppRatingFlow_Private.m in Sources */,
4982FE92157C0C3D00A1ED63 /* ATAppRatingMetrics.m in Sources */,
4982FE99157C0C5A00A1ED63 /* ATRecord.m in Sources */,
4982FE9E157C0C6700A1ED63 /* ATRecordTask.m in Sources */,
49598DBE15C62F1B00DF4ABD /* ATAppConfigurationUpdateTask.m in Sources */,
491CA39215F019E20003BC38 /* PJSONKit.m in Sources */,
491CA3B715F029630003BC38 /* ATPlaceholderTextView.m in Sources */,
4964BF3017C5D12B000DC2E8 /* ATStaticLibraryBootstrap.m in Sources */,
4964BF3717C5D13F000DC2E8 /* ATLogger.m in Sources */,
4964BF3A17C5D2A8000DC2E8 /* ATURLConnection_Private.m in Sources */,
4964BF3F17C5D2B5000DC2E8 /* ATWebClient_Private.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
8DC2EF540486A6940098B216 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
49626C37139437070093534C /* ATAPIRequest.m in Sources */,
49626C39139437070093534C /* ATConnectionChannel.m in Sources */,
49626C3B139437070093534C /* ATConnectionManager.m in Sources */,
49626C3D139437070093534C /* ATURLConnection.m in Sources */,
49626C40139437070093534C /* ATWebClient.m in Sources */,
49626C47139437580093534C /* NSData+ATBase64.m in Sources */,
49626C59139437690093534C /* ATUtilities.m in Sources */,
49626C68139437DD0093534C /* ATConnect.m in Sources */,
49626C7B139439050093534C /* ATBackend.m in Sources */,
49626C7D139439050093534C /* ATContactStorage.m in Sources */,
49626C81139439050093534C /* ATFeedback.m in Sources */,
49626C9213943C310093534C /* ATReachability.m in Sources */,
49626D1A139444C20093534C /* ATFeedbackTask.m in Sources */,
49626D1C139444C20093534C /* ATTask.m in Sources */,
49626D1E139444C20093534C /* ATTaskQueue.m in Sources */,
49626D54139704D00093534C /* ATFeedbackWindowController.m in Sources */,
4971AFF613BA871600774B70 /* ATImageView.m in Sources */,
4971B07A13BAB12F00774B70 /* ATConnect_FeedbackWindowPrivate.m in Sources */,
4971B4CC13BFBEFF00774B70 /* ATImageButton.m in Sources */,
4972847813CA625D002AD591 /* ATAppRatingFlow.m in Sources */,
4982FE75157C0BEF00A1ED63 /* ApptentiveMetrics.m in Sources */,
4982FE78157C0BEF00A1ED63 /* ATFeedbackMetrics.m in Sources */,
4982FE7B157C0BEF00A1ED63 /* ATMetric.m in Sources */,
4982FE7E157C0BEF00A1ED63 /* ATSurveyMetrics.m in Sources */,
4982FE81157C0BEF00A1ED63 /* ATWebClient+Metrics.m in Sources */,
4982FE87157C0C2700A1ED63 /* ATAppConfigurationUpdater.m in Sources */,
4982FE8E157C0C3D00A1ED63 /* ATAppRatingFlow_Private.m in Sources */,
4982FE91157C0C3D00A1ED63 /* ATAppRatingMetrics.m in Sources */,
4982FE98157C0C5A00A1ED63 /* ATRecord.m in Sources */,
4982FE9D157C0C6700A1ED63 /* ATRecordTask.m in Sources */,
49598DBD15C62F1B00DF4ABD /* ATAppConfigurationUpdateTask.m in Sources */,
491CA39115F019E20003BC38 /* PJSONKit.m in Sources */,
491CA3B615F029630003BC38 /* ATPlaceholderTextView.m in Sources */,
4964BF2F17C5D12B000DC2E8 /* ATStaticLibraryBootstrap.m in Sources */,
4964BF3617C5D13F000DC2E8 /* ATLogger.m in Sources */,
4964BF3917C5D2A8000DC2E8 /* ATURLConnection_Private.m in Sources */,
4964BF3E17C5D2B5000DC2E8 /* ATWebClient_Private.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
49626B7813942A760093534C /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 8DC2EF4F0486A6940098B216 /* ApptentiveConnect */;
targetProxy = 49626B7713942A760093534C /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
089C1666FE841158C02AAC07 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
089C1667FE841158C02AAC07 /* InfoPlist.strings */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
1DEB91AE08733DA50010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = NO;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_VERSION = A;
GCC_DYNAMIC_NO_PIC = NO;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = source/ApptentiveConnect_Prefix.pch;
GCC_PREPROCESSOR_DEFINITIONS = (
"JSONKIT_PREFIX=AT",
"APPTENTIVE_DEBUG=1",
"AT_LOGGING_LEVEL_INFO=1",
"AT_LOGGING_LEVEL_DEBUG=1",
"AT_LOGGING_LEVEL_ERROR=1",
);
INFOPLIST_FILE = resources/Info.plist;
INSTALL_PATH = "@executable_path/../Frameworks";
PRODUCT_NAME = ApptentiveConnect;
WRAPPER_EXTENSION = framework;
};
name = Debug;
};
1DEB91AF08733DA50010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_VERSION = A;
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = source/ApptentiveConnect_Prefix.pch;
GCC_PREPROCESSOR_DEFINITIONS = (
"JSONKIT_PREFIX=AT",
"AT_LOGGING_LEVEL_INFO=1",
"AT_LOGGING_LEVEL_ERROR=1",
);
INFOPLIST_FILE = resources/Info.plist;
INSTALL_PATH = "@executable_path/../Frameworks";
PRODUCT_NAME = ApptentiveConnect;
WRAPPER_EXTENSION = framework;
};
name = Release;
};
1DEB91B208733DA50010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
1DEB91B308733DA50010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
SDKROOT = macosx;
};
name = Release;
};
49626B7013942A2B0093534C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks";
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Cocoa.framework/Headers/Cocoa.h";
INFOPLIST_FILE = "tests/ApptentiveUnitTests-Info.plist";
INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles";
OTHER_LDFLAGS = (
"-framework",
Cocoa,
"-framework",
SenTestingKit,
);
PRODUCT_NAME = ApptentiveUnitTests;
WRAPPER_EXTENSION = octest;
};
name = Debug;
};
49626B7113942A2B0093534C /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks";
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Cocoa.framework/Headers/Cocoa.h";
INFOPLIST_FILE = "tests/ApptentiveUnitTests-Info.plist";
INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles";
OTHER_LDFLAGS = (
"-framework",
Cocoa,
"-framework",
SenTestingKit,
);
PRODUCT_NAME = ApptentiveUnitTests;
WRAPPER_EXTENSION = octest;
ZERO_LINK = NO;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "ApptentiveConnect" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB91AE08733DA50010E9CD /* Debug */,
1DEB91AF08733DA50010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "ApptentiveConnect" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB91B208733DA50010E9CD /* Debug */,
1DEB91B308733DA50010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
49626B7213942A2B0093534C /* Build configuration list for PBXNativeTarget "ApptentiveUnitTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
49626B7013942A2B0093534C /* Debug */,
49626B7113942A2B0093534C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
}

7
Clocker/ApptentiveConnect/ApptentiveConnect/ApptentiveConnect.xcodeproj/project.xcworkspace/contents.xcworkspacedata generated

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>

BIN
Clocker/ApptentiveConnect/ApptentiveConnect/ApptentiveConnect.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate generated

Binary file not shown.

80
Clocker/ApptentiveConnect/ApptentiveConnect/ApptentiveConnect.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/ApptentiveConnect.xcscheme

@ -1,80 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8DC2EF4F0486A6940098B216"
BuildableName = "ApptentiveConnect.framework"
BlueprintName = "ApptentiveConnect"
ReferencedContainer = "container:ApptentiveConnect.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8DC2EF4F0486A6940098B216"
BuildableName = "ApptentiveConnect.framework"
BlueprintName = "ApptentiveConnect"
ReferencedContainer = "container:ApptentiveConnect.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8DC2EF4F0486A6940098B216"
BuildableName = "ApptentiveConnect.framework"
BlueprintName = "ApptentiveConnect"
ReferencedContainer = "container:ApptentiveConnect.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

80
Clocker/ApptentiveConnect/ApptentiveConnect/ApptentiveConnect.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/ApptentiveUnitTests.xcscheme

@ -1,80 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "49626B6C13942A2B0093534C"
BuildableName = "ApptentiveUnitTests.octest"
BlueprintName = "ApptentiveUnitTests"
ReferencedContainer = "container:ApptentiveConnect.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "49626B6C13942A2B0093534C"
BuildableName = "ApptentiveUnitTests.octest"
BlueprintName = "ApptentiveUnitTests"
ReferencedContainer = "container:ApptentiveConnect.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "49626B6C13942A2B0093534C"
BuildableName = "ApptentiveUnitTests.octest"
BlueprintName = "ApptentiveUnitTests"
ReferencedContainer = "container:ApptentiveConnect.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

32
Clocker/ApptentiveConnect/ApptentiveConnect/ApptentiveConnect.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcschemes/xcschememanagement.plist

@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>ApptentiveConnect.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>ApptentiveUnitTests.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>49626B6C13942A2B0093534C</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>8DC2EF4F0486A6940098B216</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

4
Clocker/ApptentiveConnect/ApptentiveConnect/source/Controllers/ATFeedbackWindowController.m

@ -292,7 +292,7 @@
ABMultiValue *abEmails = [me valueForProperty:kABEmailProperty];
if (abEmails && [abEmails count]) {
for (int i = 0; i < [abEmails count]; i++) {
for (NSInteger i = 0; i < [abEmails count]; i++) {
NSString *abEmail = [abEmails valueAtIndex:i];
if (contactStorage.email == nil || ![contactStorage.email isEqualToString:abEmail]) {
[emails addObject:abEmail];
@ -301,7 +301,7 @@
}
ABMultiValue *abPhoneNumbers = [me valueForProperty:kABPhoneProperty];
if (abPhoneNumbers && [abPhoneNumbers count]) {
for (int i = 0; i < [abPhoneNumbers count]; i++) {
for (NSInteger i = 0; i < [abPhoneNumbers count]; i++) {
NSString *abPhoneNumber = [abPhoneNumbers valueAtIndex:i];
if (contactStorage.phone == nil || ![contactStorage.phone isEqualToString:abPhoneNumber]) {
[phoneNumbers addObject:abPhoneNumber];

21
Clocker/ApptentiveConnect/apptentive-ios/.gitignore vendored

@ -1,21 +0,0 @@
# xcode noise
build/
build/*
*/build/*
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
xcuserdata/*
xcuserdata/
# OSX noise
.DS_Store
profile
Icon*
# Emacs noise
*~
# other noise
.svn

1328
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/ApptentiveConnect.xcodeproj/project.pbxproj

File diff suppressed because it is too large Load Diff

7
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/ApptentiveConnect.xcodeproj/project.xcworkspace/contents.xcworkspacedata generated

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:ApptentiveConnect.xcodeproj">
</FileRef>
</Workspace>

85
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/ApptentiveConnect.xcodeproj/xcshareddata/xcschemes/ApptentiveConnect.xcscheme

@ -1,85 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0460"
version = "1.8">
<BuildAction
parallelizeBuildables = "NO"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "496DC37E1333D35600743F65"
BuildableName = "libApptentiveConnect.a"
BlueprintName = "ApptentiveConnect"
ReferencedContainer = "container:ApptentiveConnect.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "496DC38B1333D35600743F65"
BuildableName = "ApptentiveConnectTests.octest"
BlueprintName = "ApptentiveConnectTests"
ReferencedContainer = "container:ApptentiveConnect.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
displayScaleIsEnabled = "NO"
displayScale = "1.00"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "496DC37E1333D35600743F65"
BuildableName = "libApptentiveConnect.a"
BlueprintName = "ApptentiveConnect"
ReferencedContainer = "container:ApptentiveConnect.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
displayScaleIsEnabled = "NO"
displayScale = "1.00"
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

75
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/ApptentiveConnect.xcodeproj/xcshareddata/xcschemes/ApptentiveResources.xcscheme

@ -1,75 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0460"
version = "1.8">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "49D1118B13341A7C00603373"
BuildableName = "ApptentiveResources.bundle"
BlueprintName = "ApptentiveResources"
ReferencedContainer = "container:ApptentiveConnect.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
displayScaleIsEnabled = "NO"
displayScale = "1.00"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "49D1118B13341A7C00603373"
BuildableName = "ApptentiveResources.bundle"
BlueprintName = "ApptentiveResources"
ReferencedContainer = "container:ApptentiveConnect.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
displayScaleIsEnabled = "NO"
displayScale = "1.00"
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/Checkmark.opacity

Binary file not shown.

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/button_shadow_overlay.psd

Binary file not shown.

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/button_shadow_overlay@2x.psd

Binary file not shown.

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/camera icon button

Binary file not shown.

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/camera icon.opacity

Binary file not shown.

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/camera icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/cancel_bg.psd

Binary file not shown.

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_apptentive_icon_small.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_apptentive_icon_small@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_button_shadow_overlay.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_button_shadow_overlay@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_cancel_bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_cancel_bg@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_cancel_highlighted_bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_cancel_highlighted_bg@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_checkmark.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_checkmark@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_dialog_paper_bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_dialog_paper_bg@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_dotted_red_line.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1006 B

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_dotted_red_line@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_gray_line.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 961 B

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_gray_line@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_logo_info.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_logo_info@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_paperclip_background.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_paperclip_background@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_paperclip_foreground.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_paperclip_foreground@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_photo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_photo@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_send_bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_send_bg@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_send_disabled_bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_send_disabled_bg@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_send_highlighted_bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/generated/at_send_highlighted_bg@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/placard.opacity

Binary file not shown.

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/popup.opacity

Binary file not shown.

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/art/send_bg.psd

Binary file not shown.

33
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/ext/NSData+ATBase64.h

@ -1,33 +0,0 @@
//
// NSData+Base64.h
// base64
//
// Created by Matt Gallagher on 2009/06/03.
// Copyright 2009 Matt Gallagher. All rights reserved.
//
// Permission is given to use this source code file, free of charge, in any
// project, commercial or otherwise, entirely at your risk, with the condition
// that any redistribution (in part or whole) of source code must retain
// this copyright and permission notice. Attribution in compiled projects is
// appreciated but not required.
//
#import <Foundation/Foundation.h>
void *ATNewBase64Decode(
const char *inputBuffer,
size_t length,
size_t *outputLength);
char *ATNewBase64Encode(
const void *inputBuffer,
size_t length,
bool separateLines,
size_t *outputLength);
@interface NSData (ATBase64)
+ (NSData *)at_dataFromBase64String:(NSString *)aString;
- (NSString *)at_base64EncodedString;
@end

300
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/ext/NSData+ATBase64.m

@ -1,300 +0,0 @@
//
// NSData+Base64.m
// base64
//
// Created by Matt Gallagher on 2009/06/03.
// Copyright 2009 Matt Gallagher. All rights reserved.
//
// Permission is given to use this source code file, free of charge, in any
// project, commercial or otherwise, entirely at your risk, with the condition
// that any redistribution (in part or whole) of source code must retain
// this copyright and permission notice. Attribution in compiled projects is
// appreciated but not required.
//
#import "NSData+ATBase64.h"
//
// Mapping from 6 bit pattern to ASCII character.
//
static unsigned char base64EncodeLookup[65] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
//
// Definition for "masked-out" areas of the base64DecodeLookup mapping
//
#define xx 65
//
// Mapping from ASCII character to 6 bit pattern.
//
static unsigned char base64DecodeLookup[256] =
{
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, 62, xx, xx, xx, 63,
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, xx, xx, xx, xx, xx, xx,
xx, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, xx, xx, xx, xx, xx,
xx, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, xx, xx, xx, xx, xx,
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
};
//
// Fundamental sizes of the binary and base64 encode/decode units in bytes
//
#define BINARY_UNIT_SIZE 3
#define BASE64_UNIT_SIZE 4
//
// ATNewBase64Decode
//
// Decodes the base64 ASCII string in the inputBuffer to a newly malloced
// output buffer.
//
// inputBuffer - the source ASCII string for the decode
// length - the length of the string or -1 (to specify strlen should be used)
// outputLength - if not-NULL, on output will contain the decoded length
//
// returns the decoded buffer. Must be free'd by caller. Length is given by
// outputLength.
//
void *ATNewBase64Decode(
const char *inputBuffer,
size_t length,
size_t *outputLength)
{
if (length == -1)
{
length = strlen(inputBuffer);
}
size_t outputBufferSize =
((length+BASE64_UNIT_SIZE-1) / BASE64_UNIT_SIZE) * BINARY_UNIT_SIZE;
unsigned char *outputBuffer = (unsigned char *)malloc(outputBufferSize);
size_t i = 0;
size_t j = 0;
while (i < length)
{
//
// Accumulate 4 valid characters (ignore everything else)
//
unsigned char accumulated[BASE64_UNIT_SIZE];
memset(&accumulated, 0, sizeof(unsigned char)*BASE64_UNIT_SIZE);
size_t accumulateIndex = 0;
while (i < length)
{
unsigned char decode = base64DecodeLookup[inputBuffer[i++]];
if (decode != xx)
{
accumulated[accumulateIndex] = decode;
accumulateIndex++;
if (accumulateIndex == BASE64_UNIT_SIZE)
{
break;
}
}
}
//
// Store the 6 bits from each of the 4 characters as 3 bytes
//
outputBuffer[j] = (accumulated[0] << 2) | (accumulated[1] >> 4);
outputBuffer[j + 1] = (accumulated[1] << 4) | (accumulated[2] >> 2);
outputBuffer[j + 2] = (accumulated[2] << 6) | accumulated[3];
j += accumulateIndex - 1;
}
if (outputLength)
{
*outputLength = j;
}
return outputBuffer;
}
//
// ATNewBase64Decode
//
// Encodes the arbitrary data in the inputBuffer as base64 into a newly malloced
// output buffer.
//
// inputBuffer - the source data for the encode
// length - the length of the input in bytes
// separateLines - if zero, no CR/LF characters will be added. Otherwise
// a CR/LF pair will be added every 64 encoded chars.
// outputLength - if not-NULL, on output will contain the encoded length
// (not including terminating 0 char)
//
// returns the encoded buffer. Must be free'd by caller. Length is given by
// outputLength.
//
char *ATNewBase64Encode(
const void *buffer,
size_t length,
bool separateLines,
size_t *outputLength)
{
const unsigned char *inputBuffer = (const unsigned char *)buffer;
#define MAX_NUM_PADDING_CHARS 2
#define OUTPUT_LINE_LENGTH 64
#define INPUT_LINE_LENGTH ((OUTPUT_LINE_LENGTH / BASE64_UNIT_SIZE) * BINARY_UNIT_SIZE)
#define CR_LF_SIZE 2
//
// Byte accurate calculation of final buffer size
//
size_t outputBufferSize =
((length / BINARY_UNIT_SIZE)
+ ((length % BINARY_UNIT_SIZE) ? 1 : 0))
* BASE64_UNIT_SIZE;
if (separateLines)
{
outputBufferSize +=
(outputBufferSize / OUTPUT_LINE_LENGTH) * CR_LF_SIZE;
}
//
// Include space for a terminating zero
//
outputBufferSize += 1;
//
// Allocate the output buffer
//
char *outputBuffer = (char *)malloc(outputBufferSize);
if (!outputBuffer)
{
return NULL;
}
size_t i = 0;
size_t j = 0;
const size_t lineLength = separateLines ? INPUT_LINE_LENGTH : length;
size_t lineEnd = lineLength;
while (true)
{
if (lineEnd > length)
{
lineEnd = length;
}
for (; i + BINARY_UNIT_SIZE - 1 < lineEnd; i += BINARY_UNIT_SIZE)
{
//
// Inner loop: turn 48 bytes into 64 base64 characters
//
outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2];
outputBuffer[j++] = base64EncodeLookup[((inputBuffer[i] & 0x03) << 4)
| ((inputBuffer[i + 1] & 0xF0) >> 4)];
outputBuffer[j++] = base64EncodeLookup[((inputBuffer[i + 1] & 0x0F) << 2)
| ((inputBuffer[i + 2] & 0xC0) >> 6)];
outputBuffer[j++] = base64EncodeLookup[inputBuffer[i + 2] & 0x3F];
}
if (lineEnd == length)
{
break;
}
//
// Add the newline
//
outputBuffer[j++] = '\r';
outputBuffer[j++] = '\n';
lineEnd += lineLength;
}
if (i + 1 < length)
{
//
// Handle the single '=' case
//
outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2];
outputBuffer[j++] = base64EncodeLookup[((inputBuffer[i] & 0x03) << 4)
| ((inputBuffer[i + 1] & 0xF0) >> 4)];
outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i + 1] & 0x0F) << 2];
outputBuffer[j++] = '=';
}
else if (i < length)
{
//
// Handle the double '=' case
//
outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2];
outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0x03) << 4];
outputBuffer[j++] = '=';
outputBuffer[j++] = '=';
}
outputBuffer[j] = 0;
//
// Set the output length and return the buffer
//
if (outputLength)
{
*outputLength = j;
}
return outputBuffer;
}
@implementation NSData (ATBase64)
//
// dataFromBase64String:
//
// Creates an NSData object containing the base64 decoded representation of
// the base64 string 'aString'
//
// Parameters:
// aString - the base64 string to decode
//
// returns the autoreleased NSData representation of the base64 string
//
+ (NSData *)at_dataFromBase64String:(NSString *)aString
{
NSData *data = [aString dataUsingEncoding:NSASCIIStringEncoding];
size_t outputLength;
void *outputBuffer = ATNewBase64Decode([data bytes], [data length], &outputLength);
NSData *result = [NSData dataWithBytes:outputBuffer length:outputLength];
free(outputBuffer);
return result;
}
//
// base64EncodedString
//
// Creates an NSString object that contains the base 64 encoding of the
// receiver's data. Lines are broken at 64 characters long.
//
// returns an autoreleased NSString being the base 64 representation of the
// receiver.
//
- (NSString *)at_base64EncodedString
{
size_t outputLength = 0;
char *outputBuffer =
ATNewBase64Encode([self bytes], [self length], true, &outputLength);
NSString *result =
[[[NSString alloc]
initWithBytes:outputBuffer
length:outputLength
encoding:NSASCIIStringEncoding]
autorelease];
free(outputBuffer);
return result;
}
@end

389
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/ext/PrefixedJSONKit/CHANGELOG.md

@ -1,389 +0,0 @@
# JSONKit Changelog
## Version 1.X ????/??/??
**IMPORTANT:** The following changelog notes are a work in progress. They apply to the work done on JSONKit post v1.4. Since JSONKit itself is inbetween versions, these changelog notes are subject to change, may be wrong, and just about everything else you could expect at this point in development.
### New Features
* When `JKSerializeOptionPretty` is enabled, JSONKit now sorts the keys.
* Normally, JSONKit can only serialize NSNull, NSNumber, NSString, NSArray, and NSDictioonary like objects. It is now possible to serialize an object of any class via either a delegate or a `^` block.
The delegate or `^` block must return an object that can be serialized by JSONKit, however, otherwise JSONKit will fail to serialize the object. In other words, JSONKit tries to serialize an unsupported class of the object just once, and if the delegate or ^block returns another unsupported class, the second attempt to serialize will fail. In practice, this is not a problem at all, but it does prevent endless recursive attempts to serialize an unsupported class.
This makes it trivial to serialize objects like NSDate or NSData. A NSDate object can be formatted using a NSDateFormatter to return a ISO-8601 `YYYY-MM-DDTHH:MM:SS.sssZ` type object, for example. Or a NSData object could be Base64 encoded.
This greatly simplifies things when you have a complex, nested objects with objects that do not belong to the classes that JSONKit can serialize.
It should be noted that the same caching that JSONKit does for the supported class types also applies to the objects of an unsupported class- if the same object is serialized more than once and the object is still in the serialization cache, JSONKit will copy the previous serialization result instead of invoking the delegate or `^` block again. Therefore, you should not expect or depend on your delegate or block being called each time the same object needs to be serialized AND the delegate or block MUST return a "formatted object" that is STRICTLY invariant (that is to say the same object must always return the exact same formatted output).
To serialize NSArray or NSDictionary objects using a delegate&ndash;
**NOTE:** The delegate is based a single argument, the object with the unsupported class, and the supplied `selector` method must be one that accepts a single `id` type argument (i.e., `formatObject:`).
**IMPORTANT:** The `^` block MUST return an object with a class that can be serialized by JSONKit, otherwise the serialization will fail.
<pre>
&#x200b;- (NSData \*)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingDelegate:(id)delegate selector:(SEL)selector error:(NSError \*\*)error;
&#x200b;- (NSString \*)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingDelegate:(id)delegate selector:(SEL)selector error:(NSError \*\*)error;
</pre>
To serialize NSArray or NSDictionary objects using a `^` block&ndash;
**NOTE:** The block is passed a single argument, the object with the unsupported class.
**IMPORTANT:** The `^` block MUST return an object with a class that can be serialized by JSONKit, otherwise the serialization will fail.
<pre>
&#x200b;- (NSData \*)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingBlock:(id(&#x005E;)(id object))block error:(NSError \*\*)error;
&#x200b;- (NSString \*)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingBlock:(id(&#x005E;)(id object))block error:(NSError \*\*)error;
</pre>
Example using the delegate way:
<pre>
@interface MYFormatter : NSObject {
NSDateFormatter \*outputFormatter;
}
@end
&#x200b;
@implementation MYFormatter
-(id)init
{
if((self = [super init]) == NULL) { return(NULL); }
if((outputFormatter = [[NSDateFormatter alloc] init]) == NULL) { [self autorelease]; return(NULL); }
[outputFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSSZZZ"];
return(self);
}
&#x200b;
-(void)dealloc
{
if(outputFormatter != NULL) { [outputFormatter release]; outputFormatter = NULL; }
[super dealloc];
}
&#x200b;
-(id)formatObject:(id)object
{
if([object isKindOfClass:[NSDate class]]) { return([outputFormatter stringFromDate:object]); }
return(NULL);
}
@end
&#x200b;
{
MYFormatter \*myFormatter = [[[MYFormatter alloc] init] autorelease];
NSArray \*array = [NSArray arrayWithObject:[NSDate dateWithTimeIntervalSinceNow:0.0]];
NSString \*jsonString = NULL;
jsonString = [array JSONStringWithOptions:JKSerializeOptionNone
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;serializeUnsupportedClassesUsingDelegate:myFormatter
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;selector:@selector(formatObject:)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;error:NULL];
NSLog(@"jsonString: '%@'", jsonString);
// 2011-03-25 11:42:16.175 formatter_example[59120:903] jsonString: '["2011-03-25T11:42:16.175-0400"]'
}
</pre>
Example using the `^` block way:
<pre>
{
NSDateFormatter \*outputFormatter = [[[NSDateFormatter alloc] init] autorelease];
[outputFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSSZZZ"];
&#x200b;
jsonString = [array JSONStringWithOptions:encodeOptions
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;serializeUnsupportedClassesUsingBlock:&#x005E;id(id object) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if([object isKindOfClass:[NSDate class]]) { return([outputFormatter stringFromDate:object]); }
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return(NULL);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;error:NULL];
NSLog(@"jsonString: '%@'", jsonString);
// 2011-03-25 11:49:56.434 json_parse[59167:903] jsonString: '["2011-03-25T11:49:56.434-0400"]'
}
</pre>
### Major Changes
* The way that JSONKit implements the collection classes was modified. Specifically, JSONKit now follows the same strategy that the Cocoa collection classes use, which is to have a single subclass of the mutable collection class. This concrete subclass has an ivar bit that determines whether or not that instance is mutable, and when an immutable instance receives a mutating message, it throws an exception.
## Version 1.4 2011/23/03
### Highlights
* JSONKit v1.4 significantly improves the performance of serializing and deserializing. Deserializing is 23% faster than Apples binary `.plist`, and an amazing 549% faster than Apples binary `.plist` when serializing.
### New Features
* JSONKit can now return mutable collection classes.
* The `JKSerializeOptionFlags` option `JKSerializeOptionPretty` was implemented.
* It is now possible to serialize a single [`NSString`][NSString]. This functionality was requested in issue #4 and issue #11.
### Deprecated Methods
* The following `JSONDecoder` methods are deprecated beginning with JSONKit v1.4 and will be removed in a later release&ndash;
<pre>
&#x200b;- (id)parseUTF8String:(const unsigned char \*)string length:(size_t)length;
&#x200b;- (id)parseUTF8String:(const unsigned char \*)string length:(size_t)length error:(NSError \*\*)error;
&#x200b;- (id)parseJSONData:(NSData \*)jsonData;
&#x200b;- (id)parseJSONData:(NSData \*)jsonData error:(NSError \*\*)error;
</pre>
The JSONKit v1.4 <code>objectWith&hellip;</code> methods should be used instead.
### NEW API's
* The following methods were added to `JSONDecoder`&ndash;
These methods replace their deprecated <code>parse&hellip;</code> counterparts and return immutable collection objects.
<pre>
&#x200b;- (id)objectWithUTF8String:(const unsigned char \*)string length:(NSUInteger)length;
&#x200b;- (id)objectWithUTF8String:(const unsigned char \*)string length:(NSUInteger)length error:(NSError \*\*)error;
&#x200b;- (id)objectWithData:(NSData \*)jsonData;
&#x200b;- (id)objectWithData:(NSData \*)jsonData error:(NSError \*\*)error;
</pre>
These methods are the same as their <code>objectWith&hellip;</code> counterparts except they return mutable collection objects.
<pre>
&#x200b;- (id)mutableObjectWithUTF8String:(const unsigned char \*)string length:(NSUInteger)length;
&#x200b;- (id)mutableObjectWithUTF8String:(const unsigned char \*)string length:(NSUInteger)length error:(NSError \*\*)error;
&#x200b;- (id)mutableObjectWithData:(NSData \*)jsonData;
&#x200b;- (id)mutableObjectWithData:(NSData \*)jsonData error:(NSError \*\*)error;
</pre>
* The following methods were added to `NSString (JSONKitDeserializing)`&ndash;
These methods are the same as their <code>objectFrom&hellip;</code> counterparts except they return mutable collection objects.
<pre>
&#x200b;- (id)mutableObjectFromJSONString;
&#x200b;- (id)mutableObjectFromJSONStringWithParseOptions:(JKParseOptionFlags)parseOptionFlags;
&#x200b;- (id)mutableObjectFromJSONStringWithParseOptions:(JKParseOptionFlags)parseOptionFlags error:(NSError \*\*)error;
</pre>
* The following methods were added to `NSData (JSONKitDeserializing)`&ndash;
These methods are the same as their <code>objectFrom&hellip;</code> counterparts except they return mutable collection objects.
<pre>
&#x200b;- (id)mutableObjectFromJSONData;
&#x200b;- (id)mutableObjectFromJSONDataWithParseOptions:(JKParseOptionFlags)parseOptionFlags;
&#x200b;- (id)mutableObjectFromJSONDataWithParseOptions:(JKParseOptionFlags)parseOptionFlags error:(NSError \*\*)error;
</pre>
* The following methods were added to `NSString (JSONKitSerializing)`&ndash;
These methods are for those uses that need to serialize a single [`NSString`][NSString]&ndash;
<pre>
&#x200b;- (NSData \*)JSONData;
&#x200b;- (NSData \*)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions includeQuotes:(BOOL)includeQuotes error:(NSError \*\*)error;
&#x200b;- (NSString \*)JSONString;
&#x200b;- (NSString \*)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions includeQuotes:(BOOL)includeQuotes error:(NSError \*\*)error;
</pre>
### Bug Fixes
* JSONKit has a fast and a slow path for parsing JSON Strings. The slow path is needed whenever special string processing is required, such as the conversion of `\` escape sequences or ill-formed UTF-8. Although the slow path had a check for characters < `0x20`, which are not permitted by the [RFC 4627][], there was a bug such that the condition was never actually checked. As a result, JSONKit would have incorrectly accepted JSON that contained characters < `0x20` if it was using the slow path to process a JSON String.
* The low surrogate in a <code>\u<i><b>high</b></i>\u<i><b>low</b></i></code> escape sequence in a JSON String was incorrectly treating `dfff` as ill-formed Unicode. This was due to a comparison that used `>= 0xdfff` instead of `> 0xdfff` as it should have.
* `JKParseOptionLooseUnicode` was not properly honored when parsing some types of ill-formed Unicode in <code>\u<i><b>HHHH</b></i></code> escapes in JSON Strings.
### Important Notes
* JSONKit v1.4 now uses custom concrete subclasses of [`NSArray`][NSArray], [`NSMutableArray`][NSMutableArray], [`NSDictionary`][NSDictionary], and [`NSMutableDictionary`][NSMutableDictionary]&mdash; `JKArray`, `JKMutableArray`, `JKDictionary`, and `JKMutableDictionary`. respectively. These classes are internal and private to JSONKit, you should not instantiate objects from these classes directly.
In theory, these custom classes should behave exactly the same as the respective Foundation / Cocoa counterparts.
As usual, in practice may have non-linear excursions from what theory predicts. It is also virtually impossible to properly test or predict how these custom classes will interact with software in the wild.
Most likely, if you do encounter a problem, it will happen very quickly, and you should report a bug via the [github.com JSONKit Issue Tracker][bugtracker].
In addition to the required class cluster primitive methods, the custom collection classes also include support for [`NSFastEnumeration`][NSFastEnumeration], along with methods that support the bulk retrieval of the objects contents.
#### Exceptions Thrown
The JSONKit collection classes will throw the same exceptions for the same conditions as their respective Foundation counterparts. If you find a discrepancy, please report a bug via the [github.com JSONKit Issue Tracker][bugtracker].
#### Multithreading Safety
The same multithreading rules and caveats for the Foundation collection classes apply to the JSONKit collection classes. Specifically, it should be safe to use the immutable collections from multiple threads concurrently.
The mutable collections can be used from multiple threads as long as you provide some form of mutex barrier that ensures that if a thread needs to mutate the collection, then it has exclusive access to the collection&ndash; no other thread can be reading from or writing to the collection until the mutating thread has finished. Failure to ensure that there are no other threads reading or writing from the mutable collection when a thread mutates the collection will result in `undefined` behavior.
#### Mutable Collection Notes
The mutable versions of the collection classes are meant to be used when you need to make minor modifications to the collection. Neither `JKMutableArray` or `JKMutableDictionary` have been optimized for nor are they intended to be used in situations where you are adding a large number of objects or new keys&ndash; these types of operations will cause both classes to frequently reallocate the memory used to hold the objects in the collection.
#### `JKMutableArray` Usage Notes
* You should minimize the number of new objects you added to the array. The array is not designed for high performance insertion and removal of objects. If the array does not have any extra capacity it must reallocate the backing store. When the array is forced to grow the backing store, it currently adds an additional 16 slots worth of spare capacity. The array is instantiated without any extra capacity on the assumption that dictionaries are going to be mutated more than arrays. The array never shrinks the backing store.
* Replacing objects in the array via [`-replaceObjectAtIndex:withObject:`][-replaceObjectAtIndex:withObject:] is very fast since the array simply releases the current object at the index and replaces it with the new object.
* Inserting an object in to the array via [`-insertObject:atIndex:`][-insertObject:atIndex:] cause the array to [`memmove()`][memmove] all the objects up one slot from the insertion index. This means this operation is fastest when inserting objects at the last index since no objects need to be moved.
* Removing an object from the array via [`-removeObjectAtIndex:`][-removeObjectAtIndex:] causes the array to [`memmove()`][memmove] all the objects down one slot from the removal index. This means this operation is fastest when removing objects at the last index since no objects need to be moved. The array will not resize its backing store to a smaller size.
* [`-copy`][-copy] and [`-mutableCopy`][-mutableCopy] will instantiate a new [`NSArray`][NSArray] or [`NSMutableArray`][NSMutableArray] class object, respectively, with the contents of the receiver.
#### `JKMutableDictionary` Usage Notes
* You should minimize the number of new keys you add to the dictionary. If the number of items in the dictionary exceeds a threshold value it will trigger a resizing operation. To do this, the dictionary must allocate a new, larger backing store, and then re-add all the items in the dictionary by rehashing them to the size of the newer, larger store. This is an expensive operation. While this is a limitation of nearly all hash tables, the capacity for the hash table used by `JKMutableDictionary` has been chosen to minimize the amount of memory used since it is anticipated that most dictionaries will not grow significantly once they are instantiated.
* If the key already exists in the dictionary and you change the object associated with it via [`-setObject:forKey:`][-setObject:forKey:], this will not cause any performance problems or trigger a hash table resize.
* Removing a key from the dictionary via [`-removeObjectForKey:`][-removeObjectForKey:] will not cause any performance problems. However, the dictionary will not resize its backing store to the smaller size.
* [`-copy`][-copy] and [`-mutableCopy`][-mutableCopy] will instantiate a new [`NSDictionary`][NSDictionary] or [`NSMutableDictionary`][NSMutableDictionary] class object, respectively, with the contents of the receiver.
### Major Changes
* The `JK_ENABLE_CF_TRANSFER_OWNERSHIP_CALLBACKS` pre-processor define flag that was added to JSONKit v1.3 has been removed.
`JK_ENABLE_CF_TRANSFER_OWNERSHIP_CALLBACKS` was added in JSONKit v1.3 as a temporary work around. While the author was aware of other ways to fix the particular problem caused by the usage of "transfer of ownership callbacks" with Core Foundation classes, the fix provided in JSONKit v1.3 was trivial to implement. This allowed people who needed that functionality to use JSONKit while a proper solution to the problem was worked on. JSONKit v1.4 is the result of that work.
JSONKit v1.4 no longer uses the Core Foundation collection classes [`CFArray`][CFArray] and [`CFDictionary`][CFDictionary]. Instead, JSONKit v1.4 contains a concrete subclass of [`NSArray`][NSArray] and [`NSDictionary`][NSDictionary]&ndash; `JKArray` and `JKDictionary`, respectively. As a result, JSONKit has complete control over the behavior of how items are added and managed within an instantiated collection object. The `JKArray` and `JKDictionary` classes are private to JSONKit, you should not instantiate them direction. Since they are concrete subclasses of their respective collection class cluster, they behave and act exactly the same as [`NSArray`][NSArray] and [`NSDictionary`][NSDictionary].
The first benefit is that the "transfer of ownership" object ownership policy can now be safely used. Because the JSONKit collection objects understand that some methods, such as [`-mutableCopy`][-mutableCopy], should not inherit the same "transfer of ownership" object ownership policy, but must follow the standard Cocoa object ownership policy. The "transfer of ownership" object ownership policy reduces the number of [`-retain`][-retain] and [`-release`][-release] calls needed to add an object to a collection, and when creating a large number of objects very quickly (as you would expect when parsing JSON), this can result in a non-trivial amount of time. Eliminating these calls means faster JSON parsing.
A second benefit is that the author encountered some unexpected behavior when using the [`CFDictionaryCreate`][CFDictionaryCreate] function to create a dictionary and the `keys` argument contained duplicate keys. This required JSONKit to de-duplicate the keys and values before calling [`CFDictionaryCreate`][CFDictionaryCreate]. Unfortunately, JSONKit always had to scan all the keys to make sure there were no duplicates, even though 99.99% of the time there were none. This was less than optimal, particularly because one of the solutions to this particular problem is to use a hash table to perform the de-duplication. Now JSONKit can do the de-duplication while it is instantiating the dictionary collection, solving two problems at once.
Yet another benefit is that the recently instantiated object cache that JSONKit uses can be used to cache information about the keys used to create dictionary collections, in particular a keys [`-hash`][-hash] value. For a lot of real world JSON, this effectively means that the [`-hash`][-hash] for a key is calculated once, and that value is reused again and again when creating dictionaries. Because all the information required to create the hash table used by `JKDictionary` is already determined at the time the `JKDictionary` object is instantiated, populating the `JKDictionary` is now a very tight loop that only has to call [`-isEqual:`][-isEqual:] on the rare occasions that the JSON being parsed contains duplicate keys. Since the functions that handle this logic are all declared `static` and are internal to JSONKit, the compiler can heavily optimize this code.
What does this mean in terms of performance? JSONKit was already fast, but now, it's even faster. Below is some benchmark times for [`twitter_public_timeline.json`][twitter_public_timeline.json] in [samsoffes / json-benchmarks](https://github.com/samsoffes/json-benchmarks), where _read_ means to convert the JSON to native Objective-C objects, and _write_ means to convert the native Objective-C to JSON&mdash;
<pre>
v1.3 read : min: 456.000 us, avg: 460.056 us, char/s: 53341332.36 / 50.870 MB/s
v1.3 write: min: 150.000 us, avg: 151.816 us, char/s: 161643041.58 / 154.155 MB/s</pre>
<pre>
v1.4 read : min: 285.000 us, avg: 288.603 us, char/s: 85030301.14 / 81.091 MB/s
v1.4 write: min: 127.000 us, avg: 129.617 us, char/s: 189327017.29 / 180.556 MB/s</pre>
JSONKit v1.4 is nearly 60% faster at reading and 17% faster at writing than v1.3.
The following is the JSON test file taken from the project available at [this blog post](http://psionides.jogger.pl/2010/12/12/cocoa-json-parsing-libraries-part-2/). The keys and information contained in the JSON was anonymized with random characters. Since JSONKit relies on its recently instantiated object cache for a lot of its performance, this JSON happens to be "the worst corner case possible".
<pre>
v1.3 read : min: 5222.000 us, avg: 5262.344 us, char/s: 15585260.10 / 14.863 MB/s
v1.3 write: min: 1253.000 us, avg: 1259.914 us, char/s: 65095712.88 / 62.080 MB/s</pre>
<pre>
v1.4 read : min: 4096.000 us, avg: 4122.240 us, char/s: 19895736.30 / 18.974 MB/s
v1.4 write: min: 1319.000 us, avg: 1335.538 us, char/s: 61409709.05 / 58.565 MB/s</pre>
JSONKit v1.4 is 28% faster at reading and 6% faster at writing that v1.3 in this worst-case torture test.
While your milage may vary, you will likely see improvements in the 50% for reading and 10% for writing on your real world JSON. The nature of JSONKits cache means performance improvements is statistical in nature and depends on the particular properties of the JSON being parsed.
For comparison, [json-framework][], a popular Objective-C JSON parsing library, turns in the following benchmark times for [`twitter_public_timeline.json`][twitter_public_timeline.json]&mdash;
<pre>
&#x200b; read : min: 1670.000 us, avg: 1682.461 us, char/s: 14585776.43 / 13.910 MB/s
&#x200b; write: min: 1021.000 us, avg: 1028.970 us, char/s: 23849091.81 / 22.744 MB/s</pre>
Since the benchmark for JSONKit and [json-framework][] was done on the same computer, it's safe to compare the timing results. The version of [json-framework][] used was the latest v3.0 available via the master branch at the time of this writing on github.com.
JSONKit v1.4 is 483% faster at reading and 694% faster at writing than [json-framework][].
### Other Changes
* Added a `__clang_analyzer__` pre-processor conditional around some code that the `clang` static analyzer was giving false positives for. However, `clang` versions &le; 1.5 do not define `__clang_analyzer__` and therefore will continue to emit analyzer warnings.
* The cache now uses a Galois Linear Feedback Shift Register PRNG to select which item in the cache to randomly age. This should age items in the cache more fairly.
* To promote better L1 cache locality, the cache age structure was rearranged slightly along with modifying when an item is randomly chosen to be aged.
* Removed a lot of internal and private data structures from `JSONKit.h` and put them in `JSONKit.m`.
* Modified the way floating point values are serialized. Previously, the [`printf`][printf] format conversion `%.16g` was used. This was changed to `%.17g` which should theoretically allow for up to a full `float`, or [IEEE 754 Single 32-bit floating-point][Single Precision], of precision when converting floating point values to decimal representation.
* The usual sundry of inconsequential tidies and what not, such as updating the `README.md`, etc.
* The catagory additions to the Cocoa classes were changed from `JSONKit` to `JSONKitDeserializing` and `JSONKitSerializing`, as appropriate.
## Version 1.3 2011/05/02
### New Features
* Added the `JK_ENABLE_CF_TRANSFER_OWNERSHIP_CALLBACKS` pre-processor define flag.
This is typically enabled by adding `-DJK_ENABLE_CF_TRANSFER_OWNERSHIP_CALLBACKS` to the compilers command line arguments or in `Xcode.app` by adding `JK_ENABLE_CF_TRANSFER_OWNERSHIP_CALLBACKS` to a projects / targets `Pre-Processor Macros` settings.
The `JK_ENABLE_CF_TRANSFER_OWNERSHIP_CALLBACKS` option enables the use of custom Core Foundation collection call backs which omit the [`CFRetain`][CFRetain] calls. This results in saving several [`CFRetain`][CFRetain] and [`CFRelease`][CFRelease] calls typically needed for every single object from the parsed JSON. While the author has used this technique for years without any issues, an unexpected interaction with the Foundation [`-mutableCopy`][-mutableCopy] method and Core Foundation Toll-Free Bridging resulting in a condition in which the objects contained in the collection to be over released. This problem does not occur with the use of [`-copy`][-copy] due to the fact that the objects created by JSONKit are immutable, and therefore [`-copy`][-copy] does not require creating a completely new object and copying the contents, instead [`-copy`][-copy] simply returns a [`-retain`][-retain]'d version of the immutable object which is significantly faster along with the obvious reduction in memory usage.
Prior to version 1.3, JSONKit always used custom "Transfer of Ownership Collection Callbacks", and thus `JK_ENABLE_CF_TRANSFER_OWNERSHIP_CALLBACKS` was effectively implicitly defined.
Beginning with version 1.3, the default behavior of JSONKit is to use the standard Core Foundation collection callbacks ([`kCFTypeArrayCallBacks`][kCFTypeArrayCallBacks], [`kCFTypeDictionaryKeyCallBacks`][kCFTypeDictionaryKeyCallBacks], and [`kCFTypeDictionaryValueCallBacks`][kCFTypeDictionaryValueCallBacks]). The intention is to follow "the principle of least surprise", and the author believes the use of the standard Core Foundation collection callbacks as the default behavior for JSONKit results in the least surprise.
**NOTE**: `JK_ENABLE_CF_TRANSFER_OWNERSHIP_CALLBACKS` is only applicable to `(CF|NS)` `Dictionary` and `Array` class objects.
For the vast majority of users, the author believes JSONKits custom "Transfer of Ownership Collection Callbacks" will not cause any problems. As previously stated, the author has used this technique in performance critical code for years and has never had a problem. Until a user reported a problem with [`-mutableCopy`][-mutableCopy], the author was unaware that the use of the custom callbacks could even cause a problem. This is probably due to the fact that the vast majority of time the typical usage pattern tends to be "iterate the contents of the collection" and very rarely mutate the returned collection directly (although this last part is likely to vary significantly from programmer to programmer). The author tends to avoid the use of [`-mutableCopy`][-mutableCopy] as it results in a significant performance and memory consumption penalty. The reason for this is in "typical" Cocoa coding patterns, using [`-mutableCopy`][-mutableCopy] will instantiate an identical, albeit mutable, version of the original object. This requires both memory for the new object and time to iterate the contents of the original object and add them to the new object. Furthermore, under "typical" Cocoa coding patterns, the original collection object continues to consume memory until the autorelease pool is released. However, clearly there are cases where the use of [`-mutableCopy`][-mutableCopy] makes sense or may be used by an external library which is out of your direct control.
The use of the standard Core Foundation collection callbacks results in a 9% to 23% reduction in parsing performance, with an "eye-balled average" of around 13% according to some benchmarking done by the author using Real World&trade; JSON (i.e., actual JSON from various web services, such as Twitter, etc) using `gcc-4.2 -arch x86_64 -O3 -DNS_BLOCK_ASSERTIONS` with the only change being the addition of `-DJK_ENABLE_CF_TRANSFER_OWNERSHIP_CALLBACKS`.
`JK_ENABLE_CF_TRANSFER_OWNERSHIP_CALLBACKS` is only applicable to parsing / deserializing (i.e. converting from) of JSON. Serializing (i.e., converting to JSON) is completely unaffected by this change.
### Bug Fixes
* Fixed a [bug report regarding `-mutableCopy`](https://github.com/johnezang/JSONKit/issues#issue/3). This is related to the addition of the pre-processor define flag `JK_ENABLE_CF_TRANSFER_OWNERSHIP_CALLBACKS`.
### Other Changes
* Added `JK_EXPECTED` optimization hints around several conditionals.
* When serializing objects, JSONKit first starts with a small, on stack buffer. If the encoded JSON exceeds the size of the stack buffer, JSONKit switches to a heap allocated buffer. If JSONKit switched to a heap allocated buffer, [`CFDataCreateWithBytesNoCopy`][CFDataCreateWithBytesNoCopy] is used to create the [`NSData`][NSData] object, which in most cases causes the heap allocated buffer to "transfer" to the [`NSData`][NSData] object which is substantially faster than allocating a new buffer and copying the bytes.
* Added a pre-processor check in `JSONKit.m` to see if Objective-C Garbage Collection is enabled and issue a `#error` notice that JSONKit does not support Objective-C Garbage Collection.
* Various other minor or trivial modifications, such as updating `README.md`.
### Other Issues
* When using the `clang` static analyzer (the version used at the time of this writing was `Apple clang version 1.5 (tags/Apple/clang-60)`), the static analyzer reports a number of problems with `JSONKit.m`.
The author has investigated these issues and determined that the problems reported by the current version of the static analyzer are "false positives". Not only that, the reported problems are not only "false positives", they are very clearly and obviously wrong. Therefore, the author has made the decision that no action will be taken on these non-problems, which includes not modifying the code for the sole purpose of silencing the static analyzer. The justification for this is "the dog wags the tail, not the other way around."
## Version 1.2 2011/01/08
### Bug Fixes
* When JSONKit attempted to parse and decode JSON that contained `{"key": value}` dictionaries that contained the same key more than once would likely result in a crash. This was a serious bug.
* Under some conditions, JSONKit could potentially leak memory.
* There was an off by one error in the code that checked whether or not the parser was at the end of the `UTF8` buffer. This could result in JSONKit reading one by past the buffer bounds in some cases.
### Other Changes
* Some of the methods were missing `NULL` pointer checks for some of their arguments. This was fixed. In generally, when JSONKit encounters invalid arguments, it throws a `NSInvalidArgumentException` exception.
* Various other minor changes such as tightening up numeric literals with `UL` or `L` qualification, assertion check tweaks and additions, etc.
* The README.md file was updated with additional information.
### Version 1.1
No change log information was kept for versions prior to 1.2.
[bugtracker]: https://github.com/johnezang/JSONKit/issues
[RFC 4627]: http://tools.ietf.org/html/rfc4627
[twitter_public_timeline.json]: https://github.com/samsoffes/json-benchmarks/blob/master/Resources/twitter_public_timeline.json
[json-framework]: https://github.com/stig/json-framework
[Single Precision]: http://en.wikipedia.org/wiki/Single_precision
[kCFTypeArrayCallBacks]: http://developer.apple.com/library/mac/documentation/CoreFoundation/Reference/CFArrayRef/Reference/reference.html#//apple_ref/c/data/kCFTypeArrayCallBacks
[kCFTypeDictionaryKeyCallBacks]: http://developer.apple.com/library/mac/documentation/CoreFoundation/Reference/CFDictionaryRef/Reference/reference.html#//apple_ref/c/data/kCFTypeDictionaryKeyCallBacks
[kCFTypeDictionaryValueCallBacks]: http://developer.apple.com/library/mac/documentation/CoreFoundation/Reference/CFDictionaryRef/Reference/reference.html#//apple_ref/c/data/kCFTypeDictionaryValueCallBacks
[CFRetain]: http://developer.apple.com/library/mac/documentation/CoreFoundation/Reference/CFTypeRef/Reference/reference.html#//apple_ref/c/func/CFRetain
[CFRelease]: http://developer.apple.com/library/mac/documentation/CoreFoundation/Reference/CFTypeRef/Reference/reference.html#//apple_ref/c/func/CFRelease
[CFDataCreateWithBytesNoCopy]: http://developer.apple.com/library/mac/documentation/CoreFoundation/Reference/CFDataRef/Reference/reference.html#//apple_ref/c/func/CFDataCreateWithBytesNoCopy
[CFArray]: http://developer.apple.com/library/mac/#documentation/CoreFoundation/Reference/CFArrayRef/Reference/reference.html
[CFDictionary]: http://developer.apple.com/library/mac/#documentation/CoreFoundation/Reference/CFDictionaryRef/Reference/reference.html
[CFDictionaryCreate]: http://developer.apple.com/library/mac/documentation/CoreFoundation/Reference/CFDictionaryRef/Reference/reference.html#//apple_ref/c/func/CFDictionaryCreate
[-mutableCopy]: http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html%23//apple_ref/occ/instm/NSObject/mutableCopy
[-copy]: http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html%23//apple_ref/occ/instm/NSObject/copy
[-retain]: http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Protocols/NSObject_Protocol/Reference/NSObject.html#//apple_ref/occ/intfm/NSObject/retain
[-release]: http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Protocols/NSObject_Protocol/Reference/NSObject.html#//apple_ref/occ/intfm/NSObject/release
[-isEqual:]: http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Protocols/NSObject_Protocol/Reference/NSObject.html#//apple_ref/occ/intfm/NSObject/isEqual:
[-hash]: http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Protocols/NSObject_Protocol/Reference/NSObject.html#//apple_ref/occ/intfm/NSObject/hash
[NSArray]: http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/index.html
[NSMutableArray]: http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSMutableArray_Class/index.html
[-insertObject:atIndex:]: http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSMutableArray_Class/Reference/Reference.html#//apple_ref/occ/instm/NSMutableArray/insertObject:atIndex:
[-removeObjectAtIndex:]: http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSMutableArray_Class/Reference/Reference.html#//apple_ref/occ/instm/NSMutableArray/removeObjectAtIndex:
[-replaceObjectAtIndex:withObject:]: http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSMutableArray_Class/Reference/Reference.html#//apple_ref/occ/instm/NSMutableArray/replaceObjectAtIndex:withObject:
[NSDictionary]: http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSDictionary_Class/index.html
[NSMutableDictionary]: http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSMutableDictionary_Class/index.html
[-setObject:forKey:]: http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSMutableDictionary_Class/Reference/Reference.html#//apple_ref/occ/instm/NSMutableDictionary/setObject:forKey:
[-removeObjectForKey:]: http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSMutableDictionary_Class/Reference/Reference.html#//apple_ref/occ/instm/NSMutableDictionary/removeObjectForKey:
[NSData]: http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/index.html
[NSFastEnumeration]: http://developer.apple.com/library/mac/documentation/Cocoa/Reference/NSFastEnumeration_protocol/Reference/NSFastEnumeration.html
[NSString]: http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/index.html
[printf]: http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man3/printf.3.html
[memmove]: http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man3/memmove.3.html

260
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/ext/PrefixedJSONKit/PJSONKit.h

@ -1,260 +0,0 @@
//
// JSONKit.h
// http://github.com/johnezang/JSONKit
// Dual licensed under either the terms of the BSD License, or alternatively
// under the terms of the Apache License, Version 2.0, as specified below.
//
/*
Copyright (c) 2011, John Engelhart
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Zang Industries nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
Copyright 2011 John Engelhart
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include <stddef.h>
#include <stdint.h>
#include <limits.h>
#include <TargetConditionals.h>
#include <AvailabilityMacros.h>
#ifdef __OBJC__
#import <Foundation/NSArray.h>
#import <Foundation/NSData.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSError.h>
#import <Foundation/NSObjCRuntime.h>
#import <Foundation/NSString.h>
#endif // __OBJC__
#ifdef __cplusplus
extern "C" {
#endif
// For Mac OS X < 10.5.
#ifndef NSINTEGER_DEFINED
#define NSINTEGER_DEFINED
#if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
typedef long NSInteger;
typedef unsigned long NSUInteger;
#define NSIntegerMin LONG_MIN
#define NSIntegerMax LONG_MAX
#define NSUIntegerMax ULONG_MAX
#else // defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
typedef int NSInteger;
typedef unsigned int NSUInteger;
#define NSIntegerMin INT_MIN
#define NSIntegerMax INT_MAX
#define NSUIntegerMax UINT_MAX
#endif // defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
#endif // NSINTEGER_DEFINED
#ifndef _PREFIXEDJSONKIT_H_
#define _PREFIXEDJSONKIT_H_
#ifdef JSONKIT_PREFIX
#define _JSONKIT_CONCAT2(c, d) c ## d
#define _JSONKIT_CONCAT(a, b) _JSONKIT_CONCAT2(a, b)
#define JSONKIT_PREPEND(x) _JSONKIT_CONCAT(JSONKIT_PREFIX, x)
#define _JSONKIT_STRINGIFY2(x) #x
#define JSONKIT_STRINGIFY(x) _JSONKIT_STRINGIFY2(x)
#else
#define JSONKIT_PREPEND(x) x
#endif
#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__APPLE_CC__) && (__APPLE_CC__ >= 5465)
#define PJK_DEPRECATED_ATTRIBUTE __attribute__((deprecated))
#else
#define PJK_DEPRECATED_ATTRIBUTE
#endif
#define PREFIXEDJSONKIT_VERSION_MAJOR 1
#define PREFIXEDJSONKIT_VERSION_MINOR 4
typedef NSUInteger JSONKIT_PREPEND(JKFlags);
/*
JKParseOptionComments : Allow C style // and /_* ... *_/ (without a _, obviously) comments in JSON.
JKParseOptionUnicodeNewlines : Allow Unicode recommended (?:\r\n|[\n\v\f\r\x85\p{Zl}\p{Zp}]) newlines.
JKParseOptionLooseUnicode : Normally the decoder will stop with an error at any malformed Unicode.
This option allows JSON with malformed Unicode to be parsed without reporting an error.
Any malformed Unicode is replaced with \uFFFD, or "REPLACEMENT CHARACTER".
*/
enum {
JSONKIT_PREPEND(JKParseOptionNone) = 0,
JSONKIT_PREPEND(JKParseOptionStrict) = 0,
JSONKIT_PREPEND(JKParseOptionComments) = (1 << 0),
JSONKIT_PREPEND(JKParseOptionUnicodeNewlines) = (1 << 1),
JSONKIT_PREPEND(JKParseOptionLooseUnicode) = (1 << 2),
JSONKIT_PREPEND(JKParseOptionPermitTextAfterValidJSON) = (1 << 3),
JSONKIT_PREPEND(JKParseOptionValidFlags) = (JSONKIT_PREPEND(JKParseOptionComments) | JSONKIT_PREPEND(JKParseOptionUnicodeNewlines) | JSONKIT_PREPEND(JKParseOptionLooseUnicode) | JSONKIT_PREPEND(JKParseOptionPermitTextAfterValidJSON)),
};
typedef JSONKIT_PREPEND(JKFlags) JSONKIT_PREPEND(JKParseOptionFlags);
enum {
JSONKIT_PREPEND(JKSerializeOptionNone) = 0,
JSONKIT_PREPEND(JKSerializeOptionPretty) = (1 << 0),
JSONKIT_PREPEND(JKSerializeOptionEscapeUnicode) = (1 << 1),
JSONKIT_PREPEND(JKSerializeOptionEscapeForwardSlashes) = (1 << 4),
JSONKIT_PREPEND(JKSerializeOptionValidFlags) = (JSONKIT_PREPEND(JKSerializeOptionPretty) | JSONKIT_PREPEND(JKSerializeOptionEscapeUnicode) | JSONKIT_PREPEND(JKSerializeOptionEscapeForwardSlashes)),
};
typedef JSONKIT_PREPEND(JKFlags) JSONKIT_PREPEND(JKSerializeOptionFlags);
#ifdef __OBJC__
typedef struct JSONKIT_PREPEND(JKParseState) JSONKIT_PREPEND(JKParseState); // Opaque internal, private type.
// As a general rule of thumb, if you use a method that doesn't accept a JKParseOptionFlags argument, it defaults to JKParseOptionStrict
@interface JSONKIT_PREPEND(JSONDecoder) : NSObject {
JSONKIT_PREPEND(JKParseState) *parseState;
}
+ (id)decoder;
+ (id)decoderWithParseOptions:(JSONKIT_PREPEND(JKParseOptionFlags))parseOptionFlags;
- (id)initWithParseOptions:(JSONKIT_PREPEND(JKParseOptionFlags))parseOptionFlags;
- (void)clearCache;
// The parse... methods were deprecated in v1.4 in favor of the v1.4 objectWith... methods.
- (id)parseUTF8String:(const unsigned char *)string length:(size_t)length PJK_DEPRECATED_ATTRIBUTE; // Deprecated in JSONKit v1.4. Use objectWithUTF8String:length: instead.
- (id)parseUTF8String:(const unsigned char *)string length:(size_t)length error:(NSError **)error PJK_DEPRECATED_ATTRIBUTE; // Deprecated in JSONKit v1.4. Use objectWithUTF8String:length:error: instead.
// The NSData MUST be UTF8 encoded JSON.
- (id)parseJSONData:(NSData *)jsonData PJK_DEPRECATED_ATTRIBUTE; // Deprecated in JSONKit v1.4. Use objectWithData: instead.
- (id)parseJSONData:(NSData *)jsonData error:(NSError **)error PJK_DEPRECATED_ATTRIBUTE; // Deprecated in JSONKit v1.4. Use objectWithData:error: instead.
// Methods that return immutable collection objects.
- (id)objectWithUTF8String:(const unsigned char *)string length:(NSUInteger)length;
- (id)objectWithUTF8String:(const unsigned char *)string length:(NSUInteger)length error:(NSError **)error;
// The NSData MUST be UTF8 encoded JSON.
- (id)objectWithData:(NSData *)jsonData;
- (id)objectWithData:(NSData *)jsonData error:(NSError **)error;
// Methods that return mutable collection objects.
- (id)mutableObjectWithUTF8String:(const unsigned char *)string length:(NSUInteger)length;
- (id)mutableObjectWithUTF8String:(const unsigned char *)string length:(NSUInteger)length error:(NSError **)error;
// The NSData MUST be UTF8 encoded JSON.
- (id)mutableObjectWithData:(NSData *)jsonData;
- (id)mutableObjectWithData:(NSData *)jsonData error:(NSError **)error;
@end
////////////
#pragma mark Deserializing methods
////////////
@interface NSString (JSONKIT_PREPEND(JSONKitDeserializing))
- (id)JSONKIT_PREPEND(objectFromJSONString);
- (id)JSONKIT_PREPEND(objectFromJSONStringWithParseOptions):(JSONKIT_PREPEND(JKParseOptionFlags))parseOptionFlags;
- (id)JSONKIT_PREPEND(objectFromJSONStringWithParseOptions):(JSONKIT_PREPEND(JKParseOptionFlags))parseOptionFlags error:(NSError **)error;
- (id)JSONKIT_PREPEND(mutableObjectFromJSONString);
- (id)JSONKIT_PREPEND(mutableObjectFromJSONStringWithParseOptions):(JSONKIT_PREPEND(JKParseOptionFlags))parseOptionFlags;
- (id)JSONKIT_PREPEND(mutableObjectFromJSONStringWithParseOptions):(JSONKIT_PREPEND(JKParseOptionFlags))parseOptionFlags error:(NSError **)error;
@end
@interface NSData (JSONKIT_PREPEND(JSONKitDeserializing))
// The NSData MUST be UTF8 encoded JSON.
- (id)JSONKIT_PREPEND(objectFromJSONData);
- (id)JSONKIT_PREPEND(objectFromJSONDataWithParseOptions):(JSONKIT_PREPEND(JKParseOptionFlags))parseOptionFlags;
- (id)JSONKIT_PREPEND(objectFromJSONDataWithParseOptions):(JSONKIT_PREPEND(JKParseOptionFlags))parseOptionFlags error:(NSError **)error;
- (id)JSONKIT_PREPEND(mutableObjectFromJSONData);
- (id)JSONKIT_PREPEND(mutableObjectFromJSONDataWithParseOptions):(JSONKIT_PREPEND(JKParseOptionFlags))parseOptionFlags;
- (id)JSONKIT_PREPEND(mutableObjectFromJSONDataWithParseOptions):(JSONKIT_PREPEND(JKParseOptionFlags))parseOptionFlags error:(NSError **)error;
@end
////////////
#pragma mark Serializing methods
////////////
@interface NSString (JSONKIT_PREPEND(JSONKitSerializing))
// Convenience methods for those that need to serialize the receiving NSString (i.e., instead of having to serialize a NSArray with a single NSString, you can "serialize to JSON" just the NSString).
// Normally, a string that is serialized to JSON has quotation marks surrounding it, which you may or may not want when serializing a single string, and can be controlled with includeQuotes:
// includeQuotes:YES `a "test"...` -> `"a \"test\"..."`
// includeQuotes:NO `a "test"...` -> `a \"test\"...`
- (NSData *)JSONKIT_PREPEND(JSONData); // Invokes JSONDataWithOptions:JKSerializeOptionNone includeQuotes:YES
- (NSData *)JSONKIT_PREPEND(JSONDataWithOptions):(JSONKIT_PREPEND(JKSerializeOptionFlags))serializeOptions includeQuotes:(BOOL)includeQuotes error:(NSError **)error;
- (NSString *)JSONKIT_PREPEND(JSONString); // Invokes JSONStringWithOptions:JKSerializeOptionNone includeQuotes:YES
- (NSString *)JSONKIT_PREPEND(JSONStringWithOptions):(JSONKIT_PREPEND(JKSerializeOptionFlags))serializeOptions includeQuotes:(BOOL)includeQuotes error:(NSError **)error;
@end
@interface NSArray (JSONKIT_PREPEND(JSONKitSerializing))
- (NSData *)JSONKIT_PREPEND(JSONData);
- (NSData *)JSONKIT_PREPEND(JSONDataWithOptions):(JSONKIT_PREPEND(JKSerializeOptionFlags))serializeOptions error:(NSError **)error;
- (NSData *)JSONKIT_PREPEND(JSONDataWithOptions):(JSONKIT_PREPEND(JKSerializeOptionFlags))serializeOptions serializeUnsupportedClassesUsingDelegate:(id)delegate selector:(SEL)selector error:(NSError **)error;
- (NSString *)JSONKIT_PREPEND(JSONString);
- (NSString *)JSONKIT_PREPEND(JSONStringWithOptions):(JSONKIT_PREPEND(JKSerializeOptionFlags))serializeOptions error:(NSError **)error;
- (NSString *)JSONKIT_PREPEND(JSONStringWithOptions):(JSONKIT_PREPEND(JKSerializeOptionFlags))serializeOptions serializeUnsupportedClassesUsingDelegate:(id)delegate selector:(SEL)selector error:(NSError **)error;
@end
@interface NSDictionary (JSONKIT_PREPEND(JSONKitSerializing))
- (NSData *)JSONKIT_PREPEND(JSONData);
- (NSData *)JSONKIT_PREPEND(JSONDataWithOptions):(JSONKIT_PREPEND(JKSerializeOptionFlags))serializeOptions error:(NSError **)error;
- (NSData *)JSONKIT_PREPEND(JSONDataWithOptions):(JSONKIT_PREPEND(JKSerializeOptionFlags))serializeOptions serializeUnsupportedClassesUsingDelegate:(id)delegate selector:(SEL)selector error:(NSError **)error;
- (NSString *)JSONKIT_PREPEND(JSONString);
- (NSString *)JSONKIT_PREPEND(JSONStringWithOptions):(JSONKIT_PREPEND(JKSerializeOptionFlags))serializeOptions error:(NSError **)error;
- (NSString *)JSONKIT_PREPEND(JSONStringWithOptions):(JSONKIT_PREPEND(JKSerializeOptionFlags))serializeOptions serializeUnsupportedClassesUsingDelegate:(id)delegate selector:(SEL)selector error:(NSError **)error;
@end
#ifdef __BLOCKS__
@interface NSArray (JSONKIT_PREPEND(JSONKitSerializingBlockAdditions))
- (NSData *)JSONKIT_PREPEND(JSONDataWithOptions):(JSONKIT_PREPEND(JKSerializeOptionFlags))serializeOptions serializeUnsupportedClassesUsingBlock:(id(^)(id object))block error:(NSError **)error;
- (NSString *)JSONKIT_PREPEND(JSONStringWithOptions):(JSONKIT_PREPEND(JKSerializeOptionFlags))serializeOptions serializeUnsupportedClassesUsingBlock:(id(^)(id object))block error:(NSError **)error;
@end
@interface NSDictionary (JSONKIT_PREPEND(JSONKitSerializingBlockAdditions))
- (NSData *)JSONKIT_PREPEND(JSONDataWithOptions):(JSONKIT_PREPEND(JKSerializeOptionFlags))serializeOptions serializeUnsupportedClassesUsingBlock:(id(^)(id object))block error:(NSError **)error;
- (NSString *)JSONKIT_PREPEND(JSONStringWithOptions):(JSONKIT_PREPEND(JKSerializeOptionFlags))serializeOptions serializeUnsupportedClassesUsingBlock:(id(^)(id object))block error:(NSError **)error;
@end
#endif
#endif // __OBJC__
#endif // _PREFIXEDJSONKIT_H_
#ifdef __cplusplus
} // extern "C"
#endif

3084
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/ext/PrefixedJSONKit/PJSONKit.m

File diff suppressed because it is too large Load Diff

316
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/ext/PrefixedJSONKit/README.md

@ -1,316 +0,0 @@
# PrefixedJSONKit
PrefixedJSONKit is a fork of JSONKit which prefixes the symbols in JSONKit for easy embedding in static libraries to avoid conflicts with other uses of JSONKit in the same binary.
To use, set a preprocessor macro for `JSONKIT_PREFIX`, for example: `JSONKIT_PREFIX=EXAMPLE_`. Now, all external JSONKit symbols will be prefixed with "EXAMPLE_", so `JSONDecoder` would become `EXAMPLE_JSONDecoder`.
# JSONKit
JSONKit is dual licensed under either the terms of the BSD License, or alternatively under the terms of the Apache License, Version 2.0.<br />
Copyright &copy; 2011, John Engelhart.
### A Very High Performance Objective-C JSON Library
**UPDATE:** (2011/12/18) The benchmarks below were performed before Apples [`NSJSONSerialization`][NSJSONSerialization] was available (as of Mac OS X 10.7 and iOS 5). The obvious question is: Which is faster, [`NSJSONSerialization`][NSJSONSerialization] or JSONKit? According to [this site](http://www.bonto.ch/blog/2011/12/08/json-libraries-for-ios-comparison-updated/), JSONKit is faster than [`NSJSONSerialization`][NSJSONSerialization]. Some quick "back of the envelope" calculations using the numbers reported, JSONKit appears to be approximately 25% to 40% faster than [`NSJSONSerialization`][NSJSONSerialization], which is pretty significant.
Parsing | Serializing
:---------:|:-------------:
<img src="http://chart.googleapis.com/chart?chf=a,s,000000%7Cb0,lg,0,6589C760,0,6589C7B4,1%7Cbg,lg,90,EFEFEF,0,F8F8F8,1&chxl=0:%7CTouchJSON%7CXML+.plist%7Cjson-framework%7CYAJL-ObjC%7Cgzip+JSONKit%7CBinary+.plist%7CJSONKit%7C2:%7CTime+to+Deserialize+in+%C2%B5sec&chxp=2,40&chxr=0,0,5%7C1,0,3250&chxs=0,676767,11.5,1,lt,676767&chxt=y,x,x&chbh=a,5,4&chs=350x185&cht=bhs&chco=6589C783&chds=0,3250&chd=t:410.517,510.262,539.614,1351.257,1683.346,1747.953,2955.881&chg=-1,0,1,3&chm=N+*s*+%C2%B5s,676767,0,0:5,10.5%7CN+*s*+%C2%B5s,3d3d3d,0,6,10.5,,r:-5:1&chem=y;s=text_outline;d=666,10.5,l,fff,_,Decompress+%2b+Parse+is+just;ds=0;dp=2;py=0;of=58,7%7Cy;s=text_outline;d=666,10.5,l,fff,_,5.6%25+slower+than+Binary+.plist%21;ds=0;dp=2;py=0;of=53,-5" width="350" height="185" alt="Deserialize from JSON" /> | <img src="http://chart.googleapis.com/chart?chf=a,s,000000%7Cb0,lg,0,699E7260,0,699E72B4,1%7Cbg,lg,90,EFEFEF,0,F8F8F8,1&chxl=0:%7CTouchJSON%7CYAJL-ObjC%7CXML+.plist%7Cjson-framework%7CBinary+.plist%7Cgzip+JSONKit%7CJSONKit%7C2:%7CTime+to+Serialize+in+%C2%B5sec&chxp=2,40&chxr=0,0,5%7C1,0,3250&chxs=0,676767,11.5,1,lt,676767&chxt=y,x,x&chbh=a,5,4&chs=350x175&cht=bhs&chco=699E7284&chds=0,3250&chd=t:96.387,466.947,626.153,1028.432,1945.511,2156.978,3051.976&chg=-1,0,1,3&chm=N+*s*+%C2%B5s,676767,0,0:5,10.5%7CN+*s*+%C2%B5s,4d4d4d,0,6,10.5,,r:-5:1&chem=y;s=text_outline;d=666,10.5,l,fff,_,Serialize+%2b+Compress+is+34%25;ds=0;dp=1;py=0;of=51,7%7Cy;s=text_outline;d=666,10.5,l,fff,_,faster+than+Binary+.plist%21;ds=0;dp=1;py=0;of=62,-5" width="350" height="185" alt="Serialize to JSON" />
*23% Faster than Binary* <code><em>.plist</em></code>*&thinsp;!* | *549% Faster than Binary* <code><em>.plist</em></code>*&thinsp;!*
* Benchmarking was performed on a MacBook Pro with a 2.66GHz Core 2.
* All JSON libraries were compiled with `gcc-4.2 -DNS_BLOCK_ASSERTIONS -O3 -arch x86_64`.
* Timing results are the average of 1,000 iterations of the user + system time reported by [`getrusage`][getrusage].
* The JSON used was [`twitter_public_timeline.json`](https://github.com/samsoffes/json-benchmarks/blob/master/Resources/twitter_public_timeline.json) from [samsoffes / json-benchmarks](https://github.com/samsoffes/json-benchmarks).
* Since the `.plist` format does not support serializing [`NSNull`][NSNull], the `null` values in the original JSON were changed to `"null"`.
* The [experimental](https://github.com/johnezang/JSONKit/tree/experimental) branch contains the `gzip` compression changes.
* JSONKit automagically links to `libz.dylib` on the fly at run time&ndash; no manual linking required.
* Parsing / deserializing will automagically decompress a buffer if it detects a `gzip` signature header.
* You can compress / `gzip` the serialized JSON by passing `JKSerializeOptionCompress` to `-JSONDataWithOptions:error:`.
[JSON versus PLIST, the Ultimate Showdown](http://www.cocoanetics.com/2011/03/json-versus-plist-the-ultimate-showdown/) benchmarks the common JSON libraries and compares them to Apples `.plist` format.
***
JavaScript Object Notation, or [JSON][], is a lightweight, text-based, serialization format for structured data that is used by many web-based services and API's. It is defined by [RFC 4627][].
JSON provides the following primitive types:
* `null`
* Boolean `true` and `false`
* Number
* String
* Array
* Object (a.k.a. Associative Arrays, Key / Value Hash Tables, Maps, Dictionaries, etc.)
These primitive types are mapped to the following Objective-C Foundation classes:
JSON | Objective-C
-------------------|-------------
`null` | [`NSNull`][NSNull]
`true` and `false` | [`NSNumber`][NSNumber]
Number | [`NSNumber`][NSNumber]
String | [`NSString`][NSString]
Array | [`NSArray`][NSArray]
Object | [`NSDictionary`][NSDictionary]
JSONKit uses Core Foundation internally, and it is assumed that Core Foundation &equiv; Foundation for every equivalent base type, i.e. [`CFString`][CFString] &equiv; [`NSString`][NSString].
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC 2119][].
### JSON To Objective-C Primitive Mapping Details
* The [JSON specification][RFC 4627] is somewhat ambiguous about the details and requirements when it comes to Unicode, and it does not specify how Unicode issues and errors should be handled. Most of the ambiguity stems from the interpretation and scope [RFC 4627][] Section 3, Encoding: `JSON text SHALL be encoded in Unicode.` It is the authors opinion and interpretation that the language of [RFC 4627][] requires that a JSON implementation MUST follow the requirements specified in the [Unicode Standard][], and in particular the [Conformance][Unicode Standard - Conformance] chapter of the [Unicode Standard][], which specifies requirements related to handling, interpreting, and manipulating Unicode text.
The default behavior for JSONKit is strict [RFC 4627][] conformance. It is the authors opinion and interpretation that [RFC 4627][] requires JSON to be encoded in Unicode, and therefore JSON that is not legal Unicode as defined by the [Unicode Standard][] is invalid JSON. Therefore, JSONKit will not accept JSON that contains ill-formed Unicode. The default, strict behavior implies that the `JKParseOptionLooseUnicode` option is not enabled.
When the `JKParseOptionLooseUnicode` option is enabled, JSONKit follows the specifications and recommendations given in [The Unicode 6.0 standard, Chapter 3 - Conformance][Unicode Standard - Conformance], section 3.9 *Unicode Encoding Forms*. As a general rule of thumb, the Unicode code point `U+FFFD` is substituted for any ill-formed Unicode encountered. JSONKit attempts to follow the recommended *Best Practice for Using U+FFFD*: ***Replace each maximal subpart of an ill-formed subsequence by a single U+FFFD.***
The following Unicode code points are treated as ill-formed Unicode, and if `JKParseOptionLooseUnicode` is enabled, cause `U+FFFD` to be substituted in their place:
`U+0000`.<br>
`U+D800` thru `U+DFFF`, inclusive.<br>
`U+FDD0` thru `U+FDEF`, inclusive.<br>
<code>U+<i>n</i>FFFE</code> and <code>U+<i>n</i>FFFF</code>, where *n* is from `0x0` to `0x10`
The code points `U+FDD0` thru `U+FDEF`, <code>U+<i>n</i>FFFE</code>, and <code>U+<i>n</i>FFFF</code> (where *n* is from `0x0` to `0x10`), are defined as ***Noncharacters*** by the Unicode standard and "should never be interchanged".
An exception is made for the code point `U+0000`, which is legal Unicode. The reason for this is that this particular code point is used by C string handling code to specify the end of the string, and any such string handling code will incorrectly stop processing a string at the point where `U+0000` occurs. Although reasonable people may have different opinions on this point, it is the authors considered opinion that the risks of permitting JSON Strings that contain `U+0000` outweigh the benefits. One of the risks in allowing `U+0000` to appear unaltered in a string is that it has the potential to create security problems by subtly altering the semantics of the string which can then be exploited by a malicious attacker. This is similar to the issue of [arbitrarily deleting characters from Unicode text][Unicode_UTR36_Deleting].
[RFC 4627][] allows for these limitations under section 4, Parsers: `An implementation may set limits on the length and character contents of strings.` While the [Unicode Standard][] permits the mutation of the original JSON (i.e., substituting `U+FFFD` for ill-formed Unicode), [RFC 4627][] is silent on this issue. It is the authors opinion and interpretation that [RFC 4627][], section 3 &ndash; *Encoding*, `JSON text SHALL be encoded in Unicode.` implies that such mutations are not only permitted but MUST be expected by any strictly conforming [RFC 4627][] JSON implementation. The author feels obligated to note that this opinion and interpretation may not be shared by others and, in fact, may be a minority opinion and interpretation. You should be aware that any mutation of the original JSON may subtly alter its semantics and, as a result, may have security related implications for anything that consumes the final result.
It is important to note that JSONKit will not delete characters from the JSON being parsed as this is a [requirement specified by the Unicode Standard][Unicode_UTR36_Deleting]. Additional information can be found in the [Unicode Security FAQ][Unicode_Security_FAQ] and [Unicode Technical Report #36 - Unicode Security Consideration][Unicode_UTR36], in particular the section on [non-visual security][Unicode_UTR36_NonVisualSecurity].
* The [JSON specification][RFC 4627] does not specify the details or requirements for JSON String values, other than such strings must consist of Unicode code points, nor does it specify how errors should be handled. While JSONKit makes an effort (subject to the reasonable caveats above regarding Unicode) to preserve the parsed JSON String exactly, it can not guarantee that [`NSString`][NSString] will preserve the exact Unicode semantics of the original JSON String.
JSONKit does not perform any form of Unicode Normalization on the parsed JSON Strings, but can not make any guarantees that the [`NSString`][NSString] class will not perform Unicode Normalization on the parsed JSON String used to instantiate the [`NSString`][NSString] object. The [`NSString`][NSString] class may place additional restrictions or otherwise transform the JSON String in such a way so that the JSON String is not bijective with the instantiated [`NSString`][NSString] object. In other words, JSONKit can not guarantee that when you round trip a JSON String to a [`NSString`][NSString] and then back to a JSON String that the two JSON Strings will be exactly the same, even though in practice they are. For clarity, "exactly" in this case means bit for bit identical. JSONKit can not even guarantee that the two JSON Strings will be [Unicode equivalent][Unicode_equivalence], even though in practice they will be and would be the most likely cause for the two round tripped JSON Strings to no longer be bit for bit identical.
* JSONKit maps `true` and `false` to the [`CFBoolean`][CFBoolean] values [`kCFBooleanTrue`][kCFBooleanTrue] and [`kCFBooleanFalse`][kCFBooleanFalse], respectively. Conceptually, [`CFBoolean`][CFBoolean] values can be thought of, and treated as, [`NSNumber`][NSNumber] class objects. The benefit to using [`CFBoolean`][CFBoolean] is that `true` and `false` JSON values can be round trip deserialized and serialized without conversion or promotion to a [`NSNumber`][NSNumber] with a value of `0` or `1`.
* The [JSON specification][RFC 4627] does not specify the details or requirements for JSON Number values, nor does it specify how errors due to conversion should be handled. In general, JSONKit will not accept JSON that contains JSON Number values that it can not convert with out error or loss of precision.
For non-floating-point numbers (i.e., JSON Number values that do not include a `.` or `e|E`), JSONKit uses a 64-bit C primitive type internally, regardless of whether the target architecture is 32-bit or 64-bit. For unsigned values (i.e., those that do not begin with a `-`), this allows for values up to <code>2<sup>64</sup>-1</code> and up to <code>-2<sup>63</sup></code> for negative values. As a special case, the JSON Number `-0` is treated as a floating-point number since the underlying floating-point primitive type is capable of representing a negative zero, whereas the underlying twos-complement non-floating-point primitive type can not. JSON that contains Number values that exceed these limits will fail to parse and optionally return a [`NSError`][NSError] object. The functions [`strtoll()`][strtoll] and [`strtoull()`][strtoull] are used to perform the conversions.
The C `double` primitive type, or [IEEE 754 Double 64-bit floating-point][Double Precision], is used to represent floating-point JSON Number values. JSON that contains floating-point Number values that can not be represented as a `double` (i.e., due to over or underflow) will fail to parse and optionally return a [`NSError`][NSError] object. The function [`strtod()`][strtod] is used to perform the conversion. Note that the JSON standard does not allow for infinities or `NaN` (Not a Number). The conversion and manipulation of [floating-point values is non-trivial](http://www.validlab.com/goldberg/paper.pdf). Unfortunately, [RFC 4627][] is silent on how such details should be handled. You should not depend on or expect that when a floating-point value is round tripped that it will have the same textual representation or even compare equal. This is true even when JSONKit is used as both the parser and creator of the JSON, let alone when transferring JSON between different systems and implementations.
* For JSON Objects (or [`NSDictionary`][NSDictionary] in JSONKit nomenclature), [RFC 4627][] says `The names within an object SHOULD be unique` (note: `name` is a `key` in JSONKit nomenclature). At this time the JSONKit behavior is `undefined` for JSON that contains names within an object that are not unique. However, JSONKit currently tries to follow a "the last key / value pair parsed is the one chosen" policy. This behavior is not finalized and should not be depended on.
The previously covered limitations regarding JSON Strings have important consequences for JSON Objects since JSON Strings are used as the `key`. The [JSON specification][RFC 4627] does not specify the details or requirements for JSON Strings used as `keys` in JSON Objects, specifically what it means for two `keys` to compare equal. Unfortunately, because [RFC 4627][] states `JSON text SHALL be encoded in Unicode.`, this means that one must use the [Unicode Standard][] to interpret the JSON, and the [Unicode Standard][] allows for strings that are encoded with different Unicode Code Points to "compare equal". JSONKit uses [`NSString`][NSString] exclusively to manage the parsed JSON Strings. Because [`NSString`][NSString] uses [Unicode][Unicode Standard] as its basis, there exists the possibility that [`NSString`][NSString] may subtly and silently convert the Unicode Code Points contained in the original JSON String in to a [Unicode equivalent][Unicode_equivalence] string. Due to this, the JSONKit behavior for JSON Strings used as `keys` in JSON Objects that may be [Unicode equivalent][Unicode_equivalence] but not binary equivalent is `undefined`.
**See also:**<br />
&nbsp;&nbsp;&nbsp;&nbsp;[W3C - Requirements for String Identity Matching and String Indexing](http://www.w3.org/TR/charreq/#sec2)
### Objective-C To JSON Primitive Mapping Details
* When serializing, the top level container, and all of its children, are required to be *strictly* [invariant][wiki_invariant] during enumeration. This property is used to make certain optimizations, such as if a particular object has already been serialized, the result of the previous serialized `UTF8` string can be reused (i.e., the `UTF8` string of the previous serialization can simply be copied instead of performing all the serialization work again). While this is probably only of interest to those who are doing extraordinarily unusual things with the run-time or custom classes inheriting from the classes that JSONKit will serialize (i.e, a custom object whose value mutates each time it receives a message requesting its value for serialization), it also covers the case where any of the objects to be serialized are mutated during enumeration (i.e., mutated by another thread). The number of times JSONKit will request an objects value is non-deterministic, from a minimum of once up to the number of times it appears in the serialized JSON&ndash; therefore an object MUST NOT depend on receiving a message requesting its value each time it appears in the serialized output. The behavior is `undefined` if these requirements are violated.
* The objects to be serialized MUST be acyclic. If the objects to be serialized contain circular references the behavior is `undefined`. For example,
```objective-c
[arrayOne addObject:arrayTwo];
[arrayTwo addObject:arrayOne];
id json = [arrayOne JSONString];
```
&hellip; will result in `undefined` behavior.
* The contents of [`NSString`][NSString] objects are encoded as `UTF8` and added to the serialized JSON. JSONKit assumes that [`NSString`][NSString] produces well-formed `UTF8` Unicode and does no additional validation of the conversion. When `JKSerializeOptionEscapeUnicode` is enabled, JSONKit will encode Unicode code points that can be encoded as a single `UTF16` code unit as <code>\u<i>XXXX</i></code>, and will encode Unicode code points that require `UTF16` surrogate pairs as <code>\u<i>high</i>\u<i>low</i></code>. While JSONKit makes every effort to serialize the contents of a [`NSString`][NSString] object exactly, modulo any [RFC 4627][] requirements, the [`NSString`][NSString] class uses the [Unicode Standard][] as its basis for representing strings. You should be aware that the [Unicode Standard][] defines [string equivalence][Unicode_equivalence] in a such a way that two strings that compare equal are not required to be bit for bit identical. Therefore there exists the possibility that [`NSString`][NSString] may mutate a string in such a way that it is [Unicode equivalent][Unicode_equivalence], but not bit for bit identical with the original string.
* The [`NSDictionary`][NSDictionary] class allows for any object, which can be of any class, to be used as a `key`. JSON, however, only permits Strings to be used as `keys`. Therefore JSONKit will fail with an error if it encounters a [`NSDictionary`][NSDictionary] that contains keys that are not [`NSString`][NSString] objects during serialization. More specifically, the keys must return `YES` when sent [`-isKindOfClass:[NSString class]`][-isKindOfClass:].
* JSONKit will fail with an error if it encounters an object that is not a [`NSNull`][NSNull], [`NSNumber`][NSNumber], [`NSString`][NSString], [`NSArray`][NSArray], or [`NSDictionary`][NSDictionary] class object during serialization. More specifically, JSONKit will fail with an error if it encounters an object where [`-isKindOfClass:`][-isKindOfClass:] returns `NO` for all of the previously mentioned classes.
* JSON does not allow for Numbers that are <code>&plusmn;Infinity</code> or <code>&plusmn;NaN</code>. Therefore JSONKit will fail with an error if it encounters a [`NSNumber`][NSNumber] that contains such a value during serialization.
* Objects created with [`[NSNumber numberWithBool:YES]`][NSNumber_numberWithBool] and [`[NSNumber numberWithBool:NO]`][NSNumber_numberWithBool] will be mapped to the JSON values of `true` and `false`, respectively. More specifically, an object must have pointer equality with [`kCFBooleanTrue`][kCFBooleanTrue] or [`kCFBooleanFalse`][kCFBooleanFalse] (i.e., `if((id)object == (id)kCFBooleanTrue)`) in order to be mapped to the JSON values `true` and `false`.
* [`NSNumber`][NSNumber] objects that are not booleans (as defined above) are sent [`-objCType`][-objCType] to determine what type of C primitive type they represent. Those that respond with a type from the set `cislq` are treated as `long long`, those that respond with a type from the set `CISLQB` are treated as `unsigned long long`, and those that respond with a type from the set `fd` are treated as `double`. [`NSNumber`][NSNumber] objects that respond with a type not in the set of types mentioned will cause JSONKit to fail with an error.
More specifically, [`CFNumberGetValue(object, kCFNumberLongLongType, &longLong)`][CFNumberGetValue] is used to retrieve the value of both the signed and unsigned integer values, and the type reported by [`-objCType`][-objCType] is used to determine whether the result is signed or unsigned. For floating-point values, [`CFNumberGetValue`][CFNumberGetValue] is used to retrieve the value using [`kCFNumberDoubleType`][kCFNumberDoubleType] for the type argument.
Floating-point numbers are converted to their decimal representation using the [`printf`][printf] format conversion specifier `%.17g`. Theoretically this allows up to a `float`, or [IEEE 754 Single 32-bit floating-point][Single Precision], worth of precision to be represented. This means that for practical purposes, `double` values are converted to `float` values with the associated loss of precision. The [RFC 4627][] standard is silent on how floating-point numbers should be dealt with and the author has found that real world JSON implementations vary wildly in how they handle this issue. Furthermore, the `%g` format conversion specifier may convert floating-point values that can be exactly represented as an integer to a textual representation that does not include a `.` or `e`&ndash; essentially silently promoting a floating-point value to an integer value (i.e, `5.0` becomes `5`). Because of these and many other issues surrounding the conversion and manipulation of floating-point values, you should not expect or depend on floating point values to maintain their full precision, or when round tripped, to compare equal.
### Reporting Bugs
Please use the [github.com JSONKit Issue Tracker](https://github.com/johnezang/JSONKit/issues) to report bugs.
The author requests that you do not file a bug report with JSONKit regarding problems reported by the `clang` static analyzer unless you first manually verify that it is an actual, bona-fide problem with JSONKit and, if appropriate, is not "legal" C code as defined by the C99 language specification. If the `clang` static analyzer is reporting a problem with JSONKit that is not an actual, bona-fide problem and is perfectly legal code as defined by the C99 language specification, then the appropriate place to file a bug report or complaint is with the developers of the `clang` static analyzer.
### Important Details
* JSONKit is not designed to be used with the Mac OS X Garbage Collection. The behavior of JSONKit when compiled with `-fobjc-gc` is `undefined`. It is extremely unlikely that Mac OS X Garbage Collection will ever be supported.
* JSONKit is not designed to be used with [Objective-C Automatic Reference Counting (ARC)][ARC]. The behavior of JSONKit when compiled with `-fobjc-arc` is `undefined`. The behavior of JSONKit compiled without [ARC][] mixed with code that has been compiled with [ARC][] is normatively `undefined` since at this time no analysis has been done to understand if this configuration is safe to use. At this time, there are no plans to support [ARC][] in JSONKit. Although tenative, it is extremely unlikely that [ARC][] will ever be supported, for many of the same reasons that Mac OS X Garbage Collection is not supported.
* The JSON to be parsed by JSONKit MUST be encoded as Unicode. In the unlikely event you end up with JSON that is not encoded as Unicode, you must first convert the JSON to Unicode, preferably as `UTF8`. One way to accomplish this is with the [`NSString`][NSString] methods [`-initWithBytes:length:encoding:`][NSString_initWithBytes] and [`-initWithData:encoding:`][NSString_initWithData].
* Internally, the low level parsing engine uses `UTF8` exclusively. The `JSONDecoder` method `-objectWithData:` takes a [`NSData`][NSData] object as its argument and it is assumed that the raw bytes contained in the [`NSData`][NSData] is `UTF8` encoded, otherwise the behavior is `undefined`.
* It is not safe to use the same instantiated `JSONDecoder` object from multiple threads at the same time. If you wish to share a `JSONDecoder` between threads, you are responsible for adding mutex barriers to ensure that only one thread is decoding JSON using the shared `JSONDecoder` object at a time.
### Tips for speed
* Enable the `NS_BLOCK_ASSERTIONS` pre-processor flag. JSONKit makes heavy use of [`NSCParameterAssert()`][NSCParameterAssert] internally to ensure that various arguments, variables, and other state contains only legal and expected values. If an assertion check fails it causes a run time exception that will normally cause a program to terminate. These checks and assertions come with a price: they take time to execute and do not contribute to the work being performed. It is perfectly safe to enable `NS_BLOCK_ASSERTIONS` as JSONKit always performs checks that are required for correct operation. The checks performed with [`NSCParameterAssert()`][NSCParameterAssert] are completely optional and are meant to be used in "debug" builds where extra integrity checks are usually desired. While your mileage may vary, the author has found that adding `-DNS_BLOCK_ASSERTIONS` to an `-O2` optimization setting can generally result in an approximate <span style="white-space: nowrap;">7-12%</span> increase in performance.
* Since the very low level parsing engine works exclusively with `UTF8` byte streams, anything that is not already encoded as `UTF8` must first be converted to `UTF8`. While JSONKit provides additions to the [`NSString`][NSString] class which allows you to conveniently convert JSON contained in a [`NSString`][NSString], this convenience does come with a price. JSONKit must allocate an autoreleased [`NSMutableData`][NSMutableData] large enough to hold the strings `UTF8` conversion and then convert the string to `UTF8` before it can begin parsing. This takes both memory and time. Once the parsing has finished, JSONKit sets the autoreleased [`NSMutableData`][NSMutableData] length to `0`, which allows the [`NSMutableData`][NSMutableData] to release the memory. This helps to minimize the amount of memory that is in use but unavailable until the autorelease pool pops. Therefore, if speed and memory usage are a priority, you should avoid using the [`NSString`][NSString] convenience methods if possible.
* If you are receiving JSON data from a web server, and you are able to determine that the raw bytes returned by the web server is JSON encoded as `UTF8`, you should use the `JSONDecoder` method `-objectWithUTF8String:length:` which immediately begins parsing the pointers bytes. In practice, every JSONKit method that converts JSON to an Objective-C object eventually calls this method to perform the conversion.
* If you are using one of the various ways provided by the `NSURL` family of classes to receive JSON results from a web server, which typically return the results in the form of a [`NSData`][NSData] object, and you are able to determine that the raw bytes contained in the [`NSData`][NSData] are encoded as `UTF8`, then you should use either the `JSONDecoder` method `objectWithData:` or the [`NSData`][NSData] method `-objectFromJSONData`. If are going to be converting a lot of JSON, the better choice is to instantiate a `JSONDecoder` object once and use the same instantiated object to perform all your conversions. This has two benefits:
1. The [`NSData`][NSData] method `-objectFromJSONData` creates an autoreleased `JSONDecoder` object to perform the one time conversion. By instantiating a `JSONDecoder` object once and using the `objectWithData:` method repeatedly, you can avoid this overhead.
2. The instantiated object cache from the previous JSON conversion is reused. This can result in both better performance and a reduction in memory usage if the JSON your are converting is very similar. A typical example might be if you are converting JSON at periodic intervals that consists of real time status updates.
* On average, the <code>JSONData&hellip;</code> methods are nearly four times faster than the <code>JSONString&hellip;</code> methods when serializing a [`NSDictionary`][NSDictionary] or [`NSArray`][NSArray] to JSON. The difference in speed is due entirely to the instantiation overhead of [`NSString`][NSString].
* If at all possible, use [`NSData`][NSData] instead of [`NSString`][NSString] methods when processing JSON. This avoids the sometimes significant conversion overhead that [`NSString`][NSString] performs in order to provide an object oriented interface for its contents. For many uses, using [`NSString`][NSString] is not needed and results in wasted effort&ndash; for example, using JSONKit to serialize a [`NSDictionary`][NSDictionary] or [`NSArray`][NSArray] to a [`NSString`][NSString]. This [`NSString`][NSString] is then passed to a method that sends the JSON to a web server, and this invariably requires converting the [`NSString`][NSString] to [`NSData`][NSData] before it can be sent. In this case, serializing the collection object directly to [`NSData`][NSData] would avoid the unnecessary conversions to and from a [`NSString`][NSString] object.
### Parsing Interface
#### JSONDecoder Interface
The <code>objectWith&hellip;</code> methods return immutable collection objects and their respective <code>mutableObjectWith&hellip;</code> methods return mutable collection objects.
**Note:** The bytes contained in a [`NSData`][NSData] object ***MUST*** be `UTF8` encoded.
**Important:** Methods will raise [`NSInvalidArgumentException`][NSInvalidArgumentException] if `parseOptionFlags` is not valid.
**Important:** `objectWithUTF8String:` and `mutableObjectWithUTF8String:` will raise [`NSInvalidArgumentException`][NSInvalidArgumentException] if `string` is `NULL`.
**Important:** `objectWithData:` and `mutableObjectWithData:` will raise [`NSInvalidArgumentException`][NSInvalidArgumentException] if `jsonData` is `NULL`.
```objective-c
+ (id)decoder;
+ (id)decoderWithParseOptions:(JKParseOptionFlags)parseOptionFlags;
- (id)initWithParseOptions:(JKParseOptionFlags)parseOptionFlags;
- (void)clearCache;
- (id)objectWithUTF8String:(const unsigned char *)string length:(size_t)length;
- (id)objectWithUTF8String:(const unsigned char *)string length:(size_t)length error:(NSError **)error;
- (id)mutableObjectWithUTF8String:(const unsigned char *)string length:(size_t)length;
- (id)mutableObjectWithUTF8String:(const unsigned char *)string length:(size_t)length error:(NSError **)error;
- (id)objectWithData:(NSData *)jsonData;
- (id)objectWithData:(NSData *)jsonData error:(NSError **)error;
- (id)mutableObjectWithData:(NSData *)jsonData;
- (id)mutableObjectWithData:(NSData *)jsonData error:(NSError **)error;
```
#### NSString Interface
```objective-c
- (id)objectFromJSONString;
- (id)objectFromJSONStringWithParseOptions:(JKParseOptionFlags)parseOptionFlags;
- (id)objectFromJSONStringWithParseOptions:(JKParseOptionFlags)parseOptionFlags error:(NSError **)error;
- (id)mutableObjectFromJSONString;
- (id)mutableObjectFromJSONStringWithParseOptions:(JKParseOptionFlags)parseOptionFlags;
- (id)mutableObjectFromJSONStringWithParseOptions:(JKParseOptionFlags)parseOptionFlags error:(NSError **)error;
```
#### NSData Interface
```objective-c
- (id)objectFromJSONData;
- (id)objectFromJSONDataWithParseOptions:(JKParseOptionFlags)parseOptionFlags;
- (id)objectFromJSONDataWithParseOptions:(JKParseOptionFlags)parseOptionFlags error:(NSError **)error;
- (id)mutableObjectFromJSONData;
- (id)mutableObjectFromJSONDataWithParseOptions:(JKParseOptionFlags)parseOptionFlags;
- (id)mutableObjectFromJSONDataWithParseOptions:(JKParseOptionFlags)parseOptionFlags error:(NSError **)error;
```
#### JKParseOptionFlags
<table>
<tr><th>Parsing Option</th><th>Description</th></tr>
<tr><td valign="top"><code>JKParseOptionNone</code></td><td>This is the default if no other other parse option flags are specified, and the option used when a convenience method does not provide an argument for explicitly specifying the parse options to use. Synonymous with <code>JKParseOptionStrict</code>.</td></tr>
<tr><td valign="top"><code>JKParseOptionStrict</code></td><td>The JSON will be parsed in strict accordance with the <a href="http://tools.ietf.org/html/rfc4627">RFC 4627</a> specification.</td></tr>
<tr><td valign="top"><code>JKParseOptionComments</code></td><td>Allow C style <code>//</code> and <code>/* &hellip; */</code> comments in JSON. This is a fairly common extension to JSON, but JSON that contains C style comments is not strictly conforming JSON.</td></tr>
<tr><td valign="top"><code>JKParseOptionUnicodeNewlines</code></td><td>Allow Unicode recommended <code>(?:\r\n|[\n\v\f\r\x85\p{Zl}\p{Zp}])</code> newlines in JSON. The <a href="http://tools.ietf.org/html/rfc4627">JSON specification</a> only allows the newline characters <code>\r</code> and <code>\n</code>, but this option allows JSON that contains the <a href="http://en.wikipedia.org/wiki/Newline#Unicode">Unicode recommended newline characters</a> to be parsed. JSON that contains these additional newline characters is not strictly conforming JSON.</td></tr>
<tr><td valign="top"><code>JKParseOptionLooseUnicode</code></td><td>Normally the decoder will stop with an error at any malformed Unicode. This option allows JSON with malformed Unicode to be parsed without reporting an error. Any malformed Unicode is replaced with <code>\uFFFD</code>, or <code>REPLACEMENT CHARACTER</code>, as specified in <a href="http://www.unicode.org/versions/Unicode6.0.0/ch03.pdf">The Unicode 6.0 standard, Chapter 3</a>, section 3.9 <em>Unicode Encoding Forms</em>.</td></tr>
<tr><td valign="top"><code>JKParseOptionPermitTextAfterValidJSON</code></td><td>Normally, <code>non-white-space</code> that follows the JSON is interpreted as a parsing failure. This option allows for any trailing <code>non-white-space</code> to be ignored and not cause a parsing error.</td></tr>
</table>
### Serializing Interface
The serializing interface includes [`NSString`][NSString] convenience methods for those that need to serialize a single [`NSString`][NSString]. For those that need this functionality, the [`NSString`][NSString] additions are much more convenient than having to wrap a single [`NSString`][NSString] in a [`NSArray`][NSArray], which then requires stripping the unneeded `[`&hellip;`]` characters from the serialized JSON result. When serializing a single [`NSString`][NSString], you can control whether or not the serialized JSON result is surrounded by quotation marks using the `includeQuotes:` argument:
Example | Result | Argument
--------------|-------------------|--------------------
`a "test"...` | `"a \"test\"..."` | `includeQuotes:YES`
`a "test"...` | `a \"test\"...` | `includeQuotes:NO`
**Note:** The [`NSString`][NSString] methods that do not include a `includeQuotes:` argument behave as if invoked with `includeQuotes:YES`.
**Note:** The bytes contained in the returned [`NSData`][NSData] object are `UTF8` encoded.
#### NSArray and NSDictionary Interface
```objective-c
- (NSData *)JSONData;
- (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions error:(NSError **)error;
- (NSString *)JSONString;
- (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions error:(NSError **)error;
```
#### NSString Interface
```objective-c
- (NSData *)JSONData;
- (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions includeQuotes:(BOOL)includeQuotes error:(NSError **)error;
- (NSString *)JSONString;
- (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions includeQuotes:(BOOL)includeQuotes error:(NSError **)error;
```
#### JKSerializeOptionFlags
<table>
<tr><th>Serializing Option</th><th>Description</th></tr>
<tr><td valign="top"><code>JKSerializeOptionNone</code></td><td>This is the default if no other other serialize option flags are specified, and the option used when a convenience method does not provide an argument for explicitly specifying the serialize options to use.</td></tr>
<tr><td valign="top"><code>JKSerializeOptionPretty</code></td><td>Normally the serialized JSON does not include any unnecessary <code>white-space</code>. While this form is the most compact, the lack of any <code>white-space</code> means that it's something only another JSON parser could love. Enabling this option causes JSONKit to add additional <code>white-space</code> that makes it easier for people to read. Other than the extra <code>white-space</code>, the serialized JSON is identical to the JSON that would have been produced had this option not been enabled.</td></tr>
<tr><td valign="top"><code>JKSerializeOptionEscapeUnicode</code></td><td>When JSONKit encounters Unicode characters in <a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/index.html"><code>NSString</code></a> objects, the default behavior is to encode those Unicode characters as <code>UTF8</code>. This option causes JSONKit to encode those characters as <code>\u<i>XXXX</i></code>. For example,<br/><code>["w&isin;L&#10234;y(&#8739;y&#8739;&le;&#8739;w&#8739;)"]</code><br/>becomes:<br/><code>["w\u2208L\u27fa\u2203y(\u2223y\u2223\u2264\u2223w\u2223)"]</code></td></tr>
<tr><td valign="top"><code>JKSerializeOptionEscapeForwardSlashes</code></td><td>According to the <a href="http://tools.ietf.org/html/rfc4627">JSON specification</a>, the <code>/</code> (<code>U+002F</code>) character may be backslash escaped (i.e., <code>\/</code>), but it is not required. The default behavior of JSONKit is to <b><i>not</i></b> backslash escape the <code>/</code> character. Unfortunately, it was found some real world implementations of the <a href="http://weblogs.asp.net/bleroy/archive/2008/01/18/dates-and-json.aspx">ASP.NET Date Format</a> require the date to be <i>strictly</i> encoded as <code>\/Date(...)\/</code>, and the only way to achieve this is through the use of <code>JKSerializeOptionEscapeForwardSlashes</code>. See <a href="https://github.com/johnezang/JSONKit/issues/21">github issue #21</a> for more information.</td></tr>
</table>
[JSON]: http://www.json.org/
[RFC 4627]: http://tools.ietf.org/html/rfc4627
[RFC 2119]: http://tools.ietf.org/html/rfc2119
[Single Precision]: http://en.wikipedia.org/wiki/Single_precision_floating-point_format
[Double Precision]: http://en.wikipedia.org/wiki/Double_precision_floating-point_format
[wiki_invariant]: http://en.wikipedia.org/wiki/Invariant_(computer_science)
[ARC]: http://clang.llvm.org/docs/AutomaticReferenceCounting.html
[CFBoolean]: http://developer.apple.com/mac/library/documentation/CoreFoundation/Reference/CFBooleanRef/index.html
[kCFBooleanTrue]: http://developer.apple.com/mac/library/documentation/CoreFoundation/Reference/CFBooleanRef/Reference/reference.html#//apple_ref/doc/c_ref/kCFBooleanTrue
[kCFBooleanFalse]: http://developer.apple.com/mac/library/documentation/CoreFoundation/Reference/CFBooleanRef/Reference/reference.html#//apple_ref/doc/c_ref/kCFBooleanFalse
[kCFNumberDoubleType]: http://developer.apple.com/library/mac/documentation/CoreFoundation/Reference/CFNumberRef/Reference/reference.html#//apple_ref/doc/c_ref/kCFNumberDoubleType
[CFNumberGetValue]: http://developer.apple.com/library/mac/documentation/CoreFoundation/Reference/CFNumberRef/Reference/reference.html#//apple_ref/c/func/CFNumberGetValue
[Unicode Standard]: http://www.unicode.org/versions/Unicode6.0.0/
[Unicode Standard - Conformance]: http://www.unicode.org/versions/Unicode6.0.0/ch03.pdf
[Unicode_equivalence]: http://en.wikipedia.org/wiki/Unicode_equivalence
[UnicodeNewline]: http://en.wikipedia.org/wiki/Newline#Unicode
[Unicode_UTR36]: http://www.unicode.org/reports/tr36/
[Unicode_UTR36_NonVisualSecurity]: http://www.unicode.org/reports/tr36/#Canonical_Represenation
[Unicode_UTR36_Deleting]: http://www.unicode.org/reports/tr36/#Deletion_of_Noncharacters
[Unicode_Security_FAQ]: http://www.unicode.org/faq/security.html
[NSNull]: http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSNull_Class/index.html
[NSNumber]: http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/index.html
[NSNumber_numberWithBool]: http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/Reference/Reference.html#//apple_ref/occ/clm/NSNumber/numberWithBool:
[NSString]: http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/index.html
[NSString_initWithBytes]: http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html#//apple_ref/occ/instm/NSString/initWithBytes:length:encoding:
[NSString_initWithData]: http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html#//apple_ref/occ/instm/NSString/initWithData:encoding:
[NSString_UTF8String]: http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html#//apple_ref/occ/instm/NSString/UTF8String
[NSArray]: http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/index.html
[NSDictionary]: http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSDictionary_Class/index.html
[NSError]: http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSError_Class/index.html
[NSData]: http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/index.html
[NSMutableData]: http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSMutableData_Class/index.html
[NSInvalidArgumentException]: http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Constants/Reference/reference.html#//apple_ref/doc/c_ref/NSInvalidArgumentException
[CFString]: http://developer.apple.com/library/mac/#documentation/CoreFoundation/Reference/CFStringRef/Reference/reference.html
[NSCParameterAssert]: http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Functions/Reference/reference.html#//apple_ref/c/macro/NSCParameterAssert
[-mutableCopy]: http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html%23//apple_ref/occ/instm/NSObject/mutableCopy
[-isKindOfClass:]: http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Protocols/NSObject_Protocol/Reference/NSObject.html%23//apple_ref/occ/intfm/NSObject/isKindOfClass:
[-objCType]: http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/Reference/Reference.html#//apple_ref/occ/instm/NSNumber/objCType
[strtoll]: http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man3/strtoll.3.html
[strtod]: http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man3/strtod.3.html
[strtoull]: http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man3/strtoull.3.html
[getrusage]: http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man2/getrusage.2.html
[printf]: http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man3/printf.3.html
[NSJSONSerialization]: http://developer.apple.com/library/ios/#documentation/Foundation/Reference/NSJSONSerialization_Class/Reference/Reference.html

8
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/resources/ApptentiveResources/Info.plist

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ATInfoDistributionKey</key>
<string>source</string>
</dict>
</plist>

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/resources/localization/English.lproj/Localizable.strings

Binary file not shown.

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/resources/localization/de.lproj/Localizable.strings

Binary file not shown.

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/resources/localization/es.lproj/Localizable.strings

Binary file not shown.

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/resources/localization/ja.lproj/Localizable.strings

Binary file not shown.

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/resources/localization/pt.lproj/Localizable.strings

Binary file not shown.

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/resources/localization/ru.lproj/Localizable.strings

Binary file not shown.

BIN
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/resources/localization/zh-Hans.lproj/Localizable.strings

Binary file not shown.

95
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/ATConnect.h

@ -1,95 +0,0 @@
//
// ATConnect.h
// ApptentiveConnect
//
// Created by Andrew Wooster on 3/12/11.
// Copyright 2011 Apptentive, Inc.. All rights reserved.
//
#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
#elif TARGET_OS_MAC
#import <Cocoa/Cocoa.h>
#endif
#define kATConnectVersionString @"0.4.12"
#if TARGET_OS_IPHONE
#define kATConnectPlatformString @"iOS"
@class ATFeedbackController;
#elif TARGET_OS_MAC
#define kATConnectPlatformString @"Mac OS X"
@class ATFeedbackWindowController;
#endif
typedef enum {
ATFeedbackControllerDefault,
ATFeedbackControllerSimple
} ATFeedbackControllerType;
@interface ATConnect : NSObject {
@private
#if TARGET_OS_IPHONE
ATFeedbackController *feedbackController;
ATFeedbackController *currentFeedbackController;
#elif TARGET_OS_MAC
ATFeedbackWindowController *feedbackWindowController;
#endif
NSMutableDictionary *additionalFeedbackData;
NSString *apiKey;
BOOL showTagline;
BOOL shouldTakeScreenshot;
BOOL showEmailField;
NSString *initialName;
NSString *initialEmailAddress;
ATFeedbackControllerType feedbackControllerType;
NSString *customPlaceholderText;
}
@property (nonatomic, copy) NSString *apiKey;
@property (nonatomic, assign) BOOL showTagline;
@property (nonatomic, assign) BOOL shouldTakeScreenshot;
@property (nonatomic, assign) BOOL showEmailField;
@property (nonatomic, copy) NSString *initialName;
@property (nonatomic, copy) NSString *initialEmailAddress;
@property (nonatomic, assign) ATFeedbackControllerType feedbackControllerType;
/*! Set this if you want some custom text to appear as a placeholder in the
feedback text box. */
@property (nonatomic, copy) NSString *customPlaceholderText;
+ (ATConnect *)sharedConnection;
#if TARGET_OS_IPHONE
/*!
* Presents a feedback controller in the window of the given view controller.
*/
- (void)presentFeedbackControllerFromViewController:(UIViewController *)viewController;
/*!
* Dismisses the feedback controller. You normally won't need to call this.
*/
- (void)dismissFeedbackControllerAnimated:(BOOL)animated completion:(void (^)(void))completion;
#elif TARGET_OS_MAC
/*!
* Presents a feedback window.
*/
- (IBAction)showFeedbackWindow:(id)sender;
#endif
/*! Adds an additional data field to any feedback sent. */
- (void)addAdditionalInfoToFeedback:(NSObject<NSCoding> *)object withKey:(NSString *)key;
/*! Removes an additional data field from the feedback sent. */
- (void)removeAdditionalInfoFromFeedbackWithKey:(NSString *)key;
/*!
* Returns the NSBundle corresponding to the bundle containing ATConnect's
* images, xibs, strings files, etc.
*/
+ (NSBundle *)resourceBundle;
@end
/*! Replacement for NSLocalizedString within ApptentiveConnect. Pulls
localized strings out of the resource bundle. */
extern NSString *ATLocalizedString(NSString *key, NSString *comment);

206
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/ATConnect.m

@ -1,206 +0,0 @@
//
// ATConnect.m
// ApptentiveConnect
//
// Created by Andrew Wooster on 3/12/11.
// Copyright 2011 Apptentive, Inc.. All rights reserved.
//
#import "ATConnect.h"
#import "ATBackend.h"
#import "ATContactStorage.h"
#import "ATFeedback.h"
#import "ATUtilities.h"
#if TARGET_OS_IPHONE
#import "ATFeedbackController.h"
#elif TARGET_OS_MAC
#import "ATFeedbackWindowController.h"
#endif
@implementation ATConnect
@synthesize apiKey, showTagline, shouldTakeScreenshot, showEmailField, initialName, initialEmailAddress, feedbackControllerType, customPlaceholderText;
+ (ATConnect *)sharedConnection {
static ATConnect *sharedConnection = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
sharedConnection = [[ATConnect alloc] init];
});
return sharedConnection;
}
- (id)init {
if ((self = [super init])) {
self.showEmailField = YES;
self.showTagline = YES;
self.shouldTakeScreenshot = NO;
additionalFeedbackData = [[NSMutableDictionary alloc] init];
}
return self;
}
- (void)dealloc {
#if TARGET_OS_IPHONE
if (feedbackController) {
[feedbackController release];
feedbackController = nil;
}
#elif IF_TARGET_OS_MAC
if (feedbackWindowController) {
[feedbackWindowController release];
feedbackWindowController = nil;
}
#endif
[additionalFeedbackData release], additionalFeedbackData = nil;
[customPlaceholderText release], customPlaceholderText = nil;
[apiKey release], apiKey = nil;
[initialName release], initialName = nil;
[initialEmailAddress release], initialEmailAddress = nil;
[super dealloc];
}
- (void)setApiKey:(NSString *)anAPIKey {
if (apiKey != anAPIKey) {
[apiKey release];
apiKey = nil;
apiKey = [anAPIKey retain];
[[ATBackend sharedBackend] setApiKey:self.apiKey];
}
}
- (NSDictionary *)additionFeedbackInfo {
return additionalFeedbackData;
}
- (void)addAdditionalInfoToFeedback:(NSObject *)object withKey:(NSString *)key {
if ([object isKindOfClass:[NSDate class]]) {
[additionalFeedbackData setObject:[ATUtilities stringRepresentationOfDate:(NSDate *)object] forKey:key];
} else {
[additionalFeedbackData setObject:object forKey:key];
}
}
- (void)removeAdditionalInfoFromFeedbackWithKey:(NSString *)key {
[additionalFeedbackData removeObjectForKey:key];
}
#if TARGET_OS_IPHONE
- (void)presentFeedbackControllerFromViewController:(UIViewController *)viewController {
@synchronized(self) {
if (currentFeedbackController) {
ATLogInfo(@"Apptentive feedback controller already shown.");
return;
}
UIImage *screenshot = nil;
if (![[ATBackend sharedBackend] currentFeedback]) {
ATFeedback *feedback = [[ATFeedback alloc] init];
if (additionalFeedbackData && [additionalFeedbackData count]) {
[feedback addExtraDataFromDictionary:additionalFeedbackData];
}
if (self.initialName && [self.initialName length] > 0) {
feedback.name = self.initialName;
}
if (self.initialEmailAddress && [self.initialEmailAddress length] > 0) {
feedback.email = self.initialEmailAddress;
}
ATContactStorage *contact = [ATContactStorage sharedContactStorage];
if (contact.name && [contact.name length] > 0) {
feedback.name = contact.name;
}
if (contact.phone) {
feedback.phone = contact.phone;
}
if (contact.email && [contact.email length] > 0) {
feedback.email = contact.email;
}
[[ATBackend sharedBackend] setCurrentFeedback:feedback];
[feedback release];
feedback = nil;
}
if ([[ATBackend sharedBackend] currentFeedback]) {
ATFeedback *currentFeedback = [[ATBackend sharedBackend] currentFeedback];
if (self.shouldTakeScreenshot && ![currentFeedback hasScreenshot] && self.feedbackControllerType != ATFeedbackControllerSimple) {
screenshot = [ATUtilities imageByTakingScreenshot];
// Get the rotation of the view hierarchy and rotate the screenshot as
// necessary.
CGFloat rotation = [ATUtilities rotationOfViewHierarchyInRadians:viewController.view];
screenshot = [ATUtilities imageByRotatingImage:screenshot byRadians:rotation];
[currentFeedback setScreenshot:screenshot];
} else if (!self.shouldTakeScreenshot && [currentFeedback hasScreenshot] && (currentFeedback.imageSource == ATFeedbackImageSourceScreenshot)) {
[currentFeedback setScreenshot:nil];
}
}
ATFeedbackController *vc = [[ATFeedbackController alloc] init];
[vc setShowEmailAddressField:self.showEmailField];
if (self.feedbackControllerType == ATFeedbackControllerSimple) {
vc.deleteCurrentFeedbackOnCancel = YES;
}
if (self.customPlaceholderText) {
[vc setCustomPlaceholderText:self.customPlaceholderText];
}
[vc setFeedback:[[ATBackend sharedBackend] currentFeedback]];
[vc presentFromViewController:viewController animated:YES];
currentFeedbackController = vc;
}
}
- (void)dismissFeedbackControllerAnimated:(BOOL)animated completion:(void (^)(void))completion {
[currentFeedbackController dismissAnimated:animated completion:completion];
}
- (void)feedbackControllerDidDismiss {
@synchronized(self) {
[currentFeedbackController release], currentFeedbackController = nil;
}
}
#elif TARGET_OS_MAC
- (IBAction)showFeedbackWindow:(id)sender {
if (![[ATBackend sharedBackend] currentFeedback]) {
ATFeedback *feedback = [[ATFeedback alloc] init];
if (additionalFeedbackData && [additionalFeedbackData count]) {
[feedback addExtraDataFromDictionary:additionalFeedbackData];
}
if (self.initialName && [self.initialName length] > 0) {
feedback.name = self.initialName;
}
if (self.initialEmailAddress && [self.initialEmailAddress length] > 0) {
feedback.email = self.initialEmailAddress;
}
[[ATBackend sharedBackend] setCurrentFeedback:feedback];
[feedback release];
feedback = nil;
}
if (!feedbackWindowController) {
feedbackWindowController = [[ATFeedbackWindowController alloc] initWithFeedback:[[ATBackend sharedBackend] currentFeedback]];
}
[feedbackWindowController showWindow:self];
}
#endif
+ (NSBundle *)resourceBundle {
#ifdef AT_RESOURCE_BUNDLE
NSURL *bundleURL = [[NSBundle mainBundle] URLForResource:@"ApptentiveResources" withExtension:@"bundle"];
NSBundle *bundle = [NSBundle bundleWithURL:bundleURL];
return bundle;
#else
NSBundle *bundle = [NSBundle bundleForClass:[ATConnect class]];
return bundle;
#endif
}
@end
NSString *ATLocalizedString(NSString *key, NSString *comment) {
static NSBundle *bundle = nil;
if (!bundle) {
bundle = [[ATConnect resourceBundle] retain];
}
NSString *result = [bundle localizedStringForKey:key value:key table:nil];
return result;
}

13
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/ATConnect_Private.h

@ -1,13 +0,0 @@
//
// ATConnect_Private.h
// ApptentiveConnect
//
// Created by Andrew Wooster on 1/20/13.
// Copyright (c) 2013 Apptentive, Inc. All rights reserved.
//
#import "ATConnect.h"
@interface ATConnect ()
- (void)feedbackControllerDidDismiss;
@end

8
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/ApptentiveConnect-Prefix.pch

@ -1,8 +0,0 @@
//
// Prefix header for all source files of the 'ApptentiveConnect' target in the 'ApptentiveConnect' project
//
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import "ATLog.h"
#endif

66
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Controllers/ATFeedbackController.h

@ -1,66 +0,0 @@
//
// ATFeedbackController.h
// CustomWindow
//
// Created by Andrew Wooster on 9/24/11.
// Copyright 2011 Apptentive, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "ATSimpleImageViewController.h"
@class ATDefaultTextView;
@class ATFeedback;
@class ATToolbar;
@interface ATFeedbackController : UIViewController <ATSimpleImageViewControllerDelegate, UITextFieldDelegate> {
UIViewController *presentingViewController;
@private
UIStatusBarStyle startingStatusBarStyle;
UIImageView *paperclipView;
UIImageView *paperclipBackgroundView;
UIView *photoFrameContainerView;
UIControl *photoControl;
UIImage *currentImage;
BOOL showEmailAddressField;
BOOL deleteCurrentFeedbackOnCancel;
UIPanGestureRecognizer *photoPanRecognizer;
CGPoint photoDragOffset;
CGAffineTransform photoFrameTransform;
UIWindow *originalPresentingWindow;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UIBarButtonItem *doneButton;
@property (nonatomic, retain) IBOutlet ATToolbar *toolbar;
@property (nonatomic, retain) IBOutlet UIView *redLineView;
@property (nonatomic, retain) IBOutlet UIView *grayLineView;
@property (nonatomic, retain) IBOutlet UIView *backgroundView;
@property (nonatomic, retain) IBOutlet UIScrollView *scrollView;
@property (nonatomic, retain) IBOutlet UITextField *emailField;
@property (nonatomic, retain) IBOutlet UIView *feedbackContainerView;
@property (nonatomic, retain) IBOutlet ATDefaultTextView *feedbackView;
@property (nonatomic, retain) IBOutlet UIControl *logoControl;
@property (nonatomic, retain) IBOutlet UIImageView *logoImageView;
@property (nonatomic, retain) IBOutlet UILabel *taglineLabel;
@property (nonatomic, retain) ATFeedback *feedback;
@property (nonatomic, copy) NSString *customPlaceholderText;
@property (nonatomic, assign) ATFeedbackAttachmentOptions attachmentOptions;
@property (nonatomic, assign) BOOL showEmailAddressField;
@property (nonatomic, assign) BOOL deleteCurrentFeedbackOnCancel;
- (id)init;
- (IBAction)cancelFeedback:(id)sender;
- (IBAction)donePressed:(id)sender;
- (IBAction)photoPressed:(id)sender;
- (IBAction)showInfoView:(id)sender;
- (void)presentFromViewController:(UIViewController *)presentingViewController animated:(BOOL)animated;
- (void)dismissAnimated:(BOOL)animated completion:(void (^)(void))completion;
- (void)dismiss:(BOOL)animated;
- (void)unhide:(BOOL)animated;
@end

1069
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Controllers/ATFeedbackController.m

File diff suppressed because it is too large Load Diff

12
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Controllers/ATFeedbackTypes.h

@ -1,12 +0,0 @@
//
// ATFeedbackTypes.h
// ApptentiveConnect
//
// Created by Andrew Wooster on 10/30/12.
// Copyright (c) 2012 Apptentive, Inc. All rights reserved.
//
typedef enum {
ATFeedbackAllowPhotoAttachment = 1 << 0,
ATFeedbackAllowTakePhotoAttachment = 1 << 1,
} ATFeedbackAttachmentOptions;

30
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Controllers/ATInfoViewController.h

@ -1,30 +0,0 @@
//
// ATInfoViewController.h
// ApptentiveConnect
//
// Created by Andrew Wooster on 5/23/11.
// Copyright 2011 Apptentive, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
@class ATFeedbackController;
/*! View controller for showing information about Apptentive, as well as the
tasks which are currently in progress. */
@interface ATInfoViewController : UIViewController <UITableViewDataSource, UITableViewDelegate> {
IBOutlet UIView *headerView;
IBOutlet UITableViewCell *progressCell;
@private
ATFeedbackController *controller;
NSMutableArray *logicalSections;
}
@property (nonatomic, retain) IBOutlet UITableView *tableView;
@property (retain, nonatomic) IBOutlet UIView *headerView;
- (id)init;
- (id)initWithFeedbackController:(ATFeedbackController *)aController;
- (IBAction)done:(id)sender;
- (IBAction)openApptentiveDotCom:(id)sender;
- (IBAction)openPrivacyPolicy:(id)sender;
@end

274
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Controllers/ATInfoViewController.m

@ -1,274 +0,0 @@
//
// ATInfoViewController.m
// ApptentiveConnect
//
// Created by Andrew Wooster on 5/23/11.
// Copyright 2011 Apptentive, Inc. All rights reserved.
//
#import "ATInfoViewController.h"
#import "ATAPIRequest.h"
#import "ATBackend.h"
#import "ATConnect.h"
#import "ATFeedback.h"
#import "ATFeedbackController.h"
#import "ATFeedbackMetrics.h"
#import "ATFeedbackTask.h"
#import "ATLogViewController.h"
#import "ATTask.h"
#import "ATTaskQueue.h"
enum {
kSectionTasks,
kSectionDebugLog,
kSectionVersion,
};
@interface ATInfoViewController (Private)
- (void)setup;
- (void)teardown;
- (void)reload;
@end
@implementation ATInfoViewController {
BOOL showingDebugController;
}
@synthesize tableView, headerView;
- (id)init {
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
self = [super initWithNibName:@"ATInfoViewController" bundle:[ATConnect resourceBundle]];
} else {
self = [super initWithNibName:@"ATInfoViewController_iPad" bundle:[ATConnect resourceBundle]];
self.modalPresentationStyle = UIModalPresentationFormSheet;
}
return self;
}
- (id)initWithFeedbackController:(ATFeedbackController *)aController {
self = [self init];
controller = [aController retain];
return self;
}
- (void)dealloc {
[logicalSections release], logicalSections = nil;
[controller release], controller = nil;
[self teardown];
[super dealloc];
}
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
#pragma mark - View lifecycle
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
if (showingDebugController) {
showingDebugController = NO;
} else {
[[NSNotificationCenter defaultCenter] postNotificationName:ATFeedbackDidShowWindowNotification object:self userInfo:[NSDictionary dictionaryWithObject:[NSNumber numberWithInt:ATFeedbackWindowTypeInfo] forKey:ATFeedbackWindowTypeKey]];
}
}
- (void)viewDidLoad {
[super viewDidLoad];
[self setup];
}
- (void)viewDidUnload {
[super viewDidUnload];
[headerView release], headerView = nil;
self.tableView = nil;
}
- (void)viewWillDisappear:(BOOL)animated {
if (!showingDebugController) {
if (controller != nil) {
[controller unhide:animated];
[controller release], controller = nil;
}
}
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return YES;
}
- (IBAction)done:(id)sender {
[self dismissModalViewControllerAnimated:YES];
[[NSNotificationCenter defaultCenter] postNotificationName:ATFeedbackDidHideWindowNotification object:self userInfo:[NSDictionary dictionaryWithObject:[NSNumber numberWithInt:ATFeedbackWindowTypeInfo] forKey:ATFeedbackWindowTypeKey]];
}
- (IBAction)openApptentiveDotCom:(id)sender {
[[UIApplication sharedApplication] openURL:[[ATBackend sharedBackend] apptentiveHomepageURL]];
}
- (IBAction)openPrivacyPolicy:(id)sender {
[[UIApplication sharedApplication] openURL:[[ATBackend sharedBackend] apptentivePrivacyPolicyURL]];
}
#pragma mark UITableViewDelegate
- (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSUInteger physicalSection = indexPath.section;
NSUInteger section = [[logicalSections objectAtIndex:physicalSection] integerValue];
if (section == kSectionDebugLog) {
showingDebugController = YES;
ATLogViewController *vc = [[ATLogViewController alloc] init];
UINavigationController *nc = [[UINavigationController alloc] initWithRootViewController:vc];
[self presentModalViewController:nc animated:YES];
[vc release], vc = nil;
[nc release], nc = nil;
}
[aTableView deselectRowAtIndexPath:indexPath animated:YES];
}
#pragma mark UITableViewDataSource
- (NSInteger)tableView:(UITableView *)aTableView numberOfRowsInSection:(NSInteger)physicalSection {
NSUInteger section = [[logicalSections objectAtIndex:physicalSection] integerValue];
if (section == kSectionTasks) {
ATTaskQueue *queue = [ATTaskQueue sharedTaskQueue];
return [queue countOfTasksWithTaskNamesInSet:[NSSet setWithObjects:@"feedback", nil]];
} else if (section == kSectionDebugLog) {
return 1;
} else {
return 0;
}
}
- (UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *taskCellIdentifier = @"ATTaskProgressCellIdentifier";
static NSString *logCellIdentifier = @"ATLogViewCellIdentifier";
UITableViewCell *result = nil;
NSUInteger physicalSection = indexPath.section;
NSUInteger section = [[logicalSections objectAtIndex:physicalSection] integerValue];
if (section == kSectionTasks) {
ATTaskQueue *queue = [ATTaskQueue sharedTaskQueue];
ATTask *task = [queue taskAtIndex:indexPath.row withTaskNameInSet:[NSSet setWithObjects:@"feedback", nil]];
result = [aTableView dequeueReusableCellWithIdentifier:taskCellIdentifier];
if (!result) {
UINib *nib = [UINib nibWithNibName:@"ATTaskProgressCell" bundle:[ATConnect resourceBundle]];
[nib instantiateWithOwner:self options:nil];
result = progressCell;
[[result retain] autorelease];
[progressCell release], progressCell = nil;
}
UILabel *label = (UILabel *)[result viewWithTag:1];
UIProgressView *progressView = (UIProgressView *)[result viewWithTag:2];
UILabel *detailLabel = (UILabel *)[result viewWithTag:4];
if ([task isKindOfClass:[ATFeedbackTask class]]) {
ATFeedbackTask *feedbackTask = (ATFeedbackTask *)task;
label.text = feedbackTask.feedback.text;
} else {
label.text = [task description];
}
if (task.failed) {
detailLabel.hidden = NO;
if (task.lastErrorTitle) {
detailLabel.text = [NSString stringWithFormat:@"Failed: %@", task.lastErrorTitle];
}
progressView.hidden = YES;
} else if (task.inProgress) {
detailLabel.hidden = YES;
progressView.hidden = NO;
progressView.progress = [task percentComplete];
} else {
detailLabel.hidden = NO;
detailLabel.text = @"Waiting…";
progressView.hidden = YES;
}
} else if (section == kSectionDebugLog) {
result = [aTableView dequeueReusableCellWithIdentifier:logCellIdentifier];
if (!result) {
result = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:logCellIdentifier] autorelease];
}
result.textLabel.text = @"View Debug Logs";
} else {
NSAssert(NO, @"Unknown section.");
}
return result;
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)aTableView {
return [logicalSections count];
}
- (NSString *)tableView:(UITableView *)aTableView titleForHeaderInSection:(NSInteger)physicalSection {
NSString *result = nil;
NSUInteger section = [[logicalSections objectAtIndex:physicalSection] integerValue];
if (section == kSectionTasks) {
result = ATLocalizedString(@"Running Tasks", @"Running tasks section header");
}
return result;
}
- (NSString *)tableView:(UITableView *)aTableView titleForFooterInSection:(NSInteger)physicalSection {
NSString *result = nil;
NSUInteger section = [[logicalSections objectAtIndex:physicalSection] integerValue];
if (section == kSectionTasks) {
ATTaskQueue *queue = [ATTaskQueue sharedTaskQueue];
if ([queue count]) {
result = ATLocalizedString(@"These are the pieces of feedback which are currently being submitted.", @"Section footer for feedback being uploaded.");
} else {
result = ATLocalizedString(@"No feedback waiting to upload.", @"Section footer for no feedback being updated.");
}
} else if (section == kSectionVersion) {
result = [NSString stringWithFormat:@"ApptentiveConnect v%@", kATConnectVersionString];
}
return result;
}
@end
@implementation ATInfoViewController (Private)
- (void)setup {
if (headerView) {
[headerView release], headerView = nil;
}
if (logicalSections) {
[logicalSections release], logicalSections = nil;
}
logicalSections = [[NSMutableArray alloc] init];
[logicalSections addObject:@(kSectionTasks)];
#if APPTENTIVE_DEBUG_LOG_VIEWER
[logicalSections addObject:@(kSectionDebugLog)];
#endif
[logicalSections addObject:@(kSectionVersion)];
UIImage *logoImage = [ATBackend imageNamed:@"at_logo_info"];
UINib *nib = [UINib nibWithNibName:@"ATAboutApptentiveView" bundle:[ATConnect resourceBundle]];
[nib instantiateWithOwner:self options:nil];
UIImageView *logoView = (UIImageView *)[headerView viewWithTag:2];
logoView.image = logoImage;
CGRect f = logoView.frame;
f.size = logoImage.size;
logoView.frame = f;
tableView.delegate = self;
tableView.dataSource = self;
tableView.tableHeaderView = self.headerView;
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reload) name:ATAPIRequestStatusChanged object:nil];
}
- (void)teardown {
[[NSNotificationCenter defaultCenter] removeObserver:self];
[headerView release], headerView = nil;
[tableView release], tableView = nil;
}
- (void)reload {
[self.tableView reloadData];
}
@end

16
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Controllers/ATLogViewController.h

@ -1,16 +0,0 @@
//
// ATLogViewController.h
// ApptentiveConnect
//
// Created by Andrew Wooster on 3/6/13.
// Copyright (c) 2013 Apptentive, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ATLogViewController : UIViewController <UITextViewDelegate>
@property (nonatomic, retain) UITextView *textView;
- (IBAction)done:(id)sender;
- (IBAction)reloadLogs:(id)sender;
@end

69
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Controllers/ATLogViewController.m

@ -1,69 +0,0 @@
//
// ATLogViewController.m
// ApptentiveConnect
//
// Created by Andrew Wooster on 3/6/13.
// Copyright (c) 2013 Apptentive, Inc. All rights reserved.
//
#import "ATLogViewController.h"
#import "ATLogger.h"
#import "ATTaskQueue.h"
@implementation ATLogViewController
@synthesize textView;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)dealloc {
[textView removeFromSuperview];
[textView release], textView = nil;
[super dealloc];
}
- (void)viewDidLoad {
[super viewDidLoad];
textView = [[UITextView alloc] initWithFrame:self.view.bounds];
textView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
textView.delegate = self;
textView.showsHorizontalScrollIndicator = YES;
[self.view addSubview:textView];
self.navigationItem.title = @"Debug Logs";
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(done:)];
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(reloadLogs:)];
ATLogInfo(@"%@", [[ATTaskQueue sharedTaskQueue] queueDescription]);
self.textView.text = [[ATLogger sharedLogger] currentLogText];
self.textView.editable = NO;
[self performSelector:@selector(reloadLogs:) withObject:nil afterDelay:0.1];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
[textView removeFromSuperview];
[textView release], textView = nil;
}
- (void)done:(id)sender {
[self dismissModalViewControllerAnimated:YES];
}
- (IBAction)reloadLogs:(id)sender {
self.textView.text = [[ATLogger sharedLogger] currentLogText];
[self.textView scrollRangeToVisible:NSMakeRange([[self.textView text] length] - 1, 1)];
}
#pragma mark - UITextViewDelegate
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text {
return NO;
}
@end

18
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATCenteringImageScrollView.h

@ -1,18 +0,0 @@
//
// ATCenteringImageScrollView.h
// ApptentiveConnect
//
// Created by Andrew Wooster on 3/27/11.
// Copyright 2011 Apptentive, Inc.. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ATCenteringImageScrollView : UIScrollView {
@private
UIImageView *imageView;
}
- (id)initWithImage:(UIImage *)image;
- (UIImageView *)imageView;
@end

53
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATCenteringImageScrollView.m

@ -1,53 +0,0 @@
//
// ATCenteringImageScrollView.m
// ApptentiveConnect
//
// Created by Andrew Wooster on 3/27/11.
// Copyright 2011 Apptentive, Inc.. All rights reserved.
//
#import "ATCenteringImageScrollView.h"
@implementation ATCenteringImageScrollView
- (id)initWithImage:(UIImage *)image {
if ((self = [super init])) {
imageView = [[UIImageView alloc] initWithImage:image];
self.frame = imageView.bounds;
[self addSubview:imageView];
self.contentSize = imageView.bounds.size;
}
return self;
}
- (void)dealloc {
[imageView removeFromSuperview];
[imageView release];
imageView = nil;
[super dealloc];
}
- (UIImageView *)imageView {
return imageView;
}
- (void)layoutSubviews {
[super layoutSubviews];
// Center the image.
CGSize boundsSize = self.bounds.size;
CGRect frameToCenter = imageView.frame;
if (frameToCenter.size.width < boundsSize.width) {
frameToCenter.origin.x = (boundsSize.width - frameToCenter.size.width)/2.0;
} else {
frameToCenter.origin.x = 0.0;
}
if (frameToCenter.size.height < boundsSize.height) {
frameToCenter.origin.y = (boundsSize.height - frameToCenter.size.height)/2.0;
} else {
frameToCenter.origin.y = 0.0;
}
imageView.frame = frameToCenter;
}
@end

29
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATCustomButton.h

@ -1,29 +0,0 @@
//
// ATCustomButton.h
// CustomWindow
//
// Created by Andrew Wooster on 9/24/11.
// Copyright 2011 Apptentive, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import "ATBackend.h"
typedef enum {
ATCustomButtonStyleCancel,
ATCustomButtonStyleSend
} ATCustomButtonStyle;
@interface ATTrackingButton : UIButton {
@private
UIImageView *shadowView;
UIEdgeInsets padding;
}
@property (nonatomic, assign) UIEdgeInsets padding;
@end
@interface ATCustomButton : UIBarButtonItem
- (id)initWithButtonStyle:(ATCustomButtonStyle)style;
- (void)setAction:(SEL)action forTarget:(id)target;
@end

125
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATCustomButton.m

@ -1,125 +0,0 @@
//
// ATCustomButton.m
// CustomWindow
//
// Created by Andrew Wooster on 9/24/11.
// Copyright 2011 Apptentive, Inc. All rights reserved.
//
#import "ATCustomButton.h"
#import "ATConnect.h"
@implementation ATCustomButton
- (id)initWithButtonStyle:(ATCustomButtonStyle)style {
ATTrackingButton *button = [ATTrackingButton buttonWithType:UIButtonTypeCustom];
button.padding = UIEdgeInsetsMake(-10, -20, -10, -15);
if (style == ATCustomButtonStyleCancel) {
[button setTitle:ATLocalizedString(@"Cancel", @"Cancel button title") forState:UIControlStateNormal];
button.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleTopMargin;
button.titleLabel.font = [UIFont boldSystemFontOfSize:12.0];
button.titleLabel.shadowOffset = CGSizeMake(0.0, 1.0);
[button setTitleShadowColor:[UIColor whiteColor] forState:UIControlStateNormal];
[button setTitleColor:[UIColor colorWithRed:130./256. green:130./256. blue:130./256. alpha:1.0] forState:UIControlStateNormal];
//[button setTitleColor:[UIColor blackColor] forState:UIControlStateHighlighted];
[button setBackgroundImage:[ATBackend imageNamed:@"at_cancel_bg"] forState:UIControlStateNormal];
[button setBackgroundImage:[ATBackend imageNamed:@"at_cancel_highlighted_bg"] forState:UIControlStateHighlighted];
button.layer.cornerRadius = 4.0;
button.layer.masksToBounds = YES;
button.layer.borderWidth = 0.5;
button.layer.borderColor = [UIColor colorWithRed:171./256. green:171./256. blue:171./256. alpha:1.0].CGColor;
button.layer.shadowColor = [UIColor whiteColor].CGColor;
button.layer.shadowOffset = CGSizeMake(0.0, 1.0);
button.layer.shadowRadius = 2.0;
[button sizeToFit];
} else if (style == ATCustomButtonStyleSend) {
[button setTitle:ATLocalizedString(@"Send", @"Send button title") forState:UIControlStateNormal];
button.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleTopMargin;
button.titleLabel.font = [UIFont boldSystemFontOfSize:12.0];
button.titleLabel.shadowOffset = CGSizeMake(0.0, -1.0);
[button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[button setTitleShadowColor:[UIColor colorWithRed:63./256. green:63./256. blue:63./256. alpha:1.0] forState:UIControlStateNormal];
[button setTitleColor:[UIColor colorWithRed: 0.79 green: 0.86 blue: 0.99 alpha: 1] forState:UIControlStateDisabled];
[button setTitleShadowColor:[UIColor colorWithWhite:0 alpha:0.5] forState:UIControlStateDisabled];
[button setBackgroundImage:[ATBackend imageNamed:@"at_send_bg"] forState:UIControlStateNormal];
[button setBackgroundImage:[ATBackend imageNamed:@"at_send_highlighted_bg"] forState:UIControlStateHighlighted];
[button setBackgroundImage:[ATBackend imageNamed:@"at_send_disabled_bg"] forState:UIControlStateDisabled];
button.layer.cornerRadius = 4.0;
button.layer.masksToBounds = YES;
button.layer.shadowColor = [UIColor whiteColor].CGColor;
button.layer.shadowOffset = CGSizeMake(0.0, 1.0);
button.layer.shadowRadius = 2.0;
[button sizeToFit];
}
self = [super initWithCustomView:button];
if (self) {
}
return self;
}
- (void)setAction:(SEL)action forTarget:(id)target {
if ([[self customView] isKindOfClass:[UIButton class]]) {
UIButton *button = (UIButton *)[self customView];
[button addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
self.target = target;
self.action = action;
}
self.target = target;
self.action = action;
}
@end
@implementation ATTrackingButton
@synthesize padding;
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event {
CGRect padded = UIEdgeInsetsInsetRect(self.bounds, padding);
return CGRectContainsPoint(padded, point);
}
- (BOOL)beginTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event {
CGRect padded = UIEdgeInsetsInsetRect(self.bounds, padding);
return CGRectContainsPoint(padded, [touch locationInView:self]);
}
- (void)setupButtonShadow {
if (shadowView == nil) {
UIImage *shadowImage = [[ATBackend imageNamed:@"at_button_shadow_overlay"] stretchableImageWithLeftCapWidth:5 topCapHeight:5];
shadowView = [[UIImageView alloc] initWithImage:shadowImage];
//shadowView.backgroundColor = [UIColor redColor];
[self addSubview:shadowView];
}
}
- (CGSize)sizeThatFits:(CGSize)size {
CGSize s = [super sizeThatFits:size];
CGSize textSize = [self.titleLabel.text sizeWithFont:self.titleLabel.font];
s.height = size.height < 30 && CGSizeEqualToSize(CGSizeZero, size) == NO ? 23 : 30;
s.width = textSize.width + 20.0;
return s;
}
- (void)layoutSubviews {
[super layoutSubviews];
[self setupButtonShadow];
shadowView.frame = self.bounds;
[self bringSubviewToFront:shadowView];
}
- (void)dealloc {
if (shadowView) {
[shadowView removeFromSuperview];
[shadowView release], shadowView = nil;
}
[super dealloc];
}
@end

18
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATDefaultTextView.h

@ -1,18 +0,0 @@
//
// ATDefaultTextView.h
// DemoApp
//
// Created by Andrew Wooster on 3/16/11.
// Copyright 2011 Apptentive, Inc.. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ATDefaultTextView : UITextView {
@private
UILabel *placeholderLabel;
}
@property (nonatomic, copy) NSString *placeholder;
- (BOOL)isDefault;
@end

103
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATDefaultTextView.m

@ -1,103 +0,0 @@
//
// ATDefaultTextView.m
// DemoApp
//
// Created by Andrew Wooster on 3/16/11.
// Copyright 2011 Apptentive, Inc.. All rights reserved.
//
#import "ATDefaultTextView.h"
@interface ATDefaultTextView (Private)
- (void)setup;
- (void)setupPlaceholder;
- (void)didEdit:(NSNotification *)notification;
@end
@implementation ATDefaultTextView
@synthesize placeholder;
- (id)initWithFrame:(CGRect)frame {
if ((self = [super initWithFrame:frame])) {
[self setup];
}
return self;
}
- (void)awakeFromNib {
[super awakeFromNib];
[self setup];
}
- (void)dealloc {
self.placeholder = nil;
[placeholderLabel removeFromSuperview];
[placeholderLabel release];
placeholderLabel = nil;
[super dealloc];
}
- (void)layoutSubviews {
[super layoutSubviews];
[self setupPlaceholder];
}
- (void)setPlaceholder:(NSString *)newPlaceholder {
if (placeholder != newPlaceholder) {
[placeholder release];
placeholder = nil;
placeholder = [newPlaceholder retain];
[self setupPlaceholder];
}
}
- (BOOL)isDefault {
if (!self.text || [self.text length] == 0) return YES;
return NO;
}
@end
@implementation ATDefaultTextView (Private)
- (void)setup {
self.text = @"";
placeholderLabel = [[UILabel alloc] initWithFrame:CGRectZero];
placeholderLabel.userInteractionEnabled = NO;
placeholderLabel.backgroundColor = [UIColor clearColor];
placeholderLabel.opaque = NO;
placeholderLabel.textColor = [UIColor lightGrayColor];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didEdit:) name:UITextViewTextDidBeginEditingNotification object:self];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didEdit:) name:UITextViewTextDidChangeNotification object:self];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didEdit:) name:UITextViewTextDidEndEditingNotification object:self];
[self setupPlaceholder];
}
- (void)setupPlaceholder {
if ([self isDefault]) {
placeholderLabel.text = self.placeholder;
placeholderLabel.font = self.font;
placeholderLabel.textAlignment = self.textAlignment;
placeholderLabel.numberOfLines = 0;
placeholderLabel.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
[placeholderLabel sizeToFit];
[self addSubview:placeholderLabel];
CGFloat padding = 8.0;
CGRect b = placeholderLabel.bounds;
b.size.width = self.bounds.size.width - padding*2.0;
placeholderLabel.bounds = b;
CGRect f = placeholderLabel.frame;
f.origin = CGPointMake(padding, padding);
placeholderLabel.frame = f;
[self sendSubviewToBack:placeholderLabel];
} else {
[placeholderLabel removeFromSuperview];
}
}
- (void)didEdit:(NSNotification *)notification {
if (notification.object == self) {
[self setupPlaceholder];
}
}
@end

28
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATHUDView.h

@ -1,28 +0,0 @@
//
// ATHUDView.h
// ApptentiveConnect
//
// Created by Andrew Wooster on 3/28/11.
// Copyright 2011 Apptentive, Inc.. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef enum {
ATHUDCheckmark
} ATHUDMarkType;
@interface ATHUDView : UIWindow {
@private
UIWindow *parentWindow;
UIImageView *icon;
}
@property (nonatomic, readonly) UILabel *label;
@property (nonatomic, assign) ATHUDMarkType markType;
@property (nonatomic, assign) CGSize size;
@property (nonatomic, assign) CGFloat cornerRadius;
@property (nonatomic, assign) CGFloat fadeOutDuration;
- (id)initWithWindow:(UIWindow *)window;
- (void)show;
@end

191
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATHUDView.m

@ -1,191 +0,0 @@
//
// ATHUDView.m
// ApptentiveConnect
//
// Created by Andrew Wooster on 3/28/11.
// Copyright 2011 Apptentive, Inc.. All rights reserved.
//
#import "ATHUDView.h"
#import "ATBackend.h"
#import "ATConnect.h"
#import "ATUtilities.h"
#import <QuartzCore/QuartzCore.h>
#import <math.h>
#define DRAW_ROUND_RECT 0
@interface ATHUDView (Private)
- (void)setup;
- (void)teardown;
- (void)animateIn;
- (void)animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context;
@end
@implementation ATHUDView
@synthesize label, markType, size, cornerRadius, fadeOutDuration;
- (id)initWithWindow:(UIWindow *)window {
if ((self = [super initWithFrame:CGRectMake(0.0, 0.0, 100.0, 100.0)])) {
parentWindow = window;
[self setup];
}
return self;
}
- (void)dealloc {
[self teardown];
[super dealloc];
}
- (void)layoutSubviews {
[super layoutSubviews];
#if !DRAW_ROUND_RECT
self.layer.cornerRadius = self.cornerRadius;
#endif
[label sizeToFit];
CGFloat labelTopPadding = 2.0;
CGSize imageSize = icon.image.size;
[label sizeToFit];
CGSize labelSize = [label sizeThatFits:CGSizeMake(200.0, label.bounds.size.height)];
CGRect imageRect = CGRectMake(0.0, 0.0, imageSize.width, imageSize.height);
CGRect labelRect = CGRectMake(0.0, imageSize.height + labelTopPadding, labelSize.width, labelSize.height);
CGRect allRect = CGRectUnion(imageRect, labelRect);
CGFloat squareLength = MAX(allRect.size.width, allRect.size.height);
squareLength = ceil(squareLength + 2.0*self.cornerRadius);
CGRect insetAllRect = CGRectMake(0.0, 0.0, squareLength, squareLength);
insetAllRect.size.width = squareLength;
insetAllRect.size.height = squareLength;
insetAllRect = ATCGRectOfEvenSize(insetAllRect);
// Center imageRect.
CGRect finalImageRect = imageRect;
finalImageRect.origin.y += self.cornerRadius;
if (finalImageRect.size.width < insetAllRect.size.width) {
finalImageRect.origin.x += floorf((insetAllRect.size.width - imageRect.size.width)/2.0);
}
// Center labelRect.
CGRect finalLabelRect = labelRect;
finalLabelRect.origin.y += self.cornerRadius;
if (finalLabelRect.size.width < insetAllRect.size.width) {
finalLabelRect.origin.x += floorf((insetAllRect.size.width - finalLabelRect.size.width)/2.0);
}
self.bounds = CGRectIntegral(insetAllRect);
self.center = CGPointMake(floorf(parentWindow.center.x), floorf(parentWindow.center.y));
label.frame = CGRectIntegral(finalLabelRect);
icon.frame = CGRectIntegral(finalImageRect);
}
- (void)show {
[self animateIn];
}
#if DRAW_ROUND_RECT
- (void)drawRect:(CGRect)rect {
CGContextRef context = UIGraphicsGetCurrentContext();
CGRect roundRect = CGRectMake(0.0, 0.0, self.bounds.size.width, self.bounds.size.height);
CGFloat radius = self.cornerRadius;
CGContextSaveGState(context);
CGContextTranslateCTM(context, self.bounds.origin.x, self.bounds.origin.y);
CGContextBeginPath(context);
CGContextSetGrayFillColor(context, 0.0, 0.8);
CGContextBeginPath(context);
CGContextMoveToPoint(context, CGRectGetMinX(roundRect) + radius, CGRectGetMinY(roundRect));
CGContextAddArc(context, CGRectGetMaxX(roundRect) - radius, CGRectGetMinY(roundRect) + radius, radius, 3 * M_PI / 2, 0, 0);
CGContextAddArc(context, CGRectGetMaxX(roundRect) - radius, CGRectGetMaxY(roundRect) - radius, radius, 0, M_PI / 2, 0);
CGContextAddArc(context, CGRectGetMinX(roundRect) + radius, CGRectGetMaxY(roundRect) - radius, radius, M_PI / 2, M_PI, 0);
CGContextAddArc(context, CGRectGetMinX(roundRect) + radius, CGRectGetMinY(roundRect) + radius, radius, M_PI, 3 * M_PI / 2, 0);
CGContextClosePath(context);
CGContextFillPath(context);
CGContextRestoreGState(context);
}
#endif
@end
@implementation ATHUDView (Private)
- (void)setup {
self.fadeOutDuration = 3.0;
self.transform = [ATUtilities viewTransformInWindow:parentWindow];
[self setUserInteractionEnabled:NO];
label = [[UILabel alloc] initWithFrame:CGRectZero];
label.backgroundColor = [UIColor clearColor];
label.opaque = NO;
label.textColor = [UIColor whiteColor];
label.font = [UIFont boldSystemFontOfSize:17.0];
label.textAlignment = UITextAlignmentCenter;
label.lineBreakMode = UILineBreakModeWordWrap;
label.adjustsFontSizeToFitWidth = YES;
label.numberOfLines = 0;
[self addSubview:label];
UIImage *iconImage = [ATBackend imageNamed:@"at_checkmark"];
icon = [[UIImageView alloc] initWithImage:iconImage];
icon.backgroundColor = [UIColor clearColor];
icon.opaque = NO;
[self addSubview:icon];
self.size = CGSizeMake(100.0, 100.0);
self.cornerRadius = 10.0;
#if DRAW_ROUND_RECT
self.backgroundColor = [UIColor clearColor];
#else
self.backgroundColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.8];
#endif
self.opaque = NO;
[self setNeedsLayout];
[self setNeedsDisplay];
}
- (void)teardown {
[icon removeFromSuperview];
[icon release];
icon = nil;
[label removeFromSuperview];
[label release];
label = nil;
parentWindow = nil;
}
- (void)animateIn {
self.alpha = 1.0;
[self layoutSubviews];
self.windowLevel = UIWindowLevelAlert;
[self makeKeyAndVisible];
self.center = parentWindow.center;
[UIView beginAnimations:@"animateIn" context:NULL];
[UIView setAnimationDuration:self.fadeOutDuration];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)];
[UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
self.alpha = 1.0;
[UIView commitAnimations];
}
- (void)animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context {
if ([animationID isEqualToString:@"animateIn"]) {
[UIView beginAnimations:@"animateOut" context:NULL];
[UIView setAnimationDelegate:self];
[UIView setAnimationDuration:2.0];
self.alpha = 0.0;
[UIView commitAnimations];
} else {
[[parentWindow window] makeKeyAndVisible];
}
}
@end

18
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATShadowView.h

@ -1,18 +0,0 @@
//
// ATShadowView.h
// ApptentiveConnect
//
// Created by Andrew Wooster on 10/19/11.
// Copyright (c) 2011 Apptentive, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ATShadowView : UIView {
@private
CGPoint centerAt;
CGSize spotlightSize;
}
@property (nonatomic, assign) CGPoint centerAt;
@property (nonatomic, assign) CGSize spotlightSize;
@end

107
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATShadowView.m

@ -1,107 +0,0 @@
//
// ATShadowView.m
// ApptentiveConnect
//
// Created by Andrew Wooster on 10/19/11.
// Copyright (c) 2011 Apptentive, Inc. All rights reserved.
//
#import "ATShadowView.h"
@implementation ATShadowView
@synthesize centerAt, spotlightSize;
- (id)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
self.centerAt = CGPointMake(CGRectGetMidX(frame), CGRectGetMidY(frame));
self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self setOpaque:NO];
}
return self;
}
- (id)initWithCoder:(NSCoder *)coder {
self = [super initWithCoder:coder];
if (self) {
[self setOpaque:NO];
}
return self;
}
- (CGSize)sizeThatFits:(CGSize)size {
return size;
}
- (void)layoutSubviews {
[super layoutSubviews];
[self setNeedsDisplay];
}
- (void)drawRect:(CGRect)dirtyRect {
CGRect imageBounds = [self bounds];
CGRect bounds = [self bounds];
CGContextRef context = UIGraphicsGetCurrentContext();
CGFloat alignStroke;
CGFloat resolution;
CGMutablePathRef path;
CGRect drawRect;
CGGradientRef gradient;
NSMutableArray *colors;
UIColor *color;
CGColorSpaceRef space = CGColorSpaceCreateDeviceRGB();
CGAffineTransform transform;
CGRect pathBounds;
CGFloat locations[2];
resolution = 0.5f * (bounds.size.width / imageBounds.size.width + bounds.size.height / imageBounds.size.height);
CGContextSaveGState(context);
CGContextTranslateCTM(context, bounds.origin.x, bounds.origin.y);
CGContextScaleCTM(context, (bounds.size.width / imageBounds.size.width), (bounds.size.height / imageBounds.size.height));
// Layer 1
alignStroke = 0.0f;
path = CGPathCreateMutable();
drawRect = CGRectMake(0.0f, 0.0f, imageBounds.size.width, imageBounds.size.height);
drawRect.origin.x = (roundf(resolution * drawRect.origin.x + alignStroke) - alignStroke) / resolution;
drawRect.origin.y = (roundf(resolution * drawRect.origin.y + alignStroke) - alignStroke) / resolution;
drawRect.size.width = roundf(resolution * drawRect.size.width) / resolution;
drawRect.size.height = roundf(resolution * drawRect.size.height) / resolution;
CGPathAddRect(path, NULL, drawRect);
CGContextAddPath(context, path);
CGContextSaveGState(context);
CGContextEOClip(context);
pathBounds = CGPathGetPathBoundingBox(path);
transform = CGAffineTransformMakeTranslation(CGRectGetMidX(pathBounds), CGRectGetMidY(pathBounds));
CGFloat scale = MAX(0.5f * pathBounds.size.width, 0.5f * pathBounds.size.height);
transform = CGAffineTransformScale(transform, scale, scale);
// Get the radius of our rectangle.
CGFloat width = pathBounds.size.width;
CGFloat height = pathBounds.size.height;
CGFloat radius = (sqrt(width*width + height*height))/2.0;
CGFloat radiusHeightRatio = radius/(MIN(height, width)*0.5);
colors = [NSMutableArray arrayWithCapacity:2];
color = [UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:0.0f];
[colors addObject:(id)[color CGColor]];
locations[0] = 1.0f;
color = [UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:0.5*radiusHeightRatio];
[colors addObject:(id)[color CGColor]];
locations[1] = 0.0f;
gradient = CGGradientCreateWithColors(space, (CFArrayRef)colors, locations);
CGContextConcatCTM(context, transform);
CGContextDrawRadialGradient(context, gradient, CGPointZero, radiusHeightRatio, CGPointMake(0.02f, -0.02f), 0.0f, (kCGGradientDrawsBeforeStartLocation | kCGGradientDrawsAfterEndLocation));
CGContextRestoreGState(context);
CGGradientRelease(gradient);
CGPathRelease(path);
CGContextRestoreGState(context);
CGColorSpaceRelease(space);
}
@end

46
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATSimpleImageViewController.h

@ -1,46 +0,0 @@
//
// ATSimpleImageViewController.h
// ApptentiveConnect
//
// Created by Andrew Wooster on 3/27/11.
// Copyright 2011 Apptentive, Inc.. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "ATFeedback.h"
#import "ATFeedbackTypes.h"
@class ATCenteringImageScrollView;
NSString * const ATImageViewChoseImage;
@protocol ATSimpleImageViewControllerDelegate;
@interface ATSimpleImageViewController : UIViewController <UIActionSheetDelegate, UIScrollViewDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate, UIPopoverControllerDelegate> {
@private
NSObject<ATSimpleImageViewControllerDelegate> *delegate;
ATCenteringImageScrollView *scrollView;
UIBarButtonItem *cameraButtonItem;
BOOL shouldResign;
UIView *containerView;
BOOL isFromCamera;
UIPopoverController *imagePickerPopover;
}
@property (nonatomic, retain) IBOutlet UIView *containerView;
@property (retain, nonatomic) IBOutlet UIBarButtonItem *cameraButtonItem;
- (id)initWithDelegate:(NSObject<ATSimpleImageViewControllerDelegate> *)delegate;
- (IBAction)donePressed:(id)sender;
- (IBAction)takePhoto:(id)sender;
@end
@protocol ATSimpleImageViewControllerDelegate <NSObject>
- (void)imageViewController:(ATSimpleImageViewController *)vc pickedImage:(UIImage *)image fromSource:(ATFeedbackImageSource)source;
- (void)imageViewControllerWillDismiss:(ATSimpleImageViewController *)vc animated:(BOOL)animated;
- (ATFeedbackAttachmentOptions)attachmentOptionsForImageViewController:(ATSimpleImageViewController *)vc;
@optional
- (UIImage *)defaultImageForImageViewController:(ATSimpleImageViewController *)vc;
@end

272
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATSimpleImageViewController.m

@ -1,272 +0,0 @@
//
// ATSimpleImageViewController.m
// ApptentiveConnect
//
// Created by Andrew Wooster on 3/27/11.
// Copyright 2011 Apptentive, Inc.. All rights reserved.
//
#import "ATSimpleImageViewController.h"
#import "ATCenteringImageScrollView.h"
#import "ATConnect.h"
#import "ATFeedback.h"
#import "ATFeedbackController.h"
NSString * const ATImageViewChoseImage = @"ATImageViewChoseImage";
#define kATContainerViewTag (5)
#define kATLabelViewTag (6)
@interface ATSimpleImageViewController (Private)
- (void)chooseImage;
- (void)takePhoto;
@end
@implementation ATSimpleImageViewController
@synthesize containerView;
@synthesize cameraButtonItem;
- (id)initWithDelegate:(NSObject<ATSimpleImageViewControllerDelegate> *)aDelegate {
self = [super initWithNibName:@"ATSimpleImageViewController" bundle:[ATConnect resourceBundle]];
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
self.modalPresentationStyle = UIModalPresentationFormSheet;
}
if (self != nil) {
delegate = [aDelegate retain];
}
return self;
}
- (void)dealloc {
[imagePickerPopover release], imagePickerPopover = nil;
[delegate release], delegate = nil;
[scrollView removeFromSuperview];
[scrollView release], scrollView = nil;
[containerView removeFromSuperview];
[containerView release], containerView = nil;
[cameraButtonItem release], cameraButtonItem = nil;
[super dealloc];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
#pragma mark - View lifecycle
- (void)setupScrollView {
if (scrollView) {
[scrollView removeFromSuperview];
[scrollView release];
scrollView = nil;
}
UIImage *defaultScreenshot = nil;
if (delegate && [delegate respondsToSelector:@selector(defaultImageForImageViewController:)]) {
defaultScreenshot = [delegate defaultImageForImageViewController:self];
}
if (defaultScreenshot) {
for (UIView *subview in self.containerView.subviews) {
[subview removeFromSuperview];
}
scrollView = [[ATCenteringImageScrollView alloc] initWithImage:defaultScreenshot];
scrollView.backgroundColor = [UIColor blackColor];
CGSize boundsSize = self.containerView.bounds.size;
CGSize imageSize = [scrollView imageView].image.size;
CGFloat xScale = boundsSize.width / imageSize.width;
CGFloat yScale = boundsSize.height / imageSize.height;
CGFloat minScale = MIN(xScale, yScale);
CGFloat maxScale = 2.0;
if (minScale > maxScale) {
minScale = maxScale;
}
scrollView.delegate = self;
scrollView.bounces = YES;
scrollView.bouncesZoom = YES;
scrollView.minimumZoomScale = minScale;
scrollView.maximumZoomScale = maxScale;
scrollView.alwaysBounceHorizontal = YES;
scrollView.alwaysBounceVertical = YES;
[scrollView setZoomScale:minScale];
scrollView.frame = self.containerView.bounds;
[self.containerView addSubview:scrollView];
} else {
UIView *container = nil;
UITextView *label = nil;
if ([self.containerView viewWithTag:kATContainerViewTag]) {
container = [[self.containerView viewWithTag:kATContainerViewTag] retain];
label = [(UITextView *)[self.containerView viewWithTag:kATLabelViewTag] retain];
} else {
container = [[UIView alloc] initWithFrame:self.containerView.bounds];
container.tag = kATContainerViewTag;
container.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
container.backgroundColor = [UIColor blackColor];
label = [[UITextView alloc] initWithFrame:CGRectZero];
label.tag = kATLabelViewTag;
label.backgroundColor = [UIColor clearColor];
label.font = [UIFont boldSystemFontOfSize:16.0];
label.textColor = [UIColor whiteColor];
label.userInteractionEnabled = NO;
label.textAlignment = UITextAlignmentCenter;
label.text = ATLocalizedString(@"You can include a screenshot by choosing a photo from your photo library above.\n\nTo take a screenshot, hold down the power and home buttons at the same time.", @"Description of what to do when there is no screenshot.");
}
[self.containerView addSubview:container];
[container sizeToFit];
[container addSubview:label];
CGFloat labelWidth = container.bounds.size.width - 40.0;
CGSize labelSize = [label sizeThatFits:CGSizeMake(labelWidth, CGFLOAT_MAX)];
CGFloat topOffset = floor(labelSize.height/2.0);
CGRect labelRect = CGRectMake(20, topOffset, labelWidth, labelSize.height);
label.frame = labelRect;
label.center = container.center;
[label release];
[container release];
}
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self setupScrollView];
}
- (void)viewDidAppear:(BOOL)animated {
//NSLog(@"size is: %@", NSStringFromCGRect(self.view.bounds));
}
- (void)viewWillDisappear:(BOOL)animated {
if (shouldResign) {
[delegate imageViewControllerWillDismiss:self animated:animated];
[delegate release], delegate = nil;
}
}
- (void)viewDidUnload {
[containerView removeFromSuperview];
[containerView release], containerView = nil;
[self setCameraButtonItem:nil];
[super viewDidUnload];
}
- (IBAction)donePressed:(id)sender {
shouldResign = YES;
[self dismissModalViewControllerAnimated:YES];
}
- (IBAction)takePhoto:(id)sender {
ATFeedbackAttachmentOptions options = [delegate attachmentOptionsForImageViewController:self];
if (options & ATFeedbackAllowTakePhotoAttachment) {
UIActionSheet *actionSheet = nil;
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
actionSheet = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:ATLocalizedString(@"Cancel", @"Cancel Button Title") destructiveButtonTitle:nil otherButtonTitles:ATLocalizedString(@"Choose From Library", @"Choose Photo Button Title"), ATLocalizedString(@"Take Photo", @"Take Photo Button Title"), nil];
} else {
actionSheet = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:ATLocalizedString(@"Cancel", @"Cancel Button Title") destructiveButtonTitle:nil otherButtonTitles:ATLocalizedString(@"Choose From Library", @"Choose Photo Button Title"), nil];
}
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
[actionSheet showFromBarButtonItem:self.cameraButtonItem animated:YES];
} else {
[actionSheet showInView:self.view];
}
[actionSheet autorelease];
} else {
[self chooseImage];
}
}
#pragma mark UIActionSheetDelegate
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
if (buttonIndex == 0) {
[self chooseImage];
} else if (buttonIndex == 1 && [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
[self takePhoto];
}
}
#pragma mark UIImagePickerControllerDelegate
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
UIImage *image = nil;
if ([info objectForKey:UIImagePickerControllerEditedImage]) {
image = [info objectForKey:UIImagePickerControllerEditedImage];
} else if ([info objectForKey:UIImagePickerControllerOriginalImage]) {
image = [info objectForKey:UIImagePickerControllerOriginalImage];
}
if (image) {
[delegate imageViewController:self pickedImage:image fromSource:isFromCamera ? ATFeedbackImageSourceCamera : ATFeedbackImageSourcePhotoLibrary];
[[NSNotificationCenter defaultCenter] postNotificationName:ATImageViewChoseImage object:self];
}
[self setupScrollView];
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
if (imagePickerPopover) {
[imagePickerPopover dismissPopoverAnimated:YES];
}
}
if (self.modalViewController) {
[self dismissModalViewControllerAnimated:YES];
}
}
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {
[picker dismissModalViewControllerAnimated:YES];
}
#pragma mark Rotation
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
}
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
[self setupScrollView];
}
#pragma mark UIScrollViewDelegate
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)aScrollView {
return [scrollView imageView];
}
#pragma mark UIPopoverControllerDelegate
- (void)popoverControllerDidDismissPopover:(UIPopoverController *)popoverController {
if (popoverController == imagePickerPopover) {
[imagePickerPopover release], imagePickerPopover = nil;
}
}
@end
@implementation ATSimpleImageViewController (Private)
- (void)chooseImage {
isFromCamera = NO;
shouldResign = NO;
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
imagePicker.delegate = self;
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
if (imagePickerPopover) {
[imagePickerPopover dismissPopoverAnimated:NO];
[imagePickerPopover release], imagePickerPopover = nil;
}
imagePickerPopover = [[UIPopoverController alloc] initWithContentViewController:imagePicker];
imagePickerPopover.delegate = self;
[imagePickerPopover presentPopoverFromBarButtonItem:self.cameraButtonItem permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
} else {
[self presentModalViewController:imagePicker animated:YES];
}
[imagePicker release];
}
- (void)takePhoto {
isFromCamera = YES;
shouldResign = NO;
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
imagePicker.delegate = self;
[self presentModalViewController:imagePicker animated:YES];
[imagePicker release];
}
@end

14
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATToolbar.h

@ -1,14 +0,0 @@
//
// ATToolbar.h
// CustomWindow
//
// Created by Andrew Wooster on 9/24/11.
// Copyright 2011 Apptentive, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ATToolbar : UIToolbar
@end
void ATToolbar_Bootstrap();

88
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Custom Views/ATToolbar.m

@ -1,88 +0,0 @@
//
// ATToolbar.m
// CustomWindow
//
// Created by Andrew Wooster on 9/24/11.
// Copyright 2011 Apptentive, Inc. All rights reserved.
//
#import "ATToolbar.h"
#import "ATCustomButton.h"
@implementation ATToolbar
//!! Hack to adjust frame origin of left-most custom view and to force
//!! custom views to resize on orientation changes.
//!! Still has problems if the text is too big to fit and is rotated to portrait twice.
//!! This is a huge hack.
- (void)layoutSubviews {
[super layoutSubviews];
NSArray *items = [self items];
CGFloat widthAvailable = self.bounds.size.width;
BOOL viewHasTwoButtons = NO;
NSUInteger buttonCount = 0;
for (UIBarButtonItem *item in items) {
if ([item isKindOfClass:[ATCustomButton class]]) {
buttonCount++;
}
}
if (buttonCount == 2) {
viewHasTwoButtons = YES;
}
NSUInteger customButtonIndex = 0;
for (UIBarButtonItem *item in items) {
if (item.customView != nil && item.customView.superview != nil) {
[item.customView sizeToFit];
if (viewHasTwoButtons && [item isKindOfClass:[ATCustomButton class]]) {
CGRect frameInView = [item.customView.superview convertRect:item.customView.frame toView:self];
if (customButtonIndex == 0) {
widthAvailable -= CGRectGetMaxX(frameInView);
} else if (customButtonIndex == 1) {
CGFloat buttonOriginWidth = (self.bounds.size.width - frameInView.origin.x);
widthAvailable -= buttonOriginWidth;
}
customButtonIndex++;
}
}
}
if ([items count] > 0) {
UIBarButtonItem *firstItem = [items objectAtIndex:0];
BOOL adjustedFirstItem = NO;
if (firstItem.customView != nil) {
CGRect f = firstItem.customView.frame;
if (f.origin.x == 12.0) {
f.origin.x = 6.0;
firstItem.customView.frame = f;
adjustedFirstItem = YES;
}
}
if (adjustedFirstItem) {
NSUInteger i = 0;
for (UIBarButtonItem *item in items) {
// Also don't adjust any custom buttons.
if (i != 0 && item.customView != nil && ![item isKindOfClass:[ATCustomButton class]]) {
CGRect customFrame = item.customView.frame;
customFrame.origin.x += 4.0;
customFrame.size.width = MIN(widthAvailable, customFrame.size.width);
item.customView.frame = customFrame;
}
i++;
}
}
}
}
- (void)drawRect:(CGRect)rect {
//
}
@end
void ATToolbar_Bootstrap() {
NSLog(@"Loading ATToolbar_Bootstrap");
}

25
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Metrics/ATFeedbackMetrics.h

@ -1,25 +0,0 @@
//
// ATFeedbackMetrics.h
// ApptentiveConnect
//
// Created by Andrew Wooster on 12/27/11.
// Copyright (c) 2011 Apptentive, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
NSString *const ATFeedbackDidShowWindowNotification;
NSString *const ATFeedbackDidHideWindowNotification;
NSString *const ATFeedbackWindowTypeKey;
NSString *const ATFeedbackWindowHideEventKey;
typedef enum {
ATFeedbackWindowTypeFeedback,
ATFeedbackWindowTypeInfo,
} ATFeedbackWindowType;
typedef enum {
ATFeedbackEventTappedCancel,
ATFeedbackEventTappedSend,
} ATFeedbackEvent;

15
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Metrics/ATFeedbackMetrics.m

@ -1,15 +0,0 @@
//
// ATFeedbackMetrics.m
// ApptentiveConnect
//
// Created by Andrew Wooster on 12/27/11.
// Copyright (c) 2011 Apptentive, Inc. All rights reserved.
//
#import "ATFeedbackMetrics.h"
NSString *const ATFeedbackDidShowWindowNotification = @"ATFeedbackDidShowWindowNotification";
NSString *const ATFeedbackDidHideWindowNotification = @"ATFeedbackDidHideWindowNotification";
NSString *const ATFeedbackWindowTypeKey = @"ATFeedbackWindowTypeKey";
NSString *const ATFeedbackWindowHideEventKey = @"ATFeedbackWindowHideEventKey";

22
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Metrics/ATMetric.h

@ -1,22 +0,0 @@
//
// ATMetric.h
// ApptentiveMetrics
//
// Created by Andrew Wooster on 12/27/11.
// Copyright (c) 2011 Apptentive. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "ATRecord.h"
@interface ATMetric : ATRecord <NSCoding> {
@private
NSString *name;
NSMutableDictionary *info;
}
@property (nonatomic, copy) NSString *name;
@property (nonatomic, readonly) NSDictionary *info;
- (void)setValue:(id)value forKey:(NSString *)key;
- (void)addEntriesFromDictionary:(NSDictionary *)dictionary;
@end

93
Clocker/ApptentiveConnect/apptentive-ios/ApptentiveConnect/source/Metrics/ATMetric.m

@ -1,93 +0,0 @@
//
// ATMetric.m
// ApptentiveMetrics
//
// Created by Andrew Wooster on 12/27/11.
// Copyright (c) 2011 Apptentive. All rights reserved.
//
#import "ATMetric.h"
#import "ATConnect.h"
#import "ATUtilities.h"
#import "ATWebClient.h"
#import "ATWebClient+Metrics.h"
#define kATMetricStorageVersion 1
@implementation ATMetric
@synthesize name, info;
- (id)init {
if ((self = [super init])) {
info = [[NSMutableDictionary alloc] init];
}
return self;
}
- (id)initWithCoder:(NSCoder *)coder {
if ((self = [super initWithCoder:coder])) {
int version = [coder decodeIntForKey:@"version"];
if (version == kATMetricStorageVersion) {
self.name = [coder decodeObjectForKey:@"name"];
NSDictionary *d = [coder decodeObjectForKey:@"info"];
if (info) {
[info release], info = nil;
}
if (d != nil) {
info = [d mutableCopy];
} else {
info = [[NSMutableDictionary alloc] init];
}
} else {
[self release];
return nil;
}
}
return self;
}
- (void)encodeWithCoder:(NSCoder *)coder {
[super encodeWithCoder:coder];
[coder encodeInt:kATMetricStorageVersion forKey:@"version"];
[coder encodeObject:self.name forKey:@"name"];
[coder encodeObject:self.info forKey:@"info"];
}
- (void)dealloc {
[name release], name = nil;
[info release], info = nil;
[super dealloc];
}
- (void)setValue:(id)value forKey:(NSString *)key {
[info setValue:value forKey:key];
}
- (void)addEntriesFromDictionary:(NSDictionary *)dictionary {
if (dictionary != nil) {
[info addEntriesFromDictionary:dictionary];
}
}
- (NSDictionary *)apiDictionary {
NSMutableDictionary *d = [NSMutableDictionary dictionaryWithDictionary:[super apiDictionary]];
if (self.name) [d setObject:self.name forKey:@"record[metric][event]"];
if (self.info) {
for (NSString *key in info) {
NSString *recordKey = [NSString stringWithFormat:@"record[metric][data][%@]", key];
NSObject *value = [info objectForKey:key];
if ([value isKindOfClass:[NSDate class]]) {
value = [ATUtilities stringRepresentationOfDate:(NSDate *)value];
}
[d setObject:value forKey:recordKey];
}
}
return d;
}
- (ATAPIRequest *)requestForSendingRecord {
return [[ATWebClient sharedClient] requestForSendingMetric:self];
}
@end

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save