Skip to content

Commit

Permalink
Merge pull request #38 from payu-intrepos/develop/iOS12Update
Browse files Browse the repository at this point in the history
iOS12 update
  • Loading branch information
Vipin Aggarwal authored Oct 10, 2018
2 parents b3038df + 76b8de3 commit 0e7eeb6
Show file tree
Hide file tree
Showing 126 changed files with 668 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
objects = {

/* Begin PBXBuildFile section */
66B09B92216DA7C8001E98BD /* PayUCustomBrowser.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 66B09B90216DA7BD001E98BD /* PayUCustomBrowser.framework */; };
66B09B93216DA7C8001E98BD /* PayUCustomBrowser.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 66B09B90216DA7BD001E98BD /* PayUCustomBrowser.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
66BA094220BE6AC6002BD702 /* EMISelectorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66BA094020BE6AC6002BD702 /* EMISelectorViewController.m */; };
DD03C87E1F04C0F7002DB245 /* APIListVC.m in Sources */ = {isa = PBXBuildFile; fileRef = DD03C87D1F04C0F7002DB245 /* APIListVC.m */; };
DD26C6181F443C52001C8B30 /* iOSDefaultActivityIndicator.m in Sources */ = {isa = PBXBuildFile; fileRef = DD26C6171F443C52001C8B30 /* iOSDefaultActivityIndicator.m */; };
Expand All @@ -33,13 +35,15 @@
dstSubfolderSpec = 10;
files = (
DDE44C101F86124900634438 /* PayUMoneyCoreSDK.framework in Embed Frameworks */,
66B09B93216DA7C8001E98BD /* PayUCustomBrowser.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
66B09B90216DA7BD001E98BD /* PayUCustomBrowser.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PayUCustomBrowser.framework; path = ../../../Dependencies/CB/PayUCustomBrowser.framework; sourceTree = "<group>"; };
66BA094020BE6AC6002BD702 /* EMISelectorViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EMISelectorViewController.m; sourceTree = "<group>"; };
66BA094120BE6AC6002BD702 /* EMISelectorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EMISelectorViewController.h; sourceTree = "<group>"; };
DD03C87C1F04C0F7002DB245 /* APIListVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIListVC.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -75,6 +79,7 @@
buildActionMask = 2147483647;
files = (
DDE44C0F1F86124900634438 /* PayUMoneyCoreSDK.framework in Frameworks */,
66B09B92216DA7C8001E98BD /* PayUCustomBrowser.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -141,6 +146,7 @@
DDE44BEB1F8611DC00634438 /* Dependency */ = {
isa = PBXGroup;
children = (
66B09B90216DA7BD001E98BD /* PayUCustomBrowser.framework */,
DDE44C0E1F86123C00634438 /* PayUMoneyCoreSDK.framework */,
);
name = Dependency;
Expand Down Expand Up @@ -371,7 +377,10 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../";
FRAMEWORK_SEARCH_PATHS = (
"$(PROJECT_DIR)/../",
"\"$(SRCROOT)/../../Dependencies/CB\"",
);
INFOPLIST_FILE = PayUMoneyExample/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
Expand All @@ -389,7 +398,10 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../";
FRAMEWORK_SEARCH_PATHS = (
"$(PROJECT_DIR)/../",
"\"$(SRCROOT)/../../Dependencies/CB\"",
);
INFOPLIST_FILE = PayUMoneyExample/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
Expand Down
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/Assets.car
Binary file not shown.
2 changes: 2 additions & 0 deletions CoreSDK/PayUMoneyCoreSDK.framework/Headers/PayUMoneyCoreSDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#import "PUMHelperClass.h"
#import "PUMTextField.h"
#import "PUMLogEvents.h"
#import "UIImageView+CitrusGraphics.h"


#define SDK_Default_COLOR UIColorFromRGB([PUMUIConfig intFromHexString:defaultLinkTextColor])
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
//
// UIImageView+CitrusGraphics.h
// CitrusGraphics
//
// Created by Rajvinder Singh on 11/9/17.
// Copyright © 2017 CitrusPay. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface CitrusGraphics: NSObject

+ (void)clearCache;

+ (void)imagePrefetcherForCard;

+ (void)imagePrefetcherForBank;

@end

@interface UIImageView (CitrusGraphics)

/** Adds activity indicator on UIImageVIew (Indicator will only be shown on UIImageView when image is getting loaded).
*/
- (void)setSystemActivity;

/** Load an image with a resource.
@param cardScheme cardScheme, whose image is to be loaded
*/
- (void)loadCitrusCardWithCardScheme:(NSString * _Nonnull)cardScheme;

/** Load an image with a large resource.
@param cardScheme cardScheme, whose image is to be loaded
*/
- (void)loadCitrusLargeCardWithCardScheme:(NSString * _Nonnull)cardScheme;

/** Load an image with a resource.
@param bankCID bankCID of the bank whose image is to be loaded
*/
- (void)loadCitrusBankWithBankCID:(NSString * _Nonnull)bankCID;

/** Load an image with a large resource.
@param bankCID bankCID of the bank whose image is to be loaded
*/
- (void)loadCitrusLargeBankWithBankCID:(NSString * _Nonnull)bankCID;

/** Load an image with a resource.
@param bankCode bank code of the bank whose image is to be loaded
*/
- (void)loadCitrusBankWithBankCode:(NSString * _Nonnull)bankCode;

/** Load an image with a large resource.
@param bankCode bank code of the bank whose image is to be loaded
*/
- (void)loadCitrusLargeBankWithBankCode:(NSString * _Nonnull)bankCode;

/** Load an image with a resource.
@param bankCode bank code of the wallet whose image is to be loaded
*/
- (void)loadWalletWithBankCode:(NSString * _Nonnull)bankCode;

/** Load an image with a large resource.
@param bankCode bank code of the wallet whose image is to be loaded
*/
- (void)loadLargeWalletWithBankCode:(NSString * _Nonnull)bankCode;

/** Load an image with a resource.
@param IFSCCode IFSCCode of the bank whose image is to be loaded
*/
- (void)loadCitrusBankWithIFSCCode:(NSString * _Nonnull)IFSCCode;

/** Load an image with a large resource.
@param IFSCCode IFSCCode of the bank whose image is to be loaded
*/
- (void)loadCitrusLargeBankWithIFSCCode:(NSString * _Nonnull)IFSCCode;

/** Prefetch an image with a Citrus Branding resource.
@param brandingID id of the brand to be loaded
*/
- (void)loadCitrusBrandingWithBrandingID:(NSString * _Nonnull)brandingID;

/** Prefetch an image with a Citrus LazyPay resource.
@param assetID id of the asset to be loaded
*/
- (void)loadCitrusLazyPayWithAssetID:(NSString * _Nonnull)assetID;

@end

Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/Info.plist
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBAllPaymentOption.nib
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBApproveView.nib
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBBankPageLoading.nib
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBFooterView.nib
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBHeaderView.nib
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBLoader.nib
Binary file not shown.
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBPasswordNB.nib
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBROCell.nib
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBRegenerateOTPView.nib
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBRegisterOption.nib
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBReviewOrderView.nib
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBSurePay.nib
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUCBUserIdNB.nib
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PUMLoginVC.nib
Binary file not shown.
Binary file modified CoreSDK/PayUMoneyCoreSDK.framework/PayUMoneyCoreSDK
Binary file not shown.
Binary file not shown.
44 changes: 44 additions & 0 deletions Dependencies/CB/PayUCustomBrowser.framework/Headers/CBConnection.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//
// CBConnection.h
// PayUTestApp
//
// Created by Umang Arya on 20/07/15.
// Copyright (c) 2015 PayU, India. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "PUCBBaseConnection.h"
/*!
* This class is used provide CB functionality to the merchant.
*/
@interface CBConnection : PUCBBaseConnection

#pragma mark - UIWebView delegate

/*!
* This method must be called from UIWebView delegate method from Merchant's App.
* @param webView instance of webView received in parameter of [UIWebView webView:shouldStartLoadWithRequest:navigationType:]
* @param request request received in parameter of [UIWebView webView:shouldStartLoadWithRequest:navigationType:]
*/
- (void)payUwebView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request;

/*!
* This method must be called from UIWebView delegate method from Merchant's App.
* @param webView instance of webView received in parameter of [UIWebView webViewDidStartLoad:]
*/
- (void)payUwebViewDidStartLoad:(UIWebView *)webView;

/*!
* This method must be called from UIWebView delegate method from Merchant's App.
* @param webView instance of webView received in parameter of [UIWebView webView:didFailLoadWithError:]
* @param error error returned by delegate method of UIWebView [UIWebView webView:didFailLoadWithError:]
*/
- (void)payUwebView:(UIWebView *)webView didFailLoadWithError:(NSError *)error;

/*!
* This method must be called from UIWebView delegate method from Merchant's App.
* @param webView instance of webView received in parameter of UIWebView's delegate method [UIWebView webViewDidFinishLoad:]
*/
- (void)payUwebViewDidFinishLoad:(UIWebView *)webView;

@end
30 changes: 30 additions & 0 deletions Dependencies/CB/PayUCustomBrowser.framework/Headers/CBConstant.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//
// CBConstant.h
// iOSCustomeBrowser
//
// Created by Suryakant Sharma on 15/04/15.
// Copyright (c) 2015 PayU, India. All rights reserved.
//

#ifndef iOSCustomeBrowser_CBConstant_h
#define iOSCustomeBrowser_CBConstant_h



typedef NS_OPTIONS(NSUInteger, PUCBBankSimulator) {
PUCBDefault = 0,
PUCBBankSimulatorLocal = 1,
PUCBBankSimulatorRemote = 2,
};

//Macros To prevent instantiation of class by standard methods
#define ATTRIBUTE_ALLOC __attribute__((unavailable("alloc not available, call sharedSingletonInstance instead")))
#define ATTRIBUTE_INIT __attribute__((unavailable("init not available, call sharedSingletonInstance instead")))
#define ATTRIBUTE_NEW __attribute__((unavailable("new not available, call sharedSingletonInstance instead")))
#define ATTRIBUTE_COPY __attribute__((unavailable("copy not available, call sharedSingletonInstance instead")))

//Constants for web didFailLoad params
#define FAIL_URL_STRING @"failUrlString"
#define FAIL_ERROR @"failError"

#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
//
// CBWKConnection.h
// PayU_iOS_SDK_TestApp
//
// Created by Sharad Goyal on 25/09/15.
// Copyright (c) 2015 PayU, India. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <WebKit/WebKit.h>
#import "PUCBBaseConnection.h"

/*!
* This class is used provide CB functionality to the merchant.
*/
@interface CBWKConnection : PUCBBaseConnection

@property (nonatomic, copy) NSString *postData;
@property (nonatomic, copy) NSString *urlString;
@property (nonatomic, weak) UIViewController *vcToPresentAlert;
@property BOOL didMakePostRequest;

#pragma mark - WKWebView scriptMessageHandler Delegate

- (void)payUuserContentController:(WKUserContentController *)userContentController
didReceiveScriptMessage:(WKScriptMessage *)message;

#pragma mark - WKWebView Navigation Delegate

// Tracking Load Progress

- (void)payUwebView:(WKWebView *)webView didCommitNavigation:(WKNavigation *)navigation;

- (void)payUwebView:(WKWebView *)webView didFailNavigation:(WKNavigation *)navigation withError:(NSError *)error;

- (void)payUwebView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(NSError *)error;

-(void)payUwebView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation;

- (void)payUwebView:(WKWebView *)webView
didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition,
NSURLCredential *credential))completionHandler;

- (void)payUwebView:(WKWebView *)webView didReceiveServerRedirectForProvisionalNavigation:(WKNavigation *)navigation;

- (void)payUwebView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation;

- (void)payUwebViewWebContentProcessDidTerminate:(WKWebView *)webView;

// Decide Load Policy Delegates

- (void)payUwebView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler;

- (void)payUwebView:(WKWebView *)webView
decidePolicyForNavigationResponse:(WKNavigationResponse *)navigationResponse
decisionHandler:(void (^)(WKNavigationResponsePolicy))decisionHandler;

#pragma mark - WKWebView UI Delegate

// Creating a webView

- (WKWebView *)payUwebView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures;

// Displaying UI Panels

- (void)payUwebView:(WKWebView *)webView runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)())completionHandler;

- (void)payUwebView:(WKWebView *)webView runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(BOOL result))completionHandler;

- (void)payUwebView:(WKWebView *)webView runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(NSString *result))completionHandler;

// Closing a webView
- (void)payUwebViewDidClose:(WKWebView *)webView;

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
//
// PUCBBaseConnection.h
// PayUNonSeamlessTestApp
//
// Created by Sharad Goyal on 09/06/16.
// Copyright © 2016 PayU. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "PayUCBWebViewResponseDelegate.h"
#import "CBConstant.h"
#import "PUCBConfiguration.h"

@interface PUCBBaseConnection : NSObject

/*!
* calling init on this class is not allowed
*/
- (instancetype) init ATTRIBUTE_INIT;
- (instancetype) new ATTRIBUTE_NEW;

@property (nonatomic, assign) BOOL isMagicRetry;
@property (nonatomic, copy) NSString *txnID;
@property (nonatomic, copy) NSString *merchantKey;
@property (weak, nonatomic) id <PayUCBWebViewResponseDelegate> cbWebViewResponseDelegate;
@property (nonatomic, assign) BOOL isAutoOTPSelect;
@property (nonatomic, assign) PUCBBankSimulator bankSimulatorType;
@property (nonatomic, strong) PUCBConfiguration *cbConfig;

/*!
* This method is called from Merchant's App to initialize CB.
* @param view UIView on which WebView needs to be displayed
* @param webView instance of WebView (It can be either WKWebView or UIWebView)
* @return obj instance of PUCBBaseConnection (or instance of its subclass, depending upon class on which it is called)
*/
-(instancetype)init:(UIView *)view webView:(id)webView;

/*!
* This method initializes the required properties of CBConnection and setUp the CB to run.
*/
- (void)initialSetup;

/*!
* This method is used to show the payUActivityIndicator.
*/
- (void)payUActivityIndicator;

/*
* These methods helps in minimizing / maximizing CB screen on WebView
*/

- (void)minimizeCB;
- (void)maximizeCB;

@end
Loading

0 comments on commit 0e7eeb6

Please sign in to comment.