Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:

build-ios-demo-app:
macos:
xcode: 15.2.0
xcode: 16.2.0
resource_class: macos.m1.large.gen1
working_directory: /Users/distiller/project

Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
cd /Users/distiller/project/DemoApp
yarn react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios
cd ios
xcodebuild -workspace DemoApp.xcworkspace -scheme DemoAppUITests -destination 'platform=iOS Simulator,name=iPhone 15 Pro,OS=17.2' -configuration Debug test
xcodebuild -workspace DemoApp.xcworkspace -scheme DemoAppUITests -destination 'platform=iOS Simulator,name=iPhone 16 Pro,OS=18.2' -configuration Debug test

workflows:
version: 2
Expand Down
21 changes: 17 additions & 4 deletions DemoApp/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
Pressable,
SafeAreaView,
StatusBar,
StyleSheet,
Text,
Expand All @@ -10,6 +9,8 @@ import {
Alert
} from 'react-native'

import { SafeAreaView } from 'react-native-safe-area-context';

import React from 'react'

import AsyncStorage from '@react-native-async-storage/async-storage'
Expand All @@ -21,14 +22,24 @@ import {
} from 'rn-truelayer-payments-sdk'

import uuid from 'react-native-uuid'
import { Colors } from 'react-native/Libraries/NewAppScreen'
import { log } from './utils/logger'

const Colors = {
light: {
lighter: "#FFFFFF",
darker: "#CCCCCC",
},
dark: {
lighter: "#333333",
darker: "#000000",
},
};

function App(): React.JSX.Element {
const isDarkMode = useColorScheme() === 'dark'

const backgroundStyle = {
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
backgroundColor: isDarkMode ? Colors.dark.darker : Colors.light.lighter,
flex: 1,
}

Expand Down Expand Up @@ -92,7 +103,9 @@ function App(): React.JSX.Element {

TrueLayerPaymentsSDKWrapper.configure(
Environment.Sandbox,
theme,
// if you want to use default theme then just do not provide the theme parameter
// only pre-approved merchants will be able to override the theme
theme
).then(
() => {
log('Configure success')
Expand Down
4 changes: 2 additions & 2 deletions DemoApp/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ buildscript {
ext {
buildToolsVersion = "35.0.0"
minSdkVersion = 24
compileSdkVersion = 35
targetSdkVersion = 34
compileSdkVersion = 36
targetSdkVersion = 36
ndkVersion = "27.1.12297006"
kotlinVersion = "2.0.21"
}
Expand Down
2 changes: 1 addition & 1 deletion DemoApp/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
128 changes: 64 additions & 64 deletions DemoApp/ios/DemoApp.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions DemoApp/ios/DemoApp/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>RCTNewArchEnabled</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
Expand Down
12 changes: 4 additions & 8 deletions DemoApp/ios/DemoAppUITests/DemoAppUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,9 @@ final class DemoAppUITests: XCTestCase {
startSDKButton.tap()
processSinglePaymentButton.tap()

let changeProviderButton = app.buttons["Change"]
let _ = changeProviderButton.waitForExistence(timeout: TimeInterval(integerLiteral: 30))
changeProviderButton.tap()

let providersTitle = app.staticTexts["Select your bank"]
let _ = providersTitle.waitForExistence(timeout: TimeInterval(integerLiteral: 30))

XCTAssertTrue(providersTitle.isHittable)
let mockUkTextPredicate = NSPredicate(format: "label CONTAINS[c] 'Mock UK'")
let mockUkTextButton = app.staticTexts.matching(mockUkTextPredicate).firstMatch
let _ = mockUkTextButton.waitForExistence(timeout: TimeInterval(integerLiteral: 30))
XCTAssertTrue(mockUkTextButton.exists)
}
}
Loading