{"id":971,"date":"2018-06-05T22:58:25","date_gmt":"2018-06-05T20:58:25","guid":{"rendered":"http:\/\/www.albertopasca.it\/whiletrue\/?p=971"},"modified":"2018-06-19T20:16:19","modified_gmt":"2018-06-19T18:16:19","slug":"xcode-podfile-with-categories-and-multiple-targets","status":"publish","type":"post","link":"https:\/\/www.albertopasca.it\/whiletrue\/xcode-podfile-with-categories-and-multiple-targets\/","title":{"rendered":"XCode \u2010 Podfile with categories and multiple targets"},"content":{"rendered":"<p>Welcome back,<\/p>\n<p>what I want to share is an <em>ordered and readable Podfile<\/em>.<\/p>\n<blockquote><p>The Podfile is a specification that describes the dependencies of the targets of one or more Xcode projects.<\/p><\/blockquote>\n<p><!--more--><\/p>\n<p>To use a <strong>Podfile<\/strong> you need to install a macOS app called <strong>CocoaPods<\/strong>.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-986 size-full\" src=\"https:\/\/i0.wp.com\/www.albertopasca.it\/whiletrue\/wp-content\/uploads\/2018\/06\/Cocoapods-Logo.png?resize=558%2C142\" alt=\"\" width=\"558\" height=\"142\" srcset=\"https:\/\/i0.wp.com\/www.albertopasca.it\/whiletrue\/wp-content\/uploads\/2018\/06\/Cocoapods-Logo.png?w=558&amp;ssl=1 558w, https:\/\/i0.wp.com\/www.albertopasca.it\/whiletrue\/wp-content\/uploads\/2018\/06\/Cocoapods-Logo.png?resize=300%2C76&amp;ssl=1 300w\" sizes=\"auto, (max-width: 558px) 100vw, 558px\" \/><\/p>\n<section class=\"row\">\n<div class=\"col-md-8 col-lg-8 col-sm-8 col-md-offset-2 col-lg-offset-2 col-sm-offset-2 intro\">\n<blockquote><p>CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects. It has over 47 thousand libraries and is used in over 3 million apps. CocoaPods can help you scale your projects elegantly.<\/p><\/blockquote>\n<\/div>\n<\/section>\n<pre class=\"highlight\">$ sudo gem install cocoapods<\/pre>\n<p>For more informations please take a look in the official website:\u00a0<a href=\"https:\/\/cocoapods.org\/\" target=\"_blank\" rel=\"noopener\">https:\/\/cocoapods.org\/<\/a><\/p>\n<p>Let me show a classic example of <em>Podfile<\/em>:<\/p>\n<pre class=\"p1\">platform :ios, <span class=\"s1\">'11.0'\r\n<\/span>\r\n<span class=\"s2\">target <\/span>'YourApp' <span class=\"s3\">do<\/span>\r\n<span class=\"Apple-converted-space\">\u00a0 <\/span>use_frameworks!\r\n\r\n<span class=\"s2\"><span class=\"Apple-converted-space\">  pod 'SwiftyJSON', '~&gt; 2.3' \r\n<\/span><\/span>  pod 'AFNetworking', '~&gt; 2.6' \r\n\r\nend<\/pre>\n<p>You can also add the targets you want. If you have test target or another device target.<\/p>\n<pre class=\"highlight\">platform :ios, <span class=\"s1\">'11.0'\r\n<\/span>\r\n<span class=\"s2\">target <\/span>'YourApp' <span class=\"s3\">do<\/span>\r\n<span class=\"Apple-converted-space\">\u00a0 <\/span>use_frameworks!\r\n\r\n<span class=\"s2\"><span class=\"Apple-converted-space\">  pod 'SwiftyJSON', '~&gt; 2.3' \r\n<\/span><\/span>  pod 'AFNetworking', '~&gt; 2.6' \r\n\r\n<span class=\"s2\"><span class=\"Apple-converted-space\">\u00a0 <\/span>target <\/span>'YourAppTests' <span class=\"s3\">do<\/span>\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span>inherit! :search_paths\r\n<span class=\"s2\"><span class=\"Apple-converted-space\">\u00a0 <\/span><\/span>end\r\n\r\nend<\/pre>\n<p>Using the keyword\u00a0<strong>inherit! :search_paths\u00a0<\/strong>you tell to XCode to use all of the pods in the list in your second target.<\/p>\n<p>Sometimes happens that some pod is not compatible to your target and you want to exclude.<\/p>\n<p>There are <em>two ways<\/em> to do this:<\/p>\n<ol>\n<li><strong>copy \/ paste<\/strong> all pods in all targets except the unuseds<\/li>\n<li>make functions (categories) using <strong>def<\/strong> keyword<\/li>\n<\/ol>\n<p>We ignore the 1st point and go deeper to 2nd one. You have some pods used only in the test target and some others used only in the main target:<\/p>\n<pre class=\"p1\"><span class=\"s1\"># testing pods are strictly related to the test target\r\ndef<\/span> testing_pods\r\n<span class=\"s2\"><span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span>pod <\/span>'Mockit'<span class=\"s2\">, <\/span>'1.4.0'\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span>pod <span class=\"s3\">'Quick'<\/span>, <span class=\"s3\">'1.3.0'<\/span>\r\n<span class=\"s2\"><span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span>pod <\/span>'Nimble'<span class=\"s2\">, <\/span>'7.1.1'\r\n<span class=\"s2\"><span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span>pod <\/span>'Cuckoo'<span class=\"s2\">, <\/span>'0.11.3'\r\n<span class=\"s1\">end\r\n\r\n# this other pods are used only in the main target, not the test target\r\n<\/span><span class=\"s1\">def<\/span> debug_tool_pods\r\n<span class=\"s2\"><span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span>pod <\/span>'Crashlytics'\r\n<span class=\"s2\"><span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span><\/span>pod <span class=\"s3\">'Fabric'<\/span>\r\n<span class=\"s2\"><span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span>pod <\/span>'Instabug'<span class=\"s2\">, <\/span>'7.10.1'\r\n<span class=\"s2\"><span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span>pod <\/span>'Mixpanel-swift'<span class=\"s2\">, <\/span>'2.2.3'\r\n<span class=\"s2\"><span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span>pod <\/span>'Sentry'<span class=\"s2\">, <\/span>'~&gt; 3.8'\r\n<span class=\"s2\"><span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span>pod <\/span>'Firebase\/Core'\r\n<span class=\"s1\">end<\/span><\/pre>\n<p>You can import only in your test target and not in the main one.<\/p>\n<pre class=\"highlight\">platform :ios, <span class=\"s1\">'11.0'\r\n<\/span>\r\n<span class=\"s2\">target <\/span>'YourApp' <span class=\"s3\">do<\/span>\r\n<span class=\"Apple-converted-space\">\u00a0 <\/span>use_frameworks!\r\n\r\n<span class=\"s1\">  def<\/span> testing_pods\r\n<span class=\"s2\"><span class=\"Apple-converted-space\"> \u00a0 \u00a0 <\/span>pod <\/span>'Mockit'<span class=\"s2\">, <\/span>'1.4.0'\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0  <\/span>pod <span class=\"s3\">'Quick'<\/span>, <span class=\"s3\">'1.3.0'<\/span>\r\n<span class=\"s2\"><span class=\"Apple-converted-space\">\u00a0 \u00a0  <\/span>pod <\/span>'Nimble'<span class=\"s2\">, <\/span>'7.1.1'\r\n<span class=\"s2\"><span class=\"Apple-converted-space\">\u00a0  \u00a0 <\/span>pod <\/span>'Cuckoo'<span class=\"s2\">, <\/span>'0.11.3'\r\n<span class=\"s1\">  end\r\n\r\n  def debug_tool_pods\r\n<span class=\"s2\"><span class=\"Apple-converted-space\">\u00a0  \u00a0 <\/span>pod <\/span>'Crashlytics'\r\n<span class=\"s2\"><span class=\"Apple-converted-space\">\u00a0  \u00a0 <\/span><\/span>pod <span class=\"s3\">'Fabric'<\/span>\r\n<span class=\"s2\"><span class=\"Apple-converted-space\">\u00a0  \u00a0 <\/span>pod <\/span>'Instabug'<span class=\"s2\">, <\/span>'7.10.1'\r\n<span class=\"s2\"><span class=\"Apple-converted-space\">\u00a0  \u00a0 <\/span>pod <\/span>'Mixpanel-swift'<span class=\"s2\">, <\/span>'2.2.3'\r\n<span class=\"s2\"><span class=\"Apple-converted-space\">\u00a0  \u00a0 <\/span>pod <\/span>'Sentry'<span class=\"s2\">, <\/span>'~&gt; 3.8'\r\n<span class=\"s2\"><span class=\"Apple-converted-space\">\u00a0  \u00a0 <\/span>pod <\/span>'Firebase\/Core'\r\n  end<\/span>\r\n\r\n<span class=\"s2\"><span class=\"Apple-converted-space\">  pod 'SwiftyJSON', '~&gt; 2.3' \r\n<\/span><\/span>  pod 'AFNetworking', '~&gt; 2.6' \r\n  <span class=\"s1\">debug_tool_pods  # here your debug tools<\/span>\r\n\r\n<span class=\"s2\"><span class=\"Apple-converted-space\">\u00a0 <\/span>target <\/span>'YourAppTests' <span class=\"s3\">do<\/span>\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span>inherit! :search_paths\r\n    testing_pods # here your testing tools\r\n<span class=\"s2\"><span class=\"Apple-converted-space\">\u00a0 <\/span><\/span>end\r\n\r\nend\r\n<\/pre>\n<p>In this way you use all the <strong>testing_pods<\/strong> in <strong>yourYourAppTests<\/strong> target and in the\u00a0<strong>YourApp<\/strong> target you use only the pods in the list and the other\u00a0<strong><span class=\"s1\">debug_tool_pods<\/span><\/strong><span class=\"s1\">.<\/span><\/p>\n<h3>BONUS: set a specific swift version for a certain pod(s)<\/h3>\n<p>You have a pod that is not compatible with your Swift version or use a lower Swift version?<\/p>\n<p>You can use the <strong>post_install<\/strong> functions in the <em>Podfile <\/em>like this:<\/p>\n<pre class=\"p1\">post_install <span class=\"s1\">do<\/span> |installer|\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span>installer.pods_project.targets.each <span class=\"s1\">do<\/span> |target|\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 \u00a0 \u00a0 <\/span><span class=\"s1\">if<\/span> [<span class=\"s2\">'Mockit'<\/span>, <span class=\"s2\">'Cuckoo'<\/span>].include? target.name\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <\/span>target.build_configurations.each <span class=\"s1\">do<\/span> |config|\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <\/span>config.build_settings[<span class=\"s2\">'SWIFT_VERSION'<\/span>] = <span class=\"s2\">'4.1'<\/span>\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <\/span><span class=\"s1\">end<\/span>\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 \u00a0 \u00a0 <\/span><span class=\"s1\">end<\/span>\r\n<span class=\"Apple-converted-space\">\u00a0 \u00a0 <\/span><span class=\"s1\">end<\/span>\r\nend<\/pre>\n<div>In this way your pods called <em>Mockit<\/em> and <em>Cuckoo<\/em> use the <strong>SWIFT_VERSION<\/strong> 4.1.<\/div>\n<p>&nbsp;<\/p>\n<div>You can check this setting selecting your <em>Pods project <\/em>and next selecting your pods. This SWIFT_VERSION parameter can be founded in the Build Settings tab.<\/div>\n<p>&nbsp;<\/p>\n<div>that&#8217;s all.<\/div>\n<div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Welcome back, what I want to share is an ordered and readable Podfile. The Podfile is a specification that describes the dependencies of the targets of one or more Xcode projects.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1],"tags":[624,619,623,620,46,625,622,45,294,621,140],"class_list":["post-971","post","type-post","status-publish","format-standard","hentry","category-generic","tag-3rd-party","tag-cocoapods","tag-libraries","tag-pods","tag-swift","tag-swift_version","tag-target","tag-tdd","tag-test","tag-version","tag-xcode"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>XCode \u2010 Podfile with categories and multiple targets - while (true) {\u00a0}<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.albertopasca.it\/whiletrue\/xcode-podfile-with-categories-and-multiple-targets\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"XCode \u2010 Podfile with categories and multiple targets - while (true) {\u00a0}\" \/>\n<meta property=\"og:description\" content=\"Welcome back, what I want to share is an ordered and readable Podfile. The Podfile is a specification that describes the dependencies of the targets of one or more Xcode projects.\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.albertopasca.it\/whiletrue\/xcode-podfile-with-categories-and-multiple-targets\/\" \/>\n<meta property=\"og:site_name\" content=\"while (true) {\u00a0}\" \/>\n<meta property=\"article:published_time\" content=\"2018-06-05T20:58:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-06-19T18:16:19+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.albertopasca.it\/whiletrue\/wp-content\/uploads\/2018\/06\/Cocoapods-Logo.png\" \/>\n<meta name=\"author\" content=\"Alberto Pasca\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@lupasca\" \/>\n<meta name=\"twitter:site\" content=\"@lupasca\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alberto Pasca\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/xcode-podfile-with-categories-and-multiple-targets\\\/#article\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/xcode-podfile-with-categories-and-multiple-targets\\\/\"},\"author\":{\"name\":\"Alberto Pasca\",\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/#\\\/schema\\\/person\\\/d3cf0df774eb4aac797f246a795e9fac\"},\"headline\":\"XCode \u2010 Podfile with categories and multiple targets\",\"datePublished\":\"2018-06-05T20:58:25+00:00\",\"dateModified\":\"2018-06-19T18:16:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/xcode-podfile-with-categories-and-multiple-targets\\\/\"},\"wordCount\":343,\"publisher\":{\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/#\\\/schema\\\/person\\\/d3cf0df774eb4aac797f246a795e9fac\"},\"image\":{\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/xcode-podfile-with-categories-and-multiple-targets\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/wp-content\\\/uploads\\\/2018\\\/06\\\/Cocoapods-Logo.png\",\"keywords\":[\"3rd party\",\"cocoapods\",\"libraries\",\"pods\",\"swift\",\"SWIFT_VERSION\",\"target\",\"tdd\",\"test\",\"version\",\"xcode\"],\"articleSection\":[\"generic\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/xcode-podfile-with-categories-and-multiple-targets\\\/\",\"url\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/xcode-podfile-with-categories-and-multiple-targets\\\/\",\"name\":\"XCode \u2010 Podfile with categories and multiple targets - while (true) {\u00a0}\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/xcode-podfile-with-categories-and-multiple-targets\\\/#primaryimage\"},\"image\":{\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/xcode-podfile-with-categories-and-multiple-targets\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/wp-content\\\/uploads\\\/2018\\\/06\\\/Cocoapods-Logo.png\",\"datePublished\":\"2018-06-05T20:58:25+00:00\",\"dateModified\":\"2018-06-19T18:16:19+00:00\",\"breadcrumb\":{\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/xcode-podfile-with-categories-and-multiple-targets\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/xcode-podfile-with-categories-and-multiple-targets\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/xcode-podfile-with-categories-and-multiple-targets\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.albertopasca.it\\\/whiletrue\\\/wp-content\\\/uploads\\\/2018\\\/06\\\/Cocoapods-Logo.png?fit=558%2C142&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/www.albertopasca.it\\\/whiletrue\\\/wp-content\\\/uploads\\\/2018\\\/06\\\/Cocoapods-Logo.png?fit=558%2C142&ssl=1\",\"width\":558,\"height\":142},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/xcode-podfile-with-categories-and-multiple-targets\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"XCode \u2010 Podfile with categories and multiple targets\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/#website\",\"url\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/\",\"name\":\"while (true) {\u00a0}\",\"description\":\"notes from a developer, tutorials, how-to, ideas\",\"publisher\":{\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/#\\\/schema\\\/person\\\/d3cf0df774eb4aac797f246a795e9fac\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\\\/\\\/www.albertopasca.it\\\/whiletrue\\\/#\\\/schema\\\/person\\\/d3cf0df774eb4aac797f246a795e9fac\",\"name\":\"Alberto Pasca\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d8fe43c412d0bb34a71c41f60dce53eff3afc027853cbfd20bee6ddc7e93f35?s=96&d=retro&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d8fe43c412d0bb34a71c41f60dce53eff3afc027853cbfd20bee6ddc7e93f35?s=96&d=retro&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d8fe43c412d0bb34a71c41f60dce53eff3afc027853cbfd20bee6ddc7e93f35?s=96&d=retro&r=g\",\"caption\":\"Alberto Pasca\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d8fe43c412d0bb34a71c41f60dce53eff3afc027853cbfd20bee6ddc7e93f35?s=96&d=retro&r=g\"},\"description\":\"Software engineer @ Pirelli &amp; C. S.p.A. with a strong passion for mobile \uf8ff development, security, and connected things.\",\"sameAs\":[\"https:\\\/\\\/www.albertopasca.it\",\"albertopasca\",\"https:\\\/\\\/x.com\\\/lupasca\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"XCode \u2010 Podfile with categories and multiple targets - while (true) {\u00a0}","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":"http:\/\/www.albertopasca.it\/whiletrue\/xcode-podfile-with-categories-and-multiple-targets\/","og_locale":"en_US","og_type":"article","og_title":"XCode \u2010 Podfile with categories and multiple targets - while (true) {\u00a0}","og_description":"Welcome back, what I want to share is an ordered and readable Podfile. The Podfile is a specification that describes the dependencies of the targets of one or more Xcode projects.","og_url":"http:\/\/www.albertopasca.it\/whiletrue\/xcode-podfile-with-categories-and-multiple-targets\/","og_site_name":"while (true) {\u00a0}","article_published_time":"2018-06-05T20:58:25+00:00","article_modified_time":"2018-06-19T18:16:19+00:00","og_image":[{"url":"http:\/\/www.albertopasca.it\/whiletrue\/wp-content\/uploads\/2018\/06\/Cocoapods-Logo.png","type":"","width":"","height":""}],"author":"Alberto Pasca","twitter_card":"summary_large_image","twitter_creator":"@lupasca","twitter_site":"@lupasca","twitter_misc":{"Written by":"Alberto Pasca","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.albertopasca.it\/whiletrue\/xcode-podfile-with-categories-and-multiple-targets\/#article","isPartOf":{"@id":"http:\/\/www.albertopasca.it\/whiletrue\/xcode-podfile-with-categories-and-multiple-targets\/"},"author":{"name":"Alberto Pasca","@id":"http:\/\/www.albertopasca.it\/whiletrue\/#\/schema\/person\/d3cf0df774eb4aac797f246a795e9fac"},"headline":"XCode \u2010 Podfile with categories and multiple targets","datePublished":"2018-06-05T20:58:25+00:00","dateModified":"2018-06-19T18:16:19+00:00","mainEntityOfPage":{"@id":"http:\/\/www.albertopasca.it\/whiletrue\/xcode-podfile-with-categories-and-multiple-targets\/"},"wordCount":343,"publisher":{"@id":"http:\/\/www.albertopasca.it\/whiletrue\/#\/schema\/person\/d3cf0df774eb4aac797f246a795e9fac"},"image":{"@id":"http:\/\/www.albertopasca.it\/whiletrue\/xcode-podfile-with-categories-and-multiple-targets\/#primaryimage"},"thumbnailUrl":"http:\/\/www.albertopasca.it\/whiletrue\/wp-content\/uploads\/2018\/06\/Cocoapods-Logo.png","keywords":["3rd party","cocoapods","libraries","pods","swift","SWIFT_VERSION","target","tdd","test","version","xcode"],"articleSection":["generic"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"http:\/\/www.albertopasca.it\/whiletrue\/xcode-podfile-with-categories-and-multiple-targets\/","url":"http:\/\/www.albertopasca.it\/whiletrue\/xcode-podfile-with-categories-and-multiple-targets\/","name":"XCode \u2010 Podfile with categories and multiple targets - while (true) {\u00a0}","isPartOf":{"@id":"http:\/\/www.albertopasca.it\/whiletrue\/#website"},"primaryImageOfPage":{"@id":"http:\/\/www.albertopasca.it\/whiletrue\/xcode-podfile-with-categories-and-multiple-targets\/#primaryimage"},"image":{"@id":"http:\/\/www.albertopasca.it\/whiletrue\/xcode-podfile-with-categories-and-multiple-targets\/#primaryimage"},"thumbnailUrl":"http:\/\/www.albertopasca.it\/whiletrue\/wp-content\/uploads\/2018\/06\/Cocoapods-Logo.png","datePublished":"2018-06-05T20:58:25+00:00","dateModified":"2018-06-19T18:16:19+00:00","breadcrumb":{"@id":"http:\/\/www.albertopasca.it\/whiletrue\/xcode-podfile-with-categories-and-multiple-targets\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.albertopasca.it\/whiletrue\/xcode-podfile-with-categories-and-multiple-targets\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.albertopasca.it\/whiletrue\/xcode-podfile-with-categories-and-multiple-targets\/#primaryimage","url":"https:\/\/i0.wp.com\/www.albertopasca.it\/whiletrue\/wp-content\/uploads\/2018\/06\/Cocoapods-Logo.png?fit=558%2C142&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.albertopasca.it\/whiletrue\/wp-content\/uploads\/2018\/06\/Cocoapods-Logo.png?fit=558%2C142&ssl=1","width":558,"height":142},{"@type":"BreadcrumbList","@id":"http:\/\/www.albertopasca.it\/whiletrue\/xcode-podfile-with-categories-and-multiple-targets\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/www.albertopasca.it\/whiletrue\/"},{"@type":"ListItem","position":2,"name":"XCode \u2010 Podfile with categories and multiple targets"}]},{"@type":"WebSite","@id":"http:\/\/www.albertopasca.it\/whiletrue\/#website","url":"http:\/\/www.albertopasca.it\/whiletrue\/","name":"while (true) {\u00a0}","description":"notes from a developer, tutorials, how-to, ideas","publisher":{"@id":"http:\/\/www.albertopasca.it\/whiletrue\/#\/schema\/person\/d3cf0df774eb4aac797f246a795e9fac"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.albertopasca.it\/whiletrue\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"http:\/\/www.albertopasca.it\/whiletrue\/#\/schema\/person\/d3cf0df774eb4aac797f246a795e9fac","name":"Alberto Pasca","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4d8fe43c412d0bb34a71c41f60dce53eff3afc027853cbfd20bee6ddc7e93f35?s=96&d=retro&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4d8fe43c412d0bb34a71c41f60dce53eff3afc027853cbfd20bee6ddc7e93f35?s=96&d=retro&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4d8fe43c412d0bb34a71c41f60dce53eff3afc027853cbfd20bee6ddc7e93f35?s=96&d=retro&r=g","caption":"Alberto Pasca"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/4d8fe43c412d0bb34a71c41f60dce53eff3afc027853cbfd20bee6ddc7e93f35?s=96&d=retro&r=g"},"description":"Software engineer @ Pirelli &amp; C. S.p.A. with a strong passion for mobile \uf8ff development, security, and connected things.","sameAs":["https:\/\/www.albertopasca.it","albertopasca","https:\/\/x.com\/lupasca"]}]}},"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/posts\/971","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/comments?post=971"}],"version-history":[{"count":17,"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/posts\/971\/revisions"}],"predecessor-version":[{"id":1008,"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/posts\/971\/revisions\/1008"}],"wp:attachment":[{"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/media?parent=971"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/categories?post=971"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.albertopasca.it\/whiletrue\/wp-json\/wp\/v2\/tags?post=971"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}