Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

netguru/baby-monitor-client-ios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Baby Monitor iOS

Welcome to the Baby Monitor project. It's an application made for monitoring babies, which can help parents take care of their children. Application works similar to this product: https://www.philips.ie/c-p/SCD620_05/avent-baby-monitor-digital-video-baby-monitor

Team

Tools & Services

Configuration

Dependencies

Instalation

  1. Clone repository:
# over https:
git clone https://github.com/netguru/baby-monitor-client-ios.git
# or over SSH:
git clone git@github.com:netguru/baby-monitor-client-ios.git
  1. Install required Gems:
bundle install
  1. Run Carthage:
carthage bootstrap --platform iOS --cache-builds
  1. IMPORTANT: Open terminal and prevent saving changes being made to GoogleService-Info.plist: Enter plists folder
cd "Baby Monitor/Supporting Files/Firebase"

and start ignoring changes made to the files in there

git update-index --assume-unchanged $(git ls-files | tr '\n' ' ') 
  1. For Developers from Netguru: Get SECRET_PASSPHRASE from project's vault and do not expose it in any way, make sure this key is secure with you. Make sure you have gpg and 7zip installed, then run:
# Decrypt prerequisites archive
gpg --quiet --batch --yes --decrypt --passphrase='$SECRET_PASSPHRASE' --output prerequisites.zip prerequisites.zip.gpg
# Unzip the archive
7z e prerequisites.zip -oprerequisites -y
# Copy GoogleService plist files
mv -f "./prerequisites/GoogleService-Info-Development.plist" "./Baby Monitor/Supporting Files/Firebase/GoogleService-Info-Development.plist"
mv -f "./prerequisites/GoogleService-Info-Production.plist" "./Baby Monitor/Supporting Files/Firebase/GoogleService-Info-Production.plist"
mv -f "./prerequisites/GoogleService-Info-Staging.plist" "./Baby Monitor/Supporting Files/Firebase/GoogleService-Info-Staging.plist"

In case of the lack of an access:

For a full integration please configure your own application in Firebase, download and paste plists from there as well as a key to .env.

  1. Install pods through Bundler:

    bundle exec pod install
  2. Open Baby Monitor.xcworkspace file and build the project.

Updating prerequisites

  1. For Developers from Netguru: Get SECRET_PASSPHRASE from project's vault and do not expose it in any way, make sure this key is secure with you. Make sure you have gpg and 7zip installed, then run:
# Decrypt prerequisites archive
gpg --quiet --batch --yes --decrypt --passphrase='$SECRET_PASSPHRASE' --output prerequisites.zip prerequisites.zip.gpg
# Unzip the archive
7z e prerequisites.zip -oprerequisites -y
  1. Update files in prerequisites directory.
  2. Certificates.p12 have to also be locked with SECRET_PASSPHRASE.
  3. Create the archive from the prerequisites directory.
  4. Encrypt it using command:
gpg --symmetric --cipher-algo AES256 prerequisites.zip
  1. Commit updated gpg file.

Coding guidelines

  • Respect Swift API Design Guidelines

  • The code must be readable and self-explanatory - full variable names, meaningful methods, etc.

  • Don't leave any commented-out code.

  • Write documentation for every method and property accessible outside the class. For example well documented method looks as follows:

    for Swift:

     /// Tells the magician to perform a given trick.
     ///
     /// - Parameter trick: The magic trick to perform.
     /// - Returns: Whether the magician succeeded in performing the magic trick.
     func perform(magicTrick trick: MagicTrick) -> Bool {
     	// body
     }

Related repositories

Tips

Layout

  • Use helper methods from UIView+AutoLayout.swift
  • Examples:
addSubview(view)
view.addConstraints {[
    $0.equalConstant(.height, 36), // sets height to 36
    $0.equalConstant(.width, 285), // sets width to 285
    $0.equal(.centerX), // attaches centerXAnchor to superView centerXAnchor
    $0.equalTo(topView, .top, .bottom, constant: 80) // attaches views topAnchor to topView bottom anchor with offset 80
]}