Hi all, I am working with MusicKit and have managed to get a user's recommendation playlists (favorites, get up, etc). Isolating just one, I am trying to access the tracks in there using .tracks but it returns nothing. Wondering if I am doing something wrong or if these don't have tracks necessarily associated with them.
Code is below
(not everything just kinda where I am accessing the playlist)
try await requestMusicAuthorization()
let request = MusicPersonalRecommendationsRequest()
let response = try await request.response()
guard let madeForYou = response.recommendations.first(where: { $0.title == "Made for You" }) else {
throw NSError(domain: "RecommendationError", code: 0, userInfo: [NSLocalizedDescriptionKey: "No 'Made for You' recommendation found."])
}
guard let firstPlaylist = madeForYou.playlists.first else {
throw NSError(domain: "PlaylistError", code: 1, userInfo: [NSLocalizedDescriptionKey: "No playlists found in 'Made for You' recommendation."])
}
print("Fetching tracks for playlist: \(firstPlaylist.name ?? "Unknown")")
let playlistRequest = MusicCatalogResourceRequest<Playlist>(matching: \.id, equalTo: firstPlaylist.id)
let playlistResponse = try await playlistRequest.response()
guard let playlist = playlistResponse.items.first else {
throw NSError(domain: "PlaylistError", code: 2, userInfo: [NSLocalizedDescriptionKey: "Couldn't fetch the playlist details."])
}
guard let tracks = playlist.tracks else {
throw NSError(domain: "PlaylistError", code: 3, userInfo: [NSLocalizedDescriptionKey: "No tracks found in the playlist."])
}
General
RSS for tagDelve into the world of built-in app and system services available to developers. Discuss leveraging these services to enhance your app's functionality and user experience.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I’m working on a solution to archive iMessages by using an API or similar mechanism. Here’s the desired workflow:
The user provides their phone number to initiate the archiving process.
They receive a text message with a URL link.
Clicking on the link authorizes the archiving of their iMessages.
Once authorized, their text messages are archived.
So far, I’ve researched third-party services and APIs but haven’t found any that offer this capability directly for iMessages.
Questions:
Are there any APIs or frameworks (Apple or third-party) that support accessing and archiving iMessages programmatically?
app migration has been found to cause a change in the team ID. The Associated Domians section of Xcode includes the team ID. If the transfer is completed, will the team ID that has already installed my Nanjing app automatically change? If not, how can I ensure compatibility between the new and old versions
We have received user reports indicating that, while using our app for meetings, they occasionally encounter system unresponsiveness, ultimately leading to an unexpected black screen and system restart.
Our app's internal logs show normal operation during these incidents.
To assist in diagnosing the issue, we have collected system logs (WindowServer.ips) from affected users.
We would appreciate your assistance in analyzing these logs to help identify the root cause of the problem.
Thank you for your support and assistance.
Topic:
App & System Services
SubTopic:
General
Hi, after upgrading to the latest versions of the OS, deep links to settings in my application stopped working.
For example:
UIApplication.shared.open(URL(string: "App-prefs:General"))
it opens settings but doesn't go to a category like on iOS 17. 😭
I'm trying to add an icon to support dark and tinted icons in Xcode 16. The apple's guide document says, "You provide a transparent dark icon." However, at the bottom of the guide, iOS transparency is no. I wonder if it's okay to make the background of the dark icon.
Topic:
App & System Services
SubTopic:
General
Sometimes when I schedule a DeviceActivityEvent with the includesPastActivity property set to false, the event is never triggered. I tried with thresholds of 20 seconds and 1 minute and both did not work.
I submitted feedback with more details FB15220094.
Is anyone else experiencing this issue ? or does anyone know about a fix ?
This is easy to reproduce,in dark mode, 2 UIViewControllers A and B, A present B. code:
class AAA: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
navigationItem.title = "AAA"
view.backgroundColor = .systemBackground
}
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
present(UINavigationController(rootViewController: BBB()), animated: true)
}
}
class BBB: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
navigationItem.title = "BBB"
view.backgroundColor = .systemBackground
}
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
dismiss(animated: true)
}
}
before present:
after present:
Obviously, the backgroundColor of the view has changed.
I guess it's because view's backgroundColor is the same as the the window, so changed the color to distinguish between the controller and the background, but this brought unexpected changes which is confusing. I want to know how this happened and how I can manually control it
Does any ont encountered such crash? It only occured on iOS18 device.
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '_endUndoGroupRemovingIfEmpty:: _UITextUndoManager 0x30d3bca50 is in invalid state, endUndoGrouping called with no matching begin
UserInfo:(null)'
Pthread id: 2420148
Thread 0 Crashed:
0 CoreFoundation __exceptionPreprocess + 164
1 libobjc.A.dylib objc_exception_throw + 88
2 Foundation -[NSUndoManager endUndoGrouping] + 0
3 Foundation __NSFirePerformWithOrder + 296
4 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36
5 CoreFoundation __CFRunLoopDoObservers + 552
6 CoreFoundation __CFRunLoopRun + 788
7 CoreFoundation CFRunLoopRunSpecific + 588
8 GraphicsServices GSEventRunModal + 164
9 UIKitCore -[UIApplication _run] + 816
10 UIKitCore UIApplicationMain + 340
11 application main (main.m:39)
12 (null) 0x00000001abfecde8 0x0 + 7180570088
I have my phone set to small icons on home screen, but it sill doesn't show the name of the app like when it is on large icons, please fix or just add names to large icons too so i stop running into this glitch.
Topic:
App & System Services
SubTopic:
General
I haven't gotten any hits searching for this, so I decided to open a new thread.
The Tech Note that was mentioned in an earlier 2024 thread doesn't mention this error.
I've been trying different ways to get a token, and finally found this article that seems to be in the correct format.
https://dev.to/hasone/generate-jwt-token-for-apple-store-connect-api-using-python-3j5h
The Apple App Store Server Swift Library was supposed to have a createJWT() method, but it's gone now.
curl -v -H 'Authorization: Bearer [token]' "https://weatherkit.apple.com/api/v1/availability/37.323/122.032?country=US"
Host weatherkit.apple.com:443 was resolved.
IPv6: (none)
IPv4: 23.66.3.87, 23.66.3.70, 23.66.3.74, 23.66.3.72, 23.66.3.81, 23.66.3.75, 23.66.3.91, 23.66.3.71, 23.66.3.73
Trying 23.66.3.87:443...
Connected to weatherkit.apple.com (23.66.3.87) port 443
ALPN: curl offers h2,http/1.1
(304) (OUT), TLS handshake, Client hello (1):
CAfile: /etc/ssl/cert.pem
CApath: none
(304) (IN), TLS handshake, Server hello (2):
(304) (IN), TLS handshake, Unknown (8):
(304) (IN), TLS handshake, Certificate (11):
(304) (IN), TLS handshake, CERT verify (15):
(304) (IN), TLS handshake, Finished (20):
(304) (OUT), TLS handshake, Finished (20):
SSL connection using TLSv1.3 / AEAD-AES256-GCM-SHA384 / [blank] / UNDEF
ALPN: server accepted http/1.1
Server certificate:
subject: C=US; ST=California; O=Apple Inc.; CN=weather-data.apple.com
start date: Oct 9 21:14:44 2024 GMT
expire date: Jan 7 20:21:03 2025 GMT
subjectAltName: host "weatherkit.apple.com" matched cert's "weatherkit.apple.com"
issuer: C=US; O=Apple Inc.; CN=Apple Public Server ECC CA 1 - G1
SSL certificate verify ok.
using HTTP/1.x
GET /api/v1/availability/37.323/122.032?country=US HTTP/1.1
Host: weatherkit.apple.com
User-Agent: curl/8.7.1
Accept: /
Authorization: Bearer [token]
Request completely sent off
< HTTP/1.1 401 Unauthorized
< Server: Apple
< Content-Type: application/json
< Content-Length: 26
< X-Frame-Options: SAMEORIGIN
< Strict-Transport-Security: max-age=31536000; includeSubdomains
< X-XSS-Protection: 1; mode=block
< Access-Control-Allow-Origin: *
< X-Content-Type-Options: nosniff
< Content-Security-Policy: default-src 'self';
< X-REQUEST-ID: 320cab08-acba-0127-fe19-4893dacf059c
< X-Apple-Origin: 3c6511d9-6be2-32cb-8412-efd1b1efa576
< Content-Disposition: inline;filename=f.txt
< Date: Tue, 15 Oct 2024 10:40:01 GMT
< X-Cache: TCP_MISS from a23-220-165-87.deploy.akamaitechnologies.com (AkamaiGHost/11.6.5-30d892fcde524eb1bee7eeb45111707d) (-)
< Connection: keep-alive
<
Connection #0 to host weatherkit.apple.com left intact
{"reason": "MISSING_AUTH"}
I am developing a macOS word-processing app that should be distributed via the Apple App Store. Some of the app's functions like generating HTML and PDF exports should be automatable via Shortcuts and via shell scripts.
To support the latter, I plan to include a command line tool inside the app that can be called from the Terminal or a shell script. The tool should be able to instruct the main app to then perform the desired commands.
A well-known AppStore app that uses this design is BBEdit which also contains multiple command line tools that offer functionality from the main app to users of the Terminal.
My technical questions now are:
Should the command line tool executable be sandboxed and if yes, how?
Even after many trials, I have not found a way to make a working sandboxed command line tool. If a sandboxed tool is started from the Terminal, it is immediately terminated with an exception in _libsecinit_appsandbox.cold.12. I am aware of the Apple developer documentation article Embedding A Helper Tool In A Sandboxed App, but it addresses a different architecture in which the helper tool is started from the main app and therefore is able to inherit its sandbox.
BBEdit is only sandboxing the main app, but not its embedded command line tools and is still allowed in the App Store. Is this the way to go for me as well or does BBEdit get some special treatment in the App Store?
How can the command line tool pass the permission to access files to the main app?
As my main app is sandboxed, it needs explicit permission from the user to be able to access files. Users of a command line tool give this permission by providing file paths as arguments. How can I pass these permissions along to the main app? BBEdit is able to do this even when the user has not given it full-disk access. I know that it is using Apple Events for the communication between the command line tool and the main app, but I am not sure how this allows to pass permissions. Can anyone shed light on how to implement a solution here?
Thanks!
I'd like to be able to invoke an App Clip from an Apple Pass notification. I've been using an Apple Pass store card successfully. Ideally, I'd like to be able to tap the notification to open the App Clip.
I haven't seen support for this in the documentation, but I wanted to see if anyone had any creative use cases for something like this?
Hello,
We're facing an issue with app links failing and falling back to browser website journeys. Our apple-app-site-association file is hosted publicly and the app to app journeys have been working correctly up to very recently - we are trying to identify any potential network infra changes that could have impacted the Apple CDN being able to retrieve the apple-app-site-association file.
We can see in the iPhone OS logs that the links cannot be verified by the swcd process, and using the app-site-association.cdn-apple.com/a/v1 api via curl can also see the CDN has no record of the AASA file.
Due to the traffic being SSL and to a high volume enterprise site it is difficult for use to trace activity through anything other that the source IPs - we cannot filter on user-agent for "AASA-Bot/1.0.0" as breaking the SSL would be impactful due to the load. Is it possible to get a network range used by the Apple CDN to retrieve the AASA file as this would help us identify potential blocking behaviour?
Thank you.
Hello Apple Developer Team,
I hope you’re doing well.
I’m writing to report an issue with the Schoolwork app and ClassKit integration.
We’ve implemented the ClassKit framework according to the documentation, and while it works fine when the app is terminated, we encounter a problem when the app is in the background.
When accessing a student’s profile in the Schoolwork app and clicking the START and CONTINUE buttons, the Sample ClassKit app opens via the deep link. However, the app freezes after about 3 seconds and remains unresponsive until we receive the Student Progress Alert, which takes approximately 15 seconds.
We’re only experiencing this issue and would greatly appreciate your technical support to resolve it.
Thank you for your assistance, and I look forward to your response.
Steps to Reproduce the Issue:
Open the Sample ClassKit app.
Open the Settings app.
Navigate to Developer and select ClassKit API.
Choose Teacher.
Open the Schoolwork app.
Click on Create New Assignment.
A popover view titled New Assignment will appear.
Click the Add Activities button (blue background) and search for the app named Sample ClassKit.
Ensure the necessary symbol for Student Progress is checked.
If not available, terminate all apps and reopen the Sample ClassKit project, then repeat step 1.
Click on the app.
Find and select the exercise titled Explore In 3D.
Click the + icon and then the Done button in the top right corner.
Enter the title and assign it as needed.
Return to the Settings app:
Navigate to Developer and select ClassKit API.
Choose Student.
Open the Schoolwork app:
Click on the student assignment.
Click either the Start or Continue button.
The Sample ClassKit project will open.
Click on Gallery 3 to 4 times. You will notice that the Student Progress Alert does not appear, and the app freezes if the Sample ClassKit project is coming from background to active mode.
Note: The issue does not occur if the Sample ClassKit app is terminated before clicking Start or Continue; in that case, the alert appears immediately.
Hello!
It's my first time posting in this forum. Apple Intelligence is enabled by default in Workspace ONE (WS1). I was wondering if Apple Intelligence can access or process corporate data within (WS1) corporate apps, which are containerized?
Thank you!
Topic:
App & System Services
SubTopic:
General
My requirement is to open a specific screen of my app with when user says " Start Sleep meditation for 10 minutes" where Sleep and 10 minutes are dynamic values in the phrase. Is it possible just with a phrase we can get the values. Or do i need to ask using siri "which meditation" and then "how much tine". I am planning to use AppIntent and AppShortcut, along with Entities. But unable to open the shortcut when siri invokes with phrase i discussed above.
Topic:
App & System Services
SubTopic:
General
Tags:
Siri Event Suggestions Markup
Siri and Voice
SiriKit
App Intents
When connecting SSLVPN through the "Paloalto GlobalProtect" app on an iOS iPhone, I try to connect through my Google Workspace account.
During this process, an error occurs when logging in after entering my Google account.
The error is as follows. The Paloalto Networks TAC Support team recommends that you contact Apple Support.
When connecting SSLVPN through the "Paloalto GlobalProtect" app on an Android device, I can log in normally with my Google account.
It only doesn't work on iOS iPhones.
~/Downloads/GPSupportInfo/Agent.log:119: 2024-12-16 14:08:08.047 GlobalProtect[4402:1352815] Error: (ManagerUtils.mm:566) Send message failed: GlobalProtect, error: Error Domain=NEVPNErrorDomain Code=1 "(null)"
~/Downloads/GPSupportInfo/Agent.log:119: 2024-12-16 14:08:08.047 GlobalProtect[4402:1352815] Error: (ManagerUtils.mm:566) Send message failed: GlobalProtect, error: Error Domain=NEVPNErrorDomain Code=1 "(null)"
~/Downloads/GPSupportInfo/Agent.log:119: 2024-12-16 14:08:08.047 GlobalProtect[4402:1352815] Error: (ManagerUtils.mm:566) Send message failed: GlobalProtect, error: Error Domain=NEVPNErrorDomain Code=1 "(null)"
~/Downloads/GPSupportInfo/Agent.log:119: 2024-12-16 14:08:08.047 GlobalProtect[4402:1352815] Error: (ManagerUtils.mm:566) Send message failed: GlobalProtect, error: Error Domain=NEVPNErrorDomain Code=1 "(null)"
Paloalto said that it is the same as the content of the Apple Developer Forum below and told me to contact Apple Support.
https://developer.apple.com/forums/thread/25928
Please tell me how to solve this problem.
Topic:
App & System Services
SubTopic:
General
If an app with a Message Filter Extension is run on an iPhone with iOS 18 installed then there's no logging output to the console (using print or NSLog), however there is logging in all previous versions of OS.
Being able to view logging at run time for this component is essential as a debugging aid to see, for example, if the extension launches, if a text is handled locally or deferred to the network, to see if there's a network error, to examine the server response etc.
Is there a specific reason it was disabled or is it accidental?
Thank you
I recently used Open core legacy patcher to update my old 2012 Macbook pro to run a new pice of dj software. the update went smooth but now the Dj software wont open just gives me a crash report. Im totally stumped.
the crash report.
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Termination Reason: Namespace SIGNAL, Code 4 Illegal instruction: 4
Terminating Process: exc handler [3839]
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 Engine DJ 0x10c9e3d81 0x10c28f000 + 7687553
1 dyld 0x7ff807632729 invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 241
2 dyld 0x7ff80766b34e invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 133
3 dyld 0x7ff80765fb73 invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 543
4 dyld 0x7ff80761a07b dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 249
5 dyld 0x7ff80765ebe8 dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 176
6 dyld 0x7ff807661266 dyld3::MachOFile::forEachInitializerPointerSection(Diagnostics&, void (unsigned int, unsigned int, bool&) block_pointer) const + 116
7 dyld 0x7ff80766b084 dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 390
8 dyld 0x7ff8076325c2 dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 150
9 dyld 0x7ff807638af7 dyld4::JustInTimeLoader::runInitializers(dyld4::RuntimeState&) const + 21
10 dyld 0x7ff807632928 dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const + 276
11 dyld 0x7ff807636141 dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const::$_0::operator()() const + 147
12 dyld 0x7ff8076329bc dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 90
13 dyld 0x7ff80764e1f7 dyld4::APIs::runAllInitializersForMain() + 277
14 dyld 0x7ff80761f52e dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3433
15 dyld 0x7ff80761e792 dyld4::start(dyld4::KernelArgs*, void*, void*)::$_0::operator()() const + 572
16 dyld 0x7ff80761e27f start + 1727
Thread 1:
0 libsystem_pthread.dylib 0x7ff8079a8bcc start_wqthread + 0
Thread 2:
0 libsystem_pthread.dylib 0x7ff8079a8bcc start_wqthread + 0
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x00006000012acc80 rbx: 0x00006000032b3c90 rcx: 0x00006000012acd00 rdx: 0x000000011008e000
rdi: 0x0000000000000000 rsi: 0x00006000012ac000 rbp: 0x00007ff7b3c5a9f0 rsp: 0x00007ff7b3c5a9c0
r8: 0x0000000000000002 r9: 0x000000000000001b r10: 0x00000000001ff800 r11: 0x0000000000000080
r12: 0x000000010eeae278 r13: 0x000000010c28f6e8 r14: 0x00007ff84a461050 r15: 0x00007ff84a4614a0
rip: 0x000000010c9e3d81 rfl: 0x0000000000010207 cr2: 0x0000000000000000
Logical CPU: 2
Error Code: 0x00000000
Trap Number: 6
Topic:
App & System Services
SubTopic:
General