react-native-geolocation-service
react-native-geolocation-service copied to clipboard
React-native-geolocation-service failing when building on xcode it says "underlying Objective-C module 'react_native_geolocation_service' not found", "failed to verify module interface of 'react_native_geolocation_service' due to the errors above; the textual interface may be broken"
Environment
Run npx react-native info
in your terminal and copy the results here.
System:
OS: macOS 13.4
CPU: (10) arm64 Apple M1 Pro
Memory: 94.75 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 16.19.0 - ~/.nvm/versions/node/v16.19.0/bin/node
Yarn: 1.22.19 - ~/Documents/activeCode/BUDPAY/budpay/node_modules/.bin/yarn
npm: 8.19.3 - ~/.nvm/versions/node/v16.19.0/bin/npm
Watchman: 2023.06.08.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.12.1 - /Users/chideraugwuanyi/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
Android SDK: Not Found
IDEs:
Android Studio: 2022.2 AI-222.4459.24.2221.10121639
Xcode: 14.3/14E222b - /usr/bin/xcodebuild
Languages:
Java: 11.0.19 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.8 => 0.71.8
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Platforms
Is this issue related to Android, iOS, or both ? iOS ( when building on xcode )
Versions
Please add the used versions/branches
- Android:
- iOS:
- react-native-geolocation-service: 5.3.1
- react-native: 0.71.8
- react: 18.2.0
Description
I get this error when building on xcode after installation
- "failed to verify module interface of 'react_native_geolocation_service' due to the errors above; the textual interface may be broken" ,
- "underlying Objective-C module 'react_native_geolocation_service' not found".
Reproducible Demo
Provide a detailed list of steps that reproduce the issue.
- Set up react native project
- Disable flipper in iOS podfile
- Install react native geolocation service follow the instructions on the installation page
- Build with Xcode "Run"
Expected Results
Build should be successful
My 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,"12.4" prepare_react_native_project!
If you are using a react-native-flipper
your iOS build will fail when NO_FLIPPER=1
is set.
because react-native-flipper
depends on (FlipperKit,...) that will be excluded
To fix this you can also exclude react-native-flipper
using a react-native.config.js
```js
module.exports = {
dependencies: {
...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => linkage.to_sym
end
target 'budpay' do config = use_native_modules!
Flags change depending on the env values.
flags = get_default_flags()
use_react_native!( :path => config[:reactNativePath], # Hermes is now enabled by default. Disable by setting this flag to false. # Upcoming versions of React Native may rely on get_default_flags(), but # we make it explicit here to aid in the React Native upgrade process. :hermes_enabled => flags[:hermes_enabled], # :fabric_enabled => flags[:fabric_enabled], # Enables Flipper. # # Note that if you have use_frameworks! enabled, Flipper will not work and # you should disable the next line. # :flipper_configuration => flipper_config, # An absolute path to your application root. :app_path => "#{Pod::Config.instance.installation_root}/.." ) use_frameworks! end
dynamic_frameworks = ['Socket.IO-Client-Swift', 'Starscream', 'iProov', 'DatadogSDK'] pre_install do |installer| installer.pod_targets.each do |pod| if !dynamic_frameworks.include?(pod.name) puts "Overriding the static_framework? method for #{pod.name}" def pod.static_framework?; true end def pod.build_type; Pod::BuildType.static_library end end end end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.4'
end
end
end
sed -i -e $'s/__IPHONE_10_0/__IPHONE_13_0/' #{installer.sandbox.root}/RCT-Folly/folly/portability/Time.h
end
Did you find any solution?
Did you find any solution?
No not yet. Are you experiencing the same issue?