Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

OSX Mac store app networking fails after codesign / package

Discussion in 'macOS' started by Andrew-Garrison, May 11, 2016.

  1. Andrew-Garrison

    Andrew-Garrison

    Joined:
    Oct 3, 2012
    Posts:
    19
    I have an app built in Unity and setup to be released on the Mac App Store that has networking tasks that work just fine in an OS X build, but once we set the Use Mac App Store Validation to true and submit to Apple, then networking calls fail to work. Both HTTP and HTTPS requests fail to work.

    Does anyone have any ideas on what might be causing this or further tests I could use to figure out what the problem might be.

    I have found a few more people having the same issue, but unfortunately no one has any answers:
    http://stackoverflow.com/questions/...-released-version-osx-app-built-using-unity3d

    http://stackoverflow.com/questions/...e-app-networking-fails-after-codesign-package
     
    jkampitakis likes this.
  2. Andrew-Garrison

    Andrew-Garrison

    Joined:
    Oct 3, 2012
    Posts:
    19
    I never figured out what was wrong Unity's WWW class, but I was able to get around the issue using the System.Net.WebClient class. I implemented a simple wrapper that has a similar interface to Unity's WWW class. Here's the code I used: http://pastebin.com/Erz512SE
     
  3. jkampitakis

    jkampitakis

    Joined:
    Dec 27, 2015
    Posts:
    56
    We have exactly the same problem with our game...Thanks for pointing me to the right direction.
     
  4. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    What version of Unity are you guys using?
     
    jkampitakis likes this.
  5. jkampitakis

    jkampitakis

    Joined:
    Dec 27, 2015
    Posts:
    56
    5.3.5 patch1
     
  6. jkampitakis

    jkampitakis

    Joined:
    Dec 27, 2015
    Posts:
    56
    @MrEsquire : Do you know if this is a known bug? Is there an official Unity patch for this?
     
  7. Bluetiger76

    Bluetiger76

    Joined:
    Jun 27, 2016
    Posts:
    1
    I'm having the same issue here, any case it may be fixed soon?
     
  8. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    I dont know if known bug but check Unity bug tracker. It seems this issue has been around for months now, so surprised unity not commenting or aware, i do find the macos platform neglected these days.. Thing is what networking feature you use, i released a macosx game uses inapp and leaderboards plugins with prime31 and app store validation works fine for me.. So it effects some users only.. You really need provide abit more detail, what exactly you doing? Connecting to a custom server? General internet access in app etc.. To little information to try and find the root cause of issues..
     
  9. jkampitakis

    jkampitakis

    Joined:
    Dec 27, 2015
    Posts:
    56
  10. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    I think they fixed similar issues in ios as far as i can remember..please check the patch change logs from p1 to p4 if any mention of www osx fix. Sorry cannot help further
     
  11. jkampitakis

    jkampitakis

    Joined:
    Dec 27, 2015
    Posts:
    56

    ok thanks a lot for your help.
     
  12. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    If your app is sandboxed then you need to explicitly state that your app needs incoming/outgoing network connections.
     
  13. jkampitakis

    jkampitakis

    Joined:
    Dec 27, 2015
    Posts:
    56
    In my entitlements file it is declared that the app is sandboxed indeed.


    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>com.apple.security.app-sandbox</key>
    <true/>
    <key>com.apple.security.network.client</key>
    <true/>
    </dict>
    </plist>


    Where should I explicitly state the incoming/outgoing network connections ?
     
  14. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    That looks right to me. I'm on 5.3.5p7 and having no issues with sandboxing and www class.
     
  15. jkampitakis

    jkampitakis

    Joined:
    Dec 27, 2015
    Posts:
    56
  16. kygen007

    kygen007

    Joined:
    Feb 20, 2017
    Posts:
    8
    You are trying to access a non-secure URL, and it's now prohibited in Android 9