Forum Mobile Is the PlayerIOClient library for iOS completely defunct?

Everything mobile goes here.

Is the PlayerIOClient library for iOS completely defunct?

Postby mzmiric5 » November 2nd, 2015, 9:16 pm

Have been trying to get the PlayerIOClient library for iOS to work in XCode7, but no matter what I do, I get the PlayerIOClient/PlayerIO.h file not found build error, even thought that the framework is definitely been added to the project and all the files are there.

Is this sort of usage no longer supported or am I missing something?
mzmiric5
 
Posts: 9
Joined: October 13th, 2015, 2:43 pm

Re: Is the PlayerIOClient library for iOS completely defunct

Postby mzmiric5 » November 3rd, 2015, 1:09 am

After a lot of messing about with XCode, I managed to get over that hurdle by forcing the framework to be copied to the project. And about a second later, the 2nd problem hit.

Whenever I try to build the project I get the following error

Code: Select all
ld: warning: ignoring file /Users/devStaff/Documents/Dev/Mobile/iOS/devApp/PlayerIOClient.framework/PlayerIOClient, missing required architecture x86_64 in file /Users/devStaff/Documents/Dev/Mobile/iOS/devApp/PlayerIOClient.framework/PlayerIOClient (2 slices)
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_PlayerIO", referenced from:
      type metadata accessor for __ObjC.PlayerIO in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


So, is the library just not compatible for builds on IOS9 or? Is there a new missing dependency for the framework?
mzmiric5
 
Posts: 9
Joined: October 13th, 2015, 2:43 pm

Re: Is the PlayerIOClient library for iOS completely defunct

Postby Guillaume » November 3rd, 2015, 1:11 am

You must be missing something, it work normally in my project.
Have you checked that "PlayerIOClient.iOS.a" is present in "Linked Frameworks and Libraries" in XCode ?

Also, can you find PlayerIO.h in your source file ?

And will, just one important question, are you using the native iOS SDK or Unity ?
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: Is the PlayerIOClient library for iOS completely defunct

Postby Guillaume » November 3rd, 2015, 1:13 am

Code: Select all
ld: warning: ignoring file /Users/devStaff/Documents/Dev/Mobile/iOS/devApp/PlayerIOClient.framework/PlayerIOClient, missing required architecture x86_64 in file /Users/devStaff/Documents/Dev/Mobile/iOS/devApp/PlayerIOClient.framework/PlayerIOClient (2 slices)
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_PlayerIO", referenced from:
      type metadata accessor for __ObjC.PlayerIO in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Well, i doubt that an iOS project is a x86_64 architecture !
Check your project configuration, but you must build with:

Architectures: "armv7 arm64"
Valid architectures: "arm64 armv7 armv7s"

Check this parameter in Build Settings in XCode.
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: Is the PlayerIOClient library for iOS completely defunct

Postby mzmiric5 » November 3rd, 2015, 1:32 am

Guillaume wrote:Have you checked that "PlayerIOClient.iOS.a" is present in "Linked Frameworks and Libraries" in XCode ?

hmm, I don't really have a PlayerIOClient.iOS.a file, not sure where I would find it. I have PlayerIOClient.Framework though

Guillaume wrote:And will, just one important question, are you using the native iOS SDK or Unity ?

native iOS SDK

Guillaume wrote:Well, i doubt that an iOS project is a x86_64 architecture !

the Architectures are definitelly armv7 and arm64, and valid is arm64 armv7 and armv7s. I believe that the x86_64 marking has been introduced since iOS 7 or 8 (ever since embedded binaries and watchOS support was added in the beta), and it is probably there due to the build being done for the simulator. Regardless of this, it's the setting that is present in all new projects that I set up, and it's also having the same issue with the example project shipped with the sdk.

I should point out that I'm using XCode 7 and targeting iOS9.1 at the moment.
mzmiric5
 
Posts: 9
Joined: October 13th, 2015, 2:43 pm

Re: Is the PlayerIOClient library for iOS completely defunct

Postby Guillaume » November 3rd, 2015, 1:41 am

Humm sorry i'm using the Unity SDK version, so everything seem managed automatically.
But then again, its not normal that your compiler is warning you about a x86_x64 error. iPhone are not x86 architecture at all, so why is this error happening ?

Have you take a look at your Schemes configuration in XCode ?
Have you tried to compile a empty project, just for testing ?

Also, you may try to take a look in "Framework Search Paths" in Build Settings, and point it to your PlayerIO Framework folder ?
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: Is the PlayerIOClient library for iOS completely defunct

Postby mzmiric5 » November 3rd, 2015, 1:51 am

Yeah empty projects work just fine, and as I said, the architecture is fine, runs fine on both the simulator and the actual devices. It only encounters this issue when I start using the library.

Could you tell me which other libraries the XCode project links with? I might be missing something else there which could apparently cause an issue like this
mzmiric5
 
Posts: 9
Joined: October 13th, 2015, 2:43 pm

Re: Is the PlayerIOClient library for iOS completely defunct

Postby mzmiric5 » November 3rd, 2015, 2:13 am

Yeah I was correct the x86_x64 is for the simulator builds. When you run on the actual device it uses the armv architectures for build. So it looks like the native iOS framework for PlayerIO was exported as device only library. Would be nice if YGN released an SDK update for a library that can build for both device and simulator
mzmiric5
 
Posts: 9
Joined: October 13th, 2015, 2:43 pm

Re: Is the PlayerIOClient library for iOS completely defunct

Postby Guillaume » November 3rd, 2015, 2:22 am

mzmiric5 wrote:Yeah I was correct the x86_x64 is for the simulator builds. When you run on the actual device it uses the armv architectures for build. So it looks like the native iOS framework for PlayerIO was exported as device only library. Would be nice if YGN released an SDK update for a library that can build for both device and simulator


Haha you missed to tell me the "Simulator" information bit :p ! Yes the simulator is indeed a x86 image...
It seem that for the moment, you may have to work with a real iOS device.
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: Is the PlayerIOClient library for iOS completely defunct

Postby mzmiric5 » November 3rd, 2015, 2:35 am

Not a big deal since I have a few spare dev devices, but still would be nice if I could just run on simulator so I don't have to wait for deploy on every build :D At least I can join my GameRoom now. Thanks for all your help Guillaume

Tips for anyone else who might run into problems like this with Xcode7 and iOS9
1) disable bitcode since the framework hasn't been compiled with ENABLE_BITCODE flag, if your project uses it, it won't build with this library
2) enable arbitrary data transfers for App Transfer Security settings since the public connections to PlayerIO won't work if you don't
3) copy the framework into your project (drag and drop to xcode)
mzmiric5
 
Posts: 9
Joined: October 13th, 2015, 2:43 pm


Return to Mobile