Post

Replies

Boosts

Views

Activity

Reply to Please Create a Sendable Version of CKRecord or Make CKRecord Sendable
You can take responsibility for it being Sendable. By default the Sendable protocol is made unavailable to CKRecord. extension CKRecord : @unchecked Sendable { } But these are the supported types that are sendable by default. https://developer.apple.com/documentation/swift/sendable NSFoundation types mention above NSStrings, NSData will not be Sendable but the Swift Foundation types Strings, Data are.
Apr ’23
Reply to Combine AnyCancellable.store(in:) EXC_BAD_ACCESS
Making request async is the issue. This version works without issue in playgrounds: import UIKit import Combine struct User: Codable { let userId: Int let id: Int let title: String let completed: Bool } struct Download { private var cancellables = Set<AnyCancellable>() mutating func request() { URLSession.shared .dataTaskPublisher(for: URL(string: "https://jsonplaceholder.typicode.com/todos/1")!) .map{$0.data} .decode(type: User.self, decoder: JSONDecoder()) .receive(on: DispatchQueue.main) .sink(receiveCompletion: { print ("Received completion: \($0).") }, receiveValue: { data in print(data) }) .store(in: &cancellables) } } var download = Download() download.request() or making request async as follows in playgrounds: import UIKit import Combine struct User: Codable { let userId: Int let id: Int let title: String let completed: Bool } struct Download { private var cancellables = Set<AnyCancellable>() mutating func request() async -> User { return await withCheckedContinuation { continuation in URLSession.shared .dataTaskPublisher(for: URL(string: "https://jsonplaceholder.typicode.com/todos/1")!) .map{$0.data} .decode(type: User.self, decoder: JSONDecoder()) .receive(on: DispatchQueue.main) .sink(receiveCompletion: { print ("Received completion: \($0).") }, receiveValue: { data in continuation.resume(returning: data) }) .store(in: &cancellables) } } } Task { var download = Download() let user = await download.request() print(user) }
Topic: Programming Languages SubTopic: Swift Tags:
Apr ’23
Reply to Can the app access the voice files in the system voice memos?
Not allowed due to privacy considerations.
Topic: Media Technologies SubTopic: General Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to App Store rejected my app 5.1.1 Guidelines, However live apps has similar case.
In North America medical advice is regulated hence you're either a medical institution or a licensed doctor providing such information or proof that the work was done on behalf of such. Hence the rejection. Each case is a special case meaning you don't know what the other developers provided to Apple prior to Approval.
Replies
Boosts
Views
Activity
Mar ’23
Reply to Detect iPhone is locked for esim provisioning.
CTCarrier is deprecated since iOS 16.0 and will be returning stubbed data.
Replies
Boosts
Views
Activity
Mar ’23
Reply to Complaint about machine learning Apple killing background location
Align your perspective with reality and the privacy alignment of APIs Apple is trying to move towards.
Replies
Boosts
Views
Activity
Mar ’23
Reply to iCloud Drive Corrupting Xcode Projects
it becomes unresponsive if the resources need to sync between apple iCloud and the temporary folder compounded by internet speed and size of each object.
Replies
Boosts
Views
Activity
Mar ’23
Reply to iOS 16.4: UISearchTextField.resignFirstResponder() --> app hangs, CPU 100%
You can try checking to see if the control is still the first responder before resigning it also remove the DLog as well and see what happens.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to Xcode 14.3 cannot read c++
I created a new project with no issues. Maybe paths in your build settings are incorrect.
Replies
Boosts
Views
Activity
Apr ’23
Reply to Invites not being sent to Internal Testers in TestFlight
Confirm if the invited user responded to the invite.
Replies
Boosts
Views
Activity
Apr ’23
Reply to Please Create a Sendable Version of CKRecord or Make CKRecord Sendable
You can take responsibility for it being Sendable. By default the Sendable protocol is made unavailable to CKRecord. extension CKRecord : @unchecked Sendable { } But these are the supported types that are sendable by default. https://developer.apple.com/documentation/swift/sendable NSFoundation types mention above NSStrings, NSData will not be Sendable but the Swift Foundation types Strings, Data are.
Replies
Boosts
Views
Activity
Apr ’23
Reply to 400, 401 and 403 errors whilst trying to fetch private repos from Github API.
Check your inbox, GitHub recently sent out emails to certain users requiring them to adopt a new login protocol depending on their account type.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to Is it required or just suggested that I should make an iPad/Mac app
Not required but it extends your potential user base across the Apple ecosystem. Consider Apple Watch support also but it is not required.
Replies
Boosts
Views
Activity
Apr ’23
Reply to What can I use for 2D assets?
Google is your friend
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to What can I use for 2D assets?
Google is your friend.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to Combine AnyCancellable.store(in:) EXC_BAD_ACCESS
Making request async is the issue. This version works without issue in playgrounds: import UIKit import Combine struct User: Codable { let userId: Int let id: Int let title: String let completed: Bool } struct Download { private var cancellables = Set<AnyCancellable>() mutating func request() { URLSession.shared .dataTaskPublisher(for: URL(string: "https://jsonplaceholder.typicode.com/todos/1")!) .map{$0.data} .decode(type: User.self, decoder: JSONDecoder()) .receive(on: DispatchQueue.main) .sink(receiveCompletion: { print ("Received completion: \($0).") }, receiveValue: { data in print(data) }) .store(in: &cancellables) } } var download = Download() download.request() or making request async as follows in playgrounds: import UIKit import Combine struct User: Codable { let userId: Int let id: Int let title: String let completed: Bool } struct Download { private var cancellables = Set<AnyCancellable>() mutating func request() async -> User { return await withCheckedContinuation { continuation in URLSession.shared .dataTaskPublisher(for: URL(string: "https://jsonplaceholder.typicode.com/todos/1")!) .map{$0.data} .decode(type: User.self, decoder: JSONDecoder()) .receive(on: DispatchQueue.main) .sink(receiveCompletion: { print ("Received completion: \($0).") }, receiveValue: { data in continuation.resume(returning: data) }) .store(in: &cancellables) } } } Task { var download = Download() let user = await download.request() print(user) }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to Xcode 14.3 not building app in iOS 16.4
Did you enable developer mode in settings app privacy & security?
Replies
Boosts
Views
Activity
Apr ’23