xcodebuild makes .app files, but the binary is missing the executable bit. This results in an error when trying to install on a device via Xcode: "CFBundleExecutable" specifies a file that is not executable. This can be fixed by running chmod +x on the binary, but why is it not done by xcodebuild?
This is happening on GitHub builds, running macOS 12.6.5 (21G531). Locally-built apps on 13.3.1 do not have this issue.
Post
Replies
Boosts
Views
Activity
How to handle a connection timing out?
// `endpoint` was obtained from a bonjour browser
let connection = NWConnection(to: endpoint, using: .tcp)
connection.stateUpdateHandler = { [self] newState in
print("newState: \(newState)")
}
connection.start(queue: .main)
Log:
newState: preparing
nw_socket_handle_socket_event [C1.1.4.1:1] Socket SO_ERROR [60: Operation timed out]
... several more times
The stateUpdateHandler function is never called again.
The CODE_SIGN_IDENTITY in the project settings is "Apple Distribution" (for the Release configuration), and I have the distribution certificate in the keychain. But the embedded.mobileprovision file in the .ipa shows only development certificates - why? How can we build a distribution-ready app with xcodebuild?
xcrun xcodebuild \
-project MyApp/MyApp.xcodeproj \
-scheme MyApp \
-configuration Release \
-sdk iphoneos \
-destination "generic/platform=iOS" \
-quiet \
archive \
-archivePath MyApp/Build/Applications/MyApp.xcarchive \
-allowProvisioningUpdates \
-authenticationKeyPath $(APPLE_DEV_KEY_PATH) \
-authenticationKeyID $(APPLE_DEV_KEY_ID) \
-authenticationKeyIssuerID $(APPLE_DEV_ISSUER_ID) \
DWARF_DSYM_FOLDER_PATH=Build/Applications