After
npm install --save react-native-permissions
I added
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways.podspec"
pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse.podspec"
to my Podfile.
Then updated info.plist with adding
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>YOUR TEXT</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>YOUR TEXT</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>YOUR TEXT</string>
But when I try to install pods with
cd ios
pod install
it gives an error as a title.
Please help me.
React native info output:
System:
OS: macOS 10.15
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Memory: 944.84 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.16.1 - /usr/local/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
Android SDK:
API Levels: 23, 25, 26, 27, 28
Build Tools: 27.0.3, 28.0.3, 29.0.0
System Images: android-28 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5692245
Xcode: 10.3/10G8 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.5 => 0.60.5
npmGlobalPackages:
react-native-cli: 2.0.1
Library version: 1.2.0
@efecantekin Library version: 1.2.0. Documentation on master is for the latest version, 2.0.2
i am still not getting , what exactly to do may you please explain in brief ?
@hemantsati95 when you use the 3.0.0 release you have to remove the ".podspec" extensions in your Podfile.
https://github.com/zoontek/react-native-permissions/releases/tag/3.0.0 Breaking Change => .podspec extension is no longer required in your Podfile
@hemantsati95 when you use the 3.0.0 release you have to remove the ".podspec" extensions in your Podfile.
https://github.com/zoontek/react-native-permissions/releases/tag/3.0.0 Breaking Change => .podspec extension is no longer required in your Podfile
It worked for me!
When i tried to install react-native-permissions i had a error saying that if i want to use 3.0.0 version, I need to update react-native version. So i updated my react native version from 0.63.2 to 0.63.4 and the library installation by npm was successful.
But I received the error "No podspec found" when i did pod install. So i did what @SandroDahl said and it worked for me!
Thanks!
Most helpful comment
@hemantsati95 when you use the 3.0.0 release you have to remove the ".podspec" extensions in your Podfile.
https://github.com/zoontek/react-native-permissions/releases/tag/3.0.0 Breaking Change => .podspec extension is no longer required in your Podfile