title: NSCFNumber getCString maxLength encoding Error While creating Geo- Fences
body: <p>When I try to add the radius to fencing application, I'm getting <code>[__NSCFNumber getCString:maxLength:encoding:]</code> crash.
  Here is my code:</p>
  
  <pre><code>NSString *identifier = [dictionary valueForKey:@"id"];
  
  CLLocationDegrees latitude = [[dictionary valueForKey:@"lat"] doubleValue];
  
  CLLocationDegrees longitude =[[dictionary valueForKey:@"lon"] doubleValue];
  
  CLLocationCoordinate2D centerCoordinate = CLLocationCoordinate2DMake(latitude, longitude);
  
  CLLocationDistance regionRadius = [[dictionary valueForKey:@"radius"] doubleValue];
  NSLog(@"nslog is %f",regionRadius);
  
  
  if(regionRadius &gt; _locationManager.maximumRegionMonitoringDistance)
  {
      regionRadius = _locationManager.maximumRegionMonitoringDistance;
  }
  
  NSString *version = [[UIDevice currentDevice] systemVersion];
  CLRegion * region =nil;
  
  if([version floatValue] &gt;= 7.0f) // for iOS &gt; 7
  {
      region =  [[CLCircularRegion alloc] initWithCenter:centerCoordinate
                                                  radius:regionRadius
                                              identifier:identifier];
  }
  else // for iOS &lt; 7
  {
      region = [[CLRegion alloc] initCircularRegionWithCenter:centerCoordinate
                                                       radius:regionRadius
                                                   identifier:identifier];
  }
  </code></pre>
  
  <p>Here the Stacktrace is</p>
  
  <pre><code>0   KNOXXi                              0x00064c8b -[KCSDK dictToRegion:] + 854
  1   KNOXXi                              0x000640cf -[KCSDK addGeofence:] + 86
  2   KNOXXi                              0x00065d25 __25-[KCSDK reloadLocations:]_block_invoke + 536
  3   KNOXXi                              0x0006369d __59-[KCSDK fetchNearbyFencesWithLocation:withSuccess:failure:]_block_invoke + 196
  4   KNOXXi                              0x0002762d __64-[AFHTTPRequestOperation setCompletionBlockWithSuccess:failure:]_block_invoke46 + 36
  5   libdispatch.dylib                   0x3992f833 &lt;redacted&gt; + 10
  6   libdispatch.dylib                   0x3992f81f &lt;redacted&gt; + 22
  7   libdispatch.dylib                   0x3993649f &lt;redacted&gt; + 278
  8   CoreFoundation                      0x2e7648a1 &lt;redacted&gt; + 8
  9   CoreFoundation                      0x2e763175 &lt;redacted&gt; + 1300
  10  CoreFoundation                      0x2e6cdebf CFRunLoopRunSpecific + 522
  11  CoreFoundation                      0x2e6cdca3 CFRunLoopRunInMode + 106
  12  GraphicsServices                    0x33601663 GSEventRunModal + 138
  13  UIKit                               0x3101a14d UIApplicationMain + 1136
  14  KNOXXi                              0x00026411 main + 224
  15  libdyld.dylib                       0x39954ab7 &lt;redacted&gt; + 2
  </code></pre>