Post

Replies

Boosts

Views

Activity

Reply to Raw GPS Data
How do we access the raw GPS coordinates from the iphone in our app You can't get the raw values. CoreLocation builds a mix of signals, and does not provide raw data. See authorised answer here (and follow the advice to also tag your post to Maps and Locations tag) https://developer.apple.com/forums/thread/19121 If we cannot get access to the raw gps coordinates how do we increase our gps accuracy? To get best accuracy, set to kCLLocationAccuracyBest. It is also advised to set activity to .fitness: https://stackoverflow.com/questions/55551981/how-the-get-a-higher-gps-accuracy-in-ios-12 locationManager.desiredAccuracy = kCLLocationAccuracyBest locationManager.activityType = .fitness
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’21
Reply to How enlarge doc text size?
You can change the screen resolution to have a systematic change. h t t p s : / / w w w.laptopmag.com/articles/increase-text-size-mac To change files and folders font size in Finder: select Finder type cmd-J (Presentation > Show presentation options) Select font size Here (in french)
Oct ’21
Reply to Directions to annotation from current location in MapKit
You have already the map displayed in mapView. Why do you need to open yet another map ? Anyway, to open an app (e.g., Google Maps), you have first to authorise in plist, then you pass an URL like https://www.google.fr/maps/@48.856912,2.2912735,16z or with your additional infos : https://www.google.fr/maps/place/Tour+Eiffel/@48.8317476,2.3692721,12.3z/data=!4m5!3m4!1s0x47e66e2964e34e2d:0x8ddca9ee380ef7e0!8m2!3d48.8583701!4d2.2944813 You call: var mapPlace = "https://www.google.fr/maps/@48.8317476,2.3692721,12.3z" guard var mapsUrl = URL(string: mapPlace) else { return } if UIApplication.shared.canOpenURL(mapsUrl) { UIApplication.shared.open(mapsUrl, options: [:]) } else { // redirect to safari because the user has not authorised a maps app (not the case here) mapsUrl = URL(string: "http://www.google.fr/maps")! UIApplication.shared.open(mapsUrl, options: [:]) } See details here : https://stackoverflow.com/questions/48072650/how-to-programmatically-check-and-open-an-existing-app-in-swift-4
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’21
Reply to UITableView reload not working
Thanks for feedback. Delaying is just a patch. You cannot guarantee that in some circumstances you would not need 2.5 s. Why don't you call returnToInitialVC here:         alert.addAction(UIAlertAction(title: "Yes", style: .default, handler: { (action: UIAlertAction) in returnToInitialVC() } Anyway, good continuation and don't forget to close the thread on the correct answer.
Topic: UI Frameworks SubTopic: UIKit Tags:
Oct ’21
Reply to Xcode 13.1 unstable, keeps crashing
I have only questions at this stage; you should try to investigate in that order: Does it occur on several files ? What type of files ? .swift files ? .strings file ? Do you succeed opening the file in Finder with a plain text editor ? Do you notice anything special ? I read in the crash log: Crashing on exception: -[__NSCFString substringWithRange:]: Range {16527, 6} out of bounds; string length 5512 Do you see a string that may be that long (5512) ? Maybe you have an unbalanced opening quote in the file ? Did you do a Clean Build Folder ? Close Xcode, then double click on a file that causes crash directly in Finder ; that should open an Xcode window. Does it crash ? If not, that means it may be a problem of dependency between symbols in the whole project. Did you try to open in an older version (Xcode 13.0 or 12.5 for instance) Did you try the last release (13.2 ß) Does the problem occur only when storyboard is open ? if so, you could try to open only storyboard and remove all the links to IBOutlets in the file that crashes Could you attach one such file here for inspection ?
Oct ’21
Reply to How to add HTTP headers in request globally for iOS in wkwebview with swift
I'm not sure to understand what the problem and pain point is. I probably miss something. You have to build a request of each URL. And add header. So there is an extra instruction to add after the init. Is that the problem ? Could you show the code you have today and explain on it what you would like to do ? Would a func to create the request (from URL) and setting the header be a solution ?
Topic: Safari & Web SubTopic: General Tags:
Oct ’21
Reply to Why does NSStackView prevent resizing of parent view/window?
You have likely created constraints that de facto force the width of the parent window. And forbids its resize. You should show all the constraints you have defined, for the stackView (inside and with respect to its parent view). I've learned to avoid setting constraints in the StackView because it often interferes with its auto sizing behaviour..
Topic: UI Frameworks SubTopic: AppKit Tags:
Oct ’21
Reply to Any good tutorials for new app setup flows?
That's a very (too) general question. What is it more precisely that causes you problem ? Have you code to show ? There are many tutorials on notification, location. Just 2 examples: h t t p s : / / w w w.raywenderlich.com/11395893-push-notifications-tutorial-getting-started h t t p s : / / w w w.raywenderlich.com/5247-core-location-tutorial-for-ios-tracking-visited-locations
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’21
Reply to Raw GPS Data
How do we access the raw GPS coordinates from the iphone in our app You can't get the raw values. CoreLocation builds a mix of signals, and does not provide raw data. See authorised answer here (and follow the advice to also tag your post to Maps and Locations tag) https://developer.apple.com/forums/thread/19121 If we cannot get access to the raw gps coordinates how do we increase our gps accuracy? To get best accuracy, set to kCLLocationAccuracyBest. It is also advised to set activity to .fitness: https://stackoverflow.com/questions/55551981/how-the-get-a-higher-gps-accuracy-in-ios-12 locationManager.desiredAccuracy = kCLLocationAccuracyBest locationManager.activityType = .fitness
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Is it possible for an app to add contacts to a user's device?
Yes, you can. See details in Apple's doc: https://developer.apple.com/documentation/contacts Some more if needed here: https://stackoverflow.com/questions/27966744/create-a-contact-programmatically-in-swift
Replies
Boosts
Views
Activity
Oct ’21
Reply to How enlarge doc text size?
You can change the screen resolution to have a systematic change. h t t p s : / / w w w.laptopmag.com/articles/increase-text-size-mac To change files and folders font size in Finder: select Finder type cmd-J (Presentation > Show presentation options) Select font size Here (in french)
Replies
Boosts
Views
Activity
Oct ’21
Reply to Downloading app
Please show the exact message.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Directions to annotation from current location in MapKit
You have already the map displayed in mapView. Why do you need to open yet another map ? Anyway, to open an app (e.g., Google Maps), you have first to authorise in plist, then you pass an URL like https://www.google.fr/maps/@48.856912,2.2912735,16z or with your additional infos : https://www.google.fr/maps/place/Tour+Eiffel/@48.8317476,2.3692721,12.3z/data=!4m5!3m4!1s0x47e66e2964e34e2d:0x8ddca9ee380ef7e0!8m2!3d48.8583701!4d2.2944813 You call: var mapPlace = "https://www.google.fr/maps/@48.8317476,2.3692721,12.3z" guard var mapsUrl = URL(string: mapPlace) else { return } if UIApplication.shared.canOpenURL(mapsUrl) { UIApplication.shared.open(mapsUrl, options: [:]) } else { // redirect to safari because the user has not authorised a maps app (not the case here) mapsUrl = URL(string: "http://www.google.fr/maps")! UIApplication.shared.open(mapsUrl, options: [:]) } See details here : https://stackoverflow.com/questions/48072650/how-to-programmatically-check-and-open-an-existing-app-in-swift-4
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to App data across all downloaded app
If you manage this on your server and and then push notification to all other users, you should be able to achieve it.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to How to get the Mac OS version ?
What do you get when you call ProcessInfo.processInfo.operatingSystemVersion var operatingSystemVersion: OperatingSystemVersion The version of the operating system on which the process is executing.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to "Po" command not working
Do you use Po or po ?
Replies
Boosts
Views
Activity
Oct ’21
Reply to UITableView reload not working
Thanks for feedback. Delaying is just a patch. You cannot guarantee that in some circumstances you would not need 2.5 s. Why don't you call returnToInitialVC here:         alert.addAction(UIAlertAction(title: "Yes", style: .default, handler: { (action: UIAlertAction) in returnToInitialVC() } Anyway, good continuation and don't forget to close the thread on the correct answer.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Xcode 13.1 unstable, keeps crashing
I have only questions at this stage; you should try to investigate in that order: Does it occur on several files ? What type of files ? .swift files ? .strings file ? Do you succeed opening the file in Finder with a plain text editor ? Do you notice anything special ? I read in the crash log: Crashing on exception: -[__NSCFString substringWithRange:]: Range {16527, 6} out of bounds; string length 5512 Do you see a string that may be that long (5512) ? Maybe you have an unbalanced opening quote in the file ? Did you do a Clean Build Folder ? Close Xcode, then double click on a file that causes crash directly in Finder ; that should open an Xcode window. Does it crash ? If not, that means it may be a problem of dependency between symbols in the whole project. Did you try to open in an older version (Xcode 13.0 or 12.5 for instance) Did you try the last release (13.2 ß) Does the problem occur only when storyboard is open ? if so, you could try to open only storyboard and remove all the links to IBOutlets in the file that crashes Could you attach one such file here for inspection ?
Replies
Boosts
Views
Activity
Oct ’21
Reply to How to add HTTP headers in request globally for iOS in wkwebview with swift
I'm not sure to understand what the problem and pain point is. I probably miss something. You have to build a request of each URL. And add header. So there is an extra instruction to add after the init. Is that the problem ? Could you show the code you have today and explain on it what you would like to do ? Would a func to create the request (from URL) and setting the header be a solution ?
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Why does NSStackView prevent resizing of parent view/window?
You have likely created constraints that de facto force the width of the parent window. And forbids its resize. You should show all the constraints you have defined, for the stackView (inside and with respect to its parent view). I've learned to avoid setting constraints in the StackView because it often interferes with its auto sizing behaviour..
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to what "Zero Metal services found" means ?
I also get such message from time to time. As there is no consequence, I now ignore them. They seem to be just internal test. It is common with Xcode.
Topic: Graphics & Games SubTopic: Metal Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Any good tutorials for new app setup flows?
That's a very (too) general question. What is it more precisely that causes you problem ? Have you code to show ? There are many tutorials on notification, location. Just 2 examples: h t t p s : / / w w w.raywenderlich.com/11395893-push-notifications-tutorial-getting-started h t t p s : / / w w w.raywenderlich.com/5247-core-location-tutorial-for-ios-tracking-visited-locations
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to How to get animation interpolation during animation?
Animator does not exist in iOS. It is UIView.animate(withDuration) Could you show real code you start with ?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’21