| Flutter macOS Embedder |

command_line.mm
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #import "flutter/shell/platform/darwin/common/command_line.h"
6
7 #import <Foundation/Foundation.h>
8
9 namespace flutter {
10
11 fml::CommandLine CommandLineFromNSProcessInfo(NSProcessInfo* processInfoOrNil) {
12 std::vector<std::string> args_vector;
13 auto processInfo = processInfoOrNil ? processInfoOrNil : [NSProcessInfo processInfo];
14
15 for (NSString* arg in processInfo.arguments) {
16 args_vector.emplace_back(arg.UTF8String);
17 }
18
19 return fml::CommandLineFromIterators(args_vector.begin(), args_vector.end());
20 }
21
22 } // namespace flutter
command_line.h
flutter
Definition: AccessibilityBridgeMac.h:16
flutter::CommandLineFromNSProcessInfo
fml::CommandLine CommandLineFromNSProcessInfo(NSProcessInfo *processInfoOrNil=nil)
Definition: command_line.mm:11