• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

instructure/canvas-ios: Canvas iOS apps

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

instructure/canvas-ios

开源软件地址:

https://github.com/instructure/canvas-ios

开源编程语言:

Swift 77.5%

开源软件介绍:

Canvas iOS Apps

Getting Started on Development

You will need the following tools installed beforehand:

brew install swiftlint yarn
gem install cocoapods
yarn global add react-native-cli --prefix /usr/local

Then you can setup the repo:

git clone [email protected]:instructure/canvas-ios.git
cd canvas-ios
./setup.sh

The setup.sh script should take care of installing additional dependencies from Cocoapods and yarn.

Secrets

Any static keys, tokens, passwords, or other secrets that need to be available in the app bundle should be added as a case to Secret.swift.

The secrets necessary for a particular build are generated as data assets using a script.

yarn build-secrets "studentPSPDFKitLicense=token1" "teacherPSPDFKitLicense=token2"

You will need to purchase PSPDFKitLicenses to distribute custom apps. Instructure's licenses are only used for official builds and are not included in the repository.

Firebase Analytics

If you wish to use Firebase Analytics in custom apps, you will need to populate the GoogleService-Info.plist for each app.

Debugging Redux

To get redux logs you can add redux-logger as a middleware to the redux store.

We don't want to keep the logger in because it slows down the runtime quite a lot.

In src/redux/store.js

import logger from 'redux-logger'

let middleware = [promiseMiddleware, errorHandler, createPersisteMiddleware(500), logger]

The redux logs will now show up in the React Native Debugger.

Contributing Guiding Principles

Simple

Writing an app is complex. Decisions made from the beginning have a big impact on the end result.

We strive to maintain a simple architecture that is easy to understand and pick up. Someone familiar with the platform should be productive within a single day.

Code should be self-documenting and easy to follow.

Ugly code is easy to recognize and its cost is easy to estimate. Neither is true for a wrong abstraction.
- Dan Abramov

Easy to Debug

Surprise! Apps have bugs. Industry average is 15-50 defects per 1000 lines of code.

We build our apps in a way that makes finding and fixing issues is as easy as possible.

Testable

Writing code in a testable way is paramount for long term success. These apps are built in a way that makes our unit testing surface as large as possible.

Conventions

We make and keep strong conventions in order to reduce mental overhead.

No Tricky Stuff

We do things the Apple prescribed way because it offers the best long term predictability with minimal maintenance.

Fat Model, Thin Controller

Models & Presenters handle as much of the business logic as possible. This allows a wide unit testing surface. Views & View Controllers should be as small as possible.

Predictable

By scrutinizing each dependency we bring in, the code we write is our responsibility. Unit tests are a key portion of the code we write, so as time passes, the code that worked 2 years ago still works today.

Automation

We don't do any manual QA of our products. We write code that tests our apps for us.

Prune Legacy Code


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap