A wrapper around our Cocoa and Java client library SDKs, providing iOS and Android support for those using Flutter and Dart.

Overview

Ably Flutter Plugin

.github/workflows/check.yaml .github/workflows/docs.yml .github/workflows/flutter_integration.yaml

A Flutter plugin wrapping the ably-cocoa (iOS) and ably-java (Android) client library SDKs for Ably, the platform that powers synchronized digital experiences in realtime.

Ably provides the best infrastructure and APIs to power realtime experiences at scale, delivering billions of realtime messages everyday to millions of end users. We handle the complexity of realtime messaging so you can focus on your code.

Resources

Supported Platforms

iOS

iOS 10 or newer.

Android

API Level 19 (Android 4.4, KitKat) or newer.

This project uses Java 8 language features, utilising Desugaring to support lower versions of the Android runtime (i.e. API Levels prior to 24)

If your project needs support for SDK Version lower than 24, Android Gradle Plugin 4.0.0+ must be used. You might also need to upgrade gradle distribution accordingly.

Known Limitations

Features that we do not currently support, but we do plan to add in the future:

  • Ably token generation (#105)
  • REST and Realtime Stats (#106)
  • Custom transportParams (#108)
  • Push Notifications Admin (#109)
  • Remember fallback host during failures (#47)

Example app

Running example app

  • To run the example app, you need an Ably API key. Create a free account on ably.com and then use your API key from there in the example app.
  • Clone the project

Android Studio / IntelliJ Idea

Under the run/ debug configuration drop down menu, click Edit Configurations.... Duplicate the Example App (Duplicate and modify) configuration. Leave the "Store as project file" unchecked to avoid committing your Ably API key into a repository. Update this new run configuration's additional run args with your ably API key. Run or debug the your new run/ debug configuration.

Drop down menu for Run/Debug Configurations in Android Studio

Run/Debug Configurations window in Android Studio

Visual Studio Code

  • Under Run and Debug,
    • Select the gear icon to view launch.json
    • Add your Ably API key to the configurations.args, i.e. replace replace_with_your_api_key with your own Ably API key.
    • To choose a specific device when more than one are connected: to launch on a specific device, make sure it is the only device plugged in. To run on a specific device when you have multiple plugged in, add another element to the configuration.args value, with --device-id=replace_with_device_id
      • Make sure to replace replace_with_your_device with your device ID from flutter devices
  • select the example configuration

Command Line using the Flutter Tool

  • Change into the example app directory: cd example
  • Install dependencies: flutter pub get
  • Launch the application: flutter run --dart-define ABLY_API_KEY=put_your_ably_api_key_here, remembering to replace put_your_ably_api_key_here with your own API key.
    • To choose a specific device when more than one are connected: get your device ID using flutter devices, and then running flutter run --dart-define=ABLY_API_KEY=put_your_ably_api_key_here --device-id replace_with_device_id

Push Notifications

See PushNotifications.md for detailed information on getting PN working with the example app.

Troubleshooting

  • Running on simulator on M1 macs:
    • Flutter has added support for running apps on the iOS simulator running on M1 architecture, but this is not yet available on the stable branch. In the mean time, you can change the iOS target to build for Mac in Xcode.
  • fatal error: 'ruby/config.h' file not found: Ruby is required to install cocoapods and other tools which are used in the build process, and your machine may not have a supported version. To install an up-to-date version of Ruby:

Usage

Specify Dependency

Package home: pub.dev/packages/ably_flutter

See: Adding a package dependency to an app

Import the package

import 'package:ably_flutter/ably_flutter.dart' as ably;

Configure a Client Options object

For guidance on selecting an authentication method (basic authentication vs. token authentication), read Selecting an authentication mechanism.

Authenticating using basic authentication/ API key (for running example app/ test apps and not for production)

// Specify your apiKey with `flutter run --dart-define=ABLY_API_KEY=replace_your_api_key`
final String ablyApiKey = const String.fromEnvironment("ABLY_API_KEY");
final clientOptions = ably.ClientOptions.fromKey(ablyApiKey);
clientOptions.logLevel = ably.LogLevel.verbose;  // optional

Authenticating using token authentication

// Used to create a clientId when a client first doesn't have one. 
// Note: you should implement `createTokenRequest`, which makes a request to your server that uses your Ably API key directly.
final clientOptions = ably.ClientOptions()
  // If a clientId was set in ClientOptions, it will be available in the authCallback's first parameter (ably.TokenParams).
  ..clientId = _clientId
  ..authCallback = (ably.TokenParams tokenParams) async {
    try {
      // Send the tokenParamsMap (Map<String, dynamic>) to your server, using it to create a TokenRequest.
      final Map<String, dynamic> tokenRequestMap = await createTokenRequest(
              tokenParams.toMap());
      return ably.TokenRequest.fromMap(tokenRequestMap);
    } on http.ClientException catch (e) {
      print('Failed to createTokenRequest: $e');
      rethrow;
    }
  };
final realtime = ably.Realtime(options: clientOptions);

An example of createTokenRequest's implementation making a network request to your server could be:

Future<Map<String, dynamic>> createTokenRequest(
    Map<String, dynamic> tokenParamsMap) async {
  var url = Uri.parse('https://example.com/api/v1/createTokenRequest');
  // For debugging:
  bool runningServerLocally = true;
  if (runningServerLocally) {
    if (Platform.isAndroid) { // Connect Android device to local server
      url = Uri.parse(
          'http://localhost:6001/api/v1/createTokenRequest');
    } else if (Platform.isIOS) { // Connect iOS device to local server
      const localDeviceIPAddress = '192.168.1.9';
      url = Uri.parse(
          'http://$localDeviceIPAddress:6001/api/v1/createTokenRequest');
    }
  }

  final response = await http.post(url, body: tokenParamsMap);
  return jsonDecode(response.body) as Map<String, dynamic>;
}
  • Android: To connect to a local server running on a computer from an Android device, you can redirect the port on your device to the port the application is hosted on on your computer. For example, if you want to connect to a local server running at localhost:3000 but connect from Android from localhost:80 Run adb reverse tcp:80 tcp:3000.
  • iOS: To connect to a local server running on a computer using http on iOS for debugging, you will need to explicitly enable this in your Info.plist file, by following Transport security has blocked a cleartext HTTP. To allow devices to connect from the IP address of your device, you need your server to listen on 0.0.0.0 instead of 127.0.0.1.

Using the REST API

Creating the REST client instance:

ably.Rest rest = ably.Rest(options: clientOptions);

Getting a channel instance

ably.RestChannel channel = rest.channels.get('test');

Publishing messages using REST:

// both name and data
await channel.publish(name: "Hello", data: "Ably");

// just name
await channel.publish(name: "Hello");

// just data
await channel.publish(data: "Ably");

// an empty message
await channel.publish();

Get REST history:

void getHistory([ably.RestHistoryParams params]) async {
  // getting channel history, by passing or omitting the optional params
  var result = await channel.history(params);

  var messages = result.items;        // get messages
  var hasNextPage = result.hasNext(); // tells whether there are more results
  if (hasNextPage) {    
    result = await result.next();     // will fetch next page results
    messages = result.items;
  }
  if (!hasNextPage) {
    result = await result.first();    // will fetch first page results
    messages = result.items;
  }
}

// history with default params
getHistory();

// sorted and filtered history
getHistory(ably.RestHistoryParams(direction: 'forwards', limit: 10));

Get REST Channel Presence:

void getPresence([ably.RestPresenceParams params]) async {
  // getting channel presence members, by passing or omitting the optional params
  var result = await channel.presence.get(params);

  var presenceMembers = result.items; // returns PresenceMessages
  var hasNextPage = result.hasNext(); // tells whether there are more results
  if (hasNextPage) {
    result = await result.next();     // will fetch next page results
    presenceMembers = result.items;
  }
  if (!hasNextPage) {
    result = await result.first();    // will fetch first page results
    presenceMembers = result.items;
  }
}

// getting presence members with default params
getPresence();

// filtered presence members
getPresence(ably.RestPresenceParams(
  limit: 10,
  clientId: '<clientId>',
  connectionId: '<connectionID>',
));

Get REST Presence History:

void getPresenceHistory([ably.RestHistoryParams params]) async {

  // getting channel presence history, by passing or omitting the optional params
  var result = await channel.presence.history(params);

  var presenceHistory = result.items; // returns PresenceMessages
  var hasNextPage = result.hasNext(); // tells whether there are more results
  if (hasNextPage) {
    result = await result.next();     // will fetch next page results
    presenceHistory = result.items;
  }
  if (!hasNextPage) {
    result = await result.first();    // will fetch first page results
    presenceHistory = result.items;
  }
}

// getting presence members with default params
getPresenceHistory();

// filtered presence members
getPresenceHistory(ably.RestHistoryParams(direction: 'forwards', limit: 10));

Using the Realtime API

Creating the Realtime client instance:

ably.Realtime realtime = ably.Realtime(options: clientOptions);

Listening for connection state change events:

realtime.connection
  .on()
  .listen((ably.ConnectionStateChange stateChange) async {
    print('Realtime connection state changed: ${stateChange.event}');
    setState(() {
      _realtimeConnectionState = stateChange.current;
    });
});

Listening for a particular connection state change event (e.g. connected):

realtime.connection
  .on(ably.ConnectionEvent.connected)
  .listen((ably.ConnectionStateChange stateChange) async {
    print('Realtime connection state changed: ${stateChange.event}');
    setState(() {
      _realtimeConnectionState = stateChange.current;
    });
});

Creating a Realtime channel instance:

ably.RealtimeChannel channel = realtime.channels.get('channel-name');

Listening for channel events:

channel.on().listen((ably.ChannelStateChange stateChange) {
  print("Channel state changed: ${stateChange.current}");
});

Attaching to the channel:

await channel.attach();

Detaching from the channel:

await channel.detach();

Subscribing to messages on the channel:

var messageStream = channel.subscribe();
var channelMessageSubscription = messageStream.listen((ably.Message message) {
  print("New message arrived ${message.data}");
});

Use channel.subscribe(name: "event1") or channel.subscribe(names: ["event1", "event2"]) to listen to specific named messages.

UnSubscribing from receiving messages on the channel:

await channelMessageSubscription.cancel();

Publishing channel messages

// both name and data
await channel.publish(name: "event1", data: "hello world");
await channel.publish(name: "event1", data: {"hello": "world", "hey": "ably"});
await channel.publish(name: "event1", data: [{"hello": {"world": true}, "ably": {"serious": "realtime"}]);

// single message
await channel.publish(message: ably.Message()..name = "event1"..data = {"hello": "world"});

// multiple messages
await channel.publish(messages: [
  ably.Message()..name="event1"..data = {"hello": "ably"},
  ably.Message()..name="event1"..data = {"hello": "world"}
]);

Get Realtime history

void getHistory([ably.RealtimeHistoryParams params]) async {
  var result = await channel.history(params);

  var messages = result.items;        // get messages
  var hasNextPage = result.hasNext(); // tells whether there are more results
  if (hasNextPage) {    
    result = await result.next();     // will fetch next page results
    messages = result.items;
  }
  if (!hasNextPage) {
    result = await result.first();    // will fetch first page results
    messages = result.items;
  }
}

// history with default params
getHistory();

// sorted and filtered history
getHistory(ably.RealtimeHistoryParams(direction: 'forwards', limit: 10));

Enter Realtime Presence:

await channel.presence.enter();

// with data
await channel.presence.enter("hello");
await channel.presence.enter([1, 2, 3]);
await channel.presence.enter({"key": "value"});

// with Client ID
await channel.presence.enterClient("user1");

// with Client ID and data
await channel.presence.enterClient("user1", "hello");
await channel.presence.enterClient("user1", [1, 2, 3]);
await channel.presence.enterClient("user1", {"key": "value"});

Update Realtime Presence:

await channel.presence.update();

// with data
await channel.presence.update("hello");
await channel.presence.update([1, 2, 3]);
await channel.presence.update({"key": "value"});

// with Client ID
await channel.presence.updateClient("user1");

// with Client ID and data
await channel.presence.updateClient("user1", "hello");
await channel.presence.updateClient("user1", [1, 2, 3]);
await channel.presence.updateClient("user1", {"key": "value"});

Leave Realtime Presence:

await channel.presence.leave();

// with data
await channel.presence.leave("hello");
await channel.presence.leave([1, 2, 3]);
await channel.presence.leave({"key": "value"});

// with Client ID
await channel.presence.leaveClient("user1");

// with Client ID and data
await channel.presence.leaveClient("user1", "hello");
await channel.presence.leaveClient("user1", [1, 2, 3]);
await channel.presence.leaveClient("user1", {"key": "value"});

Get Realtime Presence members:

var presenceMessages = await channel.presence.get();

// filter by Client Id
var presenceMessages = await channel.presence.get(
  ably.RealtimePresenceParams(
    clientId: 'clientId',
  ),
);

// filter by Connection Id
var presenceMessages = await channel.presence.get(
  ably.RealtimePresenceParams(
    connectionId: 'connectionId',
  ),
);

Get Realtime Presence history

void getPresenceHistory([ably.RealtimeHistoryParams params]) async {
  var result = await channel.presence.history(params);

  var messages = result.items;        // get messages
  var hasNextPage = result.hasNext(); // tells whether there are more results
  if (hasNextPage) {    
    result = await result.next();     // will fetch next page results
    messages = result.items;
  }
  if (!hasNextPage) {
    result = await result.first();    // will fetch first page results
    messages = result.items;
  }
}

// presence history with default params
getPresenceHistory();

// sorted and filtered history
getPresenceHistory(ably.RealtimeHistoryParams(direction: 'forwards', limit: 10));

Subscribe to Realtime Presence messages

// subscribe for all presence actions
channel
  .presence
  .subscribe()
  .listen((presenceMessage) {
    print(presenceMessage);
  },
);

// subscribe for specific action
channel
  .presence
  .subscribe(action: PresenceAction.enter)
  .listen((presenceMessage) {
    print(presenceMessage);
  },
);

// subscribe for multiple actions
channel
  .presence
  .subscribe(actions: [
    PresenceAction.enter,
    PresenceAction.update,
  ])
  .listen((presenceMessage) {
    print(presenceMessage);
  },
);

Symmetric Encryption

When a key is provided to the library, the data attribute of all messages is encrypted and decrypted automatically using that key. The secret key is never transmitted to Ably. See https://www.ably.com/documentation/realtime/encryption.

  1. Create a key by calling ably.Crypto.generateRandomKey() (or retrieve one from your server using your own secure API). The same key needs to be used to encrypt and decrypt the messages.
  2. Create a CipherParams instance by passing a key to final cipherParams = await ably.Crypto.getDefaultParams(key: key); - the key can be a Base64-encoded String, or a Uint8List
  3. Create a RealtimeChannelOptions or RestChannelOptions from this key: e.g. final channelOptions = ably.RealtimeChannelOptions(cipher: cipherParams);. Alternatively, if you are only setting CipherParams on ChannelOptions, you could skip creating the CipherParams instance: ably.RestChannelOptions.withCipherKey(cipherKey) or ably.RealtimeChannelOptions.withCipherKey(cipherKey).
  4. Set these options on your channel: realtimeClient.channels.get(channelName).setOptions(channelOptions);
  5. Use your channel as normal, such as by publishing messages or subscribing for messages.

Overall, it would like this:

final key = ...; // from your server, from password or create random
final cipherParams = ably.Crypto.getDefaultParams(key: key);
final channelOptions = ably.RealtimeChannelOptions(cipherParams: cipherParams);
final channel = realtime.channels.get("your channel name");
await channel.setOptions(channelOptions);

Take a look at encrypted_message_service.dart for an example of how to implement end-to-end encrypted messages over Ably. There are several options to choose from when you have decided to your encrypt your messages.

Push Notifications

See PushNotifications.md for detailed information on using PN with this plugin.

Caveats

RTE6a compliance

Using the Streams based approach doesn't fully conform with RTE6a from our client library features specification.

The Problem

StreamSubscription subscriptionToBeCancelled;

// Listener registered 1st
realtime.connection.on().listen((ably.ConnectionStateChange stateChange) async {
  if (stateChange.event == ably.ConnectionEvent.connected) {
    await subscriptionToBeCancelled.cancel();       // Cancelling 2nd listener
  }
});

// Listener registered 2nd
subscriptionToBeCancelled = realtime.connection.on().listen((ably.ConnectionStateChange stateChange) async {
  print('State changed');
});

In the example above, the 2nd listener is cancelled when the 1st listener is notified about the "connected" event. As per RTE6a, the 2nd listener should also be triggered. It will not be as the 2nd listener was registered after the 1st listener and stream subscription is cancelled immediately after 1st listener is triggered.

This wouldn't have happened if the 2nd listener had been registered before the 1st was.

However, using a neat little workaround will fix this...

The Workaround - Cancelling using delay

Instead of await subscriptionToBeCancelled.cancel();, use

Future.delayed(Duration.zero, () {
    subscriptionToBeCancelled.cancel();
});

Contributing

For guidance on how to contribute to this project, see CONTRIBUTING.md.

Comments
  • Swift Compiler Error (Xcode): Definition conflicts with previous value

    Swift Compiler Error (Xcode): Definition conflicts with previous value

    I'm receiving the following errors while trying to build with Flutter 2.10.3, XCode 12.3:

    {code} Could not build the precompiled application for the device. Uncategorized (Xcode): Command CompileSwift failed with a nonzero exit code

    Swift Compiler Error (Xcode): Definition conflicts with previous value /Users/TheManuz/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.12/ios/Classes/handlers/PushHandlers.swift:203:18 2

    Swift Compiler Error (Xcode): Definition conflicts with previous value /Users/TheManuz/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.12/ios/Classes/handlers/PushHandlers.swift:207:18 2

    Swift Compiler Error (Xcode): Unable to infer closure type in the current context /Users/TheManuz/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.12/ios/Classes/handlers/PushHandlers.swift:27:152 2

    Swift Compiler Error (Xcode): Value of optional type 'NSNumber?' must be unwrapped to a value of type 'NSNumber' /Users/TheManuz/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.12/ios/Classes/handlers/PushHandlers.swift:212:52 2

    Swift Compiler Error (Xcode): Value of optional type 'NSNumber?' must be unwrapped to a value of type 'NSNumber' /Users/TheManuz/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.12/ios/Classes/handlers/PushHandlers.swift:215:54 3 {code} Is there something I can to to try to fix it?

    bug 
    opened by TheManuz 15
  • Failing Android build: `The plugin ably_flutter could not be built` URGENT

    Failing Android build: `The plugin ably_flutter could not be built` URGENT

    My android build keeps failing due to ably with a bunch of error: cannot find symbol which point to NonNull symbols.

    Please have a look.

    I am using: Flutter V1.22.6. ably_flutter: ^1.2.0-preview.2 minSdkVersion 24 targetSdkVersion 29 gradle-6.5-all.zip


    BUILD FAILED in 5m 10s Running Gradle task 'assembleBetaRelease'... 311.2s (!) The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility. Building plugin ably_flutter... Running Gradle task 'assembleAarRelease'... inatedResult> paginatedResponseHandler(NonNull MethodChannel.Result result, Integer handle) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:232: error: cannot find symbol private void getRestHistory(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:232: error: cannot find symbol private void getRestHistory(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:248: error: cannot find symbol private void getRestPresence(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:248: error: cannot find symbol private void getRestPresence(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:264: error: cannot find symbol private void getRestPresenceHistory(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:264: error: cannot find symbol private void getRestPresenceHistory(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:280: error: cannot find symbol private void getRealtimePresence(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:280: error: cannot find symbol private void getRealtimePresence(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:304: error: cannot find symbol private void getRealtimePresenceHistory(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:304: error: cannot find symbol private void getRealtimePresenceHistory(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:320: error: cannot find symbol private void enterRealtimePresence(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:320: error: cannot find symbol private void enterRealtimePresence(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:340: error: cannot find symbol private void updateRealtimePresence(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:340: error: cannot find symbol private void updateRealtimePresence(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:364: error: cannot find symbol private void leaveRealtimePresence(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:364: error: cannot find symbol private void leaveRealtimePresence(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:388: error: cannot find symbol private void createRealtimeWithOptions(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:388: error: cannot find symbol private void createRealtimeWithOptions(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:429: error: can 21.0s WARNING: [Processor] Library '/Users/builder/.gradle/caches/modules-2/files-2.1/io.flutter/flutter_embedding_release/1.0.0-2f0af3715217a0c2ada72c717d4ed9178d68f6ed/78977f0e2f05765acc325f907e1f9a0d27b5024e/flutter_embedding_release-1.0.0-2f0af3715217a0c2ada72c717d4ed9178d68f6ed.jar' contains references to both AndroidX and old support library. This seems like the library is partially migrated. Jetifier will try to rewrite the library anyway. Example of androidX reference: 'androidx/annotation/NonNull' Example of support library reference: 'android/support/annotation/NonNull'

    /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/StreamsChannel.java:26: error: cannot find symbol import androidx.annotation.UiThread; ^ symbol: class UiThread location: package androidx.annotation /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyFlutterMessage.java:3: error: cannot find symbol import androidx.annotation.NonNull; ^ symbol: class NonNull location: package androidx.annotation /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:7: error: cannot find symbol import androidx.annotation.Nullable; ^ symbol: class Nullable location: package androidx.annotation /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/StreamsChannel.java:70: error: cannot find symbol UiThread ^ symbol: class UiThread location: class StreamsChannel /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/StreamsChannel.java:179: error: cannot find symbol UiThread ^ symbol: class UiThread location: class StreamsChannel.IncomingStreamRequestHandler.EventSinkImplementation /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/StreamsChannel.java:188: error: cannot find symbol UiThread ^ symbol: class UiThread location: class StreamsChannel.IncomingStreamRequestHandler.EventSinkImplementation /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/StreamsChannel.java:199: error: cannot find symbol UiThread ^ symbol: class UiThread location: class StreamsChannel.IncomingStreamRequestHandler.EventSinkImplementation /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyFlutterMessage.java:17: error: cannot find symbol NonNull ^ symbol: class NonNull location: class AblyFlutterMessage where T is a type-variable: T extends Object declared in class AblyFlutterMessage /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:121: error: cannot find symbol private void handleAblyException(NonNull MethodChannel.Result result, NonNull AblyException e) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:121: error: cannot find symbol private void handleAblyException(NonNull MethodChannel.Result result, NonNull AblyException e) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:126: error: cannot find symbol public void onMethodCall(NonNull MethodCall call, NonNull MethodChannel.Result rawResult) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:126: error: cannot find symbol public void onMethodCall(NonNull MethodCall call, NonNull MethodChannel.Result rawResult) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:139: error: cannot find symbol private CompletionListener handleCompletionWithListener(NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:153: error: cannot find symbol private void register(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:153: error: cannot find symbol private void register(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:160: error: cannot find symbol private void createRestWithOptions(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:160: error: cannot find symbol private void createRestWithOptions(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:200: error: cannot find symbol private void publishRestMessage(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:200: error: cannot find symbol private void publishRestMessage(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:217: error: cannot find symbol private Callbacknot find symbol private void connectRealtime(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:429: error: cannot find symbol private void connectRealtime(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:441: error: cannot find symbol NonNull MethodCall call, NonNull MethodChannel.Result result ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:441: error: cannot find symbol NonNull MethodCall call, NonNull MethodChannel.Result result ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:460: error: cannot find symbol NonNull MethodCall call, NonNull MethodChannel.Result result ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:460: error: cannot find symbol NonNull MethodCall call, NonNull MethodChannel.Result result ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:479: error: cannot find symbol NonNull MethodCall call, NonNull MethodChannel.Result result ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:479: error: cannot find symbol NonNull MethodCall call, NonNull MethodChannel.Result result ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:499: error: cannot find symbol NonNull MethodCall call, NonNull MethodChannel.Result result ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:499: error: cannot find symbol NonNull MethodCall call, NonNull MethodChannel.Result result ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:525: error: cannot find symbol private void getRealtimeHistory(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:525: error: cannot find symbol private void getRealtimeHistory(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:541: error: cannot find symbol private void closeRealtime(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:541: error: cannot find symbol private void closeRealtime(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:549: error: cannot find symbol private void getNextPage(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:549: error: cannot find symbol private void getNextPage(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:558: error: cannot find symbol private void getFirstPage(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:558: error: cannot find symbol private void getFirstPage(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:571: error: cannot find symbol private void getPlatformVersion(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:571: error: cannot find symbol private void getPlatformVersion(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:575: error: cannot find symbol private void getVersion(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:575: error: cannot find symbol private void getVersion(NonNull MethodCall call, NonNull MethodChannel.Result result) { ^ symbol: class NonNull location: class AblyMethodCallHandler /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyFlutterPlugin.java:18: error: cannot find symbol public void onAttachedToEngine(NonNull FlutterPluginBinding flutterPluginBinding) { ^ symbol: class NonNull location: class AblyFlutterPlugin /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyFlutterPlugin.java:52: error: cannot find symbol public void onDetachedFromEngine(NonNull FlutterPluginBinding binding) { ^ symbol: class NonNull location: class AblyFlutterPlugin /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:173: error: cannot find symbol public void success(Nullable Object result) { ^ symbol: class Nullable /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:178: error: cannot find symbol public void error(String errorCode, Nullable String errorMessage, Nullable Object errorDetails) { ^ symbol: class Nullable /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:178: error: cannot find symbol public void error(String errorCode, Nullable String errorMessage, Nullable Object errorDetails) { ^ symbol: class Nullable /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:401: error: cannot find symbol public void success(Nullable Object result) { ^ symbol: class Nullable /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:408: error: cannot find symbol public void error(String errorCode, Nullable String errorMessage, Nullable Object errorDetails) { ^ symbol: class Nullable /Users/builder/programs/flutter_1_22_6/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.0-preview.2/android/src/main/java/io/ably/flutter/plugin/AblyMethodCallHandler.java:408: error: cannot find symbol public void error(String errorCode, Nullable String errorMessage, Nullable Object errorDetails) { ^ symbol: class Nullable Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 68 errors

    FAILURE: Build failed with an exception.

    • What went wrong: Execution failed for task ':compileReleaseJavaWithJavac'.

    Compilation failed; see the compiler error output for details.

    • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    • Get more help at https://help.gradle.org

    BUILD FAILED in 20s

    The plugin ably_flutter could not be built due to the issue above.

    Build failed :| Failed to build for Android

    ┆Issue is synchronized with this Jira Uncategorised by Unito

    opened by heshanka 12
  • Consider making push an optional plugin

    Consider making push an optional plugin

    h3. Problem We are facing with some functional issues which are related to our push notification implementation. We are also facing compatibility issues when another library is used alongside with ours. See https://github.com/ably/ably-flutter/issues/226

    We have two main issues

    We install our custom implementations to apps which uses our library. For example we declare services, broadcast receivers to Android apps and users unless they opt out in their manifest files. This situation creates a conflict described https://github.com/ably/ably-flutter/issues/226 and presents some inflexibility to users' side.

    We are not using (or unable to use) [popular library|https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_messaging/firebase_messaging] to lessen our burden dealing with internals of push notifications. This path was followed as this library would also expose iOS plugin too, but we do not want to support Firebase's iOS plugin.

    Some thoughts on how we can address these problems

    • We can create a separate plugin (such as ably-push) that will expose a common interface for users to interact with. Then we can provide our default implementations. [Firebase messaging seems to have adopted a similar pattern|https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_messaging/firebase_messaging_platform_interface] . This looks like a federated Plugin, but they seem to have implemented only their web plugin based on this interface. iOS and Android plugins are still in the same package.
    • I was trying to find a way to use official Firebase library and how Firebase library is designed make things a bit harder. "Create your own implementation of Firebase" seems to be their motto, which means that we conform their interface and provide our own implementation. iOS and Android implementation is part of the app facing library and it's difficult to design something based on only a single platform. "Create an implementation of ably push (eg. Firebase" was my thinking and we can let user opt in for our Firebase implementation if they want to use Ably capabilities in push code

    To be discussed...

    opened by ikbalkaya 10
  • Add SDK variant to be reported when connecting to Ably

    Add SDK variant to be reported when connecting to Ably

    We need to be ably to see in our data how many users are using Flutter sdk, and right now this information is not being reported as Flutter plugin is just a wrapper around native libraries. I believe we are ably to specify variant via public interface on the native SDK level - lets add a flutter specifier there so we can at least start seeing number of Flutter users right now.

    This is a short term fix, long term fix will be support for reporting multiple layers of versions https://github.com/ably/docs/pull/1034

    ┆Issue is synchronized with this Jira Uncategorised by Unito

    opened by kavalerov 10
  • Execution failed for task ':ably_flutter:compileDebugJavaWithJavac' while running integration test for android device

    Execution failed for task ':ably_flutter:compileDebugJavaWithJavac' while running integration test for android device

    So while trying to setup the integration test setup for flutter [as directed in the docs|https://github.com/flutter/flutter/tree/master/packages/integration_test#android-device-testing]

    I am trying to invoke this command to execute a test

    {code} ./gradlew app:connectedAndroidTest -Ptarget=pwd/../integration_test/my_test.dart --stacktrace {code} But the gradle build fails with following error

    {code}

    Task :ably_flutter:compileDebugJavaWithJavac FAILED Note: /Users/cs/flutter/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.8/android/src/main/java/io/ably/flutter/plugin/AblyFlutter.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.

    FAILURE: Build failed with an exception.

    • What went wrong: Execution failed for task ':ably_flutter:compileDebugJavaWithJavac'.

    java.lang.IllegalAccessError: class org.gradle.internal.compiler.java.ClassNameCollector (in unnamed module @0x5db962c5) cannot access class com.sun.tools.javac.code.Symbol$TypeSymbol (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.code to unnamed module @0x5db962c5

    • Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    {code} Full Error log

    {code} WARNING:: DSL element 'useProguard' is obsolete. It will be removed in version 7.0 of the Android Gradle plugin. Use 'android.enableR8' in gradle.properties to switch between R8 and Proguard. WARNING:: DSL element 'useProguard' is obsolete. It will be removed in version 7.0 of the Android Gradle plugin. Use 'android.enableR8' in gradle.properties to switch between R8 and Proguard. WARNING:: DSL element 'useProguard' is obsolete. It will be removed in version 7.0 of the Android Gradle plugin. Use 'android.enableR8' in gradle.properties to switch between R8 and Proguard. WARNING:: The specified Android SDK Build Tools version (28.0.3) is ignored, as it is below the minimum supported version (30.0.2) for Android Gradle Plugin 4.2.2. Android SDK Build Tools 30.0.2 will be used. To suppress this warning, remove "buildToolsVersion '28.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

    Task :ably_flutter:compileDebugJavaWithJavac FAILED Note: /Users/cs/flutter/.pub-cache/hosted/pub.dartlang.org/ably_flutter-1.2.8/android/src/main/java/io/ably/flutter/plugin/AblyFlutter.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.

    FAILURE: Build failed with an exception.

    • What went wrong: Execution failed for task ':ably_flutter:compileDebugJavaWithJavac'.

    java.lang.IllegalAccessError: class org.gradle.internal.compiler.java.ClassNameCollector (in unnamed module @0x5db962c5) cannot access class com.sun.tools.javac.code.Symbol$TypeSymbol (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.code to unnamed module @0x5db962c5

    • Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    • Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':ably_flutter:compileDebugJavaWithJavac'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:200) at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:263) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:198) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:179) at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109) at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46) at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:62) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56) at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62) at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76) at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52) at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:41) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:372) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:359) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:352) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:338) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) Caused by: java.lang.RuntimeException: java.lang.IllegalAccessError: class org.gradle.internal.compiler.java.ClassNameCollector (in unnamed module @0x5db962c5) cannot access class com.sun.tools.javac.code.Symbol$TypeSymbol (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.code to unnamed module @0x5db962c5 at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:168) at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100) at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94) at org.gradle.internal.compiler.java.IncrementalCompileTask.call(IncrementalCompileTask.java:74) at org.gradle.api.internal.tasks.compile.AnnotationProcessingCompileTask.call(AnnotationProcessingCompileTask.java:94) at org.gradle.api.internal.tasks.compile.ResourceCleaningCompilationTask.call(ResourceCleaningCompilationTask.java:57) at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:55) at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:40) at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:97) at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:51) at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:37) at org.gradle.api.internal.tasks.compile.AnnotationProcessorDiscoveringCompiler.execute(AnnotationProcessorDiscoveringCompiler.java:51) at org.gradle.api.internal.tasks.compile.AnnotationProcessorDiscoveringCompiler.execute(AnnotationProcessorDiscoveringCompiler.java:37) at org.gradle.api.internal.tasks.compile.ModuleApplicationNameWritingCompiler.execute(ModuleApplicationNameWritingCompiler.java:46) at org.gradle.api.internal.tasks.compile.ModuleApplicationNameWritingCompiler.execute(ModuleApplicationNameWritingCompiler.java:36) at org.gradle.api.internal.tasks.compile.CleaningJavaCompiler.execute(CleaningJavaCompiler.java:53) at org.gradle.api.internal.tasks.compile.incremental.IncrementalCompilerFactory.lambda$createRebuildAllCompiler$0(IncrementalCompilerFactory.java:98) at org.gradle.api.internal.tasks.compile.incremental.IncrementalResultStoringCompiler.execute(IncrementalResultStoringCompiler.java:61) at org.gradle.api.internal.tasks.compile.incremental.IncrementalResultStoringCompiler.execute(IncrementalResultStoringCompiler.java:45) at org.gradle.api.internal.tasks.compile.CompileJavaBuildOperationReportingCompiler$2.call(CompileJavaBuildOperationReportingCompiler.java:59) at org.gradle.api.internal.tasks.compile.CompileJavaBuildOperationReportingCompiler$2.call(CompileJavaBuildOperationReportingCompiler.java:51) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62) at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76) at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76) at org.gradle.api.internal.tasks.compile.CompileJavaBuildOperationReportingCompiler.execute(CompileJavaBuildOperationReportingCompiler.java:51) at org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompile.java:343) at org.gradle.api.tasks.compile.JavaCompile.performIncrementalCompilation(JavaCompile.java:237) at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:209) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104) at org.gradle.api.internal.project.taskfactory.IncrementalInputsTaskAction.doExecute(IncrementalInputsTaskAction.java:32) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51) at org.gradle.api.internal.project.taskfactory.AbstractIncrementalTaskAction.execute(AbstractIncrementalTaskAction.java:25) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.run(ExecuteActionsTaskExecuter.java:555) at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29) at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56) at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71) at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:540) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:523) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$300(ExecuteActionsTaskExecuter.java:108) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.executeWithPreviousOutputFiles(ExecuteActionsTaskExecuter.java:271) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:260) at org.gradle.internal.execution.steps.ExecuteStep.lambda$execute$0(ExecuteStep.java:33) at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:33) at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:26) at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:67) at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:36) at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:49) at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:34) at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:43) at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:73) at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:54) at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:44) at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:54) at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:38) at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:42) at org.gradle.internal.execution.steps.CacheStep.executeWithoutCache(CacheStep.java:159) at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:72) at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:43) at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:44) at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:33) at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:38) at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:24) at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:92) at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:85) at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:55) at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:39) at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:76) at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:37) at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:36) at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:26) at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:94) at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:49) at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:79) at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:53) at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:74) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:78) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:78) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:34) at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:39) at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:40) at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:28) at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:33) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:187) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:179) at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109) at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46) at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:62) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56) at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62) at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76) at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52) at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:41) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:372) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:359) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:352) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:338) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) Caused by: java.lang.IllegalAccessError: class org.gradle.internal.compiler.java.ClassNameCollector (in unnamed module @0x5db962c5) cannot access class com.sun.tools.javac.code.Symbol$TypeSymbol (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.code to unnamed module @0x5db962c5 at org.gradle.internal.compiler.java.ClassNameCollector.processSourceFile(ClassNameCollector.java:74) at org.gradle.internal.compiler.java.ClassNameCollector.finished(ClassNameCollector.java:57) at jdk.compiler/com.sun.tools.javac.api.ClientCodeWrapper$WrappedTaskListener.finished(ClientCodeWrapper.java:854) at jdk.compiler/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:132) at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1631) at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1585) at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:946) at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104) at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:152) ... 133 more

    • Get more help at https://help.gradle.org

    Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.7.1/userguide/command_line_interface.html#sec:command_line_warnings

    BUILD FAILED in 2s

    {code} {{flutter doctor -v}}

    {code} [✓] Flutter (Channel stable, 2.2.3, on macOS 11.3.1 20E241 darwin-x64, locale en-IN) • Flutter version 2.2.3 at /Users/cs/flutter • Framework revision f4abaa0735 (7 months ago), 2021-07-01 12:46:11 -0700 • Engine revision 241c87ad80 • Dart version 2.13.4

    [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at /Users/cs/Library/Android/sdk • Platform android-32, build-tools 31.0.0 • ANDROID_HOME = /Users/cs/Library/Android/sdk • ANDROID_SDK_ROOT = /Users/cs/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264) • All Android licenses accepted.

    [✓] Xcode - develop for iOS and macOS • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.5.1, Build version 12E507 • CocoaPods version 1.10.1

    [✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome) ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

    [✓] Android Studio (version 4.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)

    [✓] IntelliJ IDEA Ultimate Edition (version 2021.2.3) • IntelliJ at /Applications/IntelliJ IDEA.app • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart

    [✓] VS Code (version 1.64.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.34.0

    [✓] Connected device (1 available) • Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 8.1.0 (API 27) (emulator)

    ! Doctor found issues in 1 category. {code} {{ably_flutter}}: {{1.2.8}}

    bug 
    opened by Bhupesh-V 8
  • support for Android 21+

    support for Android 21+

    hi folks, can you please provide support for Android 21+ ? At moment its Android 24+, but our app(s) need to support a minimum of 21.

    ┆Issue is synchronized with this Jira Uncategorised by Unito

    opened by SogoGolf 8
  • Getting error after add this plugin to project

    Getting error after add this plugin to project

    Hello, after add this plugin to .pubspec:

      ably_flutter_plugin:
        git: https://github.com/ably/ably-flutter.git
    

    I am getting errors during build:

    Launching lib/main.dart on iPhone 11 in debug mode...
    Running pod install...                                              5,5s
    Running Xcode build...                                                  
                                                       
     └─Compiling, linking and signing...                         1,8s
    Xcode build done.                                           32,4s
    Failed to build iOS app
    Error output from Xcode build:
    ↳
        ** BUILD FAILED **
    
    
    Xcode's output:
    ↳
        ios/Pods/AblyDeltaCodec/xdelta/xdelta3/xdelta3.c:354:1: warning: unused function
        'xd3_rlist_length' [-Wunused-function]
        XD3_MAKELIST(xd3_rlist, xd3_rinst, link);
        ^
        In file included from ios/Pods/AblyDeltaCodec/xdelta/xdelta3/xdelta3.c:351:
        ios/Pods/AblyDeltaCodec/xdelta/xdelta3/xdelta3-list.h:114:73: note: expanded from
        macro 'XD3_MAKELIST'
        static inline usize_t                                                   \
                                                                                ^
        <scratch space>:25:1: note: expanded from here
        xd3_rlist_length
        ^
        ios/Pods/AblyDeltaCodec/xdelta/xdelta3/xdelta3.c:479:20: warning: unused function
        'xd3_emit_uint32_t' [-Wunused-function]
        static int         xd3_emit_uint32_t (xd3_stream *stream, xd3_output **output,
                           ^
        2 warnings generated.
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:43:53: warning: implicit boolean conversion of Objective-C object literal always evaluates to true [-Wobjc-literal-conversion]
            WRITE_VALUE(dictionary, TxErrorInfo_statusCode, @([e statusCode]));
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:29:9: note: expanded from macro 'WRITE_VALUE'
            if (VALUE) { \
            ~~  ^~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:54:62: warning: implicit boolean conversion of Objective-C object literal always evaluates to true [-Wobjc-literal-conversion]
            WRITE_VALUE(dictionary, TxConnectionStateChange_retryIn, @((int)([stateChange retryIn] * 1000)));
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:29:9: note: expanded from macro 'WRITE_VALUE'
            if (VALUE) { \
            ~~  ^~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:51:61: warning: implicit conversion loses integer precision: 'ARTRealtimeConnectionState' (aka 'enum ARTRealtimeConnectionState')
        to 'int' [-Wshorten-64-to-32]
            WRITE_ENUM(dictionary, TxConnectionStateChange_current, [stateChange current]);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:36:67: note: expanded from macro 'WRITE_ENUM'
                WRITE_VALUE(DICTIONARY, JSON_KEY, [NSNumber numberWithInt:ENUM_VALUE]); \
                                                  ~                       ^~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:29:9: note: expanded from macro 'WRITE_VALUE'
            if (VALUE) { \
                ^~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:51:61: warning: implicit conversion loses integer precision: 'ARTRealtimeConnectionState' (aka 'enum ARTRealtimeConnectionState')
        to 'int' [-Wshorten-64-to-32]
            WRITE_ENUM(dictionary, TxConnectionStateChange_current, [stateChange current]);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:36:67: note: expanded from macro 'WRITE_ENUM'
                WRITE_VALUE(DICTIONARY, JSON_KEY, [NSNumber numberWithInt:ENUM_VALUE]); \
                                                  ~                       ^~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:30:31: note: expanded from macro 'WRITE_VALUE'
                [DICTIONARY setObject:VALUE forKey:JSON_KEY]; \
                                      ^~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:52:62: warning: implicit conversion loses integer precision: 'ARTRealtimeConnectionState' (aka 'enum ARTRealtimeConnectionState')
        to 'int' [-Wshorten-64-to-32]
            WRITE_ENUM(dictionary, TxConnectionStateChange_previous, [stateChange previous]);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:36:67: note: expanded from macro 'WRITE_ENUM'
                WRITE_VALUE(DICTIONARY, JSON_KEY, [NSNumber numberWithInt:ENUM_VALUE]); \
                                                  ~                       ^~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:29:9: note: expanded from macro 'WRITE_VALUE'
            if (VALUE) { \
                ^~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:52:62: warning: implicit conversion loses integer precision: 'ARTRealtimeConnectionState' (aka 'enum ARTRealtimeConnectionState')
        to 'int' [-Wshorten-64-to-32]
            WRITE_ENUM(dictionary, TxConnectionStateChange_previous, [stateChange previous]);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:36:67: note: expanded from macro 'WRITE_ENUM'
                WRITE_VALUE(DICTIONARY, JSON_KEY, [NSNumber numberWithInt:ENUM_VALUE]); \
                                                  ~                       ^~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:30:31: note: expanded from macro 'WRITE_VALUE'
                [DICTIONARY setObject:VALUE forKey:JSON_KEY]; \
                                      ^~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:53:59: warning: implicit conversion loses integer precision: 'ARTRealtimeConnectionEvent' (aka 'enum ARTRealtimeConnectionEvent')
        to 'int' [-Wshorten-64-to-32]
            WRITE_ENUM(dictionary, TxConnectionStateChange_event, [stateChange event]);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:36:67: note: expanded from macro 'WRITE_ENUM'
                WRITE_VALUE(DICTIONARY, JSON_KEY, [NSNumber numberWithInt:ENUM_VALUE]); \
                                                  ~                       ^~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:29:9: note: expanded from macro 'WRITE_VALUE'
            if (VALUE) { \
                ^~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:53:59: warning: implicit conversion loses integer precision: 'ARTRealtimeConnectionEvent' (aka 'enum ARTRealtimeConnectionEvent')
        to 'int' [-Wshorten-64-to-32]
            WRITE_ENUM(dictionary, TxConnectionStateChange_event, [stateChange event]);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:36:67: note: expanded from macro 'WRITE_ENUM'
                WRITE_VALUE(DICTIONARY, JSON_KEY, [NSNumber numberWithInt:ENUM_VALUE]); \
                                                  ~                       ^~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:30:31: note: expanded from macro 'WRITE_VALUE'
                [DICTIONARY setObject:VALUE forKey:JSON_KEY]; \
                                      ^~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:64:59: warning: implicit boolean conversion of Objective-C object literal always evaluates to true [-Wobjc-literal-conversion]
            WRITE_VALUE(dictionary, TxChannelStateChange_resumed, @([stateChange resumed]));
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:29:9: note: expanded from macro 'WRITE_VALUE'
            if (VALUE) { \
            ~~  ^~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:61:58: warning: implicit conversion loses integer precision: 'ARTRealtimeChannelState' (aka 'enum ARTRealtimeChannelState') to
        'int' [-Wshorten-64-to-32]
            WRITE_ENUM(dictionary, TxChannelStateChange_current, [stateChange current]);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:36:67: note: expanded from macro 'WRITE_ENUM'
                WRITE_VALUE(DICTIONARY, JSON_KEY, [NSNumber numberWithInt:ENUM_VALUE]); \
                                                  ~                       ^~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:29:9: note: expanded from macro 'WRITE_VALUE'
            if (VALUE) { \
                ^~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:61:58: warning: implicit conversion loses integer precision: 'ARTRealtimeChannelState' (aka 'enum ARTRealtimeChannelState') to
        'int' [-Wshorten-64-to-32]
            WRITE_ENUM(dictionary, TxChannelStateChange_current, [stateChange current]);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:36:67: note: expanded from macro 'WRITE_ENUM'
                WRITE_VALUE(DICTIONARY, JSON_KEY, [NSNumber numberWithInt:ENUM_VALUE]); \
                                                  ~                       ^~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:30:31: note: expanded from macro 'WRITE_VALUE'
                [DICTIONARY setObject:VALUE forKey:JSON_KEY]; \
                                      ^~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:62:59: warning: implicit conversion loses integer precision: 'ARTRealtimeChannelState' (aka 'enum ARTRealtimeChannelState') to
        'int' [-Wshorten-64-to-32]
            WRITE_ENUM(dictionary, TxChannelStateChange_previous, [stateChange previous]);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:36:67: note: expanded from macro 'WRITE_ENUM'
                WRITE_VALUE(DICTIONARY, JSON_KEY, [NSNumber numberWithInt:ENUM_VALUE]); \
                                                  ~                       ^~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:29:9: note: expanded from macro 'WRITE_VALUE'
            if (VALUE) { \
                ^~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:62:59: warning: implicit conversion loses integer precision: 'ARTRealtimeChannelState' (aka 'enum ARTRealtimeChannelState') to
        'int' [-Wshorten-64-to-32]
            WRITE_ENUM(dictionary, TxChannelStateChange_previous, [stateChange previous]);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:36:67: note: expanded from macro 'WRITE_ENUM'
                WRITE_VALUE(DICTIONARY, JSON_KEY, [NSNumber numberWithInt:ENUM_VALUE]); \
                                                  ~                       ^~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:30:31: note: expanded from macro 'WRITE_VALUE'
                [DICTIONARY setObject:VALUE forKey:JSON_KEY]; \
                                      ^~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:63:56: warning: implicit conversion loses integer precision: 'ARTChannelEvent' (aka 'enum ARTChannelEvent') to 'int'
        [-Wshorten-64-to-32]
            WRITE_ENUM(dictionary, TxChannelStateChange_event, [stateChange event]);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:36:67: note: expanded from macro 'WRITE_ENUM'
                WRITE_VALUE(DICTIONARY, JSON_KEY, [NSNumber numberWithInt:ENUM_VALUE]); \
                                                  ~                       ^~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:29:9: note: expanded from macro 'WRITE_VALUE'
            if (VALUE) { \
                ^~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:63:56: warning: implicit conversion loses integer precision: 'ARTChannelEvent' (aka 'enum ARTChannelEvent') to 'int'
        [-Wshorten-64-to-32]
            WRITE_ENUM(dictionary, TxChannelStateChange_event, [stateChange event]);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:36:67: note: expanded from macro 'WRITE_ENUM'
                WRITE_VALUE(DICTIONARY, JSON_KEY, [NSNumber numberWithInt:ENUM_VALUE]); \
                                                  ~                       ^~~~~~~~~~
        /Users/alexey/Documents/dev/flutter/.pub-cache/git/ably-flutter-0c2f7074b7ffe6abcb5ba0a0a99aed7ab4917bd9/ios/Classes/codec/AblyFlutterWri
        ter.m:30:31: note: expanded from macro 'WRITE_VALUE'
                [DICTIONARY setObject:VALUE forKey:JSON_KEY]; \
                                      ^~~~~
        15 warnings generated.
        3 warnings generated.
        While building module 'ably_flutter_plugin' imported from
        ios/Runner/GeneratedPluginRegistrant.m:8:
        In file included from <module-includes>:1:
        In file included from
        build/ios/Debug-iphonesimulator/ably_flutter_plugin/ably_flutter_plugin.framework/Head
        ers/ably_flutter_plugin-umbrella.h:18:
        build/ios/Debug-iphonesimulator/ably_flutter_plugin/ably_flutter_plugin.framework/Head
        ers/AblyFlutterReader.h:3:9: error: include of non-modular header inside framework module 'ably_flutter_plugin.AblyFlutterReader':
        'build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h'
        [-Werror,-Wnon-modular-include-in-framework-module]
        #import "ARTTokenDetails.h"
                ^
        While building module 'ably_flutter_plugin' imported from
        ios/Runner/GeneratedPluginRegistrant.m:8:
        In file included from <module-includes>:1:
        In file included from
        build/ios/Debug-iphonesimulator/ably_flutter_plugin/ably_flutter_plugin.framework/Head
        ers/ably_flutter_plugin-umbrella.h:18:
        In file included from
        build/ios/Debug-iphonesimulator/ably_flutter_plugin/ably_flutter_plugin.framework/Head
        ers/AblyFlutterReader.h:3:
        build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h:18:1:
        error: duplicate interface definition for class 'ARTTokenDetails'
        @interface ARTTokenDetails : NSObject<NSCopying>
        ^
        In module 'Ably' imported from
        build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h:10:
        build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h:18:12:
        note: previous definition is here
        @interface ARTTokenDetails : NSObject<NSCopying>
                   ^
        While building module 'ably_flutter_plugin' imported from
        ios/Runner/GeneratedPluginRegistrant.m:8:
        In file included from <module-includes>:1:
        In file included from
        build/ios/Debug-iphonesimulator/ably_flutter_plugin/ably_flutter_plugin.framework/Head
        ers/ably_flutter_plugin-umbrella.h:18:
        In file included from
        build/ios/Debug-iphonesimulator/ably_flutter_plugin/ably_flutter_plugin.framework/Head
        ers/AblyFlutterReader.h:3:
        build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h:23:49:
        error: property has a previous declaration
        @property (nonatomic, readonly, copy) NSString *token;
                                                        ^
        In module 'Ably' imported from
        build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h:10:
        build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h:23:49:
        note: property declared here
        @property (nonatomic, readonly, copy) NSString *token;
                                                        ^
        While building module 'ably_flutter_plugin' imported from
        ios/Runner/GeneratedPluginRegistrant.m:8:
        In file included from <module-includes>:1:
        In file included from
        build/ios/Debug-iphonesimulator/ably_flutter_plugin/ably_flutter_plugin.framework/Head
        ers/ably_flutter_plugin-umbrella.h:18:
        In file included from
        build/ios/Debug-iphonesimulator/ably_flutter_plugin/ably_flutter_plugin.framework/Head
        ers/AblyFlutterReader.h:3:
        build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h:28:59:
        error: property has a previous declaration
        @property (nonatomic, readonly, strong, nullable) NSDate *expires;
                                                                  ^
        In module 'Ably' imported from
        build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h:10:
        build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h:28:59:
        note: property declared here
        @property (nonatomic, readonly, strong, nullable) NSDate *expires;
                                                                  ^
        While building module 'ably_flutter_plugin' imported from
        ios/Runner/GeneratedPluginRegistrant.m:8:
        In file included from <module-includes>:1:
        In file included from
        build/ios/Debug-iphonesimulator/ably_flutter_plugin/ably_flutter_plugin.framework/Head
        ers/ably_flutter_plugin-umbrella.h:18:
        In file included from
        build/ios/Debug-iphonesimulator/ably_flutter_plugin/ably_flutter_plugin.framework/Head
        ers/AblyFlutterReader.h:3:
        build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h:33:59:
        error: property has a previous declaration
        @property (nonatomic, readonly, strong, nullable) NSDate *issued;
                                                                  ^
        In module 'Ably' imported from
        build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h:10:
        build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h:33:59:
        note: property declared here
        @property (nonatomic, readonly, strong, nullable) NSDate *issued;
                                                                  ^
        While building module 'ably_flutter_plugin' imported from
        ios/Runner/GeneratedPluginRegistrant.m:8:
        In file included from <module-includes>:1:
        In file included from
        build/ios/Debug-iphonesimulator/ably_flutter_plugin/ably_flutter_plugin.framework/Head
        ers/ably_flutter_plugin-umbrella.h:18:
        In file included from
        build/ios/Debug-iphonesimulator/ably_flutter_plugin/ably_flutter_plugin.framework/Head
        ers/AblyFlutterReader.h:3:
        build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h:38:59:
        error: property has a previous declaration
        @property (nonatomic, readonly, copy, nullable) NSString *capability;
                                                                  ^
        In module 'Ably' imported from
        build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h:10:
        build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h:38:59:
        note: property declared here
        @property (nonatomic, readonly, copy, nullable) NSString *capability;
                                                                  ^
        While building module 'ably_flutter_plugin' imported from
        ios/Runner/GeneratedPluginRegistrant.m:8:
        In file included from <module-includes>:1:
        In file included from
        build/ios/Debug-iphonesimulator/ably_flutter_plugin/ably_flutter_plugin.framework/Head
        ers/ably_flutter_plugin-umbrella.h:18:
        In file included from
        build/ios/Debug-iphonesimulator/ably_flutter_plugin/ably_flutter_plugin.framework/Head
        ers/AblyFlutterReader.h:3:
        build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h:43:59:
        error: property has a previous declaration
        @property (nonatomic, readonly, copy, nullable) NSString *clientId;
                                                                  ^
        In module 'Ably' imported from
        build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h:10:
        build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h:43:59:
        note: property declared here
        @property (nonatomic, readonly, copy, nullable) NSString *clientId;
                                                                  ^
        While building module 'ably_flutter_plugin' imported from
        ios/Runner/GeneratedPluginRegistrant.m:8:
        In file included from <module-includes>:1:
        In file included from
        build/ios/Debug-iphonesimulator/ably_flutter_plugin/ably_flutter_plugin.framework/Head
        ers/ably_flutter_plugin-umbrella.h:18:
        In file included from
        build/ios/Debug-iphonesimulator/ably_flutter_plugin/ably_flutter_plugin.framework/Head
        ers/AblyFlutterReader.h:3:
        build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h:53:12:
        error: definition of 'ARTTokenDetails' must be imported from module 'Ably.ARTTokenDetails' before it is required
        @interface ARTTokenDetails (ARTTokenDetailsCompatible) <ARTTokenDetailsCompatible>
                   ^
        In module 'Ably' imported from
        build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h:10:
        build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h:18:12:
        note: previous definition is here
        @interface ARTTokenDetails : NSObject<NSCopying>
                   ^
        While building module 'ably_flutter_plugin' imported from
        ios/Runner/GeneratedPluginRegistrant.m:8:
        In file included from <module-includes>:1:
        In file included from
        build/ios/Debug-iphonesimulator/ably_flutter_plugin/ably_flutter_plugin.framework/Head
        ers/ably_flutter_plugin-umbrella.h:18:
        In file included from
        build/ios/Debug-iphonesimulator/ably_flutter_plugin/ably_flutter_plugin.framework/Head
        ers/AblyFlutterReader.h:3:
        build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h:53:29:
        warning: duplicate definition of category 'ARTTokenDetailsCompatible' on interface 'ARTTokenDetails'
        @interface ARTTokenDetails (ARTTokenDetailsCompatible) <ARTTokenDetailsCompatible>
                                    ^
        In module 'Ably' imported from
        build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h:10:
        build/ios/Debug-iphonesimulator/Ably/Ably.framework/Headers/ARTTokenDetails.h:53:12:
        note: previous definition is here
        @interface ARTTokenDetails (ARTTokenDetailsCompatible) <ARTTokenDetailsCompatible>
                   ^
        1 warning and 8 errors generated.
        ios/Runner/GeneratedPluginRegistrant.m:8:9: fatal error: could not build module
        'ably_flutter_plugin'
        #import <ably_flutter_plugin/AblyFlutterPlugin.h>
         ~~~~~~~^
        1 warning and 9 errors generated.
    

    What am I doing wrong?

    opened by alexeynobody 8
  • Fix for running didFinishLaunchingWithOptions

    Fix for running didFinishLaunchingWithOptions

    Added fix for running didFinishLaunchingWithOptions in other registered plugins like uni_links.

    Problem:

    Since didFinishLaunchingWithOptions was returning NO, other plugins such as uni_links, also get the initialAppLink from didFinishLaunchingWithOptions were not able to run the function. This resulted in initialAppLink being null always.

    bug 
    opened by Neelansh-ns 7
  • Can not set RealTimeChannelOptions params

    Can not set RealTimeChannelOptions params

    Because cipher is not nullable I'm unable to pass {'rewind':'1'} to RealtimeChannelOptions without using cipher.

    RealtimeChannelOptions RealtimeChannelOptions(
      Object cipher, {
      Map<String, String>? params,
      List<ChannelMode>? modes,
    })
    

    Otherwise I could not find a reference within the flutter example how to use one...

    Upon further investigation, CipherParams seems to be abstract. Crypto interface doesn't seem to be implemented so I couldn't use getDefaultParams using my server-side generated key. So I tried to manually pass cipherParams as a Map but that threw a methodChannel error as well.

    Basically locked out of symmetric encryption as well as channel options...

    ┆Issue is synchronized with this Jira Uncategorised by Unito

    opened by 1N50MN14 7
  • compilation error on iOS

    compilation error on iOS

    iOs compiler raise an error

    static AblyCodecDecoder readTokenRequest = ^ARTTokenRequest*(NSDictionary *const dictionary) {
        __block NSString *mac = nil;
        __block NSString *nonce = nil;
        __block NSString *keyName = nil;
    
        ON_VALUE(^(const id value) { mac = value; }, dictionary, TxTokenRequest_mac);
        ON_VALUE(^(const id value) { nonce = value; }, dictionary, TxTokenRequest_nonce);
        ON_VALUE(^(const id value) { keyName = value; }, dictionary, TxTokenRequest_keyName);
    
        ARTTokenParams *const params = [AblyFlutterReader tokenParamsFromDictionary: dictionary];
        return [[ARTTokenRequest new] initWithTokenParams:params
                                                  keyName:keyName
                                                    nonce:nonce
                                                      mac:mac];
    };
    

    'new' is unavailable in ARTTokenRequest new statement

    flutter doctor -v | pbcopy

    [✓] Flutter (Channel stable, 1.22.6, on macOS 11.3 20E232 darwin-x64, locale it-IT)
        • Flutter version 1.22.6 at /Users/enrico/development/flutter
        • Framework revision 9b2d32b605 (3 mesi fa), 2021-01-22 14:36:39 -0800
        • Engine revision 2f0af37152
        • Dart version 2.10.5
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
        • Android SDK at /Users/enrico/Library/Android/sdk
        • Platform android-30, build-tools 30.0.2
        • ANDROID_HOME = /Users/enrico/Library/Android/sdk
        • ANDROID_SDK_ROOT = /Users/enrico/Library/Android/sdk
        • Java binary at: /Users/enrico/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/201.7042882/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 12.5)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 12.5, Build version 12E262
        • CocoaPods version 1.10.1
    
    [!] Android Studio (version 4.1)
        • Android Studio at /Users/enrico/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/201.7042882/Android Studio.app/Contents
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        ✗ Dart plugin not installed; this adds Dart specific functionality.
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    
    [✓] VS Code (version 1.55.2)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.21.0
    
    [✓] Connected device (1 available)
        • iPhone di Enrico (mobile) • 2c7ef6d2717ca0247a62685da4612571d1b2f6b4 • ios • iOS 14.5
    
    ! Doctor found issues in 1 category.
    

    ┆Issue is synchronized with this Jira Bug by Unito

    bug 
    opened by Miamoto-Musashi 7
  • Make this SDK ready for the first non-preview release

    Make this SDK ready for the first non-preview release

    opened by kavalerov 7
  • How to handle when user auth changes?

    How to handle when user auth changes?

    Currently I am using authCallback similar as follows:

    realtime = ably.Realtime(
      options: ably.ClientOptions(
        key: '<API KEY>',
        authCallback: (ably.TokenParams tokenParams) async {
          // authService.token is the currently authenticated user token
          ably.TokenRequest tokenRequest = await createTokenRequest(tokenParams, authService.token);
          return tokenRequest;
        },
      ),
    );
    

    The issue is how do I handle when the user logs out, and logs back in with another user.

    For example are there any methods like:

    realtime.logout(); 
    realtime.login(); 
    

    The current workaround I am using is when the user logs out or changes I close the existing Realtime object, and recreate the Realtime object, so it is forced to re-authorise.

    realtime.close();
    realtime = ably.Realtime(
      options: ably.ClientOptions(
        key: '<API KEY>',
        authCallback: (ably.TokenParams tokenParams) async {
          ably.TokenRequest tokenRequest = await createTokenRequest(tokenParams, authService.token);
          return tokenRequest;
        },
      ),
    );
    
    opened by yahya-uddin 4
  • Bump express from 4.17.1 to 4.17.3 in /example/test_harness

    Bump express from 4.17.1 to 4.17.3 in /example/test_harness

    Bumps express from 4.17.1 to 4.17.3.

    Release notes

    Sourced from express's releases.

    4.17.3

    4.17.2

    Changelog

    Sourced from express's changelog.

    4.17.3 / 2022-02-16

    4.17.2 / 2021-12-16

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies 
    opened by dependabot[bot] 0
  • Bump qs from 6.5.2 to 6.5.3 in /example/test_harness

    Bump qs from 6.5.2 to 6.5.3 in /example/test_harness

    Bumps qs from 6.5.2 to 6.5.3.

    Changelog

    Sourced from qs's changelog.

    6.5.3

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Fix] utils.merge: avoid a crash with a null target and a truthy non-array source
    • [Fix] correctly parse nested arrays
    • [Fix] stringify: fix a crash with strictNullHandling and a custom filter/serializeDate (#279)
    • [Fix] utils: merge: fix crash when source is a truthy primitive & no options are provided
    • [Fix] when parseArrays is false, properly handle keys ending in []
    • [Fix] fix for an impossible situation: when the formatter is called with a non-string value
    • [Fix] utils.merge: avoid a crash with a null target and an array source
    • [Refactor] utils: reduce observable [[Get]]s
    • [Refactor] use cached Array.isArray
    • [Refactor] stringify: Avoid arr = arr.concat(...), push to the existing instance (#269)
    • [Refactor] parse: only need to reassign the var once
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] Clean up license text so it’s properly detected as BSD-3-Clause
    • [Docs] Clarify the need for "arrayLimit" option
    • [meta] fix README.md (#399)
    • [meta] add FUNDING.yml
    • [actions] backport actions from main
    • [Tests] always use String(x) over x.toString()
    • [Tests] remove nonexistent tape option
    • [Dev Deps] backport from main
    Commits
    • 298bfa5 v6.5.3
    • ed0f5dc [Fix] parse: ignore __proto__ keys (#428)
    • 691e739 [Robustness] stringify: avoid relying on a global undefined (#427)
    • 1072d57 [readme] remove travis badge; add github actions/codecov badges; update URLs
    • 12ac1c4 [meta] fix README.md (#399)
    • 0338716 [actions] backport actions from main
    • 5639c20 Clean up license text so it’s properly detected as BSD-3-Clause
    • 51b8a0b add FUNDING.yml
    • 45f6759 [Fix] fix for an impossible situation: when the formatter is called with a no...
    • f814a7f [Dev Deps] backport from main
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies 
    opened by dependabot[bot] 0
  • Interfaces appearing in public API that are not accessible to users, nor implemented (e.g. `PushAdmin`)

    Interfaces appearing in public API that are not accessible to users, nor implemented (e.g. `PushAdmin`)

    Initially raised by me in this Slack thread (internal).

    We have an abstract class definition for PushAdmin but no sign that it's been implemented or anything offering that contract is otherwise accessible to SDK users: https://github.com/search?q=repo%3Aably%2Fably-flutter%20PushAdmin&type=code

    @JakubJankowski also observed that:

    seems like some other related classes aren’t implemented as well: https://github.com/search?q=repo%3Aably%2Fably-flutter%20PushDeviceRegistrations&type=code

    bug 
    opened by QuintinWillison 1
  • Bump json-schema and jsprim in /example/test_harness

    Bump json-schema and jsprim in /example/test_harness

    Bumps json-schema and jsprim. These dependencies needed to be updated together. Updates json-schema from 0.2.3 to 0.4.0

    Commits
    • f6f6a3b Use a little more robust method of checking instances
    • ef60987 Update version
    • b62f1da Protect against constructor modification, #84
    • fb427cd Link to json-schema-org repository in addition to site, fixes #54
    • 22f1461 Don't allow proto property to be used for schema default/coerce, fixes #84
    • c52a27c Get basic test to pass
    • b3f42b3 Add security policy
    • 3b0cec3 Update version
    • c28470f Update readme to acknowledge the state of the package
    • 7dff9cd Merge pull request #81 from hodovani/patch-1
    • Additional commits viewable in compare view

    Updates jsprim from 1.4.1 to 1.4.2

    Changelog

    Sourced from jsprim's changelog.

    v1.4.2 (2021-11-29)

    • #35 Backport json-schema 0.4.0 to version 1.4.x
    Commits
    Maintainer changes

    This version was pushed to npm by bahamat, a new releaser for jsprim since your current version.


    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    opened by dependabot[bot] 0
Releases(v1.2.15)
  • v1.2.15(Jul 19, 2022)

    Full Changelog

    Fixed bugs:

    • Update ably-android dependency to version 1.2.13 or later #430, fixed in: Update ably-android to 1.2.15 #435 (JakubJankowski)
    • Android application got crash on notification receive in killed state using Ably notifications #429, fixed in: Main thread fix #431 (ikbalkaya) - reverting the change made under #291, released at version 1.2.9
    • Building Example App on Android fails #418, fixed in: Fix missing App ID build error in example app #421 (ikurek)
    • Fix for running didFinishLaunchingWithOptions #433 (Neelansh-ns)

    Closed issues:

    • Deprecated API usage warning for fallbackHostsUseDefault #416, fixed in: Added lint ignore on deprecated fields #423 (ikurek)
    Source code(tar.gz)
    Source code(zip)
  • v1.2.14(May 23, 2022)

    Full Changelog

    Implemented enhancements:

    • Add Flutter and/or Dart runtime version to Ably-Agent header, if possible #286
    • Throw errors instead of returning null when serialization/ deserialization fails #149
    • Custom Transport Parameters (Params) #108

    Fixed bugs:

    • Check requirements and update for Flutter 3.0.0 #394
    • Upgrade ably-java dependency to version 1.2.12 #385
    • Swift Compiler Error (Xcode): Definition conflicts with previous value #347
    • Update errorReason on Realtime.connection #120
    • Logging and error handling for ObjC stream listeners #399
    • Fixed argument error in Swift implementation of Crypto.generateRandomKey #377
    • Fixed iOS push module compilation issue on some versions of XCode #373
    • Updated realtime connection to update errorReason #365

    Closed issues:

    • Check compatibility with XCode 13 #389
    • Document public members of classes #380
    • Ably iOS interferes with firebase_messaging #378
    • Sort named constructor parameters alphabetically #351
    • Use named arguments for options classes and make all fields private #61
    Source code(tar.gz)
    Source code(zip)
  • v1.2.13(Apr 5, 2022)

    Full Changelog

    Implemented enhancements:

    • Drop support for Android v1 embedding API #178
    • Defaults: Generate environment fallbacks #47

    Fixed bugs:

    • Android only - Returning a TokenDetails with 'issued' and 'expires' values in epoch milliseconds throws java error #356
    • Fix AblyException assigning 'Message' to 'Code' field #349
    • Investigate and fix encryption in sample app #334
    • Execution failed for task ':ably_flutter:compileDebugJavaWithJavac' while running integration test for android device #322
    • Realtime types (e.g. RealtimeHistoryParams) extending Rest ones (e.g. RestHistoryParams) can cause problems (crashes) #241
    • Fix LogHandler (use it) #238
    • Broken dartdoc link generated from readme #110

    Closed issues:

    • Ably interferes with firebase_messaging #346
    • Missing link to ApplicationState in documentation #335
    • Write integration tests for realtime channel specs #332
    • Consider Simplifying AblyMessage #329
    • Upgrade firebase-messaging to version 23.0.0 #320
    • Example App should be able to build and run without Firebase configured via google-services.json #318
    • No need for GitHub workflows to explicitly run flutter pub get in the example folder #317
    • Example App should be able to build and run without ABLY_API_KEY #316
    • resultForDeactivate and resultForActivate are set to null in some situations in Android plugin #304
    • Test device activation, subscription, receiving messages and deactivation #153
    • Add docstring for "spec" folder #29
    Source code(tar.gz)
    Source code(zip)
  • v1.2.12(Feb 8, 2022)

    Full Changelog

    Fixed bugs:

    • Android: IllegalStateException in Crypto CBCCipher's decrypt method #314, fixed by updating to ably-android version 1.2.11 #319 (QuintinWillison)
    • Android: java.lang.ArrayIndexOutOfBoundsException thrown by AblyInstanceStore's setPaginatedResult method #308, fixed in #321 (QuintinWillison)
    • ChannelStateChange property resumed should not be nullable #297, fixed in #313 (ikurek)
    • Deprecated Android embedding version #311, fixed in #312 (ikurek)

    Merged pull requests:

    • Readme enchancements for example app #309 (ikurek)
    Source code(tar.gz)
    Source code(zip)
  • v1.2.11(Jan 24, 2022)

    Full Changelog

    Reverted Bug Fix:

    We made a change, released in version 1.2.9, which we suspect has been causing issues for some customers. This release reverts that change.

    Fixed bugs:

    • Customer reporting issue with NPE on Android push notifications #298

    Merged pull requests:

    Source code(tar.gz)
    Source code(zip)
  • v1.2.10(Jan 20, 2022)

    Full Changelog

    Bug Fix:

    This bug affects customers using message content encryption alongside channel history for a single Ably client instance. It only affects the iOS runtime (not an issue on Android). History REST requests, on iOS only, were incorrectly returning encrypted payloads, despite encryption having been enabled via the Realtime channel setOptions API.

    Source code(tar.gz)
    Source code(zip)
  • v1.2.9(Jan 14, 2022)

  • v1.2.8(Dec 10, 2021)

  • v1.2.7(Dec 2, 2021)

    Full Changelog

    Implemented enhancements:

    • Replace optional fields with default values #230
    • Refactor example app to be more readable #212
    • AuthCallback and InstanceStore Refactoring and documentation #250 (ben-xD)
    • Serialize LogLevel using constants #244 (ben-xD)
    • Replace deprecated method calls in tests #243 (ben-xD)
    • Example app: Paginated results viewer widget #242 (ben-xD)
    • Example app: Move out Realtime and Rest UI to separate widget and service #240 (ben-xD)
    • Example app: Extract System Details sliver into new widget #239 (ben-xD)
    • Hide API key secret inside API key UI #237 (ben-xD)
    • Rename pushSetOnBackgroundMessage to pushBackgroundFlutterApplicationReadyOnAndroid #236 (ben-xD)
    • Add default values to ClientOptions #233 (ben-xD)

    Fixed bugs:

    • Clear iOS platform instances synchronously #249 (ben-xD)

    Closed issues:

    • 1.2.6 java.lang.NullPointerException when stream fails to close #274
    • 1.2.6 java.lang.NullPointerException when using token auth #272
    • setMockMethodCallHandler is deprecated. Use tester.binding.defaultBinaryMessenger.setMockDecodedMessageHandler instead #173

    Merged pull requests:

    • Rename inconsistent methods to be more consistent #248 (ben-xD)
    • Use Objective-C standard style for LogLevel enum #246 (ben-xD)
    • Platform encapsulation #235 (ben-xD)
    Source code(tar.gz)
    Source code(zip)
  • v1.2.6(Nov 25, 2021)

    Full Changelog

    Implemented enhancements:

    • Make the symmetric encryption UI more usable #229 (ben-xD)
    • Improve android logging: Remove unnecessary print statements, and use Log.w where necessary #228 (ben-xD)
    • iOS: add notification in RemoteMessage #224 (ben-xD)
    • Fix setOptions to complete the Future (previously did not call result.success) and remove side effects in example app #222 (ben-xD)

    Fixed bugs:

    • iOS push notifications error handling: Stop sending FlutterError through MethodChannel. It is not supported and crashes the app. #214
    • Explicitly check types of tokenDetails, instead of using macro which … #256 (ben-xD)

    Merged pull requests:

    • Docs improvement for Android push notifications #227 (ben-xD)
    • Reduce dart analysis warnings and hints and remove "Interface" classes (e.g. RealtimeInterface) #213 (ben-xD)
    • Remove unnecessary abstract classes #193 (ben-xD)
    Source code(tar.gz)
    Source code(zip)
  • v1.2.5(Nov 15, 2021)

  • v1.2.4(Nov 10, 2021)

  • v1.2.3(Nov 4, 2021)

  • v1.2.2(Nov 2, 2021)

    This release adds support for push notifications, including device activation with Ably (including device registration with APNs / FCM), subscribing devices for push notifications and handling the push notifications in your Flutter application, without writing iOS or Android code. Check out the push notifications documentation for more information. We also fixed some bugs that were either reported in Github issues or found internally.

    Full Changelog

    Implemented enhancements:

    • Update to latest ably-android version #147
    • Implement Push Notifications listener #141
    • Implement RSC7d (Ably-Agent header) #100
    • Push Notifications Device Registration (activation) and device subscription #107

    Fixed bugs:

    • Remove timeouts for platform method calls #171
    • Token Authentication with authCallback in Android: java.lang.Exception: Invalid authCallback response #156
    • AuthCallback error: java.lang.Exception: Invalid authCallback response on Flutter Android #121

    Closed issues:

    • Can not set RealTimeChannelOptions params #182
    • java lang Invalid authCallback response #181
    • Replace package:pedantic with package:flutter_lints #168
    • Push Registrations cannot be updated on Android: fails with No authentication information provided #167
    • Implement activation/ deactivation/ updating lifecycle method #154
    • Connect to Ably Realtime using socket_io_client #148
    • Failing Android build: The plugin ably_flutter could not be built URGENT #129
    • Add support for symmetric encryption #127
    • Lint rule to enforce strict raw types #85
    • Add linting rules #30

    Merged pull requests:

    • Fix 2 Channel options bugs #191 (ben-xD)
    • Fix RealtimeChannelOptions to avoid forcing cipher argument #190 (ben-xD)
    • Refactoring: Move classes into separate files #189 (ben-xD)
    • Add ably agent header #188 (ben-xD)
    • Update Ably-cocoa dependency to 1.2.6 #186 (ben-xD)
    • Bug fix: Reactivating devices for Push #185 (ben-xD)
    • Push Notifications documentation enhancement #177 (ben-xD)
    • Handle Push Notifications in Dart, including foreground messages, background messages and notification taps #166 (ben-xD)
    • Fix invalid authCallback response when using token authentication #164 (ben-xD)
    • Use image URLs instead of relative paths, and add note to CONTRIBUTING.md #163 (ben-xD)
    • Clarify documentation about when device uses APNs production/ development device tokens #161 (ben-xD)
    • Add documentation for token authentication #155 (ben-xD)
    • Push notifications (activation and subscription) #140 (ben-xD)
    Source code(tar.gz)
    Source code(zip)
  • v1.2.2-preview.1(Aug 31, 2021)

    This is a preview release of v1.2.2, which adds support for push notifications, including device activation with Ably (including device registration with APNs / FCM) and subscribing devices for push notifications. Check out the dedicated documentation (PushNotifications.md) and the example app (push_notification_service.dart) for more information.

    Full Changelog

    Implemented enhancements:

    • Push Notifications Device Registration (activation) and device subscription #107

    Merged pull requests:

    • Add documentation for token authentication #155 (ben-xD)
    • Push notifications (activation and subscription) #140 (ben-xD)
    Source code(tar.gz)
    Source code(zip)
  • v1.2.1(Aug 16, 2021)

    Full Changelog

    Implemented enhancements:

    • Migrate to null safety #82

    Closed issues:

    • Investigate libraries that can help leverage our push implementation #142
    • Could not find method coreLibraryDesugaring() for arguments #130
    • Create code snippets for homepage (flutter) #124
    • Make this SDK ready for the first non-preview release #102
    • Activate and getting Push Notifications #54

    Merged pull requests:

    • Bump ws from 5.2.2 to 5.2.3 in /example/test_harness #145 (dependabot[bot])
    • Skip 1 failing test, fix 1 failing test and schedule tests on main twice a day #144 (ben-xD)
    • Refactor large files into 1 file per class #138 (ben-xD)
    • Add instructions for M1 macs and fixing ruby fatal error for example apps #137 (ben-xD)
    • Migrate to null-safety #136 (tiholic)
    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Aug 16, 2021)

  • 1.2.0-preview.2(May 6, 2021)

  • 1.2.0-preview.1(Feb 17, 2021)

    Conformed Package Name and Version

    With this release we are conforming our version numbering to match that used in our other client libraries. This reflects the fact that this plugin is heading towards compliance with version 1.2 of our Features Specification, also aligning with the underlying implementations of ably-cocoa and ably-java.

    Package Name Change

    We're now simply ably_flutter (renamed from ably_flutter_plugin, as we realised the _plugin suffix was somewhat superfluous).

    All Changes

    Full Changelog

    Fixed bugs:

    • Unhandled TimeoutException error being thrown occassionally #72

    Closed issues:

    • native dart implementation #76
    • Improve our "pub points" score on pub.dev #65
    • Ably Flutter - Error building for android: target SDK less than 24 #25

    Merged pull requests:

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0+dev.2(Nov 17, 2020)

  • 1.0.0+dev.1(Nov 13, 2020)

    The first, development preview of our Flutter plugin, wrapping our iOS Cocoa and Android client libraries.

    Available on pub.dev as: ably_flutter_plugin

    Supported functionality

    • Create a REST or Realtime instance by passing ClientOptions:
      • ClientOptions can be created by passing an API token (ClientOptions.fromKey)
      • defaultTokenParams, authCallback and logHandler are not supported yet
    • Get a REST channel and publish messages
    • Listen for Realtime connection state changes using a stream subscription
    • Listen for Realtime channel state changes using a stream subscription
    • Connect and disconnect Realtime channels
    • Attach and detach Realtime channels
    • Subscribe for messages on a Realtime channel using a stream subscription
    • Publishing messages on a Realtime channel

    Merged pull requests:

    Source code(tar.gz)
    Source code(zip)
Owner
Ably Realtime - our client library SDKs and libraries
Ably’s platform lets you build, extend, and deliver powerful digital experiences in realtime. No complex infrastructure to manage just simple yet powerful APIs.
Ably Realtime - our client library SDKs and libraries
App HTTP Client is a wrapper around the HTTP library Dio to make network requests and error handling simpler, more predictable, and less verbose.

App HTTP Client App HTTP Client is a wrapper around the HTTP library Dio to make network requests and error handling simpler, more predictable, and le

Joanna May 44 Nov 1, 2022
A Flutter plugin for authenticating users by using the native TwitterKit SDKs on Android & iOS.

flutter_twitter_login A Flutter plugin for using the native TwitterKit SDKs on Android and iOS. This plugin uses the new Gradle 4.1 and Android Studio

Iiro Krankka 83 Sep 15, 2022
A simple dart zeromq implementation/wrapper around the libzmq C++ library

dartzmq A simple dart zeromq implementation/wrapper around the libzmq C++ library Features Currently supported: Creating sockets (pair, pub, sub, req,

Moritz Wirger 18 Dec 29, 2022
ESP-Touch Dart API for Flutter. Platform-specific implementation for Android (Java) and iOS (Objective-C).

esptouch_flutter Flutter plugin for ESP-Touch to configure network for ESP-8266 and ESP-32 devices. Runs on iOS and Android. esptouch_flutter is Flutt

SMAHO Engineering OSS 86 Dec 10, 2022
Encode App-Dev is a open source project which contains different projects of Application development, Android development, IOS development, Flutter, Kotlin, Dart, Java, Swift etc.

HACKTOBERFEST 2022 Encode App-Dev is an open source project which contains different projects of Application development, Android development, IOS dev

null 4 Dec 4, 2022
Our application, MyArmyPal serves to be an all in one service for our service men.

Our application, MyArmyPal serves to be an all in one service for our service men. It seeks to provide convenience and useful features just one tap away. Its main features include an IPPT Calculator, reservist checklist, customized IPPT training plan according to the user's current fitness level and a canteen order pick up service in all army camps. We are also implementing an anytime Eliss system using computer vision for users to check on their push up form easily.

Poh Wei Pin 3 Jun 17, 2022
An unofficial Flutter plugin that wraps pusher-websocket-java on Android and pusher-websocket-swift on iOS

Pusher Flutter Client An unofficial Flutter plugin that wraps pusher-websocket-java on Android and pusher-websocket-swift on iOS. Get it from pub. How

HomeX 31 Oct 21, 2022
Wraps Flutter shared_preferences plugin, providing a iOS Suite Name support, it's helpful for sharing data from App to Widget.

shared_preferences_ios_sn Wraps Flutter shared_preferences plugin and provides an iOS Suite Name support, it's helpful for sharing data from App to iO

null 3 Sep 14, 2022
Charlatan - A library for configuring and providing fake http responses to your dio HTTP client.

charlatan This package provides the ability to configure and return fake HTTP responses from your Dio HTTP Client. This makes it easy to test the beha

Betterment 14 Nov 28, 2022
A wrapper around Navigator 2.0 and Router/Pages to make their use a easier.

APS Navigator - App Pagination System This library is just a wrapper around Navigator 2.0 and Router/Pages API that tries to make their use easier: ??

Guilherme Silva 14 Oct 17, 2022
Shared preferences typed - A type-safe wrapper around shared preferences, inspired by ts-localstorage

Typed Shared Preferences A type-safe wrapper around shared_preferences, inspired

Philipp Bauer 0 Jan 31, 2022
This repository contains Collection of UIs made using Flutter. Original Design of all the UIs were created by someone else. I tried to recreate those UIs using Flutter

Flutter-UIs-Collection This repository contains Collection of UIs made using Flutter. Original Design of all the UIs were created by someone else. I t

Mohak Gupta 45 Nov 26, 2022
The Dart client for Teta CMS. Our mission is to help people build amazing products.

Teta CMS The Dart client for Teta CMS Introducing Teta CMS Teta CMS is a low-code back-end service. We provide: Scalable NoSQL database Real-time subs

Teta.so 101 Dec 22, 2022
Flutter plugin, support android/ios.Support crop, flip, rotate, color martix, mix image, add text. merge multi images.

image_editor The version of readme pub and github may be inconsistent, please refer to github. Use native(objc,kotlin) code to handle image data, it i

FlutterCandies 317 Jan 3, 2023
A Flutter plugin for IOS and Android providing a simple way to display PDFs.

Pdf Viewer Plugin A Flutter plugin for IOS and Android providing a simple way to display PDFs. Features: Display PDF. Installation First, add pdf_view

Lucas Britto 56 Sep 26, 2022
Flutter plugin for Optimizely native SDKs

optimizely_plugin Flutter plugin for Optimizely native SDKs Getting Started Currently Optimizely does not offer a dedicated flutter SDK. This flutter

Policygenius 4 Nov 29, 2022
Tribally SDKs enable your users to create communities and bring in more people to talk about the things they love.

tribally Tribally SDKs enable your users to create communities and bring in more people to talk about the things they love. Getting Started This proje

Horum 0 Dec 28, 2021
Let's setup Firebase​​ for our Flutter​​ app on Android​, iOS​ and Flutter Web. Setup Firebase to use Firebase products.

Flutter Tutorial - Firebase Setup For Flutter Web Let's setup Firebase for our Flutter app on Android, iOS and Flutter Web. Setup Firebase to use Fire

null 1 Apr 27, 2022
M.Yavuz Yagis 3 Feb 21, 2022