Skip to main content

Posts

Showing posts from July, 2017

Which company is best for laravel development?

Infigic, is a leading IT company with 8+ years experience in the ecommerce domain. Infigic provides all types of development services from custom websites to mobile app development services. Infigic has highly experienced laravel development professionals who have executed projects right from Custom laravel development, API development to Laravel migration projects. Our focus is to   partner with customers as their product development partners and build products that are highly reliable and scalable  . With our strong experience in laravel development, Infigic proves to be the most preferred development partners for a lot of startups who are looking to build cutting edge products and solutions. For a reasonable online store, you can contact Infigic Digital Solutions which is an IT company who personally contact the client's to draw the plan to the website to get the most convenient yet fulfilled design. Do get in touch with them, for a reasonable yet professional...

How to create Podfile and Install

Pods are generally used for dependency management in your XCode Project. Follow below mentioned steps to install pod easily : Step -1 Open your terminal. Step -2 Then Change the directory in terminal to the location of your xcode project. Step -3 When you reach to the desired project location first we need to create podfile using command “touch Podfile”. This will create a blank podfile in your project directory named “Podfile” Step -4 To open created Podfile enter command - “open -e Podfile” This will open your Podfile to text editor Step -5 Now you can enter pod name in file and save file. Some example are shown below pod ‘AFNetworking’, ’0.9.1′ pod ’Facebook-iOS-SDK’ pod ’EGOTableViewPullRefresh’ pod ’JSONKit’ pod ‘MBProgressHUD’ pod ’Reachability’ Step -6 To install pods in file enter command - “pod install” This will take some time to install pod Step -7 The extension of our Xcode project integrated with podfile is “YourProjec...

How to check email is valid or not

Most of the mobile applications use the email for login or other purpose. So we need to validate email if it contains the valid email string. We can achieve it by using NSPredicate. 1. Add following method 1. -(BOOL)isValidEmail:(NSString *)checkString 2. { 3. long numberOfAtPieces = [[checkString componentsSeparatedByString:@"@"] count]; 4. 5. if (numberOfAtPieces > 2){ 6. return NO; 7. } 8. 9. BOOL stricterFilter = NO; 10. NSString *stricterFilterString = @"[A-Z0-9a-z\\._%+-]+@([A-Za-z0-9-]+\\.)+[A-Za- z]{2,4}"; 11. NSString *laxString = @".+@([A-Za-z0-9-]+\\.)+[A-Za-z]{2}[A-Za-z]*"; 12. NSString *emailRegex = stricterFilter ? stricterFilterString : laxString; 13. NSPredicate *emailTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", emailRegex]; 14. return [emailTest evaluateWithObject:checkString]; 15. } 2. Call this method and pass string containing email to it like below BOOL isValid =...

How to implement local notification in iOS SDK

In iOS most of time we need to pass our data to the different parts of the code in same or another class. One of the easiest way to pass data is using local notification. Follow the below steps to implement Local Notification in your app 1. First we have to setup class observer for notification NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; 1. [notificationCenter addObserver:self selector:@selector(yourMethodName:) name:@"yourNotificationName" object:nil]; 2. Post Notification like below 1. NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; 2. [notificationCenter postNotificationName:@"yourNotificationName" object:yourObject]; 3.Get passed object using the following line of code 1. -(void)yourMethodName::(NSNotification *)notification{ 2. id passedObject = notification.object; 3. } 4. Remove observer while unloading or dealloc 1. [[NSNotificationCenter defaultCenter] rem...

How to get your device Model Number

iOS enables you to get the device model which is running your app. In this blog i would share with everyone how to get the device model by following the below steps. Step 1 Add #import<sys/utsname.h> line to your view Controller Step 2 Add following method to your .m file 1. NSString* () 2. { 3. struct utsname systemInfo; 4. uname(&systemInfo); 5. 6. return [NSString stringWithCString:systemInfo.machine 7. encoding:NSUTF8StringEncoding]; 8. } Step 3 Now call this method and set return value to string NSString *deviceInfo = deviceName(); Step 4 This method returns a list from which you will able to see the device number of your particular device. 1. @"i386" on 32-bit Simulator 2. @"x86_64" on 64-bit Simulator 3. @"iPod1,1" on iPod Touch 4. @"iPod2,1" on iPod Touch Second Generation 5. @"iPod3,1" on iPod Touch Third Generation 6. @"iPod4,1" on iPod Touch Fourth Generation ...

How to get your device Model Number

iOS enables you to get the device model which is running your app. To get the device model follow the below steps Step 1: Add #import&lt;sys/utsname.h&gt; line to your view Controller Step 2: Add following method to your .m file 1. NSString* deviceName() 2. { 3. struct utsname systemInfo; 4. uname(&amp;systemInfo); 5. 6. return [NSString stringWithCString:systemInfo.machine 7. encoding:NSUTF8StringEncoding]; 8. } Step 3 : Now call this method and set return value to string 1. NSString *deviceInfo = deviceName(); Step 4 : This method returns below outputs from below list you can find your device from below. 1. @&quot;i386&quot; on 32-bit Simulator 2. @&quot;x86_64&quot; on 64-bit Simulator 3. @&quot;iPod1,1&quot; on iPod Touch 4. @&quot;iPod2,1&quot; on iPod Touch Second Generation 5. @&quot;iPod3,1&quot; on iPod Touch Third Generation 6. @&quot;iPod4,1&quot; on iPod Touch Fourth Gener...

How to create Custom delegate method in iOS

Delegate is used for send receive data between two viewcontroller. For example if We have two View controllers namely FirstViewController and SecondViewController Step :1 Add the following line of code to FirstViewController.h file #import &lt;UIKit/UIKit.h&gt; @protocol MyDelegate -(void)MyDelegateMethod:(NSString *)description; @end @interface FirstViewController : UIViewController { } @property (nonatomic, weak) id MyDelegate; Step 2 : To implement the above created delegate method one needs to add the below mentioned code in SecondViewController.m file @interface SecondViewController()&lt;MyDelegate&gt; @end @implementation SecondViewController -(void)GoToFirst { FirstViewController *first = [[FirstViewController alloc]initWithNibName:@&quot;FirstViewController&quot; bundle:Nil]; first.MyDelegate = self; [self.navigationController pushViewController:cart animated:YES]; } // Delegate Method Goes Here -(void...

How to use UIAlertView for iOS8 and above

In iOS 8 and above UIAlertView is deprecated so you can’t use UIAlertView in your beloved application. Apple has recently introduced new UIAlertController instead of UIAlertView. In this blog we would like to share how you can use UIAlertView both (with and without buttons) for iOS8 and above. UIAlertController * alert=   [UIAlertController                                alertControllerWithTitle:@"Rate AppRateDemoProject"                                message:@"If you enjoy AppRateDemoProject would you mind taking a moment to rate it?"                        ...