/
githubmirror
/
react-native
Обзор
Документация
Войти
/
githubmirror
/
react-native
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/react-native-test-library/apple/TestLibraryApple.mm
27 строк
919 B
Christian Falch
feat(iOS) swiftpm support in iOS (#57332)
15 июл 2026, 15:08
15 июл 2026, 15:08
47fad09
Код
Авторство
О чём код?
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #import "TestLibraryApple.h" // Synth library products are emitted as .library(type: .dynamic, ...), so SPM // wraps each autolinked dep as a Foo.framework under PackageFrameworks/. That // gives angle-bracket imports the standard <Module/Header.h> resolution path, // matching how most React Native libraries already organize their headers. #import <ReactNativeTestLibraryCommon/TestLibraryCommon.h> @implementation TestLibraryApple RCT_EXPORT_MODULE() RCT_EXPORT_METHOD( echo : (NSString *)message resolve : (RCTPromiseResolveBlock)resolve reject : (RCTPromiseRejectBlock)reject) { NSString *prefix = [TestLibraryCommon defaultPrefix]; resolve([NSString stringWithFormat:@"%@apple: %@", prefix, message]); } @end