@livx.cc/appwrap 0.19.0
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/LICENSE +21 -0
- package/README.md +20 -0
- package/package.json +46 -0
- package/runtime/App_Resources/Android/app.gradle +34 -0
- package/runtime/App_Resources/Android/before-plugins.gradle +15 -0
- package/runtime/App_Resources/Android/src/main/AndroidManifest.xml +76 -0
- package/runtime/App_Resources/Android/src/main/res/drawable/ic_launcher_foreground.xml +15 -0
- package/runtime/App_Resources/Android/src/main/res/drawable-hdpi/background.png +0 -0
- package/runtime/App_Resources/Android/src/main/res/drawable-hdpi/logo.png +0 -0
- package/runtime/App_Resources/Android/src/main/res/drawable-ldpi/background.png +0 -0
- package/runtime/App_Resources/Android/src/main/res/drawable-ldpi/logo.png +0 -0
- package/runtime/App_Resources/Android/src/main/res/drawable-mdpi/background.png +0 -0
- package/runtime/App_Resources/Android/src/main/res/drawable-mdpi/logo.png +0 -0
- package/runtime/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml +8 -0
- package/runtime/App_Resources/Android/src/main/res/drawable-xhdpi/background.png +0 -0
- package/runtime/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png +0 -0
- package/runtime/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png +0 -0
- package/runtime/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png +0 -0
- package/runtime/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png +0 -0
- package/runtime/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png +0 -0
- package/runtime/App_Resources/Android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
- package/runtime/App_Resources/Android/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/runtime/App_Resources/Android/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/runtime/App_Resources/Android/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/runtime/App_Resources/Android/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/runtime/App_Resources/Android/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/runtime/App_Resources/Android/src/main/res/values/colors.xml +14 -0
- package/runtime/App_Resources/Android/src/main/res/values/ic_launcher_background.xml +4 -0
- package/runtime/App_Resources/Android/src/main/res/values/styles.xml +42 -0
- package/runtime/App_Resources/Android/src/main/res/values-v21/colors.xml +5 -0
- package/runtime/App_Resources/Android/src/main/res/values-v21/styles.xml +32 -0
- package/runtime/App_Resources/Android/src/main/res/values-v29/styles.xml +18 -0
- package/runtime/App_Resources/Android/src/main/res/xml/file_paths.xml +5 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json +122 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png +0 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png +0 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png +0 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png +0 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png +0 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png +0 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png +0 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png +0 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png +0 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png +0 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png +0 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png +0 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png +0 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png +0 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png +0 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/Contents.json +6 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json +23 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png +0 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png +0 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png +0 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json +23 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png +0 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png +0 -0
- package/runtime/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png +0 -0
- package/runtime/App_Resources/iOS/Info.plist +60 -0
- package/runtime/App_Resources/iOS/LaunchScreen.storyboard +53 -0
- package/runtime/App_Resources/iOS/Podfile +13 -0
- package/runtime/App_Resources/iOS/PrivacyInfo.xcprivacy +59 -0
- package/runtime/App_Resources/iOS/build.xcconfig +7 -0
- package/runtime/app/app.ts +58 -0
- package/runtime/app/main-page.ts +116 -0
- package/runtime/app/main-page.xml +10 -0
- package/runtime/app/shell/active-modules.generated.ts +9 -0
- package/runtime/app/shell/android-helpers.ts +76 -0
- package/runtime/app/shell/bridge.ts +99 -0
- package/runtime/app/shell/capabilities.manifest.ts +207 -0
- package/runtime/app/shell/config.ts +35 -0
- package/runtime/app/shell/custom-webview.android.ts +270 -0
- package/runtime/app/shell/custom-webview.ios.ts +258 -0
- package/runtime/app/shell/custom-webview.ts +17 -0
- package/runtime/app/shell/env.ts +81 -0
- package/runtime/app/shell/events.ts +100 -0
- package/runtime/app/shell/fcm-bootstrap.generated.ts +1 -0
- package/runtime/app/shell/fcm-firebase.d.ts +16 -0
- package/runtime/app/shell/fcm-service.android.ts +40 -0
- package/runtime/app/shell/fcm-service.ios.ts +3 -0
- package/runtime/app/shell/handlers-android.ts +417 -0
- package/runtime/app/shell/handlers-billing.ts +197 -0
- package/runtime/app/shell/handlers-extended.ts +405 -0
- package/runtime/app/shell/handlers-health.ts +134 -0
- package/runtime/app/shell/handlers-media.ts +126 -0
- package/runtime/app/shell/handlers-oauth.ts +69 -0
- package/runtime/app/shell/handlers-parity.ts +257 -0
- package/runtime/app/shell/handlers-push.ts +189 -0
- package/runtime/app/shell/handlers-system.ts +70 -0
- package/runtime/app/shell/handlers.ts +149 -0
- package/runtime/app/shell/ios-frameworks.d.ts +36 -0
- package/runtime/app/shell/ios-image.ts +15 -0
- package/runtime/app/shell/ios-ui-delegate.ts +131 -0
- package/runtime/app/shell/mime.ts +29 -0
- package/runtime/app/shell/native-log.ts +22 -0
- package/runtime/app/shell/optional-handlers.generated.ts +10 -0
- package/runtime/app/shell/orientation.ts +43 -0
- package/runtime/app/shell/status-bar.ts +129 -0
- package/runtime/app/shell/toast.ts +67 -0
- package/runtime/app/shell/web-quirks.ts +131 -0
- package/runtime/modules-native/health/App_Resources/Android/src/main/java/cc/livx/appwrap/HealthConnectBridge.kt +74 -0
- package/runtime/nativescript.config.ts +15 -0
- package/runtime/package.json +21 -0
- package/runtime/references.d.ts +2 -0
- package/runtime/tsconfig.json +19 -0
- package/runtime/webpack.config.js +27 -0
- package/scripts/stage-assets.mjs +21 -0
- package/src/cli.ts +1328 -0
- package/templates/ci/fastlane/Fastfile +43 -0
- package/templates/ci/fastlane/Matchfile +3 -0
- package/templates/ci/github/workflows/appwrap-pr.yml +28 -0
- package/templates/ci/github/workflows/appwrap-release-android.yml +51 -0
- package/templates/ci/github/workflows/appwrap-release-ios.yml +41 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# appwrap fastlane — emitted by `appwrap init` into native/fastlane/.
|
|
2
|
+
# Auth is App Store Connect API key only (headless-safe; no interactive Apple ID).
|
|
3
|
+
|
|
4
|
+
default_platform(:ios)
|
|
5
|
+
|
|
6
|
+
platform :ios do
|
|
7
|
+
desc 'Build the NativeScript wrapper and upload to TestFlight'
|
|
8
|
+
lane :beta do
|
|
9
|
+
api_key = app_store_connect_api_key(
|
|
10
|
+
key_id: ENV['ASC_KEY_ID'],
|
|
11
|
+
issuer_id: ENV['ASC_ISSUER_ID'],
|
|
12
|
+
key_content: ENV['ASC_KEY_P8'],
|
|
13
|
+
is_key_content_base64: true
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
match(type: 'appstore', readonly: true, git_url: ENV['MATCH_GIT_URL'], api_key: api_key)
|
|
17
|
+
|
|
18
|
+
sh('cd .. && ns prepare ios --release')
|
|
19
|
+
|
|
20
|
+
build_app(
|
|
21
|
+
workspace: 'platforms/ios/native.xcworkspace',
|
|
22
|
+
scheme: 'native',
|
|
23
|
+
export_method: 'app-store'
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
upload_to_testflight(api_key: api_key, skip_waiting_for_build_processing: true)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
platform :android do
|
|
31
|
+
desc 'Upload the appwrap-built AAB to Play (internal track). Build it first with `appwrap build android --release --aab`.'
|
|
32
|
+
lane :beta do
|
|
33
|
+
upload_to_play_store(
|
|
34
|
+
track: 'internal',
|
|
35
|
+
aab: 'platforms/android/app/build/outputs/bundle/release/app-release.aab',
|
|
36
|
+
json_key_data: ENV['PLAY_SERVICE_ACCOUNT_JSON'],
|
|
37
|
+
# Binary-only upload: listing/screenshots are managed in the Play Console, not CI.
|
|
38
|
+
skip_upload_metadata: true,
|
|
39
|
+
skip_upload_images: true,
|
|
40
|
+
skip_upload_screenshots: true
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# appwrap PR checks — emitted by `appwrap init`. Adjust build commands to your project.
|
|
2
|
+
name: PR
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
web:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
steps:
|
|
10
|
+
- uses: actions/checkout@v4
|
|
11
|
+
- uses: oven-sh/setup-bun@v2
|
|
12
|
+
- run: bun install
|
|
13
|
+
- run: bun test || echo "no tests"
|
|
14
|
+
- run: bun run build.ts # → dist/ (the PWA bundle the wrapper ships)
|
|
15
|
+
|
|
16
|
+
ios-build:
|
|
17
|
+
runs-on: macos-15
|
|
18
|
+
needs: web
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
- uses: oven-sh/setup-bun@v2
|
|
22
|
+
- uses: actions/setup-node@v4
|
|
23
|
+
with: { node-version: 22 }
|
|
24
|
+
- run: bun install && bun run build.ts
|
|
25
|
+
- run: npm i -g nativescript
|
|
26
|
+
- run: bunx appwrap init # native/ is generated (gitignored) — regenerate it fresh in CI
|
|
27
|
+
- working-directory: native
|
|
28
|
+
run: npm install && ns build ios --emulator
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# appwrap Android release — tag push (v*) → Play internal track.
|
|
2
|
+
# Build is the appwrap CLI (`appwrap build android --release --aab` → signed AAB);
|
|
3
|
+
# upload is fastlane supply. Secrets contract (repo settings → Actions secrets):
|
|
4
|
+
# ANDROID_KEYSTORE_BASE64 upload keystore, base64-encoded
|
|
5
|
+
# ANDROID_KEYSTORE_PASSWORD keystore store password
|
|
6
|
+
# ANDROID_KEY_ALIAS key alias
|
|
7
|
+
# ANDROID_KEY_ALIAS_PASSWORD key (alias) password
|
|
8
|
+
# PLAY_SERVICE_ACCOUNT_JSON Play Developer API service-account JSON (the app must already
|
|
9
|
+
# exist on Play with one prior manual upload before supply works)
|
|
10
|
+
name: Release Android
|
|
11
|
+
on:
|
|
12
|
+
push:
|
|
13
|
+
tags: ['v*']
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
play:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
- uses: oven-sh/setup-bun@v2
|
|
21
|
+
- uses: actions/setup-node@v4
|
|
22
|
+
with: { node-version: 22 }
|
|
23
|
+
- uses: actions/setup-java@v4
|
|
24
|
+
with: { distribution: temurin, java-version: 17 }
|
|
25
|
+
- uses: android-actions/setup-android@v3
|
|
26
|
+
- run: bun install && bun run build.ts # → dist/ (the PWA bundle the wrapper ships)
|
|
27
|
+
- run: npm i -g nativescript
|
|
28
|
+
- run: bunx appwrap init # native/ is generated (gitignored) — regenerate fresh in CI
|
|
29
|
+
- working-directory: native
|
|
30
|
+
run: npm install
|
|
31
|
+
- name: Decode upload keystore
|
|
32
|
+
run: echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 -d > "$RUNNER_TEMP/upload.keystore"
|
|
33
|
+
- name: Build signed AAB
|
|
34
|
+
env:
|
|
35
|
+
APPWRAP_ANDROID_KEYSTORE: ${{ runner.temp }}/upload.keystore
|
|
36
|
+
APPWRAP_ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
|
|
37
|
+
APPWRAP_ANDROID_KEYSTORE_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
|
|
38
|
+
APPWRAP_ANDROID_KEYSTORE_ALIAS_PASSWORD: ${{ secrets.ANDROID_KEY_ALIAS_PASSWORD }}
|
|
39
|
+
run: bunx appwrap build android --release --aab
|
|
40
|
+
- uses: actions/upload-artifact@v4 # keep the AAB even if Play upload is skipped
|
|
41
|
+
with:
|
|
42
|
+
name: app-release-aab
|
|
43
|
+
path: native/platforms/android/app/build/outputs/bundle/release/app-release.aab
|
|
44
|
+
- uses: ruby/setup-ruby@v1
|
|
45
|
+
with: { ruby-version: '3.3', bundler-cache: false }
|
|
46
|
+
- run: gem install fastlane
|
|
47
|
+
- name: Upload to Play (internal)
|
|
48
|
+
working-directory: native
|
|
49
|
+
env:
|
|
50
|
+
PLAY_SERVICE_ACCOUNT_JSON: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }}
|
|
51
|
+
run: fastlane android beta
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# appwrap iOS release — tag push (v*) → TestFlight via fastlane.
|
|
2
|
+
# Secrets contract (repo settings → Actions secrets):
|
|
3
|
+
# MATCH_GIT_URL private repo holding signing certs (fastlane match)
|
|
4
|
+
# MATCH_PASSWORD match encryption passphrase
|
|
5
|
+
# ASC_KEY_ID App Store Connect API key id
|
|
6
|
+
# ASC_ISSUER_ID App Store Connect issuer id
|
|
7
|
+
# ASC_KEY_P8 App Store Connect .p8 key contents (base64)
|
|
8
|
+
# No interactive Apple ID — API-key auth only (headless-safe).
|
|
9
|
+
name: Release iOS
|
|
10
|
+
on:
|
|
11
|
+
push:
|
|
12
|
+
tags: ['v*']
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
testflight:
|
|
16
|
+
runs-on: macos-15
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- uses: oven-sh/setup-bun@v2
|
|
20
|
+
- uses: actions/setup-node@v4
|
|
21
|
+
with: { node-version: 22 }
|
|
22
|
+
- run: bun install && bun run build.ts
|
|
23
|
+
- run: npm i -g nativescript
|
|
24
|
+
- run: bunx appwrap init # native/ is generated (gitignored) — regenerate it fresh in CI
|
|
25
|
+
- working-directory: native
|
|
26
|
+
run: npm install
|
|
27
|
+
- uses: ruby/setup-ruby@v1
|
|
28
|
+
with: { ruby-version: '3.3', bundler-cache: false }
|
|
29
|
+
- run: gem install fastlane
|
|
30
|
+
- name: Build & upload to TestFlight
|
|
31
|
+
working-directory: native
|
|
32
|
+
env:
|
|
33
|
+
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }}
|
|
34
|
+
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
|
|
35
|
+
ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }}
|
|
36
|
+
ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}
|
|
37
|
+
ASC_KEY_P8: ${{ secrets.ASC_KEY_P8 }}
|
|
38
|
+
run: fastlane ios beta
|
|
39
|
+
|
|
40
|
+
# Production promotion is a manual gate: re-run with the `production`
|
|
41
|
+
# environment approved, or promote the TestFlight build in App Store Connect.
|