{"id":2863,"date":"2017-03-17T11:59:23","date_gmt":"2017-03-17T06:29:23","guid":{"rendered":"https:\/\/www.innovationm.com\/blog\/?p=2863"},"modified":"2023-01-20T18:55:55","modified_gmt":"2023-01-20T13:25:55","slug":"multiple-targets-in-ios","status":"publish","type":"post","link":"https:\/\/www.innovationm.com\/blog\/multiple-targets-in-ios\/","title":{"rendered":"Multiple Targets in iOS"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p><b>So, Why do you need <\/b><b><i>Multiple Targets<\/i><\/b><b>\u00a0?<\/b><\/p>\n<p><span style=\"font-weight: 400;\">I\u2019m giving you an assumption. You have a project where you are interacting with Database using REST APIs. Needless to say, you will have a Login Screen, or Registration Screen or say you have Forgot Password Screen. Then, you must be having two databases <\/span><i><span style=\"font-weight: 400;\">Development_Db <\/span><\/i><span style=\"font-weight: 400;\">(for Development Users)<\/span> <span style=\"font-weight: 400;\">and <\/span><i><span style=\"font-weight: 400;\">Production_Db <\/span><\/i><span style=\"font-weight: 400;\">(for Production Users).<\/span><\/p>\n<blockquote><p>It\u2019s a common Software-Development approach, where we maintain a different database(s) as we don\u2019t want to mix match development data (which developer\/Tester do on their end) with production data (actual Live Users). It\u2019s a healthy practice to maintain data in separate entity.<\/p><\/blockquote>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image14.jpg\"><img fetchpriority=\"high\" decoding=\"async\" class=\"size-full wp-image-2866 aligncenter\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image14.jpg\" alt=\"image14\" width=\"512\" height=\"512\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image14.jpg 512w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image14-150x150.jpg 150w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image14-300x300.jpg 300w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/><\/a><\/p>\n<p>And, I\u2019m assuming you are maintaining two Web Service URL for development and production.<\/p>\n<p><a href=\"https:\/\/development.abc.com\/v1\/loginUser\"><span style=\"font-weight: 400;\">https:\/\/<\/span><b>development<\/b><span style=\"font-weight: 400;\">.abc.com\/v1\/loginUser<\/span><\/a><\/p>\n<p><a href=\"https:\/\/production.abc.com\/v1\/loginUser\"><span style=\"font-weight: 400;\">https:\/\/<\/span><b>production<\/b><span style=\"font-weight: 400;\">.abc.com\/v1\/loginUser<\/span><\/a><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image08.jpg\"><img decoding=\"async\" class=\"size-full wp-image-2867 aligncenter\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image08.jpg\" alt=\"image08\" width=\"500\" height=\"500\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image08.jpg 500w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image08-150x150.jpg 150w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image08-300x300.jpg 300w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">You always had to keep an eye when you are releasing your build whether it\u2019s a Development Build or Production Build before submitting to AppStore or Testers. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">When you are releasing your build for Tester(s) then you have to target development Web Service URL and production Web Service URL when you are submitting to app store. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">Here, you have two kinds of targets. One is Development (targeting to Tester\/Developers) and Other is Production (targeting to AppStore). <\/span><\/p>\n<p><span style=\"font-weight: 400;\">Now, if I ask you achieve this you\u2019ll code something like this. <\/span><\/p>\n<table style=\"height: 338px;\" width=\"616\">\n<tbody>\n<tr>\n<td>\n<pre class=\"lang:swift decode:true\">let isDevelopment = true\r\n\r\n\/\/ make it False when releasing build for App Store\r\n\r\n\u00a0\u00a0if isDevelopment {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0let API_PATH = \"http:\/\/development.abc.com\/v1\/loginUser\/\"\r\n\u00a0\u00a0}\r\n\u00a0\u00a0else{\r\n\u00a0\u00a0\u00a0   let API_PATH = \"http:\/\/production.abc.com\/v1\/loginUser\/\"\r\n  }<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">You will maintain a boolean flag <\/span><b>isDevlopment <\/b><span style=\"font-weight: 400;\">in your <\/span><b>constant file. <\/b><span style=\"font-weight: 400;\">Make it true\/false as per your need. <\/span><\/p>\n<p>Now, I am assuming your Testers want to test both the development<\/p>\n<p><span style=\"font-weight: 400;\">and production build at the same on the same device. <\/span><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image24.jpg\"><img decoding=\"async\" class=\"size-full wp-image-2868 aligncenter\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image24.jpg\" alt=\"image24\" width=\"500\" height=\"500\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image24.jpg 500w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image24-150x150.jpg 150w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image24-300x300.jpg 300w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">So, You have to tell them that,<\/span><\/p>\n<blockquote><p><span style=\"font-weight: 400;\"> \u201cDude, you can\u2019t install both at the same time since, app has same bundle ID (or, package name) and you can\u2019t have two apps with same Bundle ID \u201d<\/span><\/p><\/blockquote>\n<p><span style=\"font-weight: 400;\">And, Tester is like, <\/span><\/p>\n<blockquote><p><span style=\"font-weight: 400;\">\u201cNo I want to test both of them without uninstalling one\u201d<\/span><\/p><\/blockquote>\n<p><span style=\"font-weight: 400;\">And, you are like <\/span><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image25.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2869 aligncenter\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image25.gif\" alt=\"image25\" width=\"485\" height=\"200\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">Solution is here: <\/span><b>Multiple targets in Xcode.<\/b><\/p>\n<p><span style=\"font-weight: 400;\">You can create multiple targets for your app which is like<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">MyApp-Dev<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">MyApp-Prod<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">And, each Target has their own <\/span><b>Info.plist <\/b><span style=\"font-weight: 400;\">file which meant you can maintain their different App Icon, Display Name, Bundle ID, their Version Number and frameworks. <\/span><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image00.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2870 aligncenter\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image00.jpg\" alt=\"image00\" width=\"430\" height=\"371\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image00.jpg 430w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image00-300x259.jpg 300w\" sizes=\"(max-width: 430px) 100vw, 430px\" \/><\/a><\/p>\n<p><b>So, What we are going to do?<\/b><\/p>\n<p><span style=\"font-weight: 400;\">We are going to code a Demo app which will have two targets. One is Development and Other is Production. <\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Both Targets have Different AppIcon, so we can differentiate easily. <\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Both have different Display Name (and, you can install both of them)<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">And, we will use different Web Service URL for different targets. So, you just have to choose target and your build will target to the kind of target you have chosen.<\/span><\/li>\n<\/ol>\n<p><b>Demonstration<\/b><\/p>\n<p><b>Step1.<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Create a Single Page Application and just like you do for other Apps. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">Say, I\u2019ve named my project <\/span><b>\u2018MultipleTargetsDemo<\/b><span style=\"font-weight: 400;\">\u2019<\/span><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image011.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2871\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image011.png\" alt=\"image01\" width=\"512\" height=\"222\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image011.png 512w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image011-300x130.png 300w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">By default, you will have a single target. In my case it is <\/span><b>MultipleTragetsDemo <\/b><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image161.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2872\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image161.png\" alt=\"image16\" width=\"570\" height=\"208\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image161.png 570w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image161-300x109.png 300w\" sizes=\"(max-width: 570px) 100vw, 570px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">We want to duplicate the <\/span><i><span style=\"font-weight: 400;\">Target\u00a0<\/span><\/i><span style=\"font-weight: 400;\">and with the same configuration. So, we right-click on it and choose <\/span><i><span style=\"font-weight: 400;\">Duplicate.<\/span><\/i><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">Next, press enter while selecting the Newly Created target and rename its name. Make it <\/span><i><span style=\"font-weight: 400;\">MultipleTargetsDemo-Prod<\/span><\/i><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image171.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2873\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image171.png\" alt=\"image17\" width=\"268\" height=\"75\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">It&#8217;s upon you to change the default target\u2019s name. I personally change the target name as <\/span><i><span style=\"font-weight: 400;\">MultipleTargetsDemo-Dev<\/span><\/i><span style=\"font-weight: 400;\">. So, I follow a convention of having two targets:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">AppName-Dev<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">AppName-Prod<\/span><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">But, for now you can ignore it. Assume, default target is for Development. And, other is Production target.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><b>Step2.<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Next, change the scheme name of newly created target. Make it as Target name. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">So, focus your eye on Simulator Area<\/span><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image021.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2874\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image021.png\" alt=\"image02\" width=\"332\" height=\"33\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image021.png 332w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image021-300x30.png 300w\" sizes=\"(max-width: 332px) 100vw, 332px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">There \u00a0you\u2019ll find <\/span><i><span style=\"font-weight: 400;\">scheme name <\/span><\/i><span style=\"font-weight: 400;\">\u2018MultipleTargetsDemo\u2019. Click on it and select <\/span><i><span style=\"font-weight: 400;\">\u2018Manage Schemes<\/span><\/i><span style=\"font-weight: 400;\">\u2019<\/span><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image091.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2875\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image091.png\" alt=\"image09\" width=\"336\" height=\"122\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image091.png 336w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image091-300x109.png 300w\" sizes=\"(max-width: 336px) 100vw, 336px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">There you will have the\u00a0scheme name depending upon the number of targets you have in your project.<\/span><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image26.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2876\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image26.png\" alt=\"image26\" width=\"746\" height=\"369\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image26.png 746w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image26-300x148.png 300w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image26-624x309.png 624w\" sizes=\"(max-width: 746px) 100vw, 746px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">Press \u2018return\u2019 key and rename it as Target name.<\/span><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image131.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2877\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image131.png\" alt=\"image13\" width=\"680\" height=\"86\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image131.png 680w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image131-300x38.png 300w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image131-624x79.png 624w\" sizes=\"(max-width: 680px) 100vw, 680px\" \/><\/a><\/p>\n<p><b>Step3.<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Till now, you have created a target and changed the Scheme name. But, where is Info.plist file which I\u2019ve told you earlier. <\/span><\/p>\n<p>Check your Project\u2019s File Navigator<\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image111.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2878\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image111.png\" alt=\"image11\" width=\"254\" height=\"244\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">At Present, it\u2019s out of project directory. Drag-n-Drop inside your project. <\/span><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image151.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2879\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image151.png\" alt=\"image15\" width=\"258\" height=\"209\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">And, Next rename it as <\/span><b>MultipleTargetsDemo-Prod.plist<\/b><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image23.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2880\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image23.png\" alt=\"image23\" width=\"249\" height=\"44\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">It\u2019s not the end. As, you\u2019ve changed the plist file name. You have to specify this in your Build Settings. Choose Your <\/span><i><span style=\"font-weight: 400;\">newly created target <\/span><\/i><span style=\"font-weight: 400;\">\u00a0and move inside <\/span><b>Build Settings &gt; Packaging<\/b><span style=\"font-weight: 400;\"> section. <\/span><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image30.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2881\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image30.png\" alt=\"image30\" width=\"1121\" height=\"408\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image30.png 1121w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image30-300x109.png 300w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image30-1024x373.png 1024w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image30-624x227.png 624w\" sizes=\"(max-width: 1121px) 100vw, 1121px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">And, change the <\/span><b>Info.plist File <\/b><span style=\"font-weight: 400;\">name<\/span><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image20.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2883\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image20.png\" alt=\"image20\" width=\"599\" height=\"120\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image20.png 599w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image20-300x60.png 300w\" sizes=\"(max-width: 599px) 100vw, 599px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">From <\/span><b>MultipleTargetsDemo copy-info.plist <\/b><span style=\"font-weight: 400;\">to<\/span><b> MultipleTargetsDemo-Prod.plist<\/b><\/p>\n<p><b>Step4.<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Next, change the name of App for different Targets.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Select <\/span><i><span style=\"font-weight: 400;\">Target<\/span><\/i><span style=\"font-weight: 400;\"> and change it\u2019s <\/span><b>Display name <\/b><span style=\"font-weight: 400;\">in <\/span><i><span style=\"font-weight: 400;\">General<\/span><\/i><span style=\"font-weight: 400;\"> Section.<\/span><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image28.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2886\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image28.png\" alt=\"image28\" width=\"775\" height=\"198\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image28.png 775w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image28-300x77.png 300w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image28-624x159.png 624w\" sizes=\"(max-width: 775px) 100vw, 775px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">Same with the Development target.<\/span><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image072.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2885\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image072.png\" alt=\"image07\" width=\"775\" height=\"166\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image072.png 775w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image072-300x64.png 300w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image072-624x134.png 624w\" sizes=\"(max-width: 775px) 100vw, 775px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">And, You have to change the Bundle ID of the <\/span><b>Production Target. <\/b><span style=\"font-weight: 400;\">As, we want both build targeting different target installed on same device. <\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">Add<\/span><b> -prod <\/b><span style=\"font-weight: 400;\">in last part of the Bundle ID of existing one. <\/span><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image052.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2887\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image052.png\" alt=\"image05\" width=\"772\" height=\"175\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image052.png 772w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image052-300x68.png 300w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image052-624x141.png 624w\" sizes=\"(max-width: 772px) 100vw, 772px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">We are half-done, let\u2019s run the code. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">Make sure you have chosen right scheme before running your code.<\/span><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image061.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2888\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image061.png\" alt=\"image06\" width=\"251\" height=\"118\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">For time being, we have two Scheme. First is targeting to default target which is <\/span><b>Development target. <\/b><span style=\"font-weight: 400;\">And, second is the <\/span><b>Production Target<\/b><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Same, you have to follow in your real projects before generating Release Builds. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">First, choose the default target which is a development and check in Simulator. And, next choose the Production Target \u00a0from schemes and run the code. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">For Default Target,<\/span><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image21.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2889\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image21.png\" alt=\"image21\" width=\"314\" height=\"126\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image21.png 314w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image21-300x120.png 300w\" sizes=\"(max-width: 314px) 100vw, 314px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">For Production Target,<\/span><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image191.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2890\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image191.png\" alt=\"image19\" width=\"318\" height=\"111\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image191.png 318w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image191-300x105.png 300w\" sizes=\"(max-width: 318px) 100vw, 318px\" \/><\/a><\/p>\n<p>As you can see, we can install both the targets in same device. Reason is both the build sharing different bundle name.<\/p>\n<p><b>Step5.<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Next, we\u2019ll add <\/span><b>AppIcon<\/b><span style=\"font-weight: 400;\"> for both the targets. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">Navigate to <\/span><b>Assets<\/b><span style=\"font-weight: 400;\"> folder of your Project and add (+) a New AppIcon file.<\/span><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image29.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2891\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image29.png\" alt=\"image29\" width=\"810\" height=\"618\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image29.png 810w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image29-300x229.png 300w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image29-624x476.png 624w\" sizes=\"(max-width: 810px) 100vw, 810px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">And, rename it as AppIcon-Prod<\/span><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image031.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2892\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image031.png\" alt=\"image03\" width=\"217\" height=\"79\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">Add different App Icon in both the asset file.<\/span><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image122.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2893\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image122.png\" alt=\"image12\" width=\"120\" height=\"120\" \/><\/a>\u00a0<a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image181.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2894\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image181.png\" alt=\"image18\" width=\"120\" height=\"120\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">I\u2019m using these two icon. <\/span><b>S <\/b><span style=\"font-weight: 400;\">is for Development Target and <\/span><b>P <\/b><span style=\"font-weight: 400;\">is for Production target.<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<blockquote><p><span style=\"font-weight: 400;\">\u2018S\u2019 pointing to <\/span><b>Staging. <\/b><span style=\"font-weight: 400;\">In Software Development, people use Staging and Development \u00a0\u00a0interchangeably. So, don\u2019t get afraid by this name. They are trying to Development = Staging.<\/span><\/p><\/blockquote>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\"><br \/>\nAfter Adding Icon to<\/span><b>iPhone App iOS 7-10 60pt <\/b><span style=\"font-weight: 400;\">move to Production Targets section.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">And, choose AppIcon-Prod in <\/span><b>App Icon Source<\/b><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image041.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2895\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image041.png\" alt=\"image04\" width=\"306\" height=\"202\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image041.png 306w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image041-300x198.png 300w\" sizes=\"(max-width: 306px) 100vw, 306px\" \/><\/a><\/p>\n<p><b>Step6.<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Next, we will add <\/span><b>Custom Swift Flag<\/b><span style=\"font-weight: 400;\"> in Custom Flag for Swift Compiler. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">Choose the Default Target (for us it\u2019s a Development Target) &gt; Build Settings &gt; Other Swift Flag &gt; Debug &gt; Add (+) <\/span><b>-DDEVELOPMENT<\/b><\/p>\n<p><span style=\"font-weight: 400;\">It\u2019s just like a PreProcessor flag which we can use it as a flag. <\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<blockquote><p><b>Note<\/b><span style=\"font-weight: 400;\">: Make sure your flag name should start with <\/span><b>-D<\/b><\/p><\/blockquote>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a href=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image27.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2896\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image27.png\" alt=\"image27\" width=\"1014\" height=\"548\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image27.png 1014w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image27-300x162.png 300w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image27-624x337.png 624w\" sizes=\"(max-width: 1014px) 100vw, 1014px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\"><br \/>\nAfter Adding this flag, we will use this\u00a0<\/span><b>DEVELOPMENT<\/b><span style=\"font-weight: 400;\"> \u00a0flag to determine whether your app is in DEBUG mode. <\/span><\/p>\n<pre class=\"lang:swift decode:true \">#if DEVELOPMENT\r\n\r\nlet API_PATH = \"https:\/\/devlopement.abc.com\/v1\/\u201d\r\n\r\n#else\r\n\r\nlet API_PATH = \"https:\/\/production.abc.com\/v1\/\"\r\n\r\n#endif<\/pre>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">When you are using Development target (i.e MultipleTargetsDemo) then it will pick the <\/span><a style=\"font-size: 1rem;\" href=\"https:\/\/devlopment.abc.com\/v1\"><b>https:\/\/devlopment.abc.com\/v1<\/b><\/a> <span style=\"font-weight: 400;\">as there is DEVELOPMENT flag in the\u00a0custom flag.<\/span><br \/>\n#if, #endif and #else preprocessor<b> macro<\/b><span style=\"font-weight: 400;\"> which we are using to access preprocessor flags. This is the\u00a0standard way to access Swift Custom Flag.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In production target, it will use <\/span><a href=\"https:\/\/production.abc.com\/v1\"><b>https:\/\/production.abc.com\/v1<\/b><\/a> <span style=\"font-weight: 400;\">as there is no DEVELOPMENT flag. <\/span><\/p>\n<p><b>You should take Care of<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">While adding any file\/resources to your project always choose both the targets you have in the\u00a0project. <\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">If you are using CocoaPods, then you must specify <\/span><b>link_with <\/b><span style=\"font-weight: 400;\">property in your podFile. <\/span><\/li>\n<\/ol>\n<pre class=\"lang:swift decode:true\">source 'https:\/\/github.com\/CocoaPods\/Specs.git'\r\n\r\nplatform :ios, '7.0'\r\n\r\nworkspace 'todo'\r\n\r\nlink_with \u2018MultipleTargetDemo\u2019, 'MultipleTargetDemo-Prod\r\npod 'Alamofire'<\/pre>\n<p><span style=\"font-size: 1rem;\">Always create multiple targets in your app when you are using for Development, Production, Beta Version, Pro Edition of Your App. <\/span>As,<span style=\"font-size: 1rem;\"> it will help you to separate code from one-another.<\/span><b>Conclusion<\/b><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; So, Why do you need Multiple Targets\u00a0? I\u2019m giving you an assumption. You have a project where you are interacting with Database using REST APIs. Needless to say, you will have a Login Screen, or Registration Screen or say you have Forgot Password Screen. Then, you must be having two databases Development_Db (for Development [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2899,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,71],"tags":[160,196,195],"class_list":["post-2863","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ios","category-mobile","tag-ios","tag-multiple-targets","tag-xcode-targets"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Multiple Targets in iOS | InnovationM Blog<\/title>\n<meta name=\"description\" content=\"Learn to create multiple targets in iOS.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.innovationm.com\/blog\/multiple-targets-in-ios\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Multiple Targets in iOS | InnovationM Blog\" \/>\n<meta property=\"og:description\" content=\"Learn to create multiple targets in iOS.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.innovationm.com\/blog\/multiple-targets-in-ios\/\" \/>\n<meta property=\"og:site_name\" content=\"InnovationM - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-03-17T06:29:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-20T13:25:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image10.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"InnovationM Admin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InnovationM Admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/multiple-targets-in-ios\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/multiple-targets-in-ios\\\/\"},\"author\":{\"name\":\"InnovationM Admin\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#\\\/schema\\\/person\\\/a831bf4602d69d1fa452e3de0c8862ed\"},\"headline\":\"Multiple Targets in iOS\",\"datePublished\":\"2017-03-17T06:29:23+00:00\",\"dateModified\":\"2023-01-20T13:25:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/multiple-targets-in-ios\\\/\"},\"wordCount\":1237,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/multiple-targets-in-ios\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/image10.jpg\",\"keywords\":[\"iOS\",\"Multiple Targets\",\"Xcode Targets\"],\"articleSection\":[\"iOS\",\"Mobile\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/multiple-targets-in-ios\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/multiple-targets-in-ios\\\/\",\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/multiple-targets-in-ios\\\/\",\"name\":\"Multiple Targets in iOS | InnovationM Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/multiple-targets-in-ios\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/multiple-targets-in-ios\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/image10.jpg\",\"datePublished\":\"2017-03-17T06:29:23+00:00\",\"dateModified\":\"2023-01-20T13:25:55+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#\\\/schema\\\/person\\\/a831bf4602d69d1fa452e3de0c8862ed\"},\"description\":\"Learn to create multiple targets in iOS.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/multiple-targets-in-ios\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/multiple-targets-in-ios\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/multiple-targets-in-ios\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/image10.jpg\",\"contentUrl\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/image10.jpg\",\"width\":600,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/multiple-targets-in-ios\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Multiple Targets in iOS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/\",\"name\":\"InnovationM - Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#\\\/schema\\\/person\\\/a831bf4602d69d1fa452e3de0c8862ed\",\"name\":\"InnovationM Admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g\",\"caption\":\"InnovationM Admin\"},\"sameAs\":[\"http:\\\/\\\/www.innovationm.com\\\/\"],\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/author\\\/innovationmadmin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Multiple Targets in iOS | InnovationM Blog","description":"Learn to create multiple targets in iOS.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.innovationm.com\/blog\/multiple-targets-in-ios\/","og_locale":"en_US","og_type":"article","og_title":"Multiple Targets in iOS | InnovationM Blog","og_description":"Learn to create multiple targets in iOS.","og_url":"https:\/\/www.innovationm.com\/blog\/multiple-targets-in-ios\/","og_site_name":"InnovationM - Blog","article_published_time":"2017-03-17T06:29:23+00:00","article_modified_time":"2023-01-20T13:25:55+00:00","og_image":[{"width":600,"height":400,"url":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image10.jpg","type":"image\/jpeg"}],"author":"InnovationM Admin","twitter_misc":{"Written by":"InnovationM Admin","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.innovationm.com\/blog\/multiple-targets-in-ios\/#article","isPartOf":{"@id":"https:\/\/www.innovationm.com\/blog\/multiple-targets-in-ios\/"},"author":{"name":"InnovationM Admin","@id":"https:\/\/www.innovationm.com\/blog\/#\/schema\/person\/a831bf4602d69d1fa452e3de0c8862ed"},"headline":"Multiple Targets in iOS","datePublished":"2017-03-17T06:29:23+00:00","dateModified":"2023-01-20T13:25:55+00:00","mainEntityOfPage":{"@id":"https:\/\/www.innovationm.com\/blog\/multiple-targets-in-ios\/"},"wordCount":1237,"commentCount":0,"image":{"@id":"https:\/\/www.innovationm.com\/blog\/multiple-targets-in-ios\/#primaryimage"},"thumbnailUrl":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image10.jpg","keywords":["iOS","Multiple Targets","Xcode Targets"],"articleSection":["iOS","Mobile"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.innovationm.com\/blog\/multiple-targets-in-ios\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.innovationm.com\/blog\/multiple-targets-in-ios\/","url":"https:\/\/www.innovationm.com\/blog\/multiple-targets-in-ios\/","name":"Multiple Targets in iOS | InnovationM Blog","isPartOf":{"@id":"https:\/\/www.innovationm.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.innovationm.com\/blog\/multiple-targets-in-ios\/#primaryimage"},"image":{"@id":"https:\/\/www.innovationm.com\/blog\/multiple-targets-in-ios\/#primaryimage"},"thumbnailUrl":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image10.jpg","datePublished":"2017-03-17T06:29:23+00:00","dateModified":"2023-01-20T13:25:55+00:00","author":{"@id":"https:\/\/www.innovationm.com\/blog\/#\/schema\/person\/a831bf4602d69d1fa452e3de0c8862ed"},"description":"Learn to create multiple targets in iOS.","breadcrumb":{"@id":"https:\/\/www.innovationm.com\/blog\/multiple-targets-in-ios\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.innovationm.com\/blog\/multiple-targets-in-ios\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.innovationm.com\/blog\/multiple-targets-in-ios\/#primaryimage","url":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image10.jpg","contentUrl":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2017\/03\/image10.jpg","width":600,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/www.innovationm.com\/blog\/multiple-targets-in-ios\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.innovationm.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Multiple Targets in iOS"}]},{"@type":"WebSite","@id":"https:\/\/www.innovationm.com\/blog\/#website","url":"https:\/\/www.innovationm.com\/blog\/","name":"InnovationM - Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.innovationm.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.innovationm.com\/blog\/#\/schema\/person\/a831bf4602d69d1fa452e3de0c8862ed","name":"InnovationM Admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g","caption":"InnovationM Admin"},"sameAs":["http:\/\/www.innovationm.com\/"],"url":"https:\/\/www.innovationm.com\/blog\/author\/innovationmadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/posts\/2863","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/comments?post=2863"}],"version-history":[{"count":0,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/posts\/2863\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/media\/2899"}],"wp:attachment":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/media?parent=2863"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/categories?post=2863"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/tags?post=2863"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}