Skip to content

Commit

Permalink
Updated project dependencies & improved the docs (#21)
Browse files Browse the repository at this point in the history
* Updated FVM and Github Actions config

* Updated package dependencies

* Added missing readme about adding Proguard config
Fixed the README formatting

* Updated changelog

* Updated publish jobs

* Job fix

* Updated Flutter constraint
Removed ignored file from git

* Github Actions cleanup
  • Loading branch information
PiotrMitkowski authored May 14, 2024
1 parent b2d0817 commit 879240c
Show file tree
Hide file tree
Showing 13 changed files with 208 additions and 106 deletions.
4 changes: 0 additions & 4 deletions .fvm/fvm_config.json

This file was deleted.

4 changes: 4 additions & 0 deletions .fvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"flutter": "3.19.6",
"flavors": {}
}
21 changes: 20 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@ on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+*'

env:
FLUTTER_VERSION: 3.19.6

jobs:
publish:
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
name: 'Publish to pub.dev'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install and set Flutter version
uses: subosito/flutter-action@v2.4.0
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: stable
cache: true
- name: Install dependencies
run: flutter pub get
- name: Publish - dry run
run: flutter pub publish --dry-run
- name: Publish to pub.dev
run: flutter pub publish -f
31 changes: 23 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,29 @@ name: Run tests and static checks

on:
push:
branches:
- main
branches:
- main
pull_request:
branches:
- main
- main
workflow_dispatch:

env:
FLUTTER_VERSION: 3.19.6

jobs:
tests:
runs-on: ubuntu-latest

steps:
- name: Checkout the code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install and set Flutter version
uses: subosito/flutter-action@v2.4.0
with:
flutter-version: '3.13.6'
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: stable
cache: true
- name: Restore packages
run: flutter pub get
- name: Generate required files
Expand All @@ -28,6 +33,16 @@ jobs:
run: flutter analyze
- name: Run tests
run: flutter test --coverage



validate-for-pub:
name: "Perform dry run for pub.dev publish"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install and set Flutter version
uses: subosito/flutter-action@v2.4.0
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: stable
cache: true
- name: Publish - dry run
run: flutter pub publish --dry-run
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ migrate_working_dir/
build/

#Flutter Version Manager - https://fvm.app/docs/getting_started/overview
.fvm/flutter_sdk

# Generated files related
*.g.dart
*.freezed.dart
*.mocks.dart

# Test coverage
coverage/
coverage/

# FVM Version Cache
.fvm/
20 changes: 9 additions & 11 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{
"dart.flutterSdkPath": ".fvm/flutter_sdk",
// Remove .fvm files from search
"search.exclude": {
"**/.fvm": true
},
// Remove from file watching
"files.watcherExclude": {
"**/.fvm": true
},
"java.configuration.updateBuildConfiguration": "automatic"
}
"dart.flutterSdkPath": ".fvm/versions/3.19.6",
"search.exclude": {
"**/.fvm": true
},
"files.watcherExclude": {
"**/.fvm": true
},
"java.configuration.updateBuildConfiguration": "automatic"
}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.3.0

* Updated the project to match Flutter 3.19.6
* Added Proguard config section in the Readme

## 0.2.0

* Updated the project to match Flutter 3.13.6
Expand Down
46 changes: 36 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,50 +12,74 @@ The plugin has been built by Flutter Division at [Miquido Software development c
## Getting started 🚢

Add the dependency in your `pubspec.yaml`:
- from command line:

- from command line:

```bash
flutter pub add ar_quido
flutter pub get
```

- directly in pubspec.yaml:

```yaml
dependencies:
ar_quido: 0.2.0
```
### Android
Since the Android version depends on the EasyAR solution, you need to
[sign up](https://www.easyar.com/view/signUp.html) on their page and obtain
[sign up](https://www.easyar.com/view/signUp.html) on their page and obtain
a "Sense Authorization" License Key. It can be done through the [EasyAR Dashboard](https://portal.easyar.com/sdk/list).
After doing so, provide the key in Android Manifest file as
After doing so, provide the key in Android Manifest file as
`application`'s metadata:

```xml
<meta-data
android:name="com.miquido.ar_quido.API_KEY"
android:value="<YOUR_SENSE_LICENSE_KEY>" />
```

#### Proguard

By default, proguard removes the EasyAR library files from a release build. To fix
this, add the following code to the `android/app/src/proguard-rules.pro` file (create
the file if it doesn't exist):

```proguard
-keep class cn.easyar.** { *; }
-keepattributes SourceFile,LineNumberTable
-keep public class * extends java.lang.Exception
```

### iOS

`ARKit` uses the device camera, so do not forget to provide the `NSCameraUsageDescription`
in Info.plist:

```xml
<key>NSCameraUsageDescription</key>
<string>Describe why your app needs camera (AR) here.</string>
```

Also make sure, that your deployment target in project settings is set to at least 14.0.
Set the same version in `ios/Podfile`:

```ruby
platform :ios, '14.0'
platform :ios, '15.0'
```

## Usage 🌴
1. Put your reference images inside `assets/reference_images` directory (make

1. Put your reference images inside `assets/reference_images` directory (make
sure to reference them in `pubspec.yaml`).
- please note, that only `.jpg` images are supported at this time
2. Place `ARQuidoView` widget in your view's code. Provide at least an array of
image names you want to detect (through `referenceImageNames` property) and a
image names you want to detect (through `referenceImageNames` property) and a
callback for detected images (through `onImageDetected` property):

```dart
ARQuidoView(
referenceImageNames: const ['applandroid'],
Expand All @@ -64,24 +88,26 @@ callback for detected images (through `onImageDetected` property):
},
),
```

3. That's it, you're all set ⚓

Please see the [example](https://github.com/miquido/AR_quido/tree/main/example)
for more info. You can also check the details in [API Documentation](https://pub.dev/documentation/ar_quido/latest/).

## Disclaimer
"EasyAR" is the registered trademark or trademark of VisionStar Information

"EasyAR" is the registered trademark or trademark of VisionStar Information
Technology (Shanghai) Co., Ltd in China and other countries for the augmented
reality technology developed by VisionStar Information Technology (Shanghai) Co., Ltd.

The copyright notices in the Software and this entire statement, including the above
license grant, this restriction and the following disclaimer, must be included
license grant, this restriction and the following disclaimer, must be included
in all copies of the Software, in whole or in part, and all derivative works
of the Software.


---
#### About Miquido

- [About](https://careers.miquido.com/about-us/)
- [Careers](https://careers.miquido.com/job-offers/)
- [Internship at Miquido](https://careers.miquido.com/students/)
- [Internship at Miquido](https://careers.miquido.com/students/)
2 changes: 1 addition & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '13.0'
platform :ios, '15.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
Loading

0 comments on commit 879240c

Please sign in to comment.