Question

recently bought a Social Network (by prime 31) when trying to bind to facebook ios get an error (when compiling Xcode):

Undefined symbols for architecture armv7:
"_twitterShowOauthLoginDialog", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_twitterPostStatusUpdateWithImage", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_twitterLogout", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_twitterIsLoggedIn", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_twitterInit", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_facebookShowDialog", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_facebookSetSessionLoginBehavior", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_twitterShowTweetComposer", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_facebookShowFacebookComposer", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_facebookReauthorizeWithPublishPermissions", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_facebookGetFacebookAccessToken", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_sharingShareItems", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_facebookInit", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_facebookReauthorizeWithReadPermissions", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_facebookLogout", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_facebookRenewCredentialsForAllFacebookAccounts", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_facebookLoginWithRequestedPermissions", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_twitterIsTweetSheetSupported", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_facebookGetSessionPermissions", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_facebookIsLoggedIn", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_facebookShowFacebookShareDialog", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_facebookLoginUsingDeprecatedAuthorizationFlowWithRequestedPermissions", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_twitterPerformRequest", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_facebookGraphRequest", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_twitterLoggedInUsername", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_facebookGetAppLaunchUrl", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_facebookCanUserUseFacebookComposer", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_twitterCanUserTweet", referenced from: RegisterMonoModules() in RegisterMonoModules.o "__facebookEnableFrictionlessRequests", referenced from: RegisterMonoModules() in RegisterMonoModules.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Who faced with this problem? Help!

Was it helpful?

Solution

Undefined symbol errors that you get after embedding a prime31 (or any library) usually mean that one or more dependency libraries are missing from the overall build. Since this happens at iOS compile-time (and not Unity/.NET compile-time — which would have prevented you from even building an Xcode project), this narrows it down to something missing from the Xcode project directory that Unity generates.

Now, sometimes in Unity, just doing a new build and replacing your old build directory will snap everything back into order. You have probably already tried this though, so in the event that that doesn't work, it's still pretty easy to solve the problem manually.

This can usually be resolved by doing the following:

1) Open the last Xcode project that was generated by Unity

2) Navigate back to the Unity IDE. Right-click on the directory of the desired prime31 plugin in the "Editor" directory and select "Show in Finder"

3) Drag over any library (.a) or header (.h) files to the Xcode project. In "Build Phases" make sure the required libraries are linking to the binary.

4) Build & Run

Hopefully that helps. Let me know if you need any clarifications.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top