SOOOOOO!
Last time I had to build for iOS, we ran into a lot of problems, but with iOS latest version and the latest unity installer, everything works JUST fine….
NOT
So we are currently using xCode 7, with iOS 9, and on Unity 5.2.3, we can follow the same steps found on part 1
And we’ll find out that the build isn’t working! CUTE huh!?
Now the first thing that we need to fix, is make sure we can compile the whole build. First we need to look for the WWWConnection.mm file, once we have it we go to the BUILD PHASES setting, and we add a nice new flag:
-fobjc-arc
And this should allow us to compile it again… just to find a new error, regarding the Display Manager. The error is related to line #277 regarding a missing reference:
once you fix it (by adding retain!! ) it will look like this:
FINALLY
Regarding iOS plugins, I was trying to do this:
But I kept getting a marshalling error, this is due to the fact that I was trying to send a const char* that would disappear right after the method ended. Luckily we have a beautiful helper function that allows us to create a copy that can be send out of the method context:
So we use it to get the information we want through the method, also see that we are not releasing the netinfo since the marshaller is taking care of that (NICE addition btw).
AND I think those are all the fixes I had to do for this build!!







