title: Unhandled exceptions in iOS generated code
body: <p>I am attempting to simply test some of the objective-c API but I am having some issues with unhandled exceptions in the generated code created by SUP. I have set up a simple test with the following code:</p>
  
  <pre><code>+(void)testPersonalizationKeys
  {
      TaskTracker_PersonalizationParameters *pp = nil;
      pp = [TaskTracker_TaskTrackerDB
      getPersonalizationParameters];
      pp.username = @"************";
      pp.password = @"************";
      [pp save];
  
      while([TaskTracker_TaskTrackerDB hasPendingOperations])
      {
          [NSThread sleepForTimeInterval:1];
      }
  
      [self printLogs];
  }
  </code></pre>
  
  <p>I call this static method from main and run the application, but the application terminates with this message:</p>
  
  <pre><code>Terminating app due to uncaught exception 'SUPReadWriteLock error', reason: 'attempt to unlock when not locked'
  </code></pre>
  
  <p>Here is the full stack track:</p>
  
  <pre><code>*** Call stack at first throw:
  (
      0   CoreFoundation                      0x00a685a9  __exceptionPreprocess + 185
      1   libobjc.A.dylib                     0x018fc313  objc_exception_throw + 44
      2   TaskTracker                         0x000c4b29 -[SUPReadWriteLock unlock] + 118
      3   TaskTracker                         0x00067356 +[TaskTracker_SubscriptionStatusfind:inTable:] + 1590
      4   TaskTracker                         0x00066d09 +[TaskTracker_SubscriptionStatusfind:] + 73
      5   TaskTracker                         0x00071256 -[TaskTracker_TaskTrackerDB packageIsSubscribed] + 70
      6   TaskTracker                         0x0006d561 +[TaskTracker_TaskTrackerDB packageHasSubscription] + 81
      7   TaskTracker                         0x00063981 -[TaskTracker_PersonalizationParameters save] + 1617
      8   TaskTracker                         0x00072f22 +[SampleApp testPersonalizationKeys] + 178
      9   TaskTracker                         0x00072a60 +[SampleApp runAPITests] + 272
      10  TaskTracker                         0x000023ea main + 138
      11  TaskTracker                         0x00002355 start + 53
  )
  </code></pre>
  
  <p>Has anyone run into anything like this with iOS to SUP connections? If so how did you get past it?</p>
  
  <p>Any help is appreciated!</p>