Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Commit 61ada9f

Browse files
authored
onboarding on iOS (#6)
* rebranding and major refactoring * flutter upgrade * include icons * integrate sentry * fix ocfclient * add localization * set launch screen * localization fixes
1 parent a7df58d commit 61ada9f

111 files changed

Lines changed: 2494 additions & 1334 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,7 @@ app.*.symbols
111111
!**/ios/**/default.pbxuser
112112
!**/ios/**/default.perspectivev3
113113
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
114-
!/dev/ci/**/Gemfile.lock
114+
!/dev/ci/**/Gemfile.lock
115+
116+
# OCF Client
117+
**/ios/Frameworks/OCFClient.framework/*

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
# Go-OCF Onboarding App
1+
# plgd mobile client
2+
3+
## Build
4+
- localization files
5+
`flutter pub run intl_translation:generate_from_arb --output-dir=lib/l10n --no-use-deferred-loading lib/appLocalizations.dart lib/l10n/intl_*.arb`

android/app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

2828
android {
29-
compileSdkVersion 28
29+
compileSdkVersion 29
3030

3131
sourceSets {
3232
main.java.srcDirs += 'src/main/kotlin'
@@ -38,9 +38,9 @@ android {
3838

3939
defaultConfig {
4040
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41-
applicationId "com.example.my_app"
41+
applicationId "dev.plgd.client"
4242
minSdkVersion 16
43-
targetSdkVersion 28
43+
targetSdkVersion 29
4444
versionCode flutterVersionCode.toInteger()
4545
versionName flutterVersionName
4646
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

android/app/src/debug/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.my_app">
2+
package="dev.plgd.client">
33
<!-- Flutter needs it to communicate with the running application
44
to allow setting breakpoints, to provide hot reload, etc.
55
-->

android/app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.my_app">
2+
package="dev.plgd.client">
33
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
44
calls FlutterMain.startInitialization(this); in its onCreate method.
55
In most cases you can leave this as-is, but you if you want to provide
66
additional functionality it is fine to subclass or reimplement
77
FlutterApplication and put your custom class here. -->
88
<application
99
android:name="io.flutter.app.FlutterApplication"
10-
android:label="my_app"
10+
android:label="plgd"
1111
android:icon="@mipmap/ic_launcher">
1212
<activity
1313
android:name=".MainActivity"
@@ -27,4 +27,5 @@
2727
android:name="flutterEmbedding"
2828
android:value="2" />
2929
</application>
30+
<uses-permission android:name="android.permission.INTERNET"/>
3031
</manifest>

android/app/src/main/kotlin/com/example/my_app/MainActivity.kt

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.example.my_app
1+
package dev.plgd.client
22

33
import androidx.annotation.NonNull
44
import io.flutter.embedding.android.FlutterActivity
@@ -7,7 +7,7 @@ import io.flutter.plugins.GeneratedPluginRegistrant
77
import io.flutter.plugin.common.MethodChannel
88

99
class MainActivity: FlutterActivity() {
10-
private val CHANNEL = "gocf.dev/sdk"
10+
private val CHANNEL = "plgd.dev/sdk"
1111
private var sdkClient: ocfclient.Ocfclient_? = null;
1212

1313
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
@@ -18,7 +18,6 @@ class MainActivity: FlutterActivity() {
1818
"discover" -> this.discoverDevices(result)
1919
"own" -> this.ownDevice(call.arguments(), result)
2020
"onboard" -> this.onboardDevice(call.arguments(), result)
21-
"offboard" -> this.offboardDevice(call.arguments(), result)
2221
"disown" -> this.disownDevice(call.arguments(), result)
2322
else -> result.notImplemented()
2423
}
@@ -66,15 +65,6 @@ class MainActivity: FlutterActivity() {
6665
}
6766
}
6867

69-
private fun offboardDevice(args: Map<String,String>?, result: MethodChannel.Result) {
70-
try {
71-
sdkClient!!.offboardDevice(args!!["deviceID"])
72-
result.success(Any())
73-
} catch (e: Exception) {
74-
result.error("-1", e.message, "")
75-
}
76-
}
77-
7868
private fun disownDevice(args: Map<String,String>?, result: MethodChannel.Result) {
7969
try {
8070
sdkClient!!.disownDevice(args!!["deviceID"])
4.43 KB
Loading
-544 Bytes
Binary file not shown.
2.71 KB
Loading
-442 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)