Frameworks

RSS for tag

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

Posts under Frameworks tag

195 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

QUIC Connection Group Server Sending Pace
We have an implementation in which we use QUIC via a connection group, server are client are on Swift using the Network framework. Our use case is, the server should send data buffers to the client as fast and as much as possible, now the pace to call the send method from the server should be carefully done, because if we send too much data of course the client is not gonna be able to receive it. The question would be, is there a way to query the congestion window so we know on the server side, how much data we should be able to send at some point? Asking because we are not getting all the data we are sending from the server on our client side... We are using these settings: let options = NWProtocolQUIC.Options(alpn: ["h3"]) options.direction = .bidirectional // options.idleTimeout = 86_400_000 options.maxUDPPayloadSize = Int.max options.initialMaxData = Int.max options.initialMaxStreamDataBidirectionalLocal = Int.max options.initialMaxStreamDataBidirectionalRemote = Int.max options.initialMaxStreamDataUnidirectional = Int.max options.initialMaxStreamsBidirectional = 400 options.initialMaxStreamsUnidirectional = 400 Questions: 1.- Can we get a little more detail in above options, specifically on their impact to the actual connection? 2.- IsinitialMaxData the actual congestion window value 3.- Are we missing something or making incorrect assumptions? Thanks in advance.
2
0
44
6h
Create p12 identity from pem cert string & private key during iOS runtime
I have a unique need here and hope there is someone out there that might be of help. There is a backend server that will send an x509 certificate and private key (as strings) after the mobile apps on-boarding process. Additionally, the app includes an AWS SDK that is used to talk to their IoT system. This SDK requires PKCS12 certificate format to pass authentication. (I believe the common method is to have bundled the cert into the app which is not an option for me here sadly) I suspect it may be possible to use some openSSL iOS framework to do this conversion at runtime but have not personally tried it yet as my go-to is usually trying things first with Apples APIs. So my question becomes is there a way to meet this requirement using any of the security APIs or other APIs that apple has like swift-nio-ssl? Thank you very much for your time. Best, Michael
2
0
50
1d
ICDeviceBrowser fails to find any devices after iOS 18 update
I have an app that uses the ImageCaptureCore's ICDeviceBrowser to find and connect to external digital cameras. Prior to iOS 18 this worked just fine, the device browser would start up and find any cameras connected via USB. However since the update the device browser fails to ever detect any connected device or to trigger any delegate events at all after browser start. I noticed that the Contents authorization in iOS 18 is undetermined, where in previous iOS versions it would default to authorized. I tried to resolve this by requesting authorization, however this immediately returns denied without ever having prompted the app user for permission. I do have the Camera Privacy Usage description setup, and also am able to request permission for the iOS camera successfully. How can I successfully request contents authorization via ICC or otherwise? Or are there alternative Apple libraries I can use for finding and connecting to external digital cameras on iOS?
0
0
68
1d
AX Elements in some apps only exposed when using VoiceOver or Accessibility Inspector
i build apps that act as Screen Readers to 1) add Vim motions everywhere on macOS 2) click (and more) AX Elements through the keyboard 3) scroll through the keyboard. it works extremely well with native apps. with non-native apps, i need to blast them with some extra AX Attributes (AXManualAccessibility, AXEnhancedUserInterface) to get them to expose their AX Elements. but there are a couple of apps tho which i can't get them to expose their AX Elements programmatically. now the weird thing is as soon as i start VoiceOver, those apps open up. or for some, if i use the Accessibility Inspector to go through their AX Elements, then they start opening up. so i'm wondering, is there one public known way that i'm missing to open up those apps, or is Apple using private APIs? any way i could make my apps behave like VoiceOver or the Accessibility Inspector to force those recalcitrant apps to open up? thanks in advance.
1
1
61
1d
Custom Domain deeplink
My SampleApp, named "myApp," already supports deep links such as "https://myApp.com/tab/record/10020." When this link is clicked, it navigates to myApp, and AppDelegate handles the further process. Now, I need to support another link (domain), "https://appcloud.com/tab/record/10020," so that clicking this link also navigates to myApp. Is there any way to solve this kind of problem without adding "apple-app-site-association"?
1
0
68
1d
Get time it took to complete HMCharacteristic.writeValue()
I'm working on an app that uses HomeKit-enabled accessories such as wall plugs to control a photographic enlarger in a darkroom. This requires precise timing when toggling the power state of the plug. For example, the timer in my app might be set to 5 seconds, so I turn on the plug using writeValue() on the plugs power state characteristic, wait 5 seconds, then turn it off again. I want to be able to measure if the plug actually responded to the command and if there was any delay in the plug actually turning on/off so I can display a warning to the user if network latency resulted in the plug being on for longer than the set time. Does writeValue() (in my case, the async/await version) only return when the plug has been turned on, or does it return as soon as the command has been sent, regardless of if it has been received/acted on? Is there a way I can (a) quickly verify that the plug has been turned on/off, and (b) measure how long it took for the plug to act on the request, that is, the time elapsed between when writeValue() is called and when the plug actually updates to the corresponding value?
0
0
80
3d
Notarization and weak linking to 3rd-party frameworks
Hi there, My app detects connected BlackMagic devices on a user's machine and this is done using the DeckLink SDK which first tries to load /Library/Frameworks/DeckLinkAPI.framework using CFBundleCreate. I have not been able to create a notarized app which successfully detects the devices. Either the DeckLinkAPI works or the app starts up without showing "the developer cannot be verified" on my test computer but never both. This is what I've tried so far: signed app: DeckLinkAPI available hardened runtime: DeckLinkAPI not available hardened runtime + com.apple.security.cs.disable-library-validation: DeckLinkAPI available, notarization succeeds yet the "the developer cannot be verified" I've also tried to use weak linking to DeckLinkAPI.framework instead of including the SDK's CFBundleCreate code but that made no difference: I still needed the com.apple.security.cs.disable-library-validation entitlement for that to work which caused "the developer cannot be verified". DeckLinkAPI.framework is notarized: > codesign --test-requirement="=notarized" --verify --verbose /Library/Frameworks/DeckLinkAPI.framework /Library/Frameworks/DeckLinkAPI.framework: valid on disk /Library/Frameworks/DeckLinkAPI.framework: satisfies its Designated Requirement /Library/Frameworks/DeckLinkAPI.framework: explicit requirement satisfied Is there any way to successfully notarize an app to use the DeckLink SDK or any other thirdparty notarized framework which is distributed seperately?
2
0
152
4d
Picker form style without Form
Is it possible to style a Picker on macOS to look like it was in a Form, but without actually being in a grouped Form? Unfortunately I can't use Form because its style is not customizable enough. I've tried setting various buttonStyles but I only got close to what I want. The biggest problem is that the picker is left-aligned and I need it right-aligned.
1
0
143
3d
iOS floating caret position
Hello, On iOS it is possible to use the keyboard spacebar to move the caret while editing text. The user has to longpress on the spacebar, and then the keyboard would turn into a trackpad that moves around a floating caret. Is there a way to get the position of the caret while the user uses this space bar navigation? And by the position I mean the position in an app or in a frame? Are there any other events that this action can send out? Thanks a lot!
1
0
206
1w
NSTextLayoutManager giving incorrect fragment frame
I have an NSTextLayoutManager set up with NSTextContentStorage and NSTextContainer. To work out the height of the content, I call the method updateContentSizeIfNeeded() which contains the code textLayoutManager.enumerateTextLayoutFragments(from: textLayoutManager.documentRange.endLocation, options: [.reverse, .ensuresLayout]) { layoutFragment in height = layoutFragment.layoutFragmentFrame.maxY return false } The first time this is called, it returns the correct height. Then I add a new character to the start of the NSTextContentStorage like so textContentStorage.performEditingTransaction { storage.replaceCharacters(in: NSRange(location:0, length: 1), with: "a") } textLayoutManager.ensureLayout(for: textLayoutManager.documentRange) textLayoutManager.textViewportLayoutController.layoutViewport() updateContentSizeIfNeeded() This time, the height returned is ~600px too big. The state of the NSTextLayoutFragment is set to layoutAvailable The next time I add a character to textContentStorage using the same code above, the height returned is correct again. I can work around this by calling enumerateTextLayoutFragments from the start of the document and not in reverse, then ignoring all fragments except the last one, but I don't know if that's the correct way to do it, or if I should be doing something else
2
0
173
1w
Nested xcframeworks in SPM
My organization delivers an xcframework, let's call it MyFramework.xcframework. This framework also depends on another local framework, SecondFramework.xcframework. We want to deliver the MyFramework using Swift Package Manager to our customers. The SecondFramework is embedded within MyFramework. Then the customer only needs to care about MyFramework. Our issue is that apps using our Swift Package fail to recognize the SecondFramework, displaying the message "SecondFramework module not found." Is this not possible or currently supported in SPM? Or do we need to change our approach? I appreciate any help or pointers. Thanks!
1
0
163
2w
XCFramework codesign verification fails, because macOS temporary files appear inside
At my current company we have an app that has a lot of third party dependencies. Recently vendors started providing code signed XCFrameworks and we would like to use the code signed frameworks without any modification in our released app (don't tamper with the signature, don't remove it, don't resign it). We have a problem, that upon downloading the XCFrameworks from an internal artifact server or upon moving the XCFrameworks on disk during the build process, macOS starts producing temporary files, like .DS_Store, ._* files (for every file X, there is additional ._X file created). Files like this are sometimes called "turdfiles", like here. The files are produced inside of XCFrameworks and inside of the _CodeSignature folder, making codesign --verify --verbose=4 Example.xcframework fail and XCode to complain and fail the build process. I wrote a script that cleans up the _CodeSignature folder from all known turdfiles and then inspects the output of codesign to indentify all surplus files and removes them - this has to be 2 steps, because codesign goes crazy if you tamper with _CodeSignature directory. We run the script in random places of the build system where it seemed to help. Is there any system solution to fix this? Isn't everyone having this problem now, with the introduction of codesigned XCFrameworks? There were tens of people in the company having this issue before we hacked it together using the cleanup script.
0
0
159
2w
Get Touch Events from iOS keyboard trackpad mode
Hello, As of iOS 17, the keyboard app runs in a different process. I was wondering if there is a way to access the UIView of the keyboard app or if there is a way to subscribe to touch events done on the keyboard (especially during the trackpad mode). By trackpad mode I mean when the user long presses on space and then can move in the keyboard area (that turns into a trackpad) to move the caret in a text. Either Objective C or SwiftUI is fine. Thanks!
3
0
237
1w
xcodebuild -resolvePackageDependencies stopped working after Mac Os update
My config is as follow MacBook Pro with M3 Pro and Sonoma 14.5 OS XCode 15.2 Build version 15C500b swift-driver version: 1.87.3 Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5) Target: arm64-apple-macosx14.0 Darwin lonwx2049951 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:13:18 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6030 arm64 I am behind corp proxy and have quite limited privileges to install or use any tools/commands requiring admin privileges. The App itself plus a few company submodules are hosted on Azure Devops and this side works as usual. The App also uses a few dependencies hosted on GitHub and that need to be resolve every time I'm switching/creating new branches Until Monday I was using following terminal command to do so xcodebuild -resolvePackageDependencies -scmProvider system However, on Monday when I tried the above I was presented with error on each of the dependencies, see attached depenedencies_error.txt The only change that happen was the Mac OS update on Monday morning when I turn on my Mac from 14.4 to 14.5 Is it possible that this update removed some of the settings? I have tried the following: deleting DerivedData folder, cleaning and rebuilding project cloning the dependencies manually adding PAT token using SSH for fetching deleting Package.resolved file cloning project from Azure repo into different location Any suggestions will be appreciated.
1
0
220
3w
Running a Catalyst application via XCTest loads macOS specific frameworks
When trying to test a Catalyst application with XCTest the application crashes at startup with Symbol not found error when certain frameworks are in use. This is caused by XCTest / Xcode adding /Applications/Xcode.app/Contents/SharedFrameworks to DYLD_FRAMEWORK_PATH causing dyld to load the macOS specific framework variant of for example RealityKit instead from /System/iOSSupport/System/Library/Frameworks as defined in the load commands. Which leads to symbol mismatches, for example ARView.Environment.Color is a UIColor on Mac Catalyst but an NSColor on macOS (_$s10RealityKit6ARViewC11EnvironmentV10BackgroundV5coloryAGSo7UIColorCFZ vs. _$s10RealityKit6ARViewC11EnvironmentV10BackgroundV5coloryAGSo7NSColorCFZ) Tried prepending /System/iOSSupport/System/Library/Frameworks to the DYLD_FRAMEWORK_PATH env var of the test target, but via some private frameworks still wrong framework variants were loaded. Any ideas for possible fixes or workarounds?
8
0
248
2w
Unable to import ObjC interface from a package in a public ObjC file in a framework
Problem Statement: Unable to import .h file from an ObjC SPM to a .h file in an ObjC file in a framework with mix of ObjC and Swift code The issue is: in order to support access of ObjC file in Swift code in a framework we need to use umbrella header (in place of bridging header). Once the file is imported in Umbrella header and made public it will no longer allow import of .h file from package in its interface Project Structure: a. Package: ObjCPackage ObjCPackage |- Package.swift |- ObjCPackage MathsUtilities.h (class interface) MathsUtilities.m (class implementation) NiceLogs.h (protocol) b. Project: ObjCSwiftFramework ObjCSwiftFramework |- ObjCSwiftFramework.h (umbrella header) |- Calculation.h (objc class interface) |- Calculation.m (objc class implementation) |- SwiftCalci.swift (swift class) Details: #import <ObjCSwiftFramework/Calculation.h> added in ObjCSwiftFramework.h as Calculation has to be used in SwiftCalci Calculation.h marked as public in target membership in Xcode so that it can be added in umbrella header ObjCSwiftFramework.h #import "NiceLogs.h" in Calculation.h gives error Here is a small sample which I created to demonstrate the problem: ObjCSwiftFramework
0
0
187
May ’24
Cannot build app on Catalyst after updating to Xcode 15.4 RC
We are facing an issue on Catalyst when building our app using Xcode 15.4. The issue is related to precompiled frameworks and seems to be widespread as it happens with multiple vendors (like Firebase or Braze). We are using SPM to add these dependencies, for instance: .package(url: "https://github.com/braze-inc/braze-swift-sdk", from: "8.2.1"), When building, we get the following error: clang:1:1: invalid version number in '-target arm64-apple-ios10.15-macabi' Our macOS deployment target is 12.3. Our iOS deployment target is 15.4. I will try to create a reproducer I can share but I wanted to share this in case there's a known workaround. Thanks in advance!
7
3
1k
1d
Issues with Multicast Operations using NWConnectionGroup and NWMulticastGroup
Hello, I've been encountering some challenges while working with NWConnectionGroup and NWMulticastGroup for multicast operations on iOS. I have a few doubts and issues that I would like to address: 1. NWMulticastGroup Initialization It seems that when initializing NWMulticastGroup, only one NWEndpoint can be passed, and attempting to pass multiple endpoints results in failure. Can someone confirm if this behavior is correct? 2. Interface Level Control Upon initializing NWConnectionGroup, it appears that packets are received on all interfaces without the ability to control this at the interface level. Is this correct? If not is there a way to configure NWConnectionGroup to receive packets on all interfaces? 3. Sending Behavior During the send operation, it appears that the data is sent through any one of the available interfaces, and there doesn't seem to be an option to configure it to send through all available endpoints. Is there a way to enable sending data through all available endpoints? Any insights, guidance, or solutions to these issues would be greatly appreciated. Has anyone else encountered similar problems or found workarounds for these limitations? Thank you for your assistance and support. Thanks, Harshal
0
0
208
May ’24