Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update iOS example + native module fixes #3

Merged
merged 3 commits into from
Apr 28, 2024
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
77 changes: 77 additions & 0 deletions Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>EudiWalletKitReactNativeExample</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>For document presentation via Bluetooth (proximity use case)</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>For document presentation via Bluetooth (proximity use case)</string>
<key>NSCameraUsageDescription</key>
<string>Camera used for in-app QR Code scanning</string>
<key>NSFaceIDUsageDescription</key>
<string>Authentication with TouchId or FaceID</string>
<key>UIAppFonts</key>
<array>
<string>AntDesign.ttf</string>
<string>Entypo.ttf</string>
<string>EvilIcons.ttf</string>
<string>Feather.ttf</string>
<string>FontAwesome.ttf</string>
<string>FontAwesome5_Brands.ttf</string>
<string>FontAwesome5_Regular.ttf</string>
<string>FontAwesome5_Solid.ttf</string>
<string>FontAwesome6_Brands.ttf</string>
<string>FontAwesome6_Regular.ttf</string>
<string>FontAwesome6_Solid.ttf</string>
<string>Foundation.ttf</string>
<string>Ionicons.ttf</string>
<string>MaterialIcons.ttf</string>
<string>MaterialCommunityIcons.ttf</string>
<string>SimpleLineIcons.ttf</string>
<string>Octicons.ttf</string>
<string>Zocial.ttf</string>
<string>Fontisto.ttf</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
203 changes: 150 additions & 53 deletions example/ios/EudiWalletKitReactNativeExample.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/eu-digital-identity-wallet/eudi-lib-ios-iso18013-data-model.git",
"state" : {
"revision" : "44464efb1ab5a35c6b5863736e34f973b3313a74",
"version" : "0.2.2"
"revision" : "b507b918869c24e7b9e7265bee16a192e1013f89",
"version" : "0.2.3"
}
},
{
Expand All @@ -50,8 +50,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/eu-digital-identity-wallet/eudi-lib-ios-openid4vci-swift.git",
"state" : {
"revision" : "1c06b020e6866906690c2eb36c8718e193659780",
"version" : "0.0.5"
"revision" : "e75c7ebaee5953d0c10a3dd5510747fdcdcadfa7",
"version" : "0.0.6"
}
},
{
Expand All @@ -68,8 +68,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/eu-digital-identity-wallet/eudi-lib-ios-siop-openid4vp-swift.git",
"state" : {
"revision" : "e822000c9b45040961d74839ce0c75a01391cc3c",
"version" : "0.0.71"
"revision" : "1336ad97d024dceaf629f3e531eb1c6dcfb10188",
"version" : "0.0.73"
}
},
{
Expand All @@ -78,7 +78,7 @@
"location" : "https://github.com/eu-digital-identity-wallet/eudi-lib-ios-wallet-kit.git",
"state" : {
"branch" : "main",
"revision" : "4fd0d8aba4fe89e718d21d5e96fbb3ac69705913"
"revision" : "9c165692de7d7a9dde317c65462c20feccd73c9a"
}
},
{
Expand Down Expand Up @@ -203,8 +203,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/niscy-eudiw/SwiftCBOR.git",
"state" : {
"revision" : "74763c2624c09e8702967d8bef01767d12a71615",
"version" : "0.5.1"
"revision" : "310dbc3975a5653237fed304d88a6dd59d04dd30",
"version" : "0.5.7"
}
},
{
Expand Down
33 changes: 28 additions & 5 deletions example/ios/EudiWalletKitReactNativeExample/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,39 @@
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! -->
<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! -->
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>For document presentation via Bluetooth (proximity use case)</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>For document presentation via Bluetooth (proximity use case)</string>
<key>NSCameraUsageDescription</key>
<string>Camera used for in-app QR Code scanning</string>
<key>NSFaceIDUsageDescription</key>
<string>Authentication with TouchId or FaceID</string>
<key>UIAppFonts</key>
<array>
<string>MaterialIcons.ttf</string>
<string>MaterialCommunityIcons.ttf</string>
<string>AntDesign.ttf</string>
<string>Entypo.ttf</string>
<string>EvilIcons.ttf</string>
<string>Feather.ttf</string>
<string>FontAwesome.ttf</string>
<string>FontAwesome5_Brands.ttf</string>
<string>FontAwesome5_Regular.ttf</string>
<string>FontAwesome5_Solid.ttf</string>
<string>Fontisto.ttf</string>
<string>Foundation.ttf</string>
<string>Ionicons.ttf</string>
<string>Octicons.ttf</string>
<string>SimpleLineIcons.ttf</string>
<string>Zocial.ttf</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
Expand All @@ -43,8 +68,6 @@
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
Expand Down
22 changes: 16 additions & 6 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
'require.resolve(
"react-native/scripts/react_native_pods.rb",
{paths: [process.argv[1]]},
)', __dir__]).strip
def node_require(script)
# Resolve script with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
"require.resolve(
'#{script}',
{paths: [process.argv[1]]},
)", __dir__]).strip
end

node_require('react-native/scripts/react_native_pods.rb')
node_require('react-native-permissions/scripts/setup.rb')

minimum_target = '14.0'

platform :ios, minimum_target
prepare_react_native_project!

setup_permissions([
'Camera',
'Bluetooth'
])

plugin "cocoapods-spm"

# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
Expand Down
48 changes: 47 additions & 1 deletion example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,8 @@ PODS:
- React-Mapbuffer (0.73.6):
- glog
- React-debug
- react-native-safe-area-context (4.9.0):
- React-Core
- React-nativeconfig (0.73.6)
- React-NativeModulesApple (0.73.6):
- glog
Expand Down Expand Up @@ -1115,7 +1117,23 @@ PODS:
- React-jsi (= 0.73.6)
- React-logger (= 0.73.6)
- React-perflogger (= 0.73.6)
- RNBluetoothStateManager (1.3.5):
- React-Core
- RNDeviceInfo (10.13.1):
- React-Core
- RNPermissions (4.1.5):
- React-Core
- RNScreens (3.30.1):
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
- RNSVG (15.1.0):
- React-Core
- SocketRocket (0.6.1)
- VisionCamera (3.9.2):
- React
- React-callinvoker
- React-Core
- Yoga (1.14.0)

DEPENDENCIES:
Expand Down Expand Up @@ -1172,6 +1190,7 @@ DEPENDENCIES:
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector-modern`)
- React-logger (from `../node_modules/react-native/ReactCommon/logger`)
- React-Mapbuffer (from `../node_modules/react-native/ReactCommon`)
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- React-nativeconfig (from `../node_modules/react-native/ReactCommon`)
- React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
Expand All @@ -1192,6 +1211,12 @@ DEPENDENCIES:
- React-runtimescheduler (from `../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`)
- React-utils (from `../node_modules/react-native/ReactCommon/react/utils`)
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- RNBluetoothStateManager (from `../node_modules/react-native-bluetooth-state-manager`)
- RNDeviceInfo (from `../node_modules/react-native-device-info`)
- RNPermissions (from `../node_modules/react-native-permissions`)
- RNScreens (from `../node_modules/react-native-screens`)
- RNSVG (from `../node_modules/react-native-svg`)
- VisionCamera (from `../node_modules/react-native-vision-camera`)
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)

SPEC REPOS:
Expand Down Expand Up @@ -1268,6 +1293,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/logger"
React-Mapbuffer:
:path: "../node_modules/react-native/ReactCommon"
react-native-safe-area-context:
:path: "../node_modules/react-native-safe-area-context"
React-nativeconfig:
:path: "../node_modules/react-native/ReactCommon"
React-NativeModulesApple:
Expand Down Expand Up @@ -1308,6 +1335,18 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/react/utils"
ReactCommon:
:path: "../node_modules/react-native/ReactCommon"
RNBluetoothStateManager:
:path: "../node_modules/react-native-bluetooth-state-manager"
RNDeviceInfo:
:path: "../node_modules/react-native-device-info"
RNPermissions:
:path: "../node_modules/react-native-permissions"
RNScreens:
:path: "../node_modules/react-native-screens"
RNSVG:
:path: "../node_modules/react-native-svg"
VisionCamera:
:path: "../node_modules/react-native-vision-camera"
Yoga:
:path: "../node_modules/react-native/ReactCommon/yoga"

Expand Down Expand Up @@ -1352,6 +1391,7 @@ SPEC CHECKSUMS:
React-jsinspector: 85583ef014ce53d731a98c66a0e24496f7a83066
React-logger: 3eb80a977f0d9669468ef641a5e1fabbc50a09ec
React-Mapbuffer: 84ea43c6c6232049135b1550b8c60b2faac19fab
react-native-safe-area-context: b97eb6f9e3b7f437806c2ce5983f479f8eb5de4b
React-nativeconfig: b4d4e9901d4cabb57be63053fd2aa6086eb3c85f
React-NativeModulesApple: cd26e56d56350e123da0c1e3e4c76cb58a05e1ee
React-perflogger: 5f49905de275bac07ac7ea7f575a70611fa988f2
Expand All @@ -1372,9 +1412,15 @@ SPEC CHECKSUMS:
React-runtimescheduler: 9636eee762c699ca7c85751a359101797e4c8b3b
React-utils: d16c1d2251c088ad817996621947d0ac8167b46c
ReactCommon: 2aa35648354bd4c4665b9a5084a7d37097b89c10
RNBluetoothStateManager: 724f2c76b04e0a2b840dfd7305b68f614bc01c81
RNDeviceInfo: 4f9c7cfd6b9db1b05eb919620a001cf35b536423
RNPermissions: e8d46b1cb07b97819c5c52c1ab24c33dc889ad03
RNScreens: b6b64d956af3715adbfe84808694ae82d3fec74f
RNSVG: 50cf2c7018e57cf5d3522d98d0a3a4dd6bf9d093
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
VisionCamera: 36c460338692788a0d377dce7d32f8ba049fb4f2
Yoga: 805bf71192903b20fc14babe48080582fee65a80

PODFILE CHECKSUM: 0ccc688e296c01cd1c0493b0674f83769ae21695
PODFILE CHECKSUM: 5c556abbb22d0f8c8730b0c18d61e73428a97dd4

COCOAPODS: 1.14.3
6 changes: 6 additions & 0 deletions example/ios/eudi_sample_data.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"ios": "react-native run-ios"
},
"dependencies": {
"@craftzdog/react-native-buffer": "^6.0.5",
"@react-navigation/bottom-tabs": "^6.5.14",
"@react-navigation/native": "^6.1.12",
"@react-navigation/native-stack": "^6.9.20",
Expand All @@ -17,6 +18,7 @@
"react-native-device-info": "^10.13.1",
"react-native-permissions": "^4.1.5",
"react-native-qrcode-svg": "^6.3.0",
"react-native-quick-base64": "^2.0.8",
"react-native-safe-area-context": "^4.9.0",
"react-native-screens": "^3.29.0",
"react-native-svg": "^15.0.0",
Expand Down
7 changes: 6 additions & 1 deletion example/react-native.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@ module.exports = {
[pak.name]: {
root: path.join(__dirname, '..'),
},
'react-native-vector-icons': {
platforms: {
ios: null,
},
},
},
}
}
3 changes: 1 addition & 2 deletions example/src/components/modals/AddDocumentModal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { EudiWallet } from 'eudi-wallet-kit-react-native'
import React, { useCallback, useState } from 'react'
import { Button, Modal, StyleSheet, Text, View } from 'react-native'
import { SafeAreaView } from 'react-native-safe-area-context'
import { Button, Modal, StyleSheet, Text, View, SafeAreaView } from 'react-native'

import { IconButton } from '../buttons'

Expand Down
Loading
Loading