|
I agree with your coworker, even if it looks like it works now I wouldn't assume it holds up. Unfortunately I don't know of another way. I'm not sure what exactly is preventing you from adding the UIHostingController as a child. Could you change your method to return a UIViewController and wrap other returned views in one? Or return an enum with distinct view and view controller cases?
|
# ? Nov 1, 2022 17:19 |
|
|
# ? Jun 3, 2024 22:24 |
|
pokeyman posted:Congrats! Cheers. I'm stuck between lolling and nerves myself. former glory posted:I'm such a declarative UI convert after learning SwiftUI that this sounds like a nice scenario, congrats and good luck with the change. In my experience so far, once you get the UI to do what you need in 100% swift, it's rock solid and has far fewer unexpected cases. But it can be a bit of a fight at first. Thanks. I'm hoping I'm the same, since it's clearly the way iOS development is going. The app is built using a Redux/TCA type system, which I really like using when I've tooled around with it. It seems like the system that makes the most sense to my brain with declarative stuff. It's also (embarrassingly) the first company I'll have worked for that cares about test coverage, and it actually looks like they'll actually be enjoyable to write with this approach. Always happy to have more tools in my belt.
|
# ? Nov 1, 2022 17:58 |
|
uncle blog posted:My coworker thinks this implementation is bad since view lifecycle management is handled differently in both UIKit and SwiftUI, and without adding the hosting VC to the parent VC (which I have no access to at this location), we might end up experiencing weird layout or performance issues. So I wonder if there's a better way to pass a SwiftUI view as a UIView (without having access to the VC)? It's not really a good idea to pluck a view from a view controller and then throw away the controller. If everything seems to work fine, maybe you can get away with it, but there's a reasonable chance that it'll break in the future as implementation details change in the OS or when you happen to change something in the SwiftUI view that depends on the underlying view controller hierarchy. There must be a reason that UIKit only gets a hosting controller and not a hosting view like we get with AppKit because it's an annoying limitation that makes it harder to incrementally migrate to SwiftUI, so I can't imagine Apple would leave it out without a good reason. In any case, if you want to avoid future bugs, I would recommend embedding the hosting controller into the hierarchy.
|
# ? Nov 2, 2022 04:55 |
|
Thanks for the clarifications/tips. Ended up redoing the view in UIKit. Was a small and easy view, but I was a bit excited to contribute my first piece of SwiftUI.
|
# ? Nov 2, 2022 11:23 |
|
uncle blog posted:Thanks for the clarifications/tips. Ended up redoing the view in UIKit. Was a small and easy view, but I was a bit excited to contribute my first piece of SwiftUI. There is some new api in iOS 16 (I think) that makes it easy to vend SwiftUI views as collection/table view cells, which is way nicer than trying to wedge a view controller in every cell. So maybe you'll have more opportunities soon!
|
# ? Nov 2, 2022 18:47 |
|
if i have a UICollectionView using UICollectionViewCompositionalLayout is it possible to place a header vertically above some horizontally scrolling cells? i want code:
code:
|
# ? Nov 3, 2022 02:18 |
|
figured this out right after hitting post by setting UICollectionViewCompositionalLayoutConfiguration.scrollDirection to vertical and NSCollectionLayoutSection.orthogonalScrollingBehavior to continuous spacing is wacky so if anyone has experience there I'd appreciate it. if not back to digging tomorrow.
|
# ? Nov 3, 2022 02:26 |
|
If you get really stuck, could put the header in its own section?
|
# ? Nov 3, 2022 04:57 |
|
I need some GPU features that don't work on A8 (or earlier) chips. Not that I expect there are a ton of these still floating around in active use, but is there a way to specify that in Info.plist rather than just "Hey, this won't work if you have these models" in the App Store description?
|
# ? Nov 7, 2022 07:30 |
|
Small White Dragon posted:I need some GPU features that don't work on A8 (or earlier) chips. Not that I expect there are a ton of these still floating around in active use, but is there a way to specify that in Info.plist rather than just "Hey, this won't work if you have these models" in the App Store description? A look at the Wikipedia page seems to suggest no devices on iOS 16 run A8s, so you could specify a minimum that way?
|
# ? Nov 7, 2022 10:50 |
|
Small White Dragon posted:I need some GPU features that don't work on A8 (or earlier) chips. Not that I expect there are a ton of these still floating around in active use, but is there a way to specify that in Info.plist rather than just "Hey, this won't work if you have these models" in the App Store description? All the device feature options are here: https://developer.apple.com/library...lityMatrix.html It looks like arkit would approximate what you want...
|
# ? Nov 7, 2022 12:57 |
|
101 posted:A look at the Wikipedia page seems to suggest no devices on iOS 16 run A8s, so you could specify a minimum that way? Hm, I have an A8 AppleTV which runs tvOS 16
|
# ? Nov 8, 2022 10:39 |
|
Maybe stating the obvious here but I think the best way to handle that situation would be to implement a CPU fallback.
|
# ? Nov 8, 2022 22:01 |
|
go play outside Skyler posted:Maybe stating the obvious here but I think the best way to handle that situation would be to implement a CPU fallback. I appreciate the suggestion --- it's a nice idea; we had briefly looked into it but it seems like it'd be a huge investment for... probably very little return.
|
# ? Nov 9, 2022 08:45 |
|
I don't know if I was clear earlier lol but does this work for you?code:
|
# ? Nov 9, 2022 08:56 |
|
I somehow missed that Strings support Markdown now, and I'm in love
|
# ? Nov 9, 2022 17:43 |
|
Has anyone else started seeing incredibly long load times in UIKit based apps post iOS 16/XCode 14? All of a sudden our app is taking ~60 seconds to load if it doesn't just crash first. The error message we're getting is "UINavigationBar decoded as unlocked for UINavigationController, or navigationBar delegate set up incorrectly. Inconsistent configuration may cause problems." There's an Apple thread for the error message with no reliable solutions: https://developer.apple.com/forums/thread/714278
|
# ? Nov 10, 2022 18:27 |
|
I've seen that console message but didn't associate it with prolonged launch times. I'll try to keep an eye out!
|
# ? Nov 11, 2022 01:37 |
|
Are there any well-known examples of iOS apps that to a large extent use a lot of webviews? Both successful or unsuccessful examples are most welcome!
|
# ? Nov 18, 2022 13:52 |
|
uncle blog posted:Are there any well-known examples of iOS apps that to a large extent use a lot of webviews? Both successful or unsuccessful examples are most welcome! old netflix app was all webview. i can't think of any others.
|
# ? Nov 18, 2022 14:50 |
|
I worked on a few moderately popular apps that used webviews for many non-core flows (for example, email notification settings, limited-time promotions, features or services provided by a third party) where it wasn't considered worth the effort to build and maintain iOS and Android native experiences. the average user wouldn't see many, but in total there were a substantial number
|
# ? Nov 18, 2022 17:15 |
|
Is there an easy way to tell if an xcframework relies on/uses HealthKit? We rely on a 3rd party to give us a binary SDK. They have a version that uses HealthKit and one that does not. They say they've provided us the version without HealthKit, but Apple is rejecting our application because we use HealthKit or CareKit, according to their analysis. I'm sure we (or the folks providing that SDK) are doing something that's causing HealthKit to be referenced, but I'm not sure how to test for it or validate the build beyond sending it to Apple and crossing my fingers.
|
# ? Nov 21, 2022 19:23 |
|
otool -L Foo.framework/Foo will list the libraries that a framework depends on.
|
# ? Nov 21, 2022 20:29 |
|
Plorkyeran posted:otool -L Foo.framework/Foo will list the libraries that a framework depends on. Thanks!
|
# ? Nov 22, 2022 04:10 |
|
https://developer.apple.com/documentation/swift/set Why do Swift Sets have a first but not a last? Neither or both make more sense
|
# ? Nov 29, 2022 20:44 |
|
I don't have an answer, though I suspect part of the puzzle is conformance to Collection.
|
# ? Nov 30, 2022 03:48 |
|
If anyone is wondering why their apps are now crashing on iOS 16.1, it's because they changed the behavior of how memory is freed. Now it zeroes out everything. This means that bad uses of withUnsafe or the ampersand which used to go undetected, can now cause weird crashes. Just thought it might save someone some time.
|
# ? Nov 30, 2022 06:32 |
|
I'm an idiot novice with Swift development and my little side project has already run into yak shaving hell. I'm writing a small command-line utility in Swift with Xcode and I want to use the ArgumentParser package. Is it possible to get Xcode to statically link a Swift package into a command-line tool project? The way it sets everything up is dynamic linking but that means if I want to run the tool outside Xcode it won't work without me putting the framework in one of the system locations. I'm not planning on distributing this anywhere but I wanted to at least build a single executable so I could send it around if I wanted. Is there a way to do this or should I just do what it wants and move the framework into a search location? In Java I'd just shade the library into the jar...
|
# ? Dec 3, 2022 23:33 |
|
carry on then posted:I'm an idiot novice with Swift development and my little side project has already run into yak shaving hell. I'm writing a small command-line utility in Swift with Xcode and I want to use the ArgumentParser package. Is it possible to get Xcode to statically link a Swift package into a command-line tool project? The way it sets everything up is dynamic linking but that means if I want to run the tool outside Xcode it won't work without me putting the framework in one of the system locations. I'm not planning on distributing this anywhere but I wanted to at least build a single executable so I could send it around if I wanted. I don't know a direct way. I wonder if you could define a static library target that depends on ArgumentParser, then have your executable depend on that intermediary library? May need to stick an Swift code:
|
# ? Dec 3, 2022 23:40 |
|
carry on then posted:I'm an idiot novice with Swift development and my little side project has already run into yak shaving hell. I'm writing a small command-line utility in Swift with Xcode and I want to use the ArgumentParser package. Is it possible to get Xcode to statically link a Swift package into a command-line tool project? The way it sets everything up is dynamic linking but that means if I want to run the tool outside Xcode it won't work without me putting the framework in one of the system locations. I'm not planning on distributing this anywhere but I wanted to at least build a single executable so I could send it around if I wanted. I read this thread to learn about Swift so I don’t know about static linking there, but you could avoid the need for putting the libraries in the system by having a wrapper script for it that sets the library path and executes the application. Package the 3 together in a folder and I assume it would be relatively portable. Then again, C++ dev here so ¯\_(ツ)_/¯
|
# ? Dec 3, 2022 23:49 |
|
I wound up restarting, using swiftpm instead of Xcode to create the project and specify the dependencies in the Package.swift file, and that builds everything into the executable by default (or at least seems to, haven't tried running it on a system other than the one I built it on). I wonder why Xcode is completely capable of using Package.swift but instead stores everything in the xcodeproj if you use it to create the project, but I use Eclipse in my day job so I know better than to be surprised when an IDE sucks rear end. Thanks for your answers though. carry on then fucked around with this message at 00:26 on Dec 4, 2022 |
# ? Dec 4, 2022 00:24 |
|
where do you get dsyms now? they're not on appstoreconnect and the archiver's download dsym button errors out(because i'm assuming it's trying to download from appstoreconnect.)
|
# ? Dec 12, 2022 19:37 |
|
You should just be generating them yourself when you make a build. The bitcode generation thing is phased out now, so downloading dsyms after the fact isn't necessary b/c Apple isn't dynamically recompiling your builds anymore.
|
# ? Dec 12, 2022 20:53 |
|
Apple never implemented a way to charge for major upgrades to iOS apps, did they?
|
# ? Dec 23, 2022 10:37 |
|
Nope, you still have to just release an entirely new app.
|
# ? Dec 23, 2022 18:24 |
|
or put any new “pro” features behind an in-app purchase
|
# ? Dec 25, 2022 04:11 |
|
If I want an upcycled Mac to compile for OSX on do I just buy the cheapest one I can find or is there a cutoff year for being able to compile something modern Macs can run? I won't be programming on it, just need Apple silicon for compilation.
|
# ? Dec 30, 2022 02:09 |
|
Cup Runneth Over posted:If I want an upcycled Mac to compile for OSX on do I just buy the cheapest one I can find or is there a cutoff year for being able to compile something modern Macs can run? I won't be programming on it, just need Apple silicon for compilation. Any Apple Silicon Mac will work, the oldest is only a couple years old.
|
# ? Dec 30, 2022 02:39 |
|
Those mac minis are at a pretty good sweet spot between cheap (Well, apple cheap) , modern and performant
|
# ? Dec 30, 2022 08:51 |
|
|
# ? Jun 3, 2024 22:24 |
|
Cup Runneth Over posted:If I want an upcycled Mac to compile for OSX on do I just buy the cheapest one I can find or is there a cutoff year for being able to compile something modern Macs can run? I won't be programming on it, just need Apple silicon for compilation. You’ll also be testing and debugging and profiling on it though, won’t you?
|
# ? Dec 31, 2022 02:54 |