StartApp


Authentication system for iOS apps written in Xcode 9 and Swift 4 ready. StartApp is the Xcode project that startups and iOS developers need for an easy and quick start coding process of an universal iOS app. All professional apps need an authentication system to allow their users to register and log in. StarApp allows to sign in with Facebook or with Email and Password also creates a users database to manage user accounts and store their data in the cloud. StartApp uses the last version of Google Firebase real-time database and authentication systems that allows you to build apps fast, without managing infrastructure and without cost. StartApp provides a nice UI design for your Register and Login screen thats fits perfectly in all iPhones and iPad screens. All scripts to connect and read and write data in real time to Firebase are provided as well as all cocoa pods needed. All code is in Swift, well commented and easy to customize for you own app.    

Features

Technical features: 

        

     

Install StartApp

Once you downloaded StratApp.zip file you can tryed it out by by running Cocoa pods first (See point 1 below), and then opening the Xcode project: StartApp.xcworkspace and running the app in Xcode. This demo app use Firebase and Facebook  accounts from StartApp, but you can customize for your own app by following theses 3 easy steps:  

1- RUN COCOAPODS:

StartApp uses CocoaPods to manage Firebase and Facebook library dependencies. If you don’t have CocoaPods installed in your mac, please install it first:  https://guides.cocoapods.org/using/getting-started.html 

1.1- Go to your StartApp Xcode project directory and run the Terminal in this directory. Write the command: pod install

Press Enter and pods will be installed:

1.2- Open StartApp.xcworkspace project (white icon). Please from now on always use this file, never use the StartApp.xcodeproj (blue icon).

1.3- Go to menu Product>Clean and then Product>Build in Xcode.

1.4- Run the app and try to login with email and Facebook and tap the buttons “Happy :)” in the simulator. If you could login into the app is because StartApp is configured with Firebase and Facebook accounts of StartApp. You can set up the app with your own accounts. Learn how to do it in the next steps.     

 

2- CREATE A FIREBASE PROJECT:

StartApp uses Firebase from Google to manage users, real time database and analytics.

2.1- Create a new Firebase project: go to https://console.firebase.google.com/ login with your Google account or register. Click ‘+Add project’. Write the project’s name and select your Country/region:

2.2- Follow the steps on the “Create project” wizard.

2.3- Download GoogleService-Info.plist file and replace in StartApp Xcode project. Please make sure that the name of the file is the same as you downloaded: GoogleService-Info.plist  If it’s the case, remove any number that it might have at the end of the name: GoogleService-Info(1).plist  

2.4- Make sure that the Target Membership checkbox in the File Inspector is activated:  

2.5- Enable Email/Password and Facebook auth methods in Firebase: Authentication>Sign-in Method  

2.6- To allow that just authenticated users can read and write their own data change Security Rules in Firebase Database:

{

  "rules": {

    "users": {

      "$uid": {

        ".read": "$uid === auth.uid",

        ".write": "$uid === auth.uid"

      }

    }

  }

}

3- CONFIGURE FACEBOOK LOGIN:

In order to use Facebook Login we need to create a Facebook app.

3.1- Follow steps 1, 3.a, 3.b and 4.2. in the Facebook login configuration guide: https://developers.facebook.com/docs/facebook-login/ios?locale=en_US#

FB Step 1: Create a New App.. follow the wizard steps.

        FB step 3.a (add your Bundle id) and 3.b Enable Single Sign On

Replace the ids in info.plist file in Xcode:

3.2- Enable Facebook auth methods in Firebase. Enter your own FB App id and App Secret:

 

You can find your FB App id and App secret in Facebook app page:

in Settings > Basic:

5- CHECK IF IT WORKS:

5.1- Go to your StartApp Xcode project directory and run the Terminal in this directory. Write the command: pod install

5.2- Run the app and try to login with email and Facebook and tap the buttons “Happy :)” in the app simulator.

5.3- Go to Firebase Auth and Database page to check if users are created.  

If you have problems to connect to Firebase try this: http://stackoverflow.com/questions/32006033/ios-9-fbauth2-missing-from-info-plist