Git Product home page Git Product logo

login-screen-swift's Introduction

iOS Login Screen in Swift

This project has been updated to SwiftUI and latest Xcode

About

This is a simple iOS login screen written in Swift 5. It has support for signing in with Facebook, Google and specially Apple, as well as the classic email & password form.

The template uses FacebookLogin and GoogleSignin frameworks, installed with Cocoapods.

Installation and configuration

First, you need to clone this repository, in order to fetch the code

$ git clone https://github.com/mrcflorian/login-screen-swift.git

In order to compile your code, you need to install the dependencies first (in our case, the frameworks from Twitter and Facebook). You can simply do this by running the following command in the root folder of the project (where the Pods file lives):

$ pod update

If you're not familiar with Cocoapods, checkout their website, to see how you can install it.

Once the pods were installed properly, open LoginScreen.xcworkspace with Xcode and run the project.

Everything should be working fine. There's one more thing to do though, since the code is using some default Facebook & Google applications. You need to update the code so that it uses your apps.

Open the Info.plist file (as source code) and update the following piece of code with your correct API keys:

<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>fb285315185217069</string>
        </array>
    </dict>
</array>
<key>FacebookAppID</key>
<string>285315185217069</string>
<key>FacebookDisplayName</key>
<string>iOSAppTemplates</string>
<key>LSApplicationQueriesSchemes</key>
<array>
    <string>fbapi</string>
    <string>fb-messenger-api</string>
    <string>fbauth2</string>
    <string>fbshareextension</string>
    <string>twitter</string>
    <string>twitterauth</string>
</array>

For Sign in with apple, you need to configure something on Certificates, Identifiers and Profiles. https://www.iosapptemplates.com/blog/ios-development/sign-in-with-apple-swift Check out the link above and do step 1 and step 2.

Documentation

The interface of the login screen can be found in Interface/LoginScreen.storyboard. The template uses auto layout contraints, to display the UI elements.

The core class is LoginViewController, which contains all the logic for the three different types of authentication. The code is pretty short and easy to understand.

If you want even more details on the project, please visit iOS App Templates.

login-screen-swift's People

Contributors

buikhanhduy avatar duybui297 avatar mahmoud3030arafat avatar mrcflorian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

login-screen-swift's Issues

No such Module 'FacebookCore'

Hi. I've installed CocoaPods successfully. Everything seems to be there. But on build this is the error I'm thrown: No such Module 'FacebookCore'. I've search for a solution. Seems to be related to the search path for the cocoapod info. I'm using XCode 9.0.

Google does not compile

I downloaded the project and had to comment out all the Google code because it would not launch.

Documentation

Tip: if you paste photos of the development in the header of the documentation would be good to have a preview view about your dev

compile time issue with twitter pod

when compiling the workspace project,

Error:(42, 9) use of unresolved identifier 'Twitter'..

in LoginViewController..

looks like some mismatch in names ...
screen shot 2018-01-03 at 12 40 54 pm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.