Posts

Post not yet marked as solved
1 Replies
78 Views
Hi. I'm trying out some of the new MusicKit functionality using Xcode 14 beta 3 and macOS 13 beta 3 and I'm getting the above error (or similar) whenever I use any of the new classes with a Mac Catalyst destination (an iOS 16 destination works fine). I'm guessing one of my build settings is incorrect on either my project or target, but it's not obvious. So far I've set: Project / IOS Deployment Target = 16.0 Target / Minimum Deployments / iOS = 16.0 Could someone please tell me what I'm missing? Thanks in advance!
Posted
by dutton.
Last updated
.
Post marked as solved
24 Replies
6.2k Views
Since today, I'm getting this message (including the typo) every single time I try to upload a new build of my app to both the macOS & iOS app stores. If I upload the iOS version first, I'll get the error when I upload the macOS version. If I upload the macOS version first, I get the error on the iOS version. It's a catalyst app and it's the same build across both platforms. Common build numbers between iOS & macOS have always been allowed, and I released a binary to both iOS & macOS app stores with the same build number last week. Any idea what's going on?
Posted
by dutton.
Last updated
.
Post not yet marked as solved
1 Replies
338 Views
I have a SwiftUI app live on the App Store which uses ASWebAuthenticationSession to authenticate against several remote services. It all runs perfectly on iOS but I'm getting a stream of complaints from users running it on Monterey / Catalyst. There seem to be 2 main errors: The auth browser window doesn't anchor properly, so the window will pop-up but it's completely independent of my app, so can easily end-up behind my application (which then appears to have hung) Even worse, on some machines (mostly m1 iMacs) the window doesn't pop-up at all but the OAuth request to the browser sits in some queue somewhere and at a later point when the user happens to restart their browser they will be prompted to login for every single time they clicked on the "sign in" button in my app. I've seen lots of other reports of the 2nd problem which just seems to happen randomly so I don't have a repro. I've seen a similar number of different ways of implementing ASWebAuthenticationPresentationContextProviding which (I presume) ought to fix the former. Unfortunately none of them work. I'm including some minimal code to reproduce the former issue. This is my own amalgamation of several other approaches. It doesn't work - if you click on the "sign in" button the OAuth window will pop-up but it's completely independent and you can easily move the "anchor" window on top of it. Has anyone managed to get this working? Here's the code: import SwiftUI import AuthenticationServices import UIKit struct SignInView: View {     @StateObject var viewModel = SignInViewModel()     @State var window: UIWindow? = nil     var body: some View {         VStack(spacing: 16) {             Image(systemName: "person.circle")                 .resizable()                 .frame(width: 50, height: 50)                 .foregroundColor(.primary)             VStack(spacing: 8) {                 Text("You must be log in to proceed any further")                     .foregroundColor(.secondary)                     .font(.title3)                     .multilineTextAlignment(.center)                     .padding()                 Button {                     viewModel.signIn(window: self.window)                 } label: {                     Text("Sign In")                         .foregroundColor(.white)                         .padding()                         .clipShape(RoundedRectangle(cornerRadius: 8))                         .background(                                     HostingWindowFinder { window in                                         self.window = window                                    }                         )                 }             }         }     } } class SignInViewModel: NSObject, ObservableObject, ASWebAuthenticationPresentationContextProviding {     var window: UIWindow? = nil     func presentationAnchor(for session: ASWebAuthenticationSession) -> ASPresentationAnchor {         return window ?? ASPresentationAnchor()     }     func signIn(window: UIWindow?) {         self.window = window         let authSession = ASWebAuthenticationSession(url: URL(string: "https://accounts.spotify.com/authorize")!, callbackURLScheme: "myapp-auth") { (url, error) in             if let error = error {                 print(error.localizedDescription)             } else if let url = url {                 print(url.absoluteString)             }         }         authSession.presentationContextProvider = self         authSession.prefersEphemeralWebBrowserSession = true         authSession.start()     } } struct HostingWindowFinder: UIViewRepresentable {     var callback: (UIWindow?) -> ()     func makeUIView(context: Context) -> UIView {         let view = UIView()         DispatchQueue.main.async { [weak view] in             self.callback(view?.window)         }         return view     }     func updateUIView(_ uiView: UIView, context: Context) {     } }
Posted
by dutton.
Last updated
.
Post not yet marked as solved
5 Replies
998 Views
Hi.Am currently struggling to get approval for our first version of an app and have hit a brick wall. Am hoping someone might be able to help point us in the right direction - any help would be greatly appreciated.Background: One of the first things our app does on startup is call SKProductsRequest to get it's IAP (it only has one). When we or any of our TestFlight users run our app everything works fine - the IAP is returned and when the user reaches the appropriate screen we give them a "Purchase" button along with localised pricing information. This has been 100% reliable.The issue: When our app gets run during the Review process it seems as though the SKProductsRequest is not returning any IAPs. If no IAPs are returned we display an error message instead of the "Purchase" button and we've now been rejected twice because the message, rather than the purchase button, is being displayed.Question: Is there anything we need to specifically code for when the app is being reviewed? Why might the response during review be different from when we are testing the app ourselves?Our initial app binary was submitted along side an IAP and the two were linked in App Store Connect when we submitted the binary. We have asked the Review team whether they have turned-over the IAP to their environment but they have referred us to Developer Support.Thanks in advance to to anyone who can give us any pointers!
Posted
by dutton.
Last updated
.
Post not yet marked as solved
6 Replies
640 Views
This is becoming a big issue for us. We have a MusicKit app developed using Catalyst and since we released the Mac version we’ve had a constant trickle of users who seem to be completely unable to use the app because SKCloudServiceController().requestCapabilities reports that they do not have .addToCloudMusicLibrary capability, although this is clearly incorrect and they have all the right permissions (the iOS app version works fine). After a LOT of investigation we’ve discovered that on a Mac where the logged-in user has: iCloud logged-in using Apple ID “user1” App Store & Book Store logged-in using Apple ID “user2” Apple Music/iTunes/Media logged-in under Apple ID “user3” SKCloudServiceController().requestCapabilities will sometimes report the Apple Music capabilities of “user2” or even “user1” rather than “user3”. This is very bad: it should only ever use the “user3” account. In one situation, user2 actually had an Apple Music account with the requisite permissions and our app ended-up creating playlists in user2’s account rather than user3’s account. We’ve reported this as a bug (FB9100381) but heard nothing back. Can someone please acknowledge that this is being looked-at? The issue does appear to be intermittent and some Mac’s work fine. However we find that a brand-new Mac set up with a single user account where that account uses different apple id’s, as above, the issue is quite easy to reproduce. iOS handles this 100% correctly. It’s only a MacOS (Big Sur) issue and we’re getting a constant trickle of unwarranted of 1* reviews because of it. Thanks!
Posted
by dutton.
Last updated
.
Post not yet marked as solved
1 Replies
426 Views
We’ve reported a bug for this and I’m really looking for workarounds in the meantime. The problem: if you use SKCloudServiceController on Catalina, instead of using the account / Apple Id of the current user’s iTunes/Media account as it should, it uses the account / Apple Id of the current user’s iCloud account instead. On most installs these accounts are one & the same so the issue is not apparent. However there is a sizeable minority of Mac users who use different accounts for their itunes login and for these users any Catalyst apps which interact with Apple Music will end up interacting with the WRONG account (e.g. they will create playlists for the wrong user). iOS handles this correctly. So the question is: is there any way to work around this? Either at the MacOS level (apart from telling users not to use a different account) or at the SKCloudServiceController level (e.g. to specify which account to use)?
Posted
by dutton.
Last updated
.
Post not yet marked as solved
0 Replies
434 Views
Our app accesses Apple Music and the user's music library. It is installed & running fine on lots of iOS devices. Thanks to a recent release using Catalyst it's also now installed & running fine on a number of Mac's. However we've just had an error reported by one of our Mac users which I don't understand. Specifically: The app is connecting to the user's Apple Music account no problem It then asks for cloud capabilities instead of getting both musicCatalogPlayback and addToCloudMusicLibrary (as we'd normally expect) it's only getting the former. Our app requires addToCloudMusicLibrary to operate. So in the code snippet below it prints "No add to library capability": SKCloudServiceController().requestCapabilities { (cloudServiceCapability, error) in     if let error = error {         print("Error: \(error.localizedDescription)")         return     }     guard cloudServiceCapability.contains(.musicCatalogPlayback) else {         print("No music catalog playback")         return     }     guard cloudServiceCapability.contains(.addToCloudMusicLibrary) else {         print("No add to library capability")         return     }     print("Good to go") } My initial assumption was that the user had not enabled iCloud Sync, but this has clearly been enabled. What else could cause this? The Mac in question is an M1 MBP. We don't have many M1 installs so I'm somewhat concerned this could be an M1 / Catalyst issue. Thanks in advance.
Posted
by dutton.
Last updated
.
Post not yet marked as solved
2 Replies
588 Views
Hi there.We are experiencing an issue where our App keeps getting rejected because it's returning an "SKErrorDomain error 1" whenever it calls requestUserToken during App Review. The strange thing is that it seems to run perfectly for all of our TestFlight users & developers. Code snippet here: SKCloudServiceController().requestCapabilities(completionHandler: { (cloudServiceCapability, error) in // Lots of error checking here guard cloudServiceCapability.contains(.addToCloudMusicLibrary) else { // Raise an error... return } guard cloudServiceCapability.contains(.musicCatalogPlayback) else { // Raise an error... return } let newDeveloperToken = "a developer token generated by python script" SKCloudServiceController().requestStorefrontCountryCode(completionHandler: { (countryCode, error) in // Lots more error checking here SKCloudServiceController().requestUserToken(forDeveloperToken: newDeveloperToken, completionHandler: { (token, error) in guard error == nil else { // Error: "The operation couldn't be completed. (SKErrorDomain error 1.)" gets thown here during App Review return } // Success // We never get here during App Review! }) }) })Can anyone give us a pointer on where the issue might be? I've asked App Review to check they are logged-in with an Apple Id with a valid Apple Music account, and I've double-checked that our developer token does not expire for a long period. Is there anything else that we should check on regarding our Developer token? Any ideas would be very welcome.Thanks in advance!
Posted
by dutton.
Last updated
.
Post not yet marked as solved
0 Replies
328 Views
Hi there.I'm hoping someone can tell me the "approved" method for showing potential users my app via an App Preview.Some background: My app allows users to capture music playlists from a range of different web pages & apps. It does this via a share extension, so when the user sees a playlist they want to capture they simply "share" it with my app and it does the rest. So far, so good - the app has been live for some time and several releases.Unfortunately the latest version of my app, which includes an App Preview of the share extension in use, has just been rejected with the following message: Guideline 2.3.4 - Performance - Accurate Metadata Your app previews include content that does not sufficiently reflect the app in use. Specifically, your previews: - Show footage other than the app in use.This is entirely accurate: there is a brief view where you can see a playlist in Safari. It's there because that's how my app works - you can bring up a web page with a playlist in Safari and invoke my share extension to import the playlist. That's what the App Preview shows, and I feel it would be misleading to users if they could not see that's how it works.However I'm being rejected for showing this.Could anyone shed light on the right way to show a share extension such that it doesn't breach App Review guidelines?Thanks in advance.
Posted
by dutton.
Last updated
.