Skip to content

Commit

Permalink
Add implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
robingenz committed Jul 29, 2024
1 parent 22cfa27 commit 0b9d93d
Show file tree
Hide file tree
Showing 8 changed files with 124 additions and 16 deletions.
7 changes: 6 additions & 1 deletion capacitor.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ import type { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = {
appId: 'io.ionic.starter',
appName: 'capacitor-live-update-demo',
webDir: 'www'
webDir: 'www',
plugins: {
LiveUpdate: {
appId: 'c6dd52ad-c8e9-49cd-bc63-c516d601f17f',
}
}
};

export default config;
10 changes: 10 additions & 0 deletions ios/App/App.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions ios/App/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ install! 'cocoapods', :disable_input_output_paths => true
def capacitor_pods
pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app'
pod 'CapacitorHaptics', :path => '../../node_modules/@capacitor/haptics'
pod 'CapacitorKeyboard', :path => '../../node_modules/@capacitor/keyboard'
pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar'
pod 'CapawesomeCapacitorLiveUpdate', :path => '../../node_modules/@capawesome/capacitor-live-update'
end

target 'App' do
Expand Down
63 changes: 63 additions & 0 deletions ios/App/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
PODS:
- Alamofire (5.9.1)
- Capacitor (6.1.1):
- CapacitorCordova
- CapacitorApp (6.0.0):
- Capacitor
- CapacitorCordova (6.1.1)
- CapacitorHaptics (6.0.0):
- Capacitor
- CapacitorKeyboard (6.0.1):
- Capacitor
- CapacitorStatusBar (6.0.0):
- Capacitor
- CapawesomeCapacitorLiveUpdate (6.2.0):
- Alamofire (~> 5.9.0)
- Capacitor
- SSZipArchive (~> 2.2)
- SSZipArchive (2.4.3)

DEPENDENCIES:
- "Capacitor (from `../../node_modules/@capacitor/ios`)"
- "CapacitorApp (from `../../node_modules/@capacitor/app`)"
- "CapacitorCordova (from `../../node_modules/@capacitor/ios`)"
- "CapacitorHaptics (from `../../node_modules/@capacitor/haptics`)"
- "CapacitorKeyboard (from `../../node_modules/@capacitor/keyboard`)"
- "CapacitorStatusBar (from `../../node_modules/@capacitor/status-bar`)"
- "CapawesomeCapacitorLiveUpdate (from `../../node_modules/@capawesome/capacitor-live-update`)"

SPEC REPOS:
trunk:
- Alamofire
- SSZipArchive

EXTERNAL SOURCES:
Capacitor:
:path: "../../node_modules/@capacitor/ios"
CapacitorApp:
:path: "../../node_modules/@capacitor/app"
CapacitorCordova:
:path: "../../node_modules/@capacitor/ios"
CapacitorHaptics:
:path: "../../node_modules/@capacitor/haptics"
CapacitorKeyboard:
:path: "../../node_modules/@capacitor/keyboard"
CapacitorStatusBar:
:path: "../../node_modules/@capacitor/status-bar"
CapawesomeCapacitorLiveUpdate:
:path: "../../node_modules/@capawesome/capacitor-live-update"

SPEC CHECKSUMS:
Alamofire: f36a35757af4587d8e4f4bfa223ad10be2422b8c
Capacitor: 8941aba4364ba9d1b22188569001f2ce45cc2b00
CapacitorApp: 9d53aec7101f7b030a950c5bdc4df8612576b279
CapacitorCordova: 8f2cc8d8d3619c566e9418fe8772064a94266106
CapacitorHaptics: 9ebc9363f0e9b8eb4295088a0b474530acf1859b
CapacitorKeyboard: 5f32a712adf41e07a61caafb82cf29fb6d8ba123
CapacitorStatusBar: 2e4369f99166125435641b1908d05f561eaba6f6
CapawesomeCapacitorLiveUpdate: 236d3415d86ae2fa15ecf566e7a265bb2de734f9
SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef

PODFILE CHECKSUM: 8419065c73c622d3d930ec3f42168ce17c237fd1

COCOAPODS: 1.15.2
19 changes: 19 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@capacitor/ios": "^6.1.1",
"@capacitor/keyboard": "6.0.1",
"@capacitor/status-bar": "6.0.0",
"@capawesome/capacitor-live-update": "^6.2.0",
"@ionic/angular": "^8.0.0",
"ionicons": "^7.2.1",
"rxjs": "~7.8.0",
Expand Down
18 changes: 5 additions & 13 deletions src/app/home/home.page.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
<ion-header [translucent]="true">
<ion-header>
<ion-toolbar>
<ion-title>
Blank
Demo
</ion-title>
</ion-toolbar>
</ion-header>

<ion-content [fullscreen]="true">
<ion-header collapse="condense">
<ion-toolbar>
<ion-title size="large">Blank</ion-title>
</ion-toolbar>
</ion-header>

<div id="container">
<strong>Ready to create an app?</strong>
<p>Start with Ionic <a target="_blank" rel="noopener noreferrer" href="https://ionicframework.com/docs/components">UI Components</a></p>
</div>
<ion-content>
<ion-button (click)="onClick()">Submit</ion-button>
<ion-button (click)="onSync()">Sync</ion-button>
</ion-content>
17 changes: 15 additions & 2 deletions src/app/home/home.page.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
import { Component } from '@angular/core';
import { IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/angular/standalone';
import { IonHeader, IonToolbar, IonTitle, IonContent, IonButton } from '@ionic/angular/standalone';
import { LiveUpdate } from '@capawesome/capacitor-live-update';

@Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
standalone: true,
imports: [IonHeader, IonToolbar, IonTitle, IonContent],
imports: [IonHeader, IonToolbar, IonTitle, IonContent, IonButton],
})
export class HomePage {
constructor() {}

public onClick(): void {
alert('Ooops! An error occurred.');
// alert('Hello World!');
}

public async onSync(): Promise<void> {
const result = await LiveUpdate.sync();
if (result.nextBundleId) {
await LiveUpdate.reload();
}
}
}

0 comments on commit 0b9d93d

Please sign in to comment.