Frameworks

RSS for tag

Ask questions about APIs that can drive features in your apps.

Posts under Frameworks tag

196 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

nw_interface_radio_type_t
我想用Network.framework中path_monitor来监听网络状态的变化,在Network.framework的interface.h中有一个枚举定义nw_interface_radio_type_t,我没有找到关于它的使用方法。 I want to use path_monitor in Network.framework to monitor changes in network status. There is an enumeration definition nw_interface_radio_type_t in interface.h of Network.framework. I have not found how to use it.
1
0
292
Mar ’24
Cannot load module '***' built with SDK 'iphoneos16.4' when using SDK 'iphoneos17.0'
While building xcode is giving me the **** error Cannot load module '***' built with SDK 'iphoneos16.4' when using SDK 'iphoneos17.0': /Users/***/Library/Developer/Xcode/DerivedData/project-biopprgumksoaqgnrhztiivzzjkq/Build/Products/Debug-iphoneos/Turf.framework/Modules/Turf.swiftmodule/arm64-apple-ios.swiftmodule It's working fine on xcode 14.3 but giving error on xcode 15
1
0
848
Mar ’24
Runner/Frameworks Files Are Not Created
I am creating a project with Flutter, but in the Runner/Frameworks folder, all files such as Pods_Runner.framework etc. are red and the file is not located in the specified folder. The same situation exists in my old projects. I don't know where I'm doing wrong, it was normal until a few days ago, but now even if I create a new project, I get the same error. Flutter Version: 3.13.9 Cocoapods Version: 1.15.2 XCode: 15.1
0
0
201
Mar ’24
Very bad journal suggestion api!!!
Why not give devs pvt file bundle, with only image and video, it's not live photo!!! I can't use the quick look framework to preview it, and I also can't share to another app as live photo example: save it back to photos or share it by iMessage 🙄 . I can't understand this design, why not any detail? Another thing is so bad, the music data type has no store ID for musickit play item, so the Apple Journal app can play the music, but other apps can't do it! The live photo is the same. What are you doing Apple?
1
0
383
Mar ’24
'CLBeaconIdentityCondition' in scope
With Xcode 15.3, iOS SDK 17.4, in a iOS App, I have this error : TestClass.swift:11:27: error: cannot find 'CLBeaconIdentityCondition' in scope let beaconCondition = CLBeaconIdentityCondition(uuid: UUID(uuidString: "12345678-1234-1234-1234-123456789012"), major: 1, minor: 2) I can reproduce with this swift code : import CoreLocation class TestClass: NSObject{ let beaconCondition = CLBeaconIdentityCondition(uuid: UUID(uuidString: "12345678-1234-1234-1234-123456789012"), major: 1, minor: 2) } And this compilation command : xcrun swiftc -target arm64-apple-ios17.4 -sdk $(xcrun --sdk iphoneos --show-sdk-path) -emit-executable TestClass.swift -o TestClassExecutable -F /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks -framework CoreLocation
1
0
186
Mar ’24
Is codeSignature required for static framework? (xcode)
0 In other frameworks, I've seen codeSignature included in dynamic cases. because dynamic frameworks have "embed and sign" option. but this time Apple said, "Signatures are so required in these cases where the listed SDKs are used as binary dependencies." Does that mean that even if the ".framework" file of the SDK you are deploying is static, you have to include codeSignature? and if a framework is not included in Privacy-Impacting SDKs list, is it okay not to sign?
0
0
157
Mar ’24
Signing xcframework SDK's
The current structure of my SDK xcframework is XXXX-Release.xcframework. Inside that, I have an XXXX.xcframework and a LICENSE.md file. Currently, this structure works fine in Swift Package Manager, dropping the XXXX-Release.xcframework file into Xcode and CocoaPods. When I sign my xcframework as per Apple's requirements, I need to sign XXXX.xcframework, which is on the second level. Signing this works fine. Will this meet Apple's requirements for signing an xcframework? I just want to make sure the current structure of my SDK does not need to change. Thanks
1
0
490
Mar ’24
Resuming a file download in the background on iOS sometimes corrupts the file
To download files, we have two NSURLSession objects. One configured for foreground downloads and one for background downloads. Initially, we download user-requested files in the foreground using downloadTaskWithRequest, because foreground downloads are faster than background downloads. We then also start a background task for each download using beginBackgroundTaskWithName:expirationHandler:. This background task's expiration handler starts a background download if the download didn't complete in the foreground. It cancels the foreground download with resume data using cancelByProducingResumeData. A background download task is then started using downloadTaskWithResumeData. Now, testing has shown that background download tasks resume correctly (the urlSession(_:downloadTask:didResumeAtOffset:expectedTotalBytes:) callback is called by iOS) if the background task is started immediately. However, iOS can decide to start these background download tasks later. As a sidenote, the isDiscretionary property of our background download session is set to the default, which should be false. The issue we have is that background downloads that are resumed several minutes (6,5 minutes in the session I'm currently looking at) after their original foreground download was cancelled, are not resumed properly. They download the remaining part of the file, but the first part that was downloaded in the foreground is lost. What could have happened? Perhaps the temporary file has been deleted in the meantime? Is there some way to maintain this file or detect this case?
6
1
943
Mar ’24
Show overflow menu (more menu) as disabled in iOS 16+
Hi! I'm moving my UINavigationBar and UINavigationItem to the iOS 16 style and having trouble with disabling buttons. Before: I'm defining rightBarButtonItems with a few barButtonItems plus a (custom) menuButtonItem (which has a menu with some more actions). After: I'm defining trailingItemGroups and let the system create an overflow menu dynamically, depending on space. I'm also defining some additionalOverflowItems. Here's the problem: How can I access the button/barButtonItem that is showing the overflow menu and call isEnabled = false? My UI, so far, has disabled all buttons during edit mode. I don't want to hide them, but have them grayed out, including the overflow menu button. class MyVC : UIViewController { // ... override func setEditing(_ editing: Bool, animated: Bool) {         super.setEditing(editing, animated: animated) // ... // This doesn't disable the overflow menu button         navigationItem .trailingItemGroups .forEach { $0.barButtonItems .forEach { $0.isEnabled = !isEditing } }     } }
1
0
280
Feb ’24
XCode 15 can't find static framework generated by Tuist
I have a project generated by Tuist and recently started to migrate to XCode 15. I keep getting too many errors related to swiftmodule, swiftdoc, abi.json, swiftsourceinfo that, apparently, XCode is looking for in the DerivedData folder deep inside Objects-normal subdirectory but gets an error: No such file or directory I also got a No type or protocol named 'nw_proxy_config_t' error too, related to Webkit that isn't even a dependency in that module. I've tried to update cocoapods, tuist, ruby, add postInstall configs I found at StackOverflow, but nothing worked. Could a gentle soul point me to the right direction here ?
0
0
299
Feb ’24
ITMS-90338: Non-public API usage
Hello, We noticed one or more issues with a recent delivery for the following app: xyz Version 3.0.0 Build 18396 Please correct the following issues and upload a new binary to App Store Connect. ITMS-90338: Non-public API usage - The app references non-public symbols in Frameworks/xyz.framework/xyz: _dyld_shared_cache_file_path. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. For further information, visit the Technical Support Information at http://developer.apple.com/support/technical/
0
0
205
Feb ’24
Setting Up visionOS Framework for Unity
I have created a visionOS framework from Xcode to bridge between Unity and visionOS which is used to call APIs from Unity to VisionOS. visionOS framework we attached in Unity assets is not getting builded along with Unity visionOS build. This method is working fine for iOS build.  i.e, created a iOS framework from Xcode to bridge between Unity and iOS which is used to call APIs from Unity to iOS. iOS framework we attached in Unity assets is getting builded along with Unity iOS build. Whether the VisionOS framework will work in Unity same as that of iOS? Is there any additional settings to setup framework for visionOS? Reference link for the setup method used: https://betterprogramming.pub/setting-up-ios-framework-for-unity-9ef4e577db89
0
0
221
Feb ’24
What does "Copy only when installing" on the Embed Frameworks build phase do?
We're bringing in an updated framework in our app, and the update requires ticking "Copy only when installing" in the Embed Frameworks build phase. When ticking that box, we get numerous other errors, suggesting frameworks xyz cannot be found. I've tried to find some documentation on this checkbox but there doesn't appear to be much on it, other then builds magically failing/suceeding when its toggled on/off. Is anyone able to shed some light on what is happening under the hood when that checkbox is ticked?
0
0
376
Feb ’24
Heavy Duty Work With Async Await
I am perplexed as to how to use async await. In the following example, I don't use GCD or performSelector(inBackground:with:). The view controller is NSViewController, but it doesn't make any difference if it's NSViewController or UIViewController. import Cocoa class ViewController: NSViewController { func startWriteImages() { Task{ let bool = await startWriteImagesNext() if bool { print("I'm done!") } } } func startWriteImagesNext() async -> Bool { // pictures is a path to a folder in the sandbox folder // appDelegate.defaultFileManager is a variable pointing to FileManager.default in AppDelegate let pictURL = URL(fileURLWithPath: pictures) if let filePaths = try? self.appDelegate.defaultFileManager.contentsOfDirectory(atPath: pictURL.path) { for file in filePaths { let fileURL = pictURL.appending(component: file) if self.appDelegate.defaultFileManager.fileExists(atPath: fileURL.path) { let newURL = self.folderURL.appending(component: file) do { try self.appDelegate.defaultFileManager.copyItem(at: fileURL, to: newURL) } catch { print("Ugghhh...") } } } return true } return false } func startWriteImagesNext2() async -> Bool { let pictURL = URL(fileURLWithPath: pictures) if let filePaths = try? self.appDelegate.defaultFileManager.contentsOfDirectory(atPath: pictURL.path) { DispatchQueue.global().async() { for file in filePaths { let fileURL = pictURL.appending(component: file) if self.appDelegate.defaultFileManager.fileExists(atPath: fileURL.path) { let newURL = self.folderURL.appending(component: file) do { try self.appDelegate.defaultFileManager.copyItem(at: fileURL, to: newURL) } catch { print("Ugghhh...") } } } } return true } return false } } In the code above, I'm saving each file in the folder to user-selected folder (self.folderURL). And the application will execute the print guy only when work is done. Since it's heavy-duty work, I want to use CCD or performSelector(inBackground:with:). If I use the former (startWriteImagesNext2), the application will execute the print guy right at the beginning. I suppose I cannot use GCD with async. So how can I perform heavy-duty work? Muchos thankos.
4
0
626
Feb ’24
FinanceKit - authorization process is not entitled error
I'm currently experimenting with the latest Xcode beta 15.3 (15E5194e) and attempting to integrate FinanceKit](https://developer.apple.com/documentation/financekit) into my project. However, I've encountered a persistent issue where the app crashes upon attempting to read or request authorization, accompanied by the following error message: FinanceKit/FinanceStore+FinancialDataAuthorization.swift:52: Fatal error: Process is not entitled Upon investigation, I've found no evident entitlements for FinanceKit, despite exploring options like Apple Wallet. Furthermore, I thoroughly examined the info.plist for relevant privacy values but found nothing pertinent. Here's the code snippet that triggers the fatal error, whether it's the request or read function: I don't see anything in entitlements for FinanceKit (I tried Apple Wallet and that didn't make a difference). Additionally, I checked for relevant privacy values for the info.plist but again didn't see anything relevant. Here is the code to reproduce the error (note calling either function will result in the same fatal error): import FinanceKit import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() requestFinancePermission() // readFinancePermission() } private func requestFinancePermission() { Task { do { let status = try await FinanceStore.shared.requestAuthorization() } catch { print("Error: \(error)") } } } private func readFinancePermission() { Task { do { let status = try await FinanceStore.shared.authorizationStatus() } catch { print("Error: \(error)") } } } } I'm seeking clarification on whether FinanceKit is currently usable or if there are additional steps needed for proper integration. Any insights or suggestions would be greatly appreciated. Thank you!
9
1
1.1k
Feb ’24
header file of a framework not found XCode 15.2
Hi there, I'm setting up a new "framework target" in my project (xcode 15.2). I dragged and drop another framework to reused (called: SDImage). But at the step of importing SDImage to my framework, my xcode 15.2 always show that "SDImage/SDImage.h" file not found I was trying to set target membership of SDImage, config header/framework search path already but nothing gonna help. Please give me a solution. Thank you and have a nice day
0
0
303
Feb ’24