Closed purrsong-chong closed 5 months ago
Hey @purrsong-chong, how are you?
It's possible that the issue could be related to the installation of pods and the generation of the bridging file for Objective-C and Swift. I recommend trying the following steps:
yarn
to ensure that all dependencies are up to date.cd ios
.pod install
to install the necessary pods for your project.If the problem persists, you can also try cleaning and rebuilding your project within Xcode:
Sometimes, Xcode may not recognize changes immediately, so cleaning and rebuilding the project can help in such cases.
I hope these suggestions help you resolve the issue. If you have any further questions or encounter any additional problems, please let me know!
Hey @purrsong-chong, how are you?
It's possible that the issue could be related to the installation of pods and the generation of the bridging file for Objective-C and Swift. I recommend trying the following steps:
- Open a terminal and navigate to your project's root directory.
- Run the command
yarn
to ensure that all dependencies are up to date.- Change directory to the iOS folder using the command
cd ios
.- Run
pod install
to install the necessary pods for your project.- After the installation completes, try rebuilding your project.
If the problem persists, you can also try cleaning and rebuilding your project within Xcode:
- Open Xcode and go to the "Product" menu.
- Select "Clean" to clean your project.
- Once the cleaning process finishes, select "Build" to rebuild your project.
Sometimes, Xcode may not recognize changes immediately, so cleaning and rebuilding the project can help in such cases.
I hope these suggestions help you resolve the issue. If you have any further questions or encounter any additional problems, please let me know!
can you please share the podfile configuration
Hey @najil-12 ! Sure, this is the file:
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'
install! 'cocoapods', :deterministic_uuids => false
target 'RNLineExample' do
config = use_native_modules!
use_frameworks! :linkage => :static
# 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 => true,
: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 => FlipperConfiguration.enabled,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
target 'RNLineExampleTests' do
inherit! :complete
# Pods for testing
end
post_install do |installer|
react_native_post_install(
installer,
# Set `mac_catalyst_enabled` to `true` in order to apply patches
# necessary for Mac Catalyst builds
:mac_catalyst_enabled => false
)
# NOTE: Change IPHONEOS_DEPLOYMENT_TARGET to 12.4.
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.4'
end
end
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
It should be almost the same as the one created when starting a new project with npx react-native ...
.
I see that you're encountering the same issue as posted in #108. Can you provide your pod installation result?
fabric_enabled
sure here is the result
mac@Macs-MacBook-Air ios % pod install
Adding a custom script phase for Pod RNFBApp: [RNFB] Core Configuration
Auto-linking React Native modules for target RichestLife
: BVLinearGradient, RNCAsyncStorage, RNCCheckbox, RNCMaskedView, RNDeviceInfo, RNFBApp, RNFBAuth, RNFBMessaging, RNGestureHandler, RNGoogleSignin, RNImageCropPicker, RNLine, RNPermissions, RNReanimated, RNSVG, RNScreens, RNSharedElement, ReactNativeLocalization, lottie-ios, lottie-react-native, react-native-background-timer, react-native-fbsdk, react-native-netinfo, react-native-pager-view, react-native-safe-area-context, react-native-simple-toast, react-native-splash-screen, react-native-track-player, and react-native-webview
Framework build type is static library
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
Analyzing dependencies
Fetching podspec for DoubleConversion
from ../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec
[Codegen] Found FBReactNativeSpec
Fetching podspec for RCT-Folly
from ../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec
Fetching podspec for boost
from ../node_modules/react-native/third-party-podspecs/boost.podspec
Fetching podspec for glog
from ../node_modules/react-native/third-party-podspecs/glog.podspec
Fetching podspec for hermes-engine
from ../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec
Downloading dependencies
Installing AppAuth (1.6.2)
Installing BEMCheckBox (1.4.1)
Installing BVLinearGradient (2.6.2)
Installing CocoaAsyncSocket (7.6.5)
Installing DoubleConversion (1.1.6)
Installing FBLazyVector (0.71.4)
Installing FBReactNativeSpec (0.71.4)
Installing FBSDKCoreKit (8.2.0)
Installing FBSDKLoginKit (8.2.0)
Installing FBSDKShareKit (8.2.0)
Installing Firebase (10.7.0)
Installing FirebaseAnalytics (10.7.0)
Installing FirebaseAuth (10.7.0)
Installing FirebaseCore (10.7.0)
Installing FirebaseCoreExtension (10.7.0)
Installing FirebaseCoreInternal (10.9.0)
Installing FirebaseInstallations (10.9.0)
Installing FirebaseMessaging (10.7.0)
Installing Flipper (0.125.0)
Installing Flipper-Boost-iOSX (1.76.0.1.11)
Installing Flipper-DoubleConversion (3.2.0.1)
Installing Flipper-Fmt (7.1.7)
Installing Flipper-Folly (2.6.10)
Installing Flipper-Glog (0.5.0.5)
Installing Flipper-PeerTalk (0.0.4)
Installing Flipper-RSocket (1.4.3)
Installing FlipperKit (0.125.0)
Installing GTMAppAuth (1.3.1)
Installing GTMSessionFetcher (2.3.0)
Installing GoogleAppMeasurement (10.7.0)
Installing GoogleDataTransport (9.2.3)
Installing GoogleSignIn (6.2.4)
Installing GoogleUtilities (7.11.1)
Installing LineSDKSwift (5.8.2)
Installing OpenSSL-Universal (1.1.1100)
Installing PromisesObjC (2.2.0)
Installing RCT-Folly (2021.07.22.00)
Installing RCTRequired (0.71.4)
Installing RCTTypeSafety (0.71.4)
Installing RNCAsyncStorage (1.18.1)
Installing RNCCheckbox (0.5.15)
Installing RNCMaskedView (0.2.9)
Installing RNDeviceInfo (10.6.0)
Installing RNFBApp (17.5.0)
Installing RNFBAuth (17.5.0)
Installing RNFBMessaging (17.5.0)
Installing RNGestureHandler (2.10.1)
Installing RNGoogleSignin (9.1.0)
Installing RNImageCropPicker (0.38.1)
Installing RNLine (2.2.0)
Installing RNPermissions (3.8.0)
Installing RNReanimated (2.17.0)
Installing RNSVG (13.9.0)
Installing RNScreens (3.20.0)
Installing RNSharedElement (0.8.8)
Installing React (0.71.4)
Installing React-Codegen (0.71.4)
Installing React-Core (0.71.4)
Installing React-CoreModules (0.71.4)
Installing React-RCTActionSheet (0.71.4)
Installing React-RCTAnimation (0.71.4)
Installing React-RCTAppDelegate (0.71.4)
Installing React-RCTBlob (0.71.4)
Installing React-RCTImage (0.71.4)
Installing React-RCTLinking (0.71.4)
Installing React-RCTNetwork (0.71.4)
Installing React-RCTSettings (0.71.4)
Installing React-RCTText (0.71.4)
Installing React-RCTVibration (0.71.4)
Installing React-callinvoker (0.71.4)
Installing React-cxxreact (0.71.4)
Installing React-hermes (0.71.4)
Installing React-jsi (0.71.4)
Installing React-jsiexecutor (0.71.4)
Installing React-jsinspector (0.71.4)
Installing React-logger (0.71.4)
Installing React-perflogger (0.71.4)
Installing React-runtimeexecutor (0.71.4)
Installing ReactCommon (0.71.4)
Installing ReactNativeLocalization (2.3.1)
Installing SocketRocket (0.6.0)
Installing SwiftAudioEx (0.15.3)
Installing TOCropViewController (2.6.1)
Installing Toast (4.0.0)
Installing Yoga (1.14.0)
Installing YogaKit (1.18.1)
Installing boost (1.76.0)
Installing fmt (6.2.1)
Installing glog (0.3.5)
Installing hermes-engine (0.71.4)
Installing libevent (2.1.12)
Installing lottie-ios (3.4.0)
Installing lottie-react-native (5.1.6)
Installing nanopb (2.30909.0)
Installing react-native-background-timer (2.4.1)
Installing react-native-fbsdk (3.0.0)
Installing react-native-netinfo (9.3.10)
Installing react-native-pager-view (6.2.0)
Installing react-native-safe-area-context (4.5.3)
Installing react-native-simple-toast (1.1.4)
Installing react-native-splash-screen (3.3.0)
Installing react-native-track-player (3.2.0)
Installing react-native-webview (12.1.0)
Generating Pods project
Setting REACT_NATIVE build settings
Setting CLANG_CXX_LANGUAGE_STANDARD to c++17 on /Users/mac/Desktop/nazil_native/richest_list/ios/RichestLife.xcodeproj
Pod install took 22 [s] to run
Integrating client project
Pod installation complete! There are 93 dependencies from the Podfile and 103 total pods installed.
mac@Macs-MacBook-Air ios %
Hey @najil-12 ! Sure, this is the file:
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' install! 'cocoapods', :deterministic_uuids => false target 'RNLineExample' do config = use_native_modules! use_frameworks! :linkage => :static # 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 => true, :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 => FlipperConfiguration.enabled, # An absolute path to your application root. :app_path => "#{Pod::Config.instance.installation_root}/.." ) target 'RNLineExampleTests' do inherit! :complete # Pods for testing end post_install do |installer| react_native_post_install( installer, # Set `mac_catalyst_enabled` to `true` in order to apply patches # necessary for Mac Catalyst builds :mac_catalyst_enabled => false ) # NOTE: Change IPHONEOS_DEPLOYMENT_TARGET to 12.4. installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.4' end end __apply_Xcode_12_5_M1_post_install_workaround(installer) end end
It should be almost the same as the one created when starting a new project with
npx react-native ...
.I see that you're encountering the same issue as posted in #108. Can you provide your pod installation result?
is there any need to change the deployment target to 11.0 as the documentation
Great, thanks! Seems that the pods were installed all right. The deployment target set to 11.0 is the minimum. Probably you would want to set it to 12.4
as I did.
Hey @purrsong-chong, how are you?
It's possible that the issue could be related to the installation of pods and the generation of the bridging file for Objective-C and Swift. I recommend trying the following steps:
- Open a terminal and navigate to your project's root directory.
- Run the command
yarn
to ensure that all dependencies are up to date.- Change directory to the iOS folder using the command
cd ios
.- Run
pod install
to install the necessary pods for your project.- After the installation completes, try rebuilding your project.
If the problem persists, you can also try cleaning and rebuilding your project within Xcode:
- Open Xcode and go to the "Product" menu.
- Select "Clean" to clean your project.
- Once the cleaning process finishes, select "Build" to rebuild your project.
Sometimes, Xcode may not recognize changes immediately, so cleaning and rebuilding the project can help in such cases.
I hope these suggestions help you resolve the issue. If you have any further questions or encounter any additional problems, please let me know!
Thank you for your helps but problem is not solved :(
platform :ios, "13.0"
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
$FirebaseSDKVersion = '10.7.0'
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 'oauthTest' 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}/.."
)
pod 'FirebaseCore', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
target 'oauthTestTests' do
inherit! :complete
# Pods for testing
end
post_install do |installer|
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
if config.build_settings['DEVELOPMENT_TEAM'].nil?
config.build_settings['DEVELOPMENT_TEAM'] = 'W5K79DJY7U'
end
end
end
end
react_native_post_install(
installer,
# Set `mac_catalyst_enabled` to `true` in order to apply patches
# necessary for Mac Catalyst builds
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
Installing AppAuth (1.6.2)
Installing CocoaAsyncSocket (7.6.5)
Installing DoubleConversion (1.1.6)
Installing FBAEMKit (15.0.0)
Installing FBLazyVector (0.71.8)
Installing FBReactNativeSpec (0.71.8)
Installing FBSDKCoreKit (15.0.0)
Installing FBSDKCoreKit_Basics (15.0.0)
Installing FBSDKGamingServicesKit (15.0.0)
Installing FBSDKLoginKit (15.0.0)
Installing FBSDKShareKit (15.0.0)
Installing Firebase (10.7.0)
Installing FirebaseCore (10.7.0)
Installing FirebaseCoreInternal (10.8.0)
Installing Flipper (0.125.0)
Installing Flipper-Boost-iOSX (1.76.0.1.11)
Installing Flipper-DoubleConversion (3.2.0.1)
Installing Flipper-Fmt (7.1.7)
Installing Flipper-Folly (2.6.10)
Installing Flipper-Glog (0.5.0.5)
Installing Flipper-PeerTalk (0.0.4)
Installing Flipper-RSocket (1.4.3)
Installing FlipperKit (0.125.0)
Installing GTMAppAuth (2.0.0)
Installing GTMSessionFetcher (3.1.1)
Installing GoogleSignIn (7.0.0)
Installing GoogleUtilities (7.11.1)
Installing LineSDKSwift (5.8.2)
Installing OpenSSL-Universal (1.1.1100)
Installing PromisesObjC (2.2.0)
Installing RCT-Folly (2021.07.22.00)
Installing RCTRequired (0.71.8)
Installing RCTTypeSafety (0.71.8)
Installing RNAppleAuthentication (2.2.2)
Installing RNFBApp (17.5.0)
Installing RNGoogleSignin (10.0.1)
Installing RNLine (2.2.0)
Installing React (0.71.8)
Installing React-Codegen (0.71.8)
Installing React-Core (0.71.8)
Installing React-CoreModules (0.71.8)
Installing React-RCTActionSheet (0.71.8)
Installing React-RCTAnimation (0.71.8)
Installing React-RCTAppDelegate (0.71.8)
Installing React-RCTBlob (0.71.8)
Installing React-RCTImage (0.71.8)
Installing React-RCTLinking (0.71.8)
Installing React-RCTNetwork (0.71.8)
Installing React-RCTSettings (0.71.8)
Installing React-RCTText (0.71.8)
Installing React-RCTVibration (0.71.8)
Installing React-callinvoker (0.71.8)
Installing React-cxxreact (0.71.8)
Installing React-hermes (0.71.8)
Installing React-jsi (0.71.8)
Installing React-jsiexecutor (0.71.8)
Installing React-jsinspector (0.71.8)
Installing React-logger (0.71.8)
Installing React-perflogger (0.71.8)
Installing React-runtimeexecutor (0.71.8)
Installing ReactCommon (0.71.8)
Installing SocketRocket (0.6.0)
Installing Yoga (1.14.0)
Installing YogaKit (1.18.1)
Installing boost (1.76.0)
Installing fmt (6.2.1)
Installing glog (0.3.5)
Installing hermes-engine (0.71.8)
Installing libevent (2.1.12)
Installing react-native-fbsdk-next (11.2.1)
Great, thanks! Seems that the pods were installed all right. The deployment target set to 11.0 is the minimum. Probably you would want to set it to
12.4
as I did.
Yes i want 12.4 because if i change it to 11.0 then it is throwing another error. Is there any way to solve it without changing the target.
Hey @purrsong-chong, how are you?
It's possible that the issue could be related to the installation of pods and the generation of the bridging file for Objective-C and Swift. I recommend trying the following steps:
- Open a terminal and navigate to your project's root directory.
- Run the command
yarn
to ensure that all dependencies are up to date.- Change directory to the iOS folder using the command
cd ios
.- Run
pod install
to install the necessary pods for your project.- After the installation completes, try rebuilding your project.
If the problem persists, you can also try cleaning and rebuilding your project within Xcode:
- Open Xcode and go to the "Product" menu.
- Select "Clean" to clean your project.
- Once the cleaning process finishes, select "Build" to rebuild your project.
Sometimes, Xcode may not recognize changes immediately, so cleaning and rebuilding the project can help in such cases.
I hope these suggestions help you resolve the issue. If you have any further questions or encounter any additional problems, please let me know!
please help this issue is still unresolved
hi @purrsong-chong Ensure that you have the required dependencies for the "RNLine" module properly installed. Check your project's Podfile and run pod install in the iOS directory to install any missing dependencies
Verify that the module name in your bridging header file (RNLine-Bridging-Header.h) matches the import statement in your AppDelegate.mm file. The import statement should be #import "RNLine-Swift.h".
Try cleaning your project's build folder and rebuilding it. In Xcode, you can go to the "Product" menu and select "Clean Build Folder". Afterward, try running your project again.
Ensure that the "RNLine-Swift.h" file is included in the correct target membership. In Xcode, select the file, go to the "File Inspector" pane on the right side, and make sure the file is selected for the target you are building.
Double-check that the "RNLine-Swift.h" file is present in the correct location within your project. It should be located in the "DerivedData" folder of your project.
create an Expo exhibit configuration file named "app.config.js" in your project directory. and add the following code:
import 'dotenv/config';
export default { expo: { name: 'React Native Line', slug: 'react-native-line', version: '1.0.0', orientation: 'portrait', icon: './path/to/app-icon.png', splash: { image: './path/to/splash-image.png', resizeMode: 'contain', backgroundColor: '#ffffff', }, platforms: ['ios', 'android'], sdkVersion: '42.0.0', description: 'A React Native Line Plugin', hooks: { postPublish: [ { file: 'sentry-expo/upload-sourcemaps', config: { organization: 'your-organization', project: 'your-project', authToken: 'your-auth-token', }, }, ], }, ios: { bundleIdentifier: 'com.yourcompany.reactnativeline', supportsTablet: true, config: { usesNonExemptEncryption: false, entitlements: { 'com.apple.developer.applesignin': ['Default'], }, }, googleServicesFile: './path/to/google-services.json', }, android: { package: 'com.yourcompany.reactnativeline', versionCode: 1, adaptiveIcon: { foregroundImage: './path/to/adaptive-icon.png', backgroundColor: '#ffffff', }, googleServicesFile: './path/to/google-services.json', permissions: ['CAMERA'], }, extra: { line: { ios: { channelId: process.env.LINE_IOS_CHANNEL_ID, universalLink: process.env.LINE_IOS_UNIVERSAL_LINK, }, android: { channelId: process.env.LINE_ANDROID_CHANNEL_ID, channelName: process.env.LINE_ANDROID_CHANNEL_NAME, channelUri: process.env.LINE_ANDROID_CHANNEL_URI, }, }, }, }, };
Make sure you replace the values for the file path, organization and project information for Sentry, and the required LINE configuration with the appropriate values.
Next, create an .env file in your project directory and enter LINE details like LINE_IOS_CHANNEL_ID, LINE_IOS_UNIVERSAL_LINK, LINE_ANDROID_CHANNEL_ID, LINE_ANDROID_CHANNEL_NAME and LINE_ANDROID_CHANNEL_URI with the appropriate values.
After that, run the expo prebuild command to create a bundle that will be used when the exhibition is run.
Next, run the command expo start --dev-client to run the application using the Expo Dev Client.
I came after I submitted the bounty that you created with the username @emibotti TyLee5 at replit.com
but my project is not on expo
Same issue
RNLine-Swift.h' file not found
Please Help
RNLine-Swift.h file is unable to build
I had also added SWIFT_OBJC_BRIDGING_HEADER in Build. Phase -> User Defined. Section But still not working
add: use_frameworks! :linkage => :static
installer.pods_project.build_configurations.each do |config|
config.build_settings["CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES"] = true
end
in your pod file.
add: use_frameworks! :linkage => :static
installer.pods_project.build_configurations.each do |config| config.build_settings["CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES"] = true end
in your pod file.
same issue
https://github.com/xmartlabs/react-native-line/issues/107#issuecomment-1715933560 have you handled it yet? @najil-12 if not. just follow it
#107 (comment) have you handled it yet? @najil-12 if not. just follow it
Yes I've added this code in my Podfile. here it is
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! install! 'cocoapods', :deterministic_uuids => false
react-native-flipper
your iOS build will fail when NO_FLIPPER=1
is set.react-native-flipper
depends on (FlipperKit,...) that will be excluded#
react-native-flipper
using a react-native.config.js
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled permissions_path = '../node_modules/react-native-permissions/ios' linkage = ENV['USE_FRAMEWORKS'] if linkage != nil Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green use_frameworks! :linkage => linkage.to_sym use_frameworks! :linkage => :static end
pod 'Firebase', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'FBSDKLoginKit'
pod 'LineSDKSwift', '~> 5.8.1'
target 'RichestLife' do
config = use_native_modules!
# project 'RichestLife',
# 'Debug' => :debug,
# 'Dev Debug' => :debug,
# 'Alpha Debug' => :debug,
# 'QA Debug' => :debug,
# 'Release' => :release,
# 'Dev Release' => :release,
# 'Alpha Release' => :release,
# 'QA Release' => :release
flags = get_default_flags()
use_react_native!( :path => config[:reactNativePath],
# 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}/.."
)
target 'RichestLifeTests' do inherit! :complete
end
post_install do |installer| react_native_post_install( installer,
mac_catalyst_enabled
to true
in order to apply patches # necessary for Mac Catalyst builds
:mac_catalyst_enabled => false
)
installer.pods_project.build_configurations.each do |config|
config.build_settings["CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES"] = true
end
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
end
end
__apply_Xcode_12_5_M1_post_install_workaround(installer)
installer.pods_project.build_configurations.each do |config|
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
end
end end
have you fixed it yet?
same question....
this is my app podfile:
require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
# $RNFirebaseAsStaticFramework=true
$RNFirebaseAnalyticsWithoutAdIdSupport = false
platform :ios, '11.0'
install! 'cocoapods', :deterministic_uuids => false
#Cocoapods version 1.9+ allows linking of Swift static libraries,
# use_frameworks! :linkage => :static
target ‘MyApp’ do
use_expo_modules!
post_integrate do |installer|
begin
expo_patch_react_imports!(installer)
rescue => e
Pod::UI.warn e
end
begin
expo_patch_react_imports!(installer)
rescue => e
Pod::UI.warn e
end
end
config = use_native_modules!
# use_frameworks! :linkage => :static
# pod 'Firebase', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
# pod 'FirebaseCoreInternal', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
pod 'RNI18n', :path => '../node_modules/react-native-i18n'
pod 'RNPermissions', :path => '../node_modules/react-native-permissions'
pod 'Permission-Motion', :path => "../node_modules/react-native-permissions/ios/Motion"
pod 'Permission-LocationWhenInUse', :path => "../node_modules/react-native-permissions/ios/LocationWhenInUse"
pod 'Permission-Notifications', :path => "../node_modules/react-native-permissions/ios/Notifications"
pod 'Permission-PhotoLibrary', :path => "../node_modules/react-native-permissions/ios/PhotoLibrary"
pod 'Permission-Camera', :path => "../node_modules/react-native-permissions/ios/Camera"
# pod 'VisionCamera', :modular_headers => true
# Flags change depending on the env values.
flags = get_default_flags()
# pre_install do |installer|
# installer.pod_targets.each do |pod|
# if pod.name.eql?('vision-camera-code-scanner') || pod.name.eql?('VisionCamera')
# def pod.build_type
# Pod::BuildType.static_library
# end
# end
# end
# end
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
target ‘MyAppTests' 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 the next line.
# use_flipper!()
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES"] = true
end
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = "arm64"
end
end
# TEMPORARY FIX UNTIL FIX IS RELEASED IN REACT NATIVE
installer.target_installation_results.pod_target_installation_results.each do |pod_name, target_installation_result|
target_installation_result.native_target.build_configurations.each do |config|
# For third party modules who have React-bridging dependency to search correct headers
config.build_settings['HEADER_SEARCH_PATHS'] ||= '$(inherited) '
config.build_settings['HEADER_SEARCH_PATHS'] << '"$(PODS_ROOT)/Headers/Private/React-bridging/react/bridging" '
config.build_settings['HEADER_SEARCH_PATHS'] << '"$(PODS_CONFIGURATION_BUILD_DIR)/React-bridging/react_bridging.framework/Headers" '
end
end
react_native_post_install(installer)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.4'
end
end
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
uncomment this line: use_frameworks! :linkage => :static if u run with ios change version of react-native-line to 2.1.0 if android run with 2.2.0 add to your podFile: installer.pods_project.build_configurations.each do |config| config.build_settings["CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES"] = true end
@chenkuangkuang
@tranquockhanh0506 After various modifications ...... I finally got it to run successfully. But when I click on login (calling the login method) and jump to line, line automatically calls up safari and says "Error Unable to process" in the app.
this is url (in safari):
这是我的AppDelegate:
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
return [LineLogin application:application open:url options:options];
// return [RCTLinkingManager application:application openURL:url options:options];
}
- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity
restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler
{
BOOL handledLine = [LineLogin application:application continue:userActivity restorationHandler:restorationHandler];
return handledLine;
// return [RCTLinkingManager application:application
// continueUserActivity:userActivity
// restorationHandler:restorationHandler];
}
@tranquockhanh0506 ohh...Sorry, it is my fault.I forgot to set iOS bundle ID...
Now i can see auth screen. The last quetion is
1.after i authorize the login, line app will open a url (access.line.me) in safari, it is confirm should i open my app. Is there a way to go directly to my app without showing this screen?
2.In my AppDelegate.m, How to use lineLogin in conjunction with RCTLinkingManager ?
1 this is default of line , I also don't know how to turn it off :))
@chenkuangkuang Can you tell me what steps you have taken? also what changes have been made in podfile and version. And please don't forget to share Podfile, react native and rn-line version. Thanks
@tranquockhanh0506 Thanks for your response。For this screen, I thought i wrote something wrong...
Is there any way to use lineLogin in conjunction with RCTLinkingManager ? I'm not very good at object-c😵💫
@najil-12 I add these line in my podfile( I also need some time to confirm which line works...)
1.in target 'LOOTaDOG' do:
use_frameworks! :linkage => :static
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways/Permission-LocationAlways.podspec"
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
installer.pod_targets.each do |pod|
if pod.name.eql?('vision-camera-code-scanner') || pod.name.eql?('VisionCamera')
def pod.build_type
Pod::BuildType.static_library
end
end
if pod.name.eql?('RNPermissions') || pod.name.start_with?('Permission-')
def pod.build_type;
Pod::BuildType.static_library
end
end
end
end
installer.pods_project.build_configurations.each do |config|
config.build_settings["CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES"] = true
end
3.react native version is 0.69.7, react-native-line version is 2.2.0
(BOOL)application:(UIApplication )app openURL:(NSURL )url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options { return [LineLogin application:app open:url options:options]; }
(BOOL)application:(UIApplication )application continueUserActivity:(NSUserActivity )userActivity restorationHandler:(void (^)(NSArray<id
@tranquockhanh0506 My app will open other app and callback from other app.
If I wrote like yours, it will not work good ? I guess
....
I tried that, now my app can not receive information when callback my app from other app.
It is so bad😕
so..why you do not handle in call back value form your react native app you want to open other app after sign in with line success right?
@tranquockhanh0506 for example, my app can aslo login by coinbase.
In its sdk, it will handle response from coinbase when callback from coinbase.
It use RCTLinkingManager to handle this information (or pass information to RN, I guess)
And now, It can not work well.
btw, after sign in with line have you received a response from line yet?
@tranquockhanh0506 Yes, I received.
I guess, All we need is a Judgment to distinguish between messages from the line and other messages.
If you are successfully signing in with Line, I have completed my help. The next problems are not related to signing in with Line, please try to do it bro!
@tranquockhanh0506 Yes, absolutely you are right...Thank you very much anyway.
Same issue here!!
react-native: v0.72.0
react-native-flipper was default installed. I can get it run with use_frameworks!
. Is there any way to use this library with react-native-flipper co-exist?
Same issue here:
Xcode 14.3
My Podfile:
def node_require(script)
# Resolve script with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
"require.resolve(
'#{script}',
{paths: [process.argv[1]]},
)", __dir__]).strip
end
node_require('react-native/scripts/react_native_pods.rb') node_require('react-native-permissions/scripts/setup.rb')
platform :ios, '13.0' prepare_react_native_project!
setup_permissions([ 'AppTrackingTransparency',
'Camera',
'FaceID',
'Notifications', 'PhotoLibrary',
])
react-native-flipper
your iOS build will fail when NO_FLIPPER=1
is set.react-native-flipper
depends on (FlipperKit,...) that will be excluded#
react-native-flipper
using a react-native.config.js
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 'SquareFitnessClient' do config = use_native_modules!
flags = get_default_flags()
use_react_native!( :path => config[:reactNativePath],
: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}/.."
)
pod 'WechatOpenSDK'
target 'SquareFitnessClientTests' do inherit! :complete
end
post_install do |installer|
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
# 添加这段,M1/M2 模拟器能跑起来,wechat 小而美!
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if target.name == 'react-native-config'
config.build_settings['ENVFILE'] = '$(PODS_ROOT)/../../.env'
end
end
end
installer.aggregate_targets.first.user_project.native_targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['LIBRARY_SEARCH_PATHS'] = ['$(inherited)', '$(SDKROOT)/usr/lib/swift']
end
end
# quiet non-module warnings - only interested in fbsdk-next warnings
installer.pods_project.targets.each do |target|
if !target.name.include? "react-native-fbsdk-next"
target.build_configurations.each do |config|
config.build_settings["GCC_WARN_INHIBIT_ALL_WARNINGS"] = "YES"
end
end
end
end
end
![Screenshot 2023-11-09 at 17 56 31](https://github.com/xmartlabs/react-native-line/assets/50390141/7493d0bd-d791-47c9-b28a-b09e8dfc2b34)
Please help !
@vietdung97
I solved it by disabling Flipper and adding use_frameworks! :linkage => :static
. To disable Flipper, you can refer to https://dev.to/retyui/disable-flipper-on-ci-builds-for-react-native-complete-guide-bnd
@vietdung97 I solved it by disabling Flipper and adding
use_frameworks! :linkage => :static
. To disable Flipper, you can refer to https://dev.to/retyui/disable-flipper-on-ci-builds-for-react-native-complete-guide-bnd
@Jiayuwalker I change use_frameworks! :linkage => :static and set NO_FLIPPER = 1. But I get the new error.
- #import "RNLine-Swift.h"
+ @import RNLine;
- #import "RNLine-Swift.h" + @import RNLine;
use of '@import' when C++ modules are disabled, consider using -fmodules and -fcxx-modules
Sorry for late close. I had a problem with bridging header. For some reason, after I recreated bridgin header, the error has gone.
Thank you all for considering my issue.
Your environment
You can run (
react-native -v
) to obtain info and paste it below:Description
In AppDelegate.mm, I can't import "RNLine-Swift.h" I moved to top, and the problem is not solved
Screenshots