Giter Club home page Giter Club logo

exponea-flutter-sdk's People

Contributors

adam1929 avatar ankmara avatar frantisekgazo avatar igor-liska avatar michaela-dev avatar roland-misica avatar xcibik00 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

exponea-flutter-sdk's Issues

README says min SDK for iOS is 10.3, but build error claims 15.4

Could not build the precompiled application for the device.
Swift Compiler Error (Xcode): 'isElementFullscreenEnabled' is only available in iOS 15.4 or newer
/Users/mike/WorkArea/Projects/MobiKats/Movement/Benefit/Development/benefitapp/ios/Pods/ExponeaSDK/ExponeaSDK/ExponeaSDK/Classes/InAppMessages/View/InAppMessageWebView.swift:91:24

[ANDROID] empty gms token after update app

Steps for debug:

  1. do install old app without "Exponea"
  2. do install new app includes "Exponea"
  3. check logs.

You can see how "Exponea" send request with empty "Gms" token!

Steps for fixing this bug at now:

  1. You need to check empty gms token in PreferenceManager.getDefaultSharedPreferences by "ExponeaFirebaseToken" key
  2. If it empty, you need to call Firebase Messaging.getInstance().token and set to ExponeaPlugin.handleNewGmsToken

Temp solution
private fun fixOrSkip() { try { val token = PreferenceManager.getDefaultSharedPreferences(context).getString( "ExponeaFirebaseToken", "" ) if (token.isNullOrBlank().not()) { return } FirebaseMessaging.getInstance().token.addOnSuccessListener { ExponeaPlugin.handleNewGmsToken(context, it) } } catch (e: Exception) { //do nothing } }

AppInbox list screen is always in Dark theme on Android

Our app supports only Light UI theme with white background and dark text colors.
We are using AppInboxProvider Widget to show app inbox messages. Currently on Android it is always in Dark theme which is a complete mismatch to other parts of our app.

Current AppInbox list screen:
image

Please provide the ability to select Light theme for AppInbox screen.

Android not displaying push notification when app is swiped off

Due to the update of the native android SDK the push notifications when the app is swiped off are no longer being displayed until the app is manually opened.

This happens due to the SDK not auto initializing anymore.

I will create a PR that exposes some methods that allow 3rd party users to check the internal state of the Exponea SDK.

Flush mode is not manual

{"exception":{"values":[{"stacktrace":{"frames":[{"package":"app","abs_path":"app/base/bloc.dart","colno":7,"filename":"bloc.dart","function":"BlocImpl.launchPayload","in_app":true,"lineno":265,"unknown":{"package":"app"}},{"abs_path":""},{"package":"app","abs_path":"app/base/bloc.dart","colno":7,"filename":"bloc.dart","function":"BlocImpl.logout.","in_app":true,"lineno":149,"unknown":{"package":"app"}},{"abs_path":""},{"package":"app","abs_path":"app/internal/services/exponea_service.dart","colno":5,"filename":"exponea_service.dart","function":"_AppExponeaService.flush","in_app":true,"lineno":141,"unknown":{"package":"app"}},{"abs_path":""},{"package":"exponea","abs_path":"package:exponea/src/platform/method_channel.dart","colno":5,"filename":"method_channel.dart","function":"MethodChannelExponeaPlatform.flushData","in_app":true,"lineno":99,"unknown":{"package":"exponea"}},{"abs_path":""},{"package":"flutter","abs_path":"package:flutter/src/services/platform_channel.dart","colno":18,"filename":"platform_channel.dart","function":"MethodChannel._invokeMethod","in_app":false,"lineno":156,"unknown":{"package":"flutter"}},{"package":"flutter","abs_path":"package:flutter/src/services/message_codecs.dart","colno":7,"filename":"message_codecs.dart","function":"StandardMethodCodec.decodeEnvelope","in_app":false,"lineno":607,"unknown":{"package":"flutter"}}]},"type":"PlatformException","value":"PlatformException(ExponeaPlugin, Flush mode is not manual., null, null)"}]},"modules":{"StackWalker":"unknown","_fe_analyzer_shared":"unknown","aFileChooser":"unknown","abseil-cpp":"unknown","accessibility":"unknown","skia":"unknown","angle":"unknown","boringssl":"unknown","etc1":"unknown","khronos":"unknown","libwebp":"unknown","txt":"unknown","vulkan":"unknown","vulkan-deps":"unknown","wuffs":"unknown","base":"unknown","fuchsia_sdk":"unknown","zlib":"unknown","icu":"unknown","engine":"unknown","gpu":"unknown","image_picker":"unknown","tonic":"unknown","url_launcher_web":"unknown","analyzer":"unknown","rapidjson":"unknown","xxhash":"unknown","appsflyer_sdk":"unknown","args":"unknown","csslib":"unknown","logging":"unknown","async":"unknown","cli_util":"unknown","boolean_selector":"unknown","dart":"unknown","build":"unknown","build_runner":"unknown","code_builder":"unknown","web_socket_channel":"unknown","build_config":"unknown","graphs":"unknown","io":"unknown","build_daemon":"unknown","ffi":"unknown","package_config":"unknown","build_resolvers":"unknown","build_runner_core":"unknown","pubspec_parse":"unknown","test_api":"unknown","built_collection":"unknown","built_value":"unknown","characters":"unknown","checked_yaml":"unknown","charcode":"unknown","fixnum":"unknown","http_parser":"unknown","matcher":"unknown","path":"unknown","pool":"unknown","shelf_web_socket":"unknown","source_span":"unknown","stack_trace":"unknown","string_scanner":"unknown","yaml":"unknown","chewie":"unknown","chewie_audio":"unknown","clock":"unknown","fake_async":"unknown","quiver":"unknown","collection":"unknown","http2":"unknown","mime":"unknown","stream_channel":"unknown","typed_data":"unknown","colorama":"unknown","connectivity_wrapper":"unknown","convert":"unknown","crypto":"unknown","source_gen":"unknown","cookie_jar":"unknown","dio":"unknown","dio_cookie_manager":"unknown","cross_file":"unknown","device_info":"unknown","flutter_plugin_android_lifecycle":"unknown","image_picker_for_web":"unknown","image_picker_platform_interface":"unknown","package_info":"unknown","path_provider":"unknown","path_provider_linux":"unknown","path_provider_macos":"unknown","path_provider_windows":"unknown","plugin_platform_interface":"unknown","share":"unknown","shared_preferences":"unknown","shared_preferences_linux":"unknown","shared_preferences_macos":"u
D/Sentry (18746): Serializing object: {"sid":"86d754cd-086f-4869-8c84-35ff012144b","did":"f0fb19f6-2e65-4681-ab8e-ee65291222f","started":"2021-10-20T13:39:35.701Z","status":"ok","seq":1634737414173,"errors":3,"timestamp":"2021-10-20T13:43:34.173Z","attrs":{"release":"[email protected]","environment":"debug"}}

No campaign event appears with status "delivered" on iOS

When sending push notifications, only Android users receives the "delivered" campaign event - which makes it hard to calculate click-rates on iOS devices.

Both iOS and Android sucessfully receive the "Clicked" and "Sent" campaign event status.

When running in debug on iOS, the self-check on push notification suceeds - and all push notification sucessfully displays, and works as expected on both device types.

Android SDK release build failed

Trying to build prod build and get error
ERROR:/Users/mikhailvasilev/.gradle/caches/transforms-3/cc5eade814f67f35bebc86d29d898212/transformed/jetified-sdk-3.6.1-runtime.jar: R8: Type com.exponea.style.AppInboxListViewStyle is defined multiple times: /Users/mikhailvasilev/.gradle/caches/transforms-3/cc5eade814f67f35bebc86d29d898212/transformed/jetified-sdk-3.6.1-runtime.jar:com/exponea/style/AppInboxListViewStyle.class, /Users/mikhailvasilev/NK/novakid-mobile/build/exponea/intermediates/runtime_library_classes_jar/release/classes.jar:com/exponea/style/AppInboxListViewStyle.class

Is there a way to have at least 2 different sources of push notifications?

The first source is Exponea (pushes get delivered by APN)
The second is my backend (pushes get delivered by FirebaseMessaging)

Right now there is only the first source in my app. I use ExponeaFlutterAppDelegate like this:
image

And I want to add another source of push notifications. I'm going to use FirebaseMessaging to deliver pushes from my server. I'm going to modify my code like this:
image

I'm wondering how I can combine 2 sources at the same time? So if the push belongs to Exponea then I don't have to do anything additional to handle it (just use the current implementation). Otherwise, if the push doesn't belong to Exponea then I want to listen to pushes somewhere in the dart code by using FirebaseMessaging.onMessage() or FirebaseMessaging.onMessageOpenedApp()

any help would be appreciated. Thank you

Unable to build iOS with Xcode 14.2

After upgrading the plugin from version 1.4.2 to version 1.6.0
there are compile errors when using Xcode 14.2.
It works fine with Xcode 15.0.1

Compile errors below:

Swift Compiler Error (Xcode): Reference to property 'calculator' in closure requires explicit use of 'self' to make capture semantics explicit
.../ios/Pods/ExponeaSDK/ExponeaSDK/ExponeaSDK/Classes/InAppContentBlocks/InAppContentBlocksManager.swift:713:16


Swift Compiler Error (Xcode): Reference to property 'calculator' in closure requires explicit use of 'self' to make capture semantics explicit
.../ios/Pods/ExponeaSDK/ExponeaSDK/ExponeaSDK/Classes/InAppContentBlocks/InAppContentBlocksManager.swift:714:16


Swift Compiler Error (Xcode): Reference to property 'inAppContentBlockMessages' in closure requires explicit use of 'self' to make capture semantics explicit
.../ios/Pods/ExponeaSDK/ExponeaSDK/ExponeaSDK/Classes/InAppContentBlocks/InAppContentBlocksManager.swift:760:33


Swift Compiler Error (Xcode): Reference to property 'isUpdating' in closure requires explicit use of 'self' to make capture semantics explicit
.../ios/Pods/ExponeaSDK/ExponeaSDK/ExponeaSDK/Classes/InAppContentBlocks/InAppContentBlocksManager.swift:761:20


Swift Compiler Error (Xcode): Reference to property 'calculator' in closure requires explicit use of 'self' to make capture semantics explicit
.../ios/Pods/ExponeaSDK/ExponeaSDK/ExponeaSDK/Classes/InAppContentBlocks/InAppContentBlocksManager.swift:764:16


Encountered error while building for device.

iOS build fails

Trying to build for iOS with the version of the plugin 1.1.0 fails due to the following error

ExponeaSDK/ExponeaSDK/ExponeaSDK/Classes/InAppMessages/View/InAppMessageWebView.swift:91:24
Swift Compiler Error (Xcode): 'isElementFullscreenEnabled' is only available in iOS 15.4 or newer

if #available(iOS 15.0, *) { <- This is the if statement that causes the issue
    preferences.isElementFullscreenEnabled = false
}

Changing this to 15.4, solves the problem and I was able to build.

On the newest iOS SDK version this problem seems to be solved, so maybe an update to the native SDKs will be sufficient

Anonymization call crashes in a specific scenario

Hi,

After deploying the latest version of the SDK (1.3.1), in cooperation with @pantelistsakoulis-ts we have discovered the following issue.

There is a bug in the plugin in a specific scenario:

  1. Do a fresh install of the app
  2. Login with a user
  3. Kill the app (swipe it off)
  4. Open the app and try to logout out
  5. The "anonymize" call to the Exponea plugin crashes due to missing configuration (the Exponea plugin is out of sync with the Exponea SDK

This is happening because the Exponea SDK can auto initialise before the Exponea Plugin is initialised thus the Exponea Plugin does not include all the required configuration.

As a temporary measure, @pantelistsakoulis-ts included some more crash handling in the app to handle this, but we believe the proper solution requires an update on the plugin.

Method channel error

Currently when we are sending some events, after sending a couple of events we are seeing this log in our console:

[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(ExponeaPlugin, Invalid type for value in data 'NSNull'., null, null)
#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:653:7)
#1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:315:18)

#2 MethodChannelExponeaPlatform.trackEvent (package:exponea/src/platform/method_channel.dart:126:5)

Not sure it was unable to send events or if some events were missing some information. But will just put it here for your reference

AppInboxProvider not visible on iOS

AppInboxProvider Widget is not visible on iOS platform.
When I try to display the widget I get an error:

[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(unregistered_view_type, A UIKitView widget is trying to create a PlatformView with an unregistered type: < FluffView >, If you are the author of the PlatformView, make sure `registerViewFactory` is invoked.
See: https://docs.flutter.dev/development/platform-integration/platform-views#on-the-platform-side-1 for more details.

Fix PR: #15

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.