Can't install swift package in react native - ios

I have tried to install swift package in react native
The steps were as follow:
cd ios
vim Podfile
and added the line:
pod JZCalendarWeekView
pod install
And then I have tried to import the package in the customView.swift file.
But I faced the terrible error:
I have tried to fix as this solution but couldn't solve it.
Who can help me?

Related

react native expo prebuild error `UMCore` depended upon by `EXFont`

I am working on a React Native Project based on a bare workflow, and my project is not working on Xcode.
I use expo modules but when i want to setup my ios project by the command "expo prebuild" i get the following error:
⚠️ Something went wrong running pod install in the ios directory.
Command pod repo update failed.
└─ Cause: Couldn't install: EXFont » UMCore. Ensure the CocoaPod "UMCore" is installed in your project, then run npx pod-install to try again.
It seems Cocoapods did not install this file.. but i have no idea how to do it.
And When i launch the command "pod install" i get :
"[!] Unable to find a specification for UMCore depended upon by EXFont"
I followed this guide from Expo : https://github.com/expo/fyi/blob/main/expo-modules-migration.md
It works fine on my Android Project.
I got the latest version of Expo and CocoaPods and my Xcode version is 13.0.
Any idea ? I did not found a lot of topics on this subject, and none solve this error...
I had similar errors after updating the expo.
In my case it was:
[!] Unable to find a specification for UMCore depended upon by EXSecureStore
[!] Unable to find a specification for UMCore depended upon by EXLinearGradient
Solution
expo install expo-secure-store
expo install expo-linear-gradient
cd ios
pod install --repo-update --clean-install
To solve your issue, I think you need to do:
expo install expo-font
cd ios
pod install # or `pod install --repo-update --clean-install`

Problem with firebase_in_app_messaging dependency. Getting error : "Use of undeclared identifier 'FIRInAppMessaging' "

I've installed firebase_in_app_messaging: ^0.1.2 Flutter lib from pub.dev. After that, I couldn't run the app because iOS can't see FIRInAppMessaging. Checked in Xcode Pods/Targets there is no FirebaseInAppMessaging pod installed. Does anybody else had this problem and knows how to fix it?
I've tried fixing it with adding pod 'FirebaseInAppMessaging' into the Podfile and running pod install and it works but I am searching for a better solution because Podfile is autogenerated file in Flutter.

something wrong when I install Google-Mobile-Ads-SDK

when I try to add google mobile ads sdk to my file, there comes out some problems.
when i start install:
pic1
there is nothing wrong here, but when i run the app with xcode, i got a lot of error:
pic2
i don't know how to fix that ...... if anyone could help me ? thanks!!!!!!
Open your old project(without Google-Mobile-Ads-SDK framework), I think it was working(compiling & running) properly. Now add Google-Mobile-Ads-SDK pod line in the project's pod file and install pod by --no-repo-update in the terminal.
pod install --no-repo-update

Modules are not being linked in React Native 0.60.5

I created a new React Native 0.60.5 project using react-native init, and added the two modules react-native-vector-icons and react-native-device-info using npm i react-native-vector-icons and npm i react-native-device-info, respectively. However, neither .xcodeproj file appears in my Libraries folder as they normally would, and nothing changes in my Podfile. I haven't tested out if they work in the actual project yet, but just noticed this unusual behaviour and wanted to understand why.
From React native version >= 0.60 Autolinking feature is added , you do not have to run link command .
When you install library using npm/yarn , the library is auto added in pod file and files will not be added in ".xcodeproj"(it is for project with out pod but in react native >= 0.60 , pod is mandatory) .
You just have to run this command
cd ios && pod instal

How to fix 'Invariant Violation: requireNativeComponent: "RNGADBannerView" was not found in the UIManager'?

Recently I tried to add react-native-admob to my app.
I got an error while working on ios.
Invariant Violation: requireNativeComponent: "RNGADBannerView" was not found in the UIManager.
"react": "16.8.6",
"react-native": "0.60.5",
"react-native-admob": "^2.0.0-beta.5",
I added this to podfile.
pod 'Google-Mobile-Ads-SDK'
And then, install pod again.
cd ios
pod install
I also added GADApplicationIdentifier to info.
import {
AdMobBanner,
} from 'react-native-admob'
class BannerAds extends Component {
render() {
return (
<AdMobBanner
style={styles.bottomBanner}
adSize="banner"
adUnitID="my app id"
onAdFailedToLoad={error => console.error(error)}
/>
// <View>
// </View>
)
}
}
it looks like react-native-admob package doesn't support autolinking (introduced in React Native 0.60) - it's still necessary to link it manually:
react-native link react-native-admob
I want to recommend others to use the latest version of React, React Native, and react-native-admob.
In recent versions, all packages support autolinking.
This really helps us to use packages easily.
i'm not sure if this is still useful but
i installed the library again
run this command to unlink if it's linked, remember react native auto-linking is working fine
npx react-native unlink react-native-admob
remove the library from the project
npm unlink react-native-admob -S
run pod install
npx pod-install OR cd ios && pod install
install the library again
npm i react-native-admob -S OR yarn react-native-admob
after installation complete, open ios/Podfile file and add the following
pod 'Google-Mobile-Ads-SDK', '7.69.0'
run pod install
that should solve it.

Resources