Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Pr0n · Jul 22, 2015 at 03:35 PM · iosnetworkingxcodeunity multiplayer

[UNet] "No such host is known" error on iOS

Hello, I just done my new app and its working on UnityEditor, but now I create Xcode project (v6.4) and I got error:

 2015-07-22 17:24:26.554 ComradeWars[414:45370] -> registered mono modules 0x1014058a0
 -> applicationDidFinishLaunching()
 PlayerConnection initialized from /private/var/mobile/Containers/Bundle/Application/5FDB6136-231C-45F5-BC0A-7A6BCBB12D96/ComradeWars.app/Data (debug = 0)
 PlayerConnection initialized network socket : 0.0.0.0 55000
 Multi-casting "[IP] 192.168.0.103 [Port] 55000 [Flags] 3 [Guid] 1192420317 [EditorId] 342940737 [Version] 1048832 [Id] iPhonePlayer(iPad):56000 [Debug] 1" to [225.0.0.222:54997]...
 Waiting for connection from host on [192.168.0.103:55000]...
 PlayerConnection accepted from [192.168.0.101] handle:0x8
 -> applicationDidBecomeActive()
 Requesting Resolution: 2048x1536
 Init: screen size 2048x1536
 Initializing Metal device caps
 Initialize engine version: 5.1.1p4 (c439df19cd24)
 SocketException: No such host is known // <- HERE
   at System.Collections.Specialized.ListDictionary+DictionaryNodeEnumerator.MoveNext () [0x00000] in <filename unknown>:0 
   at System.Net.Dns.GetHostByName (System.String hostName) [0x00000] in <filename unknown>:0 
   at System.Net.Dns.GetHostEntry (System.String hostNameOrAddress) [0x00000] in <filename unknown>:0 
   at ComradNetManager.LocalIpAddress () [0x00000] in <filename unknown>:0 
   at ComradNetManager.ConfigNetwork () [0x00000] in <filename unknown>:0 
   at ComradNetManager.Start () [0x00000] in <filename unknown>:0

I tried debug it.. In UnityEditor everything is going alright. Init called etc. But on iOS it crashs here:

 public string LocalIpAddress()
     {
         IPHostEntry host;
         string localIP = "";
         host = Dns.GetHostEntry(Dns.GetHostName());
         foreach (IPAddress ip in host.AddressList)
         {
             if (ip.AddressFamily == AddressFamily.InterNetwork)
             {
                 localIP = ip.ToString();
                 break;
             }
         }
         logger.text += "\nLocalIpAddress called and IP is: " + localIP;
         return localIP;
     }

 

Any one know, how to fix it?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Pr0n · Jul 23, 2015 at 03:38 AM

I already solved this problem with replace LocalIpAddress method with:

 Network.player.ipAddress


So the problem was in System.Net and iOS compilation.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

21 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Forge Networking Remastered iOS Build Error 1 Answer

Any idea on when we'll see Unity work with Xcode 4? 3 Answers

Compiling plugin for iOS - need more info. 4 Answers

UNet - Where does "normal" code run? 1 Answer

Export on IOS: Stuk on Splash Screen 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges