Posts

Showing posts from 2015

payUmoney Payment Gateway Integration in iOS App (Objective C)

Image
We have many Payment Gateways available such as Paypal , CCAvenue , Zaakpay , etc. payUmoney is the best Payment Gateway available in India now; according to me. I am saying this with my personal experience with  payUmoney  Technical Support Team. They offer 2.9% Transaction charges without any Enrolment, Setup, AMC or other Hidden charges. payUmoney Home Page Link:  Home_Page payUmoney Contact Details:  Address:   5th Floor, Pearl Towers Plot 51, Sector 32 Gurgaon, 122002  Phone:   0124-6624956,  0124-6624970  Email:   techsupport@payumoney.com Steps to integrate payUmoney gateway: 1. Create a new iOS Objective C app in XCode. 2. Open Main.storyboard in you app. 3. Add UIWebView and set its Delegate. [Screenshot 1] 4. Set Frames & Constraints as per design requirements. 5. Link UIWebView by creating IBOutlet to either .h or .m file. [Screenshot 2] 6. Signup and create an account on payUmoney. Test Envirnment:  http://tes

Variable declaration in Swift

Declaration of iVar: Let's start with declaring iVars in Swift In Swift we can declare an iVar using keyword: 1. let - it declares an immutable iVar 2. var - it declares a mutable iVar let myLetObject = "My immutable iVar" So now i cannot change the value of myLetObject after it is once assigned. var myVarObject = "My mutable iVar" myVarObject = "Changed the value of iVar" I can change its value at any instance. Some examples of declaring objects: let luckyNumber = 9 let  myAge = NSInteger (27 ) var myHeight = 5.5 let myImage = UIIMage(named:"MyPhoto.png") var myName: NSString = NSString"string:Suraj Ramjan Mirajkar" var tableView: UITableView !

Youtube Video Player

To play Youtube video within the app we have 2 ways: 1. Open Youtube App (if installed) or launch Safari to play video: [[ UIApplication sharedApplication ] openURL :[ NSURL URLWithString : @"http://www.youtube.com/watch?v=Xk1zfQOklJY" ]]; In this case we don't have a choice to bring back the user to our app. So we better use the 2nd way. 2. Embed Youtube iOS Player Helper: I have used  youtube-ios-player-helper  Version -  0.1.3 Select  YTPlayerView.h ,  YTPlayerView.m , and the  Assets  folder from my Github repository  CODE . Drag these files and folders into your project. Make sure the  Copy items into destination group’s folder  option is checked. When dragging the Assets folder, make sure that the  Create Folder References for any added folders  option is checked. Drag a UIView the desired size of your player onto your Storyboard. Change the UIView's class in the Identity Inspector tab to YTPlayerView Import "YTPlayerView.

Check Internet Connectivity Using AFNetworking 2.0

I have created  NetworkRechabilityMonitor class to get the Internet Connection status in my app using AFNetworking 2.0 library. 1. Create an NSObject class naming  NetworkRechabilityMonitor , add below code in respective Header & Implementation files.   NetworkRechabilityMonitor.h #import <Foundation/Foundation.h> @interface NetworkRechabilityMonitor : NSObject +( void )startNetworkReachabilityMonitoring; +( BOOL )checkNetworkStatus; @end NetworkRechabilityMonitor.m #import "NetworkRechabilityMonitor.h" @implementation NetworkRechabilityMonitor #pragma mark - Start Monitoring Network Manager +( void )startNetworkReachabilityMonitoring {     [[ AFNetworkReachabilityManager sharedManager ] startMonitoring ]; } #pragma mark - Check Internet Network Status +( BOOL )checkNetworkStatus {     return [ AFNetworkReachabilityManager sharedManager ]. reachable ; } @end 2.