Post

Replies

Boosts

Views

Activity

How to test ManagedAppConfigurationProvider without MDM
How to test ManagedAppConfigurationProvider without MDM ? Task { /* Configuration provider task */ for await configuration in configurationProvider.configurations(MyAppConfiguration.self) { self.configuration = configuration ?? MyAppConfiguration.defaultConfiguration } } Can the existence of a configuration be simulated, e.g. by storing a mocked configuration in UserDefaults? The UserDefaults key "com.apple.configuration.managed" seems not relevant here.
0
1
93
Jun ’25
XcodeBuildToolPlugin not available in XcodeProjectPlugin
For WWDC22 session "Meet Swift Package plugins " the following code snipped is shared in Apple's Developer application: In Xcode 14 Beta 1 I receive the compilation error Cannot find type 'XcodeBuildToolPlugin' in scope Is the given example valid and is a struct/type missing in the new library module XcodeProjectPlugin ? Or needs the example code to be adjusted (further then I bug I mentioned below in the comments)? import PackagePlugin @main struct MyPlugin: BuildToolPlugin {? /// This entry point is called when operating on a Swift package. func createBuildCommands(context: PluginContext, target: Target) throws -> [Command] debugPrint(context) // BUG: needs to return an array !!!!!!!!!!!!!!!!!!!!!! } } #if canImport(XcodeProjectPlugin) import XcodeProjectPlugin extension MyPlugin: XcodeBuildToolPlugin { /// This entry point is called when operating on an Xcode project. func createBuildCommands(context: XcodePluginContext, target: XcodeTarget) throws -> [Command] debugPrint(context) return [] } } #endif
2
0
2.3k
Jul ’22
Where are the predefined SwiftUI code snippets stored in Xcode?
Hi, in the Xcode library (⇧⌘L) I am unable to find the predefined SwiftUI code snippets which I can choose via autocompletion in the editor. One example is the {} View snippet which is available via autocompletion but cannot be found in the library. Where are those code snippets stored in Xcode (package contents) ? I'd like to get an overview how many and which code snippets are provided for SwiftUI.
0
0
496
Jun ’22
Xcodebuild error Swift Package with -derivedDataPath
Hi, building swift package - https://github.com/SAP/cloud-sdk-ios-fiori with Xcode 12.1 and the following command xcodebuild -enableCodeCoverage YES -derivedDataPath Build/ -scheme FioriSwiftUI-Package -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=14.1,name=iPhone 11' clean build test results in the following error: Error: Mismatch between existing container extension: <DVTExtension 0x7fd732e56260: Swift User Managed Package Folder (Xcode.IDEFoundation.Container.SwiftPackageUserManagedFolder) from com.apple.dt.IDE.IDESwiftPackageSupport> and requested container extension: <DVTExtension 0x7fd732e56750: Swift Package Proxy (Xcode.IDEFoundation.Container.SwiftPackageProxy) from com.apple.dt.IDE.IDESwiftPackageSupport> for file path: <DVTFilePath:0x7fd738728c30:'/Users/d041771/git/cloud-sdk-ios-fiori/Build/SourcePackages/checkouts/observable-array'> Why? How is it possible to build with -derivedDataPath without requiring a xcodeproj file? Note Building without -derivedDataPath works Building with -derivedDataPath and specifying -project works but is not an option for us as the package shall embed localized resources (swift-tools-version 5.3) in the future and building with xcoceproj will not work then - https://developer.apple.com/forums/thread/650278
1
0
3.9k
Jun ’22
SwiftUI: Markdown support for string variables
Text in iOS 15 Beta 1 (Xcode 13 Beta 1) only handles markdown when string literal was passed to initializer. struct MarkdownTest: View {   var text: String = "**Hello** *World*"   var body: some View {     VStack {       Text("**Hello** *World*") // will be rendered with markdown formatting       Text(text) // will NOT be rendered according to markdown     }   } } struct MarkdownTestPreviews: PreviewProvider {   static var previews: some View {     MarkdownTest()   } } Is this a known bug or do I have to create an entry in Feedback Assistant?
4
0
11k
Dec ’21
SwiftUI: which Markdown specification is supported?
Hi, thanks for adding markdown support in SwiftUI's Text with Xcode 13 and iOS 15! :) Even formatting like strikethrough works! Text("Hello ~~World~~") So which specification is supported?? This goes apparently beyond Commonmark (as strikethrough is not part of Commonmark specification). Is it GitHub Flavored Markdown or even a different spec?
4
0
10k
Dec ’21
How to test ManagedAppConfigurationProvider without MDM
How to test ManagedAppConfigurationProvider without MDM ? Task { /* Configuration provider task */ for await configuration in configurationProvider.configurations(MyAppConfiguration.self) { self.configuration = configuration ?? MyAppConfiguration.defaultConfiguration } } Can the existence of a configuration be simulated, e.g. by storing a mocked configuration in UserDefaults? The UserDefaults key "com.apple.configuration.managed" seems not relevant here.
Replies
0
Boosts
1
Views
93
Activity
Jun ’25
Change Xcode Preview from "Live" to "Selectable" permanently?
Preview layouts in Xcode 14 render the layout in live mode by default. Can this default be changed to "Selectable" permanently? E.g. through an Xcode plist entry? I know there is a manual option to switch to the Selectable option exists in the bottom left.
Replies
2
Boosts
1
Views
1.6k
Activity
May ’23
XcodeBuildToolPlugin not available in XcodeProjectPlugin
For WWDC22 session "Meet Swift Package plugins " the following code snipped is shared in Apple's Developer application: In Xcode 14 Beta 1 I receive the compilation error Cannot find type 'XcodeBuildToolPlugin' in scope Is the given example valid and is a struct/type missing in the new library module XcodeProjectPlugin ? Or needs the example code to be adjusted (further then I bug I mentioned below in the comments)? import PackagePlugin @main struct MyPlugin: BuildToolPlugin {? /// This entry point is called when operating on a Swift package. func createBuildCommands(context: PluginContext, target: Target) throws -> [Command] debugPrint(context) // BUG: needs to return an array !!!!!!!!!!!!!!!!!!!!!! } } #if canImport(XcodeProjectPlugin) import XcodeProjectPlugin extension MyPlugin: XcodeBuildToolPlugin { /// This entry point is called when operating on an Xcode project. func createBuildCommands(context: XcodePluginContext, target: XcodeTarget) throws -> [Command] debugPrint(context) return [] } } #endif
Replies
2
Boosts
0
Views
2.3k
Activity
Jul ’22
Where are the predefined SwiftUI code snippets stored in Xcode?
Hi, in the Xcode library (⇧⌘L) I am unable to find the predefined SwiftUI code snippets which I can choose via autocompletion in the editor. One example is the {} View snippet which is available via autocompletion but cannot be found in the library. Where are those code snippets stored in Xcode (package contents) ? I'd like to get an overview how many and which code snippets are provided for SwiftUI.
Replies
0
Boosts
0
Views
496
Activity
Jun ’22
Key Binding in Xcode to trigger command plugin?
Command Plugin(s), if available, can be triggered from "File" menu. Is it possible to define a key binding in Xcode to trigger a command plugin more conveniently? Same is possible for Xcode Extensions today.
Replies
1
Boosts
0
Views
1.7k
Activity
Jun ’22
Xcodebuild error Swift Package with -derivedDataPath
Hi, building swift package - https://github.com/SAP/cloud-sdk-ios-fiori with Xcode 12.1 and the following command xcodebuild -enableCodeCoverage YES -derivedDataPath Build/ -scheme FioriSwiftUI-Package -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=14.1,name=iPhone 11' clean build test results in the following error: Error: Mismatch between existing container extension: <DVTExtension 0x7fd732e56260: Swift User Managed Package Folder (Xcode.IDEFoundation.Container.SwiftPackageUserManagedFolder) from com.apple.dt.IDE.IDESwiftPackageSupport> and requested container extension: <DVTExtension 0x7fd732e56750: Swift Package Proxy (Xcode.IDEFoundation.Container.SwiftPackageProxy) from com.apple.dt.IDE.IDESwiftPackageSupport> for file path: <DVTFilePath:0x7fd738728c30:'/Users/d041771/git/cloud-sdk-ios-fiori/Build/SourcePackages/checkouts/observable-array'> Why? How is it possible to build with -derivedDataPath without requiring a xcodeproj file? Note Building without -derivedDataPath works Building with -derivedDataPath and specifying -project works but is not an option for us as the package shall embed localized resources (swift-tools-version 5.3) in the future and building with xcoceproj will not work then - https://developer.apple.com/forums/thread/650278
Replies
1
Boosts
0
Views
3.9k
Activity
Jun ’22
SwiftUI: Markdown support for string variables
Text in iOS 15 Beta 1 (Xcode 13 Beta 1) only handles markdown when string literal was passed to initializer. struct MarkdownTest: View {   var text: String = "**Hello** *World*"   var body: some View {     VStack {       Text("**Hello** *World*") // will be rendered with markdown formatting       Text(text) // will NOT be rendered according to markdown     }   } } struct MarkdownTestPreviews: PreviewProvider {   static var previews: some View {     MarkdownTest()   } } Is this a known bug or do I have to create an entry in Feedback Assistant?
Replies
4
Boosts
0
Views
11k
Activity
Dec ’21
SwiftUI: which Markdown specification is supported?
Hi, thanks for adding markdown support in SwiftUI's Text with Xcode 13 and iOS 15! :) Even formatting like strikethrough works! Text("Hello ~~World~~") So which specification is supported?? This goes apparently beyond Commonmark (as strikethrough is not part of Commonmark specification). Is it GitHub Flavored Markdown or even a different spec?
Replies
4
Boosts
0
Views
10k
Activity
Dec ’21
AsyncImage: support of GIF images?
Hi, great to see SwiftUI support to load images asynchronously! However, it seems that GIFs are not supported. I tested with Xcode 13 Beta 1 and the following code AsyncImage(url: URL(string: "https://media.wired.com/photos/59326d5344db296121d6aee9/master/pass/8552.gif")) will show only as a static image. Is GIF supported planned for final version?
Replies
1
Boosts
0
Views
2.3k
Activity
Jun ’21