Post

Replies

Boosts

Views

Activity

No UIImage(resource:) equivalent for SpriteKit
I love the new UIImage(resource:) initializer that uses the automatically generated symbols for my image assets. However, there does not appear to be an equivalent in SpriteKit so I am forced to still use SKSpriteNode(imageNamed:) I am using Xcode 15 Beta 7. Will this be included when Xcode 15 goes into production?
1
0
814
Sep ’23
UICollectionViewCompositionalLayout + paging + rotation == not handled correctly
Am trying to get away from using UIPageViewController for a number of reasons, not the least of which is several perennial crashes that happen occasionally that I've never been able to reproduce myself but happen enough in the wild to be noticeable. I have high hopes for the new UICollectionViewCompositionalLayout in iOS 13 SDK; have worked around the safeArea issue. However, I cannot find a way to workaround or fix the problem that occurs when I rotate the device. Before rotation things are great, paging works, etc. Then when I do rotate the device the collectionView is scrolled such that I see half of two separate cells. Basically the current cell is not handled correctly. Any ideas or suggestions? Below is my layout for reference. Its as basic as one can get.     private func createLayout() -> UICollectionViewLayout {         let itemSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1.0), heightDimension: .fractionalHeight(1.0))         let item = NSCollectionLayoutItem(layoutSize: itemSize)         let groupSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1.0), heightDimension: .fractionalHeight(1.0))         let group = NSCollectionLayoutGroup.vertical(layoutSize: groupSize, subitems: [item])         let section = NSCollectionLayoutSection(group: group)         section.orthogonalScrollingBehavior = .groupPaging         let layout = UICollectionViewCompositionalLayout(section: section)         return layout     } }
Topic: UI Frameworks SubTopic: UIKit Tags:
2
0
1.1k
Sep ’21
UIButton image not honoring dynamic type changes
I am unable to get a UIButton's image to size as I change the font size. I can get the text in the label to work correctly using the adjustsFontForContentSizeCategory property on the button's label, but there appears to be now equivalent for the image. If I restart the app after making the font size change, the button does indeed scale the image correctly so I know I have the preferred configuration setup correctly. I figured I could work around the issue using traitCollectionDidChange and comparing the preferredContentSizeCategory, but I am still unable to get the button to resize itself no matter what I attempt to tweak. Anybody else running into this issue? Any workarounds?
Topic: UI Frameworks SubTopic: UIKit Tags:
2
1
1.7k
Dec ’20
CLLocationButton does not show pressed states
I am starting to use CLLocationButton in my apps, but can see an issue with its behavior. When the user taps on a UIButton it is visually noticeable that it's being tapped. Color/Alpha change, image adjusts, etc... When the user taps on a CLLocationButton there is no queues as to it being pressed. I've had several test users complain already that they think the button is not working given that the action might not result in an immediately change to the UI. Apple FB: FB10019792 Open Radar: https://openradar.appspot.com/FB10019792
2
0
1.1k
May ’22
What role/permissions/privileges needed to get emails regarding app review submissions
Am tired of asking my boss to forward me the emails they get from Apple with the subject "The uploaded build for XXXX has one or more issues." I am trying to debug issues such as ITMS-91053: Missing API declaration as we deal with our 3rd party package usage. What permissions, privileges do I need to get those emails?
2
0
786
Apr ’24
What happened to readable margins?
Am in the process of migrating some UIKit based apps over to SwiftUI, but for the life of me I cannot find the SwiftUI equivalent of Readable Content Margins. I have come across some workarounds that kind of, sort of work, but do not produce the same results when compared to running the same user interface written using UIKit on several sizes of iPads in portrait and landscape orientiations. is it something Apple has not gotten around to yet, because I realize SwiftUI is a work-in-progress, or do we not care about creating consistent readable margins in our apps anymore?
2
0
296
Mar ’25
WeatherQueries with start/end dates not returning forecast for those dates
try await WeatherService.shared.weather(for: sf, including: .daily(startDate: start, endDate: end)) If the start date is in the past I get an empty forecast. If start date is in the future I just get the current day's forecast. I tried with .hourly as well; got the same problem as I always get hourly data for the current day.
3
3
1.6k
Sep ’22
DiffableDataSource failing to reconfigure cell
I keep getting random crashes, when attempting to reconfigure an existing item. I check immediately for that if the item identifier exists in the data source and do not attempt to configure it if it's not. This is there error message: "Attempted to reconfigure item identifier that does not exist in the snapshot: ..." Fatal Exception: NSInternalInconsistencyException 0 CoreFoundation 0x9cb4 __exceptionPreprocess 1 libobjc.A.dylib 0x183d0 objc_exception_throw 2 Foundation 0x4e154c _userInfoForFileAndLine 3 UIKitCore 0xa44a8 -[__UIDiffableDataSourceSnapshot _validateReloadUpdateThrowingIfNeeded:] 4 UIKitCore 0xa2ed8 -[__UIDiffableDataSourceSnapshot _commitUpdateAtomic:] 5 UIKitCore 0x561048 -[__UIDiffableDataSourceSnapshot reconfigureItemsWithIdentifiers:] 6 libswiftUIKit.dylib 0x35d0c NSDiffableDataSourceSnapshot.deleteItems(_:) 7 Trulia 0x45380c closure #1 in ActivityFeedV3ViewController.updateUI(for:) 8 Trulia 0x4c4f58 thunk for @escaping @callee_guaranteed () -> () (<compiler-generated>)
3
0
1.7k
Sep ’23
Will FlatBuffers API be made available?
In the WWDC 2024 session, "Bring context to today's weather", it was mentioned that the Swift API now uses FlatBuffers when downloading the weather data to the client device. Will Apple's API for FlatBuffers be made available to developers? If its already in the SDK (client side) it would seem a shame to have to include another framework that does the same thing.
3
0
663
Jun ’24
NSPersistentCloudKitContainer: How to know initial sync between CloudKit has happened?
I am looking into using the new NSPersistentCloudKitContainer to sync some internal data for my app. Generally it works great, but I have one scenario that I cannot figure out.Here the basic scenario, there is a single record in CloudKit that created and used to keep track of some internal state. Keeping it the cloud allows for two cases: when the user open the app on another device (say an iPad) and when the user re-installs the app on the same device.If its indeed the very first time the user is using the app on any device, I need to create the record with a bunch of default initial values. I am okay with spending a little time at app startup determining if its a brand new user or an existing user installing on another device.I thought maybe observing NSPersistentStoreRemoteChangeNotification would provide a useful point in time that I can say "ah ha, now I know its a new user, or an existing user". However its gets called a lot and I cannot find anything in its userInfo that gives me a definitive answer to my question.Any suggestions?joey
4
0
3.8k
Dec ’20
ShareLink + Preview equals crash
I am trying to use the new ShareLink component in an app I am moving to SwiftUI. If I use the init(items: Data, subject: Text?, message: Text?) variant of the initializer all works well. However if I try to include a preview using the initializer that takes an additional parameter that is a SharePreview instance I get a crash. The crash complains about Fatal error: SWIFT TASK CONTINUATION MISUSE: data(contentType:) tried to resume its continuation more than once, throwing exportFailed! thread #2, queue = 'com.apple.root.user-initiated-qos.cooperative', stop reason = Fatal error: SWIFT TASK CONTINUATION MISUSE: data(contentType:) tried to resume its continuation more than once, throwing exportFailed! The creation of the SharePreview object itself succeeds with nothing. Its the initialization of the ShareLink object that goes boom. Any ideas? Known issue? Wait for next beta? Environment: Xcode 14 beta 2, iOS 16 beta 2, iPhone 8
4
0
2k
Aug ’22
How to find usages of Reason Required API?
We are getting warnings from Apple, ITMS-91053 Missing API declaration, for categories Disk Space, Timestamp, and more. But we've checked our source code to make sure we are not making any of the entry points at issue. We suspect they are being called from one of the 3rd party frameworks we use, some of them are binary xcframeworks. Is Apple planning on extending their warnings to provide more information about where the usages are? Are we left to find it ourselves? Do we need to resort to adding those reasons to our app's manifest? Which seems hacking since we probably don't know when of the allowed reasons are accurate.
4
0
2.0k
Mar ’24