Integration for iOS Native Apps
In the integration process for iOS native apps, you need to:
Set the necessary credentials to access XpressPlug's private repositories for iOS.
Integrate XpressPlug as a dependency on your Xcode project.
Set Repository's Credentials
Follow these steps to set your credentials for XpressPlug's private repository for iOS.
Create the .netrc file in the root directory (/home/:user/).
Add the following configuration, which will allow dependency managers such as Cocoapods to access Veritran's private resources.
machine developer.veritran.com login user password <PRIVATE_TOKEN>
Important
To obtain the private token, send an email to mobile_support@veritran.com with the "XpressPlug Access" assignment, and the team will provide you with the necessary resources.
Integrate XpressPlug to your Project
To configure the "podfile" and the dependencies, follow these steps:
Add: the following repositories at the beginning of the iOS project's podfile, within the iOS folder in its React project.
platform :ios, '13.4' source 'https://developer.veritran.com/resources/xpressplug/ios/specs.git' source 'https://github.com/CocoaPods/Specs'
Add the following lines in your podfile, that will allow library compatibility with Xcode and React-Native:
plugin 'cocoapods-user-defined-build-types' enable_user_defined_build_types!
In the "Pod" section, add the following XpressPlug dependency within your project's main target:
pod 'XpressPlug', '7.10.2.51785-react', :build_type => :dynamic_framework
Add the following in the Post Script section:
post_install do |installer| react_native_post_install(installer) installer.pods_project.targets.each do |target| target.build_configurations.each do |config| if ["lottie-ios","Alamofire", "CryptoSwift", "SwiftyJSON"].include?(target.display_name) config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES' end if ["Alamofire"].include?(target.display_name) config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' end if ["Alamofire", "lottie-ios", "SwiftyJSON", "vt_contract_resources_manager", "CryptoSwift"].include?(target.display_name) next end config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' end end end
Run the following command in your terminal:
pod install --repo-update
After installing the dependencies, you will see the confirmation message "Pod installation complete".
Verify your project is compiling and running in your device. Go to Xcode, click Product > Build to install and open the app in your device.