Skip to content

MOPCON/App-iOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

App-iOS

MOPCON App for iOS

Develop Tool

This project develops with Swift (latest version), so before getting start, we should check Xcode has been installed in our Mac.

  • Xcode recommend 10.2 or above

Convert To Latest Swift Version

# In Xcode
Edit -> Convert -> To Current Swift Syntax...

Pods Installation & Update

This project uses CocoaPods to manage third party libraries. If Pods folder doesn't exist, we can use commands below to intsall or update third party libraries. But before install or update, we should check third-party libraries version in Podfile.

# pods installation
$ pod install

# pods update
$ pod update

If CocoaPods isn't installed in our Mac, we should install first:

$ sudo gem install cocoapods

Environment Variable

Before getting start, please set env variable to develop machine

export MOPCON_DES_KEY="xxx"

Security Files

The security files was encrypted into secrets.tar.enc use following commands to decrypt it.

Derypt
openssl des-cbc -d -k $MOPCON_DES_KEY -in secrets.tar.enc -out secrets.tar

# extract tar file.
tar xvf ./secrets.tar

Or, if we want to make encrypt file, here is the commands:

Encrypt
tar -czvf secrets.tar files_you_want_to_encrypt

openssl des-cbc -e -K $MOPCON_DES_KEY -in secrets.tar -out secrets.tar.enc

Start Develop

After setting all tool and commands, now we can start to develop. Please open Mopcon.xcworkspace file.

Folder Structure

.
├── Mopcon                           # Mopcon folder
│   ├── appcenter-post-clone.sh      # App-Center CI/CD config
│   ├── BoothMission.json            # Mission game json, it should be extracted from secrets.tar.enc
│   ├── Mopcon.xcodeproj             # Xcode Project file
│   ├── Mopcon.xcworkspace           # Xcode Workspace file, open to start this project
│   ├── Mopcon    								
│   │   ├── API                      # All api services defined in here    
│   │   ├── Assets.xcassets          # Image files   
│   │   ├── Base.lproj               # Launch view
│   │   ├── Controller               # View controllers and controllers
│   │   ├── Helper                   # Helper classes  
│   │   ├── Model                    # Data models
│   │   ├── Mopcon.xcdatamodeld				
│   │   ├── Storyboard               # UI Storyboards
│   │   ├── View                     # UI Views 
│   │   ├── AppDelegate.swift										
│   │   ├── GoogleService-Info.plist # Firebase config								
│   │   ├── Info.plist										
│   │   └── Mopcon.entitlements									
│   ├── MopconUITests                # UI Test files
│   ├── Pods                         # Thrid-party libraries
│   ├── Podfile                      # Config file of Pods
│   ├── Podfile.lock                 # Pods lock file
│   ├── Quiz.json                    # Mission game json, it should be extracted from secrets.tar.enc
│   └── secrets.tar.enc              # Encryped secrets files
├── README.me                        # Readme file
└── .gitignore                       # Git ignore file

Coding Style

The coding style refers to following link, all the developer should follow it.

https://github.com/raywenderlich/swift-style-guide

Git Flow

We use the simplified git-flow to improve team development speed. Unlike the standard git-flow, we don't have a release branch.

Imgur

When a feature branch is finished, you must submit a Pull Request to develop branch.

Don't forget assign your partner to review it.

Contributing

Check out the issues and see how you can help out.