I have an app that links to two dynamic frameworks which both link to the same static library, as follows:
|--App
|--DynamicFramework1
|--StaticLibrary
|--DynamicFramework2
|--StaticLibrary <- the same library that DynamicFramework1 links to
The static library's symbols are included in each framework's binary because of the way dynamic frameworks are built by default. The app therefore finds duplicates of the static library's symbols at runtime.
Is it possible to link a dynamic framework to a static library (and to still be able to call on the classes and methods of the static library within the dynamic framework) in a manner that symbols from the static library are excluded from the dynamic framework's binary?
My hope in doing this is that the binary of each of the two dynamic frameworks will exclude the symbols of the static library. I will then make it the responsibility of the app to link to the static library directly.
Notes
I have tried linking my dynamic framework with the static library in two different ways thus far: (1) I added the static library to my framework's "Link Binary with Libraries" Build Phase; and (2) I referenced the static library in my framework's "Other Linker Flags" Build Setting. Both result in the static library's symbols being included in the framework's binary.
I am aware that changing a framework target's "Mach-O Type" from "Dynamic Framework" to "Static Library" will build the framework's binary without the symbols of the static libraries that it links to. I want to keep my frameworks as dynamic frameworks so that (1) I can benefit from how Xcode bundles together resources (strings, storyboards etc) automatically for dynamic frameworks; and (2) users of my framework can benefit from Mergeable Libraries in the near future.
I am aware that I can solve this problem by changing the static library to a dynamic framework. I want to avoid this as much as possible since the static library is from a third-party. I want to avoid forking the static library's source code and messing with its build scripts if I can.
Post not yet marked as solved
Hi all,
I am trying to create a widget for my app but I cannot use the Preview feature of Xcode.
Xcode enters a build loop and builds the project over and over. There is no error or message. There is only a loading spinner and lots of build.
It doesn't matter how much time I wait, it never finishes.
I tried to clean the build folder, delete all preview simulators, quit, and reopen the XCode but nothing helped.
Post not yet marked as solved
Every time I try to build my Vision Pro app using Xcode Cloud, I get the error "Command compileSkybox failed with a nonzero exit code". I have even tried to build a completely empty project (settings: "Volume", "Reality Kit" and "Progressive") and I still get the error. When I build the project locally, there are no errors. Does anyone have any idea what the problem is?
Post not yet marked as solved
I've a workspace with multiple packages, and due to the a bug in Xcode I cannot export the app localizations using the Xcode GUI tool, but I need to resort on using a command from terminal
xcodebuild -exportLocalizations -localizationPath . -workspace <path_workspace> -sdk iphoneos -exportLanguage en
One of my packages contains some macros, and I use them from my code without any problem, the code compile
But when I try to export localizations using that command, the build fails due to "compiler plugin not loaded"
So I cannot use Xcode normal exporting because Xcode bug, and cannot export by running a command due to the macro problem
What should I do? It is very discouraging this situation, do you have any suggestion?
I've found a similar problem
Post not yet marked as solved
After updating Xcode to version 15.3, I can't install my app either on simulator or real device on iOS 17.4.
Here is the error message I got when installing (Build succeed):
Please try again later. `Framework is missing its bundle executable. Please check your build settings to make sure that a bundle executable is produced at the path 'MyApp.app/Frameworks/GoogleMobileAds.framework/GoogleMobileAds'`
I don't have any issue when deploying on iOS 17.0.1, 17.2 or 17.3 on both sim and device. Does anyone face the same issue?
Detail of the error:
Impossible d’installer « My App »
Domain: IXUserPresentableErrorDomain
Code: 1
Recovery Suggestion: My App.app/Frameworks/GoogleMobileAds.framework is missing its bundle executable. Please check your build settings to make sure that a bundle executable is produced at the path "My App.app/Frameworks/GoogleMobileAds.framework/GoogleMobileAds".
User Info: {
DVTErrorCreationDateKey = "2024-03-18 20:12:00 +0000";
IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker;
}
--
Impossible d’installer « My App »
Domain: IXUserPresentableErrorDomain
Code: 1
Recovery Suggestion: My App.app/Frameworks/GoogleMobileAds.framework is missing its bundle executable. Please check your build settings to make sure that a bundle executable is produced at the path "My App.app/Frameworks/GoogleMobileAds.framework/GoogleMobileAds".
User Info: {
IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker;
}
--
Failed to install the app on the device.
Domain: com.apple.dt.CoreDeviceError
Code: 3002
User Info: {
NSURL = "file:///Users/clement/Library/Developer/Xcode/DerivedData/MyApp-dwgovybwoaicqghaqtvbngdkplip/Build/Products/Debug-iphoneos/My%20App.app/";
}
--
Impossible d’installer « My App »
Domain: IXUserPresentableErrorDomain
Code: 1
Failure Reason: Réessayez ultérieurement.
Recovery Suggestion: My App.app/Frameworks/GoogleMobileAds.framework is missing its bundle executable. Please check your build settings to make sure that a bundle executable is produced at the path "My App.app/Frameworks/GoogleMobileAds.framework/GoogleMobileAds".
--
My App.app/Frameworks/GoogleMobileAds.framework is missing its bundle executable. Please check your build settings to make sure that a bundle executable is produced at the path "My App.app/Frameworks/GoogleMobileAds.framework/GoogleMobileAds".
Domain: MIInstallerErrorDomain
Code: 71
User Info: {
FunctionName = "-[MIExecutableBundle executableExistsWithError:]";
SourceFileLine = 1580;
}
--
lstat of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.cYcAbK/extracted/My App.app/Frameworks/GoogleMobileAds.framework/GoogleMobileAds failed: No such file or directory
Domain: NSPOSIXErrorDomain
Code: 2
Failure Reason: No such file or directory
User Info: {
FunctionName = "-[MIFileManager itemExistsAtURL:error:]";
SourceFileLine = 1340;
}
--
Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
"device_isCoreDevice" = 1;
"device_isWireless" = 1;
"device_model" = "iPhone12,3";
"device_osBuild" = "17.4 (21E219)";
"device_platform" = "com.apple.platform.iphoneos";
"dvt_coredevice_version" = "355.24";
"dvt_mobiledevice_version" = "1643.100.58";
"launchSession_schemeCommand" = Run;
"launchSession_state" = 1;
"launchSession_targetArch" = arm64;
"operation_duration_ms" = 10200;
"operation_errorCode" = 1;
"operation_errorDomain" = IXUserPresentableErrorDomain;
"operation_errorWorker" = IDEInstallCoreDeviceWorker;
"operation_name" = IDERunOperationWorkerGroup;
"param_debugger_attachToExtensions" = 0;
"param_debugger_attachToXPC" = 1;
"param_debugger_type" = 3;
"param_destination_isProxy" = 0;
"param_destination_platform" = "com.apple.platform.iphoneos";
"param_diag_MainThreadChecker_stopOnIssue" = 0;
"param_diag_MallocStackLogging_enableDuringAttach" = 0;
"param_diag_MallocStackLogging_enableForXPC" = 1;
"param_diag_allowLocationSimulation" = 1;
"param_diag_checker_tpc_enable" = 1;
"param_diag_gpu_frameCapture_enable" = 0;
"param_diag_gpu_shaderValidation_enable" = 0;
"param_diag_gpu_validation_enable" = 0;
"param_diag_memoryGraphOnResourceException" = 0;
"param_diag_queueDebugging_enable" = 1;
"param_diag_runtimeProfile_generate" = 0;
"param_diag_sanitizer_asan_enable" = 0;
"param_diag_sanitizer_tsan_enable" = 0;
"param_diag_sanitizer_tsan_stopOnIssue" = 0;
"param_diag_sanitizer_ubsan_stopOnIssue" = 0;
"param_diag_showNonLocalizedStrings" = 0;
"param_diag_viewDebugging_enabled" = 1;
"param_diag_viewDebugging_insertDylibOnLaunch" = 1;
"param_install_style" = 0;
"param_launcher_UID" = 2;
"param_launcher_allowDeviceSensorReplayData" = 0;
"param_launcher_kind" = 0;
"param_launcher_style" = 99;
"param_launcher_substyle" = 8192;
"param_runnable_appExtensionHostRunMode" = 0;
"param_runnable_productType" = "com.apple.product-type.application";
"param_structuredConsoleMode" = 1;
"param_testing_launchedForTesting" = 0;
"param_testing_suppressSimulatorApp" = 0;
"param_testing_usingCLI" = 0;
"sdk_canonicalName" = "iphoneos17.4";
"sdk_osVersion" = "17.4";
"sdk_variant" = iphoneos;
}
--
System Information
macOS Version 14.0 (Build 23A344)
Xcode 15.3 (22618) (Build 15E204a)
Timestamp: 2024-03-18T21:12:00+01:00
Post not yet marked as solved
I have a general question that confusing me.
I am on M1 and I can build my app on Xcode (or create an archive) for device. Looking in to derived data I can see Debug-iphones (and simulators) folders, I can get the .app and drag/drop it to the simulator. When trying to run the app the app will crash with error:
EXEC 14 Binary with wrong platform
I understand that it wasn't build for simulators but rather it was build for devices and there fore the crash, but when thinking about it I dont understand why? (at least theoretically it shouldn't crash as it was build for arm64 ). Inspected the binary with lipo it was build for arm64. Comparing the binaries for simulator and device (with otool) I dont see a lot of difference except the rpath.
So how does IOS knows it was build for device and not simulator (wrong platform)?
is there a way to add some sort of relaxation (in the end both binaries were build for arm64).
Post not yet marked as solved
I have several apps that contain extensions. For example an App Clip, Widget, Background Assets extension, etc.
In Xcode Organizer Version 15.3 (15E204a), attempting to view crash data for these apps results in a failure. I have explicitly seen this error print out the app clip extension bundle identifier, as well as the background assets extension bundle identifier. It says the following error:
An error occurred preventing Xcode from downloading crashes list. "" failed with error: Access Restricted with bundle id: com.example.app-name.extension-name
Is anyone else experiencing this?
I created a feedback a few weeks ago, it seemed to coincide with the release of Xcode 15.3 and or the new App Store Connect metrics APIs. App IDs and bundle identifiers detailed in the feedback if anyone at Apple wants the info.
FB13677615 - Xcode: Cannot download crashes for apps that containg extensions --> "Access Restricted with bundle id:
Post not yet marked as solved
Dear Experts,
I've just received the exciting new email from App Store Connect telling me that I'm using a "required reason" API call and need to declare it in my privacy manifest. Of course this is easy to fix, I'll just add the code to my privacy manifest - but I thought I'd at least go through the motions of trying to work out what function I am calling and from where.
First issue is that the email just tells me that the app "references one or more APIs that require reasons ... including NSPrivacyAcceeedAPICategoryFileTimestamp". Dear Apple, why on earth can't you actually tell me the specific function that I am calling? (FB13689896).
So let's see if I can work out what has been detected. I look at the app binary:
% objdump --syms App.app
I think that is probably more or less what App Review must get from their scan, right? So I can see _stat in there but it doesn't know the corresponding source file.
So I go to the build directory with the object files and extract symbols from them all individually, using objdump --syms. Provided that I've not enabled link-time optimisation that works and I can find ... zero calls to stat(). Which tells me that my C++ std::filesystem calls have not been detected! Interesting. So if you want to bypass this amazing new privacy technology, I guess that's the way to go.
Anyway if there's a call to stat() in the binary but not in the object files, it must be coming from one of my .a files. That's a bit more difficult to track down as (1) my .a files are not in a convenient single directory, and (2) they may have calls to stat() in archive members that aren't needed and aren't included in this binary.
So the question: is there some convenient way to take the binary and identify which object files or static library archive members resulted in which of its UND symbols?
Post not yet marked as solved
Ever since I've updated to Xcode 15.2 (I'm currently using Xcode 15.3) my console gets flooded with logs from CFNetwork and DataDetectorsUI. I've never seen those logs before. Is there a way to suppress them? I can't even find my own logs anymore without filters.
CFNetwork
Task <50C80E0E-9DA5-428F-A473-9D0228088022>.<4> resuming, timeouts(25.0, 604800.0) QOS(0x15) Voucher (null)
[Telemetry]: Activity <nw_activity 12:2[78557FD1-54F3-4B77-8C5C-57F500D67286] (reporting strategy default)> on Task <50C80E0E-9DA5-428F-A473-9D0228088022>.<4> was not selected for reporting
Connection 29: set is idle false
Task <50C80E0E-9DA5-428F-A473-9D0228088022>.<4> now using Connection 29
Task <50C80E0E-9DA5-428F-A473-9D0228088022>.<4> sent request, body S 535
Task <50C80E0E-9DA5-428F-A473-9D0228088022>.<4> received response, status 201 content U
Task <50C80E0E-9DA5-428F-A473-9D0228088022>.<4> done using Connection 29
Connection 29: set is idle true
HTTP/2 Connection 29 Stream 7 ended successfully true
Task <50C80E0E-9DA5-428F-A473-9D0228088022>.<4> request *** is NOT allowed to set HSTS for main doc (null)
Task <50C80E0E-9DA5-428F-A473-9D0228088022>.<4> response ended
Task <50C80E0E-9DA5-428F-A473-9D0228088022>.<4> finished successfully
Connection 19: cleaning up
Connection 19: done
Applying proxy auth: response=(null), proxyURL=(null), request=(null), credentials=(null), handle=0x11c2f7d30
Connection 21: cleaning up
Connection 23: cleaning up
Connection 22: cleaning up
DataDetectorsUI
operation 0x10ff7e560
operation 0x10ff7e560 is discarded
Calling the completion block for 0x10ff7e560
dispatchScanQueryCreationWithCompletionBlock of operation <DDTextKitOperation: 0x10ff7e560> completion block: success: 0
operation 0x10ff7e560
operation 0x10ff7e560
operation 0x10fb2f850
really creating scan query in operation 0x10fb2f850!
operation 0x10fb2f850
Post not yet marked as solved
Hi,
I've run an Instruments network capture of our iOS app and the Points of Interest track lists faults due to undisclosed tracking domains. For example app-measurement.com which is used by Firebase causes the fault:
Fault: app-measurement.com is not listed in your app's NSPrivacyTrackingDomain key in any privacy manifest. It may be following users across multiple apps and websites to create a profile about users of apps that contact this domain.
However my PrivacyInfo.xcprivacy file contains (API and Nutrition info omitted):
NSPrivacyTracking: true
NSPrivacyTrackingDomains:
app-measurement.com
So I'm surprised the fault is still occurring.
Is it because the call is coming from a 3rd party SDK (Firebase)? I'll be removing this entry once a compliant Firebase SDK is released but figured it should still work.
I've checked that the IPA contains PrivacyInfo.xcprivacy, and that I'm able to generate a privacy report.
I'm using Xcode 15.0, iOS 17.1.
Post not yet marked as solved
With the latest release of Xcode, my obj c++ project is now giving compile errors like this.
No code has changed. Reverting to Xcode 15.2 solves this
Post not yet marked as solved
good day everyone, I'm new to Xcode and I would like to start the first steps with a DB. I have two problems: 1) I have no idea which free practice DB you can use. 2) consequently I am not yet familiar with any use of the DB.
I would be useful for an indication of a free DB that can be used with Xcode and possibly an example of code to be able to write and read it. I thank anyone who wants to help me
Post not yet marked as solved
I am using UDP communication in a app. Here is what i do,
Initialises a UDP broadcast connection object.
Bind it with a port to listen
Receives the IP & Port from the UDP connection to connect further with TCP connection.
After updating Xcode 15.3, It works until the iPad is connected with mac in debug mode. When i create build to test remotely, it stops receiving IP & Port from UDP connection.
Here is how i concluded this is Xcode issue,
I tried to debug this issue with Xcode 15.2 and it works as expected with debug and after creating build also.
Any help / suggestion would be appreciated.
Post not yet marked as solved
I installed VisionPro's Simulator with Xcode last year, and now I want to uninstall it, but there is an xrOS1.0 disk in the disk image that cannot be erased. Later, I tried to erase the disk in MacOS recovery, but the display failed. I also tried to uninstall the xrOS1.0 disk, but I can't erase the xrOS1.0 disk. Every time I start up, a pop-up window is verifying xrOS1.0, which affects my normal use. I hope you can give me a solution. Thank you!
Post not yet marked as solved
I have apps using CMAltimeter to get sensor data, but recently they stop working with iOS 17.4, it is not release but some user running beta version, the is no access to the sensor data anymore (altitude and barometer). Some user report they can fix it by manual the "Motion & Fitness" permission but it only appear on some device. Report has been sent to Apple but I post here to find the solution to fix it.
Post not yet marked as solved
I have two targets:
App
Share Extension
Each has a preprocessor macro:
TARGET_IS_APP
TARGET_IS_EXTENSION
The App target has a dependency on the share extension.
Some source files are compiled in both targets, but I use the preprocessor macros to enable/disable code for each target.
lately Xcode hasn't been handling the code coloring very well based on the selected build target.
I'll be in a file, my selected target is the App, but it will disable the code in the TARGET_IS_APP macro and enable it for share extension.
The attached image shows an example. My selected build target/scheme is the App. But it's disabling that code and enabling the share extension.
I've double checked the build settings, they are defined in the right targets.
Post not yet marked as solved
Our app is using SwiftData + SwiftUI. After upgrading to Xcode 15.3 Beta, RC1, RC2, we’ve experienced the same issue that the app is having 100% CPU activity even when left idle. This happens as long as the SwiftUI is using @Query to fetch SwiftData and the query does return at least 1 result (there is no issue if the query returns empty result).
We’ve tried the following and therefore confirmed that this is a Xcode 15.3 beta issue:
Xcode 15.3 Beta + iOS 17.2 -> 100% CPU activity when idle
Xcode 15.3 Beta + iOS 17.4 beta -> 100% CPU activity when idle
Xcode 15.2 Beta + iOS 17.2 -> normal
This only happens during debug run. When profiling / using instrument, this doesn't happen.
Post not yet marked as solved
Hi, I would like to Download Xcode version 14.3.1. but I can't find the Download page. where can I download it? I already checked https://developer.apple.com/download/applications/.
I need to install HEASoft astronomy analysis software. but that can't be built with Xcode version 15.3. so I want to download the old version.
Post not yet marked as solved
Upgrade phone, then watch was paired to the new phone with developer mode enabled, but developer mode on watch is no longer visible on watchOS 10.4
Post not yet marked as solved
XCode was compiling and running fine until I recently updated Xcode to 15.3.
Now I'm getting error "The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions" on the following SwiftData predicate:-
predicate: #Predicate<TariffUnitRates> { unitRate in
(
unitRate.tariff?.tariffId == tariffId &&
unitRate.tariff?.isExport == isExport &&
unitRate.tariff?.validFrom == tariffValidFrom &&
unitRate.validFrom ?? validFrom <= validFrom &&
unitRate.validTo ?? validTo >= validTo
)},
Note: removing 1 the 4 conditions and it compiles (in 15 seconds).
It doesn't even take that any long for the compile to fail, fails after 15 seconds.
Running on a MacBook Pro M2, 16 GB, MAC OS 14.4.