Error in compiling app with MoPub-Fabric iOS - ios

I am using MoPub kit using Fabric SDKs.
Everything works fine on all devices until you run the app on iPad simulator.
Running the app on iPad simulator gives following error while compiling the app:
Error
P.S. I am using XCode 7.3
Edit 1: I get following warnings also while running the app on simulators.
ld: warning: ignoring file /Users/Projects/Directory/Directory_iOS/PassKit.framework/PassKit.tbd, missing required architecture i386 in file /Users/Projects/Directory/Directory_iOS/PassKit.framework/PassKit.tbd
ld: warning: ignoring file /Users/Projects/Directory/Directory_iOS/MoPub.framework/MoPub, missing required architecture i386 in file /Users/Projects/Directory/Directory_iOS/MoPub.framework/MoPub (4 slices)
Only running the app on the iPad causes compilation errors iPhone simulators is not a problem with it.

Related

warning: URGENT: building for watchOS simulator but linking object file built for iOS

While integrating my java library converted by j2objc I'm receiving this message.
ld: warning: URGENT: building for watchOS simulator, but linking in
object file
(/Users/admin/Documents/j2objc/dist/lib/libjre_emul.a(IOSArray.o))
built for iOS. Note: This will be an error in the future.
I do not understand will my code work on real watchOS device? Or this is just a i386 build which works only in the simulator? What I have to do in this case?

Xcode 7.3 Simulator Undefined symbols for achitectures

I have a project that runs fine on Simulator when using for example iPhone 6s iOS 9.3 or lower. But when I try to build project on Simulator for example on iPhone 4s iOS 8.1 it does not build.
But weird thing is that I can archive the app, publish it to appstore or fabric and through this two services I can install it on iPhone 4s without any problems. So where is the catch that I am missing out?
In some cases (when I tried changing build settings the app was not able to build or archive at all, but it was able to build and run directly on iPhone 6s only).
I get the following error(s) (Simulator for iPhone 4s iOS 8.1):
Undefined symbols for architecture i386:
"_Check_Parity_Pitch", referenced from:
_tdav_codec_g729ab_decode in libtinyDAV.a(tdav_codec_g729.o)
...
...
...
ld: symbol(s) not found for architecutre i386
Linker command failed with exit code 1(use -v to see invocation)
Project settings:
I have tried adding and removing Valid Architectures but I got no luck building the app.
Quit your Xcode or simulator and run again. If again it creates problem, then Uninstall Xcode and Install again. Hope it works.

Linker error on the new xcode (ios 8.2 simulator) in cocos2d-x

I've recently updated xcode to the last version. So now my simulator have 8.2 ios version. My cocos2d-x projects are still working on devices (tested on ipad2 and iphone5s), but I can't compile them for simulator. I'm getting huge number of linker errors:
Undefined symbols for architecture x86_64:
"_AVAudioSessionCategoryAmbient", referenced from:
-[CDAudioManager setMode:] in libcocos2d iOS.a(CDAudioManager.o)
-[CDAudioManager applicationWillResignActive] in libcocos2d iOS.a(CDAudioManager.o)
...
few hundred lines more
...
ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed
with exit code 1 (use -v to see invocation)
Showing first 200 notices
only Showing first 200 errors only
Generally there are errors of all frameworks I use as well as cocos2d-x library itself. Before getting there most frameworks was highlighted red, but I fixed that making a symlink to:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
using this:
sudo ln -s iPhoneOS.sdk iPhoneOS8.1.sdk
I'm of course using cocos2d-x 3.4.
edit:
After migrating to v. 3.5, setting valid architectures to: armv7, armv7s, i386, x86_64, setting build active architecture only to no (in both main and cocos2d_libs project) with various settings variations now I'm getting:
Undefined symbols for architecture i386:
And other's the same. Doesn't work on any simulator. I even downloaded 8.1 simulators and it doesn't work there too. This is some stupid linker error and I can't figure it out.
I've also noticed that fresh project builds fine. In my project I also have few objC classes (for other stuff like admob), which are using ARC. So I had to add "-fobjc-arc" in few places in build phases->compile sources. Problem is it's only simulator-related problem and appeared when I've updated ios sdk from 8.1 to 8.2.
Regards

Xcode 6 Error - "Missing Required Architecture i386" When Building for iOS Simulator

I have created a custom Objective-C framework. I would like to import it into any given iOS project and use its provided functionality on both the iOS Simulator and an actual device. To import the framework, I link it using the Build Phases > Link Binary With Libraries setting in the app's target. I'm then able to import it into one of my classes with this statement:
#import <CustomFramework/CustomFramework.h>
I can instantiate my framework's classes just fine, but when I try to run my project on a device, I get the following error message:
dyld: Library not loaded: #rpath/CustomFramework.framework/CustomFramework
Referenced from: /var/mobile/Applications/A61E882D-481A-4C0B-B4FD-69F5D24968BF/TestApp.app/TestApp
Reason: image not found
And if I try to run it on the simulator, I get a different error message:
ld: warning: ignoring file /Users/user/Desktop/CustomFramework.framework/CustomFramework, missing required architecture i386 in file /Users/user/Desktop/CustomFramework.framework/CustomFramework (2 slices)
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CustomFramework", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This occurs when I instantiate a class from the framework. If I import the framework but don't actually use it, my app builds successfully. It just errors whenever I instantiate a class from the framework for some reason.
To get the app to build on a device, I followed this SO answer. Instead of linking the framework, I added a new Copy Files phase in the target's Build Phases setting, set the Destination to Framework, and added my framework.
That works great; however, I'd like to test my app on the iOS Simulator as well. When I try to run my app on the simulator, I still get the "missing required architecture i386" error. I've tried the solutions proposed at just about every related SO topic I could find, and nothing has helped me resolve this issue.
Please note that I am trying to use my custom framework in a new Xcode project, so none of the app/build settings have been changed from their defaults.
How can I fix this error so that I can run my app on both the iOS Simulator and a device with my framework included in the project? Any insight would be greatly appreciated!
The issue was that the framework was not compiled for the iOS Simulator's architecture, which is i386. Xcode only compiles a framework for the target architecture, so if I built the framework for the iOS Simulator, it wouldn't work on a device, and if I built the framework for a device, it wouldn't work on the iOS Simulator.
I created my framework from scratch with help from this tutorial: http://www.raywenderlich.com/65964/create-a-framework-for-ios
The multi-architecture build script is what allowed my framework to run on both the iOS Simulator and a device.
I encountered this same problem with Xcode 7.1 when trying to build for the simulator.
Someone else said it worked for them under Xcode 8.2.1, so I tried building/running there and it worked. I didn't have to change targets or anything in my project.
So try upgrading your Xcode if you can, you will presumably get additional bug fixes as well.

iOS Simulators are not working in Xcode 6.1.1?

Iam able to run my project in iPad and iphone but when i tried to run it in iPad simulators
but then i got this error .
ld: building for iOS Simulator, but linking against dylib built for MacOSX file '/Users/apple/Documents/releaseAPICON2015/SenTestingKit.framework/SenTestingKit' for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
please check this link for screenshot
Error
Please tell me how to get back all simulators in xcode 6.1.1
You are trying to link SenTestingKit.framework in you iOS project. You cannot use OS X binaries in iOS Simulator apps as they are not compatible.
On older versions of iOS, you would encounter runtime errors (incorrect values or crashes). On iOS 8.0, this became a link-time error.
You need to build a version of SenTestingKit.framework for iOS. Hope this helps.. :)

Resources