Post

Replies

Boosts

Views

Activity

mp3 audio plays on my device and simulator but some users have issue
Hi I just released an app which is live. i have a strange issue: while the audio files in the app play fine on my device, but some users are unable to hear. One friend said it played yesterday but not today. Any idea why? The files are mp3, I see them in Build Phase, and in the project obviously. Here's the audio view code, thank you! import AVFoundation struct MeditationView: View { @State private var player: AVAudioPlayer? @State private var isPlaying = false @State private var selectedMeditation: String? var isiPad = UIDevice.current.userInterfaceIdiom == .pad let columns = [GridItem(.flexible()),GridItem(.flexible())] let tracks = ["Intro":"intro.mp3", "Peace" : "mysoundbath1.mp3", "Serenity" : "mysoundbath2.mp3", "Relax" : "mysoundbath3.mp3"] var body: some View { VStack{ VStack{ VStack{ Image("dhvani").resizable().aspectRatio(contentMode: .fit) .frame(width: 120) Text("Enter the world of Dhvani soundbath sessions, click lotus icon to play.") .font(.custom("Times New Roman", size: 20)) .lineLimit(nil) .multilineTextAlignment(.leading) .fixedSize(horizontal: false, vertical: true) .italic() .foregroundStyle(Color.ashramGreen) .padding() } LazyVGrid(columns:columns, spacing:10){ ForEach(tracks.keys.sorted(),id:\.self){ track in Button { self.playMeditation(named: tracks[track]!) } label: { Image("lotus") .resizable() .frame(width: 40,height: 40) .background(Color.ashramGreen) .cornerRadius(10) } Text(track) .font(.custom("Times New Roman", size: 22)) .foregroundStyle(Color.ashramGreen) .italic() } } HStack(spacing:20) { Button(action: { self.togglePlayPause() }) { Image(systemName: isPlaying ? "playpause.fill" : "play.fill") .resizable() .frame(width: 20, height: 20) .foregroundColor(Color.ashramGreen) } Button(action: { self.stopMeditation() }) { Image(systemName: "stop.fill") .resizable() .frame(width: 20, height: 20) .foregroundColor(Color.ashramGreen) } } }.padding() .background(Color.ashramBeige) .cornerRadius(20) Spacer() //video play VStack{ Text("Chant") .font(.custom("Times New Roman", size: 24)) .foregroundStyle(Color.ashramGreen) .padding(5) WebView(urlString: "https://www.youtube.com/embed/ny3TqP9BxzE") .frame(height: isiPad ? 400 : 200) .cornerRadius(10) .padding() Text("Courtesy Sri Ramanasramam").font(.footnote).italic() } }.background(Color.ashramBeige) } //View func playMeditation(named name: String) { if let url = Bundle.main.url(forResource: name, withExtension: nil) { do { player = try AVAudioPlayer(contentsOf: url) player?.play() isPlaying = true } catch { print("Error playing meditation") } } } func togglePlayPause() { if let player = player { if player.isPlaying { player.pause() isPlaying = false } else { player.play() isPlaying = true } } } func stopMeditation() { player?.stop() isPlaying = false } } #Preview { MeditationView() }
1
0
410
Nov ’24
Build not showing up after archive successfully uploaded app
Hi, I uploaded an updated version of my app to App Store Connect yesterday, usually my build would show up under half an hour but this time it hasn't after over 16 hours. It's a simple app. I cleared an earlier version, then there was an email saying Although delivery was successful, you may want to correct the following issues in your next delivery. Once you've corrected the issues, upload a new binary to App Store Connect. ITMS-90899: Macs with Apple silicon support issue - The app isn‘t compatible with the provided minimum macOS version of 13.5. It can run on macOS 14.0 or later. I unchecked the box that says use for Mac option. I have written to Apple support, yet to hear from them, Meanwhile should I re upload the app with a newer build number and version? Thanks a lot. (I saw quite a few threads on this topic with no one close to any solution so asking again just in case)
2
0
882
Oct ’24
4.1 Design Copycats - App Store error solved
I got this error on version 1.0 and 1.1 of my latest app I submitted. They helpfully attached the cause of the error which happened to be two images, which even though it was copyright free, were somehow causing this error. They were in my launch screen and in app icon. So I uploaded my 1.1 version removing the images from my Xcode asset folder, app icon, and launch screen, and also in the iPhone screenshots on the submit page. Again I got the same error, and while waiting for the build to be distributed, I realised I hadn’t removed the trouble-causing image from my iPad screenshots. Once I removed it from there, it was a breeze. So look at the attachments they send, if it's images that's causing the error, remove them from all places where you have uploaded. Hope it helps.
1
0
973
Nov ’23
CALayer message while playing video (Xcode 12.5.1, Swift 5)
Hi guys, hope you're all safe. I'm adding a couple of features to my launched app. I'm using a stack view to hold various buttons to go to other view controllers, and one button plays a video. Whenever I press this, I get the following messages but the app works fine and the video plays properly:  `CATransformLayer changing property masksToBounds in transform-only layer, will have no effect and changing property allowsGroupBlending in transform-only layer, will have no effect` Any idea? Video plays ok in simulator and on device.  I'm using the view controller as player like below, Thanks! `guard let url = Bundle.main.path(forResource: "previewMovie", ofType: "m4v") else{return} let player = AVPlayer(url: URL(fileURLWithPath: url)) let vc = AVPlayerViewController() vc.player = player present(vc, animated: true, completion: nil)` Thanks!
3
0
1.2k
May ’23
mp3 audio plays on my device and simulator but some users have issue
Hi I just released an app which is live. i have a strange issue: while the audio files in the app play fine on my device, but some users are unable to hear. One friend said it played yesterday but not today. Any idea why? The files are mp3, I see them in Build Phase, and in the project obviously. Here's the audio view code, thank you! import AVFoundation struct MeditationView: View { @State private var player: AVAudioPlayer? @State private var isPlaying = false @State private var selectedMeditation: String? var isiPad = UIDevice.current.userInterfaceIdiom == .pad let columns = [GridItem(.flexible()),GridItem(.flexible())] let tracks = ["Intro":"intro.mp3", "Peace" : "mysoundbath1.mp3", "Serenity" : "mysoundbath2.mp3", "Relax" : "mysoundbath3.mp3"] var body: some View { VStack{ VStack{ VStack{ Image("dhvani").resizable().aspectRatio(contentMode: .fit) .frame(width: 120) Text("Enter the world of Dhvani soundbath sessions, click lotus icon to play.") .font(.custom("Times New Roman", size: 20)) .lineLimit(nil) .multilineTextAlignment(.leading) .fixedSize(horizontal: false, vertical: true) .italic() .foregroundStyle(Color.ashramGreen) .padding() } LazyVGrid(columns:columns, spacing:10){ ForEach(tracks.keys.sorted(),id:\.self){ track in Button { self.playMeditation(named: tracks[track]!) } label: { Image("lotus") .resizable() .frame(width: 40,height: 40) .background(Color.ashramGreen) .cornerRadius(10) } Text(track) .font(.custom("Times New Roman", size: 22)) .foregroundStyle(Color.ashramGreen) .italic() } } HStack(spacing:20) { Button(action: { self.togglePlayPause() }) { Image(systemName: isPlaying ? "playpause.fill" : "play.fill") .resizable() .frame(width: 20, height: 20) .foregroundColor(Color.ashramGreen) } Button(action: { self.stopMeditation() }) { Image(systemName: "stop.fill") .resizable() .frame(width: 20, height: 20) .foregroundColor(Color.ashramGreen) } } }.padding() .background(Color.ashramBeige) .cornerRadius(20) Spacer() //video play VStack{ Text("Chant") .font(.custom("Times New Roman", size: 24)) .foregroundStyle(Color.ashramGreen) .padding(5) WebView(urlString: "https://www.youtube.com/embed/ny3TqP9BxzE") .frame(height: isiPad ? 400 : 200) .cornerRadius(10) .padding() Text("Courtesy Sri Ramanasramam").font(.footnote).italic() } }.background(Color.ashramBeige) } //View func playMeditation(named name: String) { if let url = Bundle.main.url(forResource: name, withExtension: nil) { do { player = try AVAudioPlayer(contentsOf: url) player?.play() isPlaying = true } catch { print("Error playing meditation") } } } func togglePlayPause() { if let player = player { if player.isPlaying { player.pause() isPlaying = false } else { player.play() isPlaying = true } } } func stopMeditation() { player?.stop() isPlaying = false } } #Preview { MeditationView() }
Replies
1
Boosts
0
Views
410
Activity
Nov ’24
Build not showing up after archive successfully uploaded app
Hi, I uploaded an updated version of my app to App Store Connect yesterday, usually my build would show up under half an hour but this time it hasn't after over 16 hours. It's a simple app. I cleared an earlier version, then there was an email saying Although delivery was successful, you may want to correct the following issues in your next delivery. Once you've corrected the issues, upload a new binary to App Store Connect. ITMS-90899: Macs with Apple silicon support issue - The app isn‘t compatible with the provided minimum macOS version of 13.5. It can run on macOS 14.0 or later. I unchecked the box that says use for Mac option. I have written to Apple support, yet to hear from them, Meanwhile should I re upload the app with a newer build number and version? Thanks a lot. (I saw quite a few threads on this topic with no one close to any solution so asking again just in case)
Replies
2
Boosts
0
Views
882
Activity
Oct ’24
4.1 Design Copycats - App Store error solved
I got this error on version 1.0 and 1.1 of my latest app I submitted. They helpfully attached the cause of the error which happened to be two images, which even though it was copyright free, were somehow causing this error. They were in my launch screen and in app icon. So I uploaded my 1.1 version removing the images from my Xcode asset folder, app icon, and launch screen, and also in the iPhone screenshots on the submit page. Again I got the same error, and while waiting for the build to be distributed, I realised I hadn’t removed the trouble-causing image from my iPad screenshots. Once I removed it from there, it was a breeze. So look at the attachments they send, if it's images that's causing the error, remove them from all places where you have uploaded. Hope it helps.
Replies
1
Boosts
0
Views
973
Activity
Nov ’23
CALayer message while playing video (Xcode 12.5.1, Swift 5)
Hi guys, hope you're all safe. I'm adding a couple of features to my launched app. I'm using a stack view to hold various buttons to go to other view controllers, and one button plays a video. Whenever I press this, I get the following messages but the app works fine and the video plays properly:  `CATransformLayer changing property masksToBounds in transform-only layer, will have no effect and changing property allowsGroupBlending in transform-only layer, will have no effect` Any idea? Video plays ok in simulator and on device.  I'm using the view controller as player like below, Thanks! `guard let url = Bundle.main.path(forResource: "previewMovie", ofType: "m4v") else{return} let player = AVPlayer(url: URL(fileURLWithPath: url)) let vc = AVPlayerViewController() vc.player = player present(vc, animated: true, completion: nil)` Thanks!
Replies
3
Boosts
0
Views
1.2k
Activity
May ’23