“launchPackager.command” cannot be opened because it is from an unidentified developer
Save the sqlite file to phone storage in react-native-sqlite-storage
I am trying to save SQLite file to the phone storage because the user deletes or reinstalls the app then the user will lost the previous data of the app. So is there any way to save data to phone storage for persisting SQLite file? Thank you for your answer.
react-native-apple-authentication not returning email neither fullname
I'm trying to implement Apple SignIn in my ReactNative app, I added the react-native-apple-authentication (https://www.npmjs.com/package/react-native-apple-authentication) and then installed the pods, then I added to the Apple SignIn capability in Xcode.
After pressing the button and trying to log in with my Apple account, the following object is returned:
{
authorizationCode: null
authorizedScopes: Array(0)
length: 0
__proto__: Array(0)
email: null
fullName: null
identityToken: null
realUserStatus: 1
state: null
user: "receivedMyTokenHere"
}
But I need the fullName and email, don't know how to get them. Inside the library, the method AppleAuthentication.requestAsync is requiring the fullName and email scopes, but for some reason I'm not receiving them. Any idea?
How to slide a component in a flatlist in react-native?
The aim is to slide a component from a flatlist, to slide from right or left to bring up options like we have on Instagram. Instagram has the slider report functionality only for iOS not for android
We already tried using react-native-navigation-drawer, as it can create menu inside of particular view, but it conflicts with our dependencies on project, so we are looking for other options.
How to set iOS status bar background color in React Native?
Is there a single place in the react native iOS native code that I could modify to set iOS statusbar backgroundColor? RCTRootView.m ?
The react native StatusBar component only support backgroundColor for Android only.
The iOS operating system seems to allow setting status bar backgroundColor
How do I locate/access PDF files generated through my app on iOS?
I'm using https://github.com/christopherdro/react-native-html-to-pdf to generate PDF files
.
On Android
they end up in my Download folder and all is good, on iOS however they end up in:
/var/mobile/Containers/Data/Application/xxxxxxxxxx/Documents/xxxx.pdf
How do users then locate the files? I assumed they would be visible in the "Files" app but they're not. I'm basically doing this for iOS:
let options = {
html: '<h1>PDF TEST</h1>',
fileName: 'test',
directory: 'Documents',
};
I've tried without supplying a directory, or "docs" instead of "Documents" which put them in the same place but /temp instead of /Documents.
Am I doing something wrong? How are iOS users supposed to locate/access the PDF files without having to go through a bunch of stuff to access that folder? Is it possible to make them appear in the "Files" by default?
Thanks in advance.
500 error while doing a put/post/patch request in react native ios
I am attempting to create a put request to my react native (0.60.4) ios project and every time I do so I receive a 500 error when making my request. I am getting the same error while doing a post or patch method as well. I also receive a 500 error while attempting to make the request with postman.
My sql update works fine as I have ran the script against the database and received the expected value, which is simply updating a boolean value.
Here is my update method in redux
export const setChecklistItemToComplete = checklistItemId => {
var checklistItemInstance = axios({
method: 'put',
url: `http://localhost:8080/xxxxxxxx/${checklistItemId}`,
headers: {
'Content-Type': 'application/json;charset=UTF-8',
'Access-Control-Allow-Origin': '*'
}
})
console.log('checklistItemInstance: ', checklistItemInstance)
return {
type: MARK_CHECKLIST_ITEM_COMPLETE,
payload: checklistItemInstance.data
}
}
Here is my controller
try {
const db = req.app.get('db')
const { MarkChecklistItemComplete } = db.checklistItem.put
const { params = {} } = req
const { checklistItemId } = params
if (joi.string().guid(checklistItemId)) {
throw new Error('The id is not in the correct format')
}
console.log('checklistItemId: ', checklistItemId) <---GETS TO HERE
var checklistItemInstance = await MarkChecklistItemComplete({
checklistItemId
})
res.status(200)
res.json(checklistItemInstance)
} catch (error) {
res.status(500)
res.json(error)
}
}
I'm assuming this has nothing to do with this code here but more so the configuration of the app itself. But it can't hurt to post it. If there is anything else you would like to see I will gladly share that.
main.jsbundle file showing in my iOS project but still throwing "No bundle url present"
I am creating new React native app but facing error like "No bundle url present" while running it on iOS Simulator.
Command to Run App on iOS:
react-native run-ios --port=8089
I tried every possible solution suggested on below links.
What is the meaning of 'No bundle URL present' in react-native?
https://www.andrewcbancroft.com/2017/04/22/solving-react-natives-no-bundle-url-present-error/
and lots of other references but no luck at all.
Solution 1: I tried to add AppTranportSecurity flags in info.plist.
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSAllowsLocalNetworking</key>
<true/>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
Solution 2: Try to remove the build form iOS folder and build it again.
- Remove the build folder with
rm -r build
- Run
react-native run-ios
again
Solution 3: Added below line in Package.json file
"build:ios": "react-native bundle --entry-file ./index.js --platform ios --bundle-output ios/main.jsbundle"
No luck at all.
Even my metro builder running on port 8089 as 8081 uses by MacFee firewall app.
No podspec found for `React-Core` in `../node_modules/react-native/React`
I'm using React Native. I get this issue when I try to upload pods. I've successfully installed node_modules, but I'm getting this problem. What is the problem? If we delete the package-lock.json and node_modules folder, I reinstalled npm. But I'm having this problem when I'm doing pod install.
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
target '...' do
# use_frameworks!
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
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-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'
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 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
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'
# Required by RNFirebase
pod 'Firebase/Core', '~> 6.8.1'
# [OPTIONAL PODS] - comment out pods for firebase products you won't be using.
# pod 'Firebase/AdMob', '~> 6.8.1'
pod 'Firebase/Auth', '~> 6.8.1'
pod 'Firebase/Database', '~> 6.8.1'
pod 'Firebase/Functions', '~> 6.8.1'
pod 'Firebase/DynamicLinks', '~> 6.8.1'
pod 'Firebase/Firestore', '~> 6.8.1'
pod 'Firebase/Messaging', '~> 6.8.1'
pod 'Firebase/RemoteConfig', '~> 6.8.1'
pod 'Firebase/Storage', '~> 6.8.1'
pod 'Firebase/Performance', '~> 6.8.1'
pod 'Fabric', '~> 1.10.2'
pod 'Crashlytics', '~> 3.14.0'
target '..' do
inherit! :search_paths
# Pods for testing
end
use_native_modules!
end
target '...-tvOS' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for ..-tvOS
target 'DeliveryApp-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
Alert.alert not working for IOS in react native
I have used Alert.alert with ok button (on ok button click have added redirection) in react native. Its working fine on android but on IOS Alert shows but its getting closed immediately.
Alert.alert(
'Alert Title',
'My Alert Msg',
[
{
text: 'OK', onPress: () => {this.props.navigation.navigate('Dashboard')}
},
],
{ cancelable: false }
);
Multiple vibrations on receiving local push notification in background in react-native
I would like to have multiple vibrations on receiving one local push notification in background in react-native. How is it possible?
I tried using https://github.com/zo0r/react-native-push-notification with the following code for a silent push notification:
PushNotification.localNotificationSchedule({
message: "This is one message with three vibrations",
playSound: true,
soundName: "silentSound.wav",
repeatType: "day",
date: new Date(time),
})
Sure, I could schedule multiple notifications in a row, but then I would have also multiple messages.
Change font for the title of Navigation Header bar in react-native
In the new version i.e, the 0.61 of react-native, I didn't find any sort of mechanism for changing the font of the title. The earlier versions have their own solutions but the present one doesn't have one, which in turn prompted me to ask the question. How do you change the font?
Expo - Implementing Notifications Set App Icon Badge Number
Despite numerous attempts to implement the app icon badge number in our Expo app, the app icon badge number could not be set. The documentation on setting notifications app icon badge number is also very limited. We are trying to set app icon badge number to 1 when there is new push notification and then reset the app icon badge number to 0 after the user clicked on the notification.
Can anyone point out what’s wrong here?
The following is the callback function for the Notifications listener.
handleNotification = async (notification) => {
const { origin, data, notificationId } = notification
const notif = { id: notificationId, ...data }
// set notifications badge count
try {
const setAppBadgeCount = await Notifications.setBadgeNumberAsync(1)
console.log(`showing app badge number to 1 ${setAppBadgeCount}`)
} catch (err) {
console.log('did not manage to show notif app badge count!', err)
}
if (origin === 'selected') {
this.navigateToNotificationScreen(data)
try {
const resetAppBadgeCount = await Notifications.setBadgeNumberAsync(0)
console.log(`reset app badge count ${resetAppBadgeCount}`)
} catch (err) {
console.log('did not manage to reset notif app badge count!', err)
}
} else { // origin === 'received', show in-app
const { dispatch } = this.props
dispatch(setActiveNotifications([notif]))
setTimeout(() => {
dispatch(setInactiveNotifications([notif]))
}, 10000)
}
}
Thanks in advance!
React-native: How to build for ios from windows
We are starting to work with react-native at my company. We have one mac and the rest of the team is running on windows.
Is there a way to write the app on windows with the ios device connected to the windows machine or local wifi. Then launch the build on the mac (from the windows pc) and get the app launched on the ios device ? So it would like using the mac only as a build/package server.
Hope i am clear enought.
Thanks.
How to solve Apple's UIWebView deprecation warning? [duplicate]
This question already has an answer here:
So I would not be posting this if I had not exhausted every possible medium online addressing this issue.
I'm building a React Native app with Expo (SDK v35) and upon delivering the binaries to App Store Connect, I get a warning that many have gotten:
"ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs."
I realize the warning is related to react-native-webview prior to v7.0.1 and that it will come up if UIWebView is used anywhere, including the dependencies.
However, I have cleaned up the code in its entirety, to the point that grep -r UIWebView ./*
turns up empty (I even removed comments). I also ensured that all dependencies use a version of react-native-webview that is greater than the patched 7.0.1 version. Here's the log from grep -r webview ./node_modules/*/package.json
:
./node_modules/react-native-signature-canvas/package.json: "react-native-webview": "^7.5.2"
./node_modules/react-native-webview/package.json: "_from": "react-native-webview@^7.5.2",
./node_modules/react-native-webview/package.json: "_id": "react-native-webview@7.6.0",
./node_modules/react-native-webview/package.json: "_location": "/react-native-webview",
./node_modules/react-native-webview/package.json: "raw": "react-native-webview@^7.5.2",
./node_modules/react-native-webview/package.json: "name": "react-native-webview",
./node_modules/react-native-webview/package.json: "escapedName": "react-native-webview",
./node_modules/react-native-webview/package.json: "_resolved": "https://registry.npmjs.org/react-native-webview/-/react-native-webview-7.6.0.tgz",
./node_modules/react-native-webview/package.json: "_spec": "react-native-webview@^7.5.2"
The only part of the app where WebView is actually used is through the module react-native-signature-canvas
, which not only uses webview versions >= 7.5.2 but also passes useWebKit={true}
as props, ensuring the use of WKWebView
, not UIWebView
.
Any suggestions on how to get rid of the warning? Also, if I submit the app for review anyway, will it be rejected? Is the warning taken into consideration for review or will they simply test the app on an iOS version that does not support UIWebView
and see if it runs normally?
All help is appreciated.
error Linking assets failed. Run CLI with --verbose flag for more details. Error: Source and destination must not be the same
I am linking assets for the purpose of using external custom fonts. The fonts folder is in './android/app/src/main/assets/fonts/'
. 'react-native link'
does not work but 'npx react-native link'
works, but with this error.
Would be great if somebody solved this problem. Thanks in advance!
ld: library not found for -lRCTGeolocation error after upgrading to 60.5
I upgrade my react native project to 60.5 and after that I get this error building iOS XcodeSpace
ld: library not found for -lRCTGeolocation
React Native init specific version
I upgraded my latest project to React Native 0.19 and instantly the video no longer works. How can I create a new project with a specific version? I want to init a new project at version 0.18.1. I did some google searches but couldn't find anything about this.
$ react-native init newproject --verbose
I'm guessing I need to add the word @18.1 in there somewhere but can't get that to work.
Issue with Google Cast SDK for React Native iOS
I am using https://github.com/react-native-google-cast/react-native-google-cast library for integration google cast with react native for iOS.
I am getting channel init success but later while trying to send message to channel, I get sendTextMessage error Channel is not connected or is not registered with a session.
Here is the code -
sendMediaGetMessage() {
console.debug("entry: sendMediaGetMessage");
console.debug("WatchV:registering channel " + CastConstant.MESSAGE_CHANNEL);
GoogleCast.initChannel(CastConstant.MESSAGE_CHANNEL)
.then(() => {
console.debug("WatchV:channel init success");
GoogleCast.sendMessage(
CastConstant.MESSAGE_CHANNEL,
JSON.stringify({ intent: "get_media" })
)
.then(() => {})
.catch(error => {
console.log(error);
});
})
.catch(function(err) {
console.debug("WatchV:error: sendMediaGetMessage");
console.log(err);
});
}
I am using -
- pod 'react-native-google-cast/NoBluetooth', path: '../node_modules/react-native-google-cast/ios/'
- google-cast-sdk-no-bluetooth (4.4.6)
- Xcode 10.3
- React native 0.59
Note: Using a custom receiver app for chromecast.
Can i implement an E2EE on a voice call mobile app react native?
Am in lost about how and if its possible to implement encryption to my voice call app in react native.
Is encrypting voice in E2EE model for a mobile app is possible? like how about the speed and its a real time data transferring.
What algorithm is better to use if its a good idea to do it? if its not possible (or not a good idea) what do you recommend me to use?
I did a search on internet but there was a lot of fuzzy in what I read as for encrypting voice by signals!?! and there was what I read in some book about stream encrypting too! Should I use it?
The problem is there is no complete guide on internet that shows how to implement and join all the pieces together beside all the articles I read was only give a part of the information then recommend some pre API's that do the whole process of transferring and encrypt the data!
As a note: What I want to do exactly is to build a voice call app in react native using an API for voice transferring but I want (Have to) do the encryption of that voice as its my thesis. So any help by pointing on the way is apricated please. Thanks in advance!