This is app on react-native for ios, I want improve it with push-notifications using firebase. But it's crushes when i build project by command "react-native run-ios" or by xcode. I looked for solutions, but answer:
( - Open the terminal and go to your project ios directory
- Type in pod init (If it doesn't exist) and then pod install
- Open the workspace project and delete the build from ios folder
- Run react-native run-ios from terminal.) - does not work for my project, also I tried command "pod update" it's also didn't help me.
I attach content of two files Podfile and AppDeligate.h, it might be problem with them.
#Podfile
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '10.0'
target 'appName' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
pod 'RNFBApp', :path => '../node_modules/@react-native-firebase/app'
pod 'RNFBMessaging', :path => '../node_modules/@react-native-firebase/messaging'
target 'appNameTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
end
target 'appName-tvOS' do
# Pods for appName-tvOS
target 'appName-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
##AppDeligate.h
#import <React/RCTBridgeDelegate.h>
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>
@property (nonatomic, strong) UIWindow *window;
@end
Your podfile deployment target is 10.0, Can you verify if thats the same target set in the project in Xcode. At times we run in this issue due to mismatch of the deployment target.