Post

Replies

Boosts

Views

Activity

Reply to My app requires location to work, submission has been rejected because of Guideline 5.1.5
Hi, based on their response they either believe that it is not relevant that your app needs the users location to give personalized suggestions, or they are missing some information like a good NSLocationUsageDescription. Either way two things you can try to improve your review: Check that the user can opt out of using their location - then just display random topics and tell the user that for more personal results they need to grant location access. Make sure that you are only asking for LocationWhenInUse permission and not LocationAlwaysPermission as the second option needs a proper reason to be used in an app. When all of the above is met make sure that you tell the user exactly why you need their location. For Instance show a splash screen and explain what the location permission is for and why it is a good idea to grant access to it. Hope this helps Take care David
Apr ’22
Reply to @StateObject Publishing changes from background thread
Hi, based on the code you shared I would change two things. If the class contains nothing but a single @Published variable I would just declare a single variable in your ContentView: struct ContentView: View { @State private var response: String = "" ...} And to get rid of the error you have to publish the changes on the main thread(the error warns you because a data task is running on a background thread and also completes on one and therefore any changes you want to display need to be on the main thread). private func makeRequest() { URLSession.shared.dataTask(with: URL(string: "https://my-json-server.typicode.com/typicode/demo/posts/1")!, completionHandler: { data, _, _ in DispatchQueue.main.async{ self.response = String(bytes: data!, encoding: .utf8)! } }) .resume() } The first part with the class is optional but there is no need for a separate class with a single value :) Take care David
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’22
Reply to How to download this file when iPhone is out of storage space
Hi, not quite sure if your question is regarding the available storage space, or the download itself. But if your device has not enough storage available you can temporarily offload apps to free up space, or upload images and files to iCloud to free up enough space to download the file of your choice. Either way remember that filling your phones storage up so much can lead to software updates not working and therefore system data can build up. Take care David
Topic: App & System Services SubTopic: Core OS Tags:
Apr ’22
Reply to My Xcode Login Page failed
Hi, the error message says "no such module" and to my knowledge there is no swift library called parse. Try removing line 2 as your view is not using any other libraries than UIKit. If you are using a third party library or package from git make sure to use the package manager found under "File" -> "Packages". Take care, David
Topic: App & System Services SubTopic: General Tags:
Apr ’22