OpenIAB Xcode Build Error - xcode

I'm using Simple IAP and OpenIAB system.
I have no problem Android system but i tried Xcode for IOS I have an error.
I added StoreKit framework.
"_Inventory_removePurchase", referenced from:
RegisterMonoModules() in RegisterMonoModules.o
"_Inventory_query", referenced from:
RegisterMonoModules() in RegisterMonoModules.o
"_AppStore_requestProducts", referenced from:
RegisterMonoModules() in RegisterMonoModules.o
"_Inventory_hasPurchase", referenced from:
RegisterMonoModules() in RegisterMonoModules.o
"_AppStore_startPurchase", referenced from:
RegisterMonoModules() in RegisterMonoModules.o
"_AppStore_restorePurchases", referenced from:
RegisterMonoModules() in RegisterMonoModules.o
http://i.stack.imgur.com/v0Uik.png
How can I fix this? Thanks.

Ensure you have added the following files to your project:
AppStoreBridge.mm, AppStoreDelegate.h,
AppStoreDelegate.mm
Without these files present, you will encounter the above framework errors when trying to build.

Related

Undefined symbols for architecture arm64: | Firebase/Unity/Xcode

I've built an app in Unity and have installed the Firebase SDK for authentication, analytics, and the database. The build process works just fine in Unity. No errors at all. However, when I open up the project in Xcode and try to archive it, I get these errors:
ld: warning: arm64 function not 4-byte aligned: _unwind_tester from /Users/michael/Desktop/Reserve1/Libraries/libiPhone-lib.a(unwind_test_arm64.o)
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_FIRApp", referenced from:
objc-class-ref in libFirebaseCppApp.a(app_ios.mm.o)
"_OBJC_CLASS_$_FIRTransactionResult", referenced from:
objc-class-ref in libFirebaseCppDatabase.a(database_reference_ios.mm.o)
"_OBJC_CLASS_$_FIRTransactionResult", referenced from:
objc-class-ref in libFirebaseCppDatabase.a(database_reference_ios.mm.o)
"_OBJC_CLASS_$_FIRDatabase", referenced from:
objc-class-ref in libFirebaseCppDatabase.a(database_ios.mm.o)
"_OBJC_CLASS_$_FIRGameCenterAuthProvider", referenced from:
objc-class-ref in libFirebaseCppAuth.a(credential_ios.mm.o)
"_OBJC_CLASS_$_FIRGoogleAuthProvider", referenced from:
objc-class-ref in libFirebaseCppAuth.a(credential_ios.mm.o)
"_OBJC_CLASS_$_FIRPhoneAuthProvider", referenced from:
objc-class-ref in libFirebaseCppAuth.a(credential_ios.mm.o)
"_OBJC_CLASS_$_FIRPhoneAuthCredential", referenced from:
objc-class-ref in libFirebaseCppAuth.a(user_ios.mm.o)
"_OBJC_CLASS_$_FIROptions", referenced from:
objc-class-ref in libFirebaseCppApp.a(app_ios.mm.o)
"_OBJC_CLASS_$_FIROAuthProvider", referenced from:
objc-class-ref in libFirebaseCppAuth.a(credential_ios.mm.o)
"_OBJC_CLASS_$_FIRConfiguration", referenced from:
objc-class-ref in libFirebaseCppApp.a(app_ios.mm.o)
"_OBJC_CLASS_$_FIRFacebookAuthProvider", referenced from:
objc-class-ref in libFirebaseCppAuth.a(credential_ios.mm.o)
"_OBJC_CLASS_$_FIRDatabaseReference", referenced from:
objc-class-ref in libFirebaseCppDatabase.a(database_reference_ios.mm.o)
"_OBJC_CLASS_$_FIREmailAuthProvider", referenced from:
objc-class-ref in libFirebaseCppAuth.a(credential_ios.mm.o)
"_OBJC_CLASS_$_FIRGitHubAuthProvider", referenced from:
objc-class-ref in libFirebaseCppAuth.a(credential_ios.mm.o)
"_OBJC_CLASS_$_FIRTwitterAuthProvider", referenced from:
objc-class-ref in libFirebaseCppAuth.a(credential_ios.mm.o)
"_OBJC_CLASS_$_FIRAuth", referenced from:
objc-class-ref in libFirebaseCppAuth.a(auth_ios.mm.o)
"_FIRAuthErrorUserInfoUpdatedCredentialKey", referenced from:
firebase::auth::SignInResultCallback(FIRAuthDataResult*, NSError*, firebase::SafeFutureHandle<firebase::auth::SignInResult>, firebase::auth::AuthData*) in libFirebaseCppAuth.a(auth_ios.mm.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've tried almost everything, including:
Cocoapod install/delete/reinstall
IOS Resolver settings changes
SDK Reinstalls on both Unity and Xcode
Editing Pod File in multiple ways
Following every article instructions I came across
I'm using Unity version 2020.3.36f1 and Xcode version 13.4.1
Yet after following solutions on multiple websites including this one for hours, nothing seems to work. I know there's a way. I just can't seem to figure it out.
Please help .
After over 10 hours of research and trial and error I've found the solution. This is probably going to answer hundreds of questions I've seen all over the place that have not been answered. Here we go:
On Mac the issue for me was the Cocoapods failing when trying to Build and Run. Which created all of the errors in Xcode.
Step By Step:
Open your Xcode project. (Leave open the entire time)
Locate your Xcode project folder in Finder.
Right click on the folder and select "New Terminal at Folder"
If you have an M1 chip type "sudo arch -x86_64 gem install ffi" then "arch -x86_64 pod install" Other wise for Intel "pod install".
You should now see a bunch of green! All of the gems for the framework should be installed.
You will then have a workspace project in your build folder from unity and you can fully build your project in Xcode without it failing.
Hope this helps!

Build Failure for iOS on Unity/Xcode

I'm currently trying to set up a Unity project that's set up for VR into AR for iOS. I'm using the AR Foundation plugin + ARKit/ARCore plugins. Trying to build it and run on my iPhone using Xcode and I'm getting these errors.
Tried changing a bunch of player settings.
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_AREnvironmentProbeAnchor", referenced from:
objc-class-ref in UnityARKit.a(ARKitXREnvironmentProbeProvider.o)
"_OBJC_CLASS_$_ARCollaborationData", referenced from:
objc-class-ref in UnityARKit.a(ARKitXRSessionProvider.o)
"___isPlatformVersionAtLeast", referenced from:
_UnityARKit_Camera_AcquireConfigurations in UnityARKit.a(ARKitXRCameraProvider.o)
_UnityARKit_Camera_TryGetCurrentConfiguration in UnityARKit.a(ARKitXRCameraProvider.o)
_UnityARKit_Camera_TrySetCurrentConfiguration in UnityARKit.a(ARKitXRCameraProvider.o)
(anonymous namespace)::ARKitXRCameraProvider::ResetLocalConfigurationState() in UnityARKit.a(ARKitXRCameraProvider.o)
(anonymous namespace)::ARKitXRCameraProvider::HandleARKitEvent(UnityARKitEvent, void*, int) in UnityARKit.a(ARKitXRCameraProvider.o)
_UnityARKit_EnvironmentProbeProvider_Construct in UnityARKit.a(ARKitXREnvironmentProbeWrapper.o)
_UnityARKit_EnvironmentProbeProvider_Destruct in UnityARKit.a(ARKitXREnvironmentProbeWrapper.o)
...
"_OBJC_CLASS_$_ARBodyAnchor", referenced from:
objc-class-ref in UnityARKit.a(ARKitXRHumanBodyProvider.o)
"_OBJC_CLASS_$_ARImageTrackingConfiguration", referenced from:
objc-class-ref in UnityARKit.a(ARKitXRImageTrackingProvider.o)
"_OBJC_CLASS_$_ARBodyTrackingConfiguration", referenced from:
objc-class-ref in UnityARKit.a(ARKitXRHumanBodyProvider.o)
"_OBJC_CLASS_$_ARImageAnchor", referenced from:
objc-class-ref in UnityARKit.a(ARKitXRImageTrackingProvider.o)
"_OBJC_CLASS_$_ARSkeletonDefinition", referenced from:
objc-class-ref in UnityARKit.a(ARKitXRHumanBodyProvider.o)
"_OBJC_CLASS_$_ARObjectAnchor", referenced from:
objc-class-ref in UnityARKit.a(ARKitXRObjectTrackingProvider.o)
"_OBJC_CLASS_$_ARReferenceImage", referenced from:
objc-class-ref in UnityARKit.a(ARKitXRImageTrackingProvider.o)
"_OBJC_CLASS_$_ARMatteGenerator", referenced from:
objc-class-ref in UnityARKit.a(ARKitXRHumanBodyProvider.o)
"_OBJC_CLASS_$_ARReferenceObject", referenced from:
objc-class-ref in UnityARKit.a(ARKitXRObjectTrackingProvider.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
If you are using the latest Unity ARKit package, it requires XCode 11 and iOS 13 because they are supporting ARKit 3. I had similar issues and getting the beta for XCode and iOS got it running.
I solved this problem in my project. (Thanks #saif for the Unity forum link)
The culprit was a wrong ARkit XR Plugin version in Unity, which tries to use features from a later AR Kit version in Xcode thus giving those errors related here.
I manage to get working within my setup (for those in 2018.4.x)
Unity 2018.4.5f1
AR Foundation 1.5.0-preview.6
AR Subsystems 2.2.0-preview.3
ARKit XR Plugin 2.1.1 (update from 2.1.0-preview.5)
XCode 10.3 (building to an iOS 12.4 device)
If you are running Unity 2019.x with AR Foundation 2.x you probably want to find the correct ARKit XR Plugin as indicated here in the AR Foundation samples on Github

Linker errors in GoogleMobileVision when using Firebase ML Kit on iOS without cocapods

I am trying to add the MLVisionTextModel of Firebase 5.0.1 into an Xcode project without cocoapods. I have added all the dependent frameworks as stated in the Readme.md file. Getting the following linker errors:
Showing All Messages
"_OBJC_CLASS_$_LAContext", referenced from:
objc-class-ref in GoogleMobileVision(MDMPasscodeCache_f189776e75765630b82721fafea64052.o)
"_vImageConverter_CreateWithCGImageFormat", referenced from:
+[GMVUtility(Internal) sampleBuffer32BGRATo32RGBA:] in GoogleMobileVision(GMVUtility+Internal_1a3089c1f18dbb4046735909972b8cb2.o)
"_vImageConvert_AnyToAny", referenced from:
+[GMVUtility(Internal) sampleBuffer32BGRATo32RGBA:] in GoogleMobileVision(GMVUtility+Internal_1a3089c1f18dbb4046735909972b8cb2.o)
"_vImageConverter_Release", referenced from:
+[GMVUtility(Internal) sampleBuffer32BGRATo32RGBA:] in GoogleMobileVision(GMVUtility+Internal_1a3089c1f18dbb4046735909972b8cb2.o)
"_vImageBuffer_InitWithCGImage", referenced from:
+[GMVUtility(Internal) rgbaPixelDataFromCGImage:] in GoogleMobileVision(GMVUtility+Internal_1a3089c1f18dbb4046735909972b8cb2.o)
"_vImageRotate_ARGB8888", referenced from:
+[GMVUtility(Internal) rotatePixelData:width:height:bytesPerRow:withAngle:] in GoogleMobileVision(GMVUtility+Internal_1a3089c1f18dbb4046735909972b8cb2.o)
"_vImageHorizontalReflect_ARGB8888", referenced from:
+[GMVUtility(Internal) flipRGBA8888Horizontally:width:height:bytesPerRow:] in GoogleMobileVision(GMVUtility+Internal_1a3089c1f18dbb4046735909972b8cb2.o)
"_vImagePermuteChannels_ARGB8888", referenced from:
+[GMVUtility(Internal) permutate:width:height:bytesPerRow:order:] in GoogleMobileVision(GMVUtility+Internal_1a3089c1f18dbb4046735909972b8cb2.o)
"_vImageFlatten_RGBA8888ToRGB888", referenced from:
+[GMVUtility(Internal) flattenRGBA8888ToRGB888:width:height:bytesPerRow:] in GoogleMobileVision(GMVUtility+Internal_1a3089c1f18dbb4046735909972b8cb2.o)
ld: symbol(s) not found for architecture x86_64
Any help is appreciated.
The issue got resolved after adding Accelerate.framework as part of the build phases in Xcode.
Firebase frameworks are built statically, so if you are adding them manually to your project they should not be under embedded binaries in xcode under your application target. If you have it there removing it should fix the issue.

Undefined Symbol for architecture i386 armv7, armv7s MedioEvent k-invite sdk

I have tried removig the following error by following many solutions here and on other forums.
Undefined symbols for architecture armv7:
"_kABPersonPhoneProperty", referenced from:
+[InviteHelpers findPhoneNumbersForContact:] in libMedioEvent.a(InviteHelpers.o)
"_ABPersonCopyArrayOfAllLinkedPeople", referenced from:
_CopyValuesFromLinkedContact in libMedioEvent.a(InviteHelpers.o)
"_ABMultiValueCopyLabelAtIndex", referenced from:
_CopyValuesFromLinkedContact in libMedioEvent.a(InviteHelpers.o)
"_ABMultiValueAddValueAndLabel", referenced from:
_CopyValuesFromLinkedContact in libMedioEvent.a(InviteHelpers.o)
"_ABMultiValueCopyValueAtIndex", referenced from:
+[InviteHelpers findEmailsForContact:] in libMedioEvent.a(InviteHelpers.o)
+[InviteHelpers findPhoneNumbersForContact:] in libMedioEvent.a(InviteHelpers.o)
_CopyValuesFromLinkedContact in libMedioEvent.a(InviteHelpers.o)
+[InviteHelpers findContactTwitter:] in libMedioEvent.a(InviteHelpers.o)
I have already included the MedioEvent SDK and its precompiled source in the project, and also included it in Framework and Library search paths. What bothers me is that it is coming from inside libMedioEvent.o.
Do I have to include "InviteHelpers" sdk as well?

Linking to libiconv

I've created a clean build of libmariadbclient and integrated it into my project. Whenever I try to build said project I fail with an error:
Undefined symbols for architecture x86_64:
"_libiconv", referenced from:
_mariadb_convert_string in libmariadbclient.a(my_charset.c.o)
"_libiconv_close", referenced from:
_mariadb_convert_string in libmariadbclient.a(my_charset.c.o)
"_libiconv_open", referenced from:
_mariadb_convert_string in libmariadbclient.a(my_charset.c.o)
ld: symbol(s) not found for architecture x86_64
I then add libiconvlib.dylid to my project, cleaned it and tried to build again, but I still get the same error. Any ideas?
I filed a bug report with the developers and the issue was promptly fixed.

Resources