Skip to content

creat migration guide for version 1.0.28 #445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ dart:

install:
- git clone https://github.com/flutter/flutter.git -b stable --depth 1
- export PATH=./flutter/bin:$PATH
- export PATH=~/build/parse-community/Parse-SDK-Flutter/flutter/bin:$PATH
- flutter doctor

script:
- (cd packages/dart && dart pub get)
- (cd packages/dart && dart test test/)
- (cd packages/dart && pub get)
- (cd packages/dart && pub run test)
- (cd packages/flutter && flutter pub get)
- (cd packages/flutter && flutter test --no-pub test/)

Expand Down
49 changes: 49 additions & 0 deletions docs/migrate-1-0-28.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Migrate your Flutter application to version 1.0.28

Starting with version 1.0.28, this repository is now separated in a pure dart (parse_server_sdk) and a flutter package (parse_server_sdk_flutter).
This was done in order to provide a dart package for the parse-server, while keeping maintenance simple.
You can find both packages in the package directory.

### 1. pubspec.yaml
In your projects pubspec.yaml at the dependencies section, you have to change
```
dependencies:
parse_server_sdk: ^1.0.27
```
to
```
dependencies:
parse_server_sdk_flutter: ^1.0.28
```
This is the current released version of the parse_server_sdk_flutter package: [![pub package](https://img.shields.io/pub/v/parse_server_sdk_flutter.svg)](https://pub.dev/packages/parse_server_sdk_flutter)

### 2. imports
As the package name changed, you have to change
```
import 'package:parse_server_sdk/parse_server_sdk.dart';
```
to
```
import 'package:parse_server_sdk_flutter/parse_server_sdk.dart';
```
in every file.

It is recommended to do so by the replacement feature of your IDE.

### optional: provide app information on web
As flutter web is now in beta, this SDK aims to be web compatible.
But there are some parts completely different on web. For example, the wep-app cant determine it's name, version or packagename.
That's why you should provide this information on web.
```dart
Parse().initialize(
...
appName: kIsWeb ? "MyApplication" : null,
appVersion: kIsWeb ? "Version 1" : null,
appPackageName: kIsWeb ? "com.example.myapplication" : null,
);
```

### changed network library
In order to provide a `ProgressCallback` for heavy file operations,
the network library was switched from [http](https://pub.dev/packages/http) to [dio](https://pub.dev/packages/dio).
There should be no breaking changes regarding this change, except if you are overriding the `ParseHTTPClient`.
11 changes: 0 additions & 11 deletions example/.vscode/launch.json

This file was deleted.

Binary file removed example/android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
160 changes: 0 additions & 160 deletions example/android/gradlew

This file was deleted.

5 changes: 2 additions & 3 deletions packages/flutter/lib/parse_server_sdk.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,8 @@ class Parse extends sdk.Parse
parseUserConstructor: parseUserConstructor,
parseFileConstructor: parseFileConstructor,
connectivityProvider: connectivityProvider ?? this,
fileDirectory: fileDirectory ?? !sdk.parseIsWeb
? (await getTemporaryDirectory()).path
: null,
fileDirectory: fileDirectory ??
(!sdk.parseIsWeb ? (await getTemporaryDirectory()).path : null),
appResumedStream: appResumedStream ?? _appResumedStreamController.stream,
);
}
Expand Down