GithubHelp home page GithubHelp logo

phatblat / realmtasktracker Goto Github PK

View Code? Open in Web Editor NEW
26.0 5.0 4.0 7.28 MB

SwiftUI version of the MongoDB Realm iOS tutorial

Home Page: https://docs.mongodb.com/realm/tutorial/ios-swift/

License: MIT License

Ruby 0.26% Swift 81.81% JavaScript 7.75% Makefile 10.18%
realmswift mongodb realm-mobile-database swiftui combine

realmtasktracker's Introduction

MongoDB Realm Task Tracker

Implementation of the MongoDB Realm iOS Swift tutorial in SwiftUI.

Conferences

Combine-ing MongoDB Realm with SwiftUI Slides (PDF)

⚠️ Caveats

TL;DR: Only Testuser works.

This app uses a dynamic partition value of the current user's ID. However, I have not yet gotten this to work with the new Realm @AsyncOpen property wrapper. To work around this the partition value is hard-coded with the value of Testuser.

📸 Screenshots

iOS simulator showing login form Screen showing a list of tasks

📄 License

This repo is licensed under the MIT License. See the LICENSE file for rights and limitations.

realmtasktracker's People

Contributors

phatblat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

realmtasktracker's Issues

🐛 Crash after task is deleted

2020-09-16 21:07:52.003971-0600 RealmTaskTracker[35723:3166578] *** Terminating app due to uncaught exception 'RLMException', reason: 'Index 7 is out of bounds (must be less than 7).'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff2043a126 __exceptionPreprocess + 242
	1   libobjc.A.dylib                     0x00007fff20177f78 objc_exception_throw + 48
	2   Realm                               0x000000010e9feba1 _Z20RLMThrowResultsErrorP8NSString + 657
	3   Realm                               0x000000010e9ffde4 _ZL25translateRLMResultsErrorsIZ28-[RLMResults objectAtIndex:]E3$_7EDaOT_P8NSString + 116
	4   Realm                               0x000000010e9ffcfe -[RLMResults objectAtIndex:] + 110
	5   RealmSwift                          0x00000001107f95ff $s10RealmSwift7ResultsVyxSicig + 239
	6   RealmSwift                          0x00000001107fbf73 $s10RealmSwift7ResultsVyxSicir + 115
	7   RealmSwift                          0x00000001107fbe92 $s10RealmSwift7ResultsVyxGSlAASly7ElementQz5IndexQzcirTW + 82
	8   SwiftUI                             0x00007fff56046b35 $s7SwiftUI7ForEachV11IDGeneratorO6makeID4data5index6offsetq_x_5IndexQzSitF + 277
	9   SwiftUI                             0x00007fff5604d035 $s7SwiftUI12ForEachState33_00713678F075B914F7FE0E74B0A90E85LLC0cD16ViewIDCollectionVyAA01_N7List_IDVSicig + 549
	10  SwiftUI                             0x00007fff5604d714 $s7SwiftUI12ForEachState33_00713678F075B914F7FE0E74B0A90E85LLC0cD16ViewIDCollectionVyAA01_N7List_IDVSicir + 20
	11  SwiftUI                             0x00007fff5604d681 $s7SwiftUI12ForEachState33_00713678F075B914F7FE0E74B0A90E85LLC0cD16ViewIDCollectionVyxq_q0__GSlAASly7ElementQz5IndexQzcirTW + 49
	12  SwiftUI                             0x00007fff56129ad5 $s7SwiftUI12_ViewList_IDV6_ViewsCyACSicig + 117
	13  SwiftUI                             0x00007fff5612972b $s7SwiftUI12_ViewList_IDV5ViewsCSlAASly7ElementQz5IndexQzcirTW + 27
	14  libswiftCore.dylib                  0x00007fff2f243970 $ss5SliceVy7ElementQz5IndexQzcig + 864
	15  libswiftCore.dylib                  0x00007fff2f24543e $ss5SliceVy7ElementQz5IndexQzcir + 94
	16  libswiftCore.dylib                  0x00007fff2f2453c3 $ss5SliceVyxGSlsSly7ElementQz5IndexQzcirTW + 51
	17  libswiftCore.dylib                  0x00007fff2f1f0d1d $ss15LazyMapSequenceVsSlRzrlEyq_5IndexQzcir + 333
	18  libswiftCore.dylib                  0x00007fff2f1f0870 $ss15LazyMapSequenceVyxq_GSlsSlRzrlSly7ElementQz5IndexQzcirTW + 64
	19  SwiftUI                             0x00007fff55eea04f $s7SwiftUI19ShadowRowCollectionVyAA12_ViewList_IDV9CanonicalV0D3IDs_5IndexQZcig + 591
	20  SwiftUI                             0x00007fff55eea1be $s7SwiftUI19ShadowRowCollectionVyAA12_ViewList_IDV9CanonicalV0D3IDs_5IndexQZcir + 46
	21  SwiftUI                             0x00007fff55eea151 $s7SwiftUI19ShadowRowCollectionVyxGSlAASly7ElementQz5IndexQzcirTW + 49
	22  SwiftUI                             0x00007fff559d1905 $s7SwiftUI23CountingIndexCollectionVy7ElementQzAA0cD0Vy0D0QzGcig + 181
	23  SwiftUI                             0x00007fff559d1ac2 $s7SwiftUI23CountingIndexCollectionVy7ElementQzAA0cD0Vy0D0QzGcir + 98
	24  SwiftUI                             0x00007fff559d1a21 $s7SwiftUI23CountingIndexCollectionVyxGSlAASly7ElementQz0D0QzcirTW + 49
	25  libswiftCore.dylib                  0x00007fff2f1225b4 $ss16IndexingIteratorVyxGStsSt4next7ElementQzSgyFTW + 436
	26  libswiftCore.dylib                  0x00007fff2f0c4f13 $sSTsE13_copyContents12initializing8IteratorQz_SitSry7ElementQzG_tF + 563
	27  libswiftCore.dylib                  0x00007fff2f0da1db $ss32_copyCollectionToContiguousArrayys0dE0Vy7ElementQzGxSlRzlF + 363
	28  libswiftCore.dylib                  0x00007fff2f0cd948 $sSTsE22_copyToContiguousArrays0cD0Vy7ElementQzGyFTm + 24
	29  libswiftCore.dylib                  0x00007fff2f0d01a3 $ss15ContiguousArrayVyAByxGqd__c7ElementQyd__RszSTRd__lufC + 19
	30  SwiftUI                             0x00007fff559d1083 $sSl7SwiftUIE21withContiguousStorageyqd__qd__SRy7ElementQzGKXEKlF + 323
	31  SwiftUI                             0x00007fff55c478a3 $s7SwiftUI17CollectionChangesV14changedOffsets33_BECB2E29DCF6A1FE856734124D30AD74LL4from2to5limitSaySiG_AItSgqd___qd_0_SitSKRd__SKRd_0_SH7ElementRpd__AKQyd_0_ALRSr0_lF + 211
	32  SwiftUI                             0x00007fff55c4712d $s7SwiftUI17CollectionChangesV04formD04from2toyqd___qd_0_t5IndexQyd__RszAGQyd_0_Rs_SKRd__SKRd_0_SH7ElementRpd__AJQyd_0_AKRSr0_lF + 461
	33  SwiftUI                             0x00007fff56138b1f $s7SwiftUI16ListBatchUpdatesV24computeRemovesAndInserts33_A424F5232720E51D2A2BD1A8E90C36E8LL4from2toyAA013CountingIndexC10DataSourceAELLVyqd__G_AIyxGtAA0c4CorexY0Rd__6RowIDs_0W0QYd__AM_ANRTz10SectionIDs_ANQYd__AQ_ANRTzlF + 4639
	34  SwiftUI                             0x00007fff56135b72 $s7SwiftUI16ListBatchUpdatesV04formE04from2toyqd___xtAA0C14CoreDataSourceRd__6RowIDs_5IndexQYd__AH_AIRTz07SectionM0_AIQYd__AL_AIRTzlF + 1074
	35  SwiftUI                             0x00007fff561352a3 $s7SwiftUI20ListCoreBatchUpdatesV04formF04from2toyAA06ShadowC10DataSourceVyxG_xtF + 131
	36  SwiftUI                             0x00007fff55dc59be $s7SwiftUI19ListCoreCoordinator33_BFB370BA5F1BADDC9D83021565761A49LLC17updateUITableView_2to11transactionySo0mN0C_xAA11TransactionVtF + 670
	37  SwiftUI                             0x00007fff55dc489f $s7SwiftUI17ListRepresentable33_BFB370BA5F1BADDC9D83021565761A49LLV12updateUIView_7contextyAA25UpdateCoalescingTableViewACLLC_AA0lD7ContextVyADyxq_GGtF + 911
	38  SwiftUI                             0x00007fff5621c967 $s7SwiftUI32PlatformViewRepresentableAdaptor33_19642D833A8FE469B137699ED1426762LLV06updateD8Provider_7contexty10UIViewTypeQz_AA0cdE7ContextVyADyxGGtF + 263
	39  SwiftUI                             0x00007fff55e6a685 $s7SwiftUI17PlatformViewChild33_A513612C07DFA438E70B9FA90719B40DLLV11updateValueyyFyyXEfU_yyXEfU2_yyXEfU_yyXEfU_ + 229
	40  SwiftUI                             0x00007fff55e6a562 $s7SwiftUI17PlatformViewChild33_A513612C07DFA438E70B9FA90719B40DLLV11updateValueyyFyyXEfU_yyXEfU2_yyXEfU_ + 114
	41  SwiftUI                             0x00007fff5611253a $s7SwiftUI16ViewRendererHostPAAE21performExternalUpdateyyyyXEF + 186
	42  SwiftUI                             0x00007fff55e6a4c9 $s7SwiftUI17PlatformViewChild33_A513612C07DFA438E70B9FA90719B40DLLV11updateValueyyFyyXEfU_yyXEfU2_ + 73
	43  SwiftUI                             0x00007fff55e696df $s7SwiftUI17PlatformViewChild33_A513612C07DFA438E70B9FA90719B40DLLV11updateValueyyFyyXEfU_ + 2079
	44  SwiftUI                             0x00007fff55e68baa $s7SwiftUI17PlatformViewChild33_A513612C07DFA438E70B9FA90719B40DLLV11updateValueyyF + 650
	45  SwiftUI                             0x00007fff55b9583a $s14AttributeGraph0A0VyACyxGqd__c5ValueQyd__RszAA12StatefulRuleRd__lufcADSPyqd__GXEfU_ySv_So11AGAttributeatcyXEfU_ySv_AJtcqd__mcfu_ySv_AJtcfu0_TA + 26
	46  AttributeGraph                      0x00007fff4b808d03 _ZN2AG5Graph11UpdateStack6updateEv + 505
	47  AttributeGraph                      0x00007fff4b809199 _ZN2AG5Graph16update_attributeENS_4data3ptrINS_4NodeEEEb + 335
	48  AttributeGraph                      0x00007fff4b811245 _ZN2AG8Subgraph6updateEj + 781
	49  SwiftUI                             0x00007fff561acbda $s7SwiftUI9GraphHostC14runTransactionyyF + 186
	50  SwiftUI                             0x00007fff561b06ef $s7SwiftUI9GraphHostC14runTransaction33_30C09FF16BC95EC5173809B57186CAC3LLyyAA05AsyncF0AELLCF + 79
	51  SwiftUI                             0x00007fff561af213 $s7SwiftUI9GraphHostC17flushTransactionsyyF + 211
	52  SwiftUI                             0x00007fff561b068f $s7SwiftUI9GraphHostC16asyncTransaction_8mutation5styleyAA0F0V_xAA01_C14Mutation_StyleOtAA0cI0RzlFyycfU_yACXEfU_ + 15
	53  SwiftUI                             0x00007fff561afb79 $s7SwiftUI9GraphHostCIgg_ACytIeggr_TR03$s7a3UI9cD92C16asyncTransaction_8mutation5styleyAA0F0V_xAA01_C14Mutation_StyleOtAA0cI0RzlFyycfU_yACXEfU_Tf3nnpf_n + 9
	54  SwiftUI                             0x00007fff55c9c0b1 $s7SwiftUI17ViewGraphDelegatePAAE06updateD04bodyqd__qd__AA0D4HostCXE_tlFqd__AA0cD0CXEfU_TA + 17
	55  SwiftUI                             0x00007fff56112b0a $s7SwiftUI16ViewRendererHostPAAE06updateC5Graph4bodyqd__qd__AA0cG0CXE_tlFqd__yXEfU_ + 74
	56  SwiftUI                             0x00007fff56106349 $s7SwiftUI16ViewRendererHostPAAE06updateC5Graph4bodyqd__qd__AA0cG0CXE_tlF + 73
	57  SwiftUI                             0x00007fff561061d9 $s7SwiftUI14_UIHostingViewCyqd__GAA0D13GraphDelegateA2aEP06updatedE04bodyqd__qd__AA0dE0CXE_tlFTW + 25
	58  SwiftUI                             0x00007fff55c98257 $s7SwiftUI17ViewGraphDelegatePAAE06updateD04bodyqd__qd__AA0D4HostCXE_tlF + 55
	59  SwiftUI                             0x00007fff55c98219 $s7SwiftUI14_UIHostingViewCyqd__GAA13GraphDelegateA2aEP06updateE04bodyqd__qd__AA0E4HostCXE_tlFTW + 25
	60  SwiftUI                             0x00007fff561b066a $s7SwiftUI9GraphHostC4dataA2C4DataV_tcfcyycfU_Tm + 122
	61  SwiftUI                             0x00007fff561b1923 $s7SwiftUI9GraphHostC16asyncTransaction_8mutation5styleyAA0F0V_xAA01_C14Mutation_StyleOtAA0cI0RzlFyycfU_TA.5 + 19
	62  SwiftUI                             0x00007fff55cb8d2c $sIeg_ytIegr_TR + 12
	63  SwiftUI                             0x00007fff559d6031 $sIeg_ytIegr_TRTA + 17
	64  SwiftUI                             0x00007fff559d5ed3 $sSo9NSRunLoopC7SwiftUIE14flushObserversyyFZ + 115
	65  SwiftUI                             0x00007fff559d5e59 $sSo9NSRunLoopC7SwiftUIE11addObserveryyyycFZySo05CFRunbF3RefaSg_So0gB8ActivityVSvSgtcfU_yyXEfU_ + 9
	66  SwiftUI                             0x00007fff559d037e $ss5Error_pIgzo_ytsAA_pIegrzo_TR95$sSo9NSRunLoopC7SwiftUIE11addObserveryyyycFZySo05CFRunbF3RefaSg_So0gB8ActivityVSvSgtcfU_yyXEfU_Tf3npf_n + 14
	67  libswiftObjectiveC.dylib            0x00007fff539aff8e $s10ObjectiveC15autoreleasepool8invokingxxyKXE_tKlF + 46
	68  SwiftUI                             0x00007fff559d5e43 $sSo9NSRunLoopC7SwiftUIE11addObserveryyyycFZySo05CFRunbF3RefaSg_So0gB8ActivityVSvSgtcfU_ + 35
	69  SwiftUI                             0x00007fff559d5f4b $sSo9NSRunLoopC7SwiftUIE11addObserveryyyycFZySo05CFRunbF3RefaSg_So0gB8ActivityVSvSgtcfU_To + 43
	70  CoreFoundation                      0x00007fff203a76b3 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
	71  CoreFoundation                      0x00007fff203a1f3f __CFRunLoopDoObservers + 547
	72  CoreFoundation                      0x00007fff203a24e2 __CFRunLoopRun + 1113
	73  CoreFoundation                      0x00007fff203a1b9e CFRunLoopRunSpecific + 567
	74  GraphicsServices                    0x00007fff2b773db3 GSEventRunModal + 139
	75  UIKitCore                           0x00007fff24660af3 -[UIApplication _run] + 912
	76  UIKitCore                           0x00007fff24665a04 UIApplicationMain + 101
	77  SwiftUI                             0x00007fff56144e27 $s7SwiftUI17KitRendererCommon33_ACC2C5639A7D76F611E170E831FCA491LLys5NeverOyXlXpFAESpySpys4Int8VGSgGXEfU_ + 119
	78  SwiftUI                             0x00007fff56144d9f $s7SwiftUI6runAppys5NeverOxAA0D0RzlF + 143
	79  SwiftUI                             0x00007fff55c93e7d $s7SwiftUI3AppPAAE4mainyyFZ + 61
	80  RealmTaskTracker                    0x000000010e298891 $s16RealmTaskTracker0abC3AppV5$mainyyFZ + 33
	81  RealmTaskTracker                    0x000000010e298914 main + 20
	82  libdyld.dylib                       0x00007fff20257415 start + 1
	83  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
terminating with uncaught exception of type NSException
CoreSimulator 732.17 - Device: iPhone 11 Pro Max (4F2FD450-A4C4-449F-96B3-6E13D1D419EB) - Runtime: iOS 14.0 (18A372) - DeviceType: iPhone 11 Pro Max
*** Terminating app due to uncaught exception 'RLMException', reason: 'Index 7 is out of bounds (must be less than 7).'

May need to wrap more of Realm into ObservableObject for SwiftUI to key off of as shown in Using Realm With SwiftUI

Backend screenshots?

Weird request, but any chance you can put up screenshots of how your schema for task and user looks on the back end? I have been using your app as an example guide as I prefer how yours is written over the official realm example.

Thanks

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.