Best practices for ios project use unity3d - ios

We ios project use unity3d, but the unity3d project is in developing, and they send we new unity3d project every day, we needs to export to ios project every day, and we move our current ios project to the new exported ios project by unity3d. How do you guys do about this, we try to build the u3d ios project to static lib, we build success but use the static lib have many problems, some like:
Undefined symbols for architecture armv7:
"UnityKeyboard_GetText(std::string*)", referenced from:
KeyboardOnScreen::getText() const in libiPhone-lib.a(iPhoneKeyboard.o)
"UnityAD_DestroyInterstitial(void*)", referenced from:
ADInterstitialAd_CUSTOM_Native_DestroyInterstitial(void*) in libiPhone-lib.a(iAD.o)
"UnityAD_InterstitialAvailable()", referenced from:
ADInterstitialAd_CUSTOM_Native_InterstitialAvailable() in libiPhone-lib.a(iAD.o)
"UnityAD_ReloadInterstitial(void*)", referenced from:
ADInterstitialAd_CUSTOM_Native_ReloadInterstitial(void*) in libiPhone-lib.a(iAD.o)
"UnityAD_ShowInterstitial(void*)", referenced from:
ADInterstitialAd_CUSTOM_Native_ShowInterstitial(void*) in libiPhone-lib.a(iAD.o)
"UnityAD_CreateInterstitial(bool)", referenced from:
ADInterstitialAd_CUSTOM_Native_CreateInterstitial(short) in libiPhone-lib.a(iAD.o)
"UnityAD_ShowBanner(void*, bool)", referenced from:
ADBannerView_CUSTOM_Native_ShowBanner(void*, short) in libiPhone-lib.a(iAD.o)
"UnityAD_BannerAdLoaded(void*)", referenced from:
ADBannerView_CUSTOM_Native_BannerAdLoaded(void*) in libiPhone-lib.a(iAD.o)
"UnityAD_InterstitialAdLoaded(void*)", referenced from:
ADInterstitialAd_CUSTOM_Native_InterstitialAdLoaded(void*) in libiPhone-lib.a(iAD.o)
"UnityAD_BannerPosition(void*, float*, float*)", referenced from:
ADBannerView_CUSTOM_Native_BannerPosition(void*, Vector2f*) in libiPhone-lib.a(iAD.o)
"UnityAD_DestroyBanner(void*)", referenced from:
ADBannerView_CUSTOM_Native_DestroyBanner(void*) in libiPhone-lib.a(iAD.o)
"UnityAD_LayoutBanner(void*, int)", referenced from:
ADBannerView_CUSTOM_Native_LayoutBanner(void*, int) in libiPhone-lib.a(iAD.o)
"UnityAD_BannerSize(void*, float*, float*)", referenced from:
ADBannerView_CUSTOM_Native_BannerSize(void*, Vector2f*) in libiPhone-lib.a(iAD.o)
"UnityAD_MoveBanner(void*, float, float)", referenced from:
ADBannerView_CUSTOM_INTERNAL_CALL_Native_MoveBanner(void*, Vector2f const&) in libiPhone-lib.a(iAD.o)
"UnityAD_BannerTypeAvailable(int)", referenced from:
ADBannerView_CUSTOM_Native_BannerTypeAvailable(int) in libiPhone-lib.a(iAD.o)
"UnityAD_BannerAdVisible(void*)", referenced from:
ADBannerView_CUSTOM_Native_BannerAdVisible(void*) in libiPhone-lib.a(iAD.o)
"UnityAD_CreateBanner(int, int)", referenced from:
ADBannerView_CUSTOM_Native_CreateBanner(int, int) in libiPhone-lib.a(iAD.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

There is a "libiPhone-lib.a" file in "Libraries" directory after you build (by unity3d).
check if the "libiPhone-lib.a" in your "Link Binary With Libraries" . if not click "+" ->
"Add other..." -> "Libraries" select "libiPhone-lib.a" .
i fixed my errors by this .

Related

How to solve "undefined symbols for architecture x86_64" and "linker command failed with exit code 1" in xcode?

I am trying to build a project in xcode and I get the following errors:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_Zoom", referenced from:
objc-class-ref in ZoomConnectedNetworking.o
objc-class-ref in ZoomViewController.o
objc-class-ref in RNAppBridge-843d3738eaf9ad6c9a88b86d7afb070208b29a596e7ec9fd5f0c00a394da72ff.o
"_OBJC_CLASS_$_ZoomCancelButtonCustomization", referenced from:
objc-class-ref in ZoomConnectedConfig.o
"_OBJC_CLASS_$_ZoomCustomization", referenced from:
objc-class-ref in ZoomConnectedConfig.o
"_OBJC_CLASS_$_ZoomFeedbackCustomization", referenced from:
objc-class-ref in ZoomConnectedConfig.o
"_OBJC_CLASS_$_ZoomFrameCustomization", referenced from:
objc-class-ref in ZoomConnectedConfig.o
"_OBJC_CLASS_$_ZoomInstructionsImages", referenced from:
objc-class-ref in ZoomConnectedConfig.o
"_OBJC_CLASS_$_ZoomOvalCustomization", referenced from:
objc-class-ref in ZoomConnectedConfig.o
"_construct_single_private_key", referenced from:
static pingpongRN.GothamClient.getSinglePrivateKey(x1: Swift.String, x2: Swift.String) -> Swift.String? in GothamClient.o
"_decrypt_party_one_master_key", referenced from:
static pingpongRN.GothamClient.decryptPartyOneMasterKey(client_share: pingpongRN.MasterKey2, encrypted_server_share: Swift.String, private_key: Swift.String) -> Swift.String? in GothamClient.o
"_get_child_mk1", referenced from:
static pingpongRN.GothamClient.getChildServerShare(server_share_str: Swift.String, x_pos: Swift.String, y_pos: Swift.String) -> Swift.String? in GothamClient.o
"_get_child_mk2", referenced from:
static pingpongRN.GothamClient.getChildClientShare(client_share_str: Swift.String, x_pos: Swift.String, y_pos: Swift.String) -> pingpongRN.MasterKey2? in GothamClient.o
"_get_client_master_key", referenced from:
static pingpongRN.GothamClient.generate_master_key2(gothamEndpoint: Swift.String) -> (pingpongRN.MasterKey1?, pingpongRN.MasterKey2?) in GothamClient.o
"_sign_message", referenced from:
static pingpongRN.GothamClient.sign(gothamEndpoint: Swift.String, message_hex: Swift.String, x_pos: Swift.String, y_pos: Swift.String, master_key_2: pingpongRN.MasterKey2, master_key1_id: Swift.String) -> pingpongRN.Signature? in GothamClient.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I tried cleaning and I have read about looking at the linking but it seems like all of the libraries and frameworks I need are in place.
Any reason why this is happening?
There several possible reasons:
You linked the library that has no architectures for Simulator ( seems that you're building for simulator ) - to check that you can simply thought terminal:
lipo -info LIBRARY_OR_FRAMEWORK_FILE (it will show you all compatible architectures)
You completely not linking library:
To check that just more to "Build Phase" tab and look at "Link Binary with Libraries" phase

How to fix apple match-o linker id errors in unity project build using xcode 8

I imported a few scenes and assets from one project to this one and now I am getting these errors when I try to build my unity project for iphone in xcode
"_IOSGetAppLink", referenced from:
"_IOSFetchDeferredAppLink", referenced from:
"_IOSFBAppEventsLogPurchase", referenced from:
"_IOSFBAppEventsLogEvent", referenced from:
"_IOSSetShareDialogMode", referenced from:
"_IOSJoinGameGroup", referenced from:
"_IOSFBSdkVersion", referenced from:
"_IOSShareLink", referenced from:
"_IOSFeedShare", referenced from:
"_IOSAppRequest", referenced from:
"_IOSAppInvite", referenced from:
"_IOSCreateGameGroup", referenced from:
"_IOSFBSettingsActivateApp", referenced from:
"_IOSLogOut", referenced from:
"_IOSFBAppEventsSetLimitEventUsage", referenced from:
"_IOSLogInWithPublishPermissions", referenced from:
"_IOSInit", referenced from:
"_IOSLogInWithReadPermissions", referenced from:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please check FacebookSDK is in on the same project folder or check the path is correct this error indicates you have missing library or framework.
please this post it will give you better understanding
Apple linker command fail

Cocoa Pods failed to link libraries while running in the debug mode?

I m using pods to link libraries like AfNetworking, facebook etc. and its working great in release mode but I want to check Variables value by debugging but it shows all the variables nil in release mode. I tried to run in debug mode by editing schema but it failed to compile showing various libraries not found error.
Edit I have tried updating the architectures.....but this isn't helping out.
Error log in debug mode
ld: warning: directory not found for option '-L/Users/madept/Desktop/personally/Pods/build/Debug-iphoneos'
ld: warning: ignoring file /Users/madept/Desktop/personally/libCloudinary.a, missing required architecture x86_64 in file /Users/madept/Desktop/personally/libCloudinary.a (3 slices)
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_AFHTTPRequestOperation", referenced from:
objc-class-ref in ZRAPIClient.o
"_OBJC_CLASS_$_AFHTTPRequestSerializer", referenced from:
objc-class-ref in ZRAPIClient.o
"_OBJC_CLASS_$_AFJSONResponseSerializer", referenced from:
objc-class-ref in ZRAPIClient.o
"_OBJC_CLASS_$_BITHockeyManager", referenced from:
objc-class-ref in ZRAppDelegate.o
"_OBJC_CLASS_$_CLCloudinary", referenced from:
objc-class-ref in ZRMediaManager.o
"_OBJC_CLASS_$_CLTransformation", referenced from:
objc-class-ref in ZRMediaManager.o
"_OBJC_CLASS_$_DDFileLogger", referenced from:
objc-class-ref in Zooplr.o
"_OBJC_CLASS_$_DDLog", referenced from:
objc-class-ref in Chat.o
objc-class-ref in ZRManagedObject.o
objc-class-ref in ZRTelescopingScrollView.o
objc-class-ref in ZRAddMessageBarController.o
objc-class-ref in ZRCreateAccountViewController.o
objc-class-ref in ZRAddressBookHelper.o
objc-class-ref in Zooplr.o
...
"_OBJC_CLASS_$_DDTTYLogger", referenced from:
objc-class-ref in Zooplr.o
"_OBJC_CLASS_$_ELCAlbumPickerController", referenced from:
objc-class-ref in ZRMediaCaptureController.o
"_OBJC_CLASS_$_ELCImagePickerController", referenced from:
objc-class-ref in ZRMediaCaptureController.o
"_OBJC_CLASS_$_EZAudioPlotGL", referenced from:
objc-class-ref in ZRMediaCaptureController.o
"_OBJC_CLASS_$_EZMicrophone", referenced from:
objc-class-ref in ZRMediaCaptureController.o
"_OBJC_CLASS_$_EZRecorder", referenced from:
objc-class-ref in ZRMediaCaptureController.o
"_OBJC_CLASS_$_FBAppCall", referenced from:
objc-class-ref in ZRAppDelegate.o
"_OBJC_CLASS_$_FBErrorUtility", referenced from:
objc-class-ref in ZRSocialClient.o
"_OBJC_CLASS_$_FBRequest", referenced from:
objc-class-ref in ZRSocialClient.o
"_OBJC_CLASS_$_FBRequestConnection", referenced from:
objc-class-ref in ZRSocialClient.o
"_OBJC_CLASS_$_FBSession", referenced from:
objc-class-ref in ZRAppDelegate.o
objc-class-ref in ZRSocialClient.o
"_OBJC_CLASS_$_Mixpanel", referenced from:
objc-class-ref in ZRAnalyticsTracker.o
objc-class-ref in Zooplr.o
"_OBJC_CLASS_$_Reachability", referenced from:
objc-class-ref in Zooplr.o
"_OBJC_CLASS_$_SSKeychain", referenced from:
objc-class-ref in ZRAuthManager.o
"_OBJC_CLASS_$_SVProgressHUD", referenced from:
objc-class-ref in ZRAccountEditViewController.o
objc-class-ref in ZRAppDelegate.o
"_OBJC_CLASS_$_SocketIO", referenced from:
objc-class-ref in ZRChatSocketClient.o
"_OBJC_CLASS_$_TTTAttributedLabel", referenced from:
objc-class-ref in ZRBubbleViewTextMessage.o
"_kReachabilityChangedNotification", referenced from:
-[ZRAppDelegate application:didFinishLaunchingWithOptions:] in ZRAppDelegate.o
-[ZRChatSocketClient init] in ZRChatSocketClient.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any help or suggestion would be appreciated.
if the above answer didn't work for you, maybe the problem comes from when you installed the pods. Check if you had such message when running pod install
The ProjectName [Release] target overrides the OTHER_LDFLAGS build setting defined in `Pods/Target Support Files/ProjectName/Pods-ProjectName.release.xcconfig'. This can lead to problems with the CocoaPods installation
or a similar message but with debug instead of release (or both).
If so, delete the pod project in your workspace in Xcode, then follow the answer to this question The target ... overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Pods.xcconfig, I past it here :
This definitely works most of the time:
Go to your target Build Settings -> Other linker flags -> double click . Add $(inherited) to a new line.
And then run pod install again. It did it for me.
This means static libraries that you're using do not support x86_64 architecture,
So
Open "Build Settings" for "Pods" target, and add "x86_64" architecture (in "Architectures" and "Valid Architectures" section).
Set "Build Active Architectures Only" to "NO".
Clean "Pods" target.
Build your target.
Delete the .a files in /Users/YourName/Library/Developer/Xcode/DerivedData/YourProject/Build/Products/Debug-iphoneos. Then clean and build.This help me.
What worked for me is adding $(inherited) to:
OTHER_LDFLAGS
OTHER_CFLAGS
FRAMEWORK_SEARCH_PATHS
GCC_PREPROCESSOR_DEFINITIONS
Tip: Inside Build Settings -> (search bar) -> type options above and add $(inherited)
I had deleted the .a file, it won't worked for me, but when I Deleted the Project Folder in /Users/YourName/Library/Developer/Xcode/DerivedData/YourProject.
This help me.

Coreplot build failed issue in ios

I am facing the following issue while building the application with core plot library.
It was working before 2 days. But it suddenly stopped running.
libCorePlot-CocoaTouch.a (2 slices)
Undefined symbols for architecture x86_64:
"_CPTDecimalFromFloat", referenced from:
-[GraphView generateLayout] in GraphView.o
"_CPTDecimalFromInt", referenced from:
-[GraphView generateLayout] in GraphView.o
"_OBJC_CLASS_$_CPTAxisLabel", referenced from:
objc-class-ref in GraphView.o
"_OBJC_CLASS_$_CPTBarPlot", referenced from:
objc-class-ref in GraphView.o
"_OBJC_CLASS_$_CPTColor", referenced from:
objc-class-ref in GraphView.o
"_OBJC_CLASS_$_CPTConstraints", referenced from:
objc-class-ref in GraphView.o
"_OBJC_CLASS_$_CPTFill", referenced from:
objc-class-ref in GraphView.o
"_OBJC_CLASS_$_CPTGraphHostingView", referenced from:
_OBJC_CLASS_$_GraphView in GraphView.o
"_OBJC_CLASS_$_CPTMutableLineStyle", referenced from:
objc-class-ref in GraphView.o
"_OBJC_CLASS_$_CPTMutableTextStyle", referenced from:
objc-class-ref in GraphView.o
"_OBJC_CLASS_$_CPTPlotRange", referenced from:
objc-class-ref in GraphView.o
"_OBJC_CLASS_$_CPTXYGraph", referenced from:
objc-class-ref in GraphView.o
"_OBJC_METACLASS_$_CPTGraphHostingView", referenced from:
_OBJC_METACLASS_$_GraphView in GraphView.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Add new core plot library framework to your project. Remove the old library. These are the steps to follow
Download the core plot library.
open the xcode CorePlot-CocoaTouch.xcodeproj
Go to project and click on build
Now go to core plot framework folder in your mac. You can see build folder in that.
Now open the terminal and give your core plot path
cd CorePlot_1.4/Source/build/
Type lipo -create ./Debug-iphoneos/libCorePlot-CocoaTouch.a ./Debug-iphonesimulator/libCorePlot-CocoaTouch.a -output core_plot_all.a
New library created and now add this library and core headers to your project.
Now build your project.
After that add -ObjC to other linker flags

iOS Undefined symbols for architecture i386

When I'm try to compile my project I get error. I added all required frameworks - AVFoundation,opencv and many other , but it don't help me.Here is few lines from this error:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_AVCaptureDevice", referenced from:
objc-class-ref in MACaptureSession.o
"_OBJC_CLASS_$_AVCaptureDeviceInput", referenced from:
objc-class-ref in MACaptureSession.o
"_OBJC_CLASS_$_AVCaptureSession", referenced from:
objc-class-ref in MACaptureSession.o
"_OBJC_CLASS_$_AVCaptureStillImageOutput", referenced from:
objc-class-ref in MACaptureSession.o
"_OBJC_CLASS_$_AVCaptureVideoPreviewLayer", referenced from:
objc-class-ref in MACaptureSession.o
"_OBJC_CLASS_$_CABasicAnimation", referenced from:
objc-class-ref in MAImagePickerFinalViewController.o
"_OBJC_CLASS_$_CATransition", referenced from:
objc-class-ref in MAImagePickerControllerAdjustViewController.o
objc-class-ref in MAImagePickerController.o
"_OBJC_CLASS_$_MPVolumeView", referenced from:
objc-class-ref in MAImagePickerController.o
"_kCATransition", referenced from:
-[MAImagePickerControllerAdjustViewController confirmedImage] in MAImagePickerControllerAdjustViewController.o
Just add
CoreMedia.framework and with AVFoundation.framework to your project.
Got to.
Project -> target -> Build phases -> Link binary with library -> "+" -> select your frameworks
check wheter the
MACaptureSession
MAImagePickerFinalViewController
MAImagePickerControllerAdjustViewController
MAImagePickerController.m
have been added in target and check in respective m files,wheter implementation name is correct.
As suggested by Mani add required frameworks. If you have already added these frameworks and still getting error, set Build Active Architecture Only to NO under project 's Build Settings.

Resources