I created an app with expo using the managed workflow, but I now want to eject it so I can build an IPA for IOS. After running expo eject and following the prompts for pod install, when I try to build the app and view it on the simulator in xCode, I get stuck on the splash screen which results in a very long list of errors (attached the relevant looking one below).
Have I missed a step here? I tried looking on the expo documentation but it’s very lacking in using the eject command. Is there a step or something I’m meant to modify after the eject has occurred?
Error: Exception NSException * "expo-updates must be configured with a valid update URL or scope key."
So I resolved this by following these steps after I ejected: https://docs.expo.io/bare/installing-updates/
And also adding the below to the Expo.plist file in the MyApp/Supporting folder with the below:
<key>EXUpdatesURL</key>
<string>https://example.com</string>
Related
I'm building a simple Electron app for MacOS (using React as the frontend). The purpose of the app was to make executing certain terminal commands a lot easier (using child_process.spawn. Primarily I am interested in using the sfdx Salesforce CLI commands.
When I run the app in dev, everything works fine. However when I package the app, the PATH variable gets changed and I'm no longer able to locate the sfdx library. (*note it is still able to find git commands though).
I found a very similar issue here and a bug report in GitHub, both of which recommend the use of the fix-path package. This is where I run into another issue. According to the docs, I should import the package like this:
import fixPath from 'fix-path';
However when I do that inside of my electron.js file I get this error: SyntaxError: Cannot use import statement outside a module. I've seen other resources that use require to bring in the package:
const fixPath = require('fix-path');
But again, when I do that I get this error require() of ES Module not supported.
I tried adding "type": "module" to my package.json file, but that breaks my app as well.
I feel like there is something simple that I am missing here, but can't seem to figure out. I believe that if I could import and use the fix-path package, then this would solve my problems. But if that isn't possible, does anyone know of a way for me to fix the path in my app so that it works in prod?
Thank you in advance!
Some extra details:
The two dependencies I check for are git and sfdx. The following image shows where both of those live on my machine:
And this is the response to the same commands within the packages asar file:
I found a workaround, it looks like fix-path made a move to ESM during the last release. Because I am using CJS modules I just needed to install version 3 of fix-path by running npm install fix-path#3.0.0 --save
In my react native app i want to block/unblock all incoming calls for certain time. when triggered a certain function.
I have searched on google many times but didn’t get any satisfactory answer/result.
Expecting any dependencies or code for call blocking functionality.
I searched for you and I found this component :
npm i react-native-nope-call-block-native-code
you can use this. If u help, you can write or read docs
Getting started
$ npm install react-native-nope-call-block-native-code --save
Mostly automatic installation
$ react-native link react-native-nope-call-block-native-code
Manual installation
iOS
In XCode, in the project navigator, right click Libraries ➜ Add Files to [your project's name]
Go to node_modules ➜ react-native-nope-call-block-native-code and add RNNopeCallBlockNativeCode.xcodeproj
In XCode, in the project navigator, select your project. Add libRNNopeCallBlockNativeCode.a to your project's Build Phases ➜ Link Binary With Libraries
Run your project (Cmd+R)<
Android
Open up android/app/src/main/java/[...]/MainActivity.java
Add import com.reactlibrary.RNNopeCallBlockNativeCodePackage; to the imports at the top of the file
Add new RNNopeCallBlockNativeCodePackage() to the list returned by the getPackages() method
Append the following lines to android/settings.gradle:
include ':react-native-nope-call-block-native-code'
project(':react-native-nope-call-block-native-code').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-nope-call-block-native-code/android')
Insert the following lines inside the dependencies block in android/app/build.gradle:
compile project(':react-native-nope-call-block-native-code')
I'm trying for 2 days to resolve the following problem:
Project works in Expo GO but the APK bundle from Expo is not starting on physical device and throwing errors.
When I put the app on appetize.io most common error is:
Failed to retrieve Firebase Instance Id
The thing is that I don't have Firebase installed at all in my project...
I've tried multiple times for clearing the cache reinstalling the node modules nothing appear to happens...
Can someone give me direction how I can fix this?
Link to full TXT file from debugger log: https://textdoc.co/5oHKDvldXmaPLUGO
I sometimes get an error when trying to install any cordova plugin ionic (usually after around 6pm GMT+0).
These are with plugins from both npm and GitHub, and the error I get is:
Error: Text data outside of root node.
Line: 155
Column: 1
Char: "
The install command will be something along the lines of
ionic cordova plugin add cordova-plugin-network-information#1.3.1
It really does not matter what plugin it is, because as mentioned it happens for a number of them, they all get the same error. It will work perfectly ok in the morning, and then suddenly it shuts down.
I have tried on multiple computers, on multiple separate internet connections (from the UK), and I even have a script that reruns the commands if they fail, so it will attempt to install around 20 plugins continuously until they get installed for however long I run my script. I ran it for an hour constantly, and not a single one was installed.
I also checked the status of npm and GitHub if they were perhaps down, but they seemed to be up and running as usual...
Any ideas would be greatly appreciated
* Based on my comment which helped the asker, and which I was asked to publish as an answer:*
I don't know ionic at all, but I do have some experience with Cordova and never had any issues installing plugins, even on a corporate network.
Try to install the plugin without ionic.
cordova plugin add my.plugin.name
This error can be caused by an invalid AndroidManifest.xml file. After installing a plugin using ionic corvoda, my AndroidManifest.xml got a syntax error and I had this issue when building the APK.
After fixing the syntax error, the build finished successfully.
I am trying to release the React-Native iOS application using Microsoft's Codepush on staging. For this I followed the given instructions on the website and was able to build the bundle file and release successfully on staging but I didn't see the updated changes on mobile which I released.
Firstly I installed the application on mobile using usb (Run on device).
After that I made some changes in my application and released on staging using codepush but when I restarted the app on mobile, it's not showing the changes.
iOS Setup
version: 1.0.0
react-native: 0.17.0
react-native-code-push: 1.5.3-beta
react-native bundle --platform ios --entry-file index.ios.js --bundle-output codepush.js --dev false
code-push release AwesomeProject codepush.js 1.0.0
Can any one help please ? Thanks.
The workflow steps that you posted look correct, so I'm not entirely sure what the issue could be without seeing the logs generated by the CodePush plugin when running your app. If you take a look at our troubleshooting docs, it explains how to examine the logs, along with some common issues and workarounds.
One potential issue is that you're not calling "sync" within the componentDidMount of your root component, and therefore, the plugin thinks your update failed, and rolled it backed. To fix this you simply need to call "CodePush.notifyApplicationReady" in your root component's componentDidMount to notify the CodePush runtime that the update should be considered successful.