Skip to content

Instantly share code, notes, and snippets.

@mikehaytm
Last active January 6, 2016 14:09
Show Gist options
  • Save mikehaytm/86d39247706024b2d5f4 to your computer and use it in GitHub Desktop.
Save mikehaytm/86d39247706024b2d5f4 to your computer and use it in GitHub Desktop.
Handle With Care: Cocoa methods and properties that may raise exceptions.
CLASS METHODS
+[AVCaptureDevice requestAccessForMediaType:completionHandler:]
+[AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:]
+[HKCategorySample categorySampleWithType:value:startDate:endDate:]
+[HKCategorySample categorySampleWithType:value:startDate:endDate:device:metadata:]
+[HKCategorySample categorySampleWithType:value:startDate:endDate:metadata:]
+[HKCorrelation correlationWithType:startDate:endDate:objects:]
+[HKCorrelation correlationWithType:startDate:endDate:objects:device:metadata:]
+[HKCorrelation correlationWithType:startDate:endDate:objects:metadata:]
+[HKQuantitySample quantitySampleWithType:quantity:startDate:endDate:]
+[HKQuantitySample quantitySampleWithType:quantity:startDate:endDate:device:metadata:]
+[HKQuantitySample quantitySampleWithType:quantity:startDate:endDate:metadata:]
+[HKUnit energyFormatterUnitFromUnit:]
+[HKUnit lengthFormatterUnitFromUnit:]
+[HKUnit massFormatterUnitFromUnit:]
+[HKUnit unitFromString:]
+[NSDictionary dictionaryWithObject:forKey:]
+[NSDictionary dictionaryWithObjects:forKeys:]
+[NSDictionary dictionaryWithObjects:forKeys:count:]
+[NSDictionary dictionaryWithObjectsAndKeys:]
+[NSEntityDescription entityForName:inManagedObjectContext:]
+[NSException raise:format:]
+[NSException raise:format:arguments:]
+[NSJSONSerialization dataWithJSONObject:options:error:]
+[NSKeyedUnarchiver unarchiveObjectWithData:]
+[NSKeyedUnarchiver unarchiveObjectWithFile:]
+[NSPropertyListSerialization dataWithPropertyList:format:options:error:]
+[NSPropertyListSerialization propertyListWithData:options:format:error:]
+[NSPropertyListSerialization writePropertyList:toStream:format:options:error:]
+[NSString localizedStringWithFormat:]
+[NSString stringWithFormat:]
+[NSString stringWithString:]
INSTANCE METHODS
-[ACAccountStore requestAccessToAccountsWithType:options:completion:]
-[AVAssetReaderOutput resetForReadingTimeRanges:]
-[AVAssetWriterInput addTrackAssociationWithTrackOfInput:type:]
-[AVCaptureDevice chromaticityValuesForDeviceWhiteBalanceGains:]
-[AVCaptureDevice deviceWhiteBalanceGainsForChromaticityValues:]
-[AVCaptureDevice setExposureModeCustomWithDuration:ISO:completionHandler:]
-[AVCaptureDevice setExposureTargetBias:completionHandler:]
-[AVCaptureDevice setFocusModeLockedWithLensPosition:completionHandler:]
-[AVCaptureDevice setWhiteBalanceModeLockedWithDeviceWhiteBalanceGains:completionHandler:]
-[AVCaptureDevice temperatureAndTintValuesForDeviceWhiteBalanceGains:]
-[AVCaptureFileOutput startRecordingToOutputFileURL:recordingDelegate:]
-[AVCaptureStillImageOutput captureStillImageBracketAsynchronouslyFromConnection:withSettingsArray:completionHandler:]
-[AVCaptureStillImageOutput prepareToCaptureStillImageBracketFromConnection:withSettingsArray:completionHandler:]
-[CNContact areKeysAvailable:]
-[CNContact isKeyAvailable:]
-[HKQuantity compare:]
-[HKQuantity doubleValueForUnit:]
-[NSArray arrayByAddingObject:]
-[NSArray getObjects:range:]
-[NSArray indexOfObject:inRange:]
-[NSArray indexOfObject:inSortedRange:options:usingComparator:]
-[NSArray makeObjectsPerformSelector:]
-[NSArray makeObjectsPerformSelector:withObject:]
-[NSArray objectAtIndex:]
-[NSArray objectAtIndexedSubscript:]
-[NSArray objectsAtIndexes:]
-[NSArray subarrayWithRange:]
-[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:]
-[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
-[NSAttributedString attribute:atIndex:effectiveRange:]
-[NSAttributedString attribute:atIndex:longestEffectiveRange:inRange:]
-[NSAttributedString attributedSubstringFromRange:]
-[NSAttributedString attributesAtIndex:effectiveRange:]
-[NSAttributedString attributesAtIndex:longestEffectiveRange:inRange:]
-[NSAttributedString dataFromRange:documentAttributes:error:]
-[NSAttributedString fileWrapperFromRange:documentAttributes:error:]
-[NSBlockOperation addExecutionBlock:]
-[NSCoder decodeFloatForKey:]
-[NSCoder decodeInt32ForKey:]
-[NSCoder decodeIntegerForKey:]
-[NSCoder decodeIntForKey:]
-[NSData getBytes:range:]
-[NSData rangeOfData:options:range:]
-[NSData subdataWithRange:]
-[NSDictionary initWithObjects:forKeys:]
-[NSDictionary initWithObjects:forKeys:count:]
-[NSDictionary initWithObjectsAndKeys:]
-[NSException raise]
-[NSFileHandle readDataOfLength:]
-[NSFileWrapper addFileWithPath:]
-[NSFileWrapper addFileWrapper:]
-[NSFileWrapper addRegularFileWithContents:preferredFilename:]
-[NSFileWrapper addSymbolicLinkWithDestination:preferredFilename:]
-[NSFileWrapper keyForFileWrapper:]
-[NSFileWrapper removeFileWrapper:]
-[NSFileWrapper symbolicLinkDestination]
-[NSIncrementalStore referenceObjectForObjectID:]
-[NSIndexPath getIndexes:range:]
-[NSIndexSet initWithIndexesInRange:]
-[NSInvocation getArgument:atIndex:]
-[NSInvocation setArgument:atIndex:]
-[NSKeyedUnarchiver decodeFloatForKey:]
-[NSKeyedUnarchiver decodeInt32ForKey:]
-[NSKeyedUnarchiver decodeIntForKey:]
-[NSLayoutManager glyphAtIndex:]
-[NSLayoutManager notShownAttributeForGlyphAtIndex:]
-[NSLayoutManager setNotShownAttribute:forGlyphAtIndex:]
-[NSMethodSignature getArgumentTypeAtIndex:]
-[NSMigrationManager destinationInstancesForEntityMappingNamed:sourceInstances:]
-[NSMigrationManager sourceInstancesForEntityMappingNamed:destinationInstances:]
-[NSMutableArray addObject:]
-[NSMutableArray insertObject:atIndex:]
-[NSMutableArray removeLastObject]
-[NSMutableArray removeObject:inRange:]
-[NSMutableArray removeObjectAtIndex:]
-[NSMutableArray removeObjectIdenticalTo:inRange:]
-[NSMutableArray replaceObjectAtIndex:withObject:]
-[NSMutableArray setObject:atIndexedSubscript:]
-[NSMutableAttributedString addAttribute:value:range:]
-[NSMutableAttributedString addAttributes:range:]
-[NSMutableAttributedString deleteCharactersInRange:]
-[NSMutableAttributedString fixAttributesInRange:]
-[NSMutableAttributedString insertAttributedString:atIndex:]
-[NSMutableAttributedString removeAttribute:range:]
-[NSMutableAttributedString replaceCharactersInRange:withAttributedString:]
-[NSMutableAttributedString replaceCharactersInRange:withString:]
-[NSMutableAttributedString setAttributes:range:]
-[NSMutableData replaceBytesInRange:withBytes:]
-[NSMutableData resetBytesInRange:]
-[NSMutableDictionary removeObjectForKey:]
-[NSMutableDictionary setObject:forKey:]
-[NSMutableDictionary setObject:forKeyedSubscript:]
-[NSMutableIndexSet addIndexesInRange:]
-[NSMutableOrderedSet exchangeObjectAtIndex:withObjectAtIndex:]
-[NSMutableOrderedSet insertObject:atIndex:]
-[NSMutableOrderedSet removeObjectAtIndex:]
-[NSMutableOrderedSet replaceObjectAtIndex:withObject:]
-[NSMutableOrderedSet setObject:atIndexedSubscript:]
-[NSMutableString appendFormat:]
-[NSMutableString deleteCharactersInRange:]
-[NSMutableString insertString:atIndex:]
-[NSMutableString replaceCharactersInRange:withString:]
-[NSMutableString replaceOccurrencesOfString:withString:options:range:]
-[NSObject doesNotRecognizeSelector:]
-[NSObject setNilValueForKey:]
-[NSObject setValue:forUndefinedKey:]
-[NSObject valueForUndefinedKey:]
-[NSOperation start]
-[NSOperationQueue addOperation:]
-[NSOperationQueue addOperations:waitUntilFinished:]
-[NSOrderedSet getObjects:range:]
-[NSOrderedSet indexOfObject:inSortedRange:options:usingComparator:]
-[NSOrderedSet objectAtIndex:]
-[NSOrderedSet objectAtIndexedSubscript:]
-[NSOrderedSet objectsAtIndexes:]
-[NSPort sendBeforeDate:components:from:reserved:]
-[NSPort sendBeforeDate:msgid:components:from:reserved:]
-[NSProxy forwardInvocation:]
-[NSProxy methodSignatureForSelector:]
-[NSSet makeObjectsPerformSelector:]
-[NSSet makeObjectsPerformSelector:withObject:]
-[NSString characterAtIndex:]
-[NSString compare:options:range:]
-[NSString compare:options:range:locale:]
-[NSString cString]
-[NSString getCharacters:range:]
-[NSString getCString:]
-[NSString getCString:maxLength:]
-[NSString getCString:maxLength:range:remainingRange:]
-[NSString getLineStart:end:contentsEnd:forRange:]
-[NSString initWithFormat:]
-[NSString initWithFormat:arguments:]
-[NSString initWithFormat:locale:]
-[NSString initWithFormat:locale:arguments:]
-[NSString initWithString:]
-[NSString propertyList]
-[NSString rangeOfCharacterFromSet:]
-[NSString rangeOfCharacterFromSet:options:]
-[NSString rangeOfCharacterFromSet:options:range:]
-[NSString rangeOfString:]
-[NSString rangeOfString:options:]
-[NSString rangeOfString:options:range:]
-[NSString rangeOfString:options:range:locale:]
-[NSString stringByAppendingFormat:]
-[NSString stringByAppendingString:]
-[NSString substringFromIndex:]
-[NSString substringToIndex:]
-[NSString substringWithRange:]
-[NSUndoManager enableUndoRegistration]
-[NSUndoManager endUndoGrouping]
-[NSUndoManager redo]
-[NSUndoManager registerUndoWithTarget:selector:object:]
-[NSUndoManager undo]
-[NSUndoManager undoNestedGroup]
-[NSUserDefaults setVolatileDomain:forName:]
-[PHFetchResult indexOfObject:inRange:]
-[PHFetchResult objectAtIndex:]
-[PHFetchResult objectAtIndexedSubscript:]
-[PHFetchResult objectsAtIndexes:]
-[SCNGeometry insertMaterial:atIndex:]
-[SCNGeometry removeMaterialAtIndex:]
-[SCNGeometry replaceMaterialAtIndex:withMaterial:]
-[SCNNode insertChildNode:atIndex:]
-[SCNNode replaceChildNode:with:]
-[UIAlertView textFieldAtIndex:]
-[UIDocument initWithFileURL:]
-[UIImagePickerController startVideoCapture]
-[UIImagePickerController takePicture]
-[UIStackView insertArrangedSubview:atIndex:]
-[UIViewController performSegueWithIdentifier:sender:]
PROPERTIES
AVAssetExportSession.audioTimePitchAlgorithm
AVAssetReaderAudioMixOutput.audioTimePitchAlgorithm
AVAssetReaderTrackOutput.audioTimePitchAlgorithm
AVAudioMixInputParameters.audioTimePitchAlgorithm
AVCaptureDevice.activeFormat
AVCaptureDevice.activeVideoMaxFrameDuration
AVCaptureDevice.activeVideoMinFrameDuration
AVCaptureDevice.automaticallyAdjustsVideoHDREnabled
AVCaptureDevice.automaticallyEnablesLowLightBoostWhenAvailable
AVCaptureDevice.videoHDREnabled
AVCaptureMetadataOutput.metadataObjectTypes
AVCaptureStillImageOutput.automaticallyEnablesStillImageStabilizationWhenAvailable
AVMutableAudioMixInputParameters.audioTimePitchAlgorithm
AVPlayerItem.audioTimePitchAlgorithm
AVPlayerItemLegibleOutput.textStylingResolution
NSFetchRequest.propertiesToFetch
NSFileHandle.availableData
NSFileWrapper.fileWrappers
NSFileWrapper.regularFileContents
NSFileWrapper.symbolicLinkDestinationURL
NSInvocationOperation.result
NSOperationQueue.underlyingQueue
NSScanner.scanLocation
NSString.fileSystemRepresentation
UIImagePickerController.cameraOverlayView
UIImagePickerController.cameraViewTransform
UIImagePickerController.showsCameraControls
UIStepper.maximumValue
UIStepper.minimumValue
UIStepper.stepValue
PROTOCOL METHODS
-[NSObject performSelector:]
-[NSObject performSelector:withObject:]
-[NSObject performSelector:withObject:withObject:]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment