Skip to content

Commit db7b342

Browse files
authored
Merge pull request #93 from kiwix/92-phet-custom-app
PhET custom app
2 parents ddcf0d2 + 28745d0 commit db7b342

26 files changed

+235
-0
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ These key / values can be, but do not need to be included in the `info.json` fil
5353

5454
- `bundle_id` - (optional) It should match to the bundle id set on the Apple Developer website for this app. If it's not set it will default to: "org.kiwix.custom.{brand_name}", where the brand name is the name of the folder, eg: "org.kiwix.custom.dwds".
5555

56+
- `disable_immersive_reading` - optional (true| false) - if set to true, it will disable the immersive reading functionality on iOS, which is hiding the top / bottom nav bars while scrolling the web content. If the ZIM content is specific to a full screen experience (eg: PhET) it might be better to turn this feature off, so that the user navigation is not blocked (eg navigating back, search, bookmarks ect).
57+
5658
- `zim_auth` - (optional) this is needed if standard http authentication is required to download the ZIM file. This should be set to **an environment variable name**, which will be resolved during build time. Make sure that the environment variable itself is set up properly before running the build process. **Do not place any credentials directly here, it's not safe, and won't work.**
5759

5860
## XCAssets file

phet/info.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"about_app_url": "https://www.kiwix.org/support",
3+
"about_text": "Chemistry & Physics simulation",
4+
"app_name": "PhET",
5+
"app_store_id": "id6744251352",
6+
"bundle_id": "org.kiwix.phet",
7+
"development_team": "L7HWM3SP3L",
8+
"disable_immersive_reading": true,
9+
"settings_default_external_link_to": "alwaysLoad",
10+
"settings_show_external_link_option": true,
11+
"settings_show_search_snippet": false,
12+
"uses_audio": false,
13+
"zim_url": "http://localhost:8000/phet_mul_all_2025-03.zim"
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "phet_logo_1024.png",
5+
"idiom" : "universal",
6+
"platform" : "ios",
7+
"size" : "1024x1024"
8+
},
9+
{
10+
"filename" : "phet_logo_16.png",
11+
"idiom" : "mac",
12+
"scale" : "1x",
13+
"size" : "16x16"
14+
},
15+
{
16+
"filename" : "phet_logo_32 1.png",
17+
"idiom" : "mac",
18+
"scale" : "2x",
19+
"size" : "16x16"
20+
},
21+
{
22+
"filename" : "phet_logo_32.png",
23+
"idiom" : "mac",
24+
"scale" : "1x",
25+
"size" : "32x32"
26+
},
27+
{
28+
"filename" : "phet_logo_64.png",
29+
"idiom" : "mac",
30+
"scale" : "2x",
31+
"size" : "32x32"
32+
},
33+
{
34+
"filename" : "phet_logo_128.png",
35+
"idiom" : "mac",
36+
"scale" : "1x",
37+
"size" : "128x128"
38+
},
39+
{
40+
"filename" : "phet_logo_256.png",
41+
"idiom" : "mac",
42+
"scale" : "2x",
43+
"size" : "128x128"
44+
},
45+
{
46+
"filename" : "phet_logo_256 1.png",
47+
"idiom" : "mac",
48+
"scale" : "1x",
49+
"size" : "256x256"
50+
},
51+
{
52+
"filename" : "phet_logo_512.png",
53+
"idiom" : "mac",
54+
"scale" : "2x",
55+
"size" : "256x256"
56+
},
57+
{
58+
"filename" : "phet_logo_512 1.png",
59+
"idiom" : "mac",
60+
"scale" : "1x",
61+
"size" : "512x512"
62+
},
63+
{
64+
"filename" : "phet_logo_1024 1.png",
65+
"idiom" : "mac",
66+
"scale" : "2x",
67+
"size" : "512x512"
68+
}
69+
],
70+
"info" : {
71+
"author" : "xcode",
72+
"version" : 1
73+
}
74+
}
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

phet/phet.xcassets/Contents.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "icon_128x128.png",
5+
"idiom" : "universal"
6+
}
7+
],
8+
"info" : {
9+
"author" : "xcode",
10+
"version" : 1
11+
}
12+
}
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "notebook.svg",
5+
"idiom" : "universal"
6+
}
7+
],
8+
"info" : {
9+
"author" : "xcode",
10+
"version" : 1
11+
},
12+
"properties" : {
13+
"preserves-vector-representation" : true
14+
}
15+
}
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "BookmarkAdded.png",
5+
"idiom" : "universal"
6+
}
7+
],
8+
"info" : {
9+
"author" : "xcode",
10+
"version" : 1
11+
}
12+
}
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "BookmarkRemoved.png",
5+
"idiom" : "universal"
6+
}
7+
],
8+
"info" : {
9+
"author" : "xcode",
10+
"version" : 1
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "phet_welcomeLogo.svg",
5+
"idiom" : "universal"
6+
}
7+
],
8+
"info" : {
9+
"author" : "xcode",
10+
"version" : 1
11+
},
12+
"properties" : {
13+
"preserves-vector-representation" : true,
14+
"template-rendering-intent" : "original"
15+
}
16+
}
Loading

src/info_parser.py

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"about_text": "CUSTOM_ABOUT_TEXT",
2626
"settings_default_external_link_to": "SETTINGS_DEFAULT_EXTERNAL_LINK_TO",
2727
"settings_show_search_snippet": "SETTINGS_SHOW_SEARCH_SNIPPET",
28+
"disable_immersive_reading": "DISABLE_IMMERSIVE_READING",
2829
"settings_show_external_link_option": "SETTINGS_SHOW_EXTERNAL_LINK_OPTION"
2930
}
3031

0 commit comments

Comments
 (0)