Post

Replies

Boosts

Views

Activity

Retrieve MKPlacemark TimeZone
I am trying to retrieve the time zone from the longitude and latitude from the MapKit. Does anyone know how to access the MKPlacemark TimeZone? When returned, it is always GMT (fixed) or America/Chicago (current). This is dependent on how I use define the option portion. var timezone: TimeZone {         self.placemark.timeZone ?? TimeZone(abbreviation: "CDT")! }  Any help would be greatly appreciated.
4
0
893
Aug ’20
How to conditionally set TabView's $selection
I have my app set up with tab navigation using TabView(selection: $selection) to a defaulted view. What I would like to do is set this up so that if a condition is not met, that the user is directed to another view within the tab navigation. Any suggestions or help will be greatly appreciated! struct TabNavigationView: View {     @AppStorage("city") var city: String?     @State var selection: String = "Today"       var body: some View {         TabView(selection: $selection) {             ChartView()                 .tabItem {                     Image(systemName: "star.fill")                         .imageScale(.large)                     Text("Today")                 }         NavigationView {                 LocationView()             }             .tabItem {                 Image(systemName: "mappin.and.ellipse")                     .imageScale(.large)                 Text("Location")             }         }     } }
3
0
3.2k
Aug ’20
Help with looking at Apple's crash log
I submitted an app to the apple store and it was rejected. Apple did provide a crash log in txt format. I have changed the filename to .crash. I have tried to view it in Xcode's Organizer dialog - Crashes. However, I must be doing something wrong as it is not translating in a more readable format. Any suggestions are much appreciated.
4
0
1.4k
Sep ’20
Why does MacOS build fail on Multi-platform app with bridging header>
I am building a multi-platform app in Xcode 12.2 beta using the latest swift and swift versions. My code references C and I do have the bridging header in place. I am able to successfully run the app in the iPhone and iPad simulator, and an iPhone device. However when I try to run the macOS on My Mac, I receive compile errors stating that it cannot find various variables in scope. It is if it is not utilizing the bridging header. Because the bridging header it is a C header, it does not allow me to tick/untick the target memberships. And in the bridging header I am using a simple import reference to the actual C header file. Is there something more that I need to do? Thanks in advance for any guidance that you can provide!
1
0
902
Sep ’20
How to use offset in order to find the last 10 'games'
I am trying to create a formula using Numbers by Mac in order to find how many of the last 10 games we won. Although I know how many games there are, we are in mid-season. I am able to use this formula in Excel: =COUNTIF(OFFSET(C3,COUNTA(C3:C17),0,-E3-1),"Yes") and it works just fine. However, when I use this formula in Numbers for Mac, I get an error saying: Argument 4 in OFFSET must be greater than or equal to 1 and less than or equal to 1,000,000. Can you provide any suggestions? Thanks in advance! Melissa
1
0
806
Jun ’21
How do I prepare CloudKit data for Swift Charts?
I have created a simple app where a user is tracking their mood. A simple click of the button inserts the necessary data to a CloudKit database. So I consider each record as a 'transactional' record. I am able to successfully query the data and present in a list view. I am able to sort and incorporate simple predicates. I am now at a point in my development that I would like to add a pie chart based on the users data and I am not sure how to roll-up the data / group by the data / aggregate the data [I am not sure what the correct terminology is within Swift] The pie chart would show the various moods that the exists in the CloudKit database and the slices would be sized based on the count of each mood. Any guidance that you can provide would be greatly helpful!
1
0
554
Feb ’24