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()
}
Post
Replies
Boosts
Views
Activity
Recently I had trouble removing old apps which I had updated and revamped completely. Every time I hit Remove from App Review tab, it said Unable to remove. Then I went to Price and Availability, made it unavailable in all regions, and then I was able to remove. Hope it helps!
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)
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.
Hi guys, hope you're well. I'm trying to run my app on my iPhone13 and iPad10th generation but I don't see Developer mode in either. My Xcode is version 14.2. My iOS version is 16.3.1. I connected and checked but don't see Developer mode to enable. Please help, thanks.
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!
Hi guys, hope you are all staying safe.
I’m working on my next app with Xcode 12.5, am getting a few messages in the debug console, the app runs fine, just not sure what to make of these messages.
When using the date picker as a component, it was working fine till I upgraded to latest Xcode. Then started getting this error:
UIDatePicker 0x12151d680 is being laid out below its minimum width of 280.
So changed to ‘wheels’ option and it works. Don’t know why. Maybe a bug with new Xcode?
Also got some other weird warnings in other parts of the app FYI:
[plugin] AddInstanceForFactory: No factory registered for id
Some core data messages:
coredata message: [WindowServer] display_timer_callback: unexpected state & CoreData: annotation: PostSaveMaintenance: fileSize 9830352 greater than prune threshold CoreData: annotation: PostSaveMaintenance: wal_checkpoint(TRUNCATE) .
CoreData: annotation: PostSaveMaintenance: incremental_vacuum with freelist_count - 3569 and pages_to_free 713
Another unusual error/warning:
AddInstanceForFactory: No factory registered for id
Also kept getting this:
UIViewAlertForUnsatisfiableConstraints
checked documentation, set the property to false in some view controllers, ( vartranslatesAutoresizingMaskIntoConstraints = false) warning seems to disappear.
Any idea why these happen? Thank you!
Hi guys, hope you're all safe.
I recently launched my 5th app called GlucoTrak, which uses Core Data to allow users to record their glucose readings so they can track it regularly, and it provides links various videos which I, as a diabetic, have found super useful, enlightening and relevant.
It was approved the first time around, since users had some issues, I addressed those and submitted again which was approved with a request to revise ratings to 17+.
I then found a bug which was overriding the date to current date, so I added a calendar datepicker to make it easy for users to add date and time.
And the App Store rejected it! Citing various reasons such as 4.2.2 (minimum functionality) and 5.2.1 (must reflect company name) and 1.4 (physical harm), and they wanted approvals for using links.
I submitted an appeal stating it is not a medical app at all and that it’s an app for a diabetic by a diabetic. There are no companies involved. I am using CoreData, Datepicker, Tableviews, Safariservices etc in my app so it is not minimum functionality.
Now they dropped the 1.4 but still sticking with the other reasons to reject.I got approval emails from the relevant sources which I have submitted and another appeal to reconsider citing the same rationale.
Any idea what can be done?
Hi guys, hope you are all safe. I am about to launch my fifth app, and I see that the provision for image assets is limited to just 3 (@1,@2 and @3), whereas the last couple of apps I had to provide a range of image resolutions for each image. Am I missing something? Pls let me know, thank you!
PS: The image requirements are more only for app icon btw.
Hi hope you all are staying safe from the virus.I have a couple of questions. I have recently bought a new MacBook Air. I have been using my old MacBook Air to launch my apps.Now how do I transfer the developer certiciate to my new Mac? When I sign into my developer account I see the developer certificate assigned to my old Mac.Do I have to revoke and re-generate developer certifiate for my new mac?If I revoke will it affect my launched apps?As for my distribution certificate, it expired a while ago and I haven't renewed it. Can I renew/generate a new distribution cert on my new mac?Thanks a lot!