Expo CLI - how to navigate to project? - expo

I realise this seems like a very simple thing and I expect I'll get downvotes for posting it but I've been at it 3 hours now and I'm literally nowhere.
I have built an app in react native using Expo and now the plan is to create a build. I've installed Expo CLI, but when I log in, how do I tell it which project I want to build? Currently, I type eas project:init and it creates a project using the username of the computer. I'm then unable to navigate out of this project in any way.
I've gone through all the commands on the list in github and none of them does what I need to do.
How do I tell CLI which project I want to work with?

So... foolish earthling... it helps if you run expo cli from within your project folder... that makes the whole question moot.

You can config it in eas.json
For example your project URL like https://expo.dev/accounts/myorgname/projects/appname
{
"expo": {
"name": "AppName",
"slug": "appname", // ✅
//....
"extra": {
"eas": {
"projectId": "YOUR_PROJECT_ID_HERE" // ✅ Go to "Overview" page in Expo.dev for getting your project id
}
}
}
}

Related

Using fileImporter to import cloud folders

I'm using fileImporter to let the user select a folder:
.fileImporter(
isPresented: viewStore.binding(\.$fileImporterPresented),
allowedContentTypes: [.folder],
allowsMultipleSelection: false
) { resources in
// Do something
}
On macOS 13 (SwiftUI, not Catalyst) everything works as expected.
On iOS 16.1 it shows an open action for a folder but I cannot access Dropbox.
When I add additional allowedContentTypes like .directory, or .volume then Dropbox is no longer greyed out but it is also no longer possible to select a folder:
Selecting a folder seems to only work when the only allowedContentType is .folder.
How do I configure fileImporter to select a folder on an iOS external cloud storage provider?
The problem seems to be with Dropbox not implementing NSExtensionFileProviderSupportsPickingFolders. That's why it's greyed out in the fileImporter but also in the UIDocumentPickerViewController.
More information: https://stackoverflow.com/a/71379422/225833

"Elasticsearch:UserIllegalArgumentException" on app that was working before

I have an app published on Android that was working perfectly, one day just stopped working, debugging the code I got this error on elastic search query:
"Elasticsearch:UserIllegalArgumentException"
Any clue? I think this is something related to AWS Admin Page Settings but not sure, I don't know what can I do.
Notes:
The React Native code has not been updated.
The app was working everyday and stopped to work without touch the code, so the error should be something related to AWS, I don't know :s
It is very likely that your index was deleted. You can check that by going to your esv3 dashboard, click on "domains" and then click on the domain in question. Then find the "indices" tab and see if the index you're using is there. If not, you'll need to recreate it and its data.

AWS Amplify: Same admin query on two separate apps

So here's my situation...I have two React apps that need to talk to the same Cognito User Pool. I've been able to accomplish this by copying the aws-exports.js file from the first app to the second app I created (not sure if this is something I should be doing or not but it is working). The issue I am having however is when I run an Admin Query on the second app (to say list users in the Cognito User Pool) I get a 403 (Forbidden) error. Has anyone ever run into this before? Googling all day has not helped me so I figured I would ask.
You'll need "multi-frontend" solution:
https://docs.amplify.aws/cli/teams/multi-frontend
I'll give you some useful infos for this:
Open the Amplify Console and there the "first" app (wheres the backend was created).
Go to the first app's "backend" section
Select "Backend environments" tab
Search for "Edit backend" box and this text: "To continue working on the backend, install the Amplify CLI and make updates by running the command below from the root of your project folder"
copy that command, and paste/run in second app's root.
Beware!
do not modify (and push) the backend from the second application.
if you use git branch based environment you must always switch the env AND the branch parallel. Do not pull the "master" backend for your "dev" env.
try to avoid modifing on amplify console if you modify things with amplify cli. Those things cannot be syncronized... :(
If you store multiple apps in a git monorepo:
https://docs.amplify.aws/cli/usage/monorepo

Deploying Ember application with Addon to Github Pages

My organization is using Ember addons to develop a set of shared components between our applications. Let's call this repository app-components. Currently the components application's primary responsibility is to distribute CSS, fonts and images.
We are also building a living styleguide that will ingest our shared components and present them in a neutral way for developers to reference. Let's call this repository app-styleguide. Our goal is to deploy app-styleguide using ember-deploy to deploy this solution to Github Pages. The url follows this pattern:
https://organization.github.io/app-styleguide/
When the app-styleguide application makes it to the gh-pages branch and is served as a webpage, all of the fonts and images being delivered by app-components are giving us a 404. I have referenced a handful of different solutions to this problem, but I keep coming across the same solutions that we have tried.
I have tried using the following two ember addons that automate the deploy to github pages:
https://github.com/poetic/ember-cli-github-pages
https://www.npmjs.com/package/ember-cli-deploy-gh-pages
In the end we went with a vanilla ember-cli-deploy solution, as those two addons are quite old...
I have followed the instructions here to add rootUrl andlocationTypeproperties to ourenvironment.js` file, which has not worked:
https://github.com/ember-cli/ember-cli/issues/398
Our environment.js file looks like this:
if (environment === 'production') {
ENV.rootURL = '/app-styleguide';
ENV.locationType = 'hash';
}
And our requests continue to not add app-styleguide to the request URL's for assets coming from the Addon. Here is an example of a failed request from the Chrome DevTools Network tab:
Request URL:https://organization.github.io/assets/images/thumbnail-icons/person.svg
Request Method:GET
Status Code:404 Not Found
As you can see, app-styleguide is not added to the request.
Any help is greatly appreciated!
I was able to receive some help over on the Ember Slack Community
(special thanks to #alexspeller). It turns out I needed to update a couple of settings in the fingerprinting of assets.
Using the included broccoli-asset-rev library I had to modify my ember-cli-build.js to include the following:
var app = new EmberApp(defaults, {
fingerprint: {
extensions: ['js', 'css', 'png', 'jpg', 'gif', 'map', 'svg', 'ttf', 'woff'],
prepend: '/app-styleguide/'
}
});
I needed to update the options to account for SVG, TTF, & WOFF, as well as the proper prepended url segment.
You can read about the functionality here:
https://ember-cli.com/asset-compilation#fingerprinting-and-cdn-urls
Available options:
https://github.com/cibernox/broccoli-asset-rev?files=1#options

MismatchSenderId on Django - Firebase Cloud Messaging

I would like to implement Django-fcm when I try to test it, I was able to install Django FCM everything went successfully.
Here is the error that appears MismatchSenderId.
Here are some illustration screenshots:
Any help is appreciated.
I had the same error, I debugged and found out that in the Django project I was not using the right json file. To make sure, you are not adding the wrong json file,
go to the
firebase console > select your app -> go to settings ->select service
accounts tab -> select python ->
download the server key json file and add the code mentioned to the settings file.