Skip to main content

Posts

How to print in iOS 4.2?

I want to integrate the print functionality in my app. The document I want to print will be in .doc or .txt format. I am not very experienced in iPhone development yet, so finding it difficult to implement it by following the Apple documentation. If someone could help me by posting some sample code, will be a great help. Thanks in advance. -iPhoneDev Source: Tips4all

Which Flurry library should I use for universal iPhone/iPad apps?

Flurry has a separate analytics SDK for iPad apps vs iPhone apps. If I'm building a universal app to run on the iPhone 4.0+ and iPad 3.2+ (iPad native, not compatibility mode), does anyone know which SDK/lib I should use? And is there any reason I shouldn't use the same SDK/lib for apps running on iPhone 4+ only? (Basically, I'm confused as to why there are separate SDKs at all.) Source: Tips4all

How to handle app URLs in a UIWebView?

I recently found that my UIWebView was choking on ITMS links. Specifically, from the UIWebView in my app, if I navigate to a site such as this one and click the "Available on the App Store" link, UIWebView would error out with "Error Domain=WebKitErrorDomain Code=101 The URL can't be shown." After a bit of Googling, I realized that I needed to catch requests for app links and have iOS handle them. I started out by looking to see if the scheme starts with "itms" in -webView:shouldStartLoadWithRequest:navigationType: , but realized that there might be other kinds of app links that the system can handle. So I came up with this, instead: - (void)webView:(UIWebView *)wv didFailLoadWithError:(NSError *)error { // Give iOS a chance to open it. NSURL *url = [NSURL URLWithString:[error.userInfo objectForKey:@"NSErrorFailingURLStringKey"]]; if ([error.domain isEqual:@"WebKitErrorDomain"] && error.code == 101

App crashes with 4.2 iPhone simulator "set start-with-shell off"

I'm writing application which perfectly works on 4.0/4.1 iPhone simulator, but not 4.2. I'm getting such warning: Detected an attempt to call a symbol in system libraries that is not present on the iPhone: fcntl$UNIX2003 called from function get_socket_nonblocking in image TestApp. If you are encountering this problem running a simulator binary within gdb, make sure you 'set start-with-shell off' first. How to set 'set start-with-shell off' on Xcode? I'm tried to add this line to .gdbinit but without luck. With 4.0/4.1 SDK iPhone Simulator prints warnings about attempt to call symbol that is not present on the iPhone in debug window, but app don't crashes. Using using 4.2 app crashes. How to prevent 4.2 crashes ? Thanks Source: Tips4all

iPhone Enterpise Deployment: Mobile Device Management

I was reading up on iPhone in the enterprise and saw something about Mobile Device Management servers. As far as I can tell, there are a few 3rd party MDM vendors, but Apple says that one could implement their own. The iPhone Configuration Utility allows you to set up a Server URL, Check in URL, Topic, Identity, and some other things for an MDM, but there's little information on how to build a server that hooks in with these. I've looked in the Enterprise Deployment, iPhone Configuration, and even the iPhone Mobile Device Management docs, but have found little aside from vague mentions or the occasional diagram. Is there a documented protocol somewhere? Source: Tips4all

Create text Stroke for UILabel iphone

I was wondering how can I create text stroke for UILabel in iOS4 ? I need some suggestion . I want something like this : EDITED : UIFont *font = [UIFont fontWithName:@"Arial" size:222]; CGPoint point = CGPointMake(0,0); CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetRGBFillColor(context, 1.0, 1.0, 1.0, 0.7); CGContextSetRGBStrokeColor(context, 2, 2, 2, 1.0); CGContextSetTextDrawingMode(context, kCGTextFillStroke); CGContextSaveGState(context); // I change it to my outlet [label.text drawAtPoint:point withFont:font]; CGContextRestoreGState(context); Source: Tips4all