Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

input sanitizing

  • Loading branch information...
commit f57e47cc218004f63cdac9629b81ee804e4546fc 1 parent 9004a6e
@Zambiorix authored
View
74 APNSTest.xcodeproj/Gerd.pbxuser
@@ -77,8 +77,8 @@
PBXFileDataSource_Warnings_ColumnID,
);
};
- PBXPerProjectTemplateStateSaveDate = 311765056;
- PBXWorkspaceStateSaveDate = 311765056;
+ PBXPerProjectTemplateStateSaveDate = 311796682;
+ PBXWorkspaceStateSaveDate = 311796682;
};
sourceControlManager = 43940C3611EE2034009C98CF /* Source Control */;
userBuildSettings = {
@@ -86,58 +86,58 @@
};
433DF78B129421DA006C9BCB /* GZEFormatAlert.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1560, 702}}";
- sepNavSelRange = "{1096, 0}";
- sepNavVisRange = "{774, 786}";
+ sepNavIntBoundsRect = "{{0, 0}, {1560, 962}}";
+ sepNavSelRange = "{1936, 0}";
+ sepNavVisRange = "{1657, 430}";
};
};
433DF78C129421DA006C9BCB /* GZEFormatAlert.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1560, 1443}}";
- sepNavSelRange = "{1096, 0}";
- sepNavVisRange = "{840, 703}";
+ sepNavIntBoundsRect = "{{0, 0}, {1201, 1339}}";
+ sepNavSelRange = "{1831, 357}";
+ sepNavVisRange = "{1808, 1472}";
};
};
433DF7B01294261A006C9BCB /* GZEFormatBadge.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1560, 741}}";
- sepNavSelRange = "{1096, 0}";
- sepNavVisRange = "{774, 786}";
+ sepNavIntBoundsRect = "{{0, 0}, {1201, 936}}";
+ sepNavSelRange = "{2236, 17}";
+ sepNavVisRange = "{708, 2177}";
};
};
433DF7B11294261A006C9BCB /* GZEFormatBadge.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1560, 897}}";
- sepNavSelRange = "{1096, 0}";
- sepNavVisRange = "{840, 703}";
+ sepNavIntBoundsRect = "{{0, 0}, {1560, 1417}}";
+ sepNavSelRange = "{1830, 0}";
+ sepNavVisRange = "{2016, 403}";
};
};
433DF7B312942629006C9BCB /* GZEFormatSound.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1560, 741}}";
- sepNavSelRange = "{1096, 0}";
- sepNavVisRange = "{774, 786}";
+ sepNavIntBoundsRect = "{{0, 0}, {1560, 936}}";
+ sepNavSelRange = "{1936, 0}";
+ sepNavVisRange = "{1657, 430}";
};
};
433DF7B412942629006C9BCB /* GZEFormatSound.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1560, 897}}";
- sepNavSelRange = "{1096, 0}";
- sepNavVisRange = "{840, 703}";
+ sepNavIntBoundsRect = "{{0, 0}, {1560, 1430}}";
+ sepNavSelRange = "{3290, 0}";
+ sepNavVisRange = "{3131, 160}";
};
};
433DF7B61294263F006C9BCB /* GZEFormatNotificationID.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1201, 741}}";
- sepNavSelRange = "{0, 1225}";
- sepNavVisRange = "{0, 2498}";
+ sepNavIntBoundsRect = "{{0, 0}, {1201, 807}}";
+ sepNavSelRange = "{1587, 0}";
+ sepNavVisRange = "{0, 2330}";
};
};
433DF7B71294263F006C9BCB /* GZEFormatNotificationID.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1560, 897}}";
- sepNavSelRange = "{1105, 0}";
- sepNavVisRange = "{783, 795}";
+ sepNavIntBoundsRect = "{{0, 0}, {1560, 3718}}";
+ sepNavSelRange = "{8680, 0}";
+ sepNavVisRange = "{7703, 493}";
};
};
43601C231292DF3000D73245 /* Prefix.pch */ = {
@@ -149,16 +149,16 @@
};
43601C241292DF3000D73245 /* GZEApplication.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1560, 1989}}";
- sepNavSelRange = "{1101, 0}";
- sepNavVisRange = "{845, 707}";
+ sepNavIntBoundsRect = "{{0, 0}, {1201, 2353}}";
+ sepNavSelRange = "{2074, 0}";
+ sepNavVisRange = "{716, 1601}";
};
};
43601C251292DF3000D73245 /* GZEApplication.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1201, 16900}}";
- sepNavSelRange = "{31603, 0}";
- sepNavVisRange = "{30643, 1619}";
+ sepNavIntBoundsRect = "{{0, 0}, {1560, 18876}}";
+ sepNavSelRange = "{10124, 0}";
+ sepNavVisRange = "{9860, 377}";
sepNavWindowFrame = "{{15, 213}, {920, 960}}";
};
};
@@ -217,9 +217,9 @@
};
439DF1C81294972000D7B1F2 /* LICENCE */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1201, 8775}}";
+ sepNavIntBoundsRect = "{{0, 0}, {1201, 8801}}";
sepNavSelRange = "{0, 0}";
- sepNavVisRange = "{0, 3341}";
+ sepNavVisRange = "{0, 2790}";
};
};
43A563EC1292E33800E59383 /* AsyncSocket.h */ = {
@@ -252,9 +252,9 @@
};
43E00C43129495890080AA07 /* README */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1560, 1287}}";
- sepNavSelRange = "{340, 0}";
- sepNavVisRange = "{120, 666}";
+ sepNavIntBoundsRect = "{{0, 0}, {1201, 1417}}";
+ sepNavSelRange = "{2498, 0}";
+ sepNavVisRange = "{2444, 456}";
};
};
8D1107260486CEB800E47090 /* APNSTest */ = {
View
67 APNSTest.xcodeproj/Gerd.perspectivev3
@@ -290,7 +290,10 @@
<string>29B97314FDCFA39411CA2CEA</string>
<string>43E00C42129495770080AA07</string>
<string>43601C221292DF3000D73245</string>
+ <string>43E9FDDA1295229800E83D81</string>
<string>43601C341292E03C00D73245</string>
+ <string>29B97317FDCFA39411CA2CEA</string>
+ <string>43601C2B1292DF6500D73245</string>
<string>1C37FBAC04509CD000000102</string>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
@@ -319,7 +322,7 @@
<real>337</real>
</array>
<key>RubberWindowFrame</key>
- <string>203 141 1621 1037 0 0 1920 1178 </string>
+ <string>16 141 1621 1037 0 0 1920 1178 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
@@ -335,13 +338,15 @@
<key>PBXProjectModuleGUID</key>
<string>43940C3911EE20AE009C98CF</string>
<key>PBXProjectModuleLabel</key>
- <string>&lt;No Editor&gt;</string>
+ <string></string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>43940C3A11EE20AE009C98CF</string>
+ <key>PBXProjectModuleLabel</key>
+ <string></string>
</dict>
<key>SplitCount</key>
<string>1</string>
@@ -356,7 +361,7 @@
<key>Frame</key>
<string>{{0, 0}, {1262, 0}}</string>
<key>RubberWindowFrame</key>
- <string>203 141 1621 1037 0 0 1920 1178 </string>
+ <string>16 141 1621 1037 0 0 1920 1178 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
@@ -379,9 +384,7 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {1262, 964}}</string>
- <key>RubberWindowFrame</key>
- <string>203 141 1621 1037 0 0 1920 1178 </string>
+ <string>{{10, 27}, {1262, 667}}</string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
@@ -397,7 +400,7 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {1262, 201}}</string>
+ <string>{{10, 27}, {1262, 233}}</string>
</dict>
<key>Module</key>
<string>PBXProjectFindModule</string>
@@ -435,7 +438,9 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {1262, 191}}</string>
+ <string>{{10, 27}, {1262, 964}}</string>
+ <key>RubberWindowFrame</key>
+ <string>16 141 1621 1037 0 0 1920 1178 </string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
@@ -463,11 +468,11 @@
</array>
<key>TableOfContents</key>
<array>
- <string>43E9FE02129527AD00E83D81</string>
+ <string>43E9043E1295A3D900E83D81</string>
<string>1CA23ED40692098700951B8B</string>
- <string>43E9FE03129527AD00E83D81</string>
+ <string>43E9043F1295A3D900E83D81</string>
<string>43940C3911EE20AE009C98CF</string>
- <string>43E9FE04129527AD00E83D81</string>
+ <string>43E904401295A3D900E83D81</string>
<string>1CA23EDF0692099D00951B8B</string>
<string>1CA23EE00692099D00951B8B</string>
<string>1CA23EE10692099D00951B8B</string>
@@ -518,12 +523,12 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {1621, 478}}</string>
+ <string>{{0, 0}, {1621, 776}}</string>
</dict>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Proportion</key>
- <string>478pt</string>
+ <string>776pt</string>
</dict>
<dict>
<key>ContentConfiguration</key>
@@ -542,8 +547,8 @@
<string>yes</string>
<key>sizes</key>
<array>
- <string>{{0, 0}, {791, 248}}</string>
- <string>{{791, 0}, {830, 248}}</string>
+ <string>{{0, 0}, {804, 80}}</string>
+ <string>{{804, 0}, {817, 80}}</string>
</array>
</dict>
<key>VerticalSplitView</key>
@@ -558,8 +563,8 @@
<string>yes</string>
<key>sizes</key>
<array>
- <string>{{0, 0}, {1621, 248}}</string>
- <string>{{0, 248}, {1621, 265}}</string>
+ <string>{{0, 0}, {1621, 80}}</string>
+ <string>{{0, 67}, {1621, 148}}</string>
</array>
</dict>
</dict>
@@ -579,7 +584,7 @@
<key>DebugSTDIOWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>Frame</key>
- <string>{{0, 483}, {1621, 513}}</string>
+ <string>{{0, 781}, {1621, 215}}</string>
<key>PBXDebugSessionStackFrameViewKey</key>
<dict>
<key>DebugVariablesTableConfiguration</key>
@@ -589,16 +594,16 @@
<string>Value</string>
<real>85</real>
<string>Summary</string>
- <real>600</real>
+ <real>587</real>
</array>
<key>Frame</key>
- <string>{{791, 0}, {830, 248}}</string>
+ <string>{{804, 0}, {817, 80}}</string>
</dict>
</dict>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Proportion</key>
- <string>513pt</string>
+ <string>215pt</string>
</dict>
</array>
<key>Name</key>
@@ -616,14 +621,14 @@
</array>
<key>TableOfContents</key>
<array>
- <string>43E9FE05129527AD00E83D81</string>
+ <string>43E904411295A3D900E83D81</string>
<string>1CCC7628064C1048000F2A68</string>
<string>1CCC7629064C1048000F2A68</string>
- <string>43E9FE06129527AD00E83D81</string>
- <string>43E9FE07129527AD00E83D81</string>
- <string>43E9FE08129527AD00E83D81</string>
- <string>43E9FE09129527AD00E83D81</string>
- <string>43940C3911EE20AE009C98CF</string>
+ <string>43E904421295A3D900E83D81</string>
+ <string>43E904431295A3D900E83D81</string>
+ <string>43E904441295A3D900E83D81</string>
+ <string>43E904451295A3D900E83D81</string>
+ <string>43E904461295A3D900E83D81</string>
</array>
<key>ToolbarConfigUserDefaultsMinorVersion</key>
<string>2</string>
@@ -640,7 +645,7 @@
<key>StatusbarIsVisible</key>
<true/>
<key>TimeStamp</key>
- <real>311764909.69255698</real>
+ <real>311796764.06949002</real>
<key>ToolbarConfigUserDefaultsMinorVersion</key>
<string>2</string>
<key>ToolbarDisplayMode</key>
@@ -657,10 +662,12 @@
<integer>5</integer>
<key>WindowOrderList</key>
<array>
+ <string>43E904481295A3D900E83D81</string>
+ <string>43E904491295A3D900E83D81</string>
<string>/Users/Gerd/MSoft/Clients/Managing Software/Projects/APNS/APNSTest/APNSTest.xcodeproj</string>
</array>
<key>WindowString</key>
- <string>203 141 1621 1037 0 0 1920 1178 </string>
+ <string>16 141 1621 1037 0 0 1920 1178 </string>
<key>WindowToolsV3</key>
<array>
<dict>
@@ -1492,7 +1499,7 @@
<key>TableOfContents</key>
<array>
<string>43601C3D1292E10300D73245</string>
- <string>43E009E712946BAF0080AA07</string>
+ <string>43E9FEC712953E8B00E83D81</string>
<string>43601C3C1292E10300D73245</string>
</array>
<key>WindowString</key>
View
383 English.lproj/MainMenu.xib
@@ -720,7 +720,6 @@
<int key="NSCellFlags2">4196864</int>
<string key="NSContents"/>
<reference key="NSSupport" ref="1016253439"/>
- <string key="NSPlaceholderString">&gt; Select Push Notification Certificate &lt;</string>
<reference key="NSControlView" ref="206587933"/>
<bool key="NSDrawsBackground">YES</bool>
<object class="NSColor" key="NSBackgroundColor" id="271252741">
@@ -1117,7 +1116,6 @@
<int key="NSCellFlags2">272630784</int>
<string key="NSContents"/>
<reference key="NSSupport" ref="1016253439"/>
- <string key="NSPlaceholderString">Enter alert message</string>
<reference key="NSControlView" ref="858425059"/>
<bool key="NSDrawsBackground">YES</bool>
<reference key="NSBackgroundColor" ref="271252741"/>
@@ -1151,84 +1149,18 @@
<int key="NSPeriodicInterval">25</int>
</object>
</object>
- <object class="NSTextField" id="608012368">
+ <object class="NSTextField" id="603828796">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{95, 220}, {120, 22}}</string>
+ <string key="NSFrame">{{95, 220}, {96, 22}}</string>
<reference key="NSSuperview" ref="439893737"/>
<bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="108103049">
+ <object class="NSTextFieldCell" key="NSCell" id="350616464">
<int key="NSCellFlags">-1804468671</int>
<int key="NSCellFlags2">272630784</int>
+ <string key="NSContents"/>
<reference key="NSSupport" ref="1016253439"/>
- <object class="NSNumberFormatter" key="NSFormatter" id="495113155">
- <object class="NSMutableDictionary" key="NS.attributes">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>allowsFloats</string>
- <string>formatterBehavior</string>
- <string>lenient</string>
- <string>locale</string>
- <string>maximum</string>
- <string>minimum</string>
- <string>negativeInfinitySymbol</string>
- <string>nilSymbol</string>
- <string>numberStyle</string>
- <string>positiveInfinitySymbol</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <boolean value="YES"/>
- <integer value="1040"/>
- <boolean value="NO"/>
- <object class="NSLocale">
- <string key="NS.identifier"/>
- </object>
- <real value="999"/>
- <real value="0.0"/>
- <string>-∞</string>
- <string/>
- <integer value="1"/>
- <string>+∞</string>
- </object>
- </object>
- <string key="NS.positiveformat">#,##0.###</string>
- <string key="NS.negativeformat">#,##0.###</string>
- <nil key="NS.positiveattrs"/>
- <nil key="NS.negativeattrs"/>
- <nil key="NS.zero"/>
- <object class="NSAttributedString" key="NS.nil">
- <string key="NSString"/>
- </object>
- <object class="NSAttributedString" key="NS.nan">
- <string key="NSString">NaN</string>
- <object class="NSDictionary" key="NSAttributes">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys" id="0">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- </object>
- </object>
- <real value="0.0" key="NS.min"/>
- <real value="999" key="NS.max"/>
- <object class="NSDecimalNumberHandler" key="NS.rounding">
- <int key="NS.roundingmode">3</int>
- <bool key="NS.raise.overflow">YES</bool>
- <bool key="NS.raise.underflow">YES</bool>
- <bool key="NS.raise.dividebyzero">YES</bool>
- </object>
- <string key="NS.decimal">.</string>
- <string key="NS.thousand">,</string>
- <bool key="NS.hasthousands">YES</bool>
- <bool key="NS.localized">NO</bool>
- <bool key="NS.allowsfloats">YES</bool>
- </object>
- <string key="NSPlaceholderString">Enter badge</string>
- <reference key="NSControlView" ref="608012368"/>
+ <reference key="NSControlView" ref="603828796"/>
<bool key="NSDrawsBackground">YES</bool>
<reference key="NSBackgroundColor" ref="271252741"/>
<reference key="NSTextColor" ref="973634531"/>
@@ -1267,7 +1199,6 @@
<int key="NSCellFlags2">272630784</int>
<string key="NSContents"/>
<reference key="NSSupport" ref="1016253439"/>
- <string key="NSPlaceholderString">Enter sound</string>
<reference key="NSControlView" ref="983135775"/>
<bool key="NSDrawsBackground">YES</bool>
<reference key="NSBackgroundColor" ref="271252741"/>
@@ -1335,7 +1266,7 @@
<object class="NSTextView" id="26887813">
<reference key="NSNextResponder" ref="404522184"/>
<int key="NSvFlags">2322</int>
- <string key="NSFrame">{{0, 16}, {785, 14}}</string>
+ <string key="NSFrame">{{0, 29}, {785, 14}}</string>
<reference key="NSSuperview" ref="404522184"/>
<object class="NSTextContainer" key="NSTextContainer" id="1005889538">
<object class="NSLayoutManager" key="NSLayoutManager">
@@ -1410,11 +1341,11 @@
</object>
<int key="NSTVFlags">6</int>
<string key="NSMaxSize">{785, 1e+07}</string>
- <string key="NSMinize">{223, 6}</string>
+ <string key="NSMinize">{223, 0}</string>
<nil key="NSDelegate"/>
</object>
</object>
- <string key="NSFrame">{{1, 1}, {785, 186}}</string>
+ <string key="NSFrame">{{1, 1}, {785, 185}}</string>
<reference key="NSSuperview" ref="1021397213"/>
<reference key="NSNextKeyView" ref="26887813"/>
<reference key="NSDocView" ref="26887813"/>
@@ -1428,7 +1359,7 @@
<object class="NSScroller" id="97405711">
<reference key="NSNextResponder" ref="1021397213"/>
<int key="NSvFlags">256</int>
- <string key="NSFrame">{{786, 1}, {15, 186}}</string>
+ <string key="NSFrame">{{786, 1}, {15, 185}}</string>
<reference key="NSSuperview" ref="1021397213"/>
<reference key="NSTarget" ref="1021397213"/>
<string key="NSAction">_doScroller:</string>
@@ -1447,7 +1378,7 @@
<double key="NSPercent">0.94565218687057495</double>
</object>
</object>
- <string key="NSFrame">{{-1, 20}, {802, 188}}</string>
+ <string key="NSFrame">{{-1, 20}, {802, 187}}</string>
<reference key="NSSuperview" ref="439893737"/>
<reference key="NSNextKeyView" ref="404522184"/>
<int key="NSsFlags">18</int>
@@ -1516,7 +1447,7 @@
<object class="NSCustomObject" id="53702584">
<string key="NSClassName">GZEFormatAlert</string>
</object>
- <object class="NSCustomObject" id="320415582">
+ <object class="NSCustomObject" id="733527579">
<string key="NSClassName">GZEFormatBadge</string>
</object>
<object class="NSCustomObject" id="508875454">
@@ -1760,14 +1691,6 @@
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
- <string key="label">textFieldBadge</string>
- <reference key="source" ref="976324537"/>
- <reference key="destination" ref="608012368"/>
- </object>
- <int key="connectionID">672</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
<string key="label">buttonConnect</string>
<reference key="source" ref="976324537"/>
<reference key="destination" ref="313113907"/>
@@ -1801,14 +1724,6 @@
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
- <reference key="source" ref="608012368"/>
- <reference key="destination" ref="976324537"/>
- </object>
- <int key="connectionID">686</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">delegate</string>
<reference key="source" ref="983135775"/>
<reference key="destination" ref="976324537"/>
</object>
@@ -2110,13 +2025,87 @@
</object>
<int key="connectionID">855</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">formatter</string>
+ <reference key="source" ref="818958645"/>
+ <reference key="destination" ref="877792331"/>
+ </object>
+ <int key="connectionID">869</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">formatter</string>
+ <reference key="source" ref="858425059"/>
+ <reference key="destination" ref="53702584"/>
+ </object>
+ <int key="connectionID">870</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">formatter</string>
+ <reference key="source" ref="983135775"/>
+ <reference key="destination" ref="508875454"/>
+ </object>
+ <int key="connectionID">872</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="603828796"/>
+ <reference key="destination" ref="976324537"/>
+ </object>
+ <int key="connectionID">875</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">formatter</string>
+ <reference key="source" ref="603828796"/>
+ <reference key="destination" ref="733527579"/>
+ </object>
+ <int key="connectionID">877</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">textFieldBadge</string>
+ <reference key="source" ref="976324537"/>
+ <reference key="destination" ref="603828796"/>
+ </object>
+ <int key="connectionID">878</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="53702584"/>
+ <reference key="destination" ref="976324537"/>
+ </object>
+ <int key="connectionID">879</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="733527579"/>
+ <reference key="destination" ref="976324537"/>
+ </object>
+ <int key="connectionID">880</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="508875454"/>
+ <reference key="destination" ref="976324537"/>
+ </object>
+ <int key="connectionID">881</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
- <reference key="object" ref="0"/>
+ <object class="NSArray" key="object" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
<reference key="children" ref="1048"/>
<nil key="parent"/>
</object>
@@ -2264,14 +2253,14 @@
<reference ref="1008031050"/>
<reference ref="678369617"/>
<reference ref="383916437"/>
- <reference ref="858425059"/>
<reference ref="492121037"/>
- <reference ref="608012368"/>
<reference ref="983135775"/>
<reference ref="691200303"/>
- <reference ref="1021397213"/>
<reference ref="129495623"/>
<reference ref="783427439"/>
+ <reference ref="858425059"/>
+ <reference ref="603828796"/>
+ <reference ref="1021397213"/>
</object>
<reference key="parent" ref="972006081"/>
</object>
@@ -2328,20 +2317,6 @@
<reference key="parent" ref="206587933"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">577</int>
- <reference key="object" ref="858425059"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="426169722"/>
- </object>
- <reference key="parent" ref="439893737"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">578</int>
- <reference key="object" ref="426169722"/>
- <reference key="parent" ref="858425059"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">585</int>
<reference key="object" ref="983135775"/>
<object class="NSMutableArray" key="children">
@@ -2474,29 +2449,6 @@
<reference key="parent" ref="17469649"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">647</int>
- <reference key="object" ref="608012368"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="108103049"/>
- </object>
- <reference key="parent" ref="439893737"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">648</int>
- <reference key="object" ref="108103049"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="495113155"/>
- </object>
- <reference key="parent" ref="608012368"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">649</int>
- <reference key="object" ref="495113155"/>
- <reference key="parent" ref="108103049"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">651</int>
<reference key="object" ref="383916437"/>
<object class="NSMutableArray" key="children">
@@ -2568,11 +2520,6 @@
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">693</int>
- <reference key="object" ref="320415582"/>
- <reference key="parent" ref="0"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">694</int>
<reference key="object" ref="837912485"/>
<object class="NSMutableArray" key="children">
@@ -2939,32 +2886,6 @@
<reference key="parent" ref="558337742"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">837</int>
- <reference key="object" ref="1021397213"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="97405711"/>
- <reference ref="840152593"/>
- <reference ref="26887813"/>
- </object>
- <reference key="parent" ref="439893737"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">838</int>
- <reference key="object" ref="97405711"/>
- <reference key="parent" ref="1021397213"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">839</int>
- <reference key="object" ref="840152593"/>
- <reference key="parent" ref="1021397213"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">840</int>
- <reference key="object" ref="26887813"/>
- <reference key="parent" ref="1021397213"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">845</int>
<reference key="object" ref="691200303"/>
<object class="NSMutableArray" key="children">
@@ -2997,6 +2918,65 @@
<reference key="object" ref="348373343"/>
<reference key="parent" ref="568632311"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">873</int>
+ <reference key="object" ref="603828796"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="350616464"/>
+ </object>
+ <reference key="parent" ref="439893737"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">874</int>
+ <reference key="object" ref="350616464"/>
+ <reference key="parent" ref="603828796"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">577</int>
+ <reference key="object" ref="858425059"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="426169722"/>
+ </object>
+ <reference key="parent" ref="439893737"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">578</int>
+ <reference key="object" ref="426169722"/>
+ <reference key="parent" ref="858425059"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">876</int>
+ <reference key="object" ref="733527579"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">837</int>
+ <reference key="object" ref="1021397213"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="26887813"/>
+ <reference ref="840152593"/>
+ <reference ref="97405711"/>
+ </object>
+ <reference key="parent" ref="439893737"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">840</int>
+ <reference key="object" ref="26887813"/>
+ <reference key="parent" ref="1021397213"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">839</int>
+ <reference key="object" ref="840152593"/>
+ <reference key="parent" ref="1021397213"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">838</int>
+ <reference key="object" ref="97405711"/>
+ <reference key="parent" ref="1021397213"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -3083,12 +3063,6 @@
<string>643.IBPluginDependency</string>
<string>643.IBViewBoundsToFrameTransform</string>
<string>644.IBPluginDependency</string>
- <string>647.IBPluginDependency</string>
- <string>647.IBViewBoundsToFrameTransform</string>
- <string>648.IBPluginDependency</string>
- <string>649.IBNumberFormatterBehaviorMetadataKey</string>
- <string>649.IBNumberFormatterLocalizesFormatMetadataKey</string>
- <string>649.IBPluginDependency</string>
<string>651.IBPluginDependency</string>
<string>651.IBViewBoundsToFrameTransform</string>
<string>652.IBPluginDependency</string>
@@ -3104,7 +3078,6 @@
<string>689.IBPluginDependency</string>
<string>691.IBPluginDependency</string>
<string>692.IBPluginDependency</string>
- <string>693.IBPluginDependency</string>
<string>694.IBPluginDependency</string>
<string>694.IBViewBoundsToFrameTransform</string>
<string>695.IBPluginDependency</string>
@@ -3171,6 +3144,10 @@
<string>845.IBViewBoundsToFrameTransform</string>
<string>846.IBPluginDependency</string>
<string>860.IBPluginDependency</string>
+ <string>873.IBPluginDependency</string>
+ <string>873.IBViewBoundsToFrameTransform</string>
+ <string>874.IBPluginDependency</string>
+ <string>876.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -3203,9 +3180,9 @@
<integer value="1"/>
<string>{74, 862}</string>
<string>{{6, 978}, {478, 20}}</string>
- <string>{{431, 243}, {800, 600}}</string>
+ <string>{{379, 227}, {800, 600}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{431, 243}, {800, 600}}</string>
+ <string>{{379, 227}, {800, 600}}</string>
<boolean value="NO"/>
<string>{{33, 99}, {480, 360}}</string>
<boolean value="YES"/>
@@ -3274,14 +3251,6 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABCvgAAw20AAA</bytes>
- </object>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1041"/>
- <boolean value="YES"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABB2AAAw4UAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -3304,7 +3273,6 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABAwAAAwZAAAA</bytes>
</object>
@@ -3376,6 +3344,12 @@
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABCvgAAw3AAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
@@ -3394,7 +3368,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">860</int>
+ <int key="maxID">883</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -3643,6 +3617,17 @@
<object class="IBPartialClassDescription">
<string key="className">GZEFormatAlert</string>
<string key="superclassName">NSFormatter</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <string key="NS.key.0">delegate</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <string key="NS.key.0">delegate</string>
+ <object class="IBToOneOutletInfo" key="NS.object.0">
+ <string key="name">delegate</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Sources/GZEFormatAlert.h</string>
@@ -3650,7 +3635,18 @@
</object>
<object class="IBPartialClassDescription">
<string key="className">GZEFormatBadge</string>
- <string key="superclassName">NSFormatter</string>
+ <string key="superclassName">NSNumberFormatter</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <string key="NS.key.0">delegate</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <string key="NS.key.0">delegate</string>
+ <object class="IBToOneOutletInfo" key="NS.object.0">
+ <string key="name">delegate</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Sources/GZEFormatBadge.h</string>
@@ -3667,6 +3663,17 @@
<object class="IBPartialClassDescription">
<string key="className">GZEFormatSound</string>
<string key="superclassName">NSFormatter</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <string key="NS.key.0">delegate</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <string key="NS.key.0">delegate</string>
+ <object class="IBToOneOutletInfo" key="NS.object.0">
+ <string key="name">delegate</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Sources/GZEFormatSound.h</string>
View
67 README
@@ -27,32 +27,27 @@
//
// ---------------------------------------------------------------------------------------------------------------
//
-// WARNING:
-//
-// Input sanitizing is not in place yet, only enter small alert strings and make sure you enter a 64 char hex
-// string as notification ID.
-//
// TODO
//
-// 1. input sanitizing and formatters
-// 2. logger
-// 3. feedback service
-// 4. other?
+// 1. logger
+// 2. feedback service
+// 3. getting push notification id's from a file, website, webservice ...
+// 4. other?
//
// ---------------------------------------------------------------------------------------------------------------
-// implement this on iPhone / iPad, in your app delegate
+// Implement the code below on iPhone / iPad, in your application delegate.
//
-// make sure your app id is enabled for push notification, and all certificates are in place on your development
-// machine. To do so, you can find all information below:
+// Make sure your app id is enabled for push notification, and all certificates are in place on your development
+// machine. To do so, you can find all information on the website below:
//
-// http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG
+// http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG
//
-// run the app on your device (simulator does not support push notification, and check the debug log for the
-// device's notification id. Enter this ID in the APNS test app and have a spin
+// Run the app on your device (simulator does not support push notification, and check the debug log for the
+// device's notification id. Enter this ID in the APNS test app and have a spin.
//
-// example:
+// Example:
//
-// Notification Id : 5504151994cec69508ff5b517cc99bb06b19537ca4dfec7d9978531208c8488b
+// Notification Id : 5504151994cec69508ff5b517cc99bb06b19537ca4dfec7d9978531208c8488b
//
// ---------------------------------------------------------------------------------------------------------------
@@ -71,46 +66,44 @@
// do other stuff ...
}
-+ (NSString *)stringFromHexBytes:(NSData *)aData
++ (NSString *)hexStringFromBytes:(NSData *)aData
{
- static const char hexdigits[] = "0123456789abcdef";
-
- const size_t numBytes = [aData length];
-
- const unsigned char *bytes = [aData bytes];
-
- char *strbuf = (char *)malloc(numBytes * 2 + 1);
+ static const char hexDigits[] = "0123456789abcdef";
- char *hex = strbuf;
-
- NSString *hexBytes = nil;
+ const unsigned char *byteBuffer = [aData bytes];
+
+ NSUInteger byteCount = [aData length];
+
+ char *stringBuffer = (char *)malloc(byteCount * 2 + 1);
- for (int i = 0; i < numBytes; ++i)
+ char *hexChar = stringBuffer;
+
+ while (byteCount-- > 0)
{
- const unsigned char c = *bytes++;
+ const unsigned char c = *byteBuffer++;
- *hex++ = hexdigits[(c >> 4) & 0xF];
+ *hexChar++ = hexDigits[(c >> 4) & 0xF];
- *hex++ = hexdigits[(c ) & 0xF];
+ *hexChar++ = hexDigits[(c >> 0) & 0xF];
}
- *hex = 0;
+ *hexChar = 0;
- hexBytes = [NSString stringWithUTF8String:strbuf];
+ NSString *hexBytes = [NSString stringWithUTF8String:stringBuffer];
- free(strbuf);
+ free(stringBuffer);
return hexBytes;
}
- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)devToken
{
- NSLog(@"Notification Id : %@", [self stringFromHexBytes:devToken]);
+ NSLog(@"Notification Id : %@", [self hexStringFromBytes:devToken]);
}
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
{
- NSLog(@"Failed to get Notification : %@", error);
+ NSLog(@"Failed to register for Push Notifications : %@", error);
}
// ---------------------------------------------------------------------------------------------------------------
View
13 Sources/GZEApplication.h
@@ -28,6 +28,14 @@
#import <Cocoa/Cocoa.h>
+#import "GZEFormatNotificationID.h"
+
+#import "GZEFormatAlert.h"
+
+#import "GZEFormatBadge.h"
+
+#import "GZEFormatSound.h"
+
// --------------------------------------------------------------------------------------------------------------------
// class references
// --------------------------------------------------------------------------------------------------------------------
@@ -40,7 +48,10 @@
// class GZEApplication
// --------------------------------------------------------------------------------------------------------------------
-@interface GZEApplication : NSObject <NSApplicationDelegate>
+@interface GZEApplication : NSObject
+<
+ NSApplicationDelegate, GZEFormatAlertDelegate, GZEFormatBadgeDelegate, GZEFormatSoundDelegate
+>
{
@private
View
169 Sources/GZEApplication.m
@@ -58,7 +58,7 @@
#define DEFAULT_TIMEOUT 10.0f
-#define DEFAULT_NOTIFICATION_ID @"0000000000000000000000000000000000000000000000000000000000000000"
+#define DEFAULT_NOTIFICATION_ID @"00000000-00000000-00000000-00000000-00000000-00000000-00000000-00000000"
#define DEFAULT_NOTIFICATION_NAME @"?"
@@ -70,6 +70,10 @@
#define JSON_SOUND_FORMAT @"\"sound\":\"%@\""
+#define JSON_MAX_PAYLOAD 256
+
+#define PAYLOAD_FORMAT @"Payload size : %d / %d"
+
// --------------------------------------------------------------------------------------------------------------------
// defines
// --------------------------------------------------------------------------------------------------------------------
@@ -102,6 +106,18 @@
// class GZEApplication
// --------------------------------------------------------------------------------------------------------------------
+@interface GZEApplication (Private)
+
+- (NSString *)buildPayloadWithAlert:(NSString *)aAlert withBadge:(NSString *)aBadge withSound:(NSString *)aSound;
+
+- (NSAttributedString *)buildFormattedPayload:(NSString *)aPayload;
+
+@end
+
+// --------------------------------------------------------------------------------------------------------------------
+// class GZEApplication
+// --------------------------------------------------------------------------------------------------------------------
+
@implementation GZEApplication
// --------------------------------------------------------------------------------------------------------------------
@@ -321,6 +337,16 @@ - (void)updateStatus
[textFieldSound setEnabled:(buttonSound.state == NSOnState)];
[buttonSendNotification setEnabled:!hasNoSocket && hasNotificationIDsToSend];
+
+ NSString *payload = [self buildPayloadWithAlert:textFieldAlert.stringValue
+
+ withBadge:textFieldBadge.stringValue
+
+ withSound:textFieldSound.stringValue];
+
+ [[textViewOutput textStorage] setAttributedString:[self buildFormattedPayload:payload]];
+
+ textFieldFooter.stringValue = [NSString stringWithFormat:PAYLOAD_FORMAT, payload.length, JSON_MAX_PAYLOAD - 1];
}
// --------------------------------------------------------------------------------------------------------------------
@@ -562,7 +588,15 @@ - (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColum
// --------------------------------------------------------------------------------------------------------------------
- (void)tableView:(NSTableView *)tableView setObjectValue:(id)value forTableColumn:(NSTableColumn *)column row:(NSInteger)row
-{
+{
+ if ([[column identifier] isEqualToString:KEY_NOTIFICATION_ID])
+ {
+ if ([value isKindOfClass:[NSString class]])
+ {
+ value = [GZEFormatNotificationID arrayForString:value];
+ }
+ }
+
[[notificationIDs objectAtIndex:row] setObject:value forKey:[column identifier]];
[[NSUserDefaults standardUserDefaults] setObject:notificationIDs forKey:currentCertificate.key];
@@ -614,13 +648,15 @@ - (BOOL)tableView:(NSTableView *)aTableView
NSString *dropped = [pboard stringForType:NSPasteboardTypeString];
+ NSArray *array = [GZEFormatNotificationID arrayForString:dropped];
+
switch (operation)
{
case NSTableViewDropOn:
{
NSMutableDictionary *data = [notificationIDs objectAtIndex:row];
- [data setObject:dropped forKey:KEY_NOTIFICATION_ID];
+ [data setObject:array forKey:KEY_NOTIFICATION_ID];
NSIndexSet *indexes = [NSIndexSet indexSetWithIndex:row];
@@ -641,7 +677,7 @@ - (BOOL)tableView:(NSTableView *)aTableView
DEFAULT_NOTIFICATION_NAME, KEY_NAME,
- dropped, KEY_NOTIFICATION_ID,
+ array, KEY_NOTIFICATION_ID,
nil];
@@ -672,35 +708,23 @@ - (BOOL)tableView:(NSTableView *)aTableView
// method buildNotificationID onLocation
// --------------------------------------------------------------------------------------------------------------------
-- (NSUInteger)buildNotificationID:(NSString *)aNotificationID onLocation:(char *)aLocation
+- (NSUInteger)buildNotificationID:(NSArray *)aNotificationID onLocation:(unsigned int *)aLocation
{
- const char *hexChars = [aNotificationID UTF8String];
-
- const char *nextHex = hexChars;
-
- NSUInteger count = 0;
-
- // TODO check
-
- while (count < 32 && (count < strlen(hexChars)))
+ for (NSUInteger index = 0; index < 8; index++)
{
- sscanf(nextHex, "%2x", (unsigned int *)aLocation);
-
- nextHex += 2;
-
- aLocation++;
+ NSNumber *number = [aNotificationID objectAtIndex:index];
- count++;
+ aLocation[index] = NSSwapInt([number intValue]);
}
-
+
return 32;
}
// --------------------------------------------------------------------------------------------------------------------
-// method buildPayload
+// method buildPayloadWithAlert withBadge withSound
// --------------------------------------------------------------------------------------------------------------------
-- (NSUInteger)buildPayload:(NSMutableData *)aData
+- (NSString *)buildPayloadWithAlert:(NSString *)aAlert withBadge:(NSString *)aBadge withSound:(NSString *)aSound
{
// payload : alert
@@ -708,11 +732,7 @@ - (NSUInteger)buildPayload:(NSMutableData *)aData
if (buttonAlert.state == NSOnState)
{
- NSString *string = textFieldAlert.stringValue;
-
- // TODO sanitize
-
- plAlert = [NSString stringWithFormat:JSON_ALERT_FORMAT, string];
+ plAlert = [NSString stringWithFormat:JSON_ALERT_FORMAT, aAlert];
}
// payload : badge
@@ -721,7 +741,7 @@ - (NSUInteger)buildPayload:(NSMutableData *)aData
if (buttonBadge.state == NSOnState)
{
- plBadge = [NSString stringWithFormat:JSON_BADGE_FORMAT, textFieldBadge.stringValue.intValue];
+ plBadge = [NSString stringWithFormat:JSON_BADGE_FORMAT, aBadge.intValue];
}
// payload : sound
@@ -729,12 +749,8 @@ - (NSUInteger)buildPayload:(NSMutableData *)aData
NSString *plSound = nil;
if (buttonSound.state == NSOnState)
- {
- NSString *string = textFieldSound.stringValue;
-
- // TODO sanitize
-
- plSound = [NSString stringWithFormat:JSON_SOUND_FORMAT, string];
+ {
+ plSound = [NSString stringWithFormat:JSON_SOUND_FORMAT, aSound];
}
// payload
@@ -778,6 +794,30 @@ - (NSUInteger)buildPayload:(NSMutableData *)aData
}
NSString *payload = [NSString stringWithFormat:JSON_FORMAT, payloadAPS];
+
+ return payload;
+}
+
+// --------------------------------------------------------------------------------------------------------------------
+// method buildFormattedPayload
+// --------------------------------------------------------------------------------------------------------------------
+
+- (NSAttributedString *)buildFormattedPayload:(NSString *)aPayload
+{
+ return [[[NSAttributedString alloc] initWithString:aPayload] autorelease];
+}
+
+// --------------------------------------------------------------------------------------------------------------------
+// method buildPayload
+// --------------------------------------------------------------------------------------------------------------------
+
+- (NSUInteger)buildPayload:(NSMutableData *)aData
+{
+ NSString *payload = [self buildPayloadWithAlert:textFieldAlert.stringValue
+
+ withBadge:textFieldBadge.stringValue
+
+ withSound:textFieldSound.stringValue];
const char *payloadChar = [payload cStringUsingEncoding:NSUTF8StringEncoding];
@@ -813,6 +853,63 @@ - (BOOL)control:(NSControl *)control isValidObject:(id)object
}
// --------------------------------------------------------------------------------------------------------------------
+// method formatAlertCheck forString
+// --------------------------------------------------------------------------------------------------------------------
+
+- (BOOL)formatAlertCheck:(GZEFormatAlert *)aAlert forString:(NSString *)aString
+{
+ NSString *payload = [self buildPayloadWithAlert:aString
+
+ withBadge:textFieldBadge.stringValue
+
+ withSound:textFieldSound.stringValue];
+
+ [[textViewOutput textStorage] setAttributedString:[self buildFormattedPayload:payload]];
+
+ textFieldFooter.stringValue = [NSString stringWithFormat:PAYLOAD_FORMAT, payload.length, JSON_MAX_PAYLOAD - 1];
+
+ return (payload.length < JSON_MAX_PAYLOAD);
+}
+
+// --------------------------------------------------------------------------------------------------------------------
+// method formatBadgeCheck forString
+// --------------------------------------------------------------------------------------------------------------------
+
+- (BOOL)formatBadgeCheck:(GZEFormatBadge *)aBadge forString:(NSString *)aString
+{
+ NSString *payload = [self buildPayloadWithAlert:textFieldAlert.stringValue
+
+ withBadge:aString
+
+ withSound:textFieldSound.stringValue];
+
+ [[textViewOutput textStorage] setAttributedString:[self buildFormattedPayload:payload]];
+
+ textFieldFooter.stringValue = [NSString stringWithFormat:PAYLOAD_FORMAT, payload.length, JSON_MAX_PAYLOAD - 1];
+
+ return (payload.length < JSON_MAX_PAYLOAD);
+}
+
+// --------------------------------------------------------------------------------------------------------------------
+// method formatSoundCheck forString
+// --------------------------------------------------------------------------------------------------------------------
+
+- (BOOL)formatSoundCheck:(GZEFormatSound *)aSound forString:(NSString *)aString
+{
+ NSString *payload = [self buildPayloadWithAlert:textFieldSound.stringValue
+
+ withBadge:textFieldBadge.stringValue
+
+ withSound:aString];
+
+ [[textViewOutput textStorage] setAttributedString:[self buildFormattedPayload:payload]];
+
+ textFieldFooter.stringValue = [NSString stringWithFormat:PAYLOAD_FORMAT, payload.length, JSON_MAX_PAYLOAD - 1];
+
+ return (payload.length < JSON_MAX_PAYLOAD);
+}
+
+// --------------------------------------------------------------------------------------------------------------------
// method clickConnect
// --------------------------------------------------------------------------------------------------------------------
@@ -1027,7 +1124,7 @@ - (IBAction)clickSendNotification:(NSButton *)aSender
header[ 1] = 0; // fixed
- header[ 2] = [self buildNotificationID:[data objectForKey:KEY_NOTIFICATION_ID] onLocation:&header[3]];
+ header[ 2] = [self buildNotificationID:[data objectForKey:KEY_NOTIFICATION_ID] onLocation:(unsigned int *)&header[3]];
header[35] = 0; // fixed
View
26 Sources/GZEFormatAlert.h
@@ -29,21 +29,39 @@
#import <Foundation/Foundation.h>
// --------------------------------------------------------------------------------------------------------------------
+// class references
+// --------------------------------------------------------------------------------------------------------------------
+
+@class GZEFormatAlert;
+
+// --------------------------------------------------------------------------------------------------------------------
+// class GZEFormatAlertDelegate
+// --------------------------------------------------------------------------------------------------------------------
+
+@protocol GZEFormatAlertDelegate
+
+@required
+
+- (BOOL)formatAlertCheck:(GZEFormatAlert *)aAlert forString:(NSString *)aString;
+
+@end
+
+// --------------------------------------------------------------------------------------------------------------------
// class GZEFormatAlert
// --------------------------------------------------------------------------------------------------------------------
@interface GZEFormatAlert : NSFormatter
{
- //
+ @private
+
+ id<GZEFormatAlertDelegate> delegate;
}
// --------------------------------------------------------------------------------------------------------------------
// properties
// --------------------------------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------------------------------
-// method prototypes
-// --------------------------------------------------------------------------------------------------------------------
+@property (assign) IBOutlet id<GZEFormatAlertDelegate> delegate;
// --------------------------------------------------------------------------------------------------------------------
// done
View
93 Sources/GZEFormatAlert.m
@@ -28,7 +28,6 @@
#import "GZEFormatAlert.h"
-
// --------------------------------------------------------------------------------------------------------------------
// class GZEFormatAlert
// --------------------------------------------------------------------------------------------------------------------
@@ -39,78 +38,60 @@ @implementation GZEFormatAlert
// property synthesizers
// --------------------------------------------------------------------------------------------------------------------
+@synthesize delegate;
+
+// --------------------------------------------------------------------------------------------------------------------
+// method stringForObjectValue
+// --------------------------------------------------------------------------------------------------------------------
+
+- (NSString *)stringForObjectValue:(id)aObject
+{
+ return [aObject description];
+}
+
// --------------------------------------------------------------------------------------------------------------------
-// method init
+// method getObjectValue forString errorDescription
// --------------------------------------------------------------------------------------------------------------------
-- (id)init
-{
- if (self = [super init])
+- (BOOL)getObjectValue:(id *)aObject
+
+ forString:(NSString *)aString
+
+ errorDescription:(NSString **)aError
+{
+ *aObject = aString;
+
+ if (aError)
{
- //
+ *aError = nil;
}
- return self;
-}
+ return YES;
+}
// --------------------------------------------------------------------------------------------------------------------
-// method dealloc
+// method isPartialStringValid newEditingString errorDescription
// --------------------------------------------------------------------------------------------------------------------
-- (void)dealloc
-{
- [super dealloc];
-}
+- (BOOL)isPartialStringValid:(NSString *)aPartialString
-// --------------------------------------------------------------------------------------------------------------------
-// method stringForObjectValue
-// --------------------------------------------------------------------------------------------------------------------
-/*
-- (NSString *)stringForObjectValue:(id)anObject
+ newEditingString:(NSString **)aNewString
+
+ errorDescription:(NSString **)aError
{
- if (![anObject isKindOfClass:[NSNumber class]])
+ if (aError)
{
- return nil;
- }
-
- return [NSString stringWithFormat:@"$%.2f", [anObject floatValue]];
-}
-*/
-// --------------------------------------------------------------------------------------------------------------------
-// method stringForObjectValue
-// --------------------------------------------------------------------------------------------------------------------
-/*
-- (BOOL)getObjectValue:(id *)obj forString:(NSString *)string errorDescription:(NSString **)error
-{
- BOOL returnValue = NO;
-
- NSScanner *scanner = [NSScanner scannerWithString: string];
+ *aError = nil;
+ }
- [scanner scanString: @"$" intoString: NULL]; //ignore return value
-
- float floatResult;
-
- if ([scanner scanFloat:&floatResult] && ([scanner isAtEnd]))
+ if (delegate)
{
- returnValue = YES;
-
- if (obj)
- {
- *obj = [NSNumber numberWithFloat:floatResult];
- }
-
- }
- else
- {
- if (error)
- {
- *error = NSLocalizedString(@"Couldn’t convert to float", @"Error converting");
- }
- }
+ return [delegate formatAlertCheck:self forString:aPartialString];
+ }
- return returnValue;
+ return YES;
}
-*/
+
// --------------------------------------------------------------------------------------------------------------------
// done
// --------------------------------------------------------------------------------------------------------------------
View
27 Sources/GZEFormatBadge.h
@@ -29,24 +29,39 @@
#import <Foundation/Foundation.h>
// --------------------------------------------------------------------------------------------------------------------
+// class references
+// --------------------------------------------------------------------------------------------------------------------
+
+@class GZEFormatBadge;
+
+// --------------------------------------------------------------------------------------------------------------------
+// class GZEFormatBadgeDelegate
+// --------------------------------------------------------------------------------------------------------------------
+
+@protocol GZEFormatBadgeDelegate
+
+@required
+
+- (BOOL)formatBadgeCheck:(GZEFormatBadge *)aBadge forString:(NSString *)aString;
+
+@end
+
+// --------------------------------------------------------------------------------------------------------------------
// class GZEFormatBadge
// --------------------------------------------------------------------------------------------------------------------
-@interface GZEFormatBadge : NSFormatter
+@interface GZEFormatBadge : NSNumberFormatter
{
-
@private
- //
+ id<GZEFormatBadgeDelegate> delegate;
}
// --------------------------------------------------------------------------------------------------------------------
// properties
// --------------------------------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------------------------------
-// method prototypes
-// --------------------------------------------------------------------------------------------------------------------
+@property (assign) IBOutlet id<GZEFormatBadgeDelegate> delegate;
// --------------------------------------------------------------------------------------------------------------------
// done
View
65 Sources/GZEFormatBadge.m
@@ -28,7 +28,6 @@
#import "GZEFormatBadge.h"
-
// --------------------------------------------------------------------------------------------------------------------
// class GZEFormatBadge
// --------------------------------------------------------------------------------------------------------------------
@@ -39,27 +38,63 @@ @implementation GZEFormatBadge
// property synthesizers
// --------------------------------------------------------------------------------------------------------------------
+@synthesize delegate;
+
// --------------------------------------------------------------------------------------------------------------------
-// method init
+// method isPartialStringValid newEditingString errorDescription
// --------------------------------------------------------------------------------------------------------------------
-- (id)init
+- (BOOL)isPartialStringValid:(NSString *)aPartialString
+
+ newEditingString:(NSString **)aNewString
+
+ errorDescription:(NSString **)aError
{
- if (self = [super init])
- {
- //
- }
+ BOOL result = [super isPartialStringValid:aPartialString newEditingString:aNewString errorDescription:aError];
- return self;
-}
+ if (result)
+ {
+ aPartialString = [aPartialString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
-// --------------------------------------------------------------------------------------------------------------------
-// method dealloc
-// --------------------------------------------------------------------------------------------------------------------
+ NSScanner *scanner = [NSScanner scannerWithString:aPartialString];
+
+ NSInteger value = 0;
-- (void)dealloc
-{
- [super dealloc];
+ result = [scanner scanInteger:&value];
+
+ if (result)
+ {
+ if ([scanner isAtEnd])
+ {
+ if (value < 0)
+ {
+ result = NO;
+ }
+
+ if (value > 999)
+ {
+ result = NO;
+ }
+ }
+ else
+ {
+ result = NO;
+ }
+ }
+ else
+ {
+ result = (aPartialString.length == 0);
+ }
+ }
+
+ if (result && delegate)
+ {
+ NSUInteger value = [aPartialString intValue];
+
+ return [delegate formatBadgeCheck:self forString:[NSString stringWithFormat:@"%d", value]];
+ }
+
+ return result;
}
// --------------------------------------------------------------------------------------------------------------------
View
11 Sources/GZEFormatNotificationID.h
@@ -34,20 +34,17 @@
@interface GZEFormatNotificationID : NSFormatter
{
-
-@private
-
//
}
// --------------------------------------------------------------------------------------------------------------------
-// properties
-// --------------------------------------------------------------------------------------------------------------------
-
-// --------------------------------------------------------------------------------------------------------------------
// method prototypes
// --------------------------------------------------------------------------------------------------------------------
+- (NSArray *)arrayForString:(NSString *)aString;
+
++ (NSArray *)arrayForString:(NSString *)aString;
+
// --------------------------------------------------------------------------------------------------------------------
// done
// --------------------------------------------------------------------------------------------------------------------
View
246 Sources/GZEFormatNotificationID.m
@@ -28,6 +28,15 @@
#import "GZEFormatNotificationID.h"
+// --------------------------------------------------------------------------------------------------------------------
+// defines
+// --------------------------------------------------------------------------------------------------------------------
+
+#define VALID_FORMAT @"%08x-%08x-%08x-%08x-%08x-%08x-%08x-%08x"
+
+#define VALID_COUNT 8
+
+#define VALID_LENGTH 8
// --------------------------------------------------------------------------------------------------------------------
// class GZEFormatNotificationID
@@ -36,30 +45,245 @@
@implementation GZEFormatNotificationID
// --------------------------------------------------------------------------------------------------------------------
-// property synthesizers
+// method arrayForString
// --------------------------------------------------------------------------------------------------------------------
+- (NSArray *)arrayForString:(NSString *)aString
+{
+ NSCharacterSet *keepCharacters = [NSCharacterSet characterSetWithCharactersInString:@"0123456789abcdefABCDEF"];
+
+ unichar cZero = '0';
+
+ NSUInteger characterIndex = 0;
+
+ NSMutableString *string = [NSMutableString string];
+
+ for (NSUInteger index = 0; index < (VALID_COUNT * VALID_LENGTH); index++)
+ {
+ unichar c = cZero;
+
+ while (characterIndex < aString.length)
+ {
+ c = [aString characterAtIndex:characterIndex++];
+
+ if ([keepCharacters characterIsMember:c])
+ {
+ break;
+ }
+ else
+ {
+ c = cZero;
+ }
+ }
+
+ [string appendString:[NSString stringWithCharacters:&c length:1]];
+
+ if ((index % VALID_LENGTH) == (VALID_LENGTH - 1))
+ {
+ [string appendString:@" "];
+ }
+ }
+
+ unsigned int number[VALID_COUNT] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+
+ NSScanner *scanner = [NSScanner scannerWithString:[string lowercaseString]];
+
+ NSUInteger index = 0;
+
+ while (![scanner isAtEnd] && (index < VALID_COUNT))
+ {
+ if (![scanner scanHexInt:&number[index++]])
+ {
+ break;
+ }
+ }
+
+ return [NSArray arrayWithObjects:
+
+ [NSNumber numberWithUnsignedInt:number[0]],
+
+ [NSNumber numberWithUnsignedInt:number[1]],
+
+ [NSNumber numberWithUnsignedInt:number[2]],
+
+ [NSNumber numberWithUnsignedInt:number[3]],
+
+ [NSNumber numberWithUnsignedInt:number[4]],
+
+ [NSNumber numberWithUnsignedInt:number[5]],
+
+ [NSNumber numberWithUnsignedInt:number[6]],
+
+ [NSNumber numberWithUnsignedInt:number[7]],
+
+ nil];
+}
+
// --------------------------------------------------------------------------------------------------------------------
-// method init
+// method arrayForString
// --------------------------------------------------------------------------------------------------------------------
-- (id)init
++ (NSArray *)arrayForString:(NSString *)aString
{
- if (self = [super init])
- {
- //
- }
+ NSArray *result;
+
+ GZEFormatNotificationID *formatter = [[self alloc] init];
- return self;
+ result = [formatter arrayForString:aString];
+
+ [formatter release];
+
+ return result;
}
// --------------------------------------------------------------------------------------------------------------------
-// method dealloc
+// method stringForObjectValue
+// --------------------------------------------------------------------------------------------------------------------
+
+- (NSString *)stringForObjectValue:(id)aObject
+{
+ NSArray *data = [NSArray arrayWithObjects:
+
+ [NSNumber numberWithUnsignedInt:0],
+
+ [NSNumber numberWithUnsignedInt:0],
+
+ [NSNumber numberWithUnsignedInt:0],
+
+ [NSNumber numberWithUnsignedInt:0],
+
+ [NSNumber numberWithUnsignedInt:0],
+
+ [NSNumber numberWithUnsignedInt:0],
+
+ [NSNumber numberWithUnsignedInt:0],
+
+ [NSNumber numberWithUnsignedInt:0],
+
+ nil];
+
+ if ([aObject isKindOfClass:[NSArray class]])
+ {
+ NSMutableArray *temp = [NSMutableArray arrayWithArray:aObject];
+
+ for (NSUInteger index = 0; index < 8; index++)
+ {
+ if (temp.count > index)
+ {
+ if (![[temp objectAtIndex:index] isKindOfClass:[NSNumber class]])
+ {
+ [temp replaceObjectAtIndex:index withObject:[NSNumber numberWithUnsignedInt:0]];
+ }
+ }
+ else
+ {
+ [temp addObject:[NSNumber numberWithUnsignedInt:0]];
+ }
+ }
+
+ data = temp;
+ }
+
+ return [NSString stringWithFormat:VALID_FORMAT,
+
+ [[data objectAtIndex:0] unsignedIntValue],
+
+ [[data objectAtIndex:1] unsignedIntValue],
+
+ [[data objectAtIndex:2] unsignedIntValue],
+
+ [[data objectAtIndex:3] unsignedIntValue],
+
+ [[data objectAtIndex:4] unsignedIntValue],
+
+ [[data objectAtIndex:5] unsignedIntValue],
+
+ [[data objectAtIndex:6] unsignedIntValue],
+
+ [[data objectAtIndex:7] unsignedIntValue]];
+}
+
+// --------------------------------------------------------------------------------------------------------------------
+// method getObjectValue forString errorDescription
// --------------------------------------------------------------------------------------------------------------------
-- (void)dealloc
+- (BOOL)getObjectValue:(id *)aObject
+
+ forString:(NSString *)aString
+
+ errorDescription:(NSString **)aError
+{
+ *aObject = [self arrayForString:aString];
+
+ if (aError)
+ {
+ *aError = nil;
+ }
+
+ return YES;
+}
+
+// --------------------------------------------------------------------------------------------------------------------
+// method isPartialStringValid newEditingString errorDescription
+// --------------------------------------------------------------------------------------------------------------------
+
+- (BOOL)isPartialStringValid:(NSString **)aPartialString
+
+ proposedSelectedRange:(NSRangePointer)aProposedSelectedRange
+
+ originalString:(NSString *)aOriginalString
+
+ originalSelectedRange:(NSRange)aOriginalSelectedRange
+
+ errorDescription:(NSString **)aError
{
- [super dealloc];
+ NSRange proposedSelectedRange = (aProposedSelectedRange != nil) ? *aProposedSelectedRange : NSMakeRange(0, 0);
+
+// NSRange replaceSubStringRange = NSMakeRange(aOriginalSelectedRange.location, proposedSelectedRange.location - aOriginalSelectedRange.location);
+
+// NSString *replaceSubstring = [*aPartialString substringWithRange:replaceSubStringRange];
+
+// NSString *originalStringSelected = [aOriginalString substringWithRange:aOriginalSelectedRange];
+
+ NSString *string = [self stringForObjectValue:[self arrayForString:*aPartialString]];
+
+ // TODO calculate correct proposed selected range
+
+ if (proposedSelectedRange.location > string.length)
+ {
+ proposedSelectedRange.location = string.length;
+ }
+/*
+ NSLog(@"---------------------------------------------------------------------------------------------------------");
+
+ NSLog(@"original string : %@", aOriginalString);
+
+ NSLog(@"original substring : %@", originalStringSelected);
+
+ NSLog(@"original substring range : %d - %d", aOriginalSelectedRange.location , aOriginalSelectedRange.length);
+
+ NSLog(@"partial string : %@", *aPartialString);
+
+ NSLog(@"replace substring : %@", replaceSubstring);
+
+ NSLog(@"replace substring range : %d - %d", replaceSubStringRange.location , replaceSubStringRange.length);
+
+ NSLog(@"finale : %@", string);
+
+ NSLog(@"final selected range : %d - %d", proposedSelectedRange.location, proposedSelectedRange.length);
+
+ NSLog(@"---------------------------------------------------------------------------------------------------------");
+*/
+ *aPartialString = string;
+
+ *aProposedSelectedRange = proposedSelectedRange;
+
+ if (aError)
+ {
+ *aError = nil;
+ }
+
+ return NO;
}
// --------------------------------------------------------------------------------------------------------------------
View
25 Sources/GZEFormatSound.h
@@ -29,24 +29,39 @@
#import <Foundation/Foundation.h>
// --------------------------------------------------------------------------------------------------------------------
+// class references
+// --------------------------------------------------------------------------------------------------------------------
+
+@class GZEFormatSound;
+
+// --------------------------------------------------------------------------------------------------------------------
+// class GZEFormatSoundDelegate
+// --------------------------------------------------------------------------------------------------------------------
+
+@protocol GZEFormatSoundDelegate
+
+@required
+
+- (BOOL)formatSoundCheck:(GZEFormatSound *)aSound forString:(NSString *)aString;
+
+@end
+
+// --------------------------------------------------------------------------------------------------------------------
// class GZEFormatSound
// --------------------------------------------------------------------------------------------------------------------
@interface GZEFormatSound : NSFormatter
{
-
@private
- //
+ id<GZEFormatSoundDelegate> delegate;
}
// --------------------------------------------------------------------------------------------------------------------
// properties
// --------------------------------------------------------------------------------------------------------------------
-// --------------------------------------------------------------------------------------------------------------------
-// method prototypes
-// --------------------------------------------------------------------------------------------------------------------
+@property (assign) IBOutlet id<GZEFormatSoundDelegate> delegate;
// --------------------------------------------------------------------------------------------------------------------
// done
View
56 Sources/GZEFormatSound.m
@@ -28,7 +28,6 @@
#import "GZEFormatSound.h"
-
// --------------------------------------------------------------------------------------------------------------------
// class GZEFormatSound
// --------------------------------------------------------------------------------------------------------------------
@@ -39,27 +38,60 @@ @implementation GZEFormatSound
// property synthesizers
// --------------------------------------------------------------------------------------------------------------------
+@synthesize delegate;
+
+// --------------------------------------------------------------------------------------------------------------------
+// method stringForObjectValue
+// --------------------------------------------------------------------------------------------------------------------
+
+- (NSString *)stringForObjectValue:(id)aObject
+{
+ return [aObject description];
+}
+
// --------------------------------------------------------------------------------------------------------------------
-// method init
+// method getObjectValue forString errorDescription
// --------------------------------------------------------------------------------------------------------------------
-- (id)init
-{
- if (self = [super init])
+- (BOOL)getObjectValue:(id *)aObject
+
+ forString:(NSString *)aString
+
+ errorDescription:(NSString **)aError
+{
+ *aObject = aString;
+
+ if (aError)
{
- //
+ *aError = nil;
}
- return self;