Post not yet marked as solved
Hi,
I'm trying to Developer ID-sign and export a macOS app through my CI/CD pipeline on GitHub Actions, but I've run into an issue signing my app once it has one or more entitlements, in this case, an app group entitlement.
I'm using xcodebuild to archive the app and export that archive, signing it along the way. This works fine as long as my app does not have an entitlement, but once it has an entitlement, exporting the archive fails.
To elaborate a bit on this, I first make sure the development certificate and the Developer ID certificate are installed on the machine. These are installed using the security CLI, and I'm confident that they are installed correctly. Then I proceed to archive the app using xcodebuild as shown below.
xcodebuild archive\
-scheme MyApp\
-configuration Release\
-sdk macosx\
-archivePath MyApp.xcarchive\
-destination "platform=OS X,arch=x86_64"\
-allowProvisioningUpdates\
-authenticationKeyIssuerID XYZ1234\
-authenticationKeyID XYZ\
-authenticationKeyPath AuthKey.p8
Then I export the archive using xcodebuild as shown below.
xcodebuild -exportArchive\
-archivePath MyApp.xcarchive\
-exportPath export\
-exportOptionsPlist ExportOptions.plist\
-allowProvisioningUpdates\
-authenticationKeyIssuerID XYZ1234\
-authenticationKeyID XYZ\
-authenticationKeyPath AuthKey.p8
When my app has one or more entitlements, this fails with the following error message:
Error: error: exportArchive: Cloud signing permission error
Error: error: exportArchive: No profiles for 'com.example.MyApp' were found
Note that I am not signed into an Apple ID in Xcode when signing and exporting my app through my CI/CD pipeline, as there does not seem to be a way to sign into an Apple ID in Xcode through the CLI. Instead, I'm authenticating with an App Store Connect API key.
Developer ID-signing and exporting my app does work when I do it through Xcode, even if the app has an entitlement, so the signing of the app is configured correctly.
Upon inspecting the contents of ~/Library/MobileDevice/Provisioning Profiles after signing and exporting the app through Xcode, I notice that Xcode automatically creates two provisioning profiles with the titles:
Mac Team Provisioning Profile: com.example.MyApp
Mac Team Direct Provisioning Profile: com.example.MyApp
These two provisioning profiles are not created when signing and exporting the app through the xcodebuild command-line tool, and I suspect that is part of the problem.
I'd be OK with manually creating these provisioning profiles through Apple's developer portal and installing them as part of my CI/CD pipeline, but I can't seem to find a way to create this type of provisioning profile through the portal. Neither the macOS App Development, Mac App Store Connect, nor Developer ID provisioning profile types yield this kind of provisioning profile.
All of this, leaves me with the question:
How do I Developer ID-sign and export a macOS app with an entitlement through the command-line without being signed in with my Apple ID in Xcode?
Post not yet marked as solved
I am installing the 14.5 beta2 update last night (however this has happened on non beta releases too) and I wake up with his morning to see the login screen. I enter my password and the update screen is “paused” with 6 minutes to go and then immediately begins completing. I’ve noticed this happening in the past as well and disregarded it. This can’t be normal during an update for the login screen to appear and stop installations.
I was forced to post this in the beta forum by Apple..
"We removed your post “Screen locking while updating macOS - stopping update because it contained information about beta software. "
Post not yet marked as solved
I'm currently befuddled by the entire signing and certificate process. I don't understand what I need, what the team admin needs to do, or how to go about doing it so that I can build the project.
We've managed to have this working in the past but I guess the system has changed somewhat. Here's what we have going:
A Unity project which hasn't changed from a few years ago. I build the project in unity, open the Xcode project and this:
There's an issue with the Signing and Capabilities.
If I choose automatic setup it shows an error saying that it requires a development team. I had the account admin add my Apple ID to the team so I'm not sure why that's an issue still. Do I need to pay the 99$ to be able to building Xcode?
If I try to do it manually I select the provisioning profile that the account admin sent me and it auto selects the team associated with the provisioning profile I guess but then there's no singing certificate. The error says:
There is no signing certificate "iOS Development" found. No "iOS Development" signing certificate matching team ID "V7D5YBZRMV" with a private key was found.
So, if someone could explain to me like I'm 5 the entire signing and certificate process is and let me know what we're doing wrong with the team/provisioning profile/certificate setup I would be very much appreciative.
Post not yet marked as solved
I'm on my final steps 'polishing' my app before submitting to AppStore however there is something that bothers me. My Feedback section is somehow asking for the User's data in order to submit a Feedback. Do i need to include some sort of Privacy Policy for this? The app is working offline and is for educational purposes teaching users
the basics of Swift in an interactive way. ... it doesn't require any sensitive information from the user apart from this form...Feedback is critical, any suggestion?
Post not yet marked as solved
Not impressed. Jk.
My app has only received around 500 impression over 4 or 5 days. How can I fix that?
Post not yet marked as solved
Hi,
In Windows and Linux, it's possible to ask a printer to print content programmatically in Black & White. This may be referred to as "Monochrome", "Grayscale", "B&W", depending on the device driver.
For feature parity with other operating systems, I'd like to do the same -- programmatically -- in macOS using Objective-C or Swift. Is this possible? If not, what's the best, formal way to request this useful OS feature to Apple so that it may be added in a future release?
More context about this request:
https://github.com/openjdk/jdk/pull/18195
Post not yet marked as solved
While setting up our premium video-on-demand workflow in AWS, using AWS MediaConvert and MediaPackager and licence delivery from drmToday we encountered an issue with HLS+FairPlay playback (only) in Safari on macOS. The issue is that sometimes (more than 50% on the same video) the videoplayer initialization fails (with simple event of type=”error” in onerror callback).
We are using Shaka player in our web application, so we first assumed that this (random) issue could be due to Shaka. However, we also tested with direct playback via the player and we observed the same issue, with same frequency. Since we have some content for which this problem does not occur and other content when the problem occurs very frequently, we tried to understand what could explain this difference. We noticed that for assets where the problem never occurs the order of the video submanifest was increasing, whereas for assets where the problem occurs frequently the order is decreasing.
To isolate the issue we created a standalone page for a 2-minute asset and we are able to demonstrate that on this asset, when the bitrates are in decreasing order the playback with Safari on macOS fails more than 50% of the time.
Test page using tag:
KO: https://ntg-test-public-scr.s3.eu-west-1.amazonaws.com/aws-video.html
OK: https://ntg-test-public-scr.s3.eu-west-1.amazonaws.com/aws-video.html?ok=1
Test page using Shaka:
KO: https://ntg-test-public-scr.s3.eu-west-1.amazonaws.com/aws-shaka.html
OK: https://ntg-test-public-scr.s3.eu-west-1.amazonaws.com/aws-shaka.html?ok=1
Notes:
the issue is only reproducible with Safari on macOS (not with Safari on iOS)
same HLS content + FairPlay plays OK 100% on tvOS
the issue is only reproducible for HLS content with FairPlay (OK if no DRM)
Post not yet marked as solved
We are running a Xamarin/Maui iOS app. The syntax I post will be different from Swift or other languages, but the underlying logic and issues should be the same. Since our app is only for employees, we do not want it on the app store. Until now, we've used Microsoft's AppCenter to distribute our app. AppCenter is being retired.
We are trying to follow the "Distribute proprietary in-house apps to Apple devices" guide at https://support.apple.com/guide/deployment/distribute-proprietary-in-house-apps-depce7cefc4d/web. This is working well so far from a web page for installs, but we want our app itself to prompt users to upgrade.
We can call
await Launcher.OpenAsync(url)
with the manifest to install upgrades, however this gives users the option to cancel. If a user cancels, we do not want them to be able to use the old version. My understanding is Apple recommends against apps exiting themselves, which has been a problem for us in other situations users should not be able to continue as well. Providing a page explaining they cannot continue unless they upgrade, or giving them the option to try again is acceptable; however I cannot figure out any way to hook into the event for this dialog to bring this page up at the correct time.
If we go against Apple's advice and close the app, calling Thread.CurrentThread.Abort() immediately after await Launcher.OpenAsync(url) seems to work, both for users who continue and users who cancel. I am wondering if anyone has an alternative - we cannot be the only one distributing an in-house app that upgrades itself.
Post not yet marked as solved
Hello everyone,
I'm programming my app and after a few days I opened and ran it on my iPhone. This app worked, but with one big problem. The problem is that the app doesn't show up in my settings and I don't know why. I didn't program/change anything.
Thanks for the advice
Post not yet marked as solved
Hi,
I was initially stuck with the issues described in thread 749821 between Sonoma 14.4.1, XCode 15.3, iOS 17.4.1 and watchOS 10.4.
=> Unable to deploy the watch app from Xcode
Yesterday when I saw the availability of XCode 15.4 beta, I decided to give it a shot.
This was a bad idea: now I can not even connect the iPhone anymore.
When running with XCode 15.4 beta:
The developer disk image could not be mounted on this device.. Error mounting image: 0xe8000105 (kAMDMobileImageMounterTATSUDeclinedAuthorization: The server declined to authorize this image on this device for this user.)
After reverting toe XCode 15.3, I have a similar issue:
Unable to locate a developer disk image that can be used to enable DDI services..
_synchronousInvoke(passing:context:continuingUsing:): Failed to find a DDI that can be used to enable DDI services on the device. Usually this means the best DDI we could find for a platform did not have compatible CoreDevice content.
Failed to enable developer disk image services for assertion 7AB063A7-1F6F-4558-AEE6-7A4A00706E68. Error: <private>
I tried the following:
Unpair / Repair the iPhone
Disable Wifi
Reinstall the iPhone and the Watch
Reinstalled XCode several times
I also double checked that the DDI images are correct:
For XCode 15.3:
shasum ~/Library/Developer/DeveloperDiskImages/iOS_DDI.dmg
b75a90c64a0ece8f02ca3f4437208366e4884a6b
For XCode 15.4 beta the sha is 287c2f83d888fc085fb6cef2328a6e46dd027399
Questions:
What can I do to diagnose further and fix this issue?
Where can I get more detailed logs than what I can see in the Console related to the DDI images (like the log visible in this thread)
Thanks
Tiry
Post not yet marked as solved
I'm not sure if I just missed a recent breaking change, but we are having an issue with the camera in our single page app on iOS 17.4.1 in Safari. We can open the camera and display it to the user using getUserMedia. However, if the path of the site changes at all (for example, the user clicks a button to opens a sidepanel which results in the path in the browser changing) the camera goes black, even if the video element is still being displayed.
I can see in the browser that the camera has stopped, and the user has to re-enable it manually by tapping "Start Using Camera".
Any idea's what could be going on here?
Post not yet marked as solved
I want to get the network-name (domain-name) on my Mac-Machine. Where iin the Settings does this domain name gets configured. I refer to this page which talks about computer name and host name, I could find where my hostname is present (Settings->General->Sharing->local host name) but not anything related to the network-name (local -domain) .
Even try to fetch this info using the linux api to getdomainname, api call succeeded but it returns Nothing.
#include <iostream>
#include <unistd.h>
#include <limits.h>
#include <cstring>
int main() {
char domainname[255];
// Get the domain name
if (getdomainname(domainname, 255) != 0) {
std::cout << "Error getting domain name" << std::endl;
return 1;
}
std::cout << "Domain name: " << domainname << std::endl;
return 0;
}
Output
Domain name:
I even came across Search-Domains, Does it have anything to do with the network-name (domain name of the machine)?
Post not yet marked as solved
Hello
I changed the phone number then old one registered in my account for auth verification is not working anymore.
I'm unable to login now as I can't receive verification codes..
How to proceed to login and update the phone number ?
Thank you
Post not yet marked as solved
I'm trying to use some files within my application without transfering them to the app's file system, I've managed to do that and by using a bookmark (https://developer.apple.com/documentation/professional_video_applications/fcpxml_reference/asset/media-rep/bookmark/using_bookmark_data) I can access the same directory automatically on every new app laucnh. But if the external device gets disconnected and connected again, or the mobile device is restarted, I've noticed a change in the external device's URL and I also get an error retrieving the bookmark
Error Domain=NSFileProviderErrorDomain Code=-2001 "No valid file provider found with identifier ‘com.apple.filesystems.UserFS.FileProvider’." UserInfo={NSLocalizedDescription=No valid file provider found with identifier ‘com.apple.filesystems.UserFS.FileProvider’., NSUnderlyingError=0x302a45a40 {Error Domain=NSFileProviderErrorDomain Code=-2013 "(null)"}}
Is there a way that I can automatically regain access to the external device directory, or is using the UIDocumentPickerViewController the only way to access it again?
Thanks!
Post not yet marked as solved
I have a use-case were I want to use the the FQDN (Fully Qualified Domain Name) in IOS-Device, which can be used to connect to a Device instead of using the IP-Address. FQDN will be consisting of the machine-name or host-name (Most common term) and the domain-name of the network i.e network-name (local domain assigned to that device). Which IOS Api can be used Here?
Post not yet marked as solved
I am trying to start a live activity using APNs, but it is not supported with firebase or onesignal, is there any other way to send a PN to the device, I have device token, bundle ID, team ID, and apnsKeyID. I also tried hitting this URL: 'https://api.development.push.apple.com/3/device/{deviceToken}', but it gives an error "unable to set private key file" even though I have given the path to my .pem file that has a private key in it enclosed under BEGIN CERTIFICATE and END CERTIFICATE. It will be great if someone could guide me here
Post not yet marked as solved
Hi,
The nearby interaction app provided by apple gives me a range of just 15m and frequent data stops with my UWB hardware. However, the NXP Trimensions AR app gives a distance of more than 30 m with the same hardware non stop.
Could anyone help me solve this issue
Thank you
https://developer.apple.com/documentation/nearbyinteraction/implementing_spatial_interactions_with_third-party_accessories
Post not yet marked as solved
I'm creating an app that uses WeatherKit to get weather data. I wanted to confirm if the requests made to the service during app development will be deducted from our monthly usage limit or credit?
Thanks
Post not yet marked as solved
Hi, developers!
I use DiffableDataSource for myTableView and was surprised when I found that TableView in this case caches previously created cells after (or before) a new update. It seems that this is implemented to store cell states and quickly update if the contents of the table change.
Because of this mechanism, I have the following problem: my cells use reference-type view models, which in turn contain notification observers from the file upload service. The view model is connected to the cell with a closure, which is called upon notification and updates, for example, the progress scale in the cell
After uploading the file, I make a new applySnapshot using similar models with cameras (but, for example, the "fileName" field is already different, so I need to change it in cell).
Due to caching of cells in memory, the old view models with observers are not released, as a result, I get two observers, for two different cells, one of which is visible, and the second is not. This causes problems with UI. To summarize, my question is, is it possible to disable cell caching or clean the cache if using Diffable Data Source manually?
Post not yet marked as solved
I need to create a carousel component with the following requirements (sorted by relevance):
Objectives
Every image is 16:9 aspect ratio and resizes to fit the screen.
Needs a zoom and pan functionality, possibly the same way as iOS Photos app.
Needs to work both in landscape and portrait mode, with a smooth transition between orientations.
When orientation changes, the image needs to be rotated to preserve the center of the image (like Photos app and hyperoslo/Lightbox)
The component should only take the minimum necessary space. In most use cases, such component should have other subviews both above and below.
Circularity. I would like the carousel to wrap around.
What I tried:
Using a TabView with .tabViewStyle(PageTabViewStyle()).indexViewStyle(PageIndexViewStyle(backgroundDisplayMode: .always)) modifiers.
This didn't work: rotating the interface caused the view to get stuck between pages (it looks like it's a well known [bug]).(https://stackoverflow.com/questions/72435939/swiftui-tabview-is-not-working-properly-on-orientation-change).
Implementing a single page (that is, an image view) using an UIScrollView and an UIViewRepresentable, then collecting them into an HStack.
Unfortunately I need to use zoomScale and contentOffset properties of the UIScrollView outside of the UIViewRepresentable itself. The net result was that .init() was invoked for every image in the carousel at every rotation, causing severe stutters and an horrible rotation animation.
Implementing the whole carousel using UIKit, and an UICollectionView, whose cells were an instance of UIScrollView.
The problem is, the UIScrollView needs to recompute its constraints upon rotation but a cell is an instance of UIView, so it can't respond to rotations via viewWillTransition(to:CGSize, with: any UIViewControllerTransitionCoordinator).
In the UICollectionView itself, you can only access the visible cells (one at a time is visible), and cells are cached, so even after rotating, some occasionally are presented on screen with the same appearance as before the rotation (some do, some don't, in the same UICollectionView). Also when rotating, it looks like the UIScrollView of the visible cell is being recreated, making it impossible to preserve the image center (I use this subclass of UIScrollView for this purpose). And the UICollectionView is taking the full window size, not just the bare minimum necessary space.
Help:
With all of this in mind, what options do I realistically have? If necessary I can raise the minimum iOS version to 16.0, even though I guess it doesn't make any significative difference since SwiftUI introduced MagnifyGesture only from iOS 17.0.