<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Mobile Development - Medium]]></title>
        <description><![CDATA[iOS, Android, Other Development - Medium]]></description>
        <link>https://medium.com/mobil-dev?source=rss----9e8b1c257acb---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Mobile Development - Medium</title>
            <link>https://medium.com/mobil-dev?source=rss----9e8b1c257acb---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 08:07:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/mobil-dev" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Ana Amaç Proje Üretmek]]></title>
            <link>https://medium.com/mobil-dev/ana-ama%C3%A7-proje-%C3%BCretmek-96a0c8ff3177?source=rss----9e8b1c257acb---4</link>
            <guid isPermaLink="false">https://medium.com/p/96a0c8ff3177</guid>
            <category><![CDATA[web-apps]]></category>
            <category><![CDATA[desktop-app]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <dc:creator><![CDATA[Onur Dayıbaşı]]></dc:creator>
            <pubDate>Sun, 23 Aug 2026 09:27:52 GMT</pubDate>
            <atom:updated>2026-08-23T09:27:51.239Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ESb0JCS3kd8PwBY5" /><figcaption>Photo by <a href="https://unsplash.com/@contrastband?utm_source=medium&amp;utm_medium=referral">Craig Sybert</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Agent Tool</h4><h4>Claude, Antigravity, Codex, Replit gibi araçların hepsinin ortak amacı son çıktıyı Projeyi oluşturmak bu sırada ara adımları giderek kişilerden soyutlamak.</h4><p>Elbette yazılımcıları işlerini kolaylaştıran <strong>kod editörleri</strong> Claude Code, Cursor, GitHub Copilot, Windsurf, Cline gibi editörler güçlenerek yollarına devam ediyor..</p><p>├── Code completion <br>├── Chat <br>├── Agent <br>├── Codebase understanding <br>├── Multi-file editing <br>└── Terminal</p><p>Bir diğer yandan da Claude, Antigravity, Codex gibi Projeler üretmeyi hedefleyen araçlar bulunuyor. Bunların amacı daha çok gereksinimler üzerinden gidererek son çıktıyı oluşturmak üzerine</p><h4>Claude</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*56hogfv0SLg_T__6OC_aMQ.png" /></figure><h4>Antigravity</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fvH4XqZtbuFXWUxI8TCMVA.png" /></figure><p>Antigravity ile 2 uygulama geliştirip Vercel üzerine deploy etmeyi denediğimde çok basit şekilde bunları gerçekleştirdi.</p><ul><li>Ekip için <a href="https://retro-app-sepia.vercel.app/">Retrospective Uygulaması</a></li><li>Trendyol benzeri bir e-ticaret uygulaması</li></ul><h4>Replit</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_3dW--G9GgpuOca19yfD0g.png" /></figure><p>Özetle bu tip araçlarda artık ana amaç son çıktıyı oluşturmaya yönelik. Kullanıcıların ara adımlardaki kod detaylarını kullanıcıdan olabildiğince uzak tutarak, soyutlayarak bu işlemleri gerçekleştiriyorlar.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96a0c8ff3177" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mobil-dev/ana-ama%C3%A7-proje-%C3%BCretmek-96a0c8ff3177">Ana Amaç Proje Üretmek</a> was originally published in <a href="https://medium.com/mobil-dev">Mobile Development</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Swift Code Styles (SwiftLint)]]></title>
            <link>https://medium.com/mobil-dev/swift-code-styles-swiftlint-86bd6bf60d51?source=rss----9e8b1c257acb---4</link>
            <guid isPermaLink="false">https://medium.com/p/86bd6bf60d51</guid>
            <category><![CDATA[code-style]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Çağatay Emekci]]></dc:creator>
            <pubDate>Mon, 27 Sep 2021 06:53:18 GMT</pubDate>
            <atom:updated>2021-09-27T06:53:18.389Z</atom:updated>
            <content:encoded><![CDATA[<p>Code Styles are the rules or guidelines used when writing the source code for an application. Implementing a specific programming style helps programmers to read and understand the source code. The project I have been working on has been developing for many years. I just wanted the rules to work on the changes made in the files. I researched tools for iOS Code Style. Finally, I decided to use SwiftLint.</p><p>Definition of SwiftLint in GitHub, a tool to enforce Swift style and conventions, loosely based on <a href="https://github.com/github/swift-style-guide">GitHub’s Swift Style Guide</a>. Let’s include in our project. We use to CocoaPods to manage third-party library dependencies. Simply add the following line to your Podfile in your project:</p><pre>pod &#39;SwiftLint&#39;</pre><p>Open the terminal, go to the project file path and install pod. After that, you must write a script to use SwiftLint. Open Xcode and add a new “Run Script Phase” with:</p><pre>&quot;${PODS_ROOT}/SwiftLint/swiftlint&quot;</pre><p>When you run your application, the code will give errors if the code does not fit the code style. Simply, we’ve added the tool to our project. But we want the rules to work on the changes made in the files. We need to change a script.</p><p>Create a script file with the name “swiftlint.sh” in the project file path and add the following code.</p><pre><em># Run SwiftLint<br></em>START_DATE=$(date +&quot;%s&quot;)<br>SWIFT_LINT=&quot;${PODS_ROOT}/SwiftLint/swiftlint&quot;<br><em># Run SwiftLint for given filename<br></em>run_swiftlint() {<br>local filename=&quot;${1}&quot;<br><strong>if</strong> [[ &quot;${filename##*.}&quot; == &quot;swift&quot; ]]; <strong>then<br></strong>${SWIFT_LINT} autocorrect --path &quot;${filename}&quot;<br>${SWIFT_LINT} lint --path &quot;${filename}&quot;<br><strong>fi<br></strong>}<br><strong>if</strong> [[ -e &quot;${SWIFT_LINT}&quot; ]]; <strong>then<br></strong>echo &quot;SwiftLint version: $(${SWIFT_LINT} version)&quot;<br><em># Run for both staged and unstaged files<br></em>git diff --diff-filter=d --name-only | <strong>while</strong> <strong>read</strong> filename; <strong>do</strong> run_swiftlint &quot;${filename}&quot;; <strong>done<br></strong>git diff --cached --diff-filter=d --name-only | <strong>while</strong> <strong>read</strong> filename; <strong>do</strong> run_swiftlint &quot;${filename}&quot;; <strong>done<br>else<br></strong>echo &quot;${SWIFT_LINT} is not installed.&quot;<br><strong>exit</strong> 0<br><strong>fi<br></strong>END_DATE=$(date +&quot;%s&quot;)<br>DIFF=$(($END_DATE - $START_DATE))<br>echo &quot;SwiftLint took $(($DIFF / 60)) minutes and $(($DIFF % 60)) seconds to complete.&quot;</pre><p>This script provides the rules to work on the changes made in the files. By this way, we able to use the code style on the project we work on.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86bd6bf60d51" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mobil-dev/swift-code-styles-swiftlint-86bd6bf60d51">Swift Code Styles (SwiftLint)</a> was originally published in <a href="https://medium.com/mobil-dev">Mobile Development</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Background Task with BGTaskScheduler]]></title>
            <link>https://medium.com/mobil-dev/background-task-with-bgtaskscheduler-1d49e22b1519?source=rss----9e8b1c257acb---4</link>
            <guid isPermaLink="false">https://medium.com/p/1d49e22b1519</guid>
            <category><![CDATA[background-fetch]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[ios-13]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Çağatay Emekci]]></dc:creator>
            <pubDate>Wed, 07 Oct 2020 05:47:46 GMT</pubDate>
            <atom:updated>2020-10-12T07:28:51.577Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TG2ebQQMNS8_FH5MVKjq9w.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@kellysikkema"><strong>Kelly Sikkema</strong></a> on<a href="https://unsplash.com/"> Unsplash</a></figcaption></figure><p>Background app refresh lets your application content always up to date. So, it is an important part of your application if it shows all the newest data. Before the iOS 13, if we want to run a code in the background, we only do it via background fetch in capabilities. But know we have the other option. <a href="https://developer.apple.com/documentation/backgroundtasks"><strong>Background Task Framework</strong></a><strong> </strong>has been come by iOS 13. When your application in the background, the framework has a feature like update your app content, and run tasks requiring time to complete. But if you want to use this feature, you have to follow up on some rules.</p><h3>BGTaskScheduler</h3><blockquote>A class for scheduling task requests that launch your app in the background.</blockquote><p>A task is a standalone activity, which means you can update your core data or displaying data in your app. iOS always care about performance. Therefore, when the device isn’t in use, the system can launch your application and run your task in the background.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/269/1*RLfOOkcQR3OBwK0GnMJiZg.png" /><figcaption>Background Modes in Xcode</figcaption></figure><p>When you active background modes in capabilities you can see the new section. It calls<strong> Background Progress.</strong> Configure your app to enable background task execution, and then register a launch handler for the task. Select one or both of Background fetch and Background processing based on the needs of your background tasks. The system only runs tasks that you registered with identifiers on a list of permitted task identifiers. I will mention it in the new part.</p><h4>Register, Schedule, and Run Tasks</h4><p>Each background task has a unique identifier. During app startup, you register a <em>launch handler</em>, a small block of code that runs the task. Register all of the tasks before the end of the app launch sequence. In the below example from Apple Documentation, I take it because of the explanation. But I changed something like I create a variable for the identifier (<em>bgTaskIdentifier</em>). So don’t forget to add a new item in info.plist as “Permitted background task scheduler identifiers,” which corresponds to the <a href="https://developer.apple.com/documentation/bundleresources/information_property_list/bgtaskschedulerpermittedidentifiers">BGTaskSchedulerPermittedIdentifiers</a> array.</p><p>In the first line, this code registers a task with an identifier to BGTaskSchedular. After then you decide when your application fetches data. So in the second line, you create a BGAppRefreshTaskRequest with the same identifier and then set earliestBeginDate with a date. You submit this request to BGTaskScheduler.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c3dfdf08c15f7571bd8f08f4b10d708e/href">https://medium.com/media/c3dfdf08c15f7571bd8f08f4b10d708e/href</a></iframe><p>At now we need an operation so that we create an operation that performs the main part of the background task. In the above example, they create for this purpose RefreshAppContentsOperation which inherit from the <a href="https://developer.apple.com/documentation/foundation/operation">Operation</a> class. We set a closure to cancel the operation to expirationHandler from the task. Also when the operation complete, we call the setTaskCompeted with success cases.</p><p>Finally, we can add an operation to the operationQueue.</p><h3>Conclusion</h3><p>We can run an operation in the background easily. Therefore we can commonly use it because our application will be always up to date. Don&#39;t forget, only if needed 😇</p><blockquote>However, I have tried to new background task in the application, I have faced some problem like <a href="https://developer.apple.com/forums/thread/121990">this</a> link. It has been fixed with iOS 13.4 but it is not enough to use this method for members of all iOS users.</blockquote><h3>Resources</h3><p><a href="https://developer.apple.com/documentation/backgroundtasks">Background Tasks | Apple Developer Documentation</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d49e22b1519" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mobil-dev/background-task-with-bgtaskscheduler-1d49e22b1519">Background Task with BGTaskScheduler</a> was originally published in <a href="https://medium.com/mobil-dev">Mobile Development</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WidgetKit]]></title>
            <link>https://medium.com/mobil-dev/widgetkit-57f7c96d90ea?source=rss----9e8b1c257acb---4</link>
            <guid isPermaLink="false">https://medium.com/p/57f7c96d90ea</guid>
            <category><![CDATA[widgetkit]]></category>
            <category><![CDATA[ios-14]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swiftui]]></category>
            <dc:creator><![CDATA[Çağatay Emekci]]></dc:creator>
            <pubDate>Thu, 01 Oct 2020 09:35:20 GMT</pubDate>
            <atom:updated>2020-10-01T09:35:20.599Z</atom:updated>
            <content:encoded><![CDATA[<p>These days, Apple released iOS 14. When updated your phone with iOS 14, you will see many new features. I think it is the most important one is the Widget. Apple announced the new home screen widget in this year’s WWDC. It was so exciting for Apple users. It has come with Xcode 12 and iOS 14. Widget to be multi-platform, and to make it as easy as possible for developers to have their learnings apply across iOS, iPadOS, and macOS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GyMtN0r8j49VuI9d3IaoQQ.jpeg" /><figcaption>The photo on Apple Developer</figcaption></figure><blockquote>In this paper, I want to explain about of all WidgetKit extension. I took some information from Apple’s documentation. Before we start, you can check <a href="https://developer.apple.com/documentation/widgetkit">this documentation</a> out.</blockquote><p>In iOS 14, we have a new Home Screen experience. It is much more dynamic and personalized with widgets which are highly glanceable not just on the iPhone Home Screen but also our refreshed Today View. Widgetkit allows you to create multiple widgets, each to solve its own unique problem. Each widget can support different sizes and layouts. Think of this as more projecting content from your app onto the Home Screen rather than full mini-apps filled with tiny little buttons.</p><blockquote>Widgets are not mini-apps</blockquote><p>The widget has three main goals.</p><p><strong>Glanceable</strong>: The new widgets can come in many sizes. People only spend a few moments on their Home Screen. You don’t spend time trying out to figure out a complicated UI. The widget UI has to be very simple. So, don’t let your user is confused about your widget.</p><p>These widgets are not mini-apps. You should consider that it does not support scrolling within the widget, interactive elements like switches and other system controls, nor videos or animated images. These glanceable UIs can allow your user to easily tap on the widget and deep link into your app. The entire widget is a tap target. (systemSmall) If you wanna create sub-links in systemMedium or systemLarge, then you can use the new link API in SwiftUI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*SHRAv-Q_9afOkrHIsxy0Dw.jpeg" /><figcaption>This picture shows a system medium and large widgets.</figcaption></figure><p><strong>Relevant</strong>: Having those widgets be relevant is just as important. Especially on our mobile platforms, where space is at a premium, show the right widget available as soon as you need it. Show your users what they need to find information quickly. What are Smart Stacks can be used for this purpose. They are a collection of widgets that automatically rotate to show the right widget at the top.</p><p><strong>Personalized</strong>: You can customize widget size and content. Also, you can see more than one widget on the home screen.</p><h3>Widget Definition</h3><p><strong>kind</strong>: Allow a single extension to support multiple kinds of extension. For example, the weather application can show two cities in Turkey with a distinct widget.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*k0voyJxVEPJSNdVQXjRglw.jpeg" /><figcaption>The photo shows two kinds of system small widget.</figcaption></figure><p><strong>configuration: </strong>This configuration type is determined whether or not the widget has user-configurable properties. There are two kinds of widget configuration type.</p><p>According to Apple documentation;</p><ul><li><a href="https://developer.apple.com/documentation/widgetkit/staticconfiguration">StaticConfiguration</a>: For a widget with no user-configurable properties. For example, a stock market widget that shows general market information, or a news widget that shows trending headlines. Our example of the widget configuration type will be StaticConfiguration.</li><li><a href="https://developer.apple.com/documentation/widgetkit/intentconfiguration">IntentConfiguration</a>: For a widget with user-configurable properties. You use a SiriKit custom intent to define the properties. For example, a weather widget that needs a zip or postal code for a city, or a package tracking widget that needs a tracking number. Our example in the below we created a IntentConfiguration template.</li></ul><p>StaticConfiguration is that your application only shows some data which you do not need to configure it in any way. For example, after the completion of this paper, I will write an example widget for my EnglishPractice application. My plan is to use StaticConfiguration for this example. Reminders, on the flip side, can be personalized for a particular list. This widget uses an IntentConfiguration. I created a widget with IntentConfiguration template which like the code is showing it below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/301e589549a5c391dad163d14fb335b8/href">https://medium.com/media/301e589549a5c391dad163d14fb335b8/href</a></iframe><p><strong>placeHolder: </strong>Each kind of widget is required to provide a placeholder UI. Placeholder UI is the default content of your widget. There should not be any user data in this UI. When your widget is shown on your home screen, placeHolder view is showing firstly.</p><p>If you add the widget extension to your project, you will be shown a template code of the widget. Here we define a sample widget, which conforms to the widget protocol and specifies a kind.</p><p>The<strong> kind</strong> value that you choose identifies the widget. This widget’s body property determines whether or not the widget has user-configurable properties. We explained this configuration above.</p><p>We return some widget configuration, which is composed of a few items and within there we specify a provider in our placeholder view. The provider is an object conforming to Provider that produces a timeline telling WidgetKit when to render the widget. TheConfigurationIntent is that defines user-configurable properties. This intent is automatically generated from the intent definition file. For more information about adding customization, see <a href="https://developer.apple.com/documentation/widgetkit/making-a-configurable-widget">Making a Configurable Widget</a>.</p><p>EnglishPractice_Widget in TheIntentConfiguraton is your main UI. It is a SwiftUI struct that conforms to the View protocol.</p><h3>View</h3><p>When you demonstrate an ordinary view, you think it is about UI. But in the view section, firstly I want to show the provider code like this. The TimelineProvider and IntentTimelineProvider is a protocol that responsable the give a timeline, placeholder and, snapshot. I added it to the code below. There are three types of UI experiences you need to think about:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0ea67bc3050b4ba205ff2738aac72d78/href">https://medium.com/media/0ea67bc3050b4ba205ff2738aac72d78/href</a></iframe><p>The function placeholder is responsible for returning the SimpleEntry for placeholder view. Then, in the snapshot function, the system asks for a single entry. And in the timeline function, the system asks for a series of entries. The snapshot view is the first view of the timeline. We have a SimpleEntry, which consists mainly of a date, also conform TimelineEntry protocol, a content, which provides environmental information, and the context for which the system is asking you for entries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KRM_gsN39hn_-ce19cDXWg.png" /></figure><p>If you investigate getTimeline function, you will see the Timeline object. It is about the refresh your Widget policy. Widget does not run constantly in the background. It need a timelines. Timelines are a combination of views and dates that are returned, which allow you to say at what time a particular view should be shown. And by returning a timeline is how we drive the widget experience. We do this through the concept of what we call reloads.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7OVastKgDwxd1DPnY6NAUg.png" /></figure><p>When you create a Timeline object, you have to pass this function a reload parameter. Reloads are where the system will wake up your extension and ask for a new timeline for each widget placed on the device. Reloads help ensures that your content is always up to date for your user. In the timeline, I would return an array of entries and attach a reload policy. Baked into each timeline is a reload policy. It’s where you can tell the system when to ask for the next timeline.</p><p>When Widget initialized, it wants a new timeline that has one with four entries from the provider. The first timeline entry is a current time like a snapshot followed by three entries at hourly intervals. With the refresh policy set to the default <a href="https://developer.apple.com/documentation/widgetkit/timelinereloadpolicy/atend">atEnd</a>, WidgetKit requests a new timeline after the last date in the timeline’s entries. When each date in the timeline arrives, WidgetKit invokes the widget’s content closure and displays the result. After the last timeline entry passes, WidgetKit repeats the process by asking the provider for a new timeline. The provider responds with a single entry for the current time and a refresh policy set to <a href="https://developer.apple.com/documentation/widgetkit/timelinereloadpolicy/never">never</a>. With this setting, WidgetKit doesn’t ask for another timeline until the app uses <a href="https://developer.apple.com/documentation/widgetkit/widgetcenter">WidgetCenter</a> to tell WidgetKit to request a new timeline.</p><p>In addition to the atEnd and never refresh policies, a provider can specify a different date altogether if the timeline might change before or after reaching the end of the entries. For example, if you want your Widgetkit update in 2 hours, the provider sets the reload policy to <a href="https://developer.apple.com/documentation/widgetkit/timelinereloadpolicy/after(_:)">after(_:)</a>, passing a date 2 hours in the future.</p><p>According to Apple Documentations:</p><p><strong>atEnd</strong>:</p><blockquote>A policy that specifies that WidgetKit requests a new timeline after the last date in a timeline passes.</blockquote><p><strong>after(date: Date):</strong></p><blockquote>A policy that specifies a future date for WidgetKit to request a new timeline.</blockquote><p><strong>never:</strong></p><blockquote>A policy that specifies that the app prompts WidgetKit when a new timeline is available.</blockquote><p>You can ask for a reload at the end of the timeline you provide, after a particular date, or you can explicitly tell the system to not reload your timeline The system will take into account your reload policy and determine the best time to reload your widget.</p><h3><strong>Example</strong></h3><p>So far we have talked about almost all the patterns we need to know. Let’s do some changes to the Widget’s template. With your project created, add a Widget module by going to File -&gt; New -&gt; Target and selecting the Widget Extension target. Make sure to uncheck the Include Configuration Intent checkbox. In this example we use StaticConfiguration.</p><p>However, this blog post is already very long and I think If I continue the post with the example, it will be very harder to understand. I’ll create two blog post for StaticConfigurationand IntentConfiguraton examples. Let’s leave it here for now.</p><p>Widgetkit is fairly new and all your feedback will be welcome.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fl1J3IHzSUmCpXThqo%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fl1J3IHzSUmCpXThqo%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2Fl1J3IHzSUmCpXThqo%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="290" frameborder="0" scrolling="no"><a href="https://medium.com/media/351130a6b4922f8ad4232874caa65727/href">https://medium.com/media/351130a6b4922f8ad4232874caa65727/href</a></iframe><h3><strong>Resources</strong></h3><ul><li><a href="https://developer.apple.com/videos/play/wwdc2020/10028/">Meet WidgetKit - WWDC20 - Videos - Apple Developer</a></li><li><a href="https://developer.apple.com/videos/play/wwdc2020/10194">Add configuration and intelligence to your widgets - WWDC 2020 - Videos - Apple Developer</a></li><li><a href="https://developer.apple.com/documentation/widgetkit">WidgetKit | Apple Developer Documentation</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57f7c96d90ea" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mobil-dev/widgetkit-57f7c96d90ea">WidgetKit</a> was originally published in <a href="https://medium.com/mobil-dev">Mobile Development</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is the difference between SwiftUI and UIKit framework?]]></title>
            <link>https://medium.com/mobil-dev/what-is-the-difference-between-swiftui-and-uikit-framework-a47b74b66c1c?source=rss----9e8b1c257acb---4</link>
            <guid isPermaLink="false">https://medium.com/p/a47b74b66c1c</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swiftui]]></category>
            <category><![CDATA[uikit]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <dc:creator><![CDATA[Çağatay Emekci]]></dc:creator>
            <pubDate>Tue, 19 May 2020 07:32:38 GMT</pubDate>
            <atom:updated>2020-05-19T07:32:38.036Z</atom:updated>
            <content:encoded><![CDATA[<p>Apple has announced to SwiftUI at last WWDC. So, What is SwiftUI? What does it mean to iOS developers? 🤔</p><p>SwiftUI is a user interface toolkit that lets us design apps. This description is okay, but we have already had a UIKit, what is the difference between SwiftUI and UIKit framework?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/192/1*PeFnya42mpOiCvdgm49ifQ.png" /></figure><p>According to <a href="https://developer.apple.com/documentation">Apple Developer Documentation:</a></p><ul><li><strong>SwiftUI, </strong>declare the user interface and behavior for your app on every platform.</li><li><strong>UIKit,</strong> construct, and manage a graphical, event-driven user interface for your iOS or tvOS app.</li></ul><p>One of the major differences between SwiftUI and UIKit, SwitUI is a declarative framework but UIKit is an imperative framework. In UIKit, we might make a function to be called when a button was clicked or picker was changed. Inside this function, after you were reading some value from another component or server, we regularly update the user interface. We need to track the state of the user interface correctly updates. If we forget to update the user interface, the user can operate on incorrect data. For example, if you updated to a data source of table view but you didn’t update the table view then the user will be seen incorrect data on a row. It is a big problem for our users.</p><p>In contrast, with the SwiftUI the data can be automatically bonded with the UI elements, so we don’t need to track the state of the User Interface. As a programmer, all we need to do is to set up data elements with the SwiftUI components. SwiftUI takes over the responsibility of making sure that the screen reflects the description in the view tree.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3oriNYQX2lC6dfW2Ji%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3oriNYQX2lC6dfW2Ji%2Fsource.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F3oriNYQX2lC6dfW2Ji%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/9a2877973bd32d4b6df8c092da0ef2f5/href">https://medium.com/media/9a2877973bd32d4b6df8c092da0ef2f5/href</a></iframe><p>Other differences between SwiftUI and UIKit, this is performance. In UIKit, every view descended from a class called <strong>UIView</strong> that had many properties and methods, but in SwiftUI, views are struct instead of class. Every view class in UIKit, inherit from UIView. Thus, there are many features that we may not need to use like that background color, a layer for rendering its contents into, and more. But, In SwiftUI, all our views are structs and are almost free to create. View struct only conforms to view protocol. No extra values inherited from parent classes like UIKit.</p><p>Even though SwiftUI is a young framework, it has very useful advantages for iOS developers. I think it would be also a future of iOS programming. So, you should start a new project with SwiftUI. 💪</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a47b74b66c1c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mobil-dev/what-is-the-difference-between-swiftui-and-uikit-framework-a47b74b66c1c">What is the difference between SwiftUI and UIKit framework?</a> was originally published in <a href="https://medium.com/mobil-dev">Mobile Development</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quick and Nimble]]></title>
            <link>https://medium.com/mobil-dev/quick-and-nimble-5c90aa6b3d48?source=rss----9e8b1c257acb---4</link>
            <guid isPermaLink="false">https://medium.com/p/5c90aa6b3d48</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[nimble]]></category>
            <category><![CDATA[quick]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[unittest]]></category>
            <dc:creator><![CDATA[Çağatay Emekci]]></dc:creator>
            <pubDate>Fri, 08 May 2020 09:07:17 GMT</pubDate>
            <atom:updated>2020-05-08T09:07:17.571Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*slKaci9ZuZRTUjDzgi3-SA.png" /></figure><p>Quick and Nimble are frameworks that are used in Unit tests in iOS. <a href="https://github.com/Quick/Quick">Quick</a> is a testing framework and <a href="https://github.com/Quick/Nimble">Nimble</a> is a matching framework. They help us to write tests more easily and readably in addition to verifying how your programs behave. According to its documentation;</p><p><strong><em>Quick</em></strong><em> is a behavior-driven development framework for Swift and Objective-C.</em></p><p><strong><em>Nimble</em></strong><em> is a Matcher Framework for Swift and Objective-C</em></p><p><a href="https://github.com/Quick/Quick/tree/master/Documentation/en-us">Their documentation</a> is very explanatory to understand their framework features and that demonstrates what is the best practice to write Unit tests in iOS if you’re completely new to unit testing. Before you use this framework on your project, you should investigate their documentation. I would like to summarize some of these topics by following their documentation.</p><h4>Effective Tests Using XCTest: Arrange, Act, and Assert</h4><p>There are a lot of design patterns for unit testing. This topic explains how to write unit tests by following a simple pattern. <strong>Arrange, Act, Assert</strong> are good because they help you while structuring your testing code around particular-use cases.</p><p>Additionally, in this topic, there is also some information about naming test cases function. The test case name should be very clear for the reader of codes. Because when you are a part of the big development team, working in the same piece of code blog, some team members may want to use your test for understanding your code. In more detail;</p><p><a href="https://github.com/Quick/Quick/blob/master/Documentation/en-us/ArrangeActAssert.md">Quick/Quick</a></p><h3>Don’t Test Code, Instead Verify Behavior</h3><p>You create many functions, classes, etc while developing a project. When writing the unit tests, you check whether their behavior has changed or not. If we try to explain this with an example, instead of checking data count in the database, you should check whether your data is in the database. In more detail; Blackbox test</p><p><a href="https://github.com/Quick/Quick/blob/master/Documentation/en-us/BehavioralTesting.md">Quick/Quick</a></p><h4>Clearer Tests Using Nimble Assertions</h4><p>You can use many assertions in the XCTest framework to compare two objects or check the object value. However, when XCTest assertions were used, there is no clear message when the code doesn’t work correctly. Therefore, it would be better to add an explanatory message to all assertions. If we use Nimble assertions instead of all these, we don’t need to add a message. Because Nimble assertions are already very readable. For more detail;</p><p><a href="https://github.com/Quick/Quick/blob/master/Documentation/en-us/NimbleAssertions.md">Quick/Quick</a></p><h4>Organized Tests with Quick Examples and Example Groups</h4><p>Quick uses a special syntax to define examples (it) and example groups (context, describe).</p><p><strong>it: </strong>is used to define the specific expected result for the test.</p><p><strong>context: </strong>is used to define the <em>specific context</em> of the action you’ll be testing.</p><p><strong>describe: </strong>is used to define what action or behavior you’ll be testing.</p><p><strong>beforeEach: </strong>similar to setup, it is run before each of the tests within this context/scope.</p><p><strong>afterEach: </strong>similar to tear down, it is run after each of the tests within this context/scope.</p><pre>describe(&quot;&quot;) {<br>   beforeEach { }<br>   afterEach { }<br>   context(&quot;&quot;) {<br>      it(&quot;&quot;) {<br>        // ...<br>      }<br>    }<br>  }</pre><p><a href="https://github.com/Quick/Quick/blob/master/Documentation/en-us/QuickExamplesAndGroups.md">Quick/Quick</a></p><h4>Testing OS X and iOS Applications</h4><p>This title shows you how you can use Quick and Nimble to test your “uiviewcontrollers” in your project.</p><p><a href="https://github.com/Quick/Quick/blob/master/Documentation/en-us/TestingApps.md">Quick/Quick</a></p><h4>Testing with Mocks</h4><p>You can use the all test doubles when you are using this framework. I have explained the test doubles on this <a href="https://medium.com/mobil-dev/unit-testing-and-test-doubles-in-swift-5b5e93e68512"><em>link</em></a><em>. </em>This title shows you how you can use this framework with test doubles.</p><p><a href="https://github.com/Quick/Quick/blob/master/Documentation/en-us/TestUsingTestDoubles.md">Quick/Quick</a></p><h3>Conclusion</h3><p>Quick and Nimble are easy to use and have the advantage that they are very descriptive of what you are testing. It allows us to describe the features of our code in a very readable and understandable way.</p><h3>References</h3><ol><li><a href="https://github.com/Quick/Quick">Quick Framework</a></li><li><a href="https://github.com/Quick/Nimble">Nimble Framework</a></li><li><a href="https://www.raywenderlich.com/135-behavior-driven-testing-tutorial-for-ios-with-quick-nimble">Raywenderlich</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c90aa6b3d48" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mobil-dev/quick-and-nimble-5c90aa6b3d48">Quick and Nimble</a> was originally published in <a href="https://medium.com/mobil-dev">Mobile Development</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unit Testing and Test Doubles in Swift]]></title>
            <link>https://medium.com/mobil-dev/unit-testing-and-test-doubles-in-swift-5b5e93e68512?source=rss----9e8b1c257acb---4</link>
            <guid isPermaLink="false">https://medium.com/p/5b5e93e68512</guid>
            <category><![CDATA[mockup]]></category>
            <category><![CDATA[test-doubles]]></category>
            <category><![CDATA[unittest]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Çağatay Emekci]]></dc:creator>
            <pubDate>Sun, 29 Mar 2020 22:13:29 GMT</pubDate>
            <atom:updated>2020-03-29T22:13:29.562Z</atom:updated>
            <content:encoded><![CDATA[<p>Testing is a process that verifying and validating your code. Unit testing is a way of testing your code. No matter which software language you use to develop a project, you should be heard of Unit testing. The assumption of “A programmer who knows how to write code can also write unit test code” is wrong. Sometimes you use it without understanding exactly what the function or class will do in itself but if you want to write a test for a function or class, you need to understand exactly what they are going to do inside.</p><p>In this article, I will explain that “What is Unit Testing?”, “Why should we use it?”, and “What is Test Doubles?”. While I explain these, I will give examples using Swift. Well, let’s start, what is Unit Testing?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*FZjBelQgpCXk0niEAeyxaw.png" /></figure><p><strong>According to Wikipedia;</strong></p><p>In computer programming, <strong>unit testing</strong> is a software testing method by which individual units of source code, sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures, are tested to determine whether they are fit for use.</p><h3>Why should we use it?</h3><p>By writing unit tests, we can test the functionality of our code whether it is working as expected or not. In addition, there are many advantages to writing unit tests as follows.</p><ul><li>It is very important to software quality.</li><li>It can help to drive good design.</li><li>It allows you safe refactoring.</li></ul><p>Now, we know about Unit testing and we should use it.</p><h3>Test Doubles</h3><p>While we are writing unit tests, we want to use objects that behave like their production equivalents but are a simplified version. We can call this kind of object a Test Double. External dependencies are managed with Test Doubles and easy to simulate various scenarios.</p><p>Test Double is a generic term for any case where you replace a production object for testing purposes. — Martin Fowler</p><p>There are 5 types of Test Doubles. Each one has a different purpose. We will dive deep into types of test doubles.</p><ul><li>Dummy</li><li>Fake</li><li>Stub</li><li>Mock</li><li>Spy</li></ul><h4>Dummies</h4><p>Dummy objects are objects that never used. This means it is not being used in a test and only act as a placeholder. Dummy objects also use to satisfy method parameters. You can implement to dummy object very easily.</p><p>In this example, we want to create a Provider object. For creating a Provider object, we have to pass the NotificationProvider variable on the initializer. We can use the dummy object in there.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/70b6e49b4499a4158a550eacb5201999/href">https://medium.com/media/70b6e49b4499a4158a550eacb5201999/href</a></iframe><h4>Fakes</h4><p>A fake is an object that has working implementations that replicate the behavior<strong><em>, </em></strong>but not the same as the production one.</p><p>In this example, imagine that we have a protocol that adds a notification to the database and gets a notification by using an identifier. We use this database only for production. So, we need to have a fake object to replicate the behavior. For this purpose, an example code is given below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5bec2979fcabd61693c73bf39939e81f/href">https://medium.com/media/5bec2979fcabd61693c73bf39939e81f/href</a></iframe><h4>Stubs</h4><p>Stub is an object which will always return a set of predefined data. Stub can provide “canned responses”.</p><p>Imagine that, we need Notifications for displaying. “getNotifications” method in NotificationGetter protocol can provide notifications. Therefore, while creating NotificationStub, it should be conformed to NotificationGetter protocol. Now, “getNotifications” in NotificationStub can provide notifications as a stub.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/83afb263c7c304420640949e15224079/href">https://medium.com/media/83afb263c7c304420640949e15224079/href</a></iframe><h4>Mocks</h4><p>Mocks are objects that register calls they receive. They also track which method being called and how many times it was called. Mock object types are good for verifying exact behavior.</p><p>As in the example above, we conform NotificationGetter for mock objects and then we will be tracking “getNotification” method.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fb70b13525bd852f7b0fa19e767623b1/href">https://medium.com/media/fb70b13525bd852f7b0fa19e767623b1/href</a></iframe><h4>Spy</h4><p>Spy records interactions and “verify” later. Spies are very similar to mocks and the opposite of stubs. When your code under test performs a side effect based on a dependency, you can use spies to record the effect.</p><p>If we want to test whether notification preference is enabled or not, we will write the code as below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a3dfa12246b12a74f49dab408d1612b4/href">https://medium.com/media/a3dfa12246b12a74f49dab408d1612b4/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*G0YrPjKJpZ6UDMhQrl_aTQ.png" /></figure><h3>Conclusion</h3><p>Unit testing can check the exact behavior of each piece in the code. Therefore, test Doubles are very useful when you are testing your code. They can reduce the complexity and dependency of a test. Also, they enable us to enhance the quality of the software.</p><h4>Further Readings</h4><p><a href="https://martinfowler.com/bliki/TestDouble.html">Test Double</a> — Martin Fowler<br><a href="http://xunitpatterns.com/Test%20Double.html">Test Double</a> — xUnit Patterns<br><a href="https://martinfowler.com/articles/mocksArentStubs.html">Mocks Aren’t Stubs</a> — Martin Fowler</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b5e93e68512" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mobil-dev/unit-testing-and-test-doubles-in-swift-5b5e93e68512">Unit Testing and Test Doubles in Swift</a> was originally published in <a href="https://medium.com/mobil-dev">Mobile Development</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Custom Section Header for UITableView]]></title>
            <link>https://medium.com/mobil-dev/custom-section-header-for-uitableview-4a6d91ce906c?source=rss----9e8b1c257acb---4</link>
            <guid isPermaLink="false">https://medium.com/p/4a6d91ce906c</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift-programming]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <dc:creator><![CDATA[Onur Tuna]]></dc:creator>
            <pubDate>Mon, 20 May 2019 12:42:29 GMT</pubDate>
            <atom:updated>2021-09-27T06:52:28.534Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently two designs catch my attention as an iOS developer: Horizontal lists and custom section headers. Developers and designers make great effort on them since almost all the parts of an app are made up of table views. As horizontal lists is not the scope of this post I’m planning to focus only on making a custom section header.</p><p>To be honest making a custom section header does not require a big effort. We’re going to start with a TableViewController containing a TableViewCell. Based on your choice, you can start with either a TableViewController or by putting a TableView inside a ViewController. I have chosen the last one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RP7YmIMQEK5I2h2EKYPk3w.png" /></figure><p>Next move will be to add a new xib file with its class. We’re going to design our section header in a different file. I love doing things part by part. I prefer using this methodology whether it’s easy or hard. In this case it’s a must. So add a Cocoa Touch class as a subclass of UITableViewHeaderFooterView. If you are used to create xib files with classes together you’re going to be surprised it’s not possible for this case. We should create an xib separately. You can do this from User Interface section. Choose View.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*MqiEZUEwBKUwWWFGhP_dsA.png" /></figure><p>By the time you have added new xib you will realize that the view size is fixed. You should change the Size option from Inferred to Freeform in order to make the size of the view resizable. Now you are free to give shape to your section header. In this tutorial we’re going to add only two labels, one as a big title while the other one will be something like a subtitle. Put two labels on the view for this purpose after having a good shape.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*BrGuIm4RGqw3FVHnxjr6BQ.png" /></figure><p>We’re going fine. Needless to say, create the outlets of these labels inside your UITableViewHeaderFooterView subclass. I have given a name as CustomSectionHeader to this class. The outlets are named as titleLabel and subtitleLabel respectively. Now we’re done with these class and xib file. Nothing to do more. Only one work to do is that we should register this xib in our tableview. The last code you should add is as the following one:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1b34fe6b05e5002d0857e707427731e3/href">https://medium.com/media/1b34fe6b05e5002d0857e707427731e3/href</a></iframe><p>When you run the final code you will see nothing 😅 We have some work to do. To see your custom section header of course you need to carry out the implementations which the table view require. You’ll find the whole project at the bottom of this post. The final view of the app should look like the one below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/387/1*1sz_iT3vUosXcg1314U7VQ.png" /></figure><p>The repository: <a href="https://github.com/onurtuna/custom-section-header">https://github.com/onurtuna/custom-section-header</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a6d91ce906c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mobil-dev/custom-section-header-for-uitableview-4a6d91ce906c">Custom Section Header for UITableView</a> was originally published in <a href="https://medium.com/mobil-dev">Mobile Development</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[iOS Code Signing & Provisioning]]></title>
            <link>https://medium.com/mobil-dev/ios-code-signing-provisioning-30ef09beb13d?source=rss----9e8b1c257acb---4</link>
            <guid isPermaLink="false">https://medium.com/p/30ef09beb13d</guid>
            <category><![CDATA[certification]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Çağatay Emekci]]></dc:creator>
            <pubDate>Sat, 29 Dec 2018 15:50:05 GMT</pubDate>
            <atom:updated>2018-12-29T15:50:04.909Z</atom:updated>
            <content:encoded><![CDATA[<p>Xcode geliştirdiğiniz uygulamayı cihazda çalıştırmanız için Code Signing ve Provisioning Profile’larınızın tam olması gerekir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*HzmKxlFWz7j0xj4yCA4NWg.png" /></figure><p>iOS cihazlarda, güvenilir geliştiriciler tarafından imzalanmış uygulamalar çalışır. Uygulamanız, bir cihaza kurulmadan veya App Store’a gönderilmeden önce, Apple tarafından verilen bir sertifika ile imzalanmalıdır. Code Signing bize kodu kimin yazdığını ve imzalandığı tarihten itibaren değiştirilmediğini garanti eder. Bu işlemi dijital bir imza olan Signing Identity ile yapar. Signing Identity, Apple’ın sizin için oluşturduğu bir public-private key çiftinden oluşur.</p><p>Asymmetric Encryption Public-Private key çiftini kullanır. Daha önceki yazımda (Encryption, Şifreleme) detaylı bir şekilde bahsettiğim gibi public key yalnızca kilit mekanizması olarak kullanılır ve paylaşılabilir, private key ise verileri yeniden açmak veya kodunu çözmek için kullanılır. Public-private key’i kullanarak, bir kullanıcı gerçekten kendisi olduğunu kanıtlayabilir.</p><p>Bir sertifikayı manuel olarak oluşturmak için Mac’inizden Public-Private Key’i içeren <strong>Certificate Signing Request</strong> (CSR) dosyasına ihtiyacınız vardır. CSR dijital kimlik sertifikasına başvurmak için başvuru sahibinden bir sertifika yetkilisine gönderilen bir mesajdır. iOS Dev Center’da bir sertifika oluşturmak için CSR oluşturmak bir önkoşuldur. CSR oluşturma işlemini Keychain Access Application aracılığıyla aşağıdaki süreci takip ederek yapabiliriz;</p><p><strong>CSR oluşturma süreci:</strong></p><ul><li>Keychain Access uygulamasını açın,</li><li>Menü bardan Keychain Access &gt; Certificate Assistant &gt; Request a Certificate From a Certificate Authority seçin,</li><li>Ekrandaki tüm izleyerek E-posta, ad ve ülke gibi bilgilerinizi girin,</li><li>“Saved to disk” seçeneğini işaretleyin,</li><li>Bir dosya adı belirtin ve Kaydet seçeneğine tıklayın,</li><li>Devam Et’i tıkladığınızda, Certificate Assistant bir CSR oluşturur ve dosyayı bilgisayarınıza kaydeder.</li></ul><p>Burada sizin için local’inizde Apple’a yükleyeceğiniz bir certSigningRequest dosyası oluşturduk. CSR ile oluşturduğumuz public key sertifikanıza ekli private key ise kendi Mac cihazınızın içinde tutulur. CSR’ımız olduğuna göre serifika oluşturmadaki önkoşulumuzu tamamladık. Uygulamamızı imzalamak için sertifika oluşturabiliriz.</p><p>iOS uygulamanızın development sürümlerini imzalamak için iOS developer certificates’e ihtiyacımız var. iOS developer certificates, sizi ve dijital kimliğinizi uygulamalarınızla ilişkilendiren bir dijital imza olan bir Code Signing sertifikasıdır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*jffh9oIcSYASaxHvqZHVGg.png" /></figure><p>Bu sertifikayı Member Center’da Certificates/Development altından Developer Sertifikası kısmında oluşturup indirebilirsiniz. Yandaki resimde olduğu gibi seçip ilerlediğinizde sizden daha önceden oluşturduğunuz CSR file’i yüklemenizi isteyecek. Yükleyip oluşturduk dedikten sonra local’inize indirebileceğiniz bir .cer dosyası oluşturur. Bu sertifikaya çift tıkladığınızda KeyChain/Certificate altında iOS Development sertifikasını ve bunun altında private key ekler. Development sertifikamızı oluşturduk ancak yalnızca bir sertifikayı kullanarak herhangi bir iOS cihazına uygulama yüklemek mümkün değildir. İşte burada Provisioning Profile sertifikaları devreye girer.</p><p>Provisioning Profile, cihaz ile geliştirici hesabı arasında bir bağlantı görevi görür. Uygulamanızı hangi cihazların çalıştırabileceğini ve uygulamanızın hangi uygulama servislerine erişebileceğini seçersiniz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*UG1twnJxCfctm3Mtd_UVOw.png" /></figure><p>Provisioning Profile sertifikasını açarsanız yandaki resimde ki XML formati ile karşılaşırsınız. Her Provisioning Profile sertifikası<strong> </strong>iPhone Development Certificates, Unique Device Identifiers, Entitlements ve App ID gibi bilgileri içerir. Peki bu sertifikaları nasıl oluştururuz.</p><p><strong>Provisioning Profile oluşturma süreci:</strong></p><p>Geliştirici hesabınızdan <strong>Provisioning Profiles</strong> alının altında All, Development, ve Distribtion diye alanlar göreceksiniz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3qH8IMk5NfLsV-e8NNjm_g.png" /></figure><p>Bu işlemi yaptığınızda yukarıdaki sayfa ile karşılaşacaksınız. Burada hangi Provising Profile tipine ihtiyacınız olduğunu belirtiyorsunuz. Biz iOS App Development Provising Profile sertifikasını oluşturmak istediğimiz için onu seçip devam ediyoruz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1gSOGt4lNwFFibWt9K0Zlg.png" /></figure><p>Şimdi hangi uygulama için Provising Profile oluşturacaksak onun App ID seçiyoruz. Burada önemli olan Game Center, In-App Purchase ve Push notification servisleri için bu servislere özel Bundle ID kullanırız. Diğer servisler için Wildcard App ID kullanabiliriz. (örnek com.tr.example.*)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cf30fewGq8bj8Vi_3Xw6Hw.png" /></figure><p>Bu sayfada Provising Profile’a eklemek istediğimiz development sertifikalarını seçiyoruz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R2GVrC8mQ1POwXb4xgmXvA.png" /></figure><p>Uygulamayı denemek istediğimiz hesabımıza kayıtlı cihazları seçiyoruz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2aV9pIk5yV0Di58pz-iBlg.png" /></figure><p>Son olarak sertifikanın adını girip Provisioning Profile sertifikamızı oluşturuyoruz. Tüm provisioning profile’larımızı oluşturduktan sonra localimize indirip çift tıklıyoruz. XCode’da projemizi açıp Target/General’da AppID’nin kontrol edildiğini, sertifikanın doğrulandığını, takımın eşleştiğini, capabilities ve entitlements’ın eşleştiğini başarılı bir şekilde görürseniz artık cihazınıza uygulamayı yükleyebilirsiniz.</p><p>Uygulamayı App Store dağıtman için ise Distribution Profile’ları oluştururuz. Uygulama Apple tarafından incelendikten sonra, Apple uygulamanızı imzalar ve artık App Store’dan cihazlara yüklenebilir.</p><p>iOS Code Signing ve Provisining belli kapsamda süreçleride ele alarak anlatmaya çalıştım.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30ef09beb13d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mobil-dev/ios-code-signing-provisioning-30ef09beb13d">iOS Code Signing &amp; Provisioning</a> was originally published in <a href="https://medium.com/mobil-dev">Mobile Development</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[iOS Mimari Desenler]]></title>
            <link>https://medium.com/mobil-dev/ios-mimari-desenler-ddada416921e?source=rss----9e8b1c257acb---4</link>
            <guid isPermaLink="false">https://medium.com/p/ddada416921e</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[software-design-patterns]]></category>
            <dc:creator><![CDATA[Çağatay Emekci]]></dc:creator>
            <pubDate>Wed, 12 Dec 2018 21:10:28 GMT</pubDate>
            <atom:updated>2018-12-12T21:10:27.965Z</atom:updated>
            <content:encoded><![CDATA[<p>Mimari desenler yazılımda sıkça karşılaşılan problemlere yeniden kullanılabilir çözümler üretir. Bu desenler, anlaşılması ve yeniden kullanılması kolay kod yazmanıza yardımcı olacak şekilde tasarlanmış şablonlardır. Ayrıca, yazılımı her bir bileşenin ayrı olduğu ve tek bir sorumluluğu üstlenecek şekilde modülerleştirilmesine yardımcı olur. <br><br>Mimari desenler gözetmeksizin geliştirilen projelerde en ufak bir özellik eklemek, herhangi bir hatayı düzeltmek ekstra efor ve zaman gerektirebilir. Bu gibi problemler ile karşılaşmak istemiyorsak yapmamız gereken günümüzdeki mimari desenlerden projenize ve ekibinize en uygun olanına kararlaştırıp ona göre ilerlemektir. Bir uygulama geliştirirken mimari desenlere göre geliştirsek bu hem sizin işimizi hem de takım arkadaşlarımızın kodu geliştirmesini ve hataları çözmesini kolaylaştırır.</p><p>Yukarıda mimari desenlerin tanımından, özelliklerinden ve kullanmazsak karşılacağımız problemlerden bahsettik. Bu övdüğümüz ve kullanmanızı tavsiye ettiğimiz mimari desenlerden günümüzde kullanılan MVC, MVP, MVVM ve VIPER. Her bir mimariyi tek tek inceleyeceğiz. Ancak her biri çok detaylı olduğu için bu yazımı şimdilik burada tamamlıyorum. Bir sonraki yazımda bu mimari desenlerden en çok kullanılan MVC ile devam edeceğim.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ddada416921e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mobil-dev/ios-mimari-desenler-ddada416921e">iOS Mimari Desenler</a> was originally published in <a href="https://medium.com/mobil-dev">Mobile Development</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>