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
0
46
Jun ’25
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
460
Jun ’22
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.2k
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
10k
Jun ’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
Jun ’21
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.8k
Nov ’20