Friday, 31 October 2014

Get all images (full size) from Image gellery in iOS

ViewController.h
#import <UIKit/UIKit.h>
#import <AssetsLibrary/AssetsLibrary.h>

@interface ViewController : UIViewController<UICollectionViewDataSource, UICollectionViewDelegate>
{
    ALAssetsLibrary *library;
    NSArray *imageArray;
    NSMutableArray *mutableArray;

    IBOutlet UICollectionView *collectionView;
}

-(void)allPhotosCollected:(NSArray*)imgArray;
@end
ViewController.m

Thursday, 30 October 2014


75 Essential Tools for iOS Developers

If you were to go to a master woodworker’s shop, you’d invariably find a plethora of tools that he or she uses to accomplish various tasks.
In software it is the same. You can measure a software developer by how they use their tools. Experienced software developers master their tools. It is important to learn your current tools deeply, and be aware of alternatives to fill in gaps where your current ones fall short.
With that in mind, I present to you a gigantic list of tools. Some of these I use daily, others I see potential in. If you have more tools you’d like to see here, just make sure to add a comment.
I tried to categorize these the best I can. Some of the entries are websites, some are back-end services, but most are apps that you install. Not all of the apps are free, so I’ll make a note with a $ to denote that an app costs money.
And without further ado, we’ll start from the beginning of any project, and that

Saturday, 25 October 2014

Java web server demo.

Java HTTP web server demo. Actually a HTTP web server is nothing but a TCP socket connection where first return content must be "HTTP/1.0" with content type and then contents (Html type) or specified. And At last connection must close so the connection stream must break to client. If it is a traditional TCPServer then no need to terminate the connection, we need connection stream. And there is no need of return first content as "HTTP/1.0 ...". For TCPServer code click here.
Keep it simple with this code.

Thursday, 16 October 2014

custom spash screen ios for long time.

- (void)splashAnimation{
    NSInteger timeForSplash = 3;
    UIImageView *imageViewSplash = [[UIImageView alloc] initWithFrame:mainWindow.frame];
    [imageViewSplash setImage:[UIImage imageNamed:@"Default-568h"]];
    [mainWindow addSubview:imageViewSplash];
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, timeForSplash * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
        [imageViewSplash removeFromSuperview];
    });
}

If you want every time then add this method in

Wednesday, 3 September 2014

Calling webservice and response is nil, error code = 256; handle in ios

if you are getting error 256 in iOS/iPhone.
Error Domain=NSCocoaErrorDomain Code=256 "The operation couldn’t be completed. (Cocoa error 256.)" UserInfo=0x218446a0

This error coming due to your page is not in "Standards compliance mode", it may be in "Quirks mode".

To know the mode, open the webpage in firefox, click right mouse and open "View page Info".




If you want to open the url in non "Standards compliance mode" try this code =>






NSString *str = [NSString stringWithFormat:@"https://graph.facebook.com/me?access_token=CAADbwxRRgq8BANULcGGn3d4NPZB4LlP3tCL9YjYH3Nd0fD2XvgjG0qTECEmOsFhNhcu4NCdgYzQK3lYaATiedLRP4ZAIRgf8FBtDBYd22z5BrMabHlex12nZAbm8UfJTrPVRw5rjN8abi9"];


NSURL* url = [NSURL URLWithString:[str stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];

NSError* error = nil;
NSData* data = [NSURLConnection sendSynchronousRequest:[NSURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:30] returningResponse:nil error:&error];
NSString *jsonStr = [NSString stringWithUTF8String:[data bytes]];
NSMutableDictionary *dictFromServer = [NSJSONSerialization JSONObjectWithData:urlData options:kNilOptions error:&error]
if (error) {
    NSLog(@"%@", [error localizedDescription]);
} else {
    NSLog(@"Data has loaded successfully.%@, in dict %@",jsonStr, dictFromServer);
}


Monday, 1 September 2014

for beta test url set in websites

itms-services://?action=download-manifest&url=http://testsite4me.com/Designs/swapmommy-demo/Swapmommy.plist

more detail use link
http://johannesluderschmidt.de/provision-ios-ipa-app-for-in-house-enterprise-distribution/2993/

Tuesday, 19 August 2014

build the iphone simulator build to check on some else simulator

Generate a Simulator Build

In order to generate a simulator build you will:
  • Find the folder containing your xcode project.
  • Open a terminal and run a couple of commands to generate the build.
  • Compress the simulator build into a zip file.

Find your Xcode project directory