Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

No sound on latest xCode and unity [RESOLVED]

Discussion in 'iOS and tvOS' started by djgriff, Nov 13, 2015.

  1. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    249
    hi im not getting any sound playback from my latest app using latest unity release and latest xCode.

    no errors being thrown nd the project plays sound from within unity itself..

    Am i missing something somewhere or is it a bug?

    Thanks
     
  2. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    249
    Anyone got a clue i have tried different audio settings but nothing plays.. any thoughts anyone..
     
  3. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    249
    It was previously working but not in latest unit with xCode 9.1
     
  4. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    666
    unmute switch on the device
     
    ermead likes this.
  5. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    249
    good call buttered on iPad retina and iPhone 6s,, no joy with either..

    Going to try a fresh project to see if it works..

    thanks

    any other suggestions welcome
     
  6. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    249
    Ok tried new project and still no sound. will play in the editor but not once compiled through xCode.
    Must be a bug.
     
  7. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    666
    does the standalone (desktop) build work ?
    do other audio files play ?
    it might be a bug under specific circumstances such as slightly non standard audio format or possibly corrupted file
    if not then definitely report it
     
  8. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    249
    Hi,
    Well i just rolled back to earlier version of unity and the problem still exists,
    Its across all audio files. It does play in the unity editor no worries, I did a build on my pc for android and worked perfectly, no issues with the sound at all.
    So i can only think it is the latest version of xCode causing it..

    Dont suppose you know how to roll back on xCode to an earlier version..

    Thanks
     
  9. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    666
    is something in the Xcode console when you run it on the device ? ( cmd+shift+y in Xcode )
    as for the downgrading - that might be tricky, possibly not without OS reinstall, never did it myself
     
  10. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    249
    I tried downgrading but apple stated its own software was malware lmao.. stupid.. anyhow just installing beta version to see if that works..
     
  11. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    249
    hmm still not working with latest beta xCode....
    bummer... aarrgh dont want to have to do complete reinstall.

    Anyone running latest xCode /unity to confirm the issue?

    Thanks
     
  12. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    249
    Oh it plays just fine on mac desktop no worries its specific to iOS apps.. sucks
     
  13. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    428
    Which exact version of the "latest Xcode beta" are you testing?
     
  14. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    249
    X code auto updated on 13th Nov to. 7.1.1 which does not work with latest unity release. I then tried the beta version 7.2. Still not working.

    Cheers
     
  15. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    249
    I made a bug report with a clean project.
    Thanks
     
  16. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    428
    @djgriff Could you please share the case number?
     
  17. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    249
    For sure, the case number is : 744975
    cheers
     
  18. PauliusP

    PauliusP

    Mobile Developer Unity Technologies

    Joined:
    Jul 8, 2014
    Posts:
    117
    Sounds is working fine for me with Unity 5.2.3f1 and Xcode 7.1.1 (7B1005). Could you try downloading the latest patch build 5.2.2p4 (it should identical to 5.2.3f1 which should released later this week) from https://unity3d.com/unity/qa/patch-releases and check whether you can still reproduce this?
     
  19. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    249
    Hi,

    thanks, I have reinstalled latest unity as stated and still same problem on iPad build, and combined build.

    I am running on iPad retina just over 1 year old.

    I wil be able to try a iPhone this evening.

    However i am going to do a complete reinstall to see if this fixes it.

    Thanks
     
  20. PauliusP

    PauliusP

    Mobile Developer Unity Technologies

    Joined:
    Jul 8, 2014
    Posts:
    117
    I'm not really sure whether reinstalling could actually help, it would be quite surprising if this actually had anything to do with your OSX/Xcode versions. But do you remember the last Xcode and Unity versions with which the sound worked?

    Also this might be hardware and/or iOS version specific, could you write the specific model of your iPad (it's written on the back) and the exact iOS version it's running?
     
  21. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    249
    Hi I was running latest elcapitano os. Ipad is model A1566.
    Os on ipad 9.1 fully upto date.

    Thanks

    10 min to clean reinstall.
     
  22. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    249
    OK not working with complete reinstall.. this is the out put

    2015-11-19 13:13:49.513 mindfulnesscounting[548:224270] -> registered mono modules 0x100714b00

    -> applicationDidFinishLaunching()

    -> applicationDidBecomeActive()

    Requesting Native Resolution

    Init: screen size 1536x2048

    Initializing Metal device caps

    Initialize engine version: 5.2.2p4 (93d0b2db7c56)

    Setting up 1 worker threads for Enlighten.

    Thread -> id: 16e78f000 -> priority: 1


    Everything seem like its ok..

    suggestions welcome ..

    Thanks


    Edit: the odd thing is it was working fine 3 weeks ago, even publish a version of the app then..
     
  23. Dreamwriter

    Dreamwriter

    Joined:
    Jul 22, 2011
    Posts:
    472
    Have you tried any other sound-related apps on that device, or another device? Maybe the device suddenly started having sound problems.
     
  24. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    249
    All apps work perfectly.. sound is not a problem with the device it's self just won't work with x code compiled unity projects..
    Cheers
     
  25. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    249
    Ok good progress it works on iPhone 6s but not on the iPad. However all other apps work on the iPad.
    So it looks like its device specific.

    Cheers
     
  26. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    249
    Ok really odd thing i downloaded the last release that was published several weeks ago and the sound now will not play on the iPad.. so something is up with latest device update and unity published apps i am guessing..

    All other apps like youtube and so on work fine.

    hope this helps getting to the bottom of this

    cheers
     
  27. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    249
    Any update on the iPad issue? is it being looked into?

    Thanks
     
  28. PauliusP

    PauliusP

    Mobile Developer Unity Technologies

    Joined:
    Jul 8, 2014
    Posts:
    117
    I've tried this on the same iPad Air 2 model your'e using both with latest iOS and an older version and also on several other devices running 9.1, but couldn't reproduce this - the sound seems to be working fine. Could you try creating another Unity project preferably with a different audio source, like a video file (with Handheld.PlayFullScreenMovie), justto make sure that this isn't caused by something in the specific Xcode project?

    Also, this might sound silly, but are you sure that your iPad is not muted (some Apps might be using other playback categories and could still play sounds in silent mode)?
     
  29. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    249
    Hi _Paulius,

    I have had contact with users of the app and they are also experiencing sound issues on ipads. I you go to the app store and download 'Calm Mind' Mindfulness counting app. I currently get no sound from this published app aswell on the ipad.

    iTunes link to app:
    https://itunes.apple.com/us/app/calm-mind/id1019084166?ls=1&mt=8

    I will try your suggestion above.

    The device doesn't have a mute button on the ipad they removed it in the latest models.

    As I sadi above other apps have sound with no issue.. just unity projects.

    I have tested on iPhone 6s with no issues.. I do have another ipad.. which come to think of it should of tested.. ill do that now and come back to you.

    I have attached screen shots of the app for reference.
     

    Attached Files:

  30. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    249
    I can confirm that the sound does work on my older iPad. see images below, but not on the latest iPad.

    I will try your other suggestion as to a movie file and come back to you shortly

    cheers
     

    Attached Files:

  31. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    249
    Ok i am not too familiar with the movie snipet but this is what i tried. I added it to a empty gameobject , The thing is when compiled it didn't seem to run so not sure whether it is correct.

    code:
    Start(){
    Handheld.PlayFullScreenMovie("movie.mp4", Color.black, FullScreenMovieControlMode.Full, FullScreenMovieScalingMode.AspectFill);
    }
    the mp4 is located in the assets folder and i am assuming this is the default path.

    If this is correct, then i am not sure why it is not playing on the iPad.

    If its not right please correct me so i can crack on..

    Thanks

    Daniel
     
  32. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    666
    "The device doesn't have a mute button on the ipad they removed it in the latest models."
    they might have removed physical switch, but mute state is configurable still - https://support.apple.com/en-us/HT204171
     
  33. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    249
    Ok hand on the table.. It was the fecking mute button only accessible through the pull up menu when playing the damn app. Fk so sorry guys this has been stressing the heck outta me days..jesus what a joke..

    they have even moved the option from the darn general settings menu..

    Thanks for your time on educating a muppet.

    Cheers
     
  34. Anisoropos

    Anisoropos

    Joined:
    Jul 30, 2012
    Posts:
    92
    Jesus christ, for me it was an even lamer thing; I'm putting my pride aside and mentioning my fail for the good of the community:

    For all you Android / Windows Phone users, apparently iPhones (4s, 5s at least) have a little "mute" switch, which doesn't affect all apps (I could reproduce sound in iPhone's recording app for example) but it didn't allow any of my game's sound to go through!! Scared the S*** out of me :p
     
    ChrisAtPropeller likes this.
  35. mikeownz

    mikeownz

    Joined:
    Mar 3, 2017
    Posts:
    20

    Thanks! I am new to iphones and have only used Androids my whole life.

    When I built my game to my iphone I couldn't for the life of me figure out why my sound was not playing.

    I didn't know iphone's had a mute switch hahahaha. Crazy!
     
  36. Anisoropos

    Anisoropos

    Joined:
    Jul 30, 2012
    Posts:
    92
    Glad to help a fellow iChallenged person ;)
     
  37. bkachmar

    bkachmar

    Joined:
    Mar 15, 2013
    Posts:
    29
    I also had troubles with the switch and I put this code into my native iOS plugin and now I don't care about it's position - the music plays all the time.

    NSError *error;
    [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback withOptions:AVAudioSessionCategoryOptionAllowBluetooth | AVAudioSessionCategoryOptionAllowAirPlay | AVAudioSessionCategoryOptionAllowBluetoothA2DP error:nil];
    [[AVAudioSession sharedInstance] setActive:YES error:&error];

    Hope this will help.
     
  38. walaceapolo

    walaceapolo

    Joined:
    Jan 29, 2018
    Posts:
    1
    Had the same problem here guys. Dizãzz what a button joke. I was entering in a collapse because of that damn.

    Thank you guys!