Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
1
Question by Valsidalv · Jan 08, 2013 at 05:04 PM · c#ioslinq

Using Linq when building to iOS

I build to iOS a bunch of scripts with a quite lot of Linq calls. The problem is that after adding some Linq calls some features stopped working properly. The problem persists only on actual iOS device, on PC and mac standalone it works fine. I saw that OrderBy, OrderByDescending may cause troubles on iOS. Is it true? And what else should I avoid when building to iOS?

Comment
Add comment · Show 1
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
avatar image Valsidalv · Jan 08, 2013 at 06:31 PM 0
Share

Update: OrderBy and OrderByDescending do not work on iOS. But the second part of the question stays -- what other Linq methods should I avoid when building to iOS?

1 Reply

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

Answer by liszto · Jan 09, 2013 at 12:55 AM

The only thing I know is that all LINQ functions which extended an IEnumerator/IEnumerable can create problems. I'm not a LINQ pro but it seems to me that can create bugs due to AOT not supported that kind of things.

For example those functions probably generated errors : ThenByDescending / ThenBy...

I think you can have more informations here :

http://forum.unity3d.com/threads/116408-LINQ-stopped-working-on-iOS-(after-3.4-)

and here :

http://forum.unity3d.com/threads/84147-LINQ-on-iOS

and MSDN documentation on LINQ & Enumerable derivated method :

http://msdn.microsoft.com/fr-fr/library/bb341635.aspx

Maybe someone else can explain better than me because I'm not sure at 100% of my answer but I thing it's a good track to start your investigation.

Before think I'm right maybe wait someone who know or can explain better than me on this subject. I think you can pass this problem I just never really try something like this on mobile devices so I can't give you more details :/

Comment
Add comment · Show 3 · 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
avatar image Valsidalv · Jan 09, 2013 at 11:11 AM 0
Share

Thank you for the info. I'll wait a bit for maybe a more specific answer.

avatar image The-Oddler · Jan 11, 2013 at 11:18 PM 0
Share

I found that you CAN use Linq on a List, but NOT on an array. So I guess that the Linq functions for arrays use the IEnumerator, while the ones for List don't. Seems interesting.

avatar image prestonf · Dec 05, 2013 at 10:53 PM 0
Share

We started having similar issues but it was only present when we were connected to Xcode. It would only throw the error at that point, but it would work fine when the device was independent for the developer machines. However everyone we deployed it to via AdHoc all crashed. Good find along the way, hopefully it can help other people and find a clear cut reason/resolution.

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

12 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

Related Questions

Using system.xml.linq with Unity iOS 0 Answers

[Solved] How to LINQ to ArrayList all the Transform within a Range? 1 Answer

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

My Generic function using LINQ(orderBy thenBy)Not working on IOS 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