Post

Replies

Boosts

Views

Activity

Reply to Error: The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions.
Path Progress and Courses are different Views. mClass is an array of classes  If somethings was wrong about them, an error would be shown on barHome. Please show the definitions of them if you want to fix your issue. Or if the SOLVED mark is not a mistake and you really have solved your issue, please share your solution.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’21
Reply to Tab bar item localization
Here is an example. LevelsViewController is a view controller that is displayed when tapping a tab bar item. UITabBarController collects tabBarItems of the content view controllers just after they are initialized. It is too late in viewDidLoad or viewWillAppear. Try something like this: override func awakeFromNib() { super.awakeFromNib() tabBarItem.title = "LevelsVC-TabBarItem".localize() } Or required init?(coder: NSCoder) { super.init(coder: coder) tabBarItem.title = "LevelsVC-TabBarItem"//.localize() } In this scenario, you have no need to subclass UITabBarController.
Topic: UI Frameworks SubTopic: UIKit Tags:
May ’21
Reply to App Validation - Got Bad bundle identifier because of application extension bundle id format
As far as I read the message, and not contain more than one period . after the application's bundle ID The bundle identifier com.company.name.product.mobile.Share.External.Information is clearly against it. (And I have never found such an identifier in any of the articles explaining Share Extension.) or it should be like "com.company.name.product.mobile.shareexternalinformation". I haven't tried it myself, but it matches the description in the message, only one period . after the application's bundle ID.
May ’21
Reply to Swift Firebase Error: Thread 1: "Failed to get FirebaseDatabase instance: Specify DatabaseURL within FIRApp or from your databaseForApp:URL: call."
Firebase is not a framework of Apple's. You should better find an appropriate place to ask about it to get better responses sooner. But generally, it is not considered to be a good habit to instantiate a class which will immediately disposed. var ref = DatabaseReference() ref = Database.database().reference().child("users").child(uid) Why don't you write it simply? var ref = Database.database().reference().child("users").child(uid)
Topic: UI Frameworks SubTopic: UIKit Tags:
May ’21
Reply to Need help w/escaping closures for API call
Can you be more specific? What is the current issue with your code? Does it cause some build-time errors and cannot run? Or it runs but causes some runtime errors? Or else, it runs without errors but shows unexpected results? And you should better include all the relevant types when showing your code. What are APIResults and MappedResults? Please show the definitions of them. One more, it is not recommended to use an initializer exactly the same as existing type names, as in your Line 47. It should be lowercased mappedResults.
Topic: Programming Languages SubTopic: Swift Tags:
May ’21
Reply to Xcode for Catalina
Check the More Downloads page - https://developer.apple.com/download/more/. Xcode 12.4 would run on Catalina.
Replies
Boosts
Views
Activity
May ’21
Reply to Error: The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions.
Path Progress and Courses are different Views. mClass is an array of classes  If somethings was wrong about them, an error would be shown on barHome. Please show the definitions of them if you want to fix your issue. Or if the SOLVED mark is not a mistake and you really have solved your issue, please share your solution.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to Tab bar item localization
Here is an example. LevelsViewController is a view controller that is displayed when tapping a tab bar item. UITabBarController collects tabBarItems of the content view controllers just after they are initialized. It is too late in viewDidLoad or viewWillAppear. Try something like this: override func awakeFromNib() { super.awakeFromNib() tabBarItem.title = "LevelsVC-TabBarItem".localize() } Or required init?(coder: NSCoder) { super.init(coder: coder) tabBarItem.title = "LevelsVC-TabBarItem"//.localize() } In this scenario, you have no need to subclass UITabBarController.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to App Validation - Got Bad bundle identifier because of application extension bundle id format
As far as I read the message, and not contain more than one period . after the application's bundle ID The bundle identifier com.company.name.product.mobile.Share.External.Information is clearly against it. (And I have never found such an identifier in any of the articles explaining Share Extension.) or it should be like "com.company.name.product.mobile.shareexternalinformation". I haven't tried it myself, but it matches the description in the message, only one period . after the application's bundle ID.
Replies
Boosts
Views
Activity
May ’21
Reply to Error with AppStorage (SwiftUI)
Your code does not make sense. Where is button? You are writing executable statements where Views are required. Put a button and write executable statements inside the action closure of the button.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to Error with AppStorage (SwiftUI)
Not a big difference. Executable code such as if num1 2 { num2 += 1 } needs to be in an action closure of the button. Line 13...16 is a place to put Views, not the place for executable statements.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to Thread 1: EXC_BAD_ACCESS (code=2, address=0x16cd2fff8)
Can you show your code?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to Thread 1: EXC_BAD_ACCESS (code=2, address=0x16cd2fff8)
Thanks for showing the code. But your code lacks many important parts needed to guess what's happening. It may be just 45000 record is too large, or you may be doing something wrong in the hidden parts of your code.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to Thread 1: EXC_BAD_ACCESS (code=2, address=0x16cd2fff8)
I can view the result's search in any case (also with the json file with 40.000 record). No problem with the array or the json file is correct. That does not mean your code there is right.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to Swift Firebase Error: Thread 1: "Failed to get FirebaseDatabase instance: Specify DatabaseURL within FIRApp or from your databaseForApp:URL: call."
Firebase is not a framework of Apple's. You should better find an appropriate place to ask about it to get better responses sooner. But generally, it is not considered to be a good habit to instantiate a class which will immediately disposed. var ref = DatabaseReference() ref = Database.database().reference().child("users").child(uid) Why don't you write it simply? var ref = Database.database().reference().child("users").child(uid)
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to CGFloats rounding issues on simulator (x86_64)
The expression may even crash when called from an attached debugger (the following expression returns 2.4121212... when no debugger attached) Is there something wrong with computing rounded values of CGFloats on a simulator? It seems to be a bug of the debugger. Have you sent a bug report?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to Need help w/escaping closures for API call
Can you be more specific? What is the current issue with your code? Does it cause some build-time errors and cannot run? Or it runs but causes some runtime errors? Or else, it runs without errors but shows unexpected results? And you should better include all the relevant types when showing your code. What are APIResults and MappedResults? Please show the definitions of them. One more, it is not recommended to use an initializer exactly the same as existing type names, as in your Line 47. It should be lowercased mappedResults.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to UITextfield One Time Code persisting across all fields
Can you create a simplified project to reproduce the issue and show all the code of it?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to DefaultStringInterpolation Could not allocate memory
Can you show your code?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to CGFloats rounding issues on simulator (x86_64)
You don't even have to set a breakpoint to get an unexpected result (though different) as the instruction print("Rounded result: \((398.0 / 165.0).rounded())") As far as I tried your code (Mac mini 2018, macOS 11.4, Xcode 12.5, iPhone 8 plus simulator (14.5)), the output was: Rounded result: 2.0
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’21