leanflutter / auto_updater

This plugin allows Flutter desktop apps to automatically update themselves (based on sparkle and winsparkle).
MIT License
285 stars 41 forks source link

Error when updating after all configuration done in windows and macos #50

Closed kekko7072 closed 1 year ago

kekko7072 commented 1 year ago

Hy i have this opensource app :https://github.com/kekko7072/lms. I have configured everything, but when I try windows it doesn't update it return an error and not updating.

I have all configured and signed (you can see the sign firm on the opensource project).

What is wrong? It return the error that it's not connected to internet, but the device it is. In macOS i have issue only on produciton, when i'm building the app with flutter i don't have this issue it update successfully. In production i have this: An error occurred while launching the installer. Please try again later.

Screenshot 2023-05-28 alle 12 29 45

Note: I'm using firebase hosting as deployment server.

lijy91 commented 1 year ago

On macOS platform auto_updater does not support sandbox mode yet, you need to disable it to use it.

Modify this file macos/Runner/Release.entitlements

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.security.app-sandbox</key>
-   <true/>
+   <false/>
    <key>com.apple.security.cs.allow-jit</key>
    <false/>
    <key>com.apple.security.device.usb</key>
    <true/>
    <key>com.apple.security.files.downloads.read-write</key>
    <true/>
    <key>com.apple.security.network.client</key>
    <true/>
    <key>com.apple.security.network.server</key>
    <true/>
</dict>
</plist>

https://github.com/leanflutter/auto_updater#macos-3

lijy91 commented 1 year ago

Also I tested your windows version and it seems to work fine, but the actual version number of the package with 1.1.0+10 in appcast.xml is still 1.0.0, so it keeps checking until newer version.

lijy91 commented 1 year ago

Please check and fix it

kekko7072 commented 1 year ago

Thank you @lijy91 , now it's working. Can i ask you some question:

  1. When i update the app in pubspec.yaml i need to update only version in appcast.xml for macOS and windows ?
  2. When i distribute the app i should Notorize it with apple Xcode, but when i add the update to appcast.xml i don't need to notorize it? Am i Right?