We are building out app on a Azure Devops CI server.
Therefore we are using the Xcode@5 Task, which results in the following command:
/usr/bin/xcodebuild -workspace /Redacted/project.xcworkspace -scheme Redacted archive -sdk iphoneos -configuration Release -archivePath Redacted.xcarchive CODE_SIGN_STYLE=Manual CODE_SIGN_IDENTITY=Redacted PROVISIONING_PROFILE=Redacted PROVISIONING_PROFILE_SPECIFIER=
This is (one of) the output / failures:
Redacted/Package.swift: error: Redacted does not support provisioning profiles. Redacted does not support provisioning profiles, but provisioning profile Redacted has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target __'Redacted'__ from project 'Redacted').
So, there seems to be an error while signing contained swift packages.
With Xcode 13.4.1 the command is working. Any ideas what is going wrong here?
Post
Replies
Boosts
Views
Activity
In SwiftUI 3 we used the following code snippet to set the background color of a list.
struct ContentView: View {
var body: some View {
List {
Text("Hello World!")
}
.onAppear {
// Placed here for sample purposes, normally set globally
UITableView.appearance().backgroundColor = .clear
}
.listStyle(.insetGrouped)
.background(Color.red)
}
}
This is not working anymore in SwiftUI 4 (FB10225556) as the List is not based on UITableView anymore. Any workaround ideas?
I want to init a navigation stack in SwiftUI. Thus I want to push a second view immediately after a first view appears. Approach: Using a @State var, which is set to true in onAppear, and thus activates a NavigationLink in first view.
However, the approach is not working. The push is done and then the second view is immediately dismissed. The expected behaviour is that the second screen stays on screen.
This is a simplified demo:
struct SecondView: View {
	var body: some View {
		Text("Second")
			.navigationTitle("Second")
			.onAppear(perform: {
				print("Second: onAppear")
			})
	}
}
struct FirstView: View {
	 @State var linkActive = false
	 var body: some View {
		 NavigationLink(destination: SecondView(), isActive: $linkActive) {
			 Text("Goto second")
		 }
		 .navigationTitle("First")
		 .onAppear(perform: {
			 print("First: onAppear")
			 linkActive = true
		 })
		 .onChange(of: linkActive) { value in
			 print("First: linkActive changed to: \(linkActive)")
		 }
	 }
}
struct SwiftUIView: View {
	 var body: some View {
		 NavigationView {
			 NavigationLink(destination: FirstView()) {
				 Text("Goto first")
			 }
		 }
		 .navigationViewStyle(StackNavigationViewStyle())
	 }
}
Log output:
First: onAppear
First: linkActive changed to: true
Second: onAppear
First: linkActive changed to: false
Trying to figure out if this is a SwiftUI bug, or something I’m doing wrong. May someone help?