GithubHelp home page GithubHelp logo

swordfish's Introduction

Swordfish - Better Binus Mobile

A no BS Bimay client for iOS

APP DEMO

** This project is no longer maintained **

What’s this?

A college companion app for Binus University students. You can see your upcoming schedules, GPAs, and billing information in this app.

THIS APPLICATION IS STILL IN A VERY EARLY STAGE, THINGS ARE GOING TO BREAK DOWN QUITE OFTEN. THIS APP WILL NOT WORK ON ANYONE THAT HAS A STAFF ACCOUNT ON BINUSMAYA BECAUSE ROLE VALIDATION IS NOT YET IMPLEMENTED Also, I'm not responsible for anything you do with this application and I don't collect your data. All user related data is stored locally, they ain't going to some shady server so don't worry about it. This is a THIRD PARTY app, developed INDEPENDENTLY from Binus University, by interested Binusians. This is NOT A REPLACEMENT for the Binusmaya website, information provided in it is NOT GUARANTEED TO ALWAYS BE VALID. (Copy pasted from Portal's Google Play Page)

A bit of a backstory

This project is inspired by Portal for BinusMaya, which I’ve used extensively from class to class. At the time I was amazed. How can an individual develop an app that precisely know what the student wants, great looking UI.

This project started as one of my fun side projects as I’m learning Swift and I wanted to put my knowledge to use. Note that this application is built in about 17 days, there will be bugs (lots of it), the codebase is still pretty messy. I decided to open-source this application because I’m on my final year and I should be working on my thesis. Not that I’m abandoning this project, I will continue develop this app in the future, just that I’m shifting my priorities right now.

Also, I don't know if this project will ever go on the AppStore due to Apple's app review policy. Chances are slim I would say, because Binus doesn't actually provide an official API access.

Tools and Libraries Used

  • Swift (Programming Language), Swordfish is written entirely in Swift
  • Realm, Used to persist data locally
  • RxSwift, This project was originally written with PromiseKit, but after seeing the FRM (Functional Reactive Programming) hype, I decided to make my life harder by migrating to RxSwift. Used to handle asynchronous requests and reactive UI
  • Texture, UI framework that comes with their own layout engine, why? Because AutoLayout sucks.
  • RxTableDataSources, Makes your life and mine easier when dealing with table data binding with Rx
  • SwiftSoup, To extract data and stuffs from HTML
  • CocoaPods, to manage dependencies

Note that there’s no Dependency Injection in this application as of now.

Architecture

This project is built with MVVM in mind, here's quick explanation to MVVM These are the classes on this application

  • Extensions, the name it self should be pretty self explanatory. It is an extension for built in Swift types.
  • ViewModels, before serving data to view controller, process data needed by view controller.
  • Views, all view controllers is here
  • Repositories, used to retrieve and save data to Realm, the local database.
  • Helpers, utility functions to assist in development.
  • Network, do everything network related here (HTTP requests etc.)
  • Entities, objects to store data from HTTP requests / Realm
  • Interactor, business logics are here, interactor does the heavy lifting for you before you go into ViewModels
  • Dependencies, Manual Dependency Injection using Protocols from here

If you wanted to know your realm db location, just check the console. I’ve printed it out for you.

Contributing

This project is on GitHub for a reason. The source code is available for you to read. Any contribution would be much appreciated. I’m a firm believer in learning by doing. Getting your hands dirty is the first step to learn anything, it could be a starting point for you to learn iOS development.

Discovered a bug? Bring up the issue. Ideas that would make this app better? Open up a thread. Fixed a bug? Implemented a new feature? Open a pull request and I’ll help to review it.

I know that this application is miles away from perfect, and the codebase is probably going trigger PTSD for some software engineers out there, but I'm learning slowly. This is also the first time I’m implementing design patterns in an application. I would love your feedbacks on the architectural pattern I’m implementing. As a way to start things off, I’m opening a few issues for this app. Have fun.

swordfish's People

Contributors

jpauljm avatar kevinyou77 avatar raysarebest avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

swordfish's Issues

Remove SwiftSoup dependency

Currently I get some of the data in constructLoginForm() with SwiftSoup, perhaps it could be replaced with simple regex instead of a dependency.

Crush on first run in RealmSwiftPermissionUser

I'm using Xcode 11.1 (11A1027). After cloning and pod update, when I run app I get this error:

2019-10-13 14:48:11.490856+0500 iPortal for Binusmaya[43055:700563] *** Terminating app due to uncaught exception 'RLMException', reason: 'Primary key property 'identity' does not exist on object 'RealmSwiftPermissionUser''
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff23baa1ee __exceptionPreprocess + 350
	1   libobjc.A.dylib                     0x00007fff50864b20 objc_exception_throw + 48
	2   Realm                               0x000000011006ab13 +[RLMObjectSchema schemaForObjectClass:] + 4371
	3   Realm                               0x000000011017adde _ZL16RLMRegisterClassP10objc_class + 302
	4   Realm                               0x000000011017be0d __25+[RLMSchema sharedSchema]_block_invoke + 77
	5   CoreFoundation                      0x00007fff23c32d87 __NSDICTIONARY_IS_CALLING_OUT_TO_A_BLOCK__ + 7
	6   CoreFoundation                      0x00007fff23c0bf8e -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 238
	7   Realm                               0x000000011017bb4f +[RLMSchema sharedSchema] + 479
	8   Realm                               0x00000001101465f5 +[RLMRealm realmWithConfiguration:error:] + 2805
	9   RealmSwift                          0x0000000111760461 $sSo8RLMRealmC13configurationABSo0A13ConfigurationC_tKcfCTO + 145
	10  RealmSwift                          0x0000000111760319 $s10RealmSwift0A0CACyKcfC + 105
	11  iPortal for Binusmaya               0x000000010f190bef $s21iPortal_for_Binusmaya11AppDelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0l6LaunchK3KeyaypGSgtF + 191
	12  iPortal for Binusmaya               0x000000010f1920d4 $s21iPortal_for_Binusmaya11AppDelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0l6LaunchK3KeyaypGSgtFTo + 212
	13  UIKitCore                           0x00007fff4756fa87 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 232
	14  UIKitCore                           0x00007fff4757141f -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 3980
	15  UIKitCore                           0x00007fff47576f6e -[UIApplication _runWithMainScene:transitionContext:completion:] + 1281
	16  UIKitCore                           0x00007fff46cbc3ed -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 122
	17  UIKitCore                           0x00007fff471a4aa9 _UIScenePerformActionsWithLifecycleActionMask + 83
	18  UIKitCore                           0x00007fff46cbceff __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 198
	19  UIKitCore                           0x00007fff46cbc90e -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 296
	20  UIKitCore                           0x00007fff46cbcd2c -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 818
	21  UIKitCore                           0x00007fff46cbc5c1 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 345
	22  UIKitCore                           0x00007fff46cc0bef __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke_2 + 178
	23  UIKitCore                           0x00007fff470ca9d7 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 865
	24  UIKitCore                           0x00007fff471c2fa7 _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 240
	25  UIKitCore                           0x00007fff46cc090a __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 153
	26  UIKitCore                           0x00007fff471c2eaa _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 84
	27  UIKitCore                           0x00007fff46cc0778 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 381
	28  UIKitCore                           0x00007fff46b1ac67 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 657
	29  UIKitCore                           0x00007fff46b197ec -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 248
	30  UIKitCore                           0x00007fff46b1a991 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 210
	31  UIKitCore                           0x00007fff475755cb -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 535
	32  UIKitCore                           0x00007fff470ec535 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
	33  FrontBoardServices                  0x00007fff364e0361 -[FBSSceneImpl _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 442
	34  FrontBoardServices                  0x00007fff365065f8 __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke.154 + 102
	35  FrontBoardServices                  0x00007fff364eae41 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 220
	36  FrontBoardServices                  0x00007fff36506289 __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke + 355
	37  libdispatch.dylib                   0x0000000112279d6c _dispatch_client_callout + 8
	38  libdispatch.dylib                   0x000000011227ccdd _dispatch_block_invoke_direct + 300
	39  FrontBoardServices                  0x00007fff3652c49e __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
	40  FrontBoardServices                  0x00007fff3652c18c -[FBSSerialQueue _queue_performNextIfPossible] + 441
	41  FrontBoardServices                  0x00007fff3652c69b -[FBSSerialQueue _performNextFromRunLoopSource] + 22
	42  CoreFoundation                      0x00007fff23b0d271 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
	43  CoreFoundation                      0x00007fff23b0d19c __CFRunLoopDoSource0 + 76
	44  CoreFoundation                      0x00007fff23b0c974 __CFRunLoopDoSources0 + 180
	45  CoreFoundation                      0x00007fff23b0767f __CFRunLoopRun + 1263
	46  CoreFoundation                      0x00007fff23b06e66 CFRunLoopRunSpecific + 438
	47  GraphicsServices                    0x00007fff38346bb0 GSEventRunModal + 65
	48  UIKitCore                           0x00007fff47578dd0 UIApplicationMain + 1621
	49  iPortal for Binusmaya               0x000000010f1927fb main + 75
	50  libdyld.dylib                       0x00007fff516ecd29 start + 1
	51  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.