I am trying to add an Apple Watch companion app to my iPhone app. I have no experience with Apple Watch at all, so I followed the Apple instructions as described on https://developer.apple.com/tutorials/swiftui/creating-a-watchos-app I followed that instruction to the letter, and did not add anything to it, and now have two targets in the project: the original iPhone target, and the Apple Watch target.
When I try to build the Watch app, I get the following linker error:
error: Build input file cannot be found: '/usr/lib/libobjc.A.dylib'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it?
The linker command has the following argument on it:
-weak_library /usr/lib/libobjc.A.dylib
The "Link binary with libraries" option of the "Build Phases" of the Apple Watch target does not have any libraries specified.
Does anybody know what the libobjc library is, and what it is used for? Where is this linker flag configured? How can I make this work?
EDIT: The -weak_library /usr/lib/libobjc.A.dylib is configured in the Project Build Settings, "Other Linker Flags". It seems to be a basic necessity that was already there before I added the Watch target. When I remove it, I get "Undefined symbol: _main" errors. So it seems to be something fundamental that is required. The question is now why it is not found by the linker.
If it matters, the iPhone app has always been Objective-C, but I'd like to start with Swift for the Apple Watch app, so have chosen to create that as a Swift app.
Post
Replies
Boosts
Views
Activity
Does anybody know what the "Document Storage" entry in the Privacy settings for an app means?
I recently discovered that the Privacy Settings of my own app nowadays has a "Document Storage" entry, with (for me) the possible choices: "iCloud Drive", "On My Phone", and "Dropbox". I don't know with which version of iOS these appeared.
When "iCloud Drive" is selected (the default), then the explanatory text below it says "Automatically upload and store your documents in iCloud Drive"
My app has no explicit support for iCloud Drive or iCloud in general, and no support for Dropbox. Some of its files are stored in the Documents folder of the app, which is publicly accessible (through the Files app, e.g.)
My users assume that enabling the option will automatically copy those files to iCloud Drive, but that does not seem to be happening.
I have searched half a day for any documentation around this from Apple, but found nothing.
So: does anybody know what that setting does?
And: if it does not do anything, then how can I can make sure it does NOT appear, to not confuse my users?
I got sent a crash log from a user of my app. I followed the procedure that Apple specifies to symbolicate the crashlog, but that does not succeed (see https://developer.apple.com/documentation/xcode/adding-identifiable-symbol-names-to-a-crash-report#Symbolicate-the-crash-report-in-Xcode)
XCode complains that
"error: unable to locate main executable (arm64)"
The location of the main executable is given in the crashlog at a path that starts with /private/var/containers/Bundle/Application/ But the /private/var/containers directory on my system is empty.
I have tried to search my filesystem for the specific image that is mentioned in the crashlog, but it is nowhere to be found.
Because the image is not available, I cannot symbolicate the crashlog from the commandline using atos either.
The crashlog is from an iPhone running iOS 18.0.1, if that makes a difference.
Anybody knows how to resolve this?