Post

Replies

Boosts

Views

Activity

Reply to Application Error ?
I added // for the #include <Cocoa/Cocoa.h> to start programming the interface of NSApplication Why did you do that??? to start programming the interface of NSApplication does not make sense. In modern C (as you can find C99, it is not too modern), you need to import/include the prototype definitions of all functions, before using them. You need to import the prototype definition of NSApplicationMain, if you want to use it. Which is included in <Cocoa/Cocoa.h>.
Oct ’21
Reply to Shell Script | AWK | Variable inside FOR-Loop
Awk is an open sourced language available on various platforms. Although awk may be included in most versions of macOS, it is provided as is, no support. You should better find a better place to learn awk. (And in fact, there are so many sites about awk.) By the way, I think = (a single equal sign) is an assignment operator in awk, not a comparison operator.
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’21
Reply to XCode code completes in comments
I cannot reproduce the issue neither with Xcode 13 nor Xcode 13.1 RC. I do not know what Nimble is, but if you once installed it in any of the projects on your Mac, it might be affecting. Better try the same thing on a brand new Mac (on which you have never used Nimble thing). Even if that was not the cause of the issue, you may need to find the condition to reproduce it.
Oct ’21
Reply to App crashes at WKWebView's 'load' method
Thanks for showing more context. But you have not shown that you are using such many pods. As you may know, many pods are well-known as to cause problems at each time iOS or Xcode updates. I have tried with the exact code and URL you have shown, which causes no issues both on iOS 15 simulator or on an actual device of iOS 15.0.1. class ViewController: UIViewController { @IBOutlet weak var webView: WKWebView! let stringUrl = "https://developer.apple.com/" override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. if let url = URL(string: stringUrl) { webView.load(URLRequest(url: url)) } } } So, it is very likely that some still hidden parts of your code or any of your pods are causing the issue. Are you sure you are using WKWebView in a usual manner? For example, calling load(_:) while the webView is not visible may be considered to be an illegal usage by the recent iOS.
Oct ’21
Reply to MacBook Pro ram requirements for Swift
You should better watch this thread: For xcode development, is the new macbook pro m1 pro 16gb good ? Or do I need 32 gb? In my opinion, 32 GB is enough for a while. But you should better have in mind that you cannot add more RAMs after you bought a new MacBook Pro. The answer from Graphics and Games Engineer would be helpful for you.
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’21
Reply to JSON decoding challenges with Combine
OK, after a little research, I see that the JSON response includes some summary info about the request and is started with a curly bracket (the "dictionary" indicator.) So is there a way to specify not to include that data and just return the foods? Or is the right answer to create a add a dictionary property to my class and have it include the summary info variables as well as the [FoodItems] as an element of the dictionary? Thanks for showing the data, the definition and the error info. You may need another struct containing some summary info about the request: struct FoodSearchResult: Codable { let totalHits, currentPage, totalPages: Int let pageList: [Int] let foodSearchCriteria: FoodSearchCriteria let foods: [FDCFoodItem] } struct FoodSearchCriteria: Codable { let query, generalSearchInput: String let pageNumber, numberOfResultsPerPage, pageSize: Int let requireAllWords: Bool } (Assuming your FDCFoodItem is really correct.) And pass it to .decode:             .decode(type: FoodSearchResult.self, decoder: JSONDecoder()) You may also need to modify the closure passed to receiveValue::             } receiveValue: { [weak self] result in                 self?.foods = result.foods                 print("result: \(result)") // debug statement                 print("self?.foods: \(String(describing: self?.foods))") // debug statement             }
Topic: App & System Services SubTopic: General Tags:
Oct ’21
Reply to Getting data from SQLite in SwiftUI
It looks as though it may be possible but the options I've seen don't seem very satisfactory and are overly complicated. Unless you clarify what you have seen and what you think very satisfactory, readers are just confused. As far as I know, using SQLite database directly in iOS apps cannot be so simple even if you use some third party wrappers. If you don't want the users to lose their information, you may update your Cordova app to save the data somewhere not in raw SQLite database (I mean, JSON on some cloud storage or something like that). Or learn how to use SQLite in iOS, even if it it not satisfactory for you.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’21
Reply to Application Error ?
I added // for the #include <Cocoa/Cocoa.h> to start programming the interface of NSApplication Why did you do that??? to start programming the interface of NSApplication does not make sense. In modern C (as you can find C99, it is not too modern), you need to import/include the prototype definitions of all functions, before using them. You need to import the prototype definition of NSApplicationMain, if you want to use it. Which is included in <Cocoa/Cocoa.h>.
Replies
Boosts
Views
Activity
Oct ’21
Reply to Shell Script | AWK | Variable inside FOR-Loop
Awk is an open sourced language available on various platforms. Although awk may be included in most versions of macOS, it is provided as is, no support. You should better find a better place to learn awk. (And in fact, there are so many sites about awk.) By the way, I think = (a single equal sign) is an assignment operator in awk, not a comparison operator.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to XCode code completes in comments
I cannot reproduce the issue neither with Xcode 13 nor Xcode 13.1 RC. I do not know what Nimble is, but if you once installed it in any of the projects on your Mac, it might be affecting. Better try the same thing on a brand new Mac (on which you have never used Nimble thing). Even if that was not the cause of the issue, you may need to find the condition to reproduce it.
Replies
Boosts
Views
Activity
Oct ’21
Reply to No playground on Xcode 13
As far as I know, recent Xcode does not show an option to open a playground (Xcode Playground, not Swift Playgrounds) on start up. When you want to create a new playground, you may need to do it with menus:
Replies
Boosts
Views
Activity
Oct ’21
Reply to App crashes at WKWebView's 'load' method
Thanks for showing more context. But you have not shown that you are using such many pods. As you may know, many pods are well-known as to cause problems at each time iOS or Xcode updates. I have tried with the exact code and URL you have shown, which causes no issues both on iOS 15 simulator or on an actual device of iOS 15.0.1. class ViewController: UIViewController { @IBOutlet weak var webView: WKWebView! let stringUrl = "https://developer.apple.com/" override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. if let url = URL(string: stringUrl) { webView.load(URLRequest(url: url)) } } } So, it is very likely that some still hidden parts of your code or any of your pods are causing the issue. Are you sure you are using WKWebView in a usual manner? For example, calling load(_:) while the webView is not visible may be considered to be an illegal usage by the recent iOS.
Replies
Boosts
Views
Activity
Oct ’21
Reply to Compatibility between Xcode 12.3 and Xcode 12.0.1
One possibility is that your code was wrong even in Xcode 12.0.1, but the Swift compiler could not detect the faults in your code. Pleas show enough code to see what is happening.
Replies
Boosts
Views
Activity
Oct ’21
Reply to Post Request with ONLY SwiftUI
First, you need a server receiving the post. Do you have one?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Thread 1: EXC_BAD_INSTRUCTION (code=1, subcode=0x0)
If you find the crash on the line liveLabel.type = .continuousReverse, the most likely reason would be that the @IBOutlet is not properly connected and the property liveLabel is nil at runtime. Have you checked all the possibility that liveLabel might not be connected properly?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to MacBook Pro ram requirements for Swift
You should better watch this thread: For xcode development, is the new macbook pro m1 pro 16gb good ? Or do I need 32 gb? In my opinion, 32 GB is enough for a while. But you should better have in mind that you cannot add more RAMs after you bought a new MacBook Pro. The answer from Graphics and Games Engineer would be helpful for you.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to For update axie infinity
This is not a place to request sort of invitation code of a specific app. You should contact to the author directly.
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Xcode 13.0 build issues
Flutter is not a framework of Apple's. You should better visit the supporting site or a community site to get better responses sooner. That would also help the author of the framework making it up to date for the new version of Xcode.
Replies
Boosts
Views
Activity
Oct ’21
Reply to Redeem of axie infinity is not working
This is not a place to discuss on some specific TestFlight app. You should contact to the author of the app directly.
Replies
Boosts
Views
Activity
Oct ’21
Reply to For xcode development, is the new macbook pro m1 pro 16gb good ? Or do I need 32 gb?
{Deleted}
Replies
Boosts
Views
Activity
Oct ’21
Reply to JSON decoding challenges with Combine
OK, after a little research, I see that the JSON response includes some summary info about the request and is started with a curly bracket (the "dictionary" indicator.) So is there a way to specify not to include that data and just return the foods? Or is the right answer to create a add a dictionary property to my class and have it include the summary info variables as well as the [FoodItems] as an element of the dictionary? Thanks for showing the data, the definition and the error info. You may need another struct containing some summary info about the request: struct FoodSearchResult: Codable { let totalHits, currentPage, totalPages: Int let pageList: [Int] let foodSearchCriteria: FoodSearchCriteria let foods: [FDCFoodItem] } struct FoodSearchCriteria: Codable { let query, generalSearchInput: String let pageNumber, numberOfResultsPerPage, pageSize: Int let requireAllWords: Bool } (Assuming your FDCFoodItem is really correct.) And pass it to .decode:             .decode(type: FoodSearchResult.self, decoder: JSONDecoder()) You may also need to modify the closure passed to receiveValue::             } receiveValue: { [weak self] result in                 self?.foods = result.foods                 print("result: \(result)") // debug statement                 print("self?.foods: \(String(describing: self?.foods))") // debug statement             }
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Getting data from SQLite in SwiftUI
It looks as though it may be possible but the options I've seen don't seem very satisfactory and are overly complicated. Unless you clarify what you have seen and what you think very satisfactory, readers are just confused. As far as I know, using SQLite database directly in iOS apps cannot be so simple even if you use some third party wrappers. If you don't want the users to lose their information, you may update your Cordova app to save the data somewhere not in raw SQLite database (I mean, JSON on some cloud storage or something like that). Or learn how to use SQLite in iOS, even if it it not satisfactory for you.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’21