onContinueUserActivity referral links - swiftui

How does one test app referral links?
I want to know how to get my referral link if the user downloads the app from App Store
https://apps.apple.com/us/app/app-name/id1111111?referralURL=mydomain.com?key=value
RootView()
.onContinueUserActivity(NSUserActivityTypeBrowsingWeb, perform: { userActivity in
userActivity.referrerURL
})
Is the userActivity.referrerURL going to be mydomain.com?key=value?

If you want to test the non-installed flow, this is pretty easy, too.
First, give your Firebase project an app store ID in your project settings. It can be any valid App store ID -- it doesn't have to be for your app.
Then generate a new dynamic link.
This time, when you click on this new link, it should take you to the app store for the ID you listed above. You don't need to actually install this app -- just making it to the app store listing is good enough.
Now, go ahead and reinstall and run your app. If everything is working properly, it should retrieve and display the dynamic link data for you.
from How can I test Firebase Dynamic Links if my app is not in the App Store?

Related

How to build a Shinymanager and Brochure app with Golem

I don't really have a repository to share as I am falling at the first hurdle sadly. I was wondering how to build an golem app that is both a Brochure and shinymanager one as I am hoping to create a login page for my app that leads to a menu page that can lead to multiple options of other pages.
I have tried wrapping the first page UI with secure_app but nothing happens when I hit 'log in'. I'm not quite sure how to determine what page the auth page goes to after logging in.
Just looking for a starting point to go off! Perhaps there is something else I can use other than Brochure to create a multi-page app with shinymanager log in?
Please consider giving some form of code -- here is info on how to write reprex -- you are trying to execute, if you cannot provide a repo to work on.
Consider moving to the polished package for authentication. I have that working with the brochure package -- note it is still in development.

React limit access to specific users

I'm building an App using react and django as backend.
I have JWT authentication set up and working. But I am wondering if it is safe to include menu items and logic of views that will be displayed only to specific users and will include sensitive information. Of course these views will only be visible to the relevant users.
My question is if it possible for someone to extract the info from the react build? And if so, what is the best practice to avoid such situation?
Your javascript code should not contain sensitive information. Such information should be dynamically fetched and checking permissions on a per request basis when the screen is actually rendered that needs to display it.
If you even want to hide certain screens so that users can't see certain features on your app that are not available to them you either need to bundle those screens into another app and serve that on another url or you can dynamically fetch javascript containing these views.
Usually this is not worth the effort as you should concentrate on correctly checking permissions for your api.
EDIT:
Assuming i'd like to dynamically fetch the JS with the sensitive views and add those to my app, how do i do that?
I assume you are using webpack 2 for bundling your react app? Then you need to use dynamic imports for the parts that need to be dynamically loaded. Then in django you need a custom view that serves your static files and checks for permission to access this part of your react app when it is requested.
This tutorial explains how to lazy load components using webpack 2.
I am guessing that you encode user roles in the JWT token itself and exact it using something like jwt-decode then match the to roles to render different components.
For example you might be doing something like check for a 'admin' role and render a link in nav bar for /admin route.Which i think i safe to do.
But what if a user looks into your code and sees that there's a /admin route and tries to access it?
So u also got to have logic inside the route to check for role 'admin' and serve something like a '404' if the role doesn't match.
You can dynamically fetch any route once the user role matches.

Ionic2 web app routing configuration

I am working on ionic2 project, which is web project (i.e. runs as a website on browsers not a mobile app). Here I am facing difficulty to give specific URL for pages. How do I implement routing in my project ?
I also worked with angular2. Where we can give URL to components. But here that thing is not working.
Take a look at this website: https://www.joshmorony.com/a-simple-guide-to-navigation-in-ionic-2/
and read up on the nav controller here: https://ionicframework.com/docs/api/navigation/NavController/
Some Context: While Ionic2 does use the native browser for each platform, it uses a special controller to change routes
NavController is the base class for navigation controller components like Nav and Tab. You use navigation controllers to navigate to pages in your app. At a basic level, a navigation controller is an array of pages representing a particular history (of a Tab for example). This array can be manipulated to navigate throughout an app by pushing and popping pages or inserting and removing them at arbitrary locations in history.
Before diving deeper into Ionic I suggest obtaining an understanding of this controller.
This sample ionic project will also help with the understanding of navController:
https://github.com/ionic-team/ionic2-starter-sidemenu

Clarification about Django-Oscar

I have already finished setting up my home, about and contact us page using bootstrap in one project. I wanted to use the django-oscar for the e-commerce configuration and use it in my products page.
Do I need to add another project or just create another app for django-oscar?
By the way I created another project and am currently stuck on how to connect it the first project I have made
You don't need to create another project for your product's page. You can easily install Oscar (which will install Django as a dependency). It supports a simple design built with Twitter's Bootstrap.
You can read this: Getting started with Oscar and How to customise templates for create home, about and contacts pages.
Hope I help!

Django example for a web app that show git logs

I am looking for an example about how to display git log data about a commit.
I get the commit via shell script; then retrieve the info about this commit and make it pretty. Now I would like to add on a web app in Django, the capability to pass hash and project repo name, so I can display thee info in a nice way.
Altho I can't find tutorial that show how to build a web app for django, that display a page in this way. I just start with the tutorials today, so I don't know much. I also need to read from file, so I don't need a database nor the model, right?
IS this too complicate for a first Django app?