• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2019 The Chromium 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 "hello_shared.h"
6
7@implementation Greetings
8
9+ (NSString*)greet {
10  return [NSString stringWithFormat:@"Hello from %@!", [Greetings displayName]];
11}
12
13+ (NSString*)greetWithName:(NSString*)name {
14  return [NSString stringWithFormat:@"Hello, %@!", name];
15}
16
17+ (NSString*)displayName {
18  NSBundle* bundle = [NSBundle bundleForClass:[Greetings class]];
19  return [[bundle infoDictionary] objectForKey:@"CFBundleName"];
20}
21
22@end
23