Dive into the world of programming languages used for app development.

All subtopics

Post

Replies

Boosts

Views

Activity

FileProvider Extension not working when code signed
My project has a base app which is manually signed, inside I have a FileProvider parent app and extension. When things works elegantly in Xcode debug build when I run FP App. But, when I package it, the FileProvider can't mount, fails with a generic error on parent app (Error Domain=NSFileProviderErrorDomain Code=-2001 "The application cannot be used right now." UserInfo={NSLocalizedDescription=The application cannot be used right now.} Another generic error in FileProvider demon fileproviderd(488) deny(1) file-read-data /Applications/XYZ.app/Contents/Resources/FileFP.app How to solve this?
2
0
1.6k
Apr ’23
Undefined Symbols in Linking iOS App
Hi! Xcode 14.3 on MacOS 13.3.1 I'm developing in iOS app targeting iOS 14.0 and higher. I've included 4 cocoa pods in my project and my code has compiled and run just fine. When I started to try to build an archive to submit to the app store, things started falling apart. Now nothing compiles for simulators and test devices and I end up with linking errors with undefined symbols. I've tried clean builds, pod updating, pod installing, explicitly importing the modules in my swift code. I'm ready to pull my hair out. Undefined symbols for architecture arm64: "OBJC_CLASS$_SFGeometryUtils", referenced from: objc-class-ref in MGRS.o ld: symbol(s) not found for architecture arm64 Any suggestions? Randomly I can get past this road block and then I run into: cannot find type 'TIFFImage' in scope var tiffImage: TIFFImage! Then randomly back to unresolved symbols by linker. Thanks, Bobby
6
0
15k
May ’23
GoogleSignIn swift package breaks my watchOS app preview
I need to install the GoogleSignIn for my iOS application, and I did so. The issue is that the watchOS app inside the project stops working because of build failures that are caused by the GoogleSignIn package. I cannot figure how to fix it, because inside the project settings, that package appears in the list of Frameworks for the iOS target, and is not present into the list of Frameworks for the watchOS target, as you can see in the first image below.
2
1
962
May ’23
Cycle inside my app on XCode 15 beta
I cannot run my app, I get this error. I installed xcode 15 beta on my mac m2 pro, also I have macOS Sonoma (v14.0) installed. In previous code versions the code was able to run. Cycle inside Appname; building could produce unreliable results. Cycle details: → Target 'Appname': ExtractAppIntentsMetadata ○ Target 'Appname': CodeSign /Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/Build/Products/Debug-iphoneos/Appname.app/Frameworks/APGconnect.framework ○ Target 'Appname' has copy command from '/Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/SourcePackages/artifacts/apgconnect-swiftpackagemanager/APGconnect/APGconnect.xcframework/ios-arm64/APGconnect.framework' to '/Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/Build/Products/Debug-iphoneos/Appname.app/Frameworks/APGconnect.framework' ○ That command depends on command in Target 'Appname': script phase “Firebase Crashlytics” ○ Target 'Appname' has a command with output '/Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/Build/Products/Debug-iphoneos/Appname.app.dSYM' ○ Target 'Appname' has process command with output '/Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/Build/Products/Debug-iphoneos/Appname.app/Info.plist' ○ Target 'Appname' has copy command from '/Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/SourcePackages/artifacts/apgconnect-swiftpackagemanager/APGconnect/APGconnect.xcframework/ios-arm64/APGconnect.framework' to '/Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/Build/Products/Debug-iphoneos/Appname.app/Frameworks/APGconnect.framework' Raw dependency cycle trace: target: -> node: -> command: -> node: /Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/Build/Intermediates.noindex/Appname.build/Debug-iphoneos/Appname.build/Objects-normal-ubsan/arm64/ExtractedAppShortcutsMetadata.stringsdata -> command: P0:target-Appname-e523191a5dddb74851b7e061f613cdd207daf3e2cc00aeba593ba12e8843cae3-:Debug:ExtractAppIntentsMetadata -> node: -> command: P0:::Gate target-Appname-e523191a5dddb74851b7e061f613cdd207daf3e2cc00aeba593ba12e8843cae3--package-copy-files-phase -> node: <CodeSign /Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/Build/Products/Debug-iphoneos/Appname.app/Frameworks/APGconnect.framework> -> command: P0:target-Appname-e523191a5dddb74851b7e061f613cdd207daf3e2cc00aeba593ba12e8843cae3-:Debug:CodeSign /Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/Build/Products/Debug-iphoneos/Appname.app/Frameworks/APGconnect.framework -> node: <Copy /Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/Build/Products/Debug-iphoneos/Appname.app/Frameworks/APGconnect.framework> -> CYCLE POINT -> command: P0:target-Appname-e523191a5dddb74851b7e061f613cdd207daf3e2cc00aeba593ba12e8843cae3-:Debug:Copy /Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/Build/Products/Debug-iphoneos/Appname.app/Frameworks/APGconnect.framework /Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/SourcePackages/artifacts/apgconnect-swiftpackagemanager/APGconnect/APGconnect.xcframework/ios-arm64/APGconnect.framework -> node: -> command: P0:::Gate target-Appname-e523191a5dddb74851b7e061f613cdd207daf3e2cc00aeba593ba12e8843cae3--fused-phase8--cp--copy-pods-resources -> node: /Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/Build/Intermediates.noindex/Appname.build/Debug-iphoneos/Appname.build/InputFileList-8F69F04ECE39CEA4D548803F-Pods-App-Appname-resources-Debug-input-files-6b988fea851b169d138afd42359e554e-resolved.xcfilelist -> command: P2:target-Appname-e523191a5dddb74851b7e061f613cdd207daf3e2cc00aeba593ba12e8843cae3-:Debug:WriteAuxiliaryFile /Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/Build/Intermediates.noindex/Appname.build/Debug-iphoneos/Appname.build/InputFileList-8F69F04ECE39CEA4D548803F-Pods-App-Appname-resources-Debug-input-files-6b988fea851b169d138afd42359e554e-resolved.xcfilelist -> node: -> command: P0:::Gate target-Appname-e523191a5dddb74851b7e061f613cdd207daf3e2cc00aeba593ba12e8843cae3--fused-phase7--cp--embed-pods-frameworks -> node: /Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/Build/Intermediates.noindex/Appname.build/Debug-iphoneos/Appname.build/InputFileList-9C4DC43DDD1B70E883929F7A-Pods-App-Appname-frameworks-Debug-input-files-67ca94915dc637813d7d2b89d288f680-resolved.xcfilelist -> command: P2:target-Appname-e523191a5dddb74851b7e061f613cdd207daf3e2cc00aeba593ba12e8843cae3-:Debug:WriteAuxiliaryFile /Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/Build/Intermediates.noindex/Appname.build/Debug-iphoneos/Appname.build/InputFileList-9C4DC43DDD1B70E883929F7A-Pods-App-Appname-frameworks-Debug-input-files-67ca94915dc637813d7d2b89d288f680-resolved.xcfilelist -> node: -> command: P0:::Gate target-Appname-e523191a5dddb74851b7e061f613cdd207daf3e2cc00aeba593ba12e8843cae3--fused-phase6-firebase-crashlytics -> node: -> command: P2:target-Appname-e523191a5dddb74851b7e061f613cdd207daf3e2cc00aeba593ba12e8843cae3-:Debug:PhaseScriptExecution Firebase Crashlytics /Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/Build/Intermediates.noindex/Appname.build/Debug-iphoneos/Appname.build/Script-B66C911C2756492F00413DA0.sh -> node: /Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/Build/Products/Debug-iphoneos/Appname.app.dSYM/Contents/Resources/DWARF/Appname/ -> directoryTreeSignature: � -> directoryContents: /Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/Build/Products/Debug-iphoneos/Appname.app.dSYM/Contents/Resources/DWARF/Appname -> node: /Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/Build/Products/Debug-iphoneos/Appname.app.dSYM/Contents/Resources/DWARF/Appname ->
7
8
11k
Jun ’23
Xcode 15 beta 1 failed to preview SwiftUI view in watchOS target
Hello! I can't preview the SwiftUI views of watchOS target in Xcode 15 beta 1, when the containing iOS app has a SPM dependency. Reproducing steps: Create a new watchOS app project (with a companion iOS app) in Xcode 15. Both iOS and watchOS ContentView can be previewed at this step. Add a Swift package to the iOS target (the package should be an iOS-specific package, not a watchOS one, for example, https://github.com/siteline/SwiftUI-Introspect) After you add the static library to iOS target, the watchOS preview no longer work anymore. If you check the error message, you can find the Xcode preview attempt to build the iOS package against watchOS SDK.
8
6
3.4k
Jun ’23
App hangs while opening from background
Hi, My app hangs for about a second when I open the app when it's been in background phase. It doesn't hang every time, but it hangs randomly (like once in 10 times) when I open the app again. I am not able to reproduce what causes this hang. Hang Detection provides hang logs (spindump) when hang occurs. It has something to do with MusicKit as logs mention it but I cannot understand what it is. Please help me understand these logs. I am running iOS 17 beta 1 with MusicKit and ApplicationMusicPlayer. Heaviest stack for the main thread of the target process: 69 start + 2104 (dyld + 87288) [0x1b719b4f8] 69 ??? (Timed + 32864) [0x104ae8060] 69 ??? (SwiftUI + 980040) [0x19840a448] 69 ??? (SwiftUI + 1071088) [0x1984207f0] 69 ??? (SwiftUI + 1667804) [0x1984b22dc] 69 UIApplicationMain + 340 (UIKitCore + 3740336) [0x196c602b0] 69 -[UIApplication _run] + 888 (UIKitCore + 3741260) [0x196c6064c] 69 GSEventRunModal + 164 (GraphicsServices + 4644) [0x1d6199224] 69 CFRunLoopRunSpecific + 600 (CoreFoundation + 527792) [0x1947fedb0] 68 __CFRunLoopRun + 1996 (CoreFoundation + 509348) [0x1947fa5a4] 68 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CoreFoundation + 626340) [0x194816ea4] 68 _dispatch_main_queue_callback_4CF + 44 (libdispatch.dylib + 75296) [0x19c404620] 67 _dispatch_main_queue_drain + 744 (libdispatch.dylib + 76056) [0x19c404918] 67 swift_job_runImpl(swift::Job*, swift::ExecutorRef) + 72 (libswift_Concurrency.dylib + 274348) [0x19f58cfac] 67 swift::runJobInEstablishedExecutorContext(swift::Job*) + 416 (libswift_Concurrency.dylib + 269688) [0x19f58bd78] 66 ??? (MusicKit + 4857464) [0x208aabe78] 66 ??? (MusicKit + 4856108) [0x208aab92c] 66 -[MusicKit_SoftLinking_MPMusicPlayerController nowPlayingItem] + 24 (MusicKit + 157364) [0x2086306b4] 66 -[MPMusicPlayerController nowPlayingItem] + 24 (MediaPlayer + 1358540) [0x1a681bacc] 66 -[MPMusicPlayerController _nowPlaying] + 372 (MediaPlayer + 1329552) [0x1a6814990] 66 -[MPMusicPlayerController onServer:] + 52 (MediaPlayer + 1333428) [0x1a68158b4] 63 -[MPMusicPlayerApplicationController _establishConnectionIfNeeded] + 1768 (MediaPlayer + 1553848) [0x1a684b5b8] 63 _NSXPCDistantObjectSimpleMessageSend1 + 60 (Foundation + 208348) [0x1937daddc] 63 -[NSXPCConnection _sendSelector:withProxy:arg1:] + 116 (Foundation + 208548) [0x1937daea4] 62 -[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:] + 2160 (Foundation + 214664) [0x1937dc688] 62 __NSXPCCONNECTION_IS_WAITING_FOR_A_SYNCHRONOUS_REPLY__ + 16 (Foundation + 652944) [0x193847690] 62 xpc_connection_send_message_with_reply_sync + 264 (libxpc.dylib + 67488) [0x1fc00d7a0] 62 dispatch_mach_send_with_result_and_wait_for_reply + 60 (libdispatch.dylib + 127760) [0x19c411310] 62 _dispatch_mach_send_and_wait_for_reply + 540 (libdispatch.dylib + 126832) [0x19c410f70] 62 mach_msg + 24 (libsystem_kernel.dylib + 4692) [0x1da082254] 62 mach_msg_overwrite + 436 (libsystem_kernel.dylib + 83544) [0x1da095658] 62 mach_msg2_trap + 8 (libsystem_kernel.dylib + 3332) [0x1da081d04] *62 ??? (<31E57057-A9A0-3BE5-90CB-5C08E9683B34> + 217132) [0xfffffff007e0102c] Thank you. CC @JoeKun
2
0
1.3k
Jun ’23
XCode 14.3.x and XCode 15 Beta Hangs On Compiling
We have a 7-year old codebase that uses a mix of frameworks including Rx and Firebase through Cocoapods. The compilation works fine up to XCode 14.2 but for some unknown reason the compilation just stuck / hang on XCode 14.3.x and XCode 15. There are several warnings in the codebase but the compiler does not output any error. Which is why we don't know what the exact issue(s) is/are. What's the change in XCode 14.3.x that could be causing this issue? If anyone has an idea on possible fix, willing to try it out.
2
0
1.4k
Jun ’23
Conversion from Base64 Public Key Data to SecKey and convert back from SecKey to Public Key Data are not the same. How can i resolve this?
I am trying to convert publicKeyFromDongleData to SecKey, then perform some tasks. After that, I want to convert SecKey to b64 String. I am assuming that publicKeyFromDongleData and b64 string will be the same. But, surprisingly, they are not the same. How can i resolve the issue? Is there any way around? My goal is to retain the public key before and after converting the same. let publicKeyFromDongleData = Data.init(base64Encoded: publicKeyFromDongle) guard let publicKeySecKey = SecKeyCreateWithData(publicKeyFromDongleData! as CFData, keyDict as CFDictionary, &amp;error) else { print("Failed to create public key:", error!.takeRetainedValue()) return nil } //var error:Unmanaged&lt;CFError&gt;? if let cfdata = SecKeyCopyExternalRepresentation(publicKeySecKey, &amp;error) { let data:Data = cfdata as Data let b64Key = data.base64EncodedString() print("after : \n") print(b64Key) }
3
0
1.1k
Jun ’23
macOS get SSID changes?
I've had a little personal utility running for several versions of macOS that uses let client = CWWiFiClient.shared() if let ssid_name = client.interface()?.ssid() to get the current SSID name and prints it (along with a bunch of other active network details. With the most recent Sonoma Beta 2 and Xcode beta 2, this always returns nil. Doing the same thing in a playground works as expected. Is this a purposeful change or a bug I should file?
30
2
6.4k
Jun ’23
Unable to Verify App: An internet connection is required to verify the trust of the developer' ... This app will not be available until verified.
We are working on a new iOS application utilizing the new iOS 17 APIs, and I have updated Xcode to Xcode 15 Beta, and my iPhone 12 Pro to iOS 17 Beta 2, though this issue was also present on iOS 17 Beta 1. In Xcode, for "Signing and Capabilities" I have my Team set to my personal team, utilizing the "Automatically manage signing" tick. While the app will build and install on my phone, I immediately receive this error, with no popup to trust the developer. Going to Settings > General > VPN and Device Management, I can see my Development Team, and I am able to Trust my team. When trying to then Verify App(s), it tells me it will use my internet connection to verify the application. However, it will then do nothing, with no error, regardless of how many times I attempt to verify. Trying to open the app from my home screen will result in the repeated "Unable to Verify Error". Trying to reset network settings does not result in any change in this behavior, nor does a reset of the phone. I have tried 4 different high quality WiFi networks, as well as a fully connection AT&T cellular LTE connection, and still receive this error. I am running out of diagnostic scenarios, and I'm curious if anyone has found a resolution to this?
39
11
34k
Jun ’23
iPadOS: [API] Failed to create 0x88 image slot (alpha=1 wide=0) (client=0xfbe80e61) [0x5 (os/kern) failure]
I got the error "[API] Failed to create 0x88 image slot (alpha=1 wide=0) (client=0xfbe80e61) [0x5 (os/kern) failure]" when using NavigationStack of SwiftUI for navigation. It only happen in iPadOS (16.4) but not iOS in iPhone. Below is the view I am using. struct NewView: View { var body: some View { NavigationStack { VStack { NavigationLink("Show Detail View") { DetailView() } } .navigationTitle("Navigation") } } } struct DetailView: View { var body: some View { Text("This is the detail view") } } Anyone know the reason?
3
1
2.5k
Jun ’23
[WindowHosting] UIScene property of UINSSceneViewController was accessed before it was set. What does this mean?
Getting this error several times when presenting a modal window over my splitview window when running it on my Mac using Swift/Mac Catalyst in XCode 14.2. When I click the Cancel button in the window then I get Scene destruction request failed with error: (null) right after an unwind segue. 2023-07-04 16:50:45.488538-0500 Recipes[27836:1295134] [WindowHosting] UIScene property of UINSSceneViewController was accessed before it was set. 2023-07-04 16:50:45.488972-0500 Recipes[27836:1295134] [WindowHosting] UIScene property of UINSSceneViewController was accessed before it was set. 2023-07-04 16:50:45.496702-0500 Recipes[27836:1295134] [WindowHosting] UIScene property of UINSSceneViewController was accessed before it was set. 2023-07-04 16:50:45.496800-0500 Recipes[27836:1295134] [WindowHosting] UIScene property of UINSSceneViewController was accessed before it was set. 2023-07-04 16:50:45.994147-0500 Recipes[27836:1295134] Unbalanced calls to begin/end appearance transitions for <UINavigationController: 0x7f7fdf068a00>. bleep 2023-07-04 16:51:00.655233-0500 Recipes[27836:1297298] Scene destruction request failed with error: (null) I don't quite understand what all all this means. (The "bleep" was a debugging print code I put in the unwind segue). I'm working through Apple's Mac Catalyst tutorial but it seems to be riddled with bugs and coding issues, even in the final part of the completed app which I dowmloaded and ran. I don't see these problems on IPad simulator. I don't know if it's because Catalyst has problems itself or there's something else going on that I can fix myself. Any insight into these errors would be very much appreciated! PS: The app seems to run ok on Mac without crashing despite the muliple issues
4
3
1.3k
Jul ’23
Querying HealthKit for Manually-Entered Medication
I'm trying to query HealthKit for all of users medications, including prescribed medications and user-entered medications. Using a HKSampleQuery with type HKClinicalTypeIdentifierMedicationRecord, I'm able to fetch medications that have been prescribed by a healthcare provider (eg medications associated with clinical FHIR records): let type = HKClinicalType(.medicationRecord) let predicate = HKQuery.predicateForClinicalRecords(withFHIRResourceType: .medicationStatement) let query = HKSampleQuery(sampleType: type, predicate: predicate, limit: kRecordLimit, sortDescriptors: nil) { q, samples, error in // this returns only -clinical- records // it doesnt include manually entered meds } However, medications which I have manually entered into the Health app with a user-defined schedule and dosing do NOT appear in the results of this query. is it possible to fetch medications which have been manually entered by the user?
3
2
1.2k
Jul ’23
Sign in with Apple button dark mode in Swift
I implemented Sign in with Apple but in all cases the button is always black. I would like to show it in light/ dark mode depending on the phone settings. This is my code: class MyAuthorizationAppleIDButton: UIButton { private var authorizationButton: ASAuthorizationAppleIDButton! @IBInspectable var cornerRadius: CGFloat = 3.0 @IBInspectable var authButtonType: Int = ASAuthorizationAppleIDButton.ButtonType.default.rawValue @IBInspectable var authButtonStyle: Int = ASAuthorizationAppleIDButton.Style.black.rawValue override public init(frame: CGRect) { super.init(frame: frame) } required public init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) } override public func draw(_ rect: CGRect) { super.draw(rect) // Create ASAuthorizationAppleIDButton authorizationButton = ASAuthorizationAppleIDButton(authorizationButtonType: .signIn, authorizationButtonStyle: .black) let type = ASAuthorizationAppleIDButton.ButtonType.init(rawValue: authButtonType) ?? .default let style = ASAuthorizationAppleIDButton.Style.init(rawValue: authButtonStyle) ?? .black authorizationButton = ASAuthorizationAppleIDButton(authorizationButtonType: type, authorizationButtonStyle: style) authorizationButton.cornerRadius = cornerRadius // Show authorizationButton addSubview(authorizationButton) // Use auto layout to make authorizationButton follow the MyAuthorizationAppleIDButton's dimension authorizationButton.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ authorizationButton.topAnchor.constraint(equalTo: self.topAnchor, constant: 0.0), authorizationButton.leadingAnchor.constraint(equalTo: self.leadingAnchor, constant: 0.0), authorizationButton.trailingAnchor.constraint(equalTo: self.trailingAnchor, constant: 0.0), authorizationButton.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: 0.0), ]) } } So basically with the code above, I can set on Storyboard the style of the button but it seems that even if I change the value at my code, the result is based on what I chose on Storyboard's variable. Is there any solution where I would be able to show the button in light/ dark mode depending on the phone settings ?
2
1
865
Jul ’23
How to declare Privacy manifest
It is stated that From Fall 2023 you’ll receive an email from Apple if you upload an app to App Store Connect that uses required reason API without describing the reason in its privacy manifest file. From Spring 2024, apps that don’t describe their use of required reason API in their privacy manifest file won’t be accepted by App Store Connect. There are some answers here : https://developer.apple.com/videos/play/wwdc2023/10060/ but far from answering all questions. I have questions on how to implement: Where exactly is the privacy manifest ? How to create it, from which file template in Xcode ? WWDC speaks of a PrivacyInfo.xcprivacy (does it require a more recent version of Xcode than 14.2). WWDC describes a framework case. Is it the same for a "final" app ? is there a specific format for describing the reason ? Or just plain text. Is this text visible to the user or only to reviewer ? does it apply retroactively to apps already in AppStore (do they need to be resubmitted ?). It seems not. So I tried, in an iOS App, to declare the PrivacyInfo.xcprivacy as explained, with Xcode 14.2, using plist template, to no avail. Really not clear on how to proceed or even start… We would need a clear step by step tutorial with all prerequisites (Xcode or MacOS versions needed for instance).
14
1
15k
Jul ’23
Xcode15 beat5 debug extramely slow
the xcode will freze for 3mins when hit a breakpoint. it report "Fetching variables on ***'s iPhone" it happens when hit a new breakpoint, and the xcode will freeze for 3mins, then it will be ok. anysolution? its wasting my time. the xcode continue print the log below: (arm64) /Users/xx/Desktop/patch/Project/Pods/TestSDK/vendor/***.framework/***(FPEncryptMsg.pb-c.o) 0x00000c22: unable to locate module needed for external types: /Users/packagedevice/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/38MC9CUKFC6LS/Darwin-MI6WZSG1PNOM.pcm error: '/Users/packagedevice/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/38MC9CUKFC6LS/Darwin-MI6WZSG1PNOM.pcm' does not exist Debugging will be degraded due to missing types. Rebuilding the project will regenerate the needed module files. Our project has many dependencies which are binary file. And these dependencies are build in the remote serve。Anyone has ideas about this
2
2
1.7k
Aug ’23
Find the name of a CNContact's group (CNGroupName)
So I only recently uncovered the Contacts Framework through this video: https://youtu.be/sHKir2ZMk5Q. As such I'm not yet accustomed to the API. Basically my main problem is that I can't seem to find a way to access the name of the group a CNContact is in. The only support I can find is in Apple's own documentation, which isn't very helpful. if someone could point me in the right direction towards how to print the group name, I would be very grateful. My code is below, Cheers // ModelData.swift // B-Day import Foundation import Contacts import SwiftUI struct Contact: Identifiable { let id = UUID() let category: String let firstName: String let lastName: String let birthday: DateComponents? } func fetchAllContacts() async -&gt; [Contact] { var contacts = [Contact]() let store = CNContactStore() let keys = [CNContactGivenNameKey, CNContactFamilyNameKey, CNContactBirthdayKey, CNContactIdentifierKey, CNGroupNameKey] as [CNKeyDescriptor] let fetchRequest = CNContactFetchRequest (keysToFetch: keys) do { try store.enumerateContacts(with: fetchRequest, usingBlock: { contact, result in //this should print the name of the contact's group print(contact.groupName) contacts.append(Contact(category: contact.groupName, firstName: contact.givenName, lastName: contact.familyName, birthday: contact.birthday)) }) } catch { print("Error") } return contacts }
1
0
812
Aug ’23