I want to move a widget created with WidgetKit from an app extension to another app extension.
If I do this, what will happen to the widget that users have already placed on their home screens?
Will the widget disappear from their home screens, or will the migration be handled correctly?
Post
Replies
Boosts
Views
Activity
Controls' actions use App Intents in iOS 18.
However, when executing App Intents from Controls, alert dialogs such as IntentDialog can't be used.
This makes it unclear how to display errors when trying to create Controls that do not launch the app.
Is there any way to handle this?
Prior to iOS 16, DisclosureGroup arrow was opaque.
However, in iOS 17, the following code makes the arrow translucent:
DisclosureGroup {
Text("Title")
} label: {
Text("Label")
}
When DisclosureGroup is in List, it is opaque, as in iOS 16:
List {
DisclosureGroup {
Text("Title")
} label: {
Text("Label")
}
}
Is this expected behavior?
And is there a way to change the opacity of arrows without a custom style in iOS 17?
In Xcode 14, Swift Package libraries can be built with the following command:
swift build -v -Xswiftc "-sdk" -Xswiftc "`xcrun --sdk iphonesimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios12.3-simulator"
But in Xcode 15 beta 5, I'm encountering an error:
<unknown>:0: error: unable to load standard library for target 'x86_64-apple-ios12.3-simulator'
The error persists even when I change the OS version (such as to ios17.0) or change the architecture to arm64.
Has there been a change to the behavior of the swift command in Xcode 15 that I should be aware of?
Only one image and one Text will be displayed even if described as follows:
HStack {
Text("1")
Image(systemName: "swift")
Text("2")
Image(systemName: "swift")
}
However, a similar layout is possible by describing it this way:
Text("1 \(Image(systemName: "swift")) 2 \(Image(systemName: "swift"))")
Is this behavior correct?
Environment: Xcode 14 beta 5, iOS 16 beta 6
ScrollViewReader's scrollTo scrolls too much in iOS 15.
I had no problem with iOS 14.
This is the code:
import SwiftUI
struct ContentView: View {
var body: some View {
ScrollViewReader { proxy in
ScrollView {
VStack {
Color.yellow
.frame(height: 800)
ScrollButton(proxy: proxy)
}
}
}
}
}
struct ScrollButton: View {
let proxy: ScrollViewProxy
@Namespace var bottomId
var body: some View {
VStack {
Button("Scroll") {
withAnimation {
proxy.scrollTo(bottomId)
}
}
Color.red
.frame(height: 500)
.id(bottomId)
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
I used canOpenURL like this:
UIApplication.shared.canOpenURL(URL(string: "https://developer.apple.com/")!)
It was true when I set Safari as a default browser.
But I changed it to the other browsers like Chrome and Edge, then it was false.
Adding https & http into LSApplicationQueriesSchemes, it was the result I had hoped for.
Is this a bug or a correct behavior for iOS 14?
(iOS 14 Beta 8)
I had implemented listTemplate(_:didSelect:completionHandler:) of CPListTemplateDelegate protocol.
func listTemplate(_ listTemplate: CPListTemplate, didSelect item: CPListItem, completionHandler: @escaping () -> Void) {
}
But the API was changed on Xcode 12:
func listTemplate(_ listTemplate: CPListTemplate, didSelect item: CPBaseListItem, completionHandler: @escaping () -> Void) {
}
https://developer.apple.com/documentation/carplay/cplisttemplatedelegate/2977578-listtemplate?changes=latest_minor
So I changed the new API and ran my app on iOS 14.
It was successful, but it was crashed below iOS 14.
The error message was the following:
dyld: Symbol not found: _OBJC_CLASS_$_CPBaseListItem
Referenced from: /Users/**/Library/Developer/CoreSimulator/Devices/**/MyApp.app/MyApp
Expected in: /System/Library/Frameworks/CarPlay.framework/CarPlay
listTemplate's availability is iOS 12+, but CPBaseListItem's availability is iOS 14.0+.
https://developer.apple.com/documentation/carplay/cplisttemplatedelegate/2977578-listtemplate?changes=latest_minor
https://developer.apple.com/documentation/carplay/cplistitem
Is it a bug? (Xcode 12 beta 4)