Skip to content

Commit dd4de47

Browse files
authored
Merge pull request #2197 from selfxyz/release/staging-2026-07-03
Release to Staging v2.9.26 - 2026-07-03
2 parents a196b76 + 5064b7f commit dd4de47

10 files changed

Lines changed: 309 additions & 229 deletions

File tree

app/android/app/build.gradle

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ android {
160160
minSdkVersion rootProject.ext.minSdkVersion
161161
targetSdkVersion rootProject.ext.targetSdkVersion
162162
versionCode 162
163-
versionName "2.9.25"
163+
versionName "2.9.26"
164164
manifestPlaceholders = [appAuthRedirectScheme: 'com.proofofpassportapp']
165165
externalNativeBuild {
166166
cmake {
@@ -214,6 +214,12 @@ android {
214214
}
215215
}
216216

217+
testOptions {
218+
unitTests {
219+
includeAndroidResources = true
220+
}
221+
}
222+
217223
packagingOptions {
218224
jniLibs {
219225
// Use legacy packaging (compressed, extracted at install) to ensure
@@ -274,6 +280,10 @@ dependencies {
274280
implementation "com.google.android.material:material:1.12.0"
275281

276282
implementation "com.google.android.play:app-update:2.1.0"
283+
284+
testImplementation "junit:junit:4.13.2"
285+
testImplementation "org.robolectric:robolectric:4.15.1"
286+
testImplementation "androidx.test:core:1.6.1"
277287
}
278288

279289
java {

app/android/app/src/main/java/com/proofofpassportapp/MainApplication.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class MainApplication : Application(), ReactApplication {
3333

3434
override val reactNativeHost: ReactNativeHost =
3535
object : DefaultReactNativeHost(this) {
36-
override fun getPackages(): MutableList<ReactPackage> = packages
36+
override fun getPackages(): MutableList<ReactPackage> = this@MainApplication.packages
3737

3838
override fun getJSMainModuleName(): String = "index"
3939

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools">
4+
<application
5+
android:name=".MainApplication"
6+
android:icon="@mipmap/ic_launcher"
7+
android:roundIcon="@mipmap/ic_launcher"
8+
android:extractNativeLibs="false"
9+
android:allowBackup="false"
10+
tools:replace="android:icon, android:roundIcon, android:name, android:extractNativeLibs, android:allowBackup">
11+
<!-- Same ML Kit override as the main manifest; the unit-test manifest
12+
merge does not inherit it -->
13+
<meta-data
14+
android:name="com.google.mlkit.vision.DEPENDENCIES"
15+
android:value="ocr,face"
16+
tools:replace="android:value" />
17+
<meta-data
18+
android:name="com.google.firebase.messaging.default_notification_channel_id"
19+
android:value="@string/default_notification_channel_id"
20+
tools:replace="android:value" />
21+
<meta-data
22+
android:name="com.google.firebase.messaging.default_notification_color"
23+
android:resource="@color/notification_color"
24+
tools:replace="android:resource" />
25+
</application>
26+
</manifest>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
2+
3+
package com.proofofpassportapp
4+
5+
import android.app.Application
6+
import android.content.Context
7+
import android.content.ContextWrapper
8+
import androidx.test.core.app.ApplicationProvider
9+
import com.facebook.react.ReactNativeHost
10+
import org.junit.Assert.assertTrue
11+
import org.junit.Test
12+
import org.junit.runner.RunWith
13+
import org.robolectric.RobolectricTestRunner
14+
import org.robolectric.annotation.Config
15+
16+
// Uses a plain Application so Robolectric skips MainApplication.onCreate,
17+
// which loads native libraries unavailable on the JVM.
18+
@RunWith(RobolectricTestRunner::class)
19+
@Config(application = Application::class, sdk = [35])
20+
class MainApplicationTest {
21+
22+
// Regression test: an unqualified `packages` reference inside the anonymous
23+
// DefaultReactNativeHost resolved to the host's own getPackages() instead of
24+
// MainApplication's property, recursing until StackOverflowError. Only
25+
// old-arch callers (e.g. BlobProvider) hit getPackages(), so startup testing
26+
// never caught it.
27+
@Test
28+
fun getPackagesReturnsWithoutInfiniteRecursion() {
29+
val app = MainApplication()
30+
val attach =
31+
ContextWrapper::class.java.getDeclaredMethod("attachBaseContext", Context::class.java)
32+
attach.isAccessible = true
33+
attach.invoke(app, ApplicationProvider.getApplicationContext<Application>())
34+
35+
val getPackages = ReactNativeHost::class.java.getDeclaredMethod("getPackages")
36+
getPackages.isAccessible = true
37+
val packages = getPackages.invoke(app.reactNativeHost) as List<*>
38+
39+
assertTrue(packages.any { it is CameraActivityPackage })
40+
assertTrue(packages.any { it is QRCodeScannerPackage })
41+
assertTrue(packages.any { it is BackupPackage })
42+
}
43+
}

app/app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"expo": {
55
"name": "Self App",
66
"slug": "self-app",
7-
"version": "2.9.25",
7+
"version": "2.9.26",
88
"platforms": ["ios", "android"],
99
"ios": {
1010
"bundleIdentifier": "com.proofofpassportapp"

app/ios/Self.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@
619619
"$(PROJECT_DIR)",
620620
"$(PROJECT_DIR)/MoproKit/Libs",
621621
);
622-
MARKETING_VERSION = 2.9.25;
622+
MARKETING_VERSION = 2.9.26;
623623
OTHER_LDFLAGS = (
624624
"$(inherited)",
625625
"-ObjC",
@@ -764,7 +764,7 @@
764764
"$(PROJECT_DIR)",
765765
"$(PROJECT_DIR)/MoproKit/Libs",
766766
);
767-
MARKETING_VERSION = 2.9.25;
767+
MARKETING_VERSION = 2.9.26;
768768
OTHER_LDFLAGS = (
769769
"$(inherited)",
770770
"-ObjC",

app/ios/Self/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<key>CFBundlePackageType</key>
2222
<string>APPL</string>
2323
<key>CFBundleShortVersionString</key>
24-
<string>2.9.25</string>
24+
<string>2.9.26</string>
2525
<key>CFBundleSignature</key>
2626
<string>????</string>
2727
<key>CFBundleURLTypes</key>

app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@selfxyz/mobile-app",
3-
"version": "2.9.25",
3+
"version": "2.9.26",
44
"private": true,
55
"type": "module",
66
"main": "index.js",

app/tests/src/config/sentry.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ describe('redactSensitiveFields (ANA-13)', () => {
136136
contexts: {
137137
os: { name: 'iOS', version: '17.4' },
138138
device: { name: 'iPhone 15', model: 'iPhone16,1' },
139-
app: { app_name: 'Self', app_version: '2.9.25' },
139+
app: { app_name: 'Self', app_version: '2.9.26' },
140140
},
141141
});
142142
const ctx = event.contexts as Record<string, Record<string, unknown>>;

0 commit comments

Comments
 (0)