VideoPlayer(player: player).scaledToFill()
doesn't work either
Post
Replies
Boosts
Views
Activity
also seeing this in Xcode 12.1 (12A7403) with ios 14.1
ok after weeks of getting nowhere on this, I found the cause.
For me this was caused by having multiple .onOpenURL's similar to you. I had one in each view that I wanted to action the url. While it worked most times, this was causing unpredictable results intermittently for my app and gave this error each time.
So I moved the .onOpenURL to the App file then used an environment variable to pass the url to the views I wanted to action it.
something like this:
struct MyApp: App {
@State var deepLink: URL? = nil
var body: some Scene {
WindowGroup {
ContentView()
.environment(\.deepLink, self.deepLink)
.onOpenURL { url in
guard url.scheme == "myApp" else { return }
self.deepLink = url
/* clear the environment variable so you can send the same url twice */
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(200), execute: {
self.deepLink = nil
})
}
}
}
}
remember to setup your environment variables
import SwiftUI
struct deepLinkKey: EnvironmentKey {
static var defaultValue: URL? = nil
}
extension EnvironmentValues {
var deepLink: URL? {
get { self[deepLinkKey.self] }
set { self[deepLinkKey.self] = newValue }
}
}
then in the views u want to use it in
var body: some View {
content()
.onChange(of:deepLink, perform: { url in
guard url?.scheme == "myApp" else { return }
/* parse the url here*/
})
}
btw thanks for mentioning onOpenURL, otherwise I would never have found it.
in 14.2 rc the error is different but reproduced the same way.
to reproduce: open the picker (photos show) then tap on search bar then scroll down slightly and error appears. previously it said "Picker Unavailable", now it says "Unable to load items" with a button that says "try again", after tapping the button the photos appear again until u scroll down again.
Same issue here - any solution?
fixed this issue for me. there was a few old screenshots that were loaded under different sizes that don't show up in the 'App Preview and Screenshots' section. I had to go to 'Media Manager' and go through each of the sizes (they are collapsed by default) so I had to expand them to see the other screenshots. deleted them and was able to submit.
Would be nice if there were more descriptive error messages as it appears everyone is getting the same error message for a multitude of different issues. wasted 2 days on this...
same issue here on iPhone. did you get a resolution to this?
have to keep my Apple Watch turned off. its basically off all the time now. I think ill sell it.
got the same in Xcode 13.2.1 with swiftui
I have 3 nested ForEach's. Had to break them up into separate functions for each nested ForEach level
happens in iOS15.2. still an issue. have to re-login to iCloud and then restart device to get CoreData-CloudKit syncing to resume.
Seems iCloud kicks you out with large sync volumes and then locks up.
its not just images. I have a database that has no images and this happens. it does have a decent amount of records though - 100MB or so says the manage storage section of iCloud in the Settings app. iOS15.4.1
iOS 15.5 still broken
This is absolutely the wrong way to do it - It relies on debug descriptions - but until we find another solution, this will work:
.chartYAxis {
AxisMarks() { value in
AxisGridLine()
AxisTick()
AxisValueLabel {
Text("\(abbreviateAxisValue(string: self.parseAxisValue(value: value) ?? ""))")
}
}
}
func parseAxisValue(value: AxisValue) -> String? {
let input = String(describing: value)
let regex = /\((\d*.0)|\((0)|\((-\d*.0)/
if let match = input.firstMatch(of: regex) {
return "\(match.1 ?? match.2 ?? match.3 ?? "")"
}
return nil
}
func abbreviateAxisValue(string: String) -> String {
let decimal = Decimal(string: string)
if decimal == nil {
return string
} else {
if abs(decimal!) > 1000000000000.0 {
return "\(decimal! / 1000000000000.0)t"
} else if abs(decimal!) > 1000000000.0 {
return "\(decimal! / 1000000000.0)b"
} else if abs(decimal!) > 1000000.0 {
return "\(decimal! / 1000000.0)m"
} else if abs(decimal!) > 1000.0 {
return "\(decimal! / 1000.0)k"
} else {
return "\(decimal!)"
}
}
}
also get this, submitted a report: FB10145913
use this modifier on the view.
.transaction { transaction in
transaction.animation = nil
}
note that its stopped working in ios16b1. not sure if that's a bug or it was intentional.