cedvdb / action-flutter-build-ios

Github action that sets up a macos environment to build an ios app
MIT License
23 stars 8 forks source link

GitAction looks for the local path for dart entry-point #3

Closed IKRAMULHAQ786 closed 2 months ago

IKRAMULHAQ786 commented 2 months ago

I have completed the setup as you mentioned in the readme file. When i ran the workflow it failed and surprisingly it was looking for dart enrty point at the local path instead of repository path. here is error details:

Archiving com.xyz.cryodrive.dev...
ios/Runner/AppDelegate.swift uses the deprecated @UIApplicationMain attribute, updating.
Automatically signing iOS for device deployment using specified development team in Xcode project: 4********8
Running pod install...                                              3.1s
Running Xcode build...                                          
Xcode archive done.                                         56.5s
Failed to build iOS app
Error (Xcode): ../../../../mac/StudioProjects/cryodrive/lib/main_dev.dart: Error: Error when reading '../../../../mac/StudioProjects/cryodrive/lib/main_dev.dart': No such file or directory
Encountered error while archiving for device.
Error: Process completed with exit code [1]

I wonder is there any way i could specify (if needed) where to look for the dart-entry-point.

IKRAMULHAQ786 commented 2 months ago

My Bad. I am not very expert with the ios development at the moment. so i thought may be the error has something to do with the GitAction. But it was not. I just modified Build Configuration so that each scheme targets the right dart entry point both locally and in github actions. I replaced the absolute paths into relative paths and the error was gone.

Old Configuration:

Release-dev : /mac/StudioProjects/cryodrive/lib/main_dev.dart
Release-stag : /mac/StudioProjects/cryodrive/lib/main_stag.dart
Release-prod : /mac/StudioProjects/cryodrive/lib/main.dart

New Configuration:

Release-dev : lib/main_dev.dart
Release-stag : lib/main_stag.dart
Release-prod : lib/main.dart