Developer Tools

RSS for tag

Ask questions about the tools you can use to build apps.

Posts under Developer Tools tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

productbuild: notarize .pkg with non-binary sub package
Hi, we have .pkg install package consisting of various sub packages. One of them contains presets and needs to be installed the the default preset location /Library/Audio/Presets. If this non-binary preset package is the only one in a .pkg choice notarization fails with: "logFormatVersion": 1, "jobId": "*", "status": "Invalid", "statusSummary": "Archive contains critical validation errors", "statusCode": 4000, "archiveFilename": "mypackage.pkg.zip", "uploadDate": "2024-08-22T21:24:03.251Z", "sha256": "*", "ticketContents": null, "issues": [ { "severity": "error", "code": null, "path": "mypackage.pkg.zip", "message": "Package mypackage.pkg.zip has no signed executables or bundles. No tickets can be generated.", "docUrl": null, "architecture": null }, { "severity": "warning", "code": null, "path": "mypackage.pkg.zip/mypackage.pkg", "message": "b\"Invalid component package: mypackage_vstpreset Distribution file's value: #com.mycompany.mypackage.vstpreset.pkg\\n\"", "docUrl": null, "architecture": null } ] } Not sure, but maybe its worth noting that the causing sub packge only generates a warning, but the parent package seems to escalate this into an error. How can a non-binary sub package be included in a notarized parent package? Any hints or thoughts are highly appreciated, Thanks!
3
0
496
Sep ’24
Some question about Apple Intelligents
Apple Intelligents is here, but I have some problems. First of all, it often shows that something is being downloaded on the settings page. Is this normal? And the Predictive Code Completion Model in Xcode seems to have been suddenly deleted and needs to be re-downloaded, and the error The operation couldn't be complet has occurred. Ed. (ModelCatalog.CatalogErrors.AssetErrors error 1.), detailed log: The operation couldn’t be completed. (ModelCatalog.CatalogErrors.AssetErrors error 1.) Domain: ModelCatalog.CatalogErrors.AssetErrors Code: 1 User Info: { DVTErrorCreationDateKey = "2024-08-27 14:42:54 +0000"; } -- Failed to find asset: com.apple.fm.code.generate_small_v1.base - no asset Domain: ModelCatalog.CatalogErrors.AssetErrors Code: 1 -- System Information macOS Version 15.1 (Build 24B5024e) Xcode 16.0 (23049) (Build 16A5230g) Timestamp: 2024-08-27T22:42:54+08:00
2
3
597
Aug ’24
On Log Noise - Debugging
I came across several "errors" being reported when I run my app, however my app seems to function correctly. I believe they fall in the category listed on this ( now locked ) thread https://developer.apple.com/forums/thread/115461 However, I wanted to post the ones I found to clarify ( close to submission) just in case any of these end up being more than just log noise later. PLEASE let me know if you've come across these before and whether they impacted anything or if you can confirm they are just log noise. Thanks in advance! -[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID. inputModality = Keyboard, inputOperation = , customInfoType = UIEmojiSearchOperations AVAudioSession_iOS.mm:2,223 Server returned an error from destroySession:. Error Domain=NSCocoaErrorDomain Code=4099 “The connection to service with pid 102 named com.apple.audio.AudioSession was invalidated from this process.” UserInfo={NSDebugDescription=The connection to service with pid 102 named com.apple.audio.AudioSession was invalidated from this process. CAReportingClient.mm:532 Attempted to remove a reporter not created by this client { careporter_id=408,331,130,765,320 } load_eligibility_plist: Failed to open //private/var/db/os_eligibility/eligibility.plist: Operation not permitted(1) - I verified and this file is indeed in non read mode on my Mac for the user. However it affects nothing. The following 2 pop up - although I have no explicit code or 3P code ( nor Ads) that require impressions - each time I click on the Game Center Access Point post authentication. Cannot add impressions because no tracker is specified by the metrics fields context. Did you forget to set one from your view controller or data source? Cannot add page fields because none are specified by the metrics fields context. Did you forget to add an PageMetricsPresenter to the object graph used for actions?
1
0
468
Aug ’24
App Icon all black on ios17, works on iOS18, building app in Xcode16 beta
In my app I added an AppIcon in the Assets.xcassets folder. I added a any/dark/tinted version of the app icon, in 1024x1024 resolution as a HEIC file, specifying a "single size" iOS option. When I build and run the app in xcode16 beta on iOS18 the icon works as expected, but when I run the same app on iOS17 the icon just shows up as a black rectangle. How do I get the app icon to work correctly on both iOS18 and iOS17?
1
0
513
Aug ’24
generate secIdentity from certificate & private key
Hi I want to create secIdentity from certificate & key. I receive certificate from my server and I have private key of that. My certificate is like this -----BEGIN CERTIFICATE-----\nMIIEyTC...jix0=\n-----END CERTIFICATE----- And private key is like this -----BEGIN RSA PRIVATE KEY-----\nMIIEp...5KM=\n-----END RSA PRIVATE KEY-----\n I am trying to create secIdentity by saving certificate and key in keychain, but I am getting -25300 as error. To create the identity my code is like this. func deleteCertificateAndKey(certLabel:String, keyTag:Data) -> Bool { // Query for the certificate let query: [String: Any] = [kSecClass as String: kSecClassCertificate, kSecAttrLabel as String: certLabel] // Attempt to delete the certificate let certificateDeleteStatus = SecItemDelete(query as CFDictionary) print("certificateDeleteStatus: \(certificateDeleteStatus)") // if certificateDeleteStatus == errSecSuccess { // print("Certificate Certificate deleted successfully.") // } else { // print("Failed to delete certificate Certificate. Error: \(certificateDeleteStatus)") // return false // } // // Query for the private key associated with the certificate let keyQuery: [String: Any] = [ kSecClass as String: kSecClassKey, kSecAttrApplicationTag as String: keyTag ] // Attempt to delete the private key let keyDeleteStatus = SecItemDelete(keyQuery as CFDictionary) print("keyDeleteStatus: \(keyDeleteStatus)") // if keyDeleteStatus == errSecSuccess { // print("Private key associated with Key deleted successfully.") // return true // } else { // print("Failed to delete private key for Key. Error: \(keyDeleteStatus)") // return false // } return true; } func stripPemHeaders(_ pemString: String) -> String { var result = pemString // result = result.replacingOccurrences(of: "-----BEGIN RSA PRIVATE KEY-----\n", with: "") result = result.replacingOccurrences(of: "\n-----END RSA PRIVATE KEY-----\n", with: "") // result = result.replacingOccurrences(of: "-----BEGIN CERTIFICATE-----\n", with: "") result = result.replacingOccurrences(of: "\n-----END CERTIFICATE-----", with: "") return result } func loadIdentity(certificate: String, privateKey: String)-> SecIdentity? { let strippedCertificate = stripPemHeaders(certificate) print("strippedCertificate : \(strippedCertificate)") guard let certData = Data(base64Encoded: strippedCertificate, options:NSData.Base64DecodingOptions.ignoreUnknownCharacters) else { print("Unable to decode certificate PEM") return nil } print("certData: \(certData)") // Create certificate object guard let cert = SecCertificateCreateWithData(kCFAllocatorDefault, certData as CFData) else { print("Unable to create certificate") return nil } let addCertQuery: [String: Any] = [kSecClass as String: kSecClassCertificate, kSecValueRef as String: cert, kSecAttrLabel as String: "shahanshahAlam"] let tag = "fedvfdvjjkdf-tag".data(using: .utf8)! _ = deleteCertificateAndKey(certLabel: "shahanshahAlam",keyTag: tag ) // print("deleteStatus finished with status: \(deleteStatus)") let certAddStatus = SecItemAdd(addCertQuery as CFDictionary, nil) print("certAddStatus finished with status: \(certAddStatus)") let strippedPrivateKey = stripPemHeaders(privateKey) print("strippedPrivateKey : \(strippedPrivateKey)") guard let pemKeyData = Data(base64Encoded: strippedPrivateKey, options:NSData.Base64DecodingOptions.ignoreUnknownCharacters) else { print("Error: couldn't parse the privateKeyString, pls check if headers were removed: \(privateKey)") return nil } print("pemKeyData finished with status: \(pemKeyData)") let sizeInBits = pemKeyData.count * 8 let keyDict: [CFString: Any] = [ kSecAttrKeyType: kSecAttrKeyTypeRSA, kSecAttrKeyClass: kSecAttrKeyClassPrivate, kSecAttrKeySizeInBits: NSNumber(value: sizeInBits), kSecReturnPersistentRef: true ] var error: Unmanaged<CFError>? guard let key = SecKeyCreateWithData(pemKeyData as CFData, keyDict as CFDictionary, &error) else { print("Failed creating a Certificate from data \(error.debugDescription)") return nil } let addKeyQuery: [String: Any] = [ kSecClass as String: kSecClassKey, kSecAttrIsPermanent as String: true, kSecValueRef as String: key, kSecAttrApplicationTag as String: tag ] let privKeyAddStatus = SecItemAdd(addKeyQuery as CFDictionary, nil) print("privKeyAddStatus status finished with status: \(privKeyAddStatus)") // query for all avaiable identities let getIdentityQuery = [ kSecClass : kSecClassIdentity, // kSecReturnData : true, // kSecReturnAttributes : true, kSecReturnRef : true, kSecAttrApplicationTag as String: tag, kSecMatchLimit : kSecMatchLimitAll ] as CFDictionary var identityItem: CFTypeRef? let status = SecItemCopyMatching(getIdentityQuery , &identityItem) print("identityItem finished with status: \(String(describing: identityItem))") print("status finished with status: \(status)") guard status == errSecSuccess else { print("Unable to create identity") return nil } return (identityItem as! SecIdentity); } How can I fix that.
2
0
331
Aug ’24
App giving the following error when run on any machine besides the one built on
I have inherited some Application code which was built in Xcode (swift and object c). This is a Native Mac application I am running the Xcode build on 14.4 and the Xcode version is 15.4 The app also uses AppAuth and is built using Cocoapods. I am newbie at Xcode and Swift both but was able to make some necessary code changes and build the already existing app. The runs just fine on the machine I am building on via both run or going into the release directory and clicking on the application. The application is not yet signed. but when I provide the the contents of "Products" folder (basically where the debug or release versions are stored) They get the following error The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10810 "kLSUnknownErr: Unexpected internal error" UserInfo={_LSFunction=_LSLaunchWithRunningboard, _LSLine=3090, NSUnderlyingError=0x600001e2d7d0 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x600001e2d830 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}}}
1
0
295
Aug ’24
Xcode Cloud build failing with 502 HTTP error at code-signing step
Having an issue today where archives on Xcode Cloud are failing at the Code Signing step. The error reported by Xcode Cloud has been one of the 2 following: 502 error from developerservices2.apple.com Unexpected character 'u' (I assume this is in some way related to the HTTP failure above, but please correct me if I'm wrong) Sometimes they even appear together, with the HTTP error as a warning and the unexpected character as the error I assume this is some kind of Xcode Cloud / developer tools outage. I saw another post on the forum from 3 weeks ago that reported the same errors coming from Xcode Cloud. I also saw that there is a "Resolved Outage" with Xcode Cloud from 8/19 (maybe that is related)? Has anyone found a way around this? Any updates on when this will be resolved? It has been happening for us consistently since the first Xcode Cloud archive that we ran today (around 10AM EDT).
5
3
520
Aug ’24
About node graph creation
Greetings, I want to create an app for Mac and iOS that utilises nodes creations and attachments like used here https://docs-assets.developer.apple.com/published/121c7befdfd24432f4393febe305ebf0/HomePageMaterial1~dark.png As a web developer I know about Vue-flow. But I want to create apps for Mac and iOS. An apple's inner solution for these nodes creations and management if exist please share or if not then a better workaround please! Thank you,
3
0
314
Aug ’24
hello, where can I find the supporting file "info.plist" in xcode?
I always get the user location not found error even though I have activated my location import SwiftUI import MapKit import CoreLocation class LocationManager: NSObject, ObservableObject, CLLocationManagerDelegate { private let locationManager = CLLocationManager() @Published var location: CLLocation? = nil @Published var authorizationStatus: CLAuthorizationStatus? = nil override init() { super.init() locationManager.delegate = self locationManager.desiredAccuracy = kCLLocationAccuracyBest locationManager.requestWhenInUseAuthorization() locationManager.startUpdatingLocation() } func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { guard let newLocation = locations.last else { return } location = newLocation print("Updated location: \(newLocation.coordinate.latitude), \(newLocation.coordinate.longitude)") } func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) { authorizationStatus = status if status == .authorizedWhenInUse || status == .authorizedAlways { locationManager.startUpdatingLocation() } } } private func sectionTitle(_ title: String) -> some View { Text(title) .font(.headline) .fontWeight(.bold) .padding(.bottom, 8) } private func openAppleMaps() { let destinationLatitude: CLLocationDegrees = -6.914744 let destinationLongitude: CLLocationDegrees = 107.609810 guard let currentLocation = locationManager.location?.coordinate else { print("Lokasi pengguna tidak ditemukan.") return } let currentLatitude = currentLocation.latitude let currentLongitude = currentLocation.longitude // URL encode parameters let urlString = "http://maps.apple.com/?saddr=\(currentLatitude),\(currentLongitude)&daddr=\(destinationLatitude),\(destinationLongitude)&dirflg=d" guard let appleMapsUrl = URL(string: urlString) else { print("URL tidak valid.") return } // Open Apple Maps UIApplication.shared.open(appleMapsUrl, options: [:]) { success in if !success { print("Gagal membuka Apple Maps.") } } }
1
0
348
Aug ’24
Failed to generate new user info using transfer_sub (Sign in with Apple)
Hello, I’m transferring an app from my individual account to my corporate developer account. I’m the primary owner of both accounts. I’m trying to transfer the users that used Sign In with Apple and this is what I did: I generated the transfer identifier for all the users that used Sign In with Apple from the database (50.000 users → 100% success rate) I’m using the transfer identifier previously generated to create the new Apple ID and private email address of the user. (40% success rate) I successfully generated new Apple ID and private email address for 20.000 users but for the other 30.000 users I cannot generate it because I get { error: 'invalid_request’ } on the migration endpoint (/auth/usermigrationinfo), even though I'm using the same request parameters as the ones that are working. I couldn’t find any difference between users that could be migrated and the users that couldn’t. It doesn’t matter if they are old users or new users. What I found is that I can generate the new Apple ID and private email address if the user signs in with Apple for the first time after the app transfer. Then I can use the “transfer_sub” that I have stored for the user to generate the new user details. The same process worked fine for another app that I transferred. Something seems to be broken only for this app on 60% of the users that used Sign In with Apple. Please let me know if you need further information Best, Cosmin
2
0
468
Aug ’24
Apple Health `export.zip` doesn't include several important data points.
Heya, I'm currently building out my own application for tracking my health information, and I'm hoping to collect my historical data from Apple Health. Sadly, it would appear that certain things I wish to export don't appear in the export.xml file. Some of the things that I would expect to find in the export.xml file, that do not currently appear, are as follows: More data about my medications, currently I can only export a list of my medications, its not possible to export data such as when what medication was taken. Logged emotions; there is currently no support for this (that I can find). Would appreciate some insight into this.
1
0
470
Aug ’24
Enrollment through the Apple Developer app is not available for this Apple ID
I made a purchase that was successfully charged to my account, but the system still says I'm not a member, and no one is replying to me. When I try to access App Store Connect, I see the following message: 'To access App Store Connect, you must be an individual or team member in the Apple Developer Program, or invited by an individual to access their content in App Store Connect.' Initially, when I opened the page, everything looked fine, and I could see my apps. But after clicking the 'Apps' button, the message above appeared, and now it always shows up. I've tried all the support options provided, but they only give me an email contact, and I haven't received any response after emailing them
0
0
309
Aug ’24
iOS 18 beta 5 NSAttributedString Crash
In iOS 18 beta 5 version, setting the conversion to NSAttributedString using [.documentType: NSAttributedString.DocumentType.html] occasionally causes crashes. The same issue was encountered in previous versions. However, after running the code on the main thread, it no longer crashed. But after upgrading to the iOS 18 beta 5 version, it occasionally crashes even when running on the main thread. How can this issue be resolved? thx~
3
3
914
Aug ’24