когда я пытаюсь запустить (npx реагирование -native run-ios) Я получил следующую ошибку:
ошибка Не удалось собрать проект iOS. «xcodebuild» завершился с кодом ошибки «65». Для дальнейшей отладки журналов сборки рассмотрите возможность создания приложения с помощью Xcode.app, открыв «mag11.xcworkspace».
Вызов командной строки:
/Applications/Xcode.app/Contents/Developer/usr/bin/ xcodebuild -workspace mag.xcworkspace -configuration Debug -scheme mag -destination id=92D5357D-9552-4709-9C26-AB2372F45C7D
/FirebaseCoreInternal/FirebaseCoreInternal.modulemap' не найден
1 возникла ошибка.
Я добавил зависимость
"@react-native-community/push-notification-ios": "^1.11.0 ",
"@react-native-firebase/app": "^20.0.0",
"@react-native-firebase/messaging": "^20.0.0",
**вот мой AppDelegate.m
**
Код: Выделить всё
#import "AppDelegate.h"
#import
#import
#import
#import
#import
#import
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
if ([FIRApp defaultApp] == nil) {
[FIRApp configure];
}
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"mag"
initialProperties:nil];
rootView.backgroundColor = [UIColor whiteColor];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
return YES;
}
@end
**
Код: Выделить всё
# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
'require.resolve(
"react-native/scripts/react_native_pods.rb",
{paths: [process.argv[1]]},
)', __dir__]).strip
platform :ios, min_ios_version_supported
prepare_react_native_project!
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => :static
$RNFirebaseAsStaticFramework = true
end
target 'mag' do
config = use_native_modules!
# Flags change depending on the env values.
flags = get_default_flags()
# use_frameworks! :linkage => :static
pod 'FirebaseMessaging'
pod 'FirebaseCore', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
use_react_native!(
:path => config[:reactNativePath],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
target 'magTests' do
inherit! :complete
# Pods for testing
end
post_install do |installer|
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false,
# :ccache_enabled => true
)
end
end
Я добавил список сервисов в проект в Xcode и добавил Firebase SDK в проект и настроил APNS с веб-сайта разработчика.
Я добавил push-уведомление и серверный режим в возможности.
У меня есть добавлена зависимость
"@react-native-community/push-notification-ios": "^1.11.0",
"@react-native-firebase/app" : "^20.0.0",
"@react-native-firebase/messaging": "^20.0.0",
Мне приходилось собирать и воссоздавать модуль несколько раз безуспешно.
Подробнее здесь: https://stackoverflow.com/questions/785 ... ot-working
Мобильная версия