saltyshiomix / nextron

⚡ Next.js + Electron ⚡
https://npm.im/nextron
MIT License
3.88k stars 223 forks source link

"Nextron Application is Damanaged or can't be opened" error in Mac M1 #355

Closed dhineshtp closed 11 months ago

dhineshtp commented 1 year ago

@saltyshiomix Can't able to install nextron app in M1 Mac

When I build using my Macbook M1 pro, without any issues the build geting completed.

But when I tried to install the application, Im getting error like Nextron Application is Damanaged or can't be opened. Im facing this issue with the apple's silicon only. with Intel Mac, everything is working.

Im using nextron v8.5.0 , electron v21.3.3, and electron-builder v23.6.0. I search on the internet, and tried many things as well. Still I can't able to resolve this issue. If i get someone's step by step guide, will be really helpful for me to solve this issue.

For windows, it's working fine without any issues.

Screenshot 2023-04-28 at 3 57 25 PM

VovaTereschenko commented 1 year ago

Any success? :)

VovaTereschenko commented 1 year ago

Try this in electron-builder.yml

mac: {
  target: {
    target: 'default',
    arch: [
      'x64',
      'arm64'
    ]
  },
}
bm777 commented 11 months ago

@dhineshtp M1 has an arm64 arch. Are you building it from the same m1? I have an M2, I can build and run an app for an arm64, x64 arch -> MacOS.

In your package.js file, make sure to have this "build:mac_arm64": "nextron build --mac --arm64" :

{
  "....": "...",
  "scripts": {
    "dev": "nextron",
    "build": "nextron build",
    "build:all": "nextron build --all",
    "build:mac_x64": "nextron build --mac --x64",
    "build:mac_arm64": "nextron build --mac --arm64",
    "postinstall": "electron-builder install-app-deps"
  },
  "dependencies": {
    "package.x": "^x.x.x",
  },
  "devDependencies": {
    "packages.x": "^x.x.x",
  }
}
dhineshtp commented 11 months ago

Thanks, it's working for me. Thanks @bm777