mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
22 lines
599 B
Plaintext
22 lines
599 B
Plaintext
// Copyright 2013 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#include "flutter/shell/platform/darwin/common/command_line.h"
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
namespace flutter {
|
|
|
|
fml::CommandLine CommandLineFromNSProcessInfo() {
|
|
std::vector<std::string> args_vector;
|
|
|
|
for (NSString* arg in [NSProcessInfo processInfo].arguments) {
|
|
args_vector.emplace_back(arg.UTF8String);
|
|
}
|
|
|
|
return fml::CommandLineFromIterators(args_vector.begin(), args_vector.end());
|
|
}
|
|
|
|
} // namespace flutter
|