Post

Replies

Boosts

Views

Activity

Reply to Is it possible to use familly activity picker with storyboard
On the face of it, FamilyControls are not part of SwiftUI, so I don't see why they couldn't be used without it. Having said that, FamilyActivityPicker conforms to View, which is a SwiftUI component. In UIKit code, you could create the FamilyActivityPicker, but because it's a (SwiftUI) View, you can't directly add it to a ViewController. You would have to use a UIHostingController, which is the generic solution for adding SwiftUI to a UIKit app.
Topic: App & System Services SubTopic: General Tags:
Sep ’21
Reply to Static method 'buildBlock' requires that 'Group' conform to 'View'
struct LostFindView: View { var body: some View { VStack { Group { Text("1") Text("2") Text("3") Text("4") Text("5") Text("6") Text("7") Text("8") Text("9") Text("10") } Text("11") } } } struct LostFindView_Previews: PreviewProvider { static var previews: some View { LostFindView() } } It works for me... builds cleanly. Try the usual: Product > Clean Build Folder Quit Xcode, reload and try again Hint: It's better to paste the actual code, in a code block (rather than a screenshot). Then people who are trying to help you can easily copy-and-paste your code, to try it out. Ah... Could it be your deployment target? Try setting it to iOS 14, and see what happens.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’21
Reply to why it says "Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value"?
The most likely reason is that one of your mp4 files can't be found in the app bundle: reel_1.mp4 reel_2.mp4 Because you are force-unwrapping your file paths, a failure will result in a crash. Bundle.main.path(forResource: "reel_1", ofType: "mp4") ...returns an Optional, so if you use ! on it, and the file can't be found, the app will crash.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’21
Reply to how to randomly spawn enemies on screen
So: x is 1 or -1 enemy.position.y is always the screen height You then want to generate a random point across the screen, for enemy.position.x... You generate a random number Then multiply it by x (which can be 1 or -1) Isn't that going to generate a lot of negative x co-ordinates?! To generate a random position across the screen width, try something like: let enemyX = CGFloat.random(in: 0..<UIScreen.main.bounds.width)
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Sep ’21
Reply to tvos 15 - Siri Remote not returning in the array: GCController.controllers()
As a very simple test, I tried this: struct ContentView: View {     var body: some View {         Button("Query controllers") {             print("controllers: \(GCController.controllers())")         }     } } The first time I clicked "Query controllers", it returned: controllers: [] Clicking "Query controllers" again, it returned the siri remote: controllers: [<GCController 0x283618620 ('Siri Remote (2nd Generation)' - 0xa6f1756e8a7cb7bb)>] So perhaps you have to have some controller interaction, to populate GCController.controllers()? tvOS 15.0 Xcode 13.0
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’21
Reply to Network Link Conditioner on M1 Mac
Yes, this is a known issue. Some people have reported success using Network Link Conditioner from Xcode 12.5.1
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Custom Screen resolutions
What kind of connection is it, between the Mac Mini and the Dell monitor? What cable?
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to Is it possible to use familly activity picker with storyboard
On the face of it, FamilyControls are not part of SwiftUI, so I don't see why they couldn't be used without it. Having said that, FamilyActivityPicker conforms to View, which is a SwiftUI component. In UIKit code, you could create the FamilyActivityPicker, but because it's a (SwiftUI) View, you can't directly add it to a ViewController. You would have to use a UIHostingController, which is the generic solution for adding SwiftUI to a UIKit app.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to Static method 'buildBlock' requires that 'Group' conform to 'View'
struct LostFindView: View { var body: some View { VStack { Group { Text("1") Text("2") Text("3") Text("4") Text("5") Text("6") Text("7") Text("8") Text("9") Text("10") } Text("11") } } } struct LostFindView_Previews: PreviewProvider { static var previews: some View { LostFindView() } } It works for me... builds cleanly. Try the usual: Product > Clean Build Folder Quit Xcode, reload and try again Hint: It's better to paste the actual code, in a code block (rather than a screenshot). Then people who are trying to help you can easily copy-and-paste your code, to try it out. Ah... Could it be your deployment target? Try setting it to iOS 14, and see what happens.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to Xcode 13, text highlights remain after ending code review
Yes, the new updates to code review are not 100% there yet. This is a bug. Please feedback your findings to Apple.
Replies
Boosts
Views
Activity
Sep ’21
Reply to The Apple Accessories Design Guidelines is not updated on the web with new devices such as iPhone 13 series and iPad mini 6
It's not unusual for there to be a time lag between the introduction of new devices, and the updating of all the supporting materials. I suggest that you adapt an existing design if you need it now, or wait for the documentation to be updated.
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to Touch Id is missing from iOS simulator.
You have to be using a Simulated device which supports Touch ID. (Shown here, with an iPad 9th Gen.)
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to NSLocationTemporaryUsageDescriptionDictionary crashes Xcode 13
Oh dear!
Replies
Boosts
Views
Activity
Sep ’21
Reply to why it says "Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value"?
The most likely reason is that one of your mp4 files can't be found in the app bundle: reel_1.mp4 reel_2.mp4 Because you are force-unwrapping your file paths, a failure will result in a crash. Bundle.main.path(forResource: "reel_1", ofType: "mp4") ...returns an Optional, so if you use ! on it, and the file can't be found, the app will crash.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to Xcode 13 cannot run project generated by Xcode 12.5.1
Did Xcode 13 prompt you to update the project settings? Is Xcode 13 showing any other build errors or warnings?
Replies
Boosts
Views
Activity
Sep ’21
Reply to Minimum iOS Deployment Target in Xcode 13
Yes. The simplest way is to try it... I created a new iOS project. The "Deployment Info" dropdown shows values from: • iOS 15.0 to • iOS 9.0 And that's it. Nothing earlier than 9.0 Personally, I would have believed Apple in the first place, but there's no harm in double-checking ;-)
Replies
Boosts
Views
Activity
Sep ’21
Reply to Dealing with small iPad Mini (6th gen) screen
The new iPad Mini (6th generation) introduces a new, smaller(!), screen size? I already wrote about this here: https://developer.apple.com/forums/thread/689939 Apple are also emailing developers about this issue.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to Suppress line numbers in Code Review?
Looks like you've found a bug in Xcode 13.0 I don't normally show line numbers • If I "Show Code Review", line numbers appear • If I "Hide Code Review", the line numbers stay! To get rid, I have to go to Preferences (where they are shown as off), and turn them on and off again
Replies
Boosts
Views
Activity
Sep ’21
Reply to how to randomly spawn enemies on screen
So: x is 1 or -1 enemy.position.y is always the screen height You then want to generate a random point across the screen, for enemy.position.x... You generate a random number Then multiply it by x (which can be 1 or -1) Isn't that going to generate a lot of negative x co-ordinates?! To generate a random position across the screen width, try something like: let enemyX = CGFloat.random(in: 0..<UIScreen.main.bounds.width)
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to tvos 15 - Siri Remote not returning in the array: GCController.controllers()
As a very simple test, I tried this: struct ContentView: View {     var body: some View {         Button("Query controllers") {             print("controllers: \(GCController.controllers())")         }     } } The first time I clicked "Query controllers", it returned: controllers: [] Clicking "Query controllers" again, it returned the siri remote: controllers: [<GCController 0x283618620 ('Siri Remote (2nd Generation)' - 0xa6f1756e8a7cb7bb)>] So perhaps you have to have some controller interaction, to populate GCController.controllers()? tvOS 15.0 Xcode 13.0
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’21