The "Cancel" button for VNDocumentCameraViewController is not displayed on iPadOS 26. This issue appears to be specific to iPad, as the button appears correctly on iPhone.
Overview
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello, I am trying to capture screen recording ( output.mp4 ) using ScreenCaptureKit and also the mouse positions during the recording ( mouse.json ). The recording and the mouse positions ( tracked based on mouse movements events only ) needs to be perfectly synced in order to add effects in post editing.
I started off by using the await stream?.startCapture() and after that starting my mouse tracking function :-
try await captureEngine.startCapture(configuration: config, filter: filter, recordingOutput: recordingOutput)
let captureStartTime = Date()
mouseTracker?.startTracking(with: captureStartTime)
But every time I tested, there is a clear inconsistency in sync between the recorded video and the recorded mouse positions.
The only thing I want is to know when exactly does the recording "actually" started so that I can start the mouse capture at that same time, and thus I tried using the Delegates, but being able to set them up perfectly.
import Foundation
import AVFAudio
import ScreenCaptureKit
import OSLog
import Combine
class CaptureEngine: NSObject, @unchecked Sendable {
private let logger = Logger()
private(set) var stream: SCStream?
private var streamOutput: CaptureEngineStreamOutput?
private var recordingOutput: SCRecordingOutput?
private let videoSampleBufferQueue = DispatchQueue(label: "com.francestudio.phia.VideoSampleBufferQueue")
private let audioSampleBufferQueue = DispatchQueue(label: "com.francestudio.phia.AudioSampleBufferQueue")
private let micSampleBufferQueue = DispatchQueue(label: "com.francestudio.phia.MicSampleBufferQueue")
func startCapture(configuration: SCStreamConfiguration, filter: SCContentFilter, recordingOutput: SCRecordingOutput) async throws {
// Create the stream output delegate.
let streamOutput = CaptureEngineStreamOutput()
self.streamOutput = streamOutput
do {
stream = SCStream(filter: filter, configuration: configuration, delegate: streamOutput)
try stream?.addStreamOutput(streamOutput, type: .screen, sampleHandlerQueue: videoSampleBufferQueue)
try stream?.addStreamOutput(streamOutput, type: .audio, sampleHandlerQueue: audioSampleBufferQueue)
try stream?.addStreamOutput(streamOutput, type: .microphone, sampleHandlerQueue: micSampleBufferQueue)
self.recordingOutput = recordingOutput
recordingOutput.delegate = self
try stream?.addRecordingOutput(recordingOutput)
try await stream?.startCapture()
} catch {
logger.error("Failed to start capture: \(error.localizedDescription)")
throw error
}
}
func stopCapture() async throws {
do {
try await stream?.stopCapture()
} catch {
logger.error("Failed to stop capture: \(error.localizedDescription)")
throw error
}
}
func update(configuration: SCStreamConfiguration, filter: SCContentFilter) async {
do {
try await stream?.updateConfiguration(configuration)
try await stream?.updateContentFilter(filter)
} catch {
logger.error("Failed to update the stream session: \(String(describing: error))")
}
}
func stopRecordingOutputForStream(_ recordingOutput: SCRecordingOutput) throws {
try self.stream?.removeRecordingOutput(recordingOutput)
}
}
// MARK: - SCRecordingOutputDelegate
extension CaptureEngine: SCRecordingOutputDelegate {
func recordingOutputDidStartRecording(_ recordingOutput: SCRecordingOutput) {
let startTime = Date()
logger.info("Recording output did start recording \(startTime)")
}
func recordingOutputDidFinishRecording(_ recordingOutput: SCRecordingOutput) {
logger.info("Recording output did finish recording")
}
func recordingOutput(_ recordingOutput: SCRecordingOutput, didFailWithError error: any Error) {
logger.error("Recording output failed with error: \(error.localizedDescription)")
}
}
private class CaptureEngineStreamOutput: NSObject, SCStreamOutput, SCStreamDelegate {
private let logger = Logger()
override init() {
super.init()
}
func stream(_ stream: SCStream, didOutputSampleBuffer sampleBuffer: CMSampleBuffer, of outputType: SCStreamOutputType) {
guard sampleBuffer.isValid else { return }
switch outputType {
case .screen:
break
case .audio:
break
case .microphone:
break
@unknown default:
logger.error("Encountered unknown stream output type:")
}
}
func stream(_ stream: SCStream, didStopWithError error: Error) {
logger.error("Stream stopped with error: \(error.localizedDescription)")
}
}
I am getting error
Value of type 'SCRecordingOutput' has no member 'delegate'
Even though I am targeting macOs 15+ ( macOs 26 actually ) and macOs only.
What is the best way to achieving the desired result? Is there any other / better way to do it?
Hello,
I'm working on a project for a file system using FSKit and I'm currently experiencing a strange issue on macOS 26 to which I updated recently. While testing, I'm doing incremental debug builds using Xcode. I'm very careful to make sure I only have a single instance of the built app (hosting the file system extension) anywhere on disk. I run the app, mount the file system, run some tests, unmount, kill the app, make changes, and repeat. Once in a while, however, mount would suddenly start failing with
mount: Loading resource: The operation couldn’t be completed. (com.apple.extensionKit.errorDomain error 2.)
mount: File system named MyFS not found
This would consistently repeat until I clean the build folder, rebuild and run again. I would continue testing for a while, then at some point mount would start failing again.
I looked at the system logs and found this message from extensionkitservice:
Failed to initialize _EXExtensionIdentity: Error Domain=com.apple.extensionKit.errorDomain Code=5 "Failed to find extension: 24B7F729-5AD1-4486-92B4-1F57CACCA265"
So I started going through the logs in more detail and found the following:
lsd seems to unregister and register the file system extension occasionally, each time giving it a different UUID. I can see logs about "com.apple.LaunchServices.pluginsregistered" and "com.apple.LaunchServices.pluginsunregistered" notifications being sent with their data. What seems to be the problem is that sometimes after this happens, when I attempt to mount the file system, the extensionkitservice would fail to find the extension because it is referencing it using one of its previous UUIDs assigned by lsd, not its latest one, judging by the UUID in the log message.
Am I doing something wrong here? I think I may be causing the constant unregister/register of the extension idirectly by rebuilding via Xcode. Or is it a problem with extensionkitservice? I've never had this happen on Sequoia.
macOS 26.0.1 (25A362); Xcode 26.0.1 (17A400)
Thank you
Hello,
I am new to the apple developer program. I, and my team, are working on porting some medical software that we have written from Windows to MacOS. We obviously want to notarize our app to make it easy for professionals and colleagues to use. The software is entirely written in python and includes ffmpeg for one of the features to export the medical data to video and compiled to a single file with pyinstaller, like so:
pyinstaller app_name.py --noconfirm --onefile --add-data "ffmpeg:ffmpeg"
chmod +x dist/app_name*
We are currently adding the signing and notarization of the app to our github workflow. The workflow build a successful app with the correct structure and is able to be run if we allow it past the MacOS firewall. We are signing the app like so:
run: |
BINARY_PATH="dist/app_name"
IDENTITY=$(security find-identity -p codesigning -v | grep -E 'Developer ID Application|Mac Developer' | head -n1 | awk -F\" '{print $2}')
echo "Using identity: $IDENTITY"
security unlock-keychain -p "" build.keychain
codesign --verbose=4 --force --options runtime --timestamp --entitlements .github/mac_build_tools/entitlements.plist --sign "$IDENTITY" "$BINARY_PATH"
codesign --verify --verbose=4 "$BINARY_PATH"
We then also move the binary around into an app structure and sign that as well like so
echo "Moving contents to SedPlot.app"
mkdir -p dist/app_name.app/Contents/MacOS
mv "$BINARY_PATH" dist/app_name.app/Contents/MacOS
cp .github/mac_build_tools/Info.plist dist/app_name.app/Contents
echo -n "APPL????" > dist/app_name.app/Contents/PkgInfo
echo "Signing App"
codesign --verbose=4 --force --options runtime --timestamp --entitlements .github/mac_build_tools/entitlements.plist --sign "$IDENTITY" dist/app_name.app
codesign --verify --verbose=4 dist/app_name.app
codesign --display --entitlements :- dist/app_name.app
If I upload the artifact and check its properties, everything looks good. It has the correct ID associated with it and shows as valid when I use codesign --verify on it. I start having issues when I move onto notarization, like so:
cd dist
echo "Zipping and checking the zip"
ditto -c -k --keepParent app_name.app app_name.zip
zipinfo -1 app_name.zip | head
echo "$AC_API_KEY" > AuthKey.p8
SUBMISSION_ID=$(xcrun notarytool submit app_name.zip \
--key AuthKey.p8 \
--key-id "$AC_KEY_ID" \
--issuer "$AC_ISSUER_ID" \
--team-id "TEAM_ID" \
--output-format json | jq -r '.id')
echo "Submitted notarization with ID: $SUBMISSION_ID"
All of the print statements for errors look good at this point, and the submission ID shows up in my history when I query it. However, all 7 attempts that I have made to notarize this app hang for indefinite amounts of time. We are hoping to submit our tool for publication soon, and it would be helpful to know if there is an issue causing the hang on our end or if this is an issue with new developers.
I have been reading around the forums and see some notes about this taking about a week until the system start to "learn" about our development team and our attempts to notarize. I also know that there is limited amounts that can be said about the backend of the notarizations step. What would be helpful is a few things:
I would like feedback about if there is a fundamental flaw in our approach for signing and notarizing our application, so that we can identify it.
I would appreciate some guidelines about how long to expect this notarization step to take until we can get notarization to finish within 10s of minutes, as we have a hard-coded 30 min wait time for the completion of the notarization in our workflow right now.
It would be helpful to know how to check our logs, as requesting the logs for any of our attempts results in being told that the logs are not available yet.
In case someone from apple is interested in this and wants to check, the most-recent submission ID (the one that I believe should be most-likely correct and valid) is 9ef24966-42a5-47db-a7e0-c6baf0310ac4
Thank you in advance!
Hi everyone,
My app notarization has been stuck in the “In Progress” state for the past 4 days. Here are the details:
createdDate: 2025-10-12T07:56:46.228Z
id: 8f8c9a33-1c72-489e-a189-74c797a12fbc
name: DevScribe.zip
status: In Progress
I checked the Apple System Status
page and noticed that the Developer Notarization service has been showing an outage since October 8th.
Could this ongoing outage be the reason my notarization is stuck? Is anyone else experiencing the same issue?
Any guidance or workaround would be greatly appreciated.
The problem is the following:
We create a keychain item called NotaryTool (There are multiple accounts that use Notary tool and we created it for all of them )
This is created in the following way:
$ xcrun notarytool store-credentials
This process stores your credentials securely in the Keychain. You reference these credentials later using a profile name.
Profile name:
NotaryTool
We recommend using App Store Connect API keys for authentication. If you'd like to authenticate with an Apple ID and app-specific password instead, leave this unspecified.
Path to App Store Connect API private key:
//AuthKey_ABCDEFGH.p8
App Store Connect API Key ID:
<ABCDEFGH>
App Store Connect API Issuer ID:
ABCDEF-ABCD-1234-1234-1234567
Validating your credentials...
Success. Credentials validated.
Credentials saved to Keychain.
To use them, specify `--keychain-profile "NotaryTool"`
The key is downloaded from Apple and some other IDs are provided alongside.
These should remain in the keychain for as long as the user process is running (just like any other process)
A few runs are successful when we run with the profile that was created.
After a few runs we start seeing a failure.
Now we are seeing the following issue where the keychain item just vanishes:
Error: No Keychain password item found for profile: NotaryTool\n\nRun 'notarytool store-credentials' to create another credential profile.\nError during the not process\nTue Aug 26 06:02:09 2025 Notarization failed with notarytool with exit code 17664: \nTue Aug 26 06:02:09 2025 could not upload for notarization!!!
Topic:
Code Signing
SubTopic:
Notarization
My notary service has been stuck for more than 5 hours. Is it because i am a new user or there is an notary service outage.
Hello, I've developed an application using Electron with JAVACRIPT. I have managed to deploy to both Windows and the web but having trouble deploying the application to my Mac users.
It's my first time deploying an application for Mac but feel like I'm stuck at the last hurdle and out of ideas so I'm reaching out for help.
My application is successfully signing but during the build and when my Notarize.js is running it seems to get stuck indefinitely.
I can check and see the status of the Notarize attempts but they seem to be stuck "In Progress". Here are the logs.
Successfully received submission history.
history
--------------------------------------------------
createdDate: 2025-01-06T00:59:45.245Z
id: 1dc39b5f-fdca-4bf2-a6f6-fa793de2786e
name: Popcorn-1.0.0.dmg
status: In Progress
--------------------------------------------------
createdDate: 2025-01-04T08:01:36.168Z
id: c575b015-edd6-4e09-8da5-7ae09f4f67db
name: Popcorn-1.0.0.dmg
status: In Progress
--------------------------------------------------
createdDate: 2025-01-03T08:30:31.528Z
id: 570ae540-8cce-4418-ab09-7f6be33dc245
name: Popcorn-1.0.0.dmg
status: In Progress
--------------------------------------------------
createdDate: 2025-01-03T07:57:56.701Z
id: 42748de8-026a-4663-9fd2-88c7608588d3
name: Popcorn-1.0.0.dmg
status: In Progress
--------------------------------------------------
createdDate: 2025-01-03T06:30:19.569Z
id: 5140caa0-df14-491a-b148-82015f9856da
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-03T05:56:28.916Z
id: 535c6be1-4999-4b3e-9766-42512a8deb67
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-03T02:51:04.893Z
id: ead2268c-62b2-4b4b-8850-c1cdb5313d6a
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-03T01:50:51.954Z
id: d0c44281-a788-4704-a057-4620d284516d
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-03T00:48:54.445Z
id: 3d13727c-06a3-49d7-902b-4001522107c3
name: Popcorn-1.0.0.dmg
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T13:35:26.715Z
id: 1823a550-a9ff-467a-8a60-dd3e42305258
name: Popcorn-1.0.0.dmg
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T13:23:41.894Z
id: cbc341a2-9a51-43d6-83ae-713443c84fec
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T12:21:44.561Z
id: 1af34419-655f-49b8-bea0-05b4232c46a7
name: Popcorn-1.0.0.dmg
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T11:34:03.732Z
id: 8c4ab3b5-2ea9-4220-9667-94011bcf76fb
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T11:19:16.052Z
id: 093dfb8a-9058-417d-acd3-8ea5d0bb654a
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T11:13:14.676Z
id: 556b7c1c-d114-4717-b0f7-4f1614ada845
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T10:52:36.834Z
id: ce3d3c8a-d218-4978-8757-2ca9d12aad76
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T09:27:13.535Z
id: b65ec764-baab-444d-809b-e4242d70548b
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T09:27:01.176Z
id: be228acc-e6a2-48f2-937b-5b2962275052
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T09:19:19.182Z
id: d99fc10b-c424-4d0c-a2aa-37a9e9165d91
name: Popcorn-1.0.0.dmg
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T08:55:43.064Z
id: 2e7f8df7-9c0b-4dd0-8df7-8f3428c0bfa0
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T08:19:48.676Z
id: 678355da-e413-4b1a-92a8-776a6ff6a055
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T07:58:48.278Z
id: 8591f8d7-1d57-4e80-af90-d77190160a20
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T07:54:41.193Z
id: f029dfeb-3f14-4f65-83e2-d9356ef6ac00
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T07:27:50.613Z
id: 574f2563-d533-4885-947a-2f57170196af
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T07:09:54.203Z
id: 589f7f3a-d231-4911-8ad6-9d2c15a61ac0
name: popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T05:39:02.574Z
id: 9edd43de-6d14-4743-87fc-ab570bee7399
name: Popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T04:36:12.342Z
id: ba02116d-1aad-4521-8667-ad086b14c1cb
name: Popcorn.zip
status: In Progress
--------------------------------------------------
createdDate: 2025-01-02T03:22:49.185Z
id: b8585c81-b7f5-4c35-9bd6-62157c6ce4bc
name: Popcorn.zip
status: In Progress
My notary service has been stuck for more than 5 hours. Is it taking long time because the notary service is down or because i am a new user
Successfully received submission history.
history
......
--------------------------------------------------
createdDate: 2025-10-19T18:34:47.472Z
id: d3248896-7841-421e-9470-101df9d0da21
name: ...
status: In Progress
--------------------------------------------------
createdDate: 2025-10-19T18:12:45.325Z
id: e5822fa0-5bcf-4610-81fc-9f541e8ad189
name: ...
status: In Progress
Hi everyone,
I’ve just subscribed and configured my Apple Developer account.
I tried to notarize the first binary I need to distribute via Homebrew, but I’m experiencing an issue where the process has been stuck in “In Progress” status for more than 21 hours, without completing or returning any errors.
Here’s the relevant history:
createdDate: 2025-10-15T21:53:41.343Z
status: In Progress
I’m unable to notarize the executable and the .app — the status has been showing “In Progress” for over an hour. Upon checking the xcrun logs, it indicates that the submission ID was not received. I also noticed there’s an Apple Developer Service outage reported since October 8, 2025. Could you please let me know when this outage is expected to be resolved? It would be very helpful.
Hello,
I’m developing an app for both iOS and macOS using Mac Catalyst.
On the iOS target, the DeclaredAgeRange framework works fine: I enabled the capability, set the entitlement, and can call the APIs successfully.
However, when I build the Mac Catalyst target, I get compile-time errors because DeclaredAgeRange cannot be imported.
Environment
Xcode 26.0.1
Deployment Target (iOS): 13.0
Mac Catalyst target enabled (same bundle ID, same source code base as iOS version)
iOS build works well with DeclaredAgeRange
What I tried
Added the Declared Age Range capability in Signing & Capabilities for iOS target → works fine.
Tried setting Mac Catalyst Deployment Target to macOS 15.0+ and rebuilding → still failed to import.
Because it didn’t help, I reverted and removed the separate macOS target setting.
On Catalyst, the module simply isn’t available (import DeclaredAgeRange fails).
From Apple’s documentation, my understanding is that DeclaredAgeRange should also be supported on Mac Catalyst (SDK 26+). But in practice I cannot import it in my Catalyst build.
Questions
Is DeclaredAgeRange actually supported on Mac Catalyst right now?
If so, are there additional setup steps (capabilities, entitlements, provisioning, etc.) specific to Catalyst?
Has anyone successfully imported and used DeclaredAgeRange in a Catalyst project?
Any guidance or confirmation would be greatly appreciated.
Thanks in advance.
Topic:
App & System Services
SubTopic:
General
Xcode downloaded a crash report for my app that crashed when trying to insert a String into a Set<String>. Apparently there was an assertion failure ELEMENT_TYPE_OF_SET_VIOLATES_HASHABLE_REQUIREMENTS. I assume that this assertion failure happened because the hash of the new element didn't match the hash of an equal already inserted element, but regardless, I don't understand how inserting a simple string could trigger this assertion.
Here is essentially the code that leads to the crash. path is any file system directory, and basePath is a directory higher in the hierarchy, or path itself.
var scanErrorPaths = Set<String>()
func main() {
let path = "/path/to/directory"
let basePath = "/path"
let fileDescriptor = open(path, O_RDONLY)
if fileDescriptor < 0 {
if (try? URL(fileURLWithPath: path, isDirectory: false).checkResourceIsReachable()) == true {
scanErrorPaths.insert(path.relativePath(from: basePath)!)
return
}
}
extension String {
func relativePath(from basePath: String) -> String? {
if basePath == "" {
return self
}
guard let index = range(of: basePath, options: .anchored)?.upperBound else {
return nil
}
return if index == endIndex || basePath == "/" {
String(self[index...])
} else if let index = self[index...].range(of: "/", options: .anchored)?.upperBound {
String(self[index...])
} else {
nil
}
}
}
crash.crash
I'm trying to sign a .app package coming from Py2app.
Unfortunately I keep running into the same two issues:
The binary is not signed with a valid Developer ID certificate.
and
The signature does not include a secure timestamp.
I tried everything, from recreating the signatures, with different arguments, different keys and certificates, but it keeps complaining with these two errors on a long list of files.
For reference I added the python script I use for signing the files.
code_singing.py
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
I have an app (currently not released on App Store) which runs on both iOS and macOS. The app has widgets for both iOS and macOS which uses user preference (set in app) into account while showing data. Before upgrading to macOS 15 (until Sonoma) widgets were working fine and app was launching correctly, but after upgrading to macOS 15 Sequoia, every time I launch the app it give popup saying '“Kontest” would like to access data from other apps. Keeping app data separate makes it easier to manage your privacy and security.' and also widgets do not get user preferences and throw the same type of error on Console application when using logging. My App group for both iOS and macOS is 'group.com.xxxxxx.yyyyy'. I am calling it as 'UserDefaults(suiteName: Constants.userDefaultsGroupID)!.bool(forKey: "shouldFetchAllEventsFromCalendar")'. Can anyone tell, what am I doing wrong here?
Hello!
My question is about 1) if we can use any and or all accessibility features within a sandboxed app and 2) what steps we need to take to do so.
Using accessibility permissions, my app was working fine in Xcode. It used NSEvent.addGlobalMonitorForEvents and localMoniter, along with CGEvent.tapCreate. However, after downloading the same app from the App Store, the code was not working. I believe this was due to differences in how permissions for accessibility are managed in Xcode compared to production.
Is it possible for my app to get access to all accessibility features, while being distributed on the App Store though? Do I need to add / request any special entitlements like com.apple.security.accessibility?
Thanks so much for the help. I have done a lot of research on this online but found some conflicting information, so wanted to post here for a clear answer.
Noticing a few issues with Screen Savers in macOS Tahoe developer beta 1 :
The command
open x-apple.systempreferences:com.apple.ScreenSaver-Settings.extension
no longer works to open the Screen Savers preference pane. The reason? There is no longer a Screen Saver preference pane - it still exists, but it's now a Modal dialog (that can not be resized) that is opened from within the Wallpaper preference pane, by clicking a button.
Something funny is happening with legacyScreensaver - I think that
ScreenSaverView.Init(frame:isPreview)
may be passing wrong values, e.g. the isPreview boolean is false in Preview mode?
I've submitted Feedback # FB17895600 about some of these, and will report back more as I figure things out.
Please feel free to add to this thread, thanks!
Hello.
On my app I have the necessity to use mergeable libraries, in my context my libraries are indirect dependency, in other words the dependency isn’t target in my project, and they are XCFramework where they are imported on Framework, Libraries, and Embedded Content session on my app target.
Following the documentation on Configuring your project to use mergeable libraries it said.

But on Manually configure merging don’t said how to configure to indirect dependencies.

So I have tried configure use the linker flag -merge_framework for each XCFramework using -Wl, -merge_framework, {XCFramework_Name}, but I am receiving the following error unknown argument: -merge_framework’ when build the release.
In app target is set build settings MERGED_BINARY_TYPE = manual;
The question is:
Is possible using mergeable libraries in XCFramework dependencies ? How I do this? Because on the doc is not clear how to use in indirect dependency like XCFramework.
Regards
Michel Carvalho
I have an Xcode project setup as follows:
3 static libraries
1 framework target, whose Mach-O type is set to Dynamic Library
main app target (iOS app)
The target dependencies are as follows:
In framework's build phase [Link with libraries], I have the 3 libs statically linked.
In the main app's build phase [Link with libraries], I have only the framework, which is dynamically linked.
As per my understanding:
The libs are statically linked to the framework. So, the framework binary would contain code from all the libs.
The framework is dynamically linked to the main app (iOS app in this case). So, the main app's binary only has a reference to the framework's binary, which would be loaded in the memory at runtime.
Assuming my understanding is correct, I'm stuck with the following problem:
All 3 libs build successfully
The framework builds successfully
The main app target doesn't build. The compilation is successful, but the build fails with linker errors.
Please let me know if I am doing something incorrectly, or if a configuration is missing. Below are more details:
The linker gives the following error:
Undefined symbols for architecture arm64:
"StringUtils.GetStr() -> Swift.String", referenced from:
dynamic_fw.AppDelegate.application(_: __C.UIApplication, didFinishLaunchingWithOptions: [__C.UIApplicationLaunchOptionsKey : Any]?) -> Swift.Bool in AppDelegate.o
"TWUtils.GetNum() -> Swift.Int", referenced from:
dynamic_fw.AppDelegate.application(_: __C.UIApplication, didFinishLaunchingWithOptions: [__C.UIApplicationLaunchOptionsKey : Any]?) -> Swift.Bool in AppDelegate.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
And the command shown in the logs for linking phase is:
Ld /Users/raunit.shrivastava/Library/Developer/Xcode/DerivedData/dynamic-fw-foqtqhpopkmoapfufzxbfloamnpr/Build/Products/Debug-iphonesimulator/dynamic-fw.app/dynamic-fw normal (in target 'dynamic-fw' from project 'dynamic-fw')
cd /Users/raunit.shrivastava/Desktop/dynamic-fw
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Xlinker -reproducible -target arm64-apple-ios17.5-simulator -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.5.sdk -O0 -L/Users/raunit.shrivastava/Library/Developer/Xcode/DerivedData/dynamic-fw-foqtqhpopkmoapfufzxbfloamnpr/Build/Intermediates.noindex/EagerLinkingTBDs/Debug-iphonesimulator -L/Users/raunit.shrivastava/Library/Developer/Xcode/DerivedData/dynamic-fw-foqtqhpopkmoapfufzxbfloamnpr/Build/Products/Debug-iphonesimulator -L. -L./StringUtils -L./TWFramework -L./TWUtils -L./dynamic-fw -F/Users/raunit.shrivastava/Library/Developer/Xcode/DerivedData/dynamic-fw-foqtqhpopkmoapfufzxbfloamnpr/Build/Intermediates.noindex/EagerLinkingTBDs/Debug-iphonesimulator -F/Users/raunit.shrivastava/Library/Developer/Xcode/DerivedData/dynamic-fw-foqtqhpopkmoapfufzxbfloamnpr/Build/Products/Debug-iphonesimulator -F. -F./StringUtils -F./TWFramework -F./TWUtils -F./dynamic-fw -filelist /Users/raunit.shrivastava/Library/Developer/Xcode/DerivedData/dynamic-fw-foqtqhpopkmoapfufzxbfloamnpr/Build/Intermediates.noindex/dynamic-fw.build/Debug-iphonesimulator/dynamic-fw.build/Objects-normal/arm64/dynamic-fw.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker ./\*\* -dead_strip -Xlinker -object_path_lto -Xlinker /Users/raunit.shrivastava/Library/Developer/Xcode/DerivedData/dynamic-fw-foqtqhpopkmoapfufzxbfloamnpr/Build/Intermediates.noindex/dynamic-fw.build/Debug-iphonesimulator/dynamic-fw.build/Objects-normal/arm64/dynamic-fw_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/raunit.shrivastava/Library/Developer/Xcode/DerivedData/dynamic-fw-foqtqhpopkmoapfufzxbfloamnpr/Build/Intermediates.noindex/dynamic-fw.build/Debug-iphonesimulator/dynamic-fw.build/Objects-normal/arm64/dynamic_fw.swiftmodule -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/raunit.shrivastava/Library/Developer/Xcode/DerivedData/dynamic-fw-foqtqhpopkmoapfufzxbfloamnpr/Build/Intermediates.noindex/dynamic-fw.build/Debug-iphonesimulator/dynamic-fw.build/dynamic-fw.app-Simulated.xcent -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __ents_der -Xlinker /Users/raunit.shrivastava/Library/Developer/Xcode/DerivedData/dynamic-fw-foqtqhpopkmoapfufzxbfloamnpr/Build/Intermediates.noindex/dynamic-fw.build/Debug-iphonesimulator/dynamic-fw.build/dynamic-fw.app-Simulated.xcent.der -framework TWFramework -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/raunit.shrivastava/Library/Developer/Xcode/DerivedData/dynamic-fw-foqtqhpopkmoapfufzxbfloamnpr/Build/Intermediates.noindex/dynamic-fw.build/Debug-iphonesimulator/dynamic-fw.build/Objects-normal/arm64/dynamic-fw_dependency_info.dat -o /Users/raunit.shrivastava/Library/Developer/Xcode/DerivedData/dynamic-fw-foqtqhpopkmoapfufzxbfloamnpr/Build/Products/Debug-iphonesimulator/dynamic-fw.app/dynamic-fw