Post

Replies

Boosts

Views

Activity

App Tracking Transparency is unavailable with Mac Catalyst
App Tracking Transparency - https://developer.apple.com/documentation/apptrackingtransparency is marked as available for Mac Catalyst 14.0 on Apple Documentation. It does not seem to be the case while testing with Xcode 12. When importing framework in project settings, AppTrackingTransparency.framework is flagged "iOS/iPad only". Resulting an expected but unexpected error when importing library in a Swift file: AppTrackingTransparency is not available when building for Mac Catalyst. Consider using #if !targetEnvironment(macCatalyst) to conditionally import this framework when building for iOS. Should I use AppTrackingTransparency through a macOS Bundle and wait macOS 11.0 SDK ?
1
0
1.2k
Sep ’20
ASIdentifierManager.isAdvertisingTrackingEnabled always returns NO in Mac Catalyst
I'm working on an iPad App migrated on Mac using Mac Catalyst. This app uses AdSupport and relies on ASIdentifierManager.isAdvertisingTrackingEnabled to deny tracking (No), or ask user's will (Yes). However, on Catalyst build with Xcode 11.6 and launched on macOS 10.15.5, isAdvertisingTrackingEnabled always returns NO, even if Limit Ad Tracking is unchecked. Does this happen to anyone else ?
0
0
496
Jul ’20
Cannot archive iOS/tvOS app with HEIF images
Hello there :) In Apple documentation about reducing app size - https://developer.apple.com/documentation/xcode/reducing_your_app_s_size/doing_advanced_optimization_to_further_reduce_your_app_s_size , one tip recommends the use of HEIF to reduce assets size. However, while App builds and runs successfully on iOS/tvOS devices and simulators, it seems impossible to archive the app, whatever build system you try to use. We cannot use this optimization in production apps. Is there any workaround or element not stated in the documentation ? To reproduce the issue :Create a new single view app for iOS or tvOS Add a new image set in default assets file Set a HEIF image in this image set Add an ImageView in ViewController linked to this image set Run app in simulator: Should work Run app in iOS device: Should work Archive app with new build system: Failure from Xcode Set project on legacy build system, clean && archive app: Xcode fails again Logs are included, a feedback ticket has been open : ******* HEIF - New build system crash log - https://developer.apple.com/forums/content/attachment/a5b73cca-824b-4342-94f5-a04da466cc7e HEIF - Legacy build system crash log - https://developer.apple.com/forums/content/attachment/25ed956d-59a6-456f-8855-01aa742b4c45
0
0
649
Jun ’20
Unclear behavior for UICollectionView multiple selection
Hi there ! With Mac Catalyst, UICollectionView multiple selection is adapted to follow usual behavior from macOS, by using SHIFT or CMD while clicking on cells. If the most significant part of this behavior is correctly handled, some parts could be unexpected. First, multiple selection in Catalyst invokes a default layout animation not found in classic macOS apps or in iOS multiple selection. This behavior could be removed or at least documented. Second, there is no way to choose between iOS and classic macOS behavior. While classic macOS behavior makes sense in many cases, there's still moments where iOS behavior might be expected, at least until apps are fully compatible with Catalyst. Like the first case, this behavior could be chosen or, at least, documented. Is there other workaround than the following ? I opened a feedback ticket associated : ******** #if targetEnvironment(macCatalyst) 		// ???: (Kévin Dumanoir) 11/06/2020 On Mac Catalyst, multiple selection force use of SHIFT or CMD keys, which is not 		// really intuitive. To override this behavior, we must manually select/deselect cells but keep same conditions on user 		// interaction: (de)select happens when touch lifts the cell in its bounds. This condition is only respected in 		// shouldSelectItemAt method. With didHighlightItemAt, selection happens when touch begins. With didUnhighlightItemAt, 		// selection happens even if touch lifts the cell out its bounds. Hopefully, shouldSelectItemAt is never called when 		// programmatically set, according to Apple documentation. 		func collectionView(_ collectionView: UICollectionView, shouldSelectItemAt indexPath: IndexPath) -> Bool { 				guard 						let selectedCollectionView = collectionView.indexPathsForSelectedItems, 						selectedCollectionView.contains(indexPath) else { 								collectionView.selectItem(at: indexPath, animated: false, scrollPosition: .init()) 								collectionView.delegate?.collectionView?(collectionView, didSelectItemAt: indexPath) 								return false 				} 				collectionView.deselectItem(at: indexPath, animated: false) 				collectionView.delegate?.collectionView?(collectionView, didDeselectItemAt: indexPath) 				return false 		} 		func collectionView(_ collectionView: UICollectionView, shouldDeselectItemAt indexPath: IndexPath) -> Bool { 				collectionView.deselectItem(at: indexPath, animated: false) 				collectionView.delegate?.collectionView?(collectionView, didDeselectItemAt: indexPath) 				return false 		} #endif
0
0
786
Jun ’20