-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Open
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: existing-appsIntegration with existing apps via the add-to-app flowIntegration with existing apps via the add-to-app flowplatform-iosiOS applications specificallyiOS applications specificallyteam-iosOwned by iOS platform teamOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-iosTriaged by iOS platform teamTriaged by iOS platform team
Description
We found that there is Run Flutter Build Script in flutter 1.9.
flutter_export_environment_path = File.join('$SRCROOT', relative, 'flutter_export_environment.sh');
script_phase :name => 'Run Flutter Build Script',
:script => "set -e\nset -u\nsource \"#{flutter_export_environment_path}\"\n\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/xcode_backend.sh build",
:input_files => [
File.join('$SRCROOT', flutter_application_path, '.metadata'),
File.join('$SRCROOT', relative, 'App.framework', 'App'),
File.join('$SRCROOT', relative, 'engine', 'Flutter.framework', 'Flutter'),
flutter_export_environment_path
],
:execution_position => :before_compile
Under normal circumstances can meet our normal use. However, if our Podfile is not in the .xcodeproj directory, ie the Podfile is not in the $SRCROOT directory, then this place is faulty.
File.join('$SRCROOT', flutter_application_path, '.metadata'),
File.join('$SRCROOT', relative, 'App.framework', 'App')
File.join('$SRCROOT', relative, 'engine', 'Flutter.framework', 'Flutter')
File.join('$SRCROOT', relative, 'flutter_export_environment.sh') these paths are not exists.
Suggestion:
I suggest that we can add a parameter pod_path.
in Podfile:
pod_path = current_Podfile_path
install_all_flutter_pods(flutter_application_path, pod_path)
in podhelper.rb:
pod_path ||=flutter_application_path
flutter_export_environment_path = File.join(pod_path, relative, 'flutter_export_environment.sh');
script_phase :name => 'Run Flutter Build Script',
:script => "set -e\nset -u\nsource \"#{flutter_export_environment_path}\"\n\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/xcode_backend.sh build",
:input_files => [
File.join(pod_path, flutter_application_path, '.metadata'),
File.join(pod_path, relative, 'App.framework', 'App'),
File.join(pod_path, relative, 'engine', 'Flutter.framework', 'Flutter'),
flutter_export_environment_path
],
:execution_position => :before_compile
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: existing-appsIntegration with existing apps via the add-to-app flowIntegration with existing apps via the add-to-app flowplatform-iosiOS applications specificallyiOS applications specificallyteam-iosOwned by iOS platform teamOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-iosTriaged by iOS platform teamTriaged by iOS platform team