Skip to content

abhijatyagupta/newsApp-iOS

Repository files navigation

newsApp Status: Completed Minimum platform: iOS 13.0 Cocoapods: SwiftyJSON Firebase/Auth Firebase/Firestore

Read news. Mark news as real or fake. Or see what others have marked.

Build Instructions 🛠

  1. A small prerequisite 🥺

    In order for the build to succeed and for this app to actually fetch the news, along with the files in this repo, it also requires a file called "Secrets.plist" which should be placed inside the "newsApp" folder in this repo. Though named Secrets with an s, it needs to hold only one secret which should be your API key to the newsapi.org REST API which can be obtained for free from newsapi.org/register.

    Once you have the API key, clone the repo and create a "Secrets.plist" file inside newsApp folder (alongside Constants.swift). Follow the steps below to see how to create plist file using xcode or you may create it using touch terminal command.

    Open newsApp.xcworkspace > Expand newsApp project > Right-click newsApp folder > New File... > Property List > Save As: Secrets.plist

    Then, either
    From within XCode, select Secrets.plist and create a new item with String as its type with API_KEY as Key and the api key you obtained from newsapi.org as value.

    Or
    Open Secrets.plist with a text editor (textEdit, etc.) and paste the following in the file before replacing [YOUR_API_KEY] with the key obtained from newsapi.org.

     <?xml version="1.0" encoding="UTF-8"?>
     <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
     <plist version="1.0">
     <dict>
      <key>API_KEY</key>
      <string>[YOUR_API_KEY]</string>
     </dict>
     </plist>
    

    Now that we have the secret ingredient, we shall proceed further with the recipe! 😋

  2. The basic stuff 💁🏻‍♀️

    newsApp is built using Swift 5 and on XCode 12 and uses cocoapods. Now, you probably already have XCode or else why would you be even reading this but just in case you don't, get it from here.

  3. And we are almost done! ✅

    That was it, the setup. Now all you have to do is open newsApp.xcworkspace if you haven't already and hit run! Just make sure you set the active scheme as newsApp before running and you're good to go. If you're wondering what's active scheme, it is this in the xcode toolbar at the top:

Features 😮

  • Filter news by category, country or both
  • Search for any topic
  • See how many people have marked a news as real or fake
  • Ability to mark news as real or fake
  • See or post public views

Back-end services 🔨

Sneak Peek 👀

    

    

About

Read news. Mark news as real or fake. Or see what others have marked.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages