Saturday, September 13, 2014

Show only Photos in photo gallery iOS - Objective c


UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = (id)self;
picker.allowsEditing = YES;
 picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;

if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
        {
            //photo 
            picker.mediaTypes =  [[NSArray alloc] initWithObjects:(NSString *)kUTTypeImage, nil];;
        }
        

[self presentViewController:picker animated:YES completion:nil];

        

Wednesday, August 20, 2014

Debugging with Assertions - Swift Language - iOS 8


An assertion is a runtime check that a logical condition definitely evaluates to true. Literally put, an assertion “asserts” that a condition is true. You use an assertion to make sure that an essential condition is satisfied before executing any further code. If the condition evaluates to true, code execution continues as usual; if the condition evaluates to false, code execution ends, and your app is terminated.

If your code triggers an assertion while running in a debug environment, such as when you build and run an app in Xcode, you can see exactly where the invalid state occurred and query the state of your app at the time that the assertion was triggered. An assertion also lets you provide a suitable debug message as to the nature of the assert. You write an assertion by calling the global assert function. You pass the assert function an expression that evaluates to true or false and a message that should be displayed if the result of the condition is false:


let age = -3
assert(age >= 0, "A person's age cannot be less than zero") // this causes the assertion to trigger, because age is not >= 0



In this example, code execution will continue only if age >= 0 evaluates to true, that is, if the value of age is non-negative. If the value of age is negative, as in the code above, then age >= 0 evaluates to false, and the assertion is triggered, terminating the application.

Assertion messages cannot use string interpolation. The assertion message can be omitted if desired, as in the following example:

assert(age >= 0)

When to Use Assertions

Use an assertion whenever a condition has the potential to be false, but must definitely be true in order for your code to continue execution. Suitable scenarios for an assertion check include:
An integer subscript index is passed to a custom subscript implementation, but the subscript index value could be too low or too high.A value is passed to a function, but an invalid value means that the function cannot fulfill its task.An optional value is currently nil, but a non- nil value is essential for subsequent code to execute successfully.


NOTE
Assertions cause your app to terminate and are not a substitute for designing your code in such a way that

invalid conditions are unlikely to arise. Nonetheless, in situations where invalid conditions are possible, an assertion is an effective way to ensure that such conditions are highlighted and noticed during development, before your app is published. 

Tuples - Swift language iOS 8







Tuples group multiple values into a single compound value. The values within a tuple can be of any type and do not have to be of the same type as each other.
In this example, (404, "Not Found") is a tuple that describes an HTTP status code. An HTTP status code is a special value returned by a web server whenever you request a web page. A status code of 404 Not Found is returned if you request a webpage that doesn’t exist.



let http404Error = (404, "Not Found")

// http404Error is of type (Int, String), and equals (404, "Not Found")




The (404, "Not Found") tuple groups together an Int and a String to give the HTTP status code two separate values: a number and a human-readable description. It can be described as “a tuple of type (Int, String)”.

You can create tuples from any permutation of types, and they can contain as many different types as you like. There’s nothing stopping you from having a tuple of type (Int, Int, Int), or (String, Bool), or indeed any other permutation you require.
You can decompose a tuple’s contents into separate constants or variables, which you then access as usual:


let (statusCode, statusMessage) = http404Error 

println("The status code is \(statusCode)")

// prints "The status code is 404"

println("The status message is \(statusMessage)"

// prints "The status message is Not Found"



If you only need some of the tuple’s values, ignore parts of the tuple with an underscore (_) when you decompose the tuple:

let (justTheStatusCode, _) = http404Error 

println("The status code is \(justTheStatusCode)")   
// prints "The status code is 404"

Alternatively, access the individual element values in a tuple using index numbers starting at zero:


println("The status code is \(http404Error.0)")
// prints "The status code is 404"

println("The status message is \(http404Error.1)"
// prints "The status message is Not Found"


You can name the individual elements in a tuple when the tuple is defined:

let http200Status = (statusCode: 200, description: "OK")

If you name the elements in a tuple, you can use the element names to access the values of those elements:


println("The status code is \(http200Status.statusCode)")
// prints "The status code is 200"

println("The status message is \(http200Status.description)")


// prints "The status message is OK"


Tuples are particularly useful as the return values of functions. A function that tries to retrieve a web page might return the (Int, String) tuple type to describe the success or failure of the page retrieval. By returning a tuple with two distinct values, each of a different type, the function provides more useful information about its outcome than if it could only return a single value of a single type.

NOTE
Tuples are useful for temporary groups of related values. They are not suited to the creation of complex data structures. If your data structure is likely to persist beyond a temporary scope, model it as a class or structure, rather than as a tuple. 




Monday, August 18, 2014

UIAlertView Swift language iOS8

Code

 var alert=UIAlertController(title: "Warning", message: "Success", preferredStyle: UIAlertControllerStyle.Alert);
        
alert.addAction(UIAlertAction(title: "Click", style: UIAlertActionStyle.Cancel, handler:nil));


self.presentViewController(alert, animated: true, completion: nil);

Wednesday, August 13, 2014

iOS Accessing Music List

One way is to take the array of MPMediaItems you get from the MPMediaQuery and sort it by MPMediaItemPropertyLastPlayedDate using an NSSortDescriptor:
NSTimeInterval start  = [[NSDate date] timeIntervalSince1970];

MPMediaQuery *songsQuery = [MPMediaQuery songsQuery];
NSArray *songsArray = [songsQuery items];

NSSortDescriptor *sorter = [NSSortDescriptor sortDescriptorWithKey:MPMediaItemPropertyLastPlayedDate
                                                         ascending:NO];
NSArray *sortedSongsArray = [songsArray sortedArrayUsingDescriptors:@[sorter]];

NSTimeInterval finish = [[NSDate date] timeIntervalSince1970];
NSLog(@"Execution took %f seconds.", finish - start);

Tuesday, August 12, 2014

iOS Networking Open source tools

Networking

AFNetworking iOS & OS X networking framework
asi-http-request CFNetwork wrapper for HTTP requests
RestKit Consuming and modeling RESTful web resources
Reachability ARC and GCD modification for Apple’s reachability class
socket.IO-objc socket.io v0.7.2+ for iOS devices
AFNetworkActivityLoggerv AFNetworking 2.0 Extension for Network Request Logging

Monday, August 11, 2014

iOS Debug Tools



Debug Tools

PonyDebugger Remote network and data debugging
CocoaLumberJack Flexible logging framework for Mac and iOS
superdb realtime wireless debugger for iOS
OHHTTPStubs Stub network requests
NSLogger A modern, flexible logging tool
Xtrace Trace Objective-C method calls by class or instance
RHObjectiveBeagle Beagle is an Objective C debugging tool that can sniff out class instances on the heap.
KSCrash The Ultimate iOS Crash Reporter
chisel Chisel is a collection of LLDB commands to assist debugging iOS apps.
plcrashreporter Mirror of the official PLCrashReporter repository

Tuesday, August 5, 2014

Xamarin.mac View Animation

NSAnimationContext.BeginGrouping();
NSAnimationContext.CurrentContext.Duration = 4.0f;

// Type the action you want


var rect = new RectangleF (0, 0, 581, 356);
ViewDetailedSummary.Frame = rect;


NSAnimationContext.EndGrouping();

Thursday, July 31, 2014

Read/Write file Xamarin.Mac - File Management

Read/Write file from MYDocument Folder

Write File
            var documents = 
                Environment.GetFolderPath (Environment.SpecialFolder.MyDocuments);
            var directoryname = Path.Combine (documents, "NewDirectory");
            Directory.CreateDirectory (directoryname);
            var filename = Path.Combine (directoryname, "Text.txt");
            Console.WriteLine("path"+filename);
            File.WriteAllText(filename, TextViewSave.Value);
        


Read File


       
            var documents =
                Environment.GetFolderPath (Environment.SpecialFolder.MyDocuments);
            var directoryname = Path.Combine (documents, "NewDirectory");
            Directory.CreateDirectory (directoryname);
            var filename = Path.Combine (directoryname, "Text.txt");
            File.ReadAllText(filename);
       


Read/Write file from Library

Write File
             var documents = 
            Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "Library");
  

            var directoryname = Path.Combine (documents, "NewDirectory");
            Directory.CreateDirectory (directoryname);
            var filename = Path.Combine (directoryname, "Text.txt");
            Console.WriteLine("path"+filename);
            File.WriteAllText(filename, TextViewSave.Value);
        


Read File


       
            
 var documents = 
            Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "Library");
 
            var directoryname = Path.Combine (documents, "NewDirectory");
            Directory.CreateDirectory (directoryname);
            var filename = Path.Combine (directoryname, "Text.txt");
            File.ReadAllText(filename);
       

Namespace: MonoTouch Xamarin

Namespace: MonoTouch.AVFoundation

Type Changed: MonoTouch.AVFoundation.AVAsset

Removed:
1
2
3
4
  public virtual AVAssetResourceLoader ResourceLoader {
   get;
  }

Type Changed: MonoTouch.AVFoundation.AVAssetReaderVideoCompositionOutput

Removed:
1
2
3
  public AVAssetReaderVideoCompositionOutput Create (AVAssetTrack[] videoTracks, MonoTouch.CoreVideo.CVPixelBufferAttributes settings);
  public virtual AVAssetReaderVideoCompositionOutput WeakFromTracks (AVAssetTrack[] videoTracks, MonoTouch.Foundation.NSDictionary videoSettings);
Added:
1
2
3
  public static AVAssetReaderVideoCompositionOutput Create (AVAssetTrack[] videoTracks, MonoTouch.CoreVideo.CVPixelBufferAttributes settings);
  public static AVAssetReaderVideoCompositionOutput WeakFromTracks (AVAssetTrack[] videoTracks, MonoTouch.Foundation.NSDictionary videoSettings);

Type Changed: MonoTouch.AVFoundation.AVCaptureVideoPreviewLayer

Removed:
1
2
  public virtual string VideoGravity {
Added:
1
2
  public string VideoGravity {

Type Changed: MonoTouch.AVFoundation.AVPlayerLayer

Removed:
1
2
  public virtual string VideoGravity {
Added:
1
2
  public string VideoGravity {

Namespace: MonoTouch.AudioToolbox

Type Changed: MonoTouch.AudioToolbox.AudioChannelLayoutTag

Removed:
1
2
 public enum AudioChannelLayoutTag {
Added:
1
2
 public enum AudioChannelLayoutTag : uint {

New Type: MonoTouch.AudioToolbox.AudioConverter

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
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
public class AudioConverter : IDisposable {
 
 public static AudioConverter Create (AudioStreamBasicDescription sourceFormat, AudioStreamBasicDescription destinationFormat);
 public static AudioConverter Create (AudioStreamBasicDescription sourceFormat, AudioStreamBasicDescription destinationFormat, AudioClassDescription[] descriptions);
 public static AudioConverter Create (AudioStreamBasicDescription sourceFormat, AudioStreamBasicDescription destinationFormat, out AudioConverterError error);
 public AudioConverterError ConvertBuffer (byte [] input, byte [] output);
 public AudioConverterError ConvertComplexBuffer (int numberPCMFrames, AudioBuffers inputData, AudioBuffers outputData);
 public void Dispose ();
 protected virtual void Dispose (bool disposing);
 public AudioConverterError FillComplexBuffer (ref int outputDataPacketSize, AudioBuffers outputData, AudioStreamPacketDescription[] packetDescription);
 protected override void Finalize ();
 public AudioConverterError Reset ();
 
 public static AudioFormatType[] DecodeFormats {
  get;
 }
 public static AudioFormatType[] EncodeFormats {
  get;
 }
 public AudioValueRange[] ApplicableEncodeBitRates {
  get;
 }
 public AudioValueRange[] ApplicableEncodeSampleRates {
  get;
 }
 public AudioValueRange[] AvailableEncodeBitRates {
  get;
 }
 public AudioChannelLayoutTag[] AvailableEncodeChannelLayoutTags {
  get;
 }
 public AudioValueRange[] AvailableEncodeSampleRates {
  get;
 }
 public int BitDepthHint {
  get;
  set;
 }
 public uint CalculateInputBufferSize {
  get;
 }
 public uint CalculateOutputBufferSize {
  get;
 }
 public bool CanResumeFromInterruption {
  get;
 }
 public int [] ChannelMap {
  get;
 }
 public AudioConverterQuality CodecQuality {
  get;
  set;
 }
 public byte [] CompressionMagicCookie {
  get;
  set;
 }
 public AudioStreamBasicDescription CurrentInputStreamDescription {
  get;
 }
 public AudioStreamBasicDescription CurrentOutputStreamDescription {
  get;
 }
 public byte [] DecompressionMagicCookie {
  get;
  set;
 }
 public double EncodeAdjustableSampleRate {
  get;
  set;
 }
 public uint EncodeBitRate {
  get;
  set;
 }
 public AudioFormat[] FormatList {
  get;
 }
 public AudioChannelLayout InputChannelLayout {
  get;
 }
 public uint MaximumInputPacketSize {
  get;
 }
 public uint MaximumOutputPacketSize {
  get;
 }
 public uint MinimumInputBufferSize {
  get;
 }
 public uint MinimumOutputBufferSize {
  get;
 }
 public AudioChannelLayout OutputChannelLayout {
  get;
 }
 public AudioConverterPrimeInfo PrimeInfo {
  get;
 }
 public AudioConverterPrimeMethod PrimeMethod {
  get;
  set;
 }
 public AudioConverterSampleRateConverterComplexity SampleRateConverterComplexity {
  get;
 }
 public double SampleRateConverterInitialPhase {
  get;
  set;
 }
 public AudioConverterQuality SampleRateConverterQuality {
  get;
 }
 
 public event AudioConverterComplexInputData InputData;
}

New Type: MonoTouch.AudioToolbox.AudioConverterComplexInputData

1
2
3
[Serializable]
public delegate AudioConverterError AudioConverterComplexInputData (ref int numberDataPackets, AudioBuffers data, ref AudioStreamPacketDescription[] dataPacketDescription);

New Type: MonoTouch.AudioToolbox.AudioConverterError

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[Serializable]
public enum AudioConverterError {
 None,
 FormatNotSupported,
 OperationNotSupported,
 PropertyNotSupported,
 InvalidInputSize,
 InvalidOutputSize,
 UnspecifiedError,
 BadPropertySizeError,
 RequiresPacketDescriptionsError,
 InputSampleRateOutOfRange,
 OutputSampleRateOutOfRange,
 HardwareInUse,
 NoHardwarePermission
}

New Type: MonoTouch.AudioToolbox.AudioConverterPrimeInfo

1
2
3
4
5
6
public struct AudioConverterPrimeInfo {
 
 public int LeadingFrames;
 public int TrailingFrames;
}

New Type: MonoTouch.AudioToolbox.AudioConverterPrimeMethod

1
2
3
4
5
6
7
[Serializable]
public enum AudioConverterPrimeMethod {
 Pre,
 Normal,
 None
}

New Type: MonoTouch.AudioToolbox.AudioConverterQuality

1
2
3
4
5
6
7
8
9
[Serializable]
public enum AudioConverterQuality {
 Max,
 High,
 Medium,
 Low,
 Min
}

New Type: MonoTouch.AudioToolbox.AudioConverterSampleRateConverterComplexity

1
2
3
4
5
6
7
[Serializable]
public enum AudioConverterSampleRateConverterComplexity {
 Linear,
 Normal,
 Mastering
}

Type Changed: MonoTouch.AudioToolbox.AudioFile

Removed:
1
2
3
4
  public int WritePackets (bool useCache, long inStartingPacket, AudioStreamPacketDescription[] inPacketDescriptions, IntPtr buffer, int count);
  public int WritePackets (bool useCache, long inStartingPacket, AudioStreamPacketDescription[] inPacketDescriptions, IntPtr buffer, int count, out int errorCode);
  public int WritePackets (bool useCache, long inStartingPacket, int numPackets, IntPtr buffer, int count);
Added:
1
2
3
4
5
6
7
8
  public bool IsPropertyWritable (AudioFileProperty property);
  public AudioFileError ReadPackets (bool useCache, out int numBytes, AudioStreamPacketDescription[] packetDescriptions, long startingPacket, ref int numPackets, IntPtr buffer);
  public AudioFileError WritePackets (bool useCache, int numBytes, AudioStreamPacketDescription[] packetDescriptions, long startingPacket, ref int numPackets, IntPtr buffer);
  public int WritePackets (bool useCache, long startingPacket, AudioStreamPacketDescription[] packetDescriptions, IntPtr buffer, int count);
  public int WritePackets (bool useCache, long startingPacket, AudioStreamPacketDescription[] packetDescriptions, IntPtr buffer, int count, out int errorCode);
  public int WritePackets (bool useCache, long startingPacket, int numPackets, IntPtr buffer, int count);
   set;

New Type: MonoTouch.AudioToolbox.AudioFileError

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[Serializable]
public enum AudioFileError {
 Unspecified,
 UnsupportedFileType,
 UnsupportedDataFormat,
 UnsupportedProperty,
 BadPropertySize,
 Permissions,
 NotOptimized,
 InvalidChunk,
 DoesNotAllow64BitDataSize,
 InvalidPacketOffset,
 InvalidFile,
 FileNotOpen,
 EndOfFile,
 FileNotFound,
 FilePosition
}

Type Changed: MonoTouch.AudioToolbox.AudioSession

Added:
1
2
  public event EventHandler<AudioSessionRouteChangeEventArgs> AudioRouteChanged;

New Type: MonoTouch.AudioToolbox.AudioSessionRouteChangeEventArgs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
public class AudioSessionRouteChangeEventArgs : EventArgs {
 
 public AudioSessionRouteChangeEventArgs (IntPtr dictHandle);
 
 public AudioSessionInputRouteKind CurrentInputRoute {
  get;
 }
 public AudioSessionOutputRouteKind[] CurrentOutputRoutes {
  get;
 }
 public MonoTouch.Foundation.NSDictionary Dictionary {
  get;
 }
 public AudioSessionInputRouteKind PreviousInputRoute {
  get;
 }
 public AudioSessionOutputRouteKind[] PreviousOutputRoutes {
  get;
 }
 public AudioSessionRouteChangeReason Reason {
  get;
 }
}

Namespace: MonoTouch.AudioUnit

Type Changed: MonoTouch.AudioUnit.AudioComponentDescription

Removed:
1
2
  public int ComponentFlags;
Added:
1
2
  public AudioComponentFlag ComponentFlags;

New Type: MonoTouch.AudioUnit.AudioComponentFlag

1
2
3
4
5
6
[Serializable]
[Flags]
public enum AudioComponentFlag {
 Unsearchable
}

Type Changed: MonoTouch.AudioUnit.ExtAudioFile

Added:
1
2
3
4
5
  public ExtAudioFileError SynchronizeAudioConverter ();
  public MonoTouch.AudioToolbox.AudioConverter AudioConverter {
   get;
  }

Namespace: MonoTouch.AudioUnitWrapper

Type Changed: MonoTouch.AudioUnitWrapper._AudioConverter

Removed:
1
2
 public class _AudioConverter : IDisposable {
Added:
1
2
3
 [Obsolete]
public class _AudioConverter : IDisposable {

Type Changed: MonoTouch.AudioUnitWrapper._AudioConverterEventArgs

Removed:
1
2
 public class _AudioConverterEventArgs : EventArgs {
Added:
1
2
3
 [Obsolete]
public class _AudioConverterEventArgs : EventArgs {

Namespace: MonoTouch.CoreAnimation

Type Changed: MonoTouch.CoreAnimation.CAEmitterCell

Removed:
1
2
  public virtual MonoTouch.CoreGraphics.CGImage Contents {
Added:
1
2
  public MonoTouch.CoreGraphics.CGImage Contents {

Namespace: MonoTouch.CoreData

Type Changed: MonoTouch.CoreData.NSAttributeDescription

Removed:
1
2
  public virtual void SetDefaultValue (MonoTouch.Foundation.NSObject value);
Added:
1
2
3
  [Obsolete("Use the DefaultValue property")]
 public virtual void SetDefaultValue (MonoTouch.Foundation.NSObject value);

Type Changed: MonoTouch.CoreData.NSManagedObjectModel

Removed:
1
2
3
4
  public virtual IntPtr Init {
   get;
  }

Namespace: MonoTouch.CoreLocation

Type Changed: MonoTouch.CoreLocation.CLLocationManager

Removed:
1
2
  public event EventHandler DidStartMonitoringForRegion;
Added:
1
2
  public event EventHandler<CLRegionEventArgs> DidStartMonitoringForRegion;

Type Changed: MonoTouch.CoreLocation.CLLocationManagerDelegate

Removed:
1
2
  public virtual void DidStartMonitoringForRegion (CLRegion region);
Added:
1
2
3
4
  public virtual void DidStartMonitoringForRegion (CLLocationManager manager, CLRegion region);
  [Obsolete("Do not override this method, override the (CLLocationManager, CLRegion) overload instead.")]
 public virtual void DidStartMonitoringForRegion (CLRegion region);

Namespace: MonoTouch.Foundation

Type Changed: MonoTouch.Foundation.NSCalendar

Added:
1
2
3
4
5
  public virtual NSDateComponents Components (NSCalendarUnit unitFlags, NSDate fromDate);
  public virtual NSDateComponents Components (NSCalendarUnit unitFlags, NSDate fromDate, NSDate toDate, NSDateComponentsWrappingBehavior opts);
  public virtual NSDate DateByAddingComponents (NSDateComponents comps, NSDate date, NSDateComponentsWrappingBehavior opts);
  public virtual NSDate DateFromComponents (NSDateComponents comps);

New Type: MonoTouch.Foundation.NSDateComponentsWrappingBehavior

1
2
3
4
5
6
[Serializable]
public enum NSDateComponentsWrappingBehavior {
 None,
 WrapCalendarComponents
}

New Type: MonoTouch.Foundation.NSFileHandle

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
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
public class NSFileHandle : NSObject {
 
 public NSFileHandle (NSCoder coder);
 public NSFileHandle (NSObjectFlag t);
 public NSFileHandle (IntPtr handle);
 public NSFileHandle (int fd, bool closeOnDealloc);
 public NSFileHandle (int fd);
 
 public static NSFileHandle FromNullDevice ();
 public static NSFileHandle FromStandardError ();
 public static NSFileHandle FromStandardInput ();
 public static NSFileHandle FromStandardOutput ();
 public static NSFileHandle OpenRead (string path);
 public static NSFileHandle OpenReadUrl (NSUrl url, out NSError error);
 public static NSFileHandle OpenUpdate (string path);
 public static NSFileHandle OpenUpdateUrl (NSUrl url, out NSError error);
 public static NSFileHandle OpenWrite (string path);
 public static NSFileHandle OpenWriteUrl (NSUrl url, out NSError error);
 public virtual void AcceptConnectionInBackground ();
 public virtual void AcceptConnectionInBackground (NSString[] notifyRunLoopModes);
 public virtual NSData AvailableData ();
 public virtual void CloseFile ();
 public virtual ulong OffsetInFile ();
 public virtual NSData ReadDataOfLength (uint length);
 public virtual NSData ReadDataToEndOfFile ();
 public virtual void ReadInBackground ();
 public virtual void ReadInBackground (NSString[] notifyRunLoopModes);
 public virtual void ReadToEndOfFileInBackground ();
 public virtual void ReadToEndOfFileInBackground (NSString[] notifyRunLoopModes);
 public virtual ulong SeekToEndOfFile ();
 public virtual void SeekToFileOffset (ulong offset);
 public virtual void SetReadabilityHandler (NSFileHandleUpdateHandler readCallback);
 public virtual void SetWriteabilityHandle (NSFileHandleUpdateHandler writeCallback);
 public virtual void SynchronizeFile ();
 public virtual void TruncateFileAtOffset (ulong offset);
 public virtual void WaitForDataInBackground ();
 public virtual void WaitForDataInBackground (NSString[] notifyRunLoopModes);
 public virtual void WriteData (NSData data);
 
 public static NSString ConnectionAcceptedNotification {
  get;
 }
 public static NSString DataAvailableNotification {
  get;
 }
 public static NSString OperationException {
  get;
 }
 public static NSString ReadCompletionNotification {
  get;
 }
 public static NSString ReadToEndOfFileCompletionNotification {
  get;
 }
 public override IntPtr ClassHandle {
  get;
 }
 public virtual int FileDescriptor {
  get;
 }
 
 public static class Notifications {
  
  public static NSObject ObserveConnectionAccepted (EventHandler handler);
  public static NSObject ObserveDataAvailable (EventHandler handler);
  public static NSObject ObserveReadCompletion (EventHandler handler);
  public static NSObject ObserveReadToEndOfFileCompletion (EventHandler handler);
 }
}

New Type: MonoTouch.Foundation.NSFileHandleConnectionAcceptedEventArgs

1
2
3
4
5
6
7
8
9
10
11
12
public class NSFileHandleConnectionAcceptedEventArgs : NSNotificationEventArgs {
 
 public NSFileHandleConnectionAcceptedEventArgs (NSNotification notification);
 
 public NSFileHandle NearSocketConnection {
  get;
 }
 public int UnixErrorCode {
  get;
 }
}

New Type: MonoTouch.Foundation.NSFileHandleReadEventArgs

1
2
3
4
5
6
7
8
9
10
11
12
public class NSFileHandleReadEventArgs : NSNotificationEventArgs {
 
 public NSFileHandleReadEventArgs (NSNotification notification);
 
 public NSData AvailableData {
  get;
 }
 public int UnixErrorCode {
  get;
 }
}

New Type: MonoTouch.Foundation.NSFileHandleUpdateHandler

1
2
3
[Serializable]
public delegate void NSFileHandleUpdateHandler (NSFileHandle handle);

Type Changed: MonoTouch.Foundation.NSInputStream

Removed:
1
2
  public NSInputStream ();
Added:
1
2
  protected NSInputStream ();

Type Changed: MonoTouch.Foundation.NSObject

Added:
1
2
3
  public NSObject (IntPtr handle, bool alloced);
  public static void InvokeInBackground (NSAction action);

New Type: MonoTouch.Foundation.NSPipe

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
public class NSPipe : NSObject {
 
 public NSPipe ();
 public NSPipe (NSCoder coder);
 public NSPipe (NSObjectFlag t);
 public NSPipe (IntPtr handle);
 
 public static NSPipe Create ();
 protected override void Dispose (bool disposing);
 
 public override IntPtr ClassHandle {
  get;
 }
 public virtual NSFileHandle ReadHandle {
  get;
 }
 public virtual NSFileHandle WriteHandle {
  get;
 }
}

New Type: MonoTouch.Foundation.NSSearchPath

1
2
3
4
5
public static class NSSearchPath {
 
 public static string [] GetDirectories (NSSearchPathDirectory directory, NSSearchPathDomain domainMask, bool expandTilde);
}

Type Changed: MonoTouch.Foundation.NSUrlProtocol

Removed:
1
2
   set;

Namespace: MonoTouch.GameKit

Type Changed: MonoTouch.GameKit.GKScore

Removed:
1
2
3
4
5
  [Obsolete("Use Date property")]
 public virtual MonoTouch.Foundation.NSDate date {
   get;
  }

Namespace: MonoTouch.ObjCRuntime

Type Changed: MonoTouch.ObjCRuntime.Class

Added:
1
2
3
4
  public static IntPtr GetHandleIntrinsic (string name);
  
  public static bool ThrowOnInitFailure;

Type Changed: MonoTouch.ObjCRuntime.Messaging

Added:
1
2
3
4
5
6
  public static IntPtr IntPtr_objc_msgSend_int_bool (IntPtr receiver, IntPtr selector, int arg1, bool arg2);
  public static IntPtr IntPtr_objc_msgSend_int_IntPtr_IntPtr_int (IntPtr receiver, IntPtr selector, int arg1, IntPtr arg2, IntPtr arg3, int arg4);
  public static IntPtr IntPtr_objc_msgSendSuper_int_bool (IntPtr receiver, IntPtr selector, int arg1, bool arg2);
  public static IntPtr IntPtr_objc_msgSendSuper_int_IntPtr_IntPtr_int (IntPtr receiver, IntPtr selector, int arg1, IntPtr arg2, IntPtr arg3, int arg4);
  public static void void_objc_msgSend_intptr_intptr (IntPtr receiver, IntPtr selector, IntPtr arg1, IntPtr arg2);

Type Changed: MonoTouch.ObjCRuntime.Selector

Added:
1
2
  public bool Equals (Selector right);

Namespace: MonoTouch.Security

Type Changed: MonoTouch.Security.SecKey

Added:
1
2
3
4
  public SecKey (IntPtr handle);
  public SecKey (IntPtr handle, bool owns);
  

Namespace: MonoTouch.UIKit

Type Changed: MonoTouch.UIKit.UIApplication

Removed:
1
2
  public virtual void SetStatusBarHidden (bool hiddent, bool animated);
Added:
1
2
3
4
5
6
7
8
  public virtual void SetStatusBarHidden (bool hidden, bool animated);
  public static MonoTouch.Foundation.NSString StateRestorationBundleVersionKey {
   get;
  }
  public static MonoTouch.Foundation.NSString StateRestorationUserInterfaceIdiomKey {
   get;
  }

Type Changed: MonoTouch.UIKit.UIImage

Removed:
1
2
  public UIImage (UIEdgeInsets capInsets, UIImageResizingMode resizingMode);
Added:
1
2
  public virtual UIImage CreateResizableImage (UIEdgeInsets capInsets, UIImageResizingMode resizingMode);

New Type: MonoTouch.UIKit.UILocalizedIndexedCollation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
public class UILocalizedIndexedCollation : MonoTouch.Foundation.NSObject {
 
 public UILocalizedIndexedCollation ();
 public UILocalizedIndexedCollation (MonoTouch.Foundation.NSCoder coder);
 public UILocalizedIndexedCollation (MonoTouch.Foundation.NSObjectFlag t);
 public UILocalizedIndexedCollation (IntPtr handle);
 
 public static UILocalizedIndexedCollation CurrentCollation ();
 public virtual int GetSectionForObject (MonoTouch.Foundation.NSObject obj, MonoTouch.ObjCRuntime.Selector collationStringSelector);
 public virtual int GetSectionForSectionIndexTitle (int indexTitleIndex);
 public virtual MonoTouch.Foundation.NSObject[] SortedArrayFromArraycollationStringSelector (MonoTouch.Foundation.NSObject[] array, MonoTouch.ObjCRuntime.Selector collationStringSelector);
 
 public override IntPtr ClassHandle {
  get;
 }
 public virtual string [] SectionIndexTitles {
  get;
 }
 public virtual string [] SectionTitles {
  get;
 }
}

New Type: MonoTouch.UIKit.UIStateRestoration

1
2
3
4
5
6
7
public static class UIStateRestoration {
 
 public static MonoTouch.Foundation.NSString ViewControllerStoryboardKey {
  get;
 }
}