https://github.com/juspay/visa-ios
https://github.com/juspay/visa-ios
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/juspay/visa-ios
- Owner: juspay
- License: mit
- Created: 2025-07-29T08:34:41.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-07-29T11:59:18.000Z (12 months ago)
- Last Synced: 2025-07-29T13:36:11.602Z (12 months ago)
- Language: Objective-C
- Size: 156 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# VisaBenefitsSDK
## **Integration Guide**
To install the VisaBenefitsSDK into your application via Swift Package Manager follow two steps:
1. Installing Assets Plugin
2. Installing VisaBenefitsSDK
Following sections describe how to complete above steps
## **1.1. Installing Assets Plugin**
VisaBenefitsSDK depends on certain assets to function. These are available over the air and are supposed to be present while building the SDK. The Assets Plugin is a build time dependency that downloads all required assets and ensures the availability of the latest assets at build time.
To install Assets Plugin follow the below steps:
### **Step 1.1a - Add Build Pre-actions Script**
In Xcode, go to the menu and select **Product** → **Scheme** → **Edit Scheme…**.

Alternatively, you can select your target from the scheme drop-down in Xcode's toolbar and choose **Edit Scheme...**.

In the Scheme Editor, expand **Build** and select **Pre-actions.**

Add a New Run Script Action.

Select the app target for **Provide build settings from**

Paste the below shell script:
```ruby
if [[ "${ACTION}" == "clean" ]]; then
cd "${PROJECT_DIR}"
echo "Running Fuse.rb script..."
ruby "${BUILD_DIR%Build/*}SourcePackages/checkouts/visa-ios/Sources/VisaBenefitsSDK/Fuse.rb"
fi
```
This Script will be executed whenever you do **Clean Build Folder**.
### **Step 1.1b - Add VisaBenefitsConfig.json**
The VisaBenefitsConfig.json contains the clientIds which helps the Assets plugin to download assets specific to your application. Create a .json file named VisaBenefitsConfig.json inside the app directory of your project. Add clientConfigs to this file. Please note to add this to the folder where the project file is present.
_Sample:_
```json
{
"clientConfigs": {
"your-client-id": {}
}
}
```
## **1.2. Installing VisaBenefitsSDK**
### Swift Package Manager
Add VisaBenefitsSDK to your project using Xcode:
1. Open your project in Xcode
2. Go to File → Add Package Dependencies
3. Enter the package URL: `https://github.com/yourorg/visa-ios.git`
4. Select the version you want to use
5. Add the package to your target
Or add it to your `Package.swift` file:
```swift
dependencies: [
.package(url: "https://github.com/juspay/visa-ios.git", from: "1.0.0")
]
```
## License
This project is licensed under the MIT License - see the LICENSE file for details.