Reputation: 11
I made two different schemas(two builds, e.g. Development and Production) in my iOS project.
And I have to provide a possibility when a user clicks on a link in a mail, to redirect him(if he has the app installed) to the app.
I've done a little research and I saw that I can do that with URL Schemas. But I have not found a way how to set an URL Schema to the particular build(app), how to differentiate them.
Is there a way to set two different URL Schemas for two different builds in the same app?
Upvotes: 1
Views: 1206
Reputation: 710
Don't copy info plist just to make a small change. Create an xcconfig file to define the values that are different for the two schemes and just reference that in your info.plist
This way the guy who recently joined the project can't forget to add a value to both plists.
Upvotes: 1
Reputation: 2909
Yes it is possible.
Copy your original Info.plist
and name it for example Info_debug.plist
Then click on your project (the blue icon at the very top left of your file navigator) and go in the Build Settings > Packaging section, there you will find the item "Info.plist file" and if you made at least 2 different builds you should get a little arrow right to the left of this item: unfold it and you should be able to customize your plist file for every build... As shown on the attached screenshot.
In this example you should just change the name of the Debug line to Info_debug.plist
and you're done!
Upvotes: 0