在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:instructure/canvas-ios开源软件地址:https://github.com/instructure/canvas-ios开源编程语言:Swift 77.5%开源软件介绍:Canvas iOS AppsGetting Started on DevelopmentYou 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 SecretsAny static keys, tokens, passwords, or other secrets that need to be available in the app bundle should be added as a case to 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 AnalyticsIf you wish to use Firebase Analytics in custom apps, you will need to populate the Debugging ReduxTo 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 PrinciplesSimpleWriting 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.
Easy to DebugSurprise! 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. TestableWriting 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. ConventionsWe make and keep strong conventions in order to reduce mental overhead. No Tricky StuffWe do things the Apple prescribed way because it offers the best long term predictability with minimal maintenance. Fat Model, Thin ControllerModels & 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. PredictableBy 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. AutomationWe don't do any manual QA of our products. We write code that tests our apps for us. Prune Legacy Code |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论