How to check if an app is installed to my Shopify Store - shopify

I can see all of my installed apps in shopify admin/apps, but i want to check it using some code behind (from my rails app).
Is there any way to list all the installed apps in my Shopify Store
or check specific app if it's installed or not?
Thank you.

check specific app if it's installed or not?
You can use ShopifyAPI::Shop.current. If the shop is not installed you'll get a ActiveResource::UnauthorizedAccess exception.
You'll also see ActiveResource::ClientErrors for shops that are suspended (e.g. credit card expired) and ActiveResource::ResourceNotFound for dead shops.

Related

Is In-app purchase required for Huawei install referrer

As per this documentation the way I can use Huawei install referrer in React Native is:
import {HMSInstallReferrer} from '#hmscore/react-native-hms-ads';
So install referrer is a part of the hms-ads package.
And of the 3 APIs in the documentation:
HMSInstallReferrer.startConnection(...,...)
HMSInstallReferrer.isReady()
HMSInstallReferrer.getReferrerDetails()
I can see that startConnection() is successful, but isReady() returns result as false.
After some research I found this link, where at the bottom it says:
Enabling Required Services
To use HUAWEI Ads, you need to enable the IAP service first and also set IAP parameters.
Questions
Do we actually require In-App Purchase to be enabled to use simple
install referrer?
Won't that show as "Contains in-app purchase" on the app details
page?
For this service to enable there are too many things to set up as
well, including merchant service etc.. which is too much for what we
intend to build.

command shopify theme serve show error when i'm the owner

i try to use command shopify theme serve in my project. My account is owner and i also create a staff account with all sensitive permissions. But the terminal always return You can't use Shopify CLI with development stores if you only have Partner staff member access. If you want to use Shopify CLI to work on a development store, then you should be the store owner or create a staff account on the store. . How i can fix this
I've had a plethora of issues with Shopify CLI, so I can help here. This has happened when I have been logged in for a while. I will need more information, but will provide a few catch-all solutions.
1.Are you using a developer account, or are you logged into a store? Try logging out and logging in again as the owner account.
What version are you using?
shopify version
Have you tried logging out and logging back into your store? This usually rectifies it.
shopify logout
shopify login --store=[your .myshopifyURL]
Are you using ruby or homebrew? I have found ruby to be much more stable, and it allows to switch between Shopify CLI versions.
Try switching to a previous shopify version 2.20 or 2.19 if you continue seeing issues. Again, this will need to be done with ruby, as homebrew does not allow any version backtracking.
Edit: make sure your login command looks like this:
shopify login --store=verizon.myshopify.com
You can paste this link from shopify admin, as it is the same link.

How to distribute an app in beta in shopify ?(with App Bridge)

I've got a stupid question. Could I distribute my app in beta if I want to use App Bridge?
From what I see, there is no solution expect to publish on the App Store or to be Shopify Plus service partners. Am I missing something?
you can make an App custom, and install on one store, and have no review by Shopify
you can make a public App, install on any test store, and test till you're happy, and have no review
you can have a review, and pass, but not go in app store.
you can have a review, and pass and go in app store.
You are your own Beta and you dog food your App using your own store till you're happy.

Can not alter/add data on shopify paid plan store by unlisted public app

I am facing some weird issue in Shopify app development. I have created app which is working fine on Development store. it is able to add some data on development store.
But for testing purpose I have offered this app to the merchants to test this app on their live store having activated Shopify Paid plan. But app can not add any data. Post/Put requests are auto converted to Get requests.
I have created couple of apps those are published on App store and in past they were being used by Active Paid Plan merchants before app has been published without any issue.
Is there something changed on Shopify side. or I am missing something this time ?
Any help will be appreciated.
every put/post request's endpoint should be on .myshopify version of domain.
I was passing primary domain. and it was working fine in dev stores as dev store. because in dev stores .myshopify version domain and primary domains are same.
I did not get this issue for so long. it was a silly mistake but stops app functionality.
Posting answer just because other people would not make such a blunder.

What is the Shopify Public App Install Flow?

So I've been building a Shopify App.
Currently I've gotten to the point where I get the permanent access code.
My question lies with the flow of installation.
Currently the store owner would create an account on my website, then click a button to install our shopify app.
taken to shopify app install prompt -> clicks install -> redirects to my site where I exchange code for access code.
This works fine. But where I am having trouble is what if once my app is on the Shopify Store.
A store installs it from shopify directly (meaning they don't have an existing account with me) I then have no account to save the data to.
How do I go about this?
I looked at other apps on the store. Some apps like Shippo can take you straight to their site first to create an account and then install their app.
What's the solution?
You misunderstand the install from Shopify. When someone installs from Shopify, they come knocking on your door. They introduce themselves as being ***.myshopify.com. Once they approve your App and accept your terms of service, you get to confirm their account, and hence you persist their data in your database exactly the same as someone that installed your App outside Shopify.
So when you say you no account to save the data to, well of course. They are a new install. So make a new record. Instead of an update, you to a create.