Post

Replies

Boosts

Views

Activity

Reply to What is the proper way of adding ActivityKit Widget to existing WidgetBundle supporting iOS 15?
Ok, i’m lost with this one. I have a widget bundle and i need to have different widgets for different versions of iOS. Can someone explain to me why the following code works fine, but if I uncomment those 2 lines it starts giving me a Function declares an opaque return type 'some Widget', but the return statements in its body do not have matching underlying types error? @main struct MyWidgetsBundle: WidgetBundle { var body: some Widget { if #available(iOS 17.0, *) { return WidgetBundleBuilder.buildBlock( A(), B(), C(), D() ) } else if #available(iOS 16.1, *) { return WidgetBundleBuilder.buildBlock( // A(), // B(), C(), D1(), D2() ) } else { return WidgetBundleBuilder.buildBlock( C(), D1(), D2() ) } } }
Dec ’23
Reply to UIImagePickerController no longer returns .mediaURL on some iOS 14.2 devices
Thank you for the answer. I am aware of limited photos library, but I was under the impression that to use UIImagePickerController I do not need to get user permission first? I would need permission if I were to build custom picker within the app (and querying all the assets myself), but since UIImagePickerController runs on a separate process, it should return medialURLs to only the assets user has selected. Is this correct? After all I see all the assets in the picker, it's just that urls are missing. It makes sense that fetching PHAsset prompts for permission, but my main concern is that mediaURL stopped working on some iOS 14 devices. All my physical devices work like before (they return medial URL), but simulators and some ipads that my company has no longer work. All devices are running 14.2. EDIT: same user, different accounts :)
Dec ’20