Skip to content

Commit

Permalink
Merge pull request #199 from Sphereon-Opensource/feature/SPRIND-29_ex…
Browse files Browse the repository at this point in the history
…po-51_ios_attempt

Feature/sprind 29 expo 51 and new crypto implementation
  • Loading branch information
nklomp authored Aug 1, 2024
2 parents 756e201 + 98b61b4 commit 691e17c
Show file tree
Hide file tree
Showing 68 changed files with 3,752 additions and 5,390 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,4 @@ yalc.lock

out.log
out.txt
/.yarn/
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
14 changes: 7 additions & 7 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import 'reflect-metadata';
import {NavigationContainer} from '@react-navigation/native';
import crypto from '@sphereon/isomorphic-webcrypto';
import {backgroundColors} from '@sphereon/ui-components.core';
import * as SplashScreen from 'expo-splash-screen';
import * as React from 'react';
Expand All @@ -11,7 +9,9 @@ import {SafeAreaProvider} from 'react-native-safe-area-context';
import {Provider} from 'react-redux';
import {bindActionCreators} from 'redux';
import {DB_CONNECTION_NAME} from './src/@config/database';
import {agentContext, linkHandlers} from './src/agent';
import IntentHandler from './src/handlers/IntentHandler';
import {addLinkListeners} from './src/handlers/LinkHandlers';
import LockingHandler from './src/handlers/LockingHandler';
import _loadFontsAsync from './src/hooks/useFonts';
import Localization from './src/localization/Localization';
Expand All @@ -23,6 +23,8 @@ import store from './src/store';
import {getUsers} from './src/store/actions/user.actions';
import {PlatformsEnum} from './src/types';
import {GestureHandlerRootView} from 'react-native-gesture-handler';
import {install as installCrypto} from 'react-native-quick-crypto';
import './src/agent/index';

LogBox.ignoreLogs([
// Ignore require cycles for the app in dev mode. They do show up in Metro!
Expand Down Expand Up @@ -60,12 +62,12 @@ export default function App() {
// TODO this function should be moved to an init place
async function prepare(): Promise<void> {
try {
addLinkListeners(linkHandlers, agentContext);

// Enable the intent handler early, so we can get deeplinks on start or before login
await IntentHandler.getInstance().enable();
await LockingHandler.getInstance().enableLocking();
console.log('PRE DB connection');
await getDbConnection(DB_CONNECTION_NAME);
console.log('POST DB connection');

// TODO create better implementation for this
StatusBar.setBarStyle('light-content', true);
Expand All @@ -78,12 +80,10 @@ export default function App() {
// Preload fonts, make any API calls you need to do here
await _loadFontsAsync();

// Needed for isomorphic-webcrypto. Must be removed if react-native-crypto is used instead
await crypto.ensureSecure();

// Load the redux store
const actions = bindActionCreators({getUsers}, store.dispatch);
actions.getUsers();
installCrypto();
} catch (e) {
console.warn(e);
} finally {
Expand Down
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,27 @@

All notable changes to this project will be documented in this file.

# [0.3.0](https://github.com/Sphereon-Opensource/mobile-wallet/compare/v0.1.3...v0.2.0) (TBD)
# [0.3.0](https://github.com/Sphereon-Opensource/mobile-wallet/compare/v0.1.3...v0.2.0) (2024-08-01)

The license of the wallet has been made more permissive. We moved from GPLv3 to Apache2.

### Improvements

- Support for newer OID4VC specifications (OID4VP v20, OID4VCI v13/ID1, SIOP v13)
- Add support for issuer branding (logo)
- New faster database
- New datastore allowing for storage of different types of credentials (SD-JWT, JWT, mDl/mdoc), presentations and future remote storage
- New crypto implementation that is much faster
- Update to latest expo (v51) and react-native (v0.74)

# [0.2.0](https://github.com/Sphereon-Opensource/mobile-wallet/compare/v0.1.3...v0.2.0) (2024-03-28)

This release contains many improvements, including support for newer versions of the OID4VC specifications and EBSI support.
Be aware that we moved to a new secure store implementation, meaning you will have to onboard again.

### Improvements

- Support for newer OID4VC specifications (OID4VP v13, OID4VCI v12, SIOP v18)
- Support for newer OID4VC specifications (OID4VP v18, OID4VCI v12, SIOP v13)
- Support for EBSI
- Support for SIOP only flows
- Better separation of logic and screens, using Xstate, allowing re-use between mobile and cloud wallet
Expand Down
16 changes: 16 additions & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# OSX
#
.DS_Store

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof
.cxx/

# Bundle artifacts
*.jsbundle
12 changes: 6 additions & 6 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def projectRoot = rootDir.getAbsoluteFile().getParentFile().getAbsolutePath()
react {
entryFile = file(["node", "-e", "require('expo/scripts/resolveAppEntry')", projectRoot, "android", "absolute"].execute(null, rootDir).text.trim())
reactNativeDir = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile()

hermesCommand = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/sdks/hermesc/%OS-BIN%/hermesc"

codegenDir = new File(["node", "--print", "require.resolve('@react-native/codegen/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile()
Expand Down Expand Up @@ -57,7 +58,7 @@ react {
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
//
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]
hermesFlags = ["-O", "-output-source-map"]
}


Expand All @@ -80,7 +81,6 @@ def enableProguardInReleaseBuilds = (findProperty('android.enableProguardInRelea
*/
def jscFlavor = 'org.webkit:android-jsc:+'


android {
ndkVersion rootProject.ext.ndkVersion

Expand All @@ -92,15 +92,17 @@ android {
applicationId "com.sphereon.ssi.wallet"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 15
versionCode 18
versionName "0.3.0"
missingDimensionStrategy 'react-native-camera', 'general'
manifestPlaceholders = [
appAuthRedirectScheme: "com.sphereon.ssi.wallet"
]
buildConfigField("boolean", "REACT_NATIVE_UNSTABLE_USE_RUNTIME_SCHEDULER_ALWAYS", (findProperty("reactNative.unstable_useRuntimeSchedulerAlways") ?: true).toString())
}

lintOptions {
baseline file("lint-baseline.xml")
}

signingConfigs {
debug {
Expand Down Expand Up @@ -175,8 +177,6 @@ dependencies {
implementation("com.facebook.fresco:animated-webp:${reactAndroidLibs.versions.fresco.get()}")
}
}
implementation("com.facebook.react:flipper-integration")


if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
Expand Down
Loading

0 comments on commit 691e17c

Please sign in to comment.