lichess-org / lichobile

lichess.org mobile application
https://lichess.org/mobile
GNU General Public License v3.0
2.04k stars 318 forks source link

Instructions on building for only iOS #1144

Open thomasv314 opened 4 years ago

thomasv314 commented 4 years ago

Is it possible to build lichoble only for iOS?

I'd like to take a stab at a fix for some of the bugs affecting me in the recent version of the iOS build, but am stuck trying to build the application due to some android errors.

After running npm run build I hit an error related to android plugins:

[web-build] build/main.js → www...
[web-build] created www in 3.4s
[web-build] npm run web-build exited with code 0
✔ Copying web assets from www to android/app/src/main/assets/public in 249.77ms
✔ Copying native bridge in 1.20ms
✔ Copying capacitor.config.json in 1.08ms
  Found 3 Cordova plugins for android
    capacitor-cordova-plugin-stockfish (2.0.0)
    cordova-plugin-fullscreen (1.2.0)
    cordova-plugin-insomnia (4.2.0)
✖ copy: ENOENT: no such file or directory, open '/Users/foo/code/lichobile/android/capacitor-cordova-android-plugins/src/main/AndroidManifest.xml'
[error] { [Error: ENOENT: no such file or directory, open '/Users/foo/code/lichobile/android/capacitor-cordova-android-plugins/src/main/AndroidManifest.xml']
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path:
   '/Users/foo/code/lichobile/android/capacitor-cordova-android-plugins/src/main/AndroidManifest.xml' }

I am affected by and can reproduce #1139 #1138 #1133 #1131, so if I can get this up and running I'll work on PR's to fix. FWIW, most of these bugs I'm seeing on the latest version of iOS on an iPhone 8.

veloce commented 4 years ago

As I don't reproduce them for now (except #1139) that would be great indeed. I'll try to fix this build issue (that I can reproduce in a fresh clone).

veloce commented 4 years ago

Ok, found it: you need to run npx cap update to fix this. In order to build the ios app, you need to have cocoapods installed and run pod repo update before running npx cap update. (https://capacitor.ionicframework.com/docs/getting-started/dependencies)

Also the iOS build will fail because you don't have the ios/App/App/GoogleService-Info.plist file. Perhaps you can try with an empty file, and if it doesn't work generate one from a firebase test account.