GithubHelp home page GithubHelp logo

Comments (9)

andreMariano90 avatar andreMariano90 commented on June 3, 2024 2

Doing the same here. Probably because I'm running it on Vue, I cant figure out any other alternative.
My last atempt was running it on the Home.vue calling only once.
@EddyVerbruggen , do you intend on developing a demo for ns-vue? It shouldnt be a problem right?
In Android it works perfectly

from nativescript-app-sync.

andreMariano90 avatar andreMariano90 commented on June 3, 2024 1

After a long time I discovered what happened.

There is a before-prepare that checks if the ios folder exists.
https://github.com/NativeScript/nativescript-app-sync/blob/master/src/scripts/ios/appsync-ios.js

Sometimes this folder was not created yet, then you will see this log:
"iOS not installed, skipping AppSync hook."

To fix this issue, You must build it twice without removing the plataforms folder.

I know its a workaround, probably changing when triggering this event would work.

from nativescript-app-sync.

manijak avatar manijak commented on June 3, 2024

UPDATE: False alert :)
I did some cleanup in my main.ts. I had sveral instances listening to the application.resumeEvent. Cleaned everything up so that there is just one of each event in the file.

Ran the build, got the update, restarted the app. And the update is applied! Awesome πŸ‘ ! This even worked on the ios simulator.

From my understanding, the updateDialog is only available on Android (installMode.IMMEDIATE).

from nativescript-app-sync.

EddyVerbruggen avatar EddyVerbruggen commented on June 3, 2024

Good job!

The immediate dialog is also possible on iOS, but if your app is reviewed by Apple make sure you don’t show it as afaik they don’t allow apps to bother users with update dialogs.

from nativescript-app-sync.

manijak avatar manijak commented on June 3, 2024

Yeah I figured that out :) Do have a separate view where I show app-info like version & buildnr. Will add the updateLabel there as well. πŸ‘

So if dialogs are a no-no, what about the "toast" notifications? Like in the nativescript-feedback plugin?

from nativescript-app-sync.

EddyVerbruggen avatar EddyVerbruggen commented on June 3, 2024

AFAIK they don't want you to prompt the user to restart the app.

from nativescript-app-sync.

andreMariano90 avatar andreMariano90 commented on June 3, 2024

@manijak , how did you solve it? I'm having the exact same problem. iOS informs that the appSync was instaled but it wasnt. I made somehow it work in the simulator only 1 time. Now it doesnt work in the simulator and in the real device as well

from nativescript-app-sync.

manijak avatar manijak commented on June 3, 2024

@andreMariano90 honestly my app.ts file was a bit messy, I had events all over the place and some of them doubled up. So I just cleaned up everything there making sure I just hook to the application-events only once, including the resumeEvent:

on(resumeEvent, () => {
    AppSync.sync({ ... }
    }, (syncStatus: SyncStatus, updateLabel?: string) => { ... }
    });
});

from nativescript-app-sync.

ShobhitJain3040 avatar ShobhitJain3040 commented on June 3, 2024

I am also getting same issue in device both android and iOS while the in simulator it is working fine. @manijak I have cleared all the resumeEvent listeners but still not able to resolve this issue.

from nativescript-app-sync.

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.