Posts

Post not yet marked as solved
6 Replies
1.4k Views
Hello all! Why does the classic spinning wheel ProgressView when specifying the style for the circular band/ring? Additionally, if the progressViewStyle modifier is not added to the ProgressView, a progress bar is displayed to the indicated percentage (33%) instead of the default spinning wheel. - Unless, that is I got the wrong end of the stick... ProgressView("Completed", value: 0.33) .progressViewStyle(CircularProgressViewStyle())
Posted
by allagog.
Last updated
.
Post not yet marked as solved
0 Replies
750 Views
The requestAuthorization method in WorkoutManager wants to read HR, energy, distance and "activity" information all of which are HKQuantityTypes. //The quantity types to read from the health store let typesToRead: Set = [ HKQuantityType.quantityType(forIdentifier: .heartRate)!, HKQuantityType.quantityType(forIdentifier: .activeEnergyBurned)!, HKQuantityType.quantityType(forIdentifier: .distanceWalkingRunning)!, HKQuantityType.quantityType(forIdentifier: .distanceCycling)!, HKObjectType.activitySummaryType() ] The documentation for HKObjectType states: The HKObjectType class is an abstract class. You should never instantiate an HKObjectType object directly. Instead, you always work with one of the following concrete subclasses: ... HKQuantityType Replacing HKObjectType.activitySummaryType() with HKQuantityType.activitySummaryType() in the above code doesn't appear to cause any issues with the app. Intuitively, it should work exactly the same since HKQuantityType (being a concrete subclass of HKObjectType) inherits directly from HKObjectType. Is my understanding correct or have I missed something fundamental? If my thinking is correct, why is HKObjectType used in the sample code when all of the other set elements use the HKQuantityType subclass?
Posted
by allagog.
Last updated
.
Post not yet marked as solved
0 Replies
358 Views
Unlocking the phone occasionally freezes, hangs, lags and is generally unresponsive for a period of up to 30 seconds. The issue is not affecting every unlock, but its frequency is enough to be irritating to say the least. Out of 27 pickups today, easily 50% have presented an unresponsive UI. There is 86GB/128GB storage available, and the issue was first noticed with an iOS 14 beta, suggesting that the issue may be software related. Others have reported iOS 14 issues elsewhere, anyone else experiencing this or something similar?
Posted
by allagog.
Last updated
.
Post marked as solved
23 Replies
3.2k Views
Alert: “A new iOS update is now available. Please update from the iOS 14 beta” In Settings/general/Profile there is only an option to Remove Profile. After removing the profile, backing-up and archiving the iPhone backup, a new profile was downloaded from beta.apple.com/profile, but alert persists. It seems that other developers are experiencing similar issues. Any ideas for resolving this issue?
Posted
by allagog.
Last updated
.
Post not yet marked as solved
0 Replies
3.7k Views
The following warnings presented themselves when the Document groups example code is built from the App essentials in SwiftUI session. warning: The application supports opening files, but doesn't declare whether it supports opening them in place. You can add an LSSupportsOpeningDocumentsInPlace entry or an UISupportsDocumentBrowser entry to your Info.plist to declare support. (in target 'NewInSwiftUI' from project 'NewInSwiftUI') And another "purple" warning: Multiline Type "com.example.ShapeEdit.shapes" was expected to be declared and exported in the Info.plist of NewInSwiftUI.app, but it was not found. After adding the "Supports opening documents in place" info.plist entry and an "Exported Type Identifier" to the project target, the warning goes away whether this boolean is set to Yes or No. What does this plist entry do (apart from the obvious)? Interestingly, the warning does not return if the "Supports opening documents in place" and "Exported Type Identifier" info.plist entries are removed. Xcode seems to be hanging on to the bones of the "Exported Type Identifier" which can be seen when a commit is initiated with Xcode Source Control.
Posted
by allagog.
Last updated
.
Post marked as solved
7 Replies
6.1k Views
Following the coding intro to SwiftUI a curiosity arose with regard to the toolbar placement in the view. The first question is regarding the use of the toolbar modifier. The demo showed the buttons appearing at the top of the view, but they appear at the bottom of the view in my rendition, despite applying the modifiers to different blocks within the body calculated property. Any ideas as to why this would be would be appreciated. Additionally, the question begs as to whether the .navigationBarItems modifier is to be replaced by the new toolbar modifier? Or, will it simply be added to the toolset?     var body: some View {         NavigationView {             List {                 ForEach(store.sandwiches) { sandwich in                     SandwichCell(sandwich: sandwich)                 }                 .onMove(perform: moveSandwiches)                 .onDelete(perform: deleteSandwiches)                                  HStack {                     Spacer()                     Text("\(store.sandwiches.count) Sandwiches")                         .foregroundColor(.secondary)                     Spacer()                 }             }             .navigationTitle("Sandwiches")             .toolbar {                 #if os(iOS)                 EditButton()                 #endif                 Button("Add", action: makeSandwich)             }                          Text("Select a sandwich")                 .font(.largeTitle)         }     }
Posted
by allagog.
Last updated
.
Post marked as solved
4 Replies
726 Views
The demo in the Introduction to SwiftUI showed a nicely aligned "🔥Spicy" Label consisting of a String and the flame.fill SF symbol. However, with the code below (appearing immediately before the closing bracket for the VStack in the body property within the SandwichDetail struct), the label appears misaligned. The single flame.fill symbol appears as normal, but as though it occupies the space that two flame.fill symbols would occupy if stacked vertically. Only one symbol is visible but as though on the preceding line relative to the Spicy string following immediately after.             if sandwich.isSpicy && !zoomed {                 HStack {                     Spacer()                     Label("Spicy", systemImage: "flame.fill")                     Spacer()                 }                 .padding(.all)                 .font(Font.headline.smallCaps())                 .background(Color.red)                 .foregroundColor(.yellow)                 .transition(.move(edge: .bottom))             }
Posted
by allagog.
Last updated
.
Post not yet marked as solved
0 Replies
431 Views
The code available for this WWDC session produces something like a slider on the watch. Also, the set value can be shown or the two extreme values, but not both. Finally, the foreground colour of green will not apply. Any ideas? 17:32 mark struct ContentView: View { 		var acidity: Double 		var body: some View { 				Gauge(value: acidity, in: 3...10) { 						Label("Soil Acidity", systemImage: "drop.fill") 								.foregroundColor(.green) 				} 		} } 17:52 mark struct ContentView: View { 		var acidity: Double 		var body: some View { 				Gauge(value: acidity, in: 3...10) { 						Label("Soil Acidity", systemImage: "drop.fill") 								.foregroundColor(.green) 				} currentValueLabel: { 						Text("\(acidity, specifier: "%.1f")") 				} 		} } 18:00 struct ContentView: View { 		var acidity: Double 		var body: some View { 				Gauge(value: acidity, in: 3...10) { 						Label("Soil Acidity", systemImage: "drop.fill") 								.foregroundColor(.green) 				} currentValueLabel: { 						Text("\(acidity, specifier: "%.1f")") 				} minimumValueLabel: { 						Text("3") 				} maximumValueLabel: { 						Text("10") 				} 		} }
Posted
by allagog.
Last updated
.
Post not yet marked as solved
0 Replies
644 Views
and, Type 'Provider' does not conform to protocol 'IntentTimelineProvider' in EmojiRangerWidget.swift. The Provider will not conform presumably if it cannot find 'DynamicCharacterSelectionIntent'. So, why would that be? After comparing with the "final" version of the example code, it became apparent that the EmojiRangerWidget was no longer a target member of EmojiRangerWidgetExtension, but now a member of CharacterDetailExtension. When I remove membership from EmojiRangerWidgetExtension of EmojiRangerWidget it suddenly is able to "find" DynamicCharacterSelectionIntent and the protocol non-conformance issue goes away. It would be really helpful, having come this far in the Widget creation journey, to understand why I am observing the above behaviour and how the CharacterDetailExtension should be created.
Posted
by allagog.
Last updated
.
Post not yet marked as solved
1 Replies
872 Views
This last part of Widgets Code-along was great, and resulted in lots of questions. The first of which is why Swift cannot find CharacterDetail from the IntentHandler? Swift didn't have a problem prior to creating IntentHandler finding CharacterDetail. My code has been building all along but I have noticed a target that appears in the example code that does not appear in my code. A target called CharacterDetailExtension seems very conspicuous, but Izzy didn't mention anything about the creation of it. Nevertheless, it would be interesting to know why CharacterDetail is suddenly out-of-scope? And what is the CharacterDetailExtension target and how is is created?
Posted
by allagog.
Last updated
.
Post not yet marked as solved
3 Replies
841 Views
The demo was really interesting and enjoyable Neils. The second Text view in the CaffeineAmountView returns "0 lb" in the widget instead of the expected "56.23 mg" as set in the static constant in the extension. Is this just a bug in the beta or is something else going on?      Text(measurementFormatter.string(from: data.caffeineAmount))
Posted
by allagog.
Last updated
.
Post not yet marked as solved
2 Replies
690 Views
Is it possible to view the specific timings for the sessions that are planned over the coming days? The Developer App and the developer.apple.com portal are not very forthcoming with this information aside from the days that sessions, code alongs and labs are planned. Or, have I missed something?
Posted
by allagog.
Last updated
.