Post

Replies

Boosts

Views

Activity

Reply to Peut-on faire un tableau dans une classe
import Foundation struct Brand: Codable {     let name: String     let model: [String]     let image: String     let like: Bool } let sample = """ {    "name": "First Name",    "model": ["CAR1", "CAR2", "CAR3"],    "image": "some.png",    "like": false } """.data(using: .utf8)! let brand = try JSONDecoder().decode(Brand.self, from: sample) print(brand.name)
Topic: App & System Services SubTopic: General Tags:
Dec ’21
Reply to How to avoid or stop receiving Push Notifications if the user clear cookies?
Once the user has opted out of Push Notification your sending scripts will get a list of device tokens no longer opted in which you will have to remove from your side as well on receipt of the error report. Cookies are not used. The user has full control of the APNS process. The server is well aware once implemented correctly. https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/NotificationProgrammingGuideForWebsites/PushNotifications/PushNotifications.html#//apple_ref/doc/uid/TP40013225-CH3-SW1
Dec ’21
Reply to SwiftUI TextView Coordinator bindings retain first object
class Doc: NSObject, ObservableObject, Identifiable {     @State private(set) var id: String     @State var name: String     @State var details: NSAttributedString     // Used to demonstrate correct bindings with TextField     var details2: String     init(name: String, details: NSAttributedString) {         self.id = UUID().uuidString         self.name = name         self.details = details         self.details2 = details.string     } } struct ContentView: View {     @State var selection: Doc?     var body: some View {         HStack {             List(docs) { doc in                 Text(doc.name).onTapGesture {                     selection = nil                     selection = doc                 }.background((selection == doc) ? Color.gray : Color.clear)             }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’21
Reply to Does Swift 5.x offer any callback functions in AVAudioRecorder or must I use a callback timer?
it is nothing to do with the version of swift but the AVKit framework. Look into the AVAudioRecorder type or the documentation and you will find what you're looking for. Use a timer and a combination of the following methods. /* metering */     open var isMeteringEnabled: Bool /* turns level metering on or off. default is off. */     open func updateMeters() /* call to refresh meter values */     open func peakPower(forChannel channelNumber: Int) -> Float /* returns peak power in decibels for a given channel */     open func averagePower(forChannel channelNumber: Int) -> Float /* returns average power in decibels for a given channel */
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’21
Reply to swift instead javascript
You cannot replace Javascript in the browser with swift Take a look at the JavaScriptCore framework JSContext & JSVirtualMachine API that will allow you to run Javascript natively in a JSVirtualMachine bridging to Swift or Objective-C API calls. https://developer.apple.com/documentation/javascriptcore/jscontext For Webviews using WKWebit take a look at https://developer.apple.com/documentation/webkit/wkuserscript, https://developer.apple.com/documentation/webkit/wkusercontentcontroller
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’21
Reply to one or more of your in-app purchase products have not been submitted for review
I would say delete the TEST if possible
Replies
Boosts
Views
Activity
Dec ’21
Reply to Peut-on faire un tableau dans une classe
Only if these boards were only private to paying developers with at least one app in the store or development!
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to Peut-on faire un tableau dans une classe
Don't be cheap this is what you're looking for - https://searchads.apple.com
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to Peut-on faire un tableau dans une classe
import Foundation struct Brand: Codable {     let name: String     let model: [String]     let image: String     let like: Bool } let sample = """ {    "name": "First Name",    "model": ["CAR1", "CAR2", "CAR3"],    "image": "some.png",    "like": false } """.data(using: .utf8)! let brand = try JSONDecoder().decode(Brand.self, from: sample) print(brand.name)
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to Xcode Downloads So Slow and Tedious
Usually happens when 23 million developers are all trying to download - but if you have a previous version installed it might be faster to remove or rename the previous version.
Replies
Boosts
Views
Activity
Dec ’21
Reply to How to avoid or stop receiving Push Notifications if the user clear cookies?
Once the user has opted out of Push Notification your sending scripts will get a list of device tokens no longer opted in which you will have to remove from your side as well on receipt of the error report. Cookies are not used. The user has full control of the APNS process. The server is well aware once implemented correctly. https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/NotificationProgrammingGuideForWebsites/PushNotifications/PushNotifications.html#//apple_ref/doc/uid/TP40013225-CH3-SW1
Replies
Boosts
Views
Activity
Dec ’21
Reply to SwiftUI TextView Coordinator bindings retain first object
class Doc: NSObject, ObservableObject, Identifiable {     @State private(set) var id: String     @State var name: String     @State var details: NSAttributedString     // Used to demonstrate correct bindings with TextField     var details2: String     init(name: String, details: NSAttributedString) {         self.id = UUID().uuidString         self.name = name         self.details = details         self.details2 = details.string     } } struct ContentView: View {     @State var selection: Doc?     var body: some View {         HStack {             List(docs) { doc in                 Text(doc.name).onTapGesture {                     selection = nil                     selection = doc                 }.background((selection == doc) ? Color.gray : Color.clear)             }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to “Apache Log4j 2” in AppStoreConnect
Are you asking for a friend?
Replies
Boosts
Views
Activity
Dec ’21
Reply to Hiding the green dot in the upper right of the screen while using camera.
As long as the camera or microphone is running & recording input the green dot is there to stay. It's an Apple privacy attention thing to inform the user an application is currently recording something. So no you cannot turn the dot off because there is no public API to do so.
Topic: Spatial Computing SubTopic: ARKit Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to Hiding the green dot in the upper right of the screen while using camera.
As long as the camera or microphone is running & recording input the green dot is there to stay. It's an Apple privacy attention thing to inform the user an application is currently recording something. So no you cannot turn the dot off because there is no public API to do so.
Topic: Spatial Computing SubTopic: ARKit Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to 60gb space gone after Xcode update
That's normal - mark this as the correct answer
Replies
Boosts
Views
Activity
Dec ’21
Reply to Does Swift 5.x offer any callback functions in AVAudioRecorder or must I use a callback timer?
it is nothing to do with the version of swift but the AVKit framework. Look into the AVAudioRecorder type or the documentation and you will find what you're looking for. Use a timer and a combination of the following methods. /* metering */     open var isMeteringEnabled: Bool /* turns level metering on or off. default is off. */     open func updateMeters() /* call to refresh meter values */     open func peakPower(forChannel channelNumber: Int) -> Float /* returns peak power in decibels for a given channel */     open func averagePower(forChannel channelNumber: Int) -> Float /* returns average power in decibels for a given channel */
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to swift instead javascript
You cannot replace Javascript in the browser with swift Take a look at the JavaScriptCore framework JSContext & JSVirtualMachine API that will allow you to run Javascript natively in a JSVirtualMachine bridging to Swift or Objective-C API calls. https://developer.apple.com/documentation/javascriptcore/jscontext For Webviews using WKWebit take a look at https://developer.apple.com/documentation/webkit/wkuserscript, https://developer.apple.com/documentation/webkit/wkusercontentcontroller
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to How to set Xcode to show pairings of beginning and ending of "clauses" determined by length from the left border of the code editor
Xcode, Preferences, Text Edit -> Display
Replies
Boosts
Views
Activity
Dec ’21
Reply to Forum full of spammers
Maybe access to the forums should be contingent on having an app in the store, an app registered in app connect with at least one build in testflight and complete metadata, a paid subscription something that indicates the member is serious about the program.
Replies
Boosts
Views
Activity
Dec ’21