Can't compile Aviary on iOS since SDK 4.4 - ios

I can't run my app only on the iOS Simulator since I updated to Aviary SDK 4.4.
I can run the app on my iPhone and iPad.
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: 30 duplicate symbols for architecture x86_64
The framework and the bundle are visible in "Link binaries with Libraries" and "Bundle ressources".
The Framework search path is OK in build settings.
It looks like the Aviary framework was managed twice ?
I leave/restart Xcode, clean the app in iOS simulator, clean target and destroy DerivedData without success.
Very strange I have no problems in the real devices.

I got this problem resolved. Here is how:
Solution
Do not use #import <AviarySDK/AviarySDK.h>, instead of that, import the classes that you're using directly. Like: #import <AviarySDK/AVYPhotoEditorController.h> etc.
Reason
The reason I believe lies in the newly introduced AVYPhotoEditorCompatibility.h, which is by default included in <AviarySDK/AviarySDK.h>.
I think here is the problematic code that is using typedef with const
typedef AVYPhotoEditorPremiumAddOn AFPhotoEditorPremiumAddOn AVY_PREMIUM_ADDON_NAMESPACE_DEPRECATED_ATTRIBUTE;
AVY_PREMIUM_ADDON_NAMESPACE_DEPRECATED_ATTRIBUTE AFPhotoEditorPremiumAddOn const AFPhotoEditorPremiumAddOnNone = AVYPhotoEditorPremiumAddOnNone;
AVY_PREMIUM_ADDON_NAMESPACE_DEPRECATED_ATTRIBUTE AFPhotoEditorPremiumAddOn const AFPhotoEditorPremiumAddOnHiRes = AVYPhotoEditorPremiumAddOnHiRes;
AVY_PREMIUM_ADDON_NAMESPACE_DEPRECATED_ATTRIBUTE AFPhotoEditorPremiumAddOn const AFPhotoEditorPremiumAddOnWhiteLabel = AVYPhotoEditorPremiumAddOnWhiteLabel;

Related

Integrate AppLovin With swift xcode 6.4

I want to integrate AppLovin With Xcode 6.4 and swift. I am Following the steps which are given in Documentation. I have added Headers and libAppLovinSdk.a Library in my project. Then I have added all the frameworks which are needed and added AppLovin SDK key into info.plist file. Then I have initialized ALSdk.initializeSdk() in Appdelegate.h file and I have added Bridging file in my project. Then I wrote -Objc in "Other Linker Flags"
I am getting this error
ld: 150 duplicate symbols for architecture i386 clang: error: linker
command failed with exit code 1 (use -v to see invocation)
EDIT:
This is the error log.
Based on the linker errors (duplicate symbol _llvm.embedded.module) as well as the fact that you're using an older Xcode version, it may likely be a conflict/mismatch between the target/compiler of your project and the dependency. This isn't inherent to AppLovin, but can happen if the static library you're using is far too new or old for your Xcode version.
One possible occurrence of this is that we started compiling the library with Bitcode support, and I wouldn't be surprised if older versions of LLVM don't play nice with that.
I'd recommend pulling the latest version of libAppLovinSdk.a, and if at all possible, building using Xcode 7+.
Additionally, if you're using some dependency manager like Cocoapods or Carthage, you may have better luck directly (manually) integrating, given that they are maintained by third parties with no involvement from us.
You are initializing SDK at wrong place. At the time of didFinishLaunchingWithOptions: call, application has not been fully prepared. Try initializing it in method:
-(void)applicationDidBecomeActive:(UIApplication *)application
Also include -ObjC flag. It should solve duplicate symbols issue.

build error on iOS 7.1 - Zxing

Updated to XCODE 5.1/IOS 7.1 and tried to build my project which included Zxing library.
Getting the following error:
/Zxing/cpp/core/src/zxing/ChecksumException.h:3:9: '__CHECKSUM_EXCEPTION_H__' is used as a header guard here, followed by #define of a different macro
Error is occurring for the following code,
#ifndef __CHECKSUM_EXCEPTION_H__ //this line causes the error.
#define __NOT_FOUND_EXCEPTION_H__
.....
.....
#endif // __CHECKSUM_EXCEPTION_H__
Everything was perfect before the xcode 5.1 update.
I suspect recent migration of IOS 7.1 to support 64-bit architecture causes this error but i'm not sure.
I tried to remove 64-bit support from the Zxing library using this link but still it's not working.
Any help or suggestion would be greatly appreciated.
Looks like there are some underground compiler settings changes in XCode 5.1.
So to fix this issue you need add -w flag to ZXingWidget Other Warning Flags.
This flag completely disable all compiler warnings.
Select ZXingWidget framework.
Select ZXingWidget target in ZXingWidget framework.
Press Build setting tab and type "other wa" in search.
Add -w parameter flag to Other Warning Flags.
Here is a screen with steps how to add this flag:

Upgrading Google Mobile Ads iOS SDK from 5.0.5 to 6.4.2 results in linker errors

I have an existing iOS app that is using Google Mobile Ads SDK (v 5.0.5, I believe). I need to upgrade it to the latest version for DoubleClick support. However, I'm getting linker errors.
My steps were as follows:
Remove file references for previous SDK from project
Remove previous libGoogleAdMobAds.a linked library
Follow the setup instructions (to the letter, including the required frameworks, including only the specific files, as well as adding the Other Linker Flag)
The specific error is:
Undefined symbols for architecture i386:
"_CGSizeFromGADAdSize", referenced from
or
"_kGADAdSizeBanner", referenced from
What else am I missing?
Maybe you need the -all_load linker flag option too? According to this article it's obsolete for newer ARM7 targets, but perhaps you have an old target?
http://vntin.com/feeds.feedburner.com/blogspot/LTiVe
See under this section: "Support for armv7s"
"If you’re targeting the armv7s architecture, you will not need to add the -all_load linker flag to your projects anymore. "
[Update]
You can try to verify what's in the lib*.a file by using the nm command.
nm -U libGoogleAdMobAds.a | grep kGADAdSizeBanner
Also, clicking on the Log Navigator may provide some additional information. Select the last icon then your last build in the left nav.
[Update 2]
Someone on this site also complained about a linker problem with the new API. Might have to make small changes to your code.
http://www.monkeycoder.co.nz/Community/posts.php?topic=1246
Something has changed in the latest AdMob SDK. I get the same linker error. I can use an older version of the SDK and this all works fine. Anyone know what could have changed with Ad sizes?
EDIT: Found the problem. There were some name changes to constants :)
https://developers.google.com/mobile-ads-sdk/docs/ios/intermediate
Change the GAD_ ad sizes with:
kGADAdSizeBanner.size.width and kGADAdSizeBanner.size.height

iOS conditional link static library

I have a fat static library compiled for armv7 and i386. In my iPhone/iPad project everything works fine, but i can only install my application on armv7 device so iPhone 3gs and up...
There is a way to run my project on armv6 so i can install it on an ipod touch and an old iphone version (also if i disable the use of armv7 library).
I try this:
#ifdef _ARM_ARCH_7
... //include and use of armv7 library
#else
... //not include armv7 library
#endif
but when i compile my project i have link error...
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang++ failed with exit code 1
So there is a way to run my app on all kind of device but link a specific library when compiling for armv7???
Thanks for help!
You need to weak-link that library. Open up build settings and find Other Linker Flags. You need to add two entries, the first is "-weak_library", the second is the path of the library file (you may need to hunt through what's being passed to the linker to find what this is).
They need to be in that order as this list is turned into parameters to the linker in the order they're presented.

How to link an Adobe AIR3 Native Extension for iOS against an iOS framework?

I’m working on an app with an AIR3 iOS native extension that uses Accelerate.framework
Followed the first steps mentioned in the tutorials, successfully created an .ane file etc.
When I run the final packaging command (adt -package -target ipa-test ...), I get the following errors:
ld warning: unexpected srelocation type 9
ld warning: unexpected srelocation type 9
... (repeating several times)
Undefined symbols:
"_vDSP_vsdiv", referenced from: ...
"_vDSP_vsmul", referenced from: ...
... several more like this
ld: symbol(s) not found
Compilation failed while executing : ld64
I guess this is because when I created the .a file in xcode, it couldn’t really link it statically to the Accelerate.framework.
I suppose I need to tell adt to link it somehow? Probably in the phase I’m creating the .ane file? Or maybe I should change my extension.xml file?
No idea. Couldn’t really find it...
Please advise.
UPDATE: This seems like a bug on the Adobe side specifically with Accelerate.framework. I'll keep updating here in case other guys stumble upon this one.
Make sure you are using the latest Flex 4.6 SDK. If that doesn't solve it, ensure you have specified the Apple iOS SDK correctly under the Native Extensions tab of your Apple iOS build packaging in your project settings. It should be
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk
if you installed Xcode into the default folder
I've had this "srelocation" error, because the included libraries (in my case AudioToolBox/ OpenAL) were treated as shared libraries by XCode: They were not included in my library build (even when it's static). I've had to set "Enable Linking With Shared Libraries" under Build Settings to NO, and then the errors have been gone. Maybe this will solve your problem too...

Resources