Post

Replies

Boosts

Views

Activity

Reply to Spin wheel
You have a range of options but first describe what you're doing with the Spin Wheel? By Answering this we will known if you're referring to an item picker for dates and time, or some kind of data model or as Claude31 suggested an activity indicator to indicate there is some kind of background or UI processing taking place.
May ’22
Reply to Create a func which totals the value of data
Because you're calling your code in the viewDidLoad override, firstLoad is not required. The viewDidLoad only gets called once and only once per instance. firstLoad and points: [Atkie]() should be instances of the view controller and not globals. One of the nice things about swift are its high order functions. The calculateSumPoints method can be rewritten as follows: func calculateSumPoints() {     let sum = points.compactMap { $0.point } // this remove any nil point string values from the collection         .reduce(0) { previous, next in // using reduce we access to the previous and current value             guard let value = Int(next) else { return previous } // unwrap next as an Int if it fails return the previous calculation             return previous + value // return the sum of the previous value and the next value         }     totalPoints.text = "\(sum)" }
Topic: Programming Languages SubTopic: Swift Tags:
May ’22
Reply to SwiftUI TableColumn with Custom Widget not able to Bind
Using a TableColumn requires a Table {// content } rows: { // data source } pattern similar to below. Where in the example rowItems is a collection of Items for the data source. Items struct Item { let from: Date let to: Date let hours: Double } // The table view Table(selection: $selection, sortOrder: $sortOrder) { // Sort column on \.from key value path of item             TableColumn("From", value:\.from) { item in                 Text(item.from(date: .numeric, time: .omitted))             } // Sort column on \.to key value path of item             TableColumn("To", value:\.to) { item in                 Text(item.to.formatted(date: .numeric, time: .omitted))             } // Sort column on \.hours key value path of item             TableColumn("Total", value:\.hours) { item in                 Text(item.hours)             }         } rows: { // Populate the rows data source with TableRow types containing an item type from the rowItems collection which is passed on each TableColumm.             ForEach(rowItems) { item in                 TableRow(item)             }         } See Apple example code here: https://developer.apple.com/documentation/swiftui/building_a_great_mac_app_with_swiftui
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’22
Reply to Send notifications with APNs trough PHP
You can implement this https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server or use Google firebase, Azure, Opensource APNS or any APNS provider to deliver your messages.
Replies
Boosts
Views
Activity
May ’22
Reply to Why was my app taken down?
Read here: https://developer.apple.com/support/app-store-improvements/
Replies
Boosts
Views
Activity
May ’22
Reply to Keychain access control from the app with different names
Look into Keychain Sharing & App Groups under Signing & Capabilities in Xcode. Take a look at the documentation on its setup and usage scenarios.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’22
Reply to Is it possible to remove my app from devices i have installed it to using Ad-hoc
You have to wait for the expiration, next time use TestFlight or build a kill switch into the code.
Replies
Boosts
Views
Activity
May ’22
Reply to App use system language for location authorization dialog
Works as expected. The system alert is governed by the OS not the application preference.
Replies
Boosts
Views
Activity
May ’22
Reply to NFC interaction between Devices
See here: https://developer.apple.com/documentation/corenfc/building_an_nfc_tag-reader_app
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’22
Reply to Running multiple Xcode simulators with the same screen
No.
Replies
Boosts
Views
Activity
May ’22
Reply to Spin wheel
You have a range of options but first describe what you're doing with the Spin Wheel? By Answering this we will known if you're referring to an item picker for dates and time, or some kind of data model or as Claude31 suggested an activity indicator to indicate there is some kind of background or UI processing taking place.
Replies
Boosts
Views
Activity
May ’22
Reply to Unique CSR, or CER, per client for MDM product?
Please present these questions to your MDM vendor as each MDM solution has its pros and cons.
Replies
Boosts
Views
Activity
May ’22
Reply to How to find if a pinned certificate is expired when iOS SSL is pinned with info.plist
Read here https://www.raywenderlich.com/1484288-preventing-man-in-the-middle-attacks-in-ios-with-ssl-pinning https://betterprogramming.pub/how-to-implement-ssl-pinning-in-swift-7c4e8f6ee821 Recommended https://www.netguru.com/blog/certificate-pinning-in-ios
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’22
Reply to Create a func which totals the value of data
Because you're calling your code in the viewDidLoad override, firstLoad is not required. The viewDidLoad only gets called once and only once per instance. firstLoad and points: [Atkie]() should be instances of the view controller and not globals. One of the nice things about swift are its high order functions. The calculateSumPoints method can be rewritten as follows: func calculateSumPoints() {     let sum = points.compactMap { $0.point } // this remove any nil point string values from the collection         .reduce(0) { previous, next in // using reduce we access to the previous and current value             guard let value = Int(next) else { return previous } // unwrap next as an Int if it fails return the previous calculation             return previous + value // return the sum of the previous value and the next value         }     totalPoints.text = "\(sum)" }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’22
Reply to Error: Unrecognised selector sent to instance
Ensure there is not another fetch request named fetchRequest because you're declaring a let fetch = ... but passing a fetchRequest to the context.fetch(...) instead.
Replies
Boosts
Views
Activity
May ’22
Reply to Many Apple users Email taking entirely too long to open.
You will not get a response from here your question is better served here as it is developer related: https://discussions.apple.com/welcome
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’22
Reply to Multi type modifiers
What is LibraryContentProvider and what is the error?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’22
Reply to SwiftUI TableColumn with Custom Widget not able to Bind
Using a TableColumn requires a Table {// content } rows: { // data source } pattern similar to below. Where in the example rowItems is a collection of Items for the data source. Items struct Item { let from: Date let to: Date let hours: Double } // The table view Table(selection: $selection, sortOrder: $sortOrder) { // Sort column on \.from key value path of item             TableColumn("From", value:\.from) { item in                 Text(item.from(date: .numeric, time: .omitted))             } // Sort column on \.to key value path of item             TableColumn("To", value:\.to) { item in                 Text(item.to.formatted(date: .numeric, time: .omitted))             } // Sort column on \.hours key value path of item             TableColumn("Total", value:\.hours) { item in                 Text(item.hours)             }         } rows: { // Populate the rows data source with TableRow types containing an item type from the rowItems collection which is passed on each TableColumm.             ForEach(rowItems) { item in                 TableRow(item)             }         } See Apple example code here: https://developer.apple.com/documentation/swiftui/building_a_great_mac_app_with_swiftui
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’22