Skip to content

Commit b31af9b

Browse files
committed
fix(examples/to-do-app): iOS manually add icons fonts to Info.plist
1 parent 764bbff commit b31af9b

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

examples/to-do-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sqliteai/todoapp",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"description": "An Expo template for building apps with the SQLite CloudSync extension",
55
"repository": {
66
"type": "git",

examples/to-do-app/plugins/CloudSyncSetup.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { withDangerousMod, withXcodeProject } = require('@expo/config-plugins');
1+
const { withDangerousMod, withXcodeProject, withInfoPlist } = require('@expo/config-plugins');
22
const fs = require('fs');
33
const path = require('path');
44
const https = require('https');
@@ -277,7 +277,20 @@ const withCloudSync = (config) => {
277277

278278
// iOS setup - add to Xcode project
279279
config = withCloudSyncFramework(config);
280-
280+
281+
// iOS setup - register icon fonts in Info.plist
282+
config = withInfoPlist(config, (config) => {
283+
const fonts = config.modResults.UIAppFonts || [];
284+
if (!fonts.includes('FontAwesome.ttf')) {
285+
fonts.push('FontAwesome.ttf');
286+
}
287+
if (!fonts.includes('MaterialDesignIcons.ttf')) {
288+
fonts.push('MaterialDesignIcons.ttf');
289+
}
290+
config.modResults.UIAppFonts = fonts;
291+
return config;
292+
});
293+
281294
return config;
282295
};
283296

0 commit comments

Comments
 (0)