Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all 17243 articles
Browse latest View live

applinks not showing in swcutil_show.txt

$
0
0

I have a React Native (RN) application that supports App Links (Universal Links) functionality. Whenever I upload the application to our TestFlight, everything works as expected, and data for the App Links is shown in the swcutil_show.txt file.

The problem arises when we create a new build (from the same code that is deployed in our TestFlight) and provide it to an external team for upload. The Universal Links do not work, and nothing is logged in the swcutil_show.txt file, no matter what we do. I suspect that re-signing the application with a different bundle identifier has something to do with the issue, but I have no knowledge in this area, nor can I find a way to debug this functionality.


XCode15.3 throwing an error when trying to install iOS 17.4 simulator

$
0
0

`When trying to download the IOS 17.4 xcode simulator i keep getting error. Xcode randomly updated to 15.3 and all my downloaded simulators are gone. before this issue, i have installed 17.2 successfully but it won’t show up to be able to run it.

error is :

Registering simulator runtime with CoreSimulator failed.Domain: DVTDownloadableErrorDomainCode: 29User Info: {    DVTErrorCreationDateKey = "2024-06-20 15:11:06 +0000";}Registering simulator runtime with CoreSimulator failed.Domain: DVTDownloadableErrorDomainCode: 29Mount timed outDomain: com.apple.CoreSimulator.simdiskimaged.SimDiskImageErrorCode: 11

System Information

macOS Version 14.5 (Build 23F79)Xcode 15.3 (22618) (Build 15E204a)Timestamp: 2024-06-20T08:11:06-07:00

I Tried restarting mac, clearing caches for xcode and deleted derived data, after xcode and mac restart it still throws same error.I have like 400 gb left of space on my MacBook, and the download is only 7.56 gb. So it should be enough right?all im trying is to build the app but without installing the simulator, i cant pass furtherPlease help me hereThanks !`

IOS app aspect ratio cropped within the simulator (react native)

$
0
0

My react native app is suddenly cropped or rather the aspect ratio has been changed so that it no longer is reaching the height of the ios device simulator. Its filling up only the white space of the simulator. The black sections at the bottom and top are as if they're empty, unused. The app is being "compressed" within the space of the white square. Has anyone seen this before or have any idea what might be the issue?

Not sure if it has something to do with the plist, the view controller, cached files or what?

ios sim image

Console.error: no permission handler detected.(React Native)

$
0
0

I am coding a simple react native app and am getting a console error when I run the app. It says that there is no permission handler detected and tells me to go through some steps. But I do not know how to do these steps, and if they don't work, I don't know how to solve the problem.

Here is the error:

enter image description here

Here is the podfile:

platform :ios, '9.0'require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'def add_flipper_pods!(versions = {})  versions['Flipper'] ||= '~> 0.33.1'  versions['DoubleConversion'] ||= '1.1.7'  versions['Flipper-Folly'] ||= '~> 2.1'  versions['Flipper-Glog'] ||= '0.3.6'  versions['Flipper-PeerTalk'] ||= '~> 0.0.4'  versions['Flipper-RSocket'] ||= '~> 1.0'  pod 'FlipperKit', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configuration => 'Debug'  # List all transitive dependencies for FlipperKit pods  # to avoid them being linked in Release builds  pod 'Flipper', versions['Flipper'], :configuration => 'Debug'  pod 'Flipper-DoubleConversion', versions['DoubleConversion'], :configuration => 'Debug'  pod 'Flipper-Folly', versions['Flipper-Folly'], :configuration => 'Debug'  pod 'Flipper-Glog', versions['Flipper-Glog'], :configuration => 'Debug'  pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configuration => 'Debug'  pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configuration => 'Debug'  pod 'FlipperKit/Core', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/CppBridge', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FBDefines', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configuration => 'Debug'  pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configuration => 'Debug'end# Post Install processing for Flipperdef flipper_post_install(installer)  installer.pods_project.targets.each do |target|    if target.name == 'YogaKit'      target.build_configurations.each do |config|        config.build_settings['SWIFT_VERSION'] = '4.1'      end    end  endendtarget 'LocalMainStreet' do  # Pods for LocalMainStreet  pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"  pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"  pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"  pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"  pod 'React', :path => '../node_modules/react-native/'  pod 'React-Core', :path => '../node_modules/react-native/'  pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'  pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'  pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'  pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"  pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'  pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'  target 'LocalMainStreetTests' do    inherit! :complete    # Pods for testing  end  use_native_modules!  # Enables Flipper.  #  # Note that if you have use_frameworks! enabled, Flipper will not work and  # you should disable these next few lines.  add_flipper_pods!  post_install do |installer|    flipper_post_install(installer)  endendtarget 'LocalMainStreet-tvOS' do  # Pods for LocalMainStreet-tvOS  target 'LocalMainStreet-tvOSTests' do    inherit! :search_paths    # Pods for testing  endend

Please help. Thanks.

sharing pdf to my ios react native app from gallery/files issue

$
0
0

Recently I implemented ShareExtension in my ios app built using react-native.
coming straight to the point.

added below code to info.plist of ShareExtension app to support sharing of any kind of file/attachments available

<dict><key>NSExtensionActivationRule</key><dict><key>NSExtensionActivationSupportsText</key><true/><key>NSExtensionActivationSupportsWebURLWithMaxCount</key><integer>1</integer><key>NSExtensionActivationSupportsImageWithMaxCount</key><integer>10</integer><key>NSExtensionActivationSupportsMovieWithMaxCount</key><integer>10</integer><key>NSExtensionActivationSupportsFileWithMaxCount</key><integer>10</integer><key>NSExtensionActivationSupportsAttachmentsWithMaxCount</key><integer>10</integer></dict></dict>

and now I

  • opened Photos

  • selected an image to share

  • from list of apps shown to share, I chose my app

    from the below code I got the url details but could not repeat the same while sharing PDFs

NSExtensionItem *inputItem = self.extensionContext.inputItems.firstObject;    NSItemProvider *itemProvider = inputItem.attachments.firstObject;    if ([itemProvider hasItemConformingToTypeIdentifier:(NSString *)kUTTypeImage]) {        [itemProvider loadItemForTypeIdentifier:(NSString *)kUTTypeImage options:nil completionHandler:^(NSURL *url, NSError *error) {            if (url) {                NSLog(@"Shared file URL: %@", url);                [self uploadFileWithURL:url];            } else {                NSLog(@"Error loading shared file: %@", error);            }        }];    }

My trials - for sharing PDFs in the same manner,

if ([itemProvider hasItemConformingToTypeIdentifier:(NSString *)kUTTypeFileURL]) {      [itemProvider loadItemForTypeIdentifier:(NSString *)kUTTypeFileURL options:nil completionHandler:^(NSURL *url, NSError *error) {          if (error) {              NSLog(@"Error loading PDF: %@", error.localizedDescription);            } else if (url) {              NSLog(@"Shared PDF URL: %@", url);            }      }];  }

just changed kUTTypeImage --> kUTTypeFileURL

but everytime its throwing error saying

Failed to resolve item of class `NSURL` for type `public.file-url` with error: Error Domain=NSPOSIXErrorDomain Code=3 "No such process" UserInfo={NSLocalizedDescription=Cannot issue a sandbox extension for file "/Users/demouser/Library/Developer/CoreSimulator/Devices/{ID}/data/Containers/Data/Application/{SOME_ID}/Documents/PDF_NAME.pdf": No such process}

and also logging
Error loading PDF: Could not coerce an item to class NSURL

what I want ------> I just want to share the pdf file just like the image(which is working fine)

IF anybody have any prior experience, do kindly share, it will be very helpful.

Expo dynamic configuration

$
0
0

I am using expo with react native to build an IOS app.Now I want to change the details in app.json file according the the university id of my project which i have stored in .env file. For this I am using the app.config.js file.But I am not to able to figure out how to make it implement. Can someone provide me some code and command reference

i an having errors while setting up the AppDelegate.mm while upgrading my project to RN 0.74.0

$
0
0

@import Firebase; :- this is giving the following :--Use of '@import' when C++ modules are disabled, consider using -fmodules and -fcxx-modules

self.moduleName = @"BookerTools"; this is giving the following :-- Property 'moduleName' not found on object of type 'AppDelegate *'

self.initialProps = @{}; this is giving the following :-- Property 'initialProps' not found on object of type 'AppDelegate *'

[FIRApp configure]; this is giving the following :-- Use of undeclared identifier 'FIRApp'

return [super application:application didFinishLaunchingWithOptions:launchOptions]; this is giving the following :-- No visible @interface for 'UIResponder' declares the selector 'application:didFinishLaunchingWithOptions:'

I tried some changes suggested on github , but nothing seems to work and I dont have much idea about IOS dev. new to this.

Below is the my AppDelegate.mm file

/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */#import "AppDelegate.h"#import "RNSplashScreen.h"#import <React/RCTBundleURLProvider.h>#import <RNCPushNotificationIOS.h>#import <UserNotifications/UserNotifications.h>@import Firebase;@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{  NSURL *jsCodeLocation;  self.moduleName = @"BookerTools";  self.initialProps = @{};//#ifdef DEBUG//  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];//#else//  jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];//#endif  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios"];  [RNSplashScreen show];  // Define UNUserNotificationCenter  UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];  center.delegate = self;  [FIRApp configure];  return [super application:application didFinishLaunchingWithOptions:launchOptions];}- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge{  return [self bundleURL];}- (NSURL *)bundleURL{#if DEBUG  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];#else  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];#endif}//Called when a notification is delivered to a foreground app.-(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler{  completionHandler(UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge);}// Required to register for notifications- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings{  [RNCPushNotificationIOS didRegisterUserNotificationSettings:notificationSettings];}// Required for the register event.- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken{  [RNCPushNotificationIOS didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];}// Required for the notification event. You must call the completion handler after handling the remote notification.- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfofetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{  [RNCPushNotificationIOS didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];}// Required for the registrationError event.- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error{  [RNCPushNotificationIOS didFailToRegisterForRemoteNotificationsWithError:error];}// Required for the localNotification event.- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification{  [RNCPushNotificationIOS didReceiveLocalNotification:notification];}@end

How to Reset IOS folder in react-native

$
0
0

I'm working on a react-native application, I made some mistakes on the iOS project side. Android goes well and no problems. I would like to know if there is any solution to completely reset the iOS project without losing the Android project.

When running the react-native run-ios command, the iOS simulator starts and remains locked in info IDEDerivedDataPathOverride

What I tried to do:

cd iospod deintegratepod install

-------- the same problem, did not work

I check on npm and I found a package react-native-clean-projectand i ran: ./node_modules/.bin/react-native-clean-project --remove-iOS-build

-------- the same problem

rm -rf ios/build 

-------- the same problem

and in last thing i remove the node_modules folder, install it again, clean the cache, but is the same problem...

I want to make a fresh ios folder, like when create a fresh project, but just for iOS.


react-native-callkeep not working in background or terminated state on iOS

$
0
0

I am using the react-native-callkeep library in a React Native project to handle displaying incoming calls on receiving notification from firebase. The library works perfectly when the app is active, but fails to display incoming calls or wake up the app when it's in the background or terminated on iOS.

PS: firebase notification works fine for both android and ios

Here's the relevant part of my code:

AppDelegate.m:

#import "AppDelegate.h"#import "Adjust.h"#import "Firebase.h"#import <UserNotifications/UserNotifications.h>#import <FirebaseMessaging/FirebaseMessaging.h>#import "FirebaseCore.h"#import <React/RCTBundleURLProvider.h>#import <React/RCTRootView.h>#import "RNCallKeep.h"#import <React/RCTLinkingManager.h>#import <PushKit/PushKit.h>#import "RNVoipPushNotificationManager.h"#import <RNCPushNotificationIOS.h>@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {  [FIRApp configure];  [RNCallKeep setup:@{@"appName": @"DocMoonlight", @"maximumCallGroups": @3, @"maximumCallsPerCallGroup": @1, @"supportsVideo": @YES}];  [RNVoipPushNotificationManager voipRegistration];  // other initialization code}- (void)pushRegistry:(PKPushRegistry *)registry didReceiveIncomingPushWithPayload:(PKPushPayload *)payload forType:(PKPushType)type withCompletionHandler:(void (^)(void))completion {  [RNVoipPushNotificationManager didReceiveIncomingPushWithPayload:payload forType:(NSString *)type];  NSString *uuid = [[[NSUUID UUID] UUIDString] lowercaseString];  [RNCallKeep reportNewIncomingCall:uuid handle:@"unknown" handleType:@"generic" hasVideo:NO localizedCallerName:@"Unknown" supportsHolding:YES supportsDTMF:YES supportsGrouping:YES supportsUngrouping:YES fromPushKit:YES payload:nil withCompletionHandler:completion];}

React Native Side (App.js):

const options = {  ios: {    appName: 'DocMoonlight',  },  android: {    alertTitle: 'Permissions required',    alertDescription: 'This application needs to access your phone accounts',    cancelButton: 'Cancel',    okButton: 'ok',    imageName: '',    additionalPermissions: [],    foregroundService: {      channelId: 'com.docmoonlight',      channelName: 'Foreground service for my app',      notificationTitle: 'My app is running on background',      notificationIcon: 'ic_notification',    },  },};CallKeep.setup(options).then(() => {});CallKeep.setAvailable(true);

this is the code used to handle display calls or normal notifications

async function onMessageReceived(remoteMessage) {  if (remoteMessage.data?.type === 'video_call') {        const callUUID = uuidv4();    CallKeep.displayIncomingCall(      callUUID,      remoteMessage.data?.location,'Docmoonlight','generic',      true,    );    // Listen to the CallKeep events    CallKeep.addEventListener('answerCall', async ({callUUID}) => {      bringAppToForeground();      CallKeep.endCall(callUUID);      setTimeout(async () => {        if (remoteMessage.data) {          const zoomLink = remoteMessage.data;          try {            const jwtToken = generateSignature(zoomLink.meetingNumber);            await ZoomUs.initialize({              jwtToken,            })              .then(result => {                console.log(result);                try {                  ZoomUs.joinMeeting({                    userName: zoomLink.name,                    meetingNumber: zoomLink.meetingNumber,                    password: zoomLink.password,                  });                } catch (error) {                  console.error('Failed to join the meeting', error);                }              })              .catch(error => console.log('Failed to initialize', error));          } catch (error) {            console.log(error);          }        }      }, 1000);    });    CallKeep.addEventListener('endCall', ({callUUID}) => {      console.log('Call ended:', callUUID);      CallKeep.endCall(callUUID);    });  } else {        onDisplayNotification(      remoteMessage.notification?.title,      remoteMessage.notification?.body,      remoteMessage.messageId,    );  }}

and this is my pod 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, min_ios_version_supportedprepare_react_native_project!source 'https://github.com/CocoaPods/Specs.git'# Disable Flipper temporarilyflipper_config = FlipperConfiguration.disabledlinkage = ENV['USE_FRAMEWORKS']if linkage != nil  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green  use_frameworks! :linkage => linkage.to_symendtarget 'DocMoonlight' do  config = use_native_modules!  pod 'Firebase', :modular_headers => true  pod 'FirebaseCoreInternal', :modular_headers => true  pod 'GoogleUtilities', :modular_headers => true  pod 'FirebaseCore', :modular_headers => true  pod 'RNPermissions', :path => '../node_modules/react-native-permissions'  permissions_path = '../node_modules/react-native-permissions/ios'  pod 'FirebaseInstallations', :modular_headers => true  pod 'FirebaseCoreExtension', :modular_headers => true  pod 'GoogleDataTransport', :modular_headers => true  pod 'nanopb', :modular_headers => true  pod 'RNCallKeep', :path => '../node_modules/react-native-callkeep'  # Flags change depending on the env values.  flags = get_default_flags()  use_react_native!(    :path => config[:reactNativePath],    :hermes_enabled => flags[:hermes_enabled],    :fabric_enabled => flags[:fabric_enabled],    :flipper_configuration => flipper_config,    :app_path => "#{Pod::Config.instance.installation_root}/.."  )  target 'DocMoonlightTests' do    inherit! :complete  end  post_install do |installer|    react_native_post_install(      installer,      :mac_catalyst_enabled => false    )  endend

and this is info.plist

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict><key>BGTaskSchedulerPermittedIdentifiers</key><array><string>com.docmoonlight.app.fetch-updates</string></array><key>CFBundleDevelopmentRegion</key><string>en</string><key>CFBundleDisplayName</key><string>Docmoonlight</string><key>CFBundleExecutable</key><string>$(EXECUTABLE_NAME)</string><key>CFBundleIdentifier</key><string>$(PRODUCT_BUNDLE_IDENTIFIER)</string><key>CFBundleInfoDictionaryVersion</key><string>6.0</string><key>CFBundleName</key><string>$(PRODUCT_NAME)</string><key>CFBundlePackageType</key><string>APPL</string><key>CFBundleShortVersionString</key><string>$(MARKETING_VERSION)</string><key>CFBundleSignature</key><string>????</string><key>CFBundleVersion</key><string>$(CURRENT_PROJECT_VERSION)</string><key>LSRequiresIPhoneOS</key><true/><key>NSAppTransportSecurity</key><dict><key>NSExceptionDomains</key><dict><key>localhost</key><dict><key>NSExceptionAllowsInsecureHTTPLoads</key><true/></dict></dict></dict><key>NSBluetoothPeripheralUsageDescription</key><string>We will use your Bluetooth to access your Bluetooth headphones.</string><key>NSCameraUsageDescription</key><string>For people to see you during meetings, we need access to your camera.</string><key>NSDocumentsFolderUsageDescription</key><string>Docmoonlight's app requires access to your Documents Folder to allow you to upload necessary documents and files, such as proof of medical licensing or certifications, during the registration process</string><key>NSLocationWhenInUseUsageDescription</key><string>Docmoonlight's app requires access to your location while in use to provide  accurate clock-in and clock-out times for payment purposes. </string><key>NSMicrophoneUsageDescription</key><string>For people to hear you during meetings, we need access to your microphone.</string><key>NSPhotoLibraryUsageDescription</key><string>Docmoonlight's app requires access to your Photo Library and file storage to allow you to upload necessary documents and files, such as proof of medical licensing or certifications, during the registration process</string><key>UIAppFonts</key><array><string>Poppins-Medium.ttf</string><string>Poppins-Regular.ttf</string><string>Poppins-SemiBold.ttf</string><string>AntDesign.ttf</string><string>Entypo.ttf</string><string>EvilIcons.ttf</string><string>Feather.ttf</string><string>FontAwesome.ttf</string><string>FontAwesome5_Brands.ttf</string><string>FontAwesome5_Regular.ttf</string><string>FontAwesome5_Solid.ttf</string><string>Foundation.ttf</string><string>Ionicons.ttf</string><string>MaterialIcons.ttf</string><string>MaterialCommunityIcons.ttf</string><string>SimpleLineIcons.ttf</string><string>Octicons.ttf</string><string>Zocial.ttf</string><string>FontAwesome6_Regular.ttf</string><string>FontAwesome6_Solid.ttf</string><string>FontAwesome6_Brands.ttf</string></array><key>UIBackgroundModes</key><array><string>audio</string><string>fetch</string><string>remote-notification</string><string>voip</string></array><key>UILaunchStoryboardName</key><string>LaunchScreen</string><key>UIRequiredDeviceCapabilities</key><array><string>armv7</string></array><key>UISupportedInterfaceOrientations</key><array><string>UIInterfaceOrientationPortrait</string></array><key>UISupportedInterfaceOrientations~ipad</key><array><string>UIInterfaceOrientationLandscapeLeft</string><string>UIInterfaceOrientationLandscapeRight</string><string>UIInterfaceOrientationPortrait</string></array><key>UIViewControllerBasedStatusBarAppearance</key><false/></dict></plist>

i have tried so many tries on this but it doesnt work

An error occurred while processing the post-install hook of the Podfile. undefined method `source_tree' for

$
0
0

could anyone give me a solution when installing pods in my ios app with react native? I won't be able to solve this.

this is the error

I have tried gem install xcodeproj, gem install cocoapods, I have removed the podfile.lock, and everything I have been able to see on the forums, and nothing. This is my Podfile:

# Resolve react_native_pods.rb with node to allow for hoistingrequire Pod::Executable.execute_command('node', ['-p','require.resolve("react-native/scripts/react_native_pods.rb",    {paths: [process.argv[1]]},  )', __dir__]).stripplatform :ios, min_ios_version_supportedprepare_react_native_project!linkage = ENV['USE_FRAMEWORKS']if linkage != nil  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green  use_frameworks! :linkage => linkage.to_symendtarget 'AwesomeProject' do  config = use_native_modules!  use_react_native!(    :path => config[:reactNativePath],    # An absolute path to your application root.    :app_path => "#{Pod::Config.instance.installation_root}/.."  )  target 'AwesomeProjectTests' do    inherit! :complete    # Pods for testing  end  post_install do |installer|    # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202    react_native_post_install(      installer,      config[:reactNativePath],      :mac_catalyst_enabled => false,      # :ccache_enabled => true    )  endend

Expo - Deep linking on IOS doesn't open my app inside instagram but in the browser it works

$
0
0

I just integrated Deep linking on my app and things are working fine. The app opens in case it's installed and if it don't it goes to the website.

Links coming from whatsapp, browser, email, etc are working fine, but links coming from instagram for some reason it doesn't work.

Do you guys know how I can make it work? I believe its something related to infoPlist

Here is my infoPlist on app.json:

"infoPlist": {"NSContactsUsageDescription": "Allow our application to access your contacts so you can invite people to events","NSLocationWhenInUseUsageDescription": "Allow our application to use your location so you can see events around you","NSPhotoLibraryUsageDescription": "Allow our application to access your photos so you can upload photos to your events and your profile","CFBundleAllowMixedLocalizations": true,"UIRequiresFullScreen": true,"LSApplicationQueriesSchemes": ["fb","fbapi","fbauth2","fb-messenger-api","instagram","tiktok","comgooglemaps","twitter"]  }

iOS Bundling failed: Error running an expo development build

$
0
0

So I recently updated my expo SDK from 49 to 51 and created a new development build, but when I tried to run metro I had the error below;

iOS Bundling failed 1653mserror: node_modules\expo-router_ctx.ios.tsx: node_modules\expo-router_ctx.ios.tsx:Invalid call at line 2: process.env.EXPO_ROUTER_APP_ROOTFirst argument of require.context should be a string denoting the directory to require.

I have seen a bunch of solutions online about not including expo-router/babel in the babel.config then creating a new development build and other solutions that did not work for me.

I am writing this for anyone that might encounter a similar issue. Solution is in the answers.

How to import and use a native module from a React Native dependency

$
0
0

Lets suppose a library called "TestLibrary" that has some native iOS implementation, and also that it is a dependency in a React Native project.

Is possible to import and use the iOS implementation in /ios? I basically want to also use this library in native iOS.

UnexpectedAppleResponse Error when trying to publish app to App Store

$
0
0

I'm trying to publish my first app to the Apple App Store. It's an Expo React Native App.

I'm currently submitting the build to the app store with eas submit -p ios --latest. However, I'm getting the error:

Failed to create App Store Connect API Key.    UnexpectedAppleResponse: The specified resource does not exist - There is no resource of type 'apiKeys' with id 'XXXXXXXXXX'

I'm watching an online tutorial and I've been able to follow every step until now. Any advice on how to fix this error would be greatly appreciated. Thank you in advance!

project file size during uploading to EAS build

$
0
0

I created a project with the expo and want to run eas build. but during the uploading of my project files to eas build my project file size was 161 MB.

It's my first time getting a build file from my project so I don't know if this size is normal, if it's not how can I decrease this size? or how I can build my project for android and ios.


React Native app not running in XCode iOS simulator

$
0
0

I try to make my first steps using React Native. Development for Android (on Windows host) works. Now I wanted to test iOS, and tried to set up a development environment on a MacBook Pro.

Problem: React Native starts the iOS simulator, and then nothing happens any more. The simulator runs OK, but my React native app won't start.

What do I need to do to get my React Native installation going?

More Info:

I set up XCode and React Native according to the docs on the MacBook Pro running OSx 10.13.2 (High Sierra). XCode was installed and tested successfully, including the simulator.

When I installed Node.js I deliberately picked an older version (containing npm 4.2.0), since forums say that React Native does still have problems with npm 5. I also installed Homebrew and Watchman, like stated in the docs.

To initialize an empty project, I used

create-react-native-app HelloWorldProject

and a projet structure got created in my Documents folder.

If I finally fire up my "Hello World" test app using

cd HelloWorldProjectsudo react-native run-ios

the system responds:

Starting packager ...Starting simulator ...

and then nothing happens. The simulator does indeed start (boot --> apple logo --> progress bar --> IOs start screen), but nothing happens afterwards.

EditI have given up on React Native for several reasons, I leave this question here for documentary purposes, but I cannot verify or accept any answer, I don't have a React Native development environment any more.

React Native NSInvalidArgumentException unrecognized selector sent to instance

$
0
0

I'm trying to integrate react native app to existing IOS app. But i get the error below.

Error Log :*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RCTCxxBridge devSettings]: unrecognized selector sent to instance 0x14d3317c0'*** First throw call stack:(0x18b500f20 0x183386018 0x18b60a480 0x18b49dfb4 0x18b49d8d0 0x11232eaec 0x11232be48 0x111578b98 0x11157a7bc 0x11158ed18 0x11158f4d8 0x1e83578f8 0x1e83540cc)libc++abi: terminating due to uncaught exception of type NSException

react: 18.3.1

react-native : 0.74.2

Sample codes from : https://github.com/duytq94/demo-integrate-react-native/tree/master

RNViewManager.swift

import Foundationimport Reactclass RNViewManager: NSObject {    var bridge: RCTBridge?    static let sharedInstance = RNViewManager()    func createBridgeIfNeeded() -> RCTBridge {        if bridge == nil {            bridge = RCTBridge.init(delegate: self, launchOptions: nil)        }        return bridge!    }    func viewForModule(_ moduleName: String, initialProperties: [String : Any]?) -> RCTRootView {        let viewBridge = createBridgeIfNeeded()        let rootView: RCTRootView = RCTRootView(            bridge: viewBridge,            moduleName: moduleName,            initialProperties: initialProperties)        return rootView    }}extension RNViewManager: RCTBridgeDelegate {    func sourceURL(for bridge: RCTBridge!) -> URL! {        #if DEBUG            return URL(string: "http://192.168.1.25:8081/index.bundle?platform=ios")        #else            return Bundle.main.url(forResource: "main", withExtension: "jsbundle")        #endif    }}

Sample Button Click Code :

let rootView = RNViewManager.sharedInstance.viewForModule("MyReactNativeApp",                   initialProperties: ["message_from_native": "messageFromNative"])let reactNativeVC = UIViewController()reactNativeVC.view = rootViewreactNativeVC.modalPresentationStyle = .fullScreenpresent(reactNativeVC, animated: true)

build failed in react-native-android

$
0
0

error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed withan exception. * Where: Build file 'C:\Users\chatgpt\Documents\GitHub\TikTokClone\node_modules\react-native-reanimated\android\build.gradle' line: 226 * What went wrong: A problem occurred evaluating project ':react-native-reanimated'. > Could not find method namespace() for arguments [com.swmansion.reanimated] on extension 'android' of type com.android.build.gradle.LibraryExtension. * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 7s.
info Run CLI with --verbose flag for more details.

hello everyone, I am a new developer in React-Native, I try to launch my project but I cannot, I installed all the dependencies with npm inatall successfully, but when I launch npx react-native run- android i got the error this above, any help will be appreciated

ITMS-91064 NSPrivacyTracking must be true if NSPrivacyTrackingDomains isn‘t empty. Keys and values

$
0
0

I have issue releasing a react-native project in appStore after I submit the app. I get rejection from Apple

rejection msg:

ITMS-91064: Invalid tracking information - A PrivacyInfo.xcprivacyfile contains invalid tracking information at the following path:“Frameworks/SASDisplayKit.framework/PrivacyInfo.xcprivacy”.
NSPrivacyTracking must be true if NSPrivacyTrackingDomains isn‘tempty. Keys and values in your app’s privacy manifest must be valid.For more details about privacy manifest files

I added this snippet from react-native to my project in the PrivacyInfo.xcprivacy

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict><key>NSPrivacyTrackingDomains</key><array/><key>NSPrivacyCollectedDataTypes</key><array/><key>NSPrivacyAccessedAPITypes</key><array><dict><key>NSPrivacyAccessedAPIType</key><string>NSPrivacyAccessedAPICategoryFileTimestamp</string><key>NSPrivacyAccessedAPITypeReasons</key><array><string>C617.1</string></array></dict><dict><key>NSPrivacyAccessedAPIType</key><string>NSPrivacyAccessedAPICategoryUserDefaults</string><key>NSPrivacyAccessedAPITypeReasons</key><array><string>CA92.1</string></array></dict><dict><key>NSPrivacyAccessedAPIType</key><string>NSPrivacyAccessedAPICategorySystemBootTime</string><key>NSPrivacyAccessedAPITypeReasons</key><array><string>35F9.1</string></array></dict></array><key>NSPrivacyTracking</key><true/></dict></plist>

Note: I also update react-native-firebase/analytics to the latest version 19.2.2, because according to the issue in GitHub I need to update to the latest version, however that didn't fix it

this how the PrivacyInfo.xcprivacy looks from Xcodeenter image description here

any clue how to fix this issue?

React native swift module does not have RCTResponseBlock

$
0
0

im trying to develop live activity module in my app. When the activity is created, i need to return activityToken from native code to js code. I have read that getting activityToken from live activity is async function so i need RCTResponseBlock in my native function.

The problem is, RCTResponseBlocks dont exist in my swift code and idk why.

here are my files:
My file tree
widget bridge.m
Bridging-Header.h
WidgetModule.swift

I need to access RCTResponseBlock in my swift code?

Im on a RN 0.73.3 version

Viewing all 17243 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>