Recent releases have been pre-built using cross-compilers and this script and are downloadable below.
If you have found these packages useful, give me a shout out on twitter: @adammw
| using System; | |
| using System.Net; | |
| using System.Net.Sockets; | |
| using System.Text; | |
| namespace UDP | |
| { | |
| public class UDPSocket | |
| { | |
| private Socket _socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); |
| // Taken from the commercial iOS PDF framework http://pspdfkit.com. | |
| // Copyright (c) 2014 Peter Steinberger, PSPDFKit GmbH. All rights reserved. | |
| // Licensed under MIT (http://opensource.org/licenses/MIT) | |
| // | |
| // You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it. | |
| // PLEASE DUPE rdar://27192338 (https://openradar.appspot.com/27192338) if you would like to see this in UIKit. | |
| #import <objc/runtime.h> | |
| #import <objc/message.h> |
| - (NSURL *)URLWithString:(NSString *)string andQueryValuesForKeys:(NSString *)value, ... { | |
| if (!value) { | |
| return [NSURL URLWithString:string]; | |
| } | |
| NSMutableString *queryString = [NSMutableString string]; | |
| NSString *argument = nil; | |
| NSUInteger argumentCount = 0; | |
| va_list argumentList; |
| + (UIImage*)imageNamedForDevice:(NSString*)name { | |
| if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) | |
| { | |
| if (([UIScreen mainScreen].bounds.size.height * [UIScreen mainScreen].scale) >= 1136.0f) | |
| { | |
| //Check if is there a path extension or not | |
| if (name.pathExtension.length) { | |
| name = [name stringByReplacingOccurrencesOfString: [NSString stringWithFormat:@".%@", name.pathExtension] | |
| withString: [NSString stringWithFormat:@"-568h@2x.%@", name.pathExtension ] ]; |
Recent releases have been pre-built using cross-compilers and this script and are downloadable below.
If you have found these packages useful, give me a shout out on twitter: @adammw