Code Monkey home page Code Monkey logo

Comments (7)

rlepinski avatar rlepinski commented on September 25, 2024 1

Either, as long as the app has to start the lifecycle again (Android Application#onCreate, iOS didFinishLaunching). The underlying Airship SDK only supports being initialized once per app lifecycle at the moment. And once takeOff is called, we need to reinitialize the SDK during the beginning of the apps lifecycle in order to properly handle notifications.

If you are just avoiding hardcoding credentials in your app, I don't see any problems with this approach. If you are trying to change what Airship app you point to at runtime, thats where things don't work out as nicely.

In terms of an ETA, I can't really provide that right now. I might have some time to try to get it to work this week but it's not trivial what needs to be done. Ill keep you updated.

from airship-flutter.

rlepinski avatar rlepinski commented on September 25, 2024 1

Working on wrapping up the release. Hopefully we will have something this week.

from airship-flutter.

rlepinski avatar rlepinski commented on September 25, 2024

Its not possible right now in the plugin, but I will look into what it would take to make it possible. In our cordova plugin we make it possible to call takeOff from the cordova context, we then persist those config values. If takeOff is called again, the config wont take effect until next run. I assume that would work for you?

from airship-flutter.

ailic88 avatar ailic88 commented on September 25, 2024

@rlepinski first thanks for quick response. When you say next run, do you mean on cold start("kill" app and run it again) or you mean on warm start(restart and re-initialise). For my app is not acceptable to keep keys locally, so if you could expose takeOff() method it would be perfect. Do you have any ETA when you can apply this change?

from airship-flutter.

rlepinski avatar rlepinski commented on September 25, 2024

I made some progress but having issues deploying to devices for whatever reason so I have not been able to verify anything. I am pretty sure I can finish this up early next week and once its been code reviewed we will merge into main where at that point it will be just waiting to be released. We wont do an actual release for a few more weeks because we are trying to add support for a bunch of new things that we released recently, but you could point to main/sha with the change to start using it early.

https://github.com/urbanairship/airship-flutter/tree/GH-115

I am only exposing app key/secret in flutter for takeOff. The SDK will combine the config from the airship config properties with the key/secret in flutter and try to use that if it is valid. That way we can avoid trying to expose all options for both platforms in flutter.

Credentials in the airship config file take precedence. For example, If you hardcode developmentAppKey/Secret but try to set a different set of credentials at runtime, they will be ignored for debug builds. Seemed useful to be able to override it like that but if you have other opinions I would love to hear them.

from airship-flutter.

ailic88 avatar ailic88 commented on September 25, 2024

@rlepinski this works for me. You can close this issue when new version with the changes is released. Any idea when it could happen?

from airship-flutter.

rlepinski avatar rlepinski commented on September 25, 2024

Fixed in 5.3.0

from airship-flutter.

Related Issues (20)

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.