Skip to content

Commit 39ad69e

Browse files
committed
FIX: ios app crashing
1 parent 7ec86da commit 39ad69e

11 files changed

Lines changed: 59 additions & 38 deletions

File tree

.gitlab/ci/build_app.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ app-tests:
4040
stage: check
4141
script:
4242
- pnpm --filter polycentric-app test
43+
- pnpm --filter polycentric-app typecheck
4344

4445
.app-build-base:
4546
extends: .app-workflow

apps/polycentric/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
"@babel/core": "^7.29.7",
8484
"@testing-library/react-native": "^14.0.0",
8585
"@types/jest": "^29.5.14",
86+
"@types/node": "catalog:",
8687
"@types/react": "~19.2.17",
8788
"@types/react-test-renderer": "^19.1.0",
8889
"eslint": "^10.0.0",

apps/polycentric/src/common/lib/polycentric-hooks/PolycentricProvider.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ export function PolycentricProvider({
257257
}, [client]);
258258

259259
const value = useMemo<PolycentricContextValue | null>(() => {
260+
if (!client || !store) return null;
260261
return {
261262
client,
262263
store,

apps/polycentric/src/features/composer/hooks/useComposer.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { types } from '@polycentric/react-native';
12
import * as React from 'react';
23
import { act } from 'react';
34
import TestRenderer from 'react-test-renderer';
@@ -21,7 +22,9 @@ jest.mock('expo-image-picker', () => ({
2122

2223
const mockClient = {
2324
contentManager: {
24-
build: jest.fn((x: unknown) => ({ content: x })),
25+
build: jest.fn((x: { oneofKind: 'post'; post: types.v2.Post }) => ({
26+
content: x,
27+
})),
2528
save: jest.fn(async () => undefined),
2629
},
2730
buildEvent: jest.fn(async () => ({ event: true })),

apps/polycentric/src/features/notifications/hooks/useListNotifications.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function useListNotifications(): UseListNotificationsResult {
1717

1818
const query = useQuery(
1919
['list_notifications', identity],
20-
new Query.ListNotifications({ identity }),
20+
new Query.ListNotifications({ identity, omitLabels: [] }),
2121
undefined,
2222
!!identity,
2323
);
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export * from '../core/identity/IdentityFooter';
2-
export * from './FeedChip';
3-
export * from '../../common/components/List/List';
2+
export * from '../../common/components/List';
43
export * from './Post';
54
export * from './ThreadList';

packages/js-node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"devDependencies": {
2929
"@polycentric/tsconfig": "workspace:*",
3030
"@types/better-sqlite3": "^7.6.13",
31-
"@types/node": "^24.0.0",
31+
"@types/node": "catalog:",
3232
"typescript": "catalog:"
3333
}
3434
}

packages/react-native/PolycentricReactNativeFramework.xcframework/Info.plist

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<key>BinaryPath</key>
99
<string>libpolycentric_core.a</string>
1010
<key>LibraryIdentifier</key>
11-
<string>ios-arm64</string>
11+
<string>ios-arm64-simulator</string>
1212
<key>LibraryPath</key>
1313
<string>libpolycentric_core.a</string>
1414
<key>SupportedArchitectures</key>
@@ -17,12 +17,14 @@
1717
</array>
1818
<key>SupportedPlatform</key>
1919
<string>ios</string>
20+
<key>SupportedPlatformVariant</key>
21+
<string>simulator</string>
2022
</dict>
2123
<dict>
2224
<key>BinaryPath</key>
2325
<string>libpolycentric_core.a</string>
2426
<key>LibraryIdentifier</key>
25-
<string>ios-arm64-simulator</string>
27+
<string>ios-arm64</string>
2628
<key>LibraryPath</key>
2729
<string>libpolycentric_core.a</string>
2830
<key>SupportedArchitectures</key>
@@ -31,8 +33,6 @@
3133
</array>
3234
<key>SupportedPlatform</key>
3335
<string>ios</string>
34-
<key>SupportedPlatformVariant</key>
35-
<string>simulator</string>
3636
</dict>
3737
</array>
3838
<key>CFBundlePackageType</key>

packages/react-native/src/generated/rn/polycentric_core.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,10 @@ export type ListNotificationsArgs = {
769769
* Return notifications after this cursor.
770770
*/
771771
after?: string;
772+
/**
773+
* Label values for which the requester does not want to see content.
774+
*/
775+
omitLabels: Array<string>;
772776
};
773777

774778
/**
@@ -797,18 +801,21 @@ const FfiConverterTypeListNotificationsArgs = (() => {
797801
identity: FfiConverterString.read(from),
798802
first: FfiConverterOptionalUInt32.read(from),
799803
after: FfiConverterOptionalString.read(from),
804+
omitLabels: FfiConverterSequenceString.read(from),
800805
};
801806
}
802807
write(value: TypeName, into: RustBuffer): void {
803808
FfiConverterString.write(value.identity, into);
804809
FfiConverterOptionalUInt32.write(value.first, into);
805810
FfiConverterOptionalString.write(value.after, into);
811+
FfiConverterSequenceString.write(value.omitLabels, into);
806812
}
807813
allocationSize(value: TypeName): number {
808814
return (
809815
FfiConverterString.allocationSize(value.identity) +
810816
FfiConverterOptionalUInt32.allocationSize(value.first) +
811-
FfiConverterOptionalString.allocationSize(value.after)
817+
FfiConverterOptionalString.allocationSize(value.after) +
818+
FfiConverterSequenceString.allocationSize(value.omitLabels)
812819
);
813820
}
814821
}
@@ -4756,6 +4763,9 @@ const FfiConverterOptionalSequenceTypeEventKey = new FfiConverterOptional(
47564763
// FfiConverter for number | undefined
47574764
const FfiConverterOptionalUInt32 = new FfiConverterOptional(FfiConverterUInt32);
47584765

4766+
// FfiConverter for Array<string>
4767+
const FfiConverterSequenceString = new FfiConverterArray(FfiConverterString);
4768+
47594769
// FfiConverter for FetchMode | undefined
47604770
const FfiConverterOptionalTypeFetchMode = new FfiConverterOptional(
47614771
FfiConverterTypeFetchMode
@@ -4766,9 +4776,6 @@ const FfiConverterOptionalTypeUpdateMode = new FfiConverterOptional(
47664776
FfiConverterTypeUpdateMode
47674777
);
47684778

4769-
// FfiConverter for Array<string>
4770-
const FfiConverterSequenceString = new FfiConverterArray(FfiConverterString);
4771-
47724779
// FfiConverter for Array<string> | undefined
47734780
const FfiConverterOptionalSequenceString = new FfiConverterOptional(
47744781
FfiConverterSequenceString

pnpm-lock.yaml

Lines changed: 33 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)