Friday, September 27, 2013

Re-sign a .IPA file

The problem: To re-sign a .ipa file with a different distribution provisioning profile. To change the bundle identifier. Required files: The .ipa file. The distribution provisioning profile. (.mobileprovision) Entitlements.plist Put all the files under the same directory. Create "Entitlements.plist": Copy the following code in a text file and make sure that the extension is (.plist). <?xml...

Sunday, August 4, 2013

AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:[NSURL URLWithString:@"https://graph.facebook.com/"]]; NSString *link = [NSString stringWithFormat:@"https://graph.facebook.com/%@/likes/%@", USER_ID, PAGE_ID]; NSDictionary *params = @{@"access_token" : [[[FBSession activeSession] accessTokenData] accessToken]}; NSMutableURLRequest *request = [httpClient...

Friday, August 2, 2013

iOS, Set CoreData up.

1- Link against CoreData.framework 2- add the following to the appDelegate.h @property (nonatomic, strong) NSManagedObjectContext *managedObjectContext; @property (nonatomic, strong) NSManagedObjectModel *managedObjectModel; @property (nonatomic, strong) NSPersistentStoreCoordinator *persistentStoreCoordinator; 3- add the following to the appDelegate.m #import <coredata/coredata.h> // Returns...

iOS email validator

-(BOOL) isValidEmail:(NSString *)checkString { BOOL stricterFilter = YES; // Discussion http://blog.logichigh.com/2010/09/02/validating-an-e-mail-address/ NSString *stricterFilterString = @"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}"; NSString *laxString = @".+@.+\\.[A-Za-z]{2}[A-Za-z]*"; NSString *emailRegex = stricterFilter ? stricterFilterString : laxString; NSPredicate...

Friday, April 5, 2013

NSURL *baseURL = [NSURL URLWithString:@"https://graph.facebook.com/"]; AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:baseURL]; NSString *link = [NSString stringWithFormat:@"/%@/likes", @"OBJECT_ID"]; NSDictionary *params = @{@"access_token" : [[[FBSession activeSession] accessTokenData] accessToken]}; [httpClient postPath:link parameters:params success:^(AFHTTPRequestOperation...

Thursday, January 24, 2013

Twitter for iOS6 without the modal view.

Hi, I guess I got this one from some Stackoverflow question. Link against Social.framework and accounts.framework. #import <Accounts/Accounts.h> #import <Social/Social.h> ========================================= ACAccountStore *account = [[ACAccountStore alloc] init]; ACAccountType *accountType = [account accountTypeWithAccountTypeIdentifier: ACAccountTypeIdentifierTwitter];...
Hi, I found this here. Link the project against Twitter.framework and accounts.framework. #import <Twitter/Twitter.h> #import <Accounts/Accounts.h> ============================================= - (void)postToTwitter { // Create an account store object. ACAccountStore *accountStore = [[ACAccountStore alloc] init]; // Create an account type that ensures...