Was working ok, then after my latest attempt at submitting a .PKG it crashes right after displaying the list of previous submitted things.
This make it impossible to make progress with my project, unless there's another way of getting it to TestFlight (not using Xcode).
Transporter 1.3.2 on Intel Mac Sequoia 15.0
General
RSS for tagDive into the vast array of tools and services available to developers.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Recently a bunch of folks have asked about why a specific symbol is being referenced by their app. This is my attempt to address that question.
If you have questions or comments, please start a new thread. Tag it with Linker so that I see it.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Determining Why a Symbol is Referenced
In some situations you might want to know why a symbol is referenced by your app. For example:
You might be working with a security auditing tool that flags uses of malloc.
You might be creating a privacy manifest and want to track down where your app is calling stat.
This post is my attempt at explaining a general process for tracking down the origin of these symbol references. This process works from ‘below’. That is, it works ‘up’ from you app’s binary rather than ‘down’ from your app’s source code. That’s important because:
It might be hard to track down all of your source code, especially if you’re using one or more package management systems.
If your app has a binary dependency on a static library, dynamic library, or framework, you might not have access to that library’s source code.
IMPORTANT This post assumes the terminology from An Apple Library Primer. Read that before continuing here.
The general outline of this process is:
Find all Mach-O images.
Find the Mach-O image that references the symbol.
Find the object files (.o) used to make that Mach-O.
Find the object file that references the symbol.
Find the code within that object file.
Those last few steps require some gnarly low-level Mach-O knowledge. If you’re looking for an easier path, try using the approach described in the A higher-level alternative section as a replacement for steps 3 through 5.
This post assumes that you’re using Xcode. If you’re using third-party tools that are based on Apple tools, and specifically Apple’s linker, you should be able to adapt this process to your tooling. If you’re using a third-party tool that has its own linker, you’ll need to ask for help via your tool’s support channel.
Find all Mach-O images
On Apple platforms an app consists of a number of Mach-O images. Every app has a main executable. The app may also embed dynamic libraries or frameworks. The app may also embed app extensions or system extensions, each of which have their own executable. And a Mac app might have embedded bundles, helper tools, XPC services, agents, daemons, and so on.
To find all the Mach-O images in your app, combine the find and file tools. For example:
% find "Apple Configurator.app" -print0 | xargs -0 file | grep Mach-O
Apple Configurator.app/Contents/MacOS/Apple Configurator: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64]
…
Apple Configurator.app/Contents/MacOS/cfgutil: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64]
…
Apple Configurator.app/Contents/Extensions/ConfiguratorIntents.appex/Contents/MacOS/ConfiguratorIntents: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64]
…
Apple Configurator.app/Contents/Frameworks/ConfigurationUtilityKit.framework/Versions/A/ConfigurationUtilityKit: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [arm64]
…
This shows that Apple Configurator has a main executable (Apple Configurator), a helper tool (cfgutil), an app extension (ConfiguratorIntents), a framework (ConfigurationUtilityKit), and many more.
This output is quite unwieldy. For nicer output, create and use a shell script like this:
% cat FindMachO.sh
#! /bin/sh
# Passing `-0` to `find` causes it to emit a NUL delimited after the
# file name and the `:`. Sadly, macOS `cut` doesn’t support a nul
# delimiter so we use `tr` to convert that to a DLE (0x01) and `cut` on
# that.
#
# Weirdly, `find` only inserts the NUL on the primary line, not the
# per-architecture Mach-O lines. We use that to our advantage, filtering
# out the per-architecture noise by only passing through lines
# containing a DLE.
find "$@" -type f -print0 \
| xargs -0 file -0 \
| grep -a Mach-O \
| tr '\0' '\1' \
| grep -a $(printf '\1') \
| cut -d $(printf '\1') -f 1
Find the Mach-O image that references the symbol
Once you have a list of Mach-O images, use nm to find the one that references the symbol. The rest of this post investigate a test app, WaffleVarnishORama, that’s written in Swift but uses waffle management functionality from the libWaffleCore.a static library. The goal is to find the code that calls calloc.
This app has a single Mach-O image:
% FindMachO.sh "WaffleVarnishORama.app"
WaffleVarnishORama.app/WaffleVarnishORama
Use nm to confirm that it references calloc:
% nm "WaffleVarnishORama.app/WaffleVarnishORama" | grep "calloc"
U _calloc
The _calloc symbol has a leading underscore because it’s a C symbol. This convention dates from the dawn of Unix, where the underscore distinguish C symbols from assembly language symbols.
The U prefix indicates that the symbol is undefined, that is, the Mach-O images is importing the symbol. If the symbol name is prefixed by a hex number and some other character, like T or t, that means that the library includes an implementation of calloc. That’s weird, but certainly possible. OTOH, if you see this then you know this Mach-O image isn’t importing calloc.
IMPORTANT If this Mach-O isn’t something that you build — that is, you get this Mach-O image as a binary from another developer — you won’t be able to follow the rest of this process. Instead, ask for help via that library’s support channel.
Find the object files used to make that Mach-O image
The next step is to track down which .o file includes the reference to calloc. Do this by generating a link map. A link map is an old school linker feature that records the location, size, and origin of every symbol added to the linker’s output.
To generate a link map, enable the Write Link Map File build setting. By default this puts the link map into a text (.txt) file within the derived data directory. To find the exact path, look at the Link step in the build log. If you want to customise this, use the Path to Link Map File build setting.
A link map has three parts:
A simple header
A list of object files used to build the Mach-O image
A list of sections and their symbols
In our case the link map looks like this:
# Path: …/WaffleVarnishORama.app/WaffleVarnishORama
# Arch: arm64
# Object files:
[ 0] linker synthesized
[ 1] objc-file
[ 2] …/AppDelegate.o
[ 3] …/MainViewController.o
[ 4] …/libWaffleCore.a[2](WaffleCore.o)
[ 5] …/Foundation.framework/Foundation.tbd
…
# Sections:
# Address Size Segment Section
0x100008000 0x00001AB8 __TEXT __text
…
The list of object files contains:
An object file for each of our app’s source files — That’s AppDelegate.o and MainViewController.o in this example.
A list of static libraries — Here that’s just libWaffleCore.a.
A list of dynamic libraries — These might be stub libraries (.tbd), dynamic libraries (.dylib), or frameworks (.framework).
Focus on the object files and static libraries. The list of dynamic libraries is irrelevant because each of those is its own Mach-O image.
Find the object file that references the symbol
Once you have list of object files and static libraries, use nm to each one for the calloc symbol:
% nm "…/AppDelegate.o" | grep calloc
% nm "…/MainViewController.o" | grep calloc
% nm "…/libWaffleCore.a" | grep calloc
U _calloc
This indicates that only libWaffleCore.a references the calloc symbol, so let’s focus on that.
Note As in the Mach-O case, the U prefix indicates that the symbol is undefined, that is, the object file is importing the symbol.
Find the code within that object file
To find the code within the object file that references the symbol, use the objdump tool. That tool takes an object file as input, but in this example we have a static library. That’s an archive containing one or more object files. So, the first step is to unpack that archive:
% mkdir "libWaffleCore-objects"
% cd "libWaffleCore-objects"
% ar -x "…/libWaffleCore.a"
% ls -lh
total 24
-rw-r--r-- 1 quinn staff 4.1K 8 May 11:24 WaffleCore.o
-rw-r--r-- 1 quinn staff 56B 8 May 11:24 __.SYMDEF SORTED
There’s only a single object file in that library, which makes things easy. If there were a multiple, run the following process over each one independently.
To find the code that references a symbol, run objdump with the -S and -r options:
% xcrun objdump -S -r "WaffleCore.o"
…
; extern WaffleRef newWaffle(void) {
0: d10083ff sub sp, sp, #32
4: a9017bfd stp x29, x30, [sp, #16]
8: 910043fd add x29, sp, #16
c: d2800020 mov x0, #1
10: d2800081 mov x1, #4
; Waffle * result = calloc(1, sizeof(Waffle));
14: 94000000 bl 0x14 <ltmp0+0x14>
0000000000000014: ARM64_RELOC_BRANCH26 _calloc
…
Note the ARM64_RELOC_BRANCH26 line. This tells you that the instruction before that — the bl at offset 0x14 — references the _calloc symbol.
IMPORTANT The ARM64_RELOC_BRANCH26 relocation is specific to the bl instruction in 64-bit Arm code. You’ll see other relocations for other instructions. And the Intel architecture has a whole different set of relocations. So, when searching this output don’t look for ARM64_RELOC_BRANCH26 specifically, but rather any relocation that references _calloc.
In this case we’ve built the object file from source code, so WaffleCore.o contains debug symbols. That allows objdump include information about the source code context. From that, we can easily see that calloc is referenced by our newWaffle function.
To see what happens when you don’t have debug symbols, create an new object file with them stripped out:
% cp "WaffleCore.o" "WaffleCore-stripped.o"
% strip -x -S "WaffleCore-stripped.o"
Then repeat the objdump command:
% xcrun objdump -S -r "WaffleCore-stripped.o"
…
0000000000000000 <_newWaffle>:
0: d10083ff sub sp, sp, #32
4: a9017bfd stp x29, x30, [sp, #16]
8: 910043fd add x29, sp, #16
c: d2800020 mov x0, #1
10: d2800081 mov x1, #4
14: 94000000 bl 0x14 <_newWaffle+0x14>
0000000000000014: ARM64_RELOC_BRANCH26 _calloc
…
While this isn’t as nice as the previous output, you can still see that newWaffle is calling calloc.
A higher-level alternative
Grovelling through Mach-O object files is quite tricky. Fortunately there’s an easier approach: Use the -why_live option to ask the linker why it included a reference to the symbol. To continue the above example, I set the Other Linker Flags build setting to -Xlinker / -why_live / -Xlinker / _calloc and this is what I saw in the build transcript:
_calloc from /usr/lib/system/libsystem_malloc.dylib
_newWaffle from …/libWaffleCore.a[2](WaffleCore.o)
_$s18WaffleVarnishORama18MainViewControllerC05tableE0_14didSelectRowAtySo07UITableE0C_10Foundation9IndexPathVtFTf4dnn_n from …/MainViewController.o
_$s18WaffleVarnishORama18MainViewControllerC05tableE0_14didSelectRowAtySo07UITableE0C_10Foundation9IndexPathVtF from …/MainViewController.o
Demangling reveals a call chain like this:
calloc
newWaffle
WaffleVarnishORama.MainViewController.tableView(_:didSelectRowAt:)
WaffleVarnishORama.MainViewController.tableView(_:didSelectRowAt:)
and that should be enough to kick start your investigation.
IMPORTANT The -why_live option only works if you dead strip your Mach-O image. This is the default for the Release build configuration, so use that for this test.
Revision History
2025-07-18 Added the A higher-level alternative section.
2024-05-08 First posted.
Production build on eas failing for a couple of days. Submitted a request for information day before yesterday, but I was wondering if anyone else has been having this problem. I will post any update from Apple if/when I get it.
Topic:
Developer Tools & Services
SubTopic:
General
Sometime since July 2024 the list of devices in our Enterprise Account is showing the same device and UDID 6 times.
Looking at the DATE REGISTERED field it is apparent that each instance of the device represents the 'old' device that should have been 'deleted' when the annual device reset was actioned. The date registered field shows dates with 2019, 2020, 2021, and so till 2024 (most recent).
I have 'disabled' two of the entries to see what happens, and those instances were disabled as expected without impacting the other instances. However, when attempting a re-enable of them, an error throws saying that they cant be enabled because that UDID already exists - obviously the other instances.
For now, I have left 4 active duplicates in place, and the 2 disabled ones as they are, and plan to deal with this again - if it re-occurs in 2025.
It does not seem to have impacted provisioing profiles - so will leave well enough alone. I am sure if I disable all of them, I will not be able to re-enabled any of them.
Is this a know issue? Is this the best strategy? - ie, wait till device reset next year and hope issue is resolved.
This post had similar issue, in 2023, but no response
Forum Post 733264
Topic:
Developer Tools & Services
SubTopic:
General
Tags:
Enterprise
Provisioning Profiles
Device Management
Developer Program
I downloaded a program from Stanford University and am trying to get it to work on my iPhone. The program works on my computer, but when I try to upload it to the App Store, I get all sorts of errors.
I am running Xcode 16 on a Max Studio. When I run the compiler, I get a message: “The iPhone needs to be prepared for development, and development services need to be enabled. Ensure that the device is unlocked.”
I am confused by the term “unlocked.” Is the message referring to a lock by carrier or an on-device lock? How do I enable development services?
-Merwyn
Topic:
Developer Tools & Services
SubTopic:
General
Apologies if this isn't tagged right but dev tools and services seemed the most appropriate since this is related to the workbench Ad Tester tool. I'm seeing a behavior where the preview link is not being generated. Specifically, I am seeing a POST request to the following URL consistently fail:
https://iadworkbench.apple.com/adtester/api/v1/ads/previewLink?orgId=1127861
Variations/scenarios I have tried so far:
All possible ad format choices on all possible devices
All options for the placement type
Both third party and uploaded creative sources
Uploaded creative sources appear to be failing to upload as well
A simple div with a "hello world" content fails as a third party creative source
Multiple apple accounts
I created a new account specifically to test if my primary apple ID was experiencing issues with this
Multiple browsers
I have tried multiple versions of Chrome/Firefox/Safari
I tested with and without browser extensions to determine whether an extension was interfering or not
Clearing session/local storage along with cookies
I also created new profiles in browsers to verify that I was getting a fresh browser environment
In all of these cases, the API request to generate a preview link is consistently failing with a 500 error code. It's worth noting that the web preview option works, but this isn't a truly accurate test environment and can't be solely relied on when testing ad content.
I don't know exactly when this started happening as I have not used it in the last couple of weeks but I have used the workbench ad tester extensively in the past the same way I have been trying with my current test without issue. That coupled with the fact that the request for the preview link consistently fails in all of the test scenarios I've outlined above leads me to believe there is a problem with the API that is responsible for generating the preview links.
I'm tying to build and run a Maui project on Mac and keep getting the following error:
I'm using JetBrains Rider and even though I have it set not to build for iOS I can't get past this error.
Other possibly useful infos:
OpenGL
Silk.NET
running on Apple Silicon
cross platform project, builds and runs fine on Windows
The operation couldn’t be completed. (ModelCatalog.CatalogErrors.AssetErrors error 1.)
Domain: ModelCatalog.CatalogErrors.AssetErrors
Code: 1
User Info: {
DVTErrorCreationDateKey = "2024-10-06 09:19:05 +0000";
}
Failed to find asset: com.apple.gm.safety_deny.output.code_intelligence.base - no asset
Domain: ModelCatalog.CatalogErrors.AssetErrors
Code: 1
System Information
macOS Version 15.0.1 (Build 24A348)
Xcode 16.0 (23051) (Build 16A242d)
Timestamp: 2024-10-06T11:19:05+02:00
Topic:
Developer Tools & Services
SubTopic:
General
I have two macOS applications: Application A, named My App.app with the bundle ID com.comp.myapp, and Application B, named My App.app with the bundle ID com.comp.myapp2. Both applications have the same name. Application A is installed at /Applications/My App.app. When I run the installer for Application B, it gets installed in a folder at /Applications/My App.localized/My App.app. Even if I remove Application A using the preinstall script of Application B's installer, the result remains the same.
Does the installer determine the installation path with the new folder before the preinstall script executes?
How can it be addressed so the new folder will not be created?
Notes:
We have a composite package that contains multiple components. Instead of just running pkgbuild, we use our own components.plist rather than a synthesized one. The components.plist is attached.
The PackageInfo for Application B is also attached.
components.plist
PackageInfo
packageInfo.xml
components.plist
Topic:
Developer Tools & Services
SubTopic:
General
Tags:
Developer Tools
InstallerJS
macOS
Command Line Tools
Hi developers,
I'm searching for a kind of way of working to develop my apps on a different machine than testing and final building.
For development I have a MacBook Pro m4 and for testing I want to outsource this to a Mac mini m1. I was searching for a solution and also contacted the support, but the answer wasn't really helpful.
Any ideas how to setup this configuration to automate this kind of tests?
Thanks a lot!
在idea中Java spring 框架如何运行啊,求求大佬们,我跑https://gitee.com/lab1024/smart-admin 这个包老是报错,不让我写入
i have been added to an apple membership organization, and given App manager's rights b ut my build keeps failing and asking me to get more access
Topic:
Developer Tools & Services
SubTopic:
General
To reduce the app size, the application dmg file does not contains the symbols in it. But when we meet memory issue, I use
"leaks 'appName' --outputGrap =memoryLeak.memgraph" to get a memory graph
Because there is no symbols contained the application, there is no function names(module names) which allocate the memory from the memory graph.
But, we save the symbols as separate .dSYM files when compile, Is there any way to use the .dSYM files to symbolize the memory graph in this case ?
Good morning everyone,
I am developing a Flutter app for Android and iOS.
When I press a button, the app detects the location of the device (obviously with permissions already granted).
On Android everything works correctly.
On iOS, however, when I press the button for the first time after opening the app, the location is detected after about 30-50 seconds.
On the other hand, if I repeat the operation later, the response time is drastically reduced (only a few seconds).
I am using the location package (https://pub.dev/packages/location), and the code to get the location is as follows:
var currentLocation = await location.getLocation();
Has anyone experienced this problem before or knows how to solve it?
Thank you very much!
Federico
在将游戏从 Nintendo Switch 移植到 Mac 的过程中使用 .NET (NativeAOT) 有哪些限制和注意事项(尽管两者都是 ARM)?
Topic:
Developer Tools & Services
SubTopic:
General
For the Linux version of my application which is written in C++ using Qt, I display the CHM format help files with this code:
QString helpFile{ QCoreApplication::applicationDirPath() + "/Help/" + tr("DeepSkyStacker Help.chm","IDS_HELPFILE") };
QString program{ "kchmviewer" };
QStringList arguments{ "-token", "com.github.deepskystacker", helpFile };
helpProcess->startDetached(program, arguments);
(helpProcess is a pointer to a QProcess object)
The -token com.github.deepskystackerpart of that ensures that only a single instance of the viewer is used for any code that uses that invocation.
Are there any chm file viewers for macOS that are capable of that sort of trick? The ones I've found on the App Store give minimal information and appear to be very simple minded tools that are not not intended for integration into an application as above.
I know that MacPorts offers ports of kchmviewer but I'd prefer not to use either that or HomeBrew ...
David
Topic:
Developer Tools & Services
SubTopic:
General
I have been waiting for a response for approval of the ESIm rights permit for over 6 months and I have not had any response. I contacted support and they hang up on me. I don't know what to do anymore. Does anyone know how I can obtain the status of my application?
Hi, I’m currently developing a watchOS app and ran into an issue where I can’t enable Developer Mode on my Apple Watch.
Device info:
Apple Watch Series 9 (watchOS 10.4)
Paired with iPhone 14 Pro (iOS 17.4.1)
Xcode 15.3 (macOS 15.5, Apple Silicon)
Issue:
When I try to run the app on my physical watch device, Xcode prompts that Developer Mode needs to be enabled. However, there is no approval request on the Apple Watch, and no Developer Mode option appears under Settings → Privacy & Security.
I’ve already tried the following:
Rebooting both devices
Unpairing and re-pairing the watch
Erasing and setting up the watch again
Signing out and back into my Apple ID
Using the latest Xcode version (15.3 and 16.3 both tested)
Running clean builds and checking provisioning profiles
Attempting install via both simulator and physical device
Still no luck — the app will not launch on the Apple Watch due to Developer Mode being disabled, and the option is missing entirely from Settings.
I visited an Apple Store Genius Bar, but they couldn’t help and told me to contact Developer Support. I’ve already submitted a support request, but in the meantime I wanted to ask here in case anyone else has experienced this and found a workaround.
Thanks in advance.
I am trying to get my app deployed to an iOs device (iphone 14) from Visual Studio on Windows 11. If the device I am trying to deploy to is included in https://developer.apple.com/account/resources/devices/list then I see below error in Visual Studio logs.
Xamarin.Messaging.IDB.AppleProvisioningManager Error: 0 : Xamarin.MacDev.AppleSigning.AppleServerException: A device with number '0000xxxx-0014093926Bxxxx' already exists on this team.
at Xamarin.MacDev.AppleSigning.AppStoreDeveloperPortal.d__42.MoveNext() in D:\a_work\1\s\External\maciostools\Xamarin.MacDev.AppleSigning\AppleDeveloperPortal\AppStoreDeveloperPortal.cs:line 913
If I disable it I see below error in Visual Studio logs:
Xamarin.Messaging.Client.MessagingClient Error: 0 : An error occurred on the receiver while executing a post for topic xvs/idb/auto-provision and client vs26896sv3
Xamarin.Messaging.Exceptions.MessagingRemoteException: An error occurred on client xxxxxxx while executing a reply for topic xvs/idb/auto-provision ---> Newtonsoft.Json.JsonSerializationException: Error converting value {null} to type 'System.DateTime'. Path 'data.attributes.addedDate', line 6, position 24
I am seeing no option to completely remove the device from the list. How can this issue be fixed?
Topic:
Developer Tools & Services
SubTopic:
General
We have been trying to migrate screens that were developed using UITool Kit to SwiftUI. In the process we have some screens that have SwiftUI embedded inside the UITool kit view. Our developers have defined accessibility ids for all elements in these views and these are inspectable using the native iOS xcode inspector. However when i try inspecting it with the appium inspector i get an empty list with no elements in the hierarchy tree. Attaching a screenshot of the element when inspecting through the native xcode accessibility inspector,
Attaching a screenshot of the same screen when inspected through the appium inspector,
Also tried printing the XCTest UI dump using appium method,
`driver().executeScript("mobile:source", Map.ofEntries(Map.entry("format","description")))
The UI tree i get is the same that i get when inspecting through the appium inspector.
Requesting support from the Apple team based on this ticket, [https://github.com/appium/appium/issues/20759)