Skip to content
Open
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 app/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ android {
applicationId "com.proofofpassportapp"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 136
versionName "2.9.13"
versionCode 139
versionName "2.9.14"
manifestPlaceholders = [appAuthRedirectScheme: 'com.proofofpassportapp']
externalNativeBuild {
cmake {
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@selfxyz/mobile-app",
"version": "2.9.13",
"version": "2.9.14",
"private": true,
"type": "module",
"scripts": {
Expand Down
30 changes: 26 additions & 4 deletions app/scripts/setup-private-modules.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const PRIVATE_MODULES = [
repoName: 'react-native-passport-reader',
localPath: path.join(ANDROID_DIR, 'react-native-passport-reader'),
validationFiles: ['android/build.gradle'],
commit: '99122a8',
},
];

Expand Down Expand Up @@ -146,7 +147,7 @@ function usingHTTPSGitAuth() {
}
}

function clonePrivateRepo(repoName, localPath) {
function clonePrivateRepo(repoName, localPath, commit) {
log(`Setting up ${repoName}...`, 'info');

let cloneUrl;
Expand Down Expand Up @@ -181,7 +182,16 @@ function clonePrivateRepo(repoName, localPath) {
const isCredentialedUrl = isCI && (appToken || repoToken);
const quietFlag = isCredentialedUrl ? '--quiet' : '';
const targetDir = path.basename(localPath);
const cloneCommand = `git clone --branch ${BRANCH} --single-branch --depth 1 ${quietFlag} "${cloneUrl}" "${targetDir}"`;

// If commit is specified, clone without branch restriction and checkout commit
// Otherwise, clone the branch as before
let cloneCommand;
if (commit) {
log(`Using specific commit: ${commit}`, 'info');
cloneCommand = `git clone ${quietFlag} "${cloneUrl}" "${targetDir}"`;
} else {
cloneCommand = `git clone --branch ${BRANCH} --single-branch --depth 1 ${quietFlag} "${cloneUrl}" "${targetDir}"`;
}

try {
if (isCredentialedUrl) {
Expand All @@ -190,6 +200,18 @@ function clonePrivateRepo(repoName, localPath) {
} else {
runCommand(cloneCommand);
}

// If commit is specified, checkout that commit
if (commit) {
const checkoutCommand = `cd "${targetDir}" && git checkout ${commit}`;
if (isCredentialedUrl) {
runCommand(checkoutCommand, { stdio: 'pipe' });
} else {
runCommand(checkoutCommand);
}
log(`Checked out commit ${commit}`, 'success');
}

log(`Successfully cloned ${repoName}`, 'success');
return true; // Return true to indicate successful clone
} catch (error) {
Expand Down Expand Up @@ -220,14 +242,14 @@ function validateSetup(modulePath, validationFiles, repoName) {
}

function setupPrivateModule(module) {
const { repoName, localPath, validationFiles } = module;
const { repoName, localPath, validationFiles, commit } = module;
log(`Starting setup of ${repoName}...`, 'info');

// Remove existing module
removeExistingModule(localPath, repoName);

// Clone the private repository
const cloneSuccessful = clonePrivateRepo(repoName, localPath);
const cloneSuccessful = clonePrivateRepo(repoName, localPath, commit);

// If clone was skipped (e.g., in forked PRs), exit gracefully
if (cloneSuccessful === false) {
Expand Down
1 change: 1 addition & 0 deletions app/src/integrations/nfc/nfcScanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ const scanAndroid = async (
useCan: inputs.useCan ?? false,
sessionId: inputs.sessionId,
skipReselect: inputs.skipReselect ?? false,
skipPACE: inputs.skipPACE ?? false,
});
};

Expand Down
2 changes: 2 additions & 0 deletions app/src/integrations/nfc/passportReader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ if (Platform.OS === 'android') {
useCan = false,
quality = 1,
skipReselect = false,
skipPACE = false,
sessionId,
} = options;

Expand All @@ -104,6 +105,7 @@ if (Platform.OS === 'android') {
useCan,
quality,
skipReselect,
skipPACE,
sessionId,
});
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,6 @@ const NFC_METHODS = [
platform: ['ios'],
params: { usePacePolling: true },
},
{
// We try PACE first, but if it fails, we try BAC authentication.
// Some chips will invalidate the session if PACE fails.
key: 'skipPACE',
label: 'Skip PACE',
description:
'Skip PACE protocol during NFC scan. Useful if your passport does not support PACE.',
platform: ['ios'],
params: { skipPACE: true },
},
{
key: 'can',
label: 'CAN Authentication',
Expand Down Expand Up @@ -107,6 +97,7 @@ const DocumentNFCMethodSelectionScreen: React.FC = () => {
const [selectedMethod, setSelectedMethod] = useState('standard');
const [canValue, setCanValue] = useState('');
const [error, setError] = useState('');
const [skipPACE, setSkipPACE] = useState(false);

const selfClient = useSelfClient();
const { useMRZStore } = selfClient;
Expand Down Expand Up @@ -147,6 +138,10 @@ const DocumentNFCMethodSelectionScreen: React.FC = () => {
if (selectedMethod === 'can') {
params.canNumber = canValue;
}

if (skipPACE) {
params.skipPACE = true;
}
// Type assertion needed because static navigation doesn't infer optional params
navigation.navigate('DocumentNFCScan', params as never);
};
Expand All @@ -158,6 +153,28 @@ const DocumentNFCMethodSelectionScreen: React.FC = () => {
<YStack paddingTop={20} gap={20}>
<Title>Choose NFC Scan Method</Title>

<XStack
alignItems="center"
justifyContent="space-between"
paddingVertical="$3"
paddingHorizontal="$2"
borderWidth={1}
borderColor="#ccc"
borderRadius={10}
backgroundColor="#fff"
>
<Description>Skip PACE</Description>
<Switch
size="$4"
checked={skipPACE}
onCheckedChange={setSkipPACE}
backgroundColor={skipPACE ? '$green7Light' : '$gray4'}
style={{ minWidth: 48, minHeight: 36 }}
>
<Switch.Thumb animation="quick" backgroundColor="$white" />
</Switch>
</XStack>

<XStack
alignItems="center"
justifyContent="space-between"
Expand Down
4 changes: 2 additions & 2 deletions app/version.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"lastDeployed": "2026-01-22T23:03:43.685Z"
},
"android": {
"build": 138,
"lastDeployed": "2026-01-22T23:03:43.685Z"
"build": 139,
"lastDeployed": "2026-01-23T19:04:19Z"
}
}
Loading