Post

Replies

Boosts

Views

Activity

Reply to Transfer data on return
Read here swift guide on closures. class VCText: UIViewController { ... var completionHandler: (([addCatogrey])->Void)? ... @IBAction func doneBtnClicke(_ sender: Any) { ... /// return a copy of the array no need to create the object already added to the array a second time as done in your code using the delegate protocol pattern completionHandler?(arrS1) } } In view controller A ... let vc = self.storyboard?.instantiateViewController(withIdentifier: "VCText") as! VCText vc.delgateText = self // get rid of this /// define body of completion handler here vc.completionHandler = { array in /// do something with the array in view controller A } ...
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’22
Reply to Cloudkit - Coredata and multiples database
You need to associate the test & prod with its own container id. Add them via Xcode iCloud capabilities containers list. let testContainerID = NSPersistentCloudKitContainerOptions(containerIdentifier:"your_bundle_id.test") let prodContainerID = NSPersistentCloudKitContainerOptions(containerIdentifier:"your_bundle_id.prod") Assign each container ID to the respective data store
Jan ’22
Reply to How to remove duplicate objects from CoreData in Swift?
Actually the above will wipe all of your records because it doesn't select the winning objectID out of the collection of multiple results. Any good database design begins with data normalization, unique keys etc ...: Take a look at the following code by apple on how to dedupe core data records: https://developer.apple.com/documentation/coredata/synchronizing_a_local_store_to_the_cloud see CoreDataStack class
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’22
Reply to Apple Sign In Button does not work properly
The following and your code above works perfectly fine on a real device, not the simulator:         VStack {             SignInWithAppleButton(.continue) { request in                 request.requestedScopes = [.email, .fullName]             } onCompletion: { result in                 switch result {                 case .success(let auth):                     guard let credential = auth.credential as? ASAuthorizationAppleIDCredential,                     let email = credential.email else { return }                     print("\(email)")                 case .failure(let error):                     print(error.localizedDescription)                 }             }         }.frame(width: 80, height: 28, alignment: .center)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’22
Reply to App Store Review Guidelines 5.1.1 (ix) - Account delete requirement for banking apps
Someone in Apple certainly doesn’t understand how banking institutions function! I think there should be push back on this from banks because any solution is going result is a call to a call center that is going to go no where when someone has a mortgage, and other owed balances and this nonsense of giving the customer the illusion they can just delete their account was not planned out properly by Apple.
Topic: Privacy & Security SubTopic: General Tags:
Jan ’22
Reply to iPhone Orientation Impacting Tab View within a Navigation View
This is the order. The NavigationView encapsulates each Primary view of the tab view item. The TabView encapsulates all of the NavigationViews TabView {                 NavigationView { TabAView()                 }                 .tabItem {                     Label {                         Label("Tab A", systemImage: "house.circle.fill")                     } icon: {                         Image(systemName: "clock")                     }                 }                 .tag(Tabs.taba)                 NavigationView { TabBView()                 }                 .tabItem {                     Label {                         Label("Tab B", systemImage: "house.circle.fill")                     } icon: {                         Image(systemName: "clock")                     }                 }                 .tag(Tabs.tabb) }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’22
Reply to Transfer data on return
Read here swift guide on closures. class VCText: UIViewController { ... var completionHandler: (([addCatogrey])->Void)? ... @IBAction func doneBtnClicke(_ sender: Any) { ... /// return a copy of the array no need to create the object already added to the array a second time as done in your code using the delegate protocol pattern completionHandler?(arrS1) } } In view controller A ... let vc = self.storyboard?.instantiateViewController(withIdentifier: "VCText") as! VCText vc.delgateText = self // get rid of this /// define body of completion handler here vc.completionHandler = { array in /// do something with the array in view controller A } ...
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to Cloudkit - Coredata and multiples database
You need to associate the test & prod with its own container id. Add them via Xcode iCloud capabilities containers list. let testContainerID = NSPersistentCloudKitContainerOptions(containerIdentifier:"your_bundle_id.test") let prodContainerID = NSPersistentCloudKitContainerOptions(containerIdentifier:"your_bundle_id.prod") Assign each container ID to the respective data store
Replies
Boosts
Views
Activity
Jan ’22
Reply to Xcode compilation is unusually slow -- Monterey
Stop building the benchmark project and focus on creating something.
Replies
Boosts
Views
Activity
Jan ’22
Reply to BigSur fortran not compiling
Just make sure the command line tools version matches the Xcode version installed. Best to download Xcode 13.2.1 and the matching version of command-line tools.
Replies
Boosts
Views
Activity
Jan ’22
Reply to How to remove duplicate objects from CoreData in Swift?
Actually the above will wipe all of your records because it doesn't select the winning objectID out of the collection of multiple results. Any good database design begins with data normalization, unique keys etc ...: Take a look at the following code by apple on how to dedupe core data records: https://developer.apple.com/documentation/coredata/synchronizing_a_local_store_to_the_cloud see CoreDataStack class
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to Installing font system wide
I regret to inform you this is not possible. You're limited to everything within the app sandbox and codebase resources.
Replies
Boosts
Views
Activity
Jan ’22
Reply to Apple Sign In Button does not work properly
The following and your code above works perfectly fine on a real device, not the simulator:         VStack {             SignInWithAppleButton(.continue) { request in                 request.requestedScopes = [.email, .fullName]             } onCompletion: { result in                 switch result {                 case .success(let auth):                     guard let credential = auth.credential as? ASAuthorizationAppleIDCredential,                     let email = credential.email else { return }                     print("\(email)")                 case .failure(let error):                     print(error.localizedDescription)                 }             }         }.frame(width: 80, height: 28, alignment: .center)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to LayoutConstraints error from NavigationView with navigationTitle
Xcode 13.2.1 and we still have the issue When the iPhone is in the landscape orientation.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to App Store Review Guidelines 5.1.1 (ix) - Account delete requirement for banking apps
Someone in Apple certainly doesn’t understand how banking institutions function! I think there should be push back on this from banks because any solution is going result is a call to a call center that is going to go no where when someone has a mortgage, and other owed balances and this nonsense of giving the customer the illusion they can just delete their account was not planned out properly by Apple.
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to Automate the Install of Xcode Command Line Tools
somethings just require human oversight.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to Hybrid iOS app is not showing up auth-Prompt screen for New Kerberos SSO - credential based auth challenge.
That is an issue you'll have to raise with the Cordova github repo.
Replies
Boosts
Views
Activity
Jan ’22
Reply to Why does the computation time for boundingRect of NSAttributedString become significantly longer in iOS15.2?
Is this on a background thread or a main thread.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to Where do I get the official apple logo files?
Because there isn't any.
Replies
Boosts
Views
Activity
Jan ’22
Reply to iPhone Orientation Impacting Tab View within a Navigation View
This is the order. The NavigationView encapsulates each Primary view of the tab view item. The TabView encapsulates all of the NavigationViews TabView {                 NavigationView { TabAView()                 }                 .tabItem {                     Label {                         Label("Tab A", systemImage: "house.circle.fill")                     } icon: {                         Image(systemName: "clock")                     }                 }                 .tag(Tabs.taba)                 NavigationView { TabBView()                 }                 .tabItem {                     Label {                         Label("Tab B", systemImage: "house.circle.fill")                     } icon: {                         Image(systemName: "clock")                     }                 }                 .tag(Tabs.tabb) }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to React Native app doesn't load on IOS versions 11 and 12
Please take this question to the React Native Github Issues for answers.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jan ’22