You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you want to provide appleTeamId and appleBundleId in runtime (in case you serve multiple apps from the same backend) you can use
createResponderAppleAppSiteAssociation function. See a full example from a market place that each store can have a native app.
import{createResponderAppleAppSiteAssociation}from'meteor/quave:universal-links';import{StoresCollection}from'../../app/stores/data/StoresCollection';import{getNativeStoresInfo}from'./native';import{getBaseUrlFromHeaders}from'../mode/modeCommon';exportconstappleAppSiteAssociation=(req,res)=>{constbaseUrl=getBaseUrlFromHeaders(req.headers);conststore=StoresCollection.findByFullUrl(baseUrl);constnativeStoresInfo=getNativeStoresInfo(store);if(!nativeStoresInfo.nativeAppEnabled){res.setHeader('Content-Type','text/html');res.writeHead(405);res.end(`<h1>Native App not enabled for ${store.name}</h1>`);return;}if(!nativeStoresInfo.appleTeamId||!nativeStoresInfo.appleBundleId){res.setHeader('Content-Type','text/html');res.writeHead(405);res.end(`<h1>Bundle ID and Team ID are not configured for ${store.name}</h1>`);return;}createResponderAppleAppSiteAssociation(nativeStoresInfo)(req,res);};Meteor.startup(()=>{WebApp.connectHandlers.use(APPLE_APP_SITE_ASSOCIATION_PATH,Meteor.bindEnvironment(appleAppSiteAssociation));});
License
MIT
About
Meteor package that allows you to expose your native iOS settings to enable Universal Links.