Skip to content

Commit 3fabae0

Browse files
committed
fixme: Temp hack to test changes to upstream iOS MCU Mgr
1 parent 95bbf56 commit 3fabae0

File tree

3 files changed

+28
-19
lines changed

3 files changed

+28
-19
lines changed

example/app.config.ts

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,49 @@ import { ExpoConfig } from '@expo/config-types';
22
import 'ts-node/register';
33

44
const config: ExpoConfig = {
5-
name: "react-native-mcu-manager-example",
6-
slug: "react-native-mcu-manager-example",
7-
version: "1.0.0",
8-
orientation: "portrait",
9-
assetBundlePatterns: ["**/*"],
10-
scheme: "rnmcumgr",
5+
name: 'react-native-mcu-manager-example',
6+
slug: 'react-native-mcu-manager-example',
7+
version: '1.0.0',
8+
orientation: 'portrait',
9+
assetBundlePatterns: ['**/*'],
10+
scheme: 'rnmcumgr',
1111
splash: {
12-
image: ".assets/images/pd.png",
13-
backgroundColor: "#FFFFFF",
12+
image: '.assets/images/pd.png',
13+
backgroundColor: '#FFFFFF',
1414
},
1515
ios: {
1616
supportsTablet: true,
17-
bundleIdentifier: "uk.co.playerdata.reactnativemcumanager.example",
17+
bundleIdentifier: 'uk.co.playerdata.reactnativemcumanager.example',
1818
infoPlist: {
19-
NSBluetoothAlwaysUsageDescription: "Requires Bluetooth to perform firmware updates.",
19+
NSBluetoothAlwaysUsageDescription:
20+
'Requires Bluetooth to perform firmware updates.',
2021
},
2122
},
2223
android: {
23-
package: "uk.co.playerdata.reactnativemcumanager.example",
24-
permissions: [
25-
"ACCESS_FINE_LOCATION",
26-
"ACCESS_COARSE_LOCATION",
27-
],
24+
package: 'uk.co.playerdata.reactnativemcumanager.example',
25+
permissions: ['ACCESS_FINE_LOCATION', 'ACCESS_COARSE_LOCATION'],
2826
},
2927
plugins: [
30-
["expo-document-picker"],
31-
["./gradlePlugin.ts"],
28+
['expo-document-picker'],
29+
['./gradlePlugin.ts'],
3230
[
3331
'expo-build-properties',
3432
{
3533
android: {
3634
minSdkVersion: 26,
3735
},
36+
ios: {
37+
extraPods: [
38+
{
39+
name: 'iOSMcuManagerLibrary',
40+
git: 'https://github.com/PlayerData/IOS-nRF-Connect-Device-Manager',
41+
branch: 'correct-settings-write',
42+
},
43+
],
44+
},
3845
},
3946
],
40-
]
47+
],
4148
};
4249

4350
export default config;

example/app/settings.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ export default function settings() {
124124
setSettingError(null);
125125

126126
const valueB64 = await readSetting(selectedDeviceId, settingName);
127+
console.log('valueB64', valueB64);
127128
const decodedValue = Buffer.from(valueB64, 'base64').toString(
128129
'binary'
129130
);
@@ -149,6 +150,7 @@ export default function settings() {
149150
const encodedValue = Buffer.from(settingValue, 'binary').toString(
150151
'base64'
151152
);
153+
console.log('encodedValue', encodedValue);
152154
await writeSetting(selectedDeviceId, settingName, encodedValue);
153155
} catch (error) {
154156
if (error instanceof Error) {

react-native-mcu-manager/ios/ReactNativeMcuManager.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
1616
s.static_framework = true
1717

1818
s.dependency 'ExpoModulesCore'
19-
s.dependency 'iOSMcuManagerLibrary', '1.7.3'
19+
s.dependency 'iOSMcuManagerLibrary'
2020

2121
# Swift/Objective-C compatibility
2222
s.pod_target_xcconfig = {

0 commit comments

Comments
 (0)