Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
commie kong
Mar 7, 2019

ulmont posted:

Ok, it's 2021, so time for one of my every 5 year attempts to get things set up and develop toy iPhone apps.

...what's the current recommended set of tutorials for 2021 Swift + iPhone development?

I’m enjoying LearnAppMaking.com

The demo projects are useful and it’s not a bunch of videos that you follow along with, but pages of well written instructions and explanations. You can end up copy+pasting code into places, but that’s up to you and the site explains what it does and why very clearly.

Not cheap at all tho: $99 for the developer courses.

There’s also the udemy course by Angela Yu that you can usually get for ten bucks or so. That’s also good, but less focus on coding and more on storyboards, which wasn’t what I was looking for. I haven’t checked recently, but don’t think there’s much SwiftUI in that course.

There’s also a free guide on hackingwithswift.com. That site is good and I end up there often via google searches. Same for raywenderlich.com


e: oh whoops, Apple also have tutorials: https://developer.apple.com/tutorials

e2: hate to post so much, but I want to add that awful.app is on GitHub, there’s lots of ways to contribute to it and you get real feedback from people that use it daily. So playing with that might hold your attention more than creating apps using tutorials. That’s been my experience

commie kong fucked around with this message at 01:07 on Apr 8, 2021

Adbot
ADBOT LOVES YOU

commie kong
Mar 7, 2019

Does anyone know of a way to overcome this Xcode13 error without adjusting the target version? It appears to have been immediately closed as wontfix and I'm stumped.

From googling, it seems to have caught people by surprise.

https://bugs.swift.org/browse/SR-14878 posted:

Enum cases with associated values cannot be marked potentially unavailable with '@available'

Code that uses @available for enum cases that have associated values no longer compiles:

code:
enum Foo {
@available(iOS 13.0, *)
case bar(Int)
case baz
}
This code compiled fine in Xcode12, but doesn't in Xcode 13 (both beta 1 and 2)

commie kong
Mar 7, 2019

duck monster posted:

Have apple given a technical reason for not supporting 2014-2015 MBPs? I've a late 2014/purchased in 2015 MBP and it runs big sur just fine, but it would appear I cant get the new OSX. Which is a problem for an app developer, obviously. And I just dont have the cash to upgrade. Is this something the hacker community might be able to fix like has happened in the past with arbitrary minimum spec releases, or is there genuine hardware requirements here?

I had this question and can pass along the useful response i received!


Binary Badger posted:

commie kong posted:

drat, I have a 2014 that I thought had dropped out of upgrade support. Did you need some tricks to get that working?
I used this:

https://github.com/dortania/OpenCore-Legacy-Patcher

Start here:

https://dortania.github.io/OpenCore-Legacy-Patcher/START.html

Fairly simple and straightforward, just have Mojave or later installed, apply the patcher, reboot, then run the macOS installer that you couldn't before.

I use an earlier version of Open Core on my MacPro 5,1 to give it the ability to use the Radeon 580's GPU for video acceleration (most notably the ability to run Netflix, something that Apple seems to have deliberately gelded from Mojave and the 5,1) and a boot screen with my third party 580.

Haven't tried to install Big Sur on my 5,1 yet, but will relish doing so on a Mac Mini 2012 I picked up at a Goodwill..

commie kong
Mar 7, 2019


commie kong
Mar 7, 2019

Does anyone else follow point-free?

I've been enjoying their videos and the helpers/tools they develop seem very useful and cool. They're all open source on GitHub.

They have probably the best explanatory video and coding presentation style I've seen. They explain issues, the naive solutions (that I find on other sites lol) and their shortcomings. Then they come up with magic to solve them.

Their latest is part of an ongoing series on SwiftUI navigation: https://www.pointfree.co/episodes/ep166-swiftui-navigation-links-part-2#t1623

point-free posted:

So, this is all looking really promising. We have an incredible amount of power in deep linking and testing in our application. When we first started discussing navigation links earlier in this episode we mentioned that they are the most prototypical form of navigation, but also at the same time the most “complicated.”

However, we just introduced a pretty complex navigation link for editing an item, and even showed how we could gate the navigation based on asynchronous effects. This is some of the most complicated navigation you can do in an iOS application, and not only did we accomplish it pretty quickly, but we also got deep linking for free along the way. To contrast with modal sheets and popovers, it took us three very long episodes to develop the techniques that allowed us to model them in state and support deep linking.

Perhaps this form of navigation isn’t so complicated after all?

Well, it definitely is, but it’s come much easier to us thanks to all of the tools we built in previous episodes. The only reason we are able to model our navigation routes as a simple enum and implement a NavigationLink initializer that transforms binding of optionals into bindings of honest values is thanks to all the binding transformation helpers we have defined in past episodes.

So, we’re starting to see that by putting in a little bit of upfront work to try to put structs and enums on the same footing when it comes to binding transformational operators, we unlock powerful tools that help make navigation in SwiftUI a breeze. Just as dynamic member lookup allows us to slice of a binding for a piece of sub-state and hand it off to a child component, the .case transformation allows us to slice off a binding for a particular case of an enum and hand it off to a child component. And when you combine that with navigation tools such as sheets, popovers, and links, you instantly unlock the ability to drive navigation off of state.

The catch is a pricy subscription required to watch more than one video: $18 per month.

My account has a referral code that gives us both a free month. I could post it in coupons or something? Not sure if referrals also get codes.


I was also curious if anyone had opinions on/heard of their Composable Architecture?

https://github.com/pointfreeco/swift-composable-architecture

https://forums.swift.org/c/related-projects/swift-composable-architecture/

commie kong
Mar 7, 2019

All you pros going to be switching to iPads for development now?

Hacking with swift newsletter posted:

Swift Playgrounds 4 is out!

At WWDC21 Apple promised a massive update for Swift Playgrounds 4, and they really lived up to that promise – I’ve been using it extensively to build SwiftUI apps, and it’s a ton of fun.

I wrote a full review of Playgrounds 4 here, but in case you’re short on time here’s the least you need to know:

  • Yes, you can now build SwiftUI apps right on your iPad.
  • Yes, you can use also UIKit if you prefer.
  • Yes, you can ship your apps to the App Store straight from your iPad.
  • Yes, it supports Swift Package Manager packages from GitHub.
    Yes, you get the fantastic new code completion, just like with Xcode.
  • Yes, it ships with Swift 5.5 and all the concurrency awesomeness that entails.

PS: If you'd like a tutorial on how to build your first app with Swift Playgrounds 4, I've got you covered right here.

commie kong
Mar 7, 2019

the point free fellas have released a video showing off some new helpers they've built.

it's relatively short (33 mins :v:) for anyone interested in swiftui, testing, api mocks, etc.

Point-Free posted:

Tour of Parser-Printers: API Clients for Free
We conclude our tour of swift-parsing with a look at how URL routers defined as parser-printers can be automatically transformed into fully-fledged API clients, which we will drop into an iOS application and immediately use.

https://www.pointfree.co/episodes/ep189-tour-of-parser-printers-api-clients-for-free

commie kong
Mar 7, 2019

101 posted:

Am I missing something, or am I giving up on SwiftUI for another few years?

Hey, give this a try:

code:
struct Item {
    var name: String = ""
    var id: UUID = UUID()
}

struct ContentView: View {
    var items: [Item] = [Item(name: "test"), Item(name: "test2")]
    
    var body: some View {
        List {
            ForEach(items, id: \.id) { item in
                VStack(alignment: .leading) {
                    HStack {
                        Text(item.name)
                        Spacer()
                    }
                    .contentShape(Rectangle())
                    .onTapGesture {
                        print("Tapped")
                    }
                }
            }
            .onDelete {
                print("Deleting: \($0)")
            }
        }
    }
}
onTapGesture works correctly (doesn't interfere with onDelete) when applied to the Text view directly, but the hitbox is limited to the size of the text. So wrapping up each list row in a bunch of stacks and a spacer as above sorts that issue.

There may be better solutions, but this demonstrates a workaround at least

Adbot
ADBOT LOVES YOU

commie kong
Mar 7, 2019

Small White Dragon posted:

Is there a name for the thing that lets you run iOS apps on an ARM Mac? I found an issue exclusive to this scenario but it's hard to google for.

How about universal binaries?

https://developer.apple.com/documentation/apple-silicon/building-a-universal-macos-binary

They also use "silicon" while referring to compatible macs, which might help your searches

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply