How to integrate Payfort SDK to iOS with Swift - ios

I am trying to integrate payfort SDK to my iOS project.
I am using xcode 9.0 and swift 4.0.
I followed the instruction on payfort docs. But still can't see the module name of payfort in my project.
This is the guide https://docs.payfort.com/pdf/FORT_Mobile-SDK_iOS_Integration_Guide_v_2.0.pdf
But it showing only PayFortLogo.png when import module. See in below picture.

Payfort guide to integration ios mobile SDK
Please the doc first:
https://docs.payfort.com/pdf/FORT_Mobile-SDK_iOS_Integration_Guide_v_1.3.pdf
1- TO intregrate Payfort SKD follow the following steps. Don't use any other method.
 Downloaded iOS SDK from official link.
 Unzip the downloaded iOS SDK.
 Drag the PayFortSDK.framework & PayFortSDK.bundle to Frameworks in Project Navigator.
o Create a new group Frameworks if it does not exist.
o Choose Create groups for any added folders.
o Make Sure to select Copy files if needed.
2- Copy PayfortView2.xib & PayfortView2_ar.xib from the project view or ask Payfort support team for it, Now use them in your project.
3- Use your custom view for PayfortView by mapping it with PayfortView.h using Payfort framework Connect all outlets with your custom view.
paycontroller?.setPayFortCustomViewNib("PayFortView2")
4- Download "JVFloatLabeledTextField" library from github or use pod for it.
5- Use JVFloatLabeledTextField instead of PFKJVFloatLabeledTextField change PayfortView2.xib and PayfortView2_ar.xib class in "Identify Inspactor" from xcode.
6- Now open "PayFortView.h" from ~/PayFortSDK.framework/Header/PayFortView.h in your project change outlet PFKJVFloatLabeledTextField to JVFloatLabeledTextField
Bellow is the link that I have integrated to my demo project:
Change your payfort account.
https://github.com/bhoopend232/PayfortDemo.git

Just follow these below steps in swift4 and Objective-c we are easily acheive payfort sdk integrate to your projects.It will help full mostly.
.Downloaded iOS SDK from official link.
List item
Unzip the downloaded iOS SDK.
List itemDrag the PayFortSDK.framework & PayFortSDK.bundle to Frameworks in Project Navigator.
Copy PayfortView2.xib & PayfortView2_ar.xib from the project of github to drag into your project.
paycontroller?.setPayFortCustomViewNib("PayFortView2")
Download "JVFloatLabeledTextField" library from github Or use pod for it.
Use JVFloatLabeledTextField in place of PFKJVFloatLabeledTextField change PayfortView2.xib and PayfortView2_ar.xib in "Identify Inspactor" from xcode.
IF we are using sand box account and production account use seperate urls to use
For sandBox:
https://sbpaymentservices.payfort.com/FortAPI/paymentApi
For Production:
https://paymentservices.payfort.com/FortAPI/paymentApi
While check this below pdf file for passing parameters and response
https://docs.payfort.com/pdf/FORT_Mobile-SDK_iOS_Integration_Guide_v_2.9.pdf
just in the success response we call the xib file .Then it will automatically redirect to card details page.
If you want source code just check this below repository in swift4
https://github.com/SRReddy411/PayFortPaymentDemo
If you want objective c then we will check this one
https://github.com/SRReddy411/payfort-Objective-c

Read the docs properly. Section 4.2, page 10. The framework is written in Objective-C and you have a Swift project, so you need a Bridging-Header.
One of the hundreds of tutorial on how to setup a `Bridging-Header: https://youtu.be/lon5YVMUxHQ

Related

How to integrate ObjectiveC framework (IronSource) into Flutter (iOS Swift)?

I'm trying to integrate IronSource SDK in a iOS Flutter project (Swift project), but I am unable to do that. According to the IronSource documentation, I must point to IronSource.h file to include the bridge I need. And I am able to implement it in normal Xcode swift project, but I am unable to do that in flutter project since this bridge is already used by the flutter and it can be only one file.
So the question is: How can I integrate another ObjC library (IronSource) in the existing flutter ios project?
I am new to iOS development and Im battleing this for about a week now. I cant find anything on the internet that would work so any help will be much appreciated. Thanks
I managed to resolve my issue. It turns out that build paths are not case sensitive and I was using 'ironsource' for my plugin name but IronSourceSDK is using 'IronSource' so it looks like at build time it did not find the correct files.
And when this was working, I had to add 'use_frameworks! :linkage => :static' in the pod file of the plugin.
Then I could depend on it in my swift flutter app normally as any other plugin.

How to integrate BRLMPrinterKit with iOS for a Flutter App?

I have been trying to integrate the Brother's SDK for printing with the iOS part of my Flutter project.
The following are the steps that I followed :
I added the BRLMPrinterKit.framework & BRLMPrinterKitW.framework to the Framework folder in my Xcode project.
Added $(PROJECT_DIR)/Frameworks to the Framework Search Paths and Header Search Paths.
I then added #import <BRLMPrinterKit/BRLMPrinterKit.h> to the Runner-Bridging-Header.h.
After performing the above steps, when I try to import BRLMPrinterKit in the appdelegate file, I am getting a "No such module BRLMPrinterKit" error.
Any Help will be appreciated.
You don't need to add "import BRLMPrinterKit" in your Swift file. So, just delete this line and you should be OK.
Adding #import <BRLMPrinterKit/BRLMPrinterKit.h> as you did to the Bridging Header is sufficient to be able to use SDK APIs in a Swift file.
A few other tips:
Do NOT include both frameworks in your project.
Use BRLMPrinterKitW.framework if you are ONLY supporting WIFI
Use BRLMPrinterKit.framework if you are supporting Bluetooth (and also WIFI)
You must "embed and sign" the framework via the General tab for the target. Otherwise your app will crash as soon as you run it.
You may need to add #import <BRLMPrinterKit/BRPtouchPrinterKit.h> to your Bridging Header too, if you need to access any APIs from the older v3 SDK (BRPtouchPrinterKit) that do not have equivalent APIs yet in the v4 SDK (BRLMPrinterKit).

Linker Command Failed Facebook Sdk

I am new to iOS and trying to implement Facebook SDK in a project using AppGuru Facebook integration in Swift tutorial. But I am facing this linker command error while building my app:
error is framework not found Bolts for architecture x84_64(linker command failed with exit code 1)
Here is a screenshot:
Download demo project with facebook login from below URL. you have to configure your facebook app id.
Download
You have to import this 3 frameworks in your project.
Check on this
https://developers.facebook.com/docs/ios
https://developers.facebook.com/docs/facebook-login/ios
Framework search path - add below line
$(PROJECT_DIR)/Projectname/FacebookSDK
Also check, bolts, core and login kit of facebook has to be in build phase -> Link binary with libraries
Follow steps -
Go to your project setting page
Select your project (left side)
Click the Build Settings tab
Search Bitcode
Set Enable Bitcode to No
I had the same error. I deleted the ParseFacebookUtils.framework library from my project and kept only the ParseFacebookUtilsV4.framework.
When using the AWS Mobile SDK for iOS and Facebook SDK together, you should not import Bolts.framework in your project. If you remove it, it should compile.
Copy the frameworks into the project but, unlike what Facebook tutorial suggests, select "Copy items into destination group's folder". I did that and it worked fine for me.

Facebook SDK for iOS: Where is the wizard?

Trying to follow Facebook's instructions for adding the iOS SDK but they lost me at step 1.
The download is a zip file containing the following:
Anyone have any idea where this wizard is?
Hey there is nothing related with the wizard. Now you have the SDK containing the required framework. Now simply use those frameworks in your project. For further help follow "https://developers.facebook.com/docs/ios/getting-started".

installing AWS ios sdk in swift project

I'm trying to add the AWS SDK to my xcode project that is written in swift.
I followed these steps: http://mobile.awsblog.com/post/Tx2AA7ZHB1FK0G1/Version-2-of-the-AWS-SDK-for-iOS-Developer-Preview to create a Bridge-Header file, and add the SDK itself to my project.
The problem is that when I try to build the app I get an error now... the Bridge Header cannot be imported because one of the files in the AWS SDK (AWSModel.h) has an error. This file tries to import Mantle/Mantle.h, and the error reads "Mantle/Mantle.h file not found"
do I need to add this file to my project as well? If so, how would I go about doing that? The only frameworks I'm using are Facebook SDK, and I would like to add AWS as well.
There is a working sample app on GitHub. You should follow README and see if you can compile the app. It should help you understand how to set up the project.

Resources