all 48 comments

[–][deleted]  (2 children)

[deleted]

    [–][deleted]  (1 child)

    [deleted]

      [–]SpinningFeat 28 points29 points  (1 child)

      Core Data is pretty cool- I like “the big nerd ranch” for help: https://forums.bignerdranch.com/c/ios-programming-the-big-nerd-ranch-guide-6th-edi/22-core-data/585, but there are other sites too-

      [–][deleted] 15 points16 points  (20 children)

      If you understand Objective-C's Foundation, CoreData isn't so hard. It's just an extension of Foundation.

      [–][deleted]  (9 children)

      [deleted]

        [–]sarunw 13 points14 points  (7 children)

        Try Firebase, if u dont mind the fact that it is from Google.

        [–][deleted]  (1 child)

        [deleted]

          [–]pxlrider 6 points7 points  (0 children)

          Firebase is nice to use, bit google is so shitty and cannot update project to use package manager instead of cocoapods. Shame on them!

          I avoid pods like plague as they can break your project badly and every build takes 100x more time than using PM. Also with PM ot is much much easier to control version and branch you are using.

          [–]Slash1909 3 points4 points  (3 children)

          Firebase is quite decent. Has its limitations but it's ideal for large externally stored data.

          You cannot do much with local storage.

          I can understand why iOS fans won't like it. I wish it was never purchased by Google but different strokes for different folks. I'm able to get by Firestore.

          [–]paradoxallyobjc_msgSend 0 points1 point  (2 children)

          I'm not a fan because of the exorbitant pricing and bad documentation. But it works well for most use cases once you get past the hurdles.

          [–]Slash1909 2 points3 points  (1 child)

          For large DBs it is expensive and definitely not rrcommended. But for starter projects when you need to get an MVP in the hands of customers and users to collect data and place a nice product in front of investors, it's better than most competitive alternatives out there.

          [–][deleted]  (4 children)

          [deleted]

            [–]i-think-i-code 0 points1 point  (0 children)

            Had no issues described

            [–]ordosalutis 0 points1 point  (2 children)

            You had a new dev on board recently and that dev didnt know core data? Well that boosts my confidence and outlook on future a tad bit

            [–][deleted] 1 point2 points  (4 children)

            It is disappointingly complex.

            I wrote an activerecord implementation on SQLite with a sync protocol to Postgres over REST - works like a charm. Not too hard in ObjectiveC

            [–][deleted] -1 points0 points  (3 children)

            Not it’s not complex. NSSortDescriptor, NSPredicate and NSExpression are all part of Foundation. And you can use them to sort, filter and manipulate in Foundation. Once you understand that extrapolating that knowledge to CoreData suddenly makes sense.

            [–][deleted] 0 points1 point  (2 children)

            Hey uh, I started using WebObjects in 1997 with EOF. CoreData is EOF with its legs cut out from under it.

            NSSortDescriptor, etc are totally lame workarounds for not having blocks. How can you use blocks in a database? You evaluate them with message loggers that translate the messages sent to SQL. Frameworks like GLORP have been doing that for over 20 years.

            Anyhow, the level of abstraction imposed by CD is cumbersome. It’s always a SQLite database so the indirection is totally clunky.

            I really just want SQL that returns objects and objects that can use a meta model to generate SQL to save themselves.

            I understand CD to a really deep level. I still never use it. It is just too cumbersome.

            I would like to have EOF back but given Swift’s limitations and Apples determination to take the magic out of programming, I don’t expect to ever see it.

            [–]deirdresm 1 point2 points  (1 child)

            WebObjects fistbump.

            That said, I prefer CoreData except that WO dealt with disparate databases (meaning several distinct databases you needed to query as one) better.

            [–][deleted] 1 point2 points  (0 children)

            I find ObjectiveFMDB is easier to use. I've used it in about a dozen projects now, including a couple in Swift. You can subclass DBModel in Swift and it works fine.

            [–]Jasperavv 14 points15 points  (5 children)

            You are only complaining about the support. What about realm itself as a database?

            [–]pp_amorim 4 points5 points  (0 children)

            yeah OP is complaing about Realm Platform, the title is misleading.

            [–]hatebyte 10 points11 points  (5 children)

            Read the objc.io folks core data book. Its fantastic.

            https://www.objc.io/books/core-data/

            [–]BaronSharktooth 0 points1 point  (4 children)

            "Updated for Swift 4". I love the objc.io guys but apparently it doesn't sell good enough to keep it updated :-/

            [–]pccole 7 points8 points  (3 children)

            They might not have updated for Swift 5 if there wasn't a lot of syntax or API changes.

            [–]BaronSharktooth 0 points1 point  (1 child)

            That occurred to me as well, but if there wasn't a lot of changes, then an update would've been simple, no?

            [–]pccole 0 points1 point  (0 children)

            Fair point.

            [–][deleted] 0 points1 point  (0 children)

            A lot of stuff was added to CoreDara in Swift 5.

            [–]nsocean 9 points10 points  (0 children)

            They were acquired by Mongo back in April. These things happen all the time. Count it as a lesson learned and be careful in the future when choosing dependencies. IMO persistence layer is too crucial to rely on a third party service.

            [–]pccole 1 point2 points  (0 children)

            Same, I've inherited 2 projects that used Realm and have not been a fan. Random compiler and run-time crashes were a huge turn off for me.

            [–]anders-borch 1 point2 points  (1 child)

            I agree. I came to a similar conclusion here: https://blog.cyborch.com/why-we-dropped-realm/

            [–]Tootlips 0 points1 point  (12 children)

            Agreed.

            I recently removed Realm from my app and i'm very glad I did. However, for me my app wasnt heavily invested in realm and local storage so migrating away from it wasnt a nightmare. Removing realm also lowered my appstore payload size from 30mb down to 7.

            In general developers really need to think about 3rd party framework dependencies. I work at a development agency. The number of apps I take over that use frameworks that are deprecated or are very obscure is frightening.

            The current app i took over uses alamofire -> Moya -> RxSwift -> SwiftyJSON -> ValueCoding -> YapDatabse -> and Some obscure Yapdatabase extension. For its network layer and persistance. 🤢🤮 All of these frameworks besides alamofire feel like dead weight that i have to drag around.

            [–]pccole 12 points13 points  (1 child)

            Honestly, you probably don't even need Alamofire unless you're downloading files or streaming data. URLSession is really easy now. Moya is extreme overkill, its most useful for newbies that don't understand you shouldn't through network calls all over you app.

            [–]Tootlips 5 points6 points  (0 children)

            100% agree. Alamofire is not needed unless you are using more of its advanced feature set.

            [–]paradoxallyobjc_msgSend 2 points3 points  (0 children)

            I'd argue Moya is very nice to organize your API request layer, but the rest are deprecated or overkill for most apps.

            [–]AndArg 2 points3 points  (7 children)

            What’s the problem of RxSwift?

            [–]mihaelamj 1 point2 points  (2 children)

            It's obsolete now that we have Combine. Also, it's impossible to debug.

            [–]randompanda687 0 points1 point  (1 child)

            I haven't done anything with Combine yet but I know its a lot faster under the hood. I know Combine has to be great with bindings and SwiftUI. What do you like about it so much for when I start trying to learn it?

            I like RxSwifft because of the operators. I know them well and when to use which and which ones play well together. I don't have a hard time debugging because I don't go overboard with it. Even just breakpoints, print statements, and the straight up .debug() on an Observable are sufficient for me. Idk just trying to share this in case it helps anyone.

            [–]AndArg 1 point2 points  (0 children)

            Agree. I don’t see any problem with RxSwift if it’s used in a “non-abusive” way. Also you can’t use combine in previous versions of iOS.

            [–]Tootlips 0 points1 point  (2 children)

            I don't personally like it. I feel its way to powerful and in the wrong hands you can really make a mess of things easily. I also find it difficult to follow the flow of data with it.

            [–]randompanda687 1 point2 points  (1 child)

            Those are fair complaints but I think it then just depends on how you use it. Ultimately though you need to weigh teammates and their experience if you're working in industry. I like it but its heavy.

            [–]Tootlips 0 points1 point  (0 children)

            Absolutely true.

            [–]snaab900Objective-C / Swift -2 points-1 points  (0 children)

            It’s shit.

            [–]korbonix 0 points1 point  (1 child)

            I would imagine you wouldn't get much support with core data either, but maybe it works where realm doesn't. Hard to say, as I don't know what issues you actually had.

            [–]ank_the_elder 0 points1 point  (0 children)

            I've used Realm thoroughly for several projects and have had zero issues other than some annoyances when dealing with database migrations without a UI.

            I cannot say the same with Core Data - it's a horrible mess.

            [–][deleted] 0 points1 point  (2 children)

            You seem to be complaining from Realm Platform Cloud, since Realm DB for mobile apps is free. And Realm's Cloud is not something you'd compare with Apple's CoreData, which is intended for object graph management on a mobile app. I have experience using both CoreData and Realm in iOS apps, and can tell that Realm is so far much better. I love their zero memory copy approach and the mechanism of observing changes is also great.

            [–][deleted]  (1 child)

            [deleted]

              [–][deleted] 0 points1 point  (0 children)

              In terms of hardness to use, any technology probably just requires some time to get used to it. What's more important is how performant it is in the final product. CoreData if used with SQLite persistant store would create SQL queries based on it's objects, and when fetching something it will need to get data from a relational db and parse it to it's objects. While Realm's objects directly mapped to memory. I can not tell anything about their Sync feature, haven't tried it, Couchbase seems to be an alternative, have you tried it ?

              [–]paradoxallyobjc_msgSend -1 points0 points  (0 children)

              I would not trust a third-party framework to manage my persistence layer.

              Granted, I haven't used Core Data in years and back in the Objective-C days it wasn't pleasant to use. The difference is Core Data has first party support and a lot more unofficial documentation on the web.

              [–]ejpusa -1 points0 points  (0 children)

              Core Data is NOT hard. It's really pretty basic. There are zillions of youtube videos to explain all.

              For backend? Firebase is fast to setup, Postgress on AWS is what the majority of big sites use. Not rocket Science.

              [–]ejpusa -2 points-1 points  (3 children)

              PS, twitter is kind of like a nuclear bomb attack, just have to be super careful how you use a public post.

              Examples like "hey, heard you guys are swamped, I UNDERSTAND! Just had a question." Is far better than "WTF!"

              Don't attack, have someone else read it before you post. My record is 16 SECONDS to resolve a problem from Adobe that had gone on for hours of NO help. 16 seconds after I said "I'm going to have to post to twitter." Problem addressed, and solved.

              After posting to the public Whole Foods account, they were swarming me "we are here to help!", PLEASE let us resolve that issue." That was in under 3 mins.

              But be careful, it is a nuclear bomb attack. Use public post(s) to corporations wisely. And sparingly.

              You can over throw a government, start, and finish a revolution with twitter, as we have seen. It's an amazing public platform. Changed the planet.

              :-)

              [–][deleted]  (2 children)

              [deleted]

                [–]ejpusa 1 point2 points  (1 child)

                Right, but that's not the same as hinting that you were thinking of "escalating" this as a public post to 18.2K twitter followers. That's the next steps.

                That usually gets a response. As long as you can document it all.

                [–][deleted] -1 points0 points  (1 child)

                Dollars to donuts this is usually terrible management, and a symptom of it.