@expo/repack-app 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,100 @@
1
+ # @expo/repack-app
2
+
3
+ Repacking tool for Expo apps
4
+
5
+ ## Repack an onboarding app for Android
6
+
7
+ 1. Install repack-app
8
+
9
+ ```sh
10
+ $ bun i
11
+ ```
12
+
13
+ 2. Generate golden apk
14
+
15
+ ```sh
16
+ $ ./scripts/create-golden-apk.sh
17
+ ```
18
+
19
+ The golden apk will be generated at **./golden-debug.apk**
20
+
21
+ 3. Have an onboarding app setup at /path/to/sdk51onboard
22
+
23
+ 4. Repack by cli
24
+
25
+ ```sh
26
+ $ bun bin/cli.js -p android --source-app ./golden-debug.apk /path/to/sdk51onboard
27
+ ```
28
+
29
+ 5. Install the app
30
+
31
+ ```sh
32
+ $ adb install -r /path/to/sdk51onboard/repacked.apk
33
+ ```
34
+
35
+ ## Repack an onboarding app for iOS simulators
36
+
37
+ 1. Install repack-app
38
+
39
+ ```sh
40
+ $ bun i
41
+ ```
42
+
43
+ 2. Generate golden apk
44
+
45
+ ```sh
46
+ $ ./scripts/create-golden-ipa.sh iphonesimulator
47
+ ```
48
+
49
+ The golden apk will be generated at **./golden-debug-iphonesimulator.ipa**
50
+
51
+ 3. Have an onboarding app setup at /path/to/sdk51onboard
52
+
53
+ 4. Repack by cli
54
+
55
+ ```sh
56
+ $ bun bin/cli.js -p ios --source-app ./golden-debug-iphonesimulator.ipa /path/to/sdk51onboard
57
+ ```
58
+
59
+ 5. Install the app
60
+
61
+ ```sh
62
+ $ mkdir tmp && unzip /path/to/sdk51onboard/repacked.ipa -d tmp && xcrun simctl install booted tmp/Payload/*.app
63
+ ```
64
+
65
+ ## Repack an onboarding app for iOS devices
66
+
67
+ 1. Install repack-app
68
+
69
+ ```sh
70
+ $ bun i
71
+ ```
72
+
73
+ 2. Generate golden apk
74
+
75
+ ```sh
76
+ $ ./scripts/create-golden-ipa.sh iphoneos
77
+ ```
78
+
79
+ The golden apk will be generated at **./golden-debug-iphoneos.ipa**
80
+
81
+ 3. Have an onboarding app setup at /path/to/sdk51onboard
82
+
83
+ 4. Repack by cli
84
+
85
+ ```sh
86
+ $ bun bin/cli.js -p ios --source-app ./golden-debug-iphoneos.ipa /path/to/sdk51onboard
87
+ # then resign the ipa maybe through fastlane resign
88
+
89
+ # or the cli also provides a shorthand
90
+ $ bun bin/cli.js -p ios --source-app ./golden-debug-iphoneos.ipa \
91
+ --signing-identity 'Apple Development: OOO (XXX)' \
92
+ --provisioning-profile "$HOME/Library/MobileDevice/Provisioning Profiles/e1cf123b-d33a-2b3e-073a-c7ed52aa61bb.mobileprovision" \
93
+ /path/to/sdk51onboard
94
+ ```
95
+
96
+ 5. Install the app
97
+
98
+ ```sh
99
+ $ xcrun devicectl device install app --verbose --device <device-id> /path/to/sdk51onboard/repacked.ipa
100
+ ```
@@ -0,0 +1,216 @@
1
+ /*
2
+ * Copyright (C) 2017 The Android Open Source Project
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ syntax = "proto3";
18
+
19
+ package aapt.pb;
20
+
21
+ option java_package = "com.android.aapt";
22
+
23
+ // A description of the requirements a device must have in order for a
24
+ // resource to be matched and selected.
25
+ message Configuration {
26
+ enum LayoutDirection {
27
+ LAYOUT_DIRECTION_UNSET = 0;
28
+ LAYOUT_DIRECTION_LTR = 1;
29
+ LAYOUT_DIRECTION_RTL = 2;
30
+ }
31
+
32
+ enum ScreenLayoutSize {
33
+ SCREEN_LAYOUT_SIZE_UNSET = 0;
34
+ SCREEN_LAYOUT_SIZE_SMALL = 1;
35
+ SCREEN_LAYOUT_SIZE_NORMAL = 2;
36
+ SCREEN_LAYOUT_SIZE_LARGE = 3;
37
+ SCREEN_LAYOUT_SIZE_XLARGE = 4;
38
+ }
39
+
40
+ enum ScreenLayoutLong {
41
+ SCREEN_LAYOUT_LONG_UNSET = 0;
42
+ SCREEN_LAYOUT_LONG_LONG = 1;
43
+ SCREEN_LAYOUT_LONG_NOTLONG = 2;
44
+ }
45
+
46
+ enum ScreenRound {
47
+ SCREEN_ROUND_UNSET = 0;
48
+ SCREEN_ROUND_ROUND = 1;
49
+ SCREEN_ROUND_NOTROUND = 2;
50
+ }
51
+
52
+ enum WideColorGamut {
53
+ WIDE_COLOR_GAMUT_UNSET = 0;
54
+ WIDE_COLOR_GAMUT_WIDECG = 1;
55
+ WIDE_COLOR_GAMUT_NOWIDECG = 2;
56
+ }
57
+
58
+ enum Hdr {
59
+ HDR_UNSET = 0;
60
+ HDR_HIGHDR = 1;
61
+ HDR_LOWDR = 2;
62
+ }
63
+
64
+ enum Orientation {
65
+ ORIENTATION_UNSET = 0;
66
+ ORIENTATION_PORT = 1;
67
+ ORIENTATION_LAND = 2;
68
+ ORIENTATION_SQUARE = 3;
69
+ }
70
+
71
+ enum UiModeType {
72
+ UI_MODE_TYPE_UNSET = 0;
73
+ UI_MODE_TYPE_NORMAL = 1;
74
+ UI_MODE_TYPE_DESK = 2;
75
+ UI_MODE_TYPE_CAR = 3;
76
+ UI_MODE_TYPE_TELEVISION = 4;
77
+ UI_MODE_TYPE_APPLIANCE = 5;
78
+ UI_MODE_TYPE_WATCH = 6;
79
+ UI_MODE_TYPE_VRHEADSET = 7;
80
+ }
81
+
82
+ enum UiModeNight {
83
+ UI_MODE_NIGHT_UNSET = 0;
84
+ UI_MODE_NIGHT_NIGHT = 1;
85
+ UI_MODE_NIGHT_NOTNIGHT = 2;
86
+ }
87
+
88
+ enum Touchscreen {
89
+ TOUCHSCREEN_UNSET = 0;
90
+ TOUCHSCREEN_NOTOUCH = 1;
91
+ TOUCHSCREEN_STYLUS = 2;
92
+ TOUCHSCREEN_FINGER = 3;
93
+ }
94
+
95
+ enum KeysHidden {
96
+ KEYS_HIDDEN_UNSET = 0;
97
+ KEYS_HIDDEN_KEYSEXPOSED = 1;
98
+ KEYS_HIDDEN_KEYSHIDDEN = 2;
99
+ KEYS_HIDDEN_KEYSSOFT = 3;
100
+ }
101
+
102
+ enum Keyboard {
103
+ KEYBOARD_UNSET = 0;
104
+ KEYBOARD_NOKEYS = 1;
105
+ KEYBOARD_QWERTY = 2;
106
+ KEYBOARD_TWELVEKEY = 3;
107
+ }
108
+
109
+ enum NavHidden {
110
+ NAV_HIDDEN_UNSET = 0;
111
+ NAV_HIDDEN_NAVEXPOSED = 1;
112
+ NAV_HIDDEN_NAVHIDDEN = 2;
113
+ }
114
+
115
+ enum Navigation {
116
+ NAVIGATION_UNSET = 0;
117
+ NAVIGATION_NONAV = 1;
118
+ NAVIGATION_DPAD = 2;
119
+ NAVIGATION_TRACKBALL = 3;
120
+ NAVIGATION_WHEEL = 4;
121
+ }
122
+
123
+ enum GrammaticalGender {
124
+ GRAM_GENDER_USET = 0;
125
+ GRAM_GENDER_NEUTER = 1;
126
+ GRAM_GENDER_FEMININE = 2;
127
+ GRAM_GENDER_MASCULINE = 3;
128
+ }
129
+
130
+ //
131
+ // Axis/dimensions that are understood by the runtime.
132
+ //
133
+
134
+ // Mobile country code.
135
+ uint32 mcc = 1;
136
+
137
+ // Mobile network code.
138
+ uint32 mnc = 2;
139
+
140
+ // BCP-47 locale tag.
141
+ string locale = 3;
142
+
143
+ // Left-to-right, right-to-left...
144
+ LayoutDirection layout_direction = 4;
145
+
146
+ // Screen width in pixels. Prefer screen_width_dp.
147
+ uint32 screen_width = 5;
148
+
149
+ // Screen height in pixels. Prefer screen_height_dp.
150
+ uint32 screen_height = 6;
151
+
152
+ // Screen width in density independent pixels (dp).
153
+ uint32 screen_width_dp = 7;
154
+
155
+ // Screen height in density independent pixels (dp).
156
+ uint32 screen_height_dp = 8;
157
+
158
+ // The smallest screen dimension, regardless of orientation, in dp.
159
+ uint32 smallest_screen_width_dp = 9;
160
+
161
+ // Whether the device screen is classified as small, normal, large, xlarge.
162
+ ScreenLayoutSize screen_layout_size = 10;
163
+
164
+ // Whether the device screen is long.
165
+ ScreenLayoutLong screen_layout_long = 11;
166
+
167
+ // Whether the screen is round (Android Wear).
168
+ ScreenRound screen_round = 12;
169
+
170
+ // Whether the screen supports wide color gamut.
171
+ WideColorGamut wide_color_gamut = 13;
172
+
173
+ // Whether the screen has high dynamic range.
174
+ Hdr hdr = 14;
175
+
176
+ // Which orientation the device is in (portrait, landscape).
177
+ Orientation orientation = 15;
178
+
179
+ // Which type of UI mode the device is in (television, car, etc.).
180
+ UiModeType ui_mode_type = 16;
181
+
182
+ // Whether the device is in night mode.
183
+ UiModeNight ui_mode_night = 17;
184
+
185
+ // The device's screen density in dots-per-inch (dpi).
186
+ uint32 density = 18;
187
+
188
+ // Whether a touchscreen exists, supports a stylus, or finger.
189
+ Touchscreen touchscreen = 19;
190
+
191
+ // Whether the keyboard hardware keys are currently hidden, exposed, or
192
+ // if the keyboard is a software keyboard.
193
+ KeysHidden keys_hidden = 20;
194
+
195
+ // The type of keyboard present (none, QWERTY, 12-key).
196
+ Keyboard keyboard = 21;
197
+
198
+ // Whether the navigation is exposed or hidden.
199
+ NavHidden nav_hidden = 22;
200
+
201
+ // The type of navigation present on the device
202
+ // (trackball, wheel, dpad, etc.).
203
+ Navigation navigation = 23;
204
+
205
+ // The minimum SDK version of the device.
206
+ uint32 sdk_version = 24;
207
+
208
+ // Grammatical gender.
209
+ GrammaticalGender grammatical_gender = 26;
210
+
211
+ //
212
+ // Build-time only dimensions.
213
+ //
214
+
215
+ string product = 25;
216
+ }