I would like to enable users of my iOS app to place an object they want to scan, for example, on a turntable, instead of walking around it, in order to generate a 3D model of it afterward. How can I achieve this with the Object Capture API?
General
RSS for tagExplore the integration of media technologies within your app. Discuss working with audio, video, camera, and other media functionalities.
Post
Replies
Boosts
Views
Activity
Hello there,
I am faced with the following situation:
We are building a web app that manages playlists for different platforms, including Apple music
We have the concept of teams in there, where a user can be part of multiple teams, and teams are managed by team admin
A team admin could manage multiple teams
The problem here is, that a team admin wouldn't be able to sign in to the Apple music account for multiple teams because if using the same computer we try to let the user sign in once and store the Music User Token, we can't do another login unless we unauthorized the previous one.
Is there anything we can do about this? Thanks
Hi there,
I ve Been wondering about getting a 'music user token' for manipulating users playlists.
The situation I found myself in is that that can only be done in the front-end, but by exposing the 'developer token' I need to generate, and the 'developer token' is the key to our app, if someone takes that, they can do anything with it, am I wrong?
Thanks for your time!
Hello everyone,
I am thrilled about the iPhone Mirroring demo on WWDC24 and I have a few thoughts to share.
Will it work through a local network, or can the iPhone be accessed within a global network? Will there be an API to initiate iPhone mirroring via an app? This would be a great feature for MDMs, allowing administrators to provide support for their users. Could you share more details from the development perspective?
Hi, i have try with RPBroadcastSampleHandler Broadcast Extension and RPSystemBroadcastPickerView but i don't understand how can i mirror my iOS screen to Android smart TV?
I'm using a UIImageView to display album artwork when playing music. Every time new artwork is loaded, the memory usage increases. I'm using ARC and tried a autoreleasepool around the code. If I put the app in the background, the cache clears and it starts using up memory again.
Here's my code:
- (void) showArtwork {
@autoreleasepool {
MPMediaItem *currentItem = [self.musicPlayer nowPlayingItem];
if (currentItem) {
MPMediaItemArtwork *artwork = [currentItem valueForProperty: MPMediaItemPropertyArtwork];
if (artwork) {
UIImage *artworkImage = [artwork imageWithSize: CGSizeMake (339, 339)];
if (artworkImage) {
[self.appCoverArt setImage: artworkImage];
}
}
}
}
}
musicPlayer is the systemMusicPlayer
appCoverArt is my UIIMageView
1. Is there a way to release an image from UIImageView before assigning a new image?
2. Is there a way to clear the pool other than putting the app in the background (which does clear the memory)?
Is it possible to notify my fileprovider extension to pre-load folders recursively from a given starting point ?
I am currently doing this externally from user space with a thread that crawls through the folder tree but wondering if there is a better way.
I am trying to take a screenshot of each running window on the screen independently (even if not in the foreground). I am using SCScreenshotManager's captureImageWithFilter and SCContentFilter's initWithDesktopIndependentWindow. When I do this for every SCWindow in SCShareableContent's windows, I do get all the actual windows, but also get many mostly blank windows or windows that no ordinary user would consider to be an actual window. These include dozens of windows with no title, some with "Focus Proxy" title, some for menu bar icons, the wallpaper, the desktop icons, etc.
I've implemented a naive solution that filters all windows that have no title, owningApplications with no title or bundle ID in a hardcoded blocklist (e.g. "com.apple.controlcenter", "com.apple.wallpaper.agent") and that helps, but is far from robust and is naturally fragile.
Is there a recommended way to distinguish actual application windows or an overall better approach here? Thanks!
I'm trying to set a specific start time for the song, using ApplicationMusicPlayer.shared.playbackTime but is not working
musicPlayer.playbackTime = 10
try await musicPlayer.prepareToPlay()
try await musicPlayer.play()
When I connect my MacBook to my living room AirPort (older gen wallwart) via Music app, the music output in both rooms is synced.
When I try to setup a Multi-Output Device in AudioMidi setup, I'm not able to get them synced. I'm outputting to the same devices, they're all on the same sample rate, and I've played with the various settings (Primary Clock Source and Drift Sync). What gives? How are these connections different?
Intel MacBook Pro 2018 running Sonoma 14.5
I am capturing a screenshot with SCScreenshotManager's captureImageWithFilter. The resulting PNG has the same resolution as the PNG taken from Command-Shift-3 (4112x2658) but is 10x larger (14.4MB vs 1.35MB).
My SCStreamConfiguration uses the SCDisplay's width and height and sets the color space to kCGColorSpaceSRGB.
I currently save to file by initializing a NSBitmapImageRep using initWithCGImage, then representing as PNG with representationUsingType NSBitmapImageFileTypePNG, then writeToFile:atomically.
Is there some configuration or compression I can use to bring down the PNG size to be more closely in-line with a Command-Shift-3 screenshot.
Thanks!
So i meant to make a shared album but made a shared library. That being said, I deleted the shared album but my family can not remove it from the phones
Since iOS 12 it has become difficult to detect the end of playback using the system music player.
In earlier iOS versions, the now playing item would be set nil and you would receive a notification that the player stopped.
In iOS 12 and later, nowPlayingItem still contains the current song and the only notification you get is MPMusicPlayerControllerPlaybackStateDidChangeNotification with the playbackState set to MPMusicPlaybackStatePaused.
Pressing pause in my car (or any remote access) generates the same conditions making it difficult to correctly detect the difference.
It would be nice if they added a notification that playback was done (similar to the other players).
Any suggestions?
I'm using the systemMusicPlayer to play music and want to update the playback time using addObserver forKeyPath.
[self setMusicPlayer: [MPMusicPlayerController systemMusicPlayer]];
I've tried these two methods:
[self addObserver:self forKeyPath:@"musicPlayer.currentPlaybackTime" options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionInitial context:&musicPlayer];
[self.musicPlayer addObserver:self forKeyPath:@"currentPlaybackTime" options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionInitial context:&musicPlayer];
I do get the initial values for currentPlaybackTime in:
-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
but I never get any calls when the player is playing the song (the whole point).
If I set the currentPlaybackTime to a specific value (locating manually using a slider), I get calls with the values I set (useless since I know what I am setting them to).
How are we supposed to track the playback time without just polling it constantly?
How we can implement music kit in flutter app?
I'm trying to generate a developer token with the following code in nodeJS:
const jwt = require('jsonwebtoken')
const {TEAM_ID, KID, APPLE_PRIVATE_KEY } = require('./secret')
const expiration = 36000;
const currentTime = Math.floor(Date.now() /1000);
const expirationTime = currentTime + expiration;
const options = {
algorithm: 'ES256',
header :{
alg : "ES256",
kid : KID
}
}
const payload = {
iss : TEAM_ID,
iat : currentTime,
exp : expirationTime
}
const newToken = jwt.sign(payload, APPLE_PRIVATE_KEY, options)
console.log('1111111111111111111111' , newToken)
When testing my newToken in curl -- I'm getting a 401 response.
Please help.
Hey,
I've been trying to fetch my Apple Music recently played songs for an app I'm working on, and I want to access the lastPlayedDate field. If I'm not mistaken, this field should exist for a Song according to Apple's documentation:
https://developer.apple.com/documentation/musickit/song/lastplayeddate
However, whenever I try to fetch this data, the lastPlayedDate field is always nil. All the other data I'm looking for, however, seems to fetch without issue. Here's the code I'm using:
//Request as described in Apple MusicKit
//https://developer.apple.com/documentation/musickit/musicrecentlyplayedrequestable
var request = MusicRecentlyPlayedRequest<Song>()
request.limit=30
do {
let response = try await request.response()
let songs = response.items.compactMap { song -> RecentlyPlayedSong? in
let songName = song.title
let songArtist = song.artistName
let songAlbum = song.albumTitle
let artwork: MusicArtworkType
let preview_url = song.previewAssets?.first?.url?.absoluteString
if let appleMusicArtwork = song.artwork {
print("Found a song, \(song) with lastPlayedDate \(song.lastPlayedDate)")
artwork = .AppleMusic(appleMusicArtwork)
return RecentlyPlayedSong(name: songName, artist: songArtist, album: songAlbum, artwork: artwork, preview_url: preview_url, lastPlayedDate: song.lastPlayedDate ?? Date())
}
I'm trying to map the response into a custom struct I made, but here's a sample of what's getting printed to the logs:
Found a song, Song(id: "1676362342", title: "pwdr Blu (feat. Brother.)", artistName: "Kx5, deadmau5 & Kaskade") with lastPlayedDate nil
Found a song, Song(id: "881289980", title: "Worlds Apart (feat. Kerli)", artistName: "Seven Lions") with lastPlayedDate nil
Found a song, Song(id: "1501540431", title: "What’s Done Is Done", artistName: "Seven Lions & HALIENE") with lastPlayedDate nil
Even though I just listened to these songs a a few minutes ago. Anyone ever run into this issue before? Any settings I need to look at changing to get this to show?
Hi,
just generated a HDR10 MVHEVC file, mediainfo is below:
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Codec configuration box : hvcC+lhvC
then generate the segment files with below command:
mediafilesegmenter --iso-fragmented -t 4 -f av_1 av_new_1.mov
then upload the segment files and prog_index.m3u8 to web server.
just find that can not play the HLS stream on Safari...
the url is http://ip/vod/prog_index.m3u8
just checked that if i remove the tag Transfer characteristics : PQ when generating the MVHEVC file.
above same mediafilesegmenter command and upload the files to web server.
the new version of HLS stream is can play on Safari...
Is there any way to play HLS PQ video on Safari. thanks.
Hi,
just find that I can not play 3D movie stream: MV-HEVC/UHD/Dolby Vision/Dolby Digital/Dolby Atmos(website is https://developer.apple.com/streaming/examples)
when I click View 3D example(fMP4), have below issue: my MacOS is 14.4.1 and M2 chip.
When i am fetching Images and passing it to
await faceapi.fetchImage(label);
then i am facing RefrenceError:Can't Find Variable: FileReader
Please Help For this.