<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: RyutaMiyamoto</title>
    <description>The latest articles on Forem by RyutaMiyamoto (@ryutamiyamoto).</description>
    <link>https://forem.com/ryutamiyamoto</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F78498%2F55581277-fdd4-4cc3-8efd-414220165b1d.jpeg</url>
      <title>Forem: RyutaMiyamoto</title>
      <link>https://forem.com/ryutamiyamoto</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ryutamiyamoto"/>
    <language>en</language>
    <item>
      <title>I will show you all the source code of released iOS application!</title>
      <dc:creator>RyutaMiyamoto</dc:creator>
      <pubDate>Thu, 14 Jun 2018 13:07:10 +0000</pubDate>
      <link>https://forem.com/ryutamiyamoto/i-will-show-you-all-the-source-code-of-released-ios-application-2a03</link>
      <guid>https://forem.com/ryutamiyamoto/i-will-show-you-all-the-source-code-of-released-ios-application-2a03</guid>
      <description>&lt;h1&gt;
  
  
  I will show you all the source code of released iOS application!
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;This time, I thought about publishing the source code of the application for the following reasons.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I want many people to see the application I made.&lt;/li&gt;
&lt;li&gt;I want to hear opinions of various people.&lt;/li&gt;
&lt;li&gt;I would like to help those who make apps by sharing code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope this article will be useful to everyone 😃&lt;/p&gt;

&lt;h1&gt;
  
  
  Introduction of the application
&lt;/h1&gt;

&lt;p&gt;Innovy (Innovy).&lt;br&gt;
It is a news application for 20s to 30s (mainly men) who are setting up antennas for gathering information on latest services and technologies.&lt;br&gt;
※ I made the name that imagined an innovator (innovator).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ur6IOfTX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://qiita-image-store.s3.amazonaws.com/0/160811/203eb665-a087-c7d5-d762-8ec5546e770e.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ur6IOfTX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://qiita-image-store.s3.amazonaws.com/0/160811/203eb665-a087-c7d5-d762-8ec5546e770e.jpeg" alt="AppIcon 1024 _ 1.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see latest news by genre and user's reaction.&lt;br&gt;
Moreover, because there is a news read-out function, you can also check news while walking.&lt;br&gt;
App URL:&lt;a href="https://itunes.apple.com/us/app/Innovy/id1319179144"&gt;https://itunes.apple.com/us/app/Innovy/id1319179144&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  screenshot
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PlCpTRoY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://qiita-image-store.s3.amazonaws.com/0/160811/ed3c3726-c922-6634-0da7-3d21050a8e1b.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PlCpTRoY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://qiita-image-store.s3.amazonaws.com/0/160811/ed3c3726-c922-6634-0da7-3d21050a8e1b.jpeg" alt="IMG_5140_4.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  ① News list screen
&lt;/h4&gt;

&lt;p&gt;You can check various genres of news on the top page of the application.&lt;br&gt;
Tap on the news to change the genre with the detail screen, horizontal swipe.&lt;/p&gt;

&lt;h4&gt;
  
  
  ② News list screen (press long news)
&lt;/h4&gt;

&lt;p&gt;After long press of the news, start reading aloud from the place where the news was selected with "tap from this position" tap.&lt;/p&gt;

&lt;h4&gt;
  
  
  ③ News detail screen (reading articles)
&lt;/h4&gt;

&lt;p&gt;You can check the details of the news.&lt;br&gt;
From this screen you can check tweets about news clips and news on display.&lt;/p&gt;

&lt;h4&gt;
  
  
  ④ Tweet list screen
&lt;/h4&gt;

&lt;p&gt;You can check tweets about selected news from the list.&lt;br&gt;
You can tweet by pressing tweet button.&lt;/p&gt;

&lt;h4&gt;
  
  
  ⑤ Article search screen
&lt;/h4&gt;

&lt;p&gt;You can search past news.&lt;/p&gt;

&lt;h4&gt;
  
  
  ⑥ Setting screen
&lt;/h4&gt;

&lt;p&gt;You can check the weather forecast of the current location and change the settings of the application.&lt;/p&gt;

&lt;h1&gt;
  
  
  Launch public source code and applications
&lt;/h1&gt;

&lt;p&gt;First of all, I access the following URL.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/RyutaMiyamoto/Innovy"&gt;https://github.com/RyutaMiyamoto/Innovy&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Clone or download&lt;/code&gt; →&lt;code&gt;Download ZIP&lt;/code&gt; to download the project.&lt;br&gt;
Please unzip the downloaded zip file.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_c_gBAeZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://qiita-image-store.s3.amazonaws.com/0/160811/d153df5f-e3f6-d8f3-8390-618ce33f4cb4.png" class="article-body-image-wrapper"&gt;&lt;img width="512" alt="Screenshot 2018-06-02 13.38.55.png" src="https://res.cloudinary.com/practicaldev/image/fetch/s--_c_gBAeZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://qiita-image-store.s3.amazonaws.com/0/160811/d153df5f-e3f6-d8f3-8390-618ce33f4cb4.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Install the library using the following cocoaPods.&lt;br&gt;
Please refer to &lt;a href="https://qiita.com/ShinokiRyosei/items/3090290cb72434852460"&gt;another article&lt;/a&gt; how to install cocoaPods.&lt;br&gt;
After installing cocoaPods open the terminal, go to the Innovy-master folder, enter the &lt;code&gt;pod install&lt;/code&gt; command and wait until the library installation is over.&lt;/p&gt;

&lt;p&gt;After installing the library, open the Innovy - master folder and open &lt;code&gt;likeNews.xcworkspace&lt;/code&gt;.&lt;br&gt;
Recommended environment: XCode 9.3&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jM5ZVtRn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://qiita-image-store.s3.amazonaws.com/0/160811/9525f431-af88-134c-0176-e2a9476f4dcd.png" class="article-body-image-wrapper"&gt;&lt;img width="629" alt="Screenshot 2018-06-02 13.40.00.png" src="https://res.cloudinary.com/practicaldev/image/fetch/s--jM5ZVtRn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://qiita-image-store.s3.amazonaws.com/0/160811/9525f431-af88-134c-0176-e2a9476f4dcd.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After opening XCode, select the appropriate terminal with &lt;code&gt;iOS Simulators&lt;/code&gt; and press the&lt;code&gt;Run button&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--givgRRCv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://qiita-image-store.s3.amazonaws.com/0/160811/9adea365-f29c-8ab6-5d8c-e98f350de534.png" class="article-body-image-wrapper"&gt;&lt;img width="917" alt="Screenshot 2018-06-02 13.50.29.png" src="https://res.cloudinary.com/practicaldev/image/fetch/s--givgRRCv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://qiita-image-store.s3.amazonaws.com/0/160811/9adea365-f29c-8ab6-5d8c-e98f350de534.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Successful when simulator &amp;amp; application starts.&lt;br&gt;
Of course, if you set Provisioning Profile, it is also possible to operate in real machine.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zDmhSigR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://qiita-image-store.s3.amazonaws.com/0/160811/b8009f75-b0d8-8c12-3b0d-e7769012f20b.jpeg" class="article-body-image-wrapper"&gt;&lt;img width="208" alt="Screenshot 2018-06-02 14.33.22.jpg" src="https://res.cloudinary.com/practicaldev/image/fetch/s--zDmhSigR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://qiita-image-store.s3.amazonaws.com/0/160811/b8009f75-b0d8-8c12-3b0d-e7769012f20b.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Firebase plist, API key for API with limit of number of times etc. are masked, so some are not displayed.&lt;br&gt;
If you contact us separately, we will pass items that are masked 🙃&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;However, I will limit it to those who are clear on their identity (on Facebook etc.).&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Architecture introduction
&lt;/h1&gt;

&lt;p&gt;Innovy adopts &lt;a href="https://en.wikipedia.org/wiki/Model_View_ViewModel"&gt;MVVM (Model-View-ViewModel)&lt;/a&gt; as the architectural pattern?&lt;/p&gt;

&lt;p&gt;For example, when the user performs the operation of reacquiring the latest news on the news list screen (pulls the screen upward), it moves as follows.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Consider &lt;code&gt;NewsListViewController&lt;/code&gt; in code as&lt;code&gt;View&lt;/code&gt;, &lt;code&gt;NewsListViewModel&lt;/code&gt; as&lt;code&gt;ViewModel&lt;/code&gt; and &lt;code&gt;NewsListModel&lt;/code&gt; as&lt;code&gt;Model&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--k_0RsGQn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://qiita-image-store.s3.amazonaws.com/0/160811/29efe10f-5caa-8af5-7bea-b1334f2b346b.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--k_0RsGQn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://qiita-image-store.s3.amazonaws.com/0/160811/29efe10f-5caa-8af5-7bea-b1334f2b346b.jpeg" alt="Architecture.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;①. &lt;code&gt;View&lt;/code&gt; detects? Update operation by user&lt;br&gt;
②. &lt;code&gt;View&lt;/code&gt; requests update process to&lt;code&gt;ViewModel&lt;/code&gt;&lt;br&gt;
③ &lt;code&gt;ViewModel&lt;/code&gt; asked&lt;code&gt;Model&lt;/code&gt; to acquire news list&lt;br&gt;
④. &lt;code&gt;Model&lt;/code&gt; uses the news list acquisition API to acquire the latest news&lt;br&gt;
⑤. &lt;code&gt;Model&lt;/code&gt; notifies&lt;code&gt;ViewModel&lt;/code&gt; of completion of news acquisition&lt;br&gt;
⑥. Create data for &lt;code&gt;View&lt;/code&gt; display based on the news list&lt;code&gt;ViewModel&lt;/code&gt; obtained from &lt;code&gt;Model&lt;/code&gt;&lt;br&gt;
⑦. &lt;code&gt;ViewModel&lt;/code&gt; notifies&lt;code&gt;View&lt;/code&gt; of completion of data creation&lt;br&gt;
⑧. &lt;code&gt;View&lt;/code&gt; updates screen based on&lt;code&gt;ViewModel&lt;/code&gt; information&lt;/p&gt;

&lt;p&gt;So the latest news information is reflected in the application 😉&lt;/p&gt;

&lt;h1&gt;
  
  
  Introduction of library used in application
&lt;/h1&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/mac-cain13/R.swift"&gt;R.swift&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Since it is possible to acquire the image file name and the Storyboard name as properties, it prevents errors due to typing errors.&lt;br&gt;
Image file name, alert message ?, xib name etc used everywhere.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/Alamofire/Alamofire"&gt;Alamofire&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;A library for facilitating HTTP communication.&lt;br&gt;
Everyone is using it for iOS application development that communicates, is not it?&lt;br&gt;
Used in the API communication part.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/rs/SDWebImage"&gt;SDWebImage&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Just specifying a URL for UIImageView will display the image, loading display, cache it will cache.&lt;br&gt;
Used in the display portion of the article image.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/JohnSundell/Unbox"&gt;Unbox&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;A library that parses Json.&lt;br&gt;
Used in the place to retrieve Json acquired by API for use inside the application.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/realm/realm-cocoa"&gt;Realm&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Application version database.&lt;br&gt;
The data access syntax is very easy to understand.&lt;br&gt;
Used for storing article information.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/rizumita/CTFeedback"&gt;CTFeedback&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;A library that makes it easy to create an inquiry screen.&lt;br&gt;
Used on the inquiry screen.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/SVProgressHUD/SVProgressHUD"&gt;SVProgressHUD&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;A library for displaying indicators representing processing in front of the screen.&lt;br&gt;
Used while acquiring article information.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/bitstadium/HockeySDK-iOS"&gt;HockeySDK&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;A library that collects crash reports when crashing applications.&lt;br&gt;
Set at startup.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/firebase/"&gt;Firebase&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Application general search library such as application usage survey, crash report viewing, push notification?&lt;br&gt;
Set at startup.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/fan-ADN/nendSDK-iOS"&gt;NendSDK_iOS&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;A library for displaying advertisements.&lt;br&gt;
Used when displaying articles.&lt;/p&gt;

&lt;h1&gt;
  
  
  Introduction to API
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Article information acquisition API (self-made) (likeNews/getNews.php)
&lt;/h2&gt;

&lt;p&gt;API for retrieving article information?&lt;br&gt;
Used when displaying the list.&lt;/p&gt;

&lt;h2&gt;
  
  
  Genre information acquisition API (homebrew) (likeNews/getGenre.php)
&lt;/h2&gt;

&lt;p&gt;API for getting genre information?&lt;br&gt;
Genres include "startup", "service", "design" and others.&lt;br&gt;
Used at startup.&lt;/p&gt;

&lt;h2&gt;
  
  
  Article article score addition API (homebrew) (likeNews/updateNewsScore.php)
&lt;/h2&gt;

&lt;p&gt;API to add the number of times you saw the article details.&lt;br&gt;
Tap any article from the article list and use it at the timing of opening the article details.&lt;br&gt;
By this, when you display the article you can display "other people ○ people are paying attention to this article!"?&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://api.twitter.com/"&gt;Tweet Information Acquisition API&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;API to acquire tweet information from Twitter to acquire&lt;br&gt;
Article detail screen? When you tap the tweet button at the bottom, a tweet list is displayed, but it is used when acquiring the list.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://openweathermap.org/"&gt;Weather Information Acquisition API&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;API for getting weather information.&lt;br&gt;
By specifying latitude and longitude, weather information of the place can be acquired.&lt;br&gt;
Used when displaying weather information displayed on the setting screen.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://geoapi.heartrails.com"&gt;Location Information Retrieval API&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;? API for obtaining location information.&lt;br&gt;
If you specify latitude and longitude, you can obtain the address of that place in Japanese.&lt;br&gt;
Since weather information API can only obtain addresses in English, we will separately obtain addresses using this API.&lt;br&gt;
Used with weather information API.&lt;/p&gt;

&lt;p&gt;At the end&lt;/p&gt;

&lt;p&gt;How was that.&lt;/p&gt;

&lt;p&gt;Read this article and open your iOS application&lt;/p&gt;

&lt;p&gt;Original Article:&lt;br&gt;
&lt;a href="https://qiita.com/ryupaka/items/ea272c843d3ebf3b245b"&gt;https://qiita.com/ryupaka/items/ea272c843d3ebf3b245b&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ios</category>
      <category>swift</category>
      <category>xcode</category>
    </item>
  </channel>
</rss>
