Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to register different URL Scheme for each app configuration (Debug, Release, ..etc)?

So I have two URL Schemes that look like this myapp:\\ and myapp-dev:\\ that I added under {MyTarget} > Info > URL Types and I need each one of them to open the corresponding app (first one for release and the other for debug). Is there any way to do that?

like image 616
Ahmad Ismail Avatar asked Mar 02 '23 00:03

Ahmad Ismail


1 Answers

Ok here's how to do it:

  1. Select your target > Build Settings > The + button > "Add User-Defined Setting"

enter image description here

  1. Give it a name (let's call it "APP_URL_SCHEME") and then click on the arrow at its left to expand the "Debug" and "Release" options and add both your URL schemes in place

  1. Now go to the "info" tab, expand the URL Types and click on the + button below it to add a new one then use the setting we just defined as the URL Schemes like this $(APP_URL_SCHEME)

like image 54
Ahmad Ismail Avatar answered May 04 '23 16:05

Ahmad Ismail