Post

Replies

Boosts

Views

Activity

Issue with APN entitlement on iOS - Xcode 15
I have been pulling out my hair the past day over this. I am adding push / remote notifications (using FCM) and running into an issue with the APN entitlement not being added to provisioning profile - using automatic signing. Now I am somewhat of a new / hobbyist developer but I'm sure I've covered all the bases: Have added (and removed and re-added) the capability in Xcode. Created (and recreated) the APN key in the developer portal (combined with Sign in with Apple) AppDelegate is fine FCM returns a device key without issue. Cleaned build folder and rebuilt app Despite this I am still getting "10.18.0 [FirebaseMessaging][I-FCM012002] Error in application:didFailToRegisterForRemoteNotificationsWithError: no valid *aps-environment" entitlement string found for application" error. Include is a screen capture of the automatically generated profile which seems to illustrate the issue. Any and all advice is greatly appreciated ;)
3
0
4.6k
Dec ’23
SwiftUI responding to MKMapView Annotation callout taps
I have a basic SwiftUI app that uses an MKMapView via UIView Representable to display a range of places around the world (as annotations with Callouts using UIButton(type: .detailDisclosure)) Question is how can I detect when the user taps the detailDisclosure button and act on this in SwiftUI? I've had a search around the web but nothing has helped me nail a solution to this. Any pointers / suggestions greatly appreciated.
0
0
415
Feb ’22
swiftUI Picker closes automatically
I have a simple picker control being used to make a selection ( using SegmentedPickerStyle() ) however when used it automatically closes after a few seconds without the user being able to make a selection. I can't seem to see any reason why this is happening. Using Xcode 13 beta and ios15 Any thoughts ... ? Code for the picker control below                 Picker("Category:", selection: $selectedCategory) {                     ForEach(modelData.categories) { category in                     HStack {                         FAText(iconName: category.image, size: 12)                         Text(category.name)                     }                     }                 }                     Picker(selection: $selectedTaskPriorityIndex, label: Text("")) {                         ForEach(0 ..< taskPriority.count) {                             Image(systemName: "\(self.taskPriority[$0])")                         }                     }                         .pickerStyle(SegmentedPickerStyle())
2
0
591
Sep ’21
SwiftUI NavigationView adds (extra) blank space on top
I'm working on a simple app (new to SwiftUI) and having some issues with the NavigationView element. I have added a NavigationView to my top-level view but this creates a block of blank space above the view that I can't seem to remove. If I take out the NavigationView the rest of the views display as expected. I have tried removing the navigation bar Title modifiers from deeper in the app but that also hasn't had any effect. I'm at a bit of a loss as to what is going on here ... have I made this too complicated for my own good? (images to illustrate the results) Code for the view with the issue.       var body: some View {     NavigationView {       VStack{         todayView()         categoryList()         .padding(5)         Spacer()       }     }     .navigationBarTitle("")     .navigationBarHidden(true)   } } initial navigationLinks are in the categoriesList (Red) which lead to a list of items also with navigationLinks (code below)   @EnvironmentObject var modelData: ModelData       @State private var showHotListOnly = false       var filteredHotTasks: [Task] {     modelData.tasks.filter { task in       (!showHotListOnly || task.isHotList)     }   }       var body: some View {     //NavigationView {       List {       ForEach(filteredHotTasks) { task in         NavigationLink(destination: TaskDetail(task: task)) {           TaskRow(task: task)         }       }     }       .navigationTitle(showHotListOnly ? "Hot List" : "Tasks")       .navigationBarTitleDisplayMode(.inline)       .navigationBarItems(trailing:                   Button (action: {                     showHotListOnly.toggle()                   }) {                     Image(systemName: showHotListOnly ? "flame.fill" : "flame")                     .foregroundColor(showHotListOnly ? Color.orange : Color.gray)                   }                           )   //} } Any and all help greatly appreciated! Especially before I go bald from frustration.
1
0
5.9k
Jun ’21
Issue with APN entitlement on iOS - Xcode 15
I have been pulling out my hair the past day over this. I am adding push / remote notifications (using FCM) and running into an issue with the APN entitlement not being added to provisioning profile - using automatic signing. Now I am somewhat of a new / hobbyist developer but I'm sure I've covered all the bases: Have added (and removed and re-added) the capability in Xcode. Created (and recreated) the APN key in the developer portal (combined with Sign in with Apple) AppDelegate is fine FCM returns a device key without issue. Cleaned build folder and rebuilt app Despite this I am still getting "10.18.0 [FirebaseMessaging][I-FCM012002] Error in application:didFailToRegisterForRemoteNotificationsWithError: no valid *aps-environment" entitlement string found for application" error. Include is a screen capture of the automatically generated profile which seems to illustrate the issue. Any and all advice is greatly appreciated ;)
Replies
3
Boosts
0
Views
4.6k
Activity
Dec ’23
SwiftUI responding to MKMapView Annotation callout taps
I have a basic SwiftUI app that uses an MKMapView via UIView Representable to display a range of places around the world (as annotations with Callouts using UIButton(type: .detailDisclosure)) Question is how can I detect when the user taps the detailDisclosure button and act on this in SwiftUI? I've had a search around the web but nothing has helped me nail a solution to this. Any pointers / suggestions greatly appreciated.
Replies
0
Boosts
0
Views
415
Activity
Feb ’22
swiftUI Picker closes automatically
I have a simple picker control being used to make a selection ( using SegmentedPickerStyle() ) however when used it automatically closes after a few seconds without the user being able to make a selection. I can't seem to see any reason why this is happening. Using Xcode 13 beta and ios15 Any thoughts ... ? Code for the picker control below                 Picker("Category:", selection: $selectedCategory) {                     ForEach(modelData.categories) { category in                     HStack {                         FAText(iconName: category.image, size: 12)                         Text(category.name)                     }                     }                 }                     Picker(selection: $selectedTaskPriorityIndex, label: Text("")) {                         ForEach(0 ..< taskPriority.count) {                             Image(systemName: "\(self.taskPriority[$0])")                         }                     }                         .pickerStyle(SegmentedPickerStyle())
Replies
2
Boosts
0
Views
591
Activity
Sep ’21
SwiftUI NavigationView adds (extra) blank space on top
I'm working on a simple app (new to SwiftUI) and having some issues with the NavigationView element. I have added a NavigationView to my top-level view but this creates a block of blank space above the view that I can't seem to remove. If I take out the NavigationView the rest of the views display as expected. I have tried removing the navigation bar Title modifiers from deeper in the app but that also hasn't had any effect. I'm at a bit of a loss as to what is going on here ... have I made this too complicated for my own good? (images to illustrate the results) Code for the view with the issue.       var body: some View {     NavigationView {       VStack{         todayView()         categoryList()         .padding(5)         Spacer()       }     }     .navigationBarTitle("")     .navigationBarHidden(true)   } } initial navigationLinks are in the categoriesList (Red) which lead to a list of items also with navigationLinks (code below)   @EnvironmentObject var modelData: ModelData       @State private var showHotListOnly = false       var filteredHotTasks: [Task] {     modelData.tasks.filter { task in       (!showHotListOnly || task.isHotList)     }   }       var body: some View {     //NavigationView {       List {       ForEach(filteredHotTasks) { task in         NavigationLink(destination: TaskDetail(task: task)) {           TaskRow(task: task)         }       }     }       .navigationTitle(showHotListOnly ? "Hot List" : "Tasks")       .navigationBarTitleDisplayMode(.inline)       .navigationBarItems(trailing:                   Button (action: {                     showHotListOnly.toggle()                   }) {                     Image(systemName: showHotListOnly ? "flame.fill" : "flame")                     .foregroundColor(showHotListOnly ? Color.orange : Color.gray)                   }                           )   //} } Any and all help greatly appreciated! Especially before I go bald from frustration.
Replies
1
Boosts
0
Views
5.9k
Activity
Jun ’21