ANE Packaging with IOS11 - ios

i have devloped an ANE that connects to a bluetooth printer in order to print ,this ane was working perfectly until IOS 11 has been publish
now what i see in the log is that the printer connects but cant print
i updated the xCode to support ios 11 and updates the air to 27 and compiled the new ane and the swc also compiled in air 27
now when i try to publish the app i got this msg "
Error occurred while packaging the application:
Error: META-INF/ANE/iPhone-ARM/libCoreMobileAPI.a,
META-INF/ANE/iPhone-ARM/libZebraChecker.a are required to have
universal iOS libraries. Please contact the ANE developer(s) to get
the same."
This ANE works only for IOS
iam sure that i have chosen universal iOS when i build the .a file
anyone has solution or can give me hints what to do
thanks
Descriptor XML
<?xml version="1.0" encoding="UTF-8"?>
<extension xmlns="http://ns.adobe.com/air/extension/27.0">
<id>BlCheck.ZebraAneBLCheck</id>
<versionNumber>1.0.0</versionNumber>
<platforms>
<platform name="iPhone-ARM">
<applicationDeployment>
<nativeLibrary>libZebraChecker.a</nativeLibrary>
<initializer>cubecomDoitflashZebraPrinterExtensionInitializer</initializer>
<finalizer>cubecomDoitflashZebraPrinterExtensionFinalizer</finalizer>
</applicationDeployment>
</platform>
<platform name="default">
<applicationDeployment/>
</platform>
</platforms>
</extension>

In Architectures settings of your target make sure you have your settings as below. Important parts are the "Valid Architectures" and the "Build Active Architecture Only" settings.
If that doesn't work make sure that you are using the correct .a file. You can run the following command on the .a file:
file libZebraChecker.a
It should output something like the following if it is a universal binary:
libZebraChecker.a: Mach-O universal binary with 2 architectures: [arm_v7: current ar archive] [arm64: current ar archive]
libZebraChecker.a (for architecture armv7): current ar archive
libZebraChecker.a (for architecture arm64): current ar archive

Related

Unity iOS build containing Admob causes error in Xcode

My project uses Admob to display ads. It works on Android but not on iOS. Build with Xcode is successful. When running the app in Xcode on simulator, I get the following runtime error:
Symbol not found: OBJC_CLASS$_GADInterstitialAd
Used the latest versions of:
external-dependency-manager-1.2.175.unitypackage
GoogleMobileAds-v7.4.0.unitypackage
Unity 2021.3.18f1
Xcode Version 12.4 (12D4e)
Contents of Assets/ExternalDependencyManager/Editor/1.2.175/AdMob_Dependencies.xml include iOS configuration:
<!-- iOS Cocoapod dependencies can be specified by each iosPod element. -->
<iosPods>
<iosPod name="Google-Mobile-Ads-SDK" version="~> 7.4" bitcodeEnabled="true"
minTargetSdk="14.0" addToAllTargets="false" />
<!-- Set of source URIs to search for this Cocoapod spec.
By default Cocoapods will attempt to fetch the pod specs from:
* $HOME/.cocoapods/repos
* https://github.com/CocoaPods/Specs
-->
<sources>
<source>https://github.com/CocoaPods/Specs</source>
</sources>
</iosPods>
I tried all versions of GoogleMobileAds from v7.0 to v7.4 unsuccessfully.

Grpc.Core.Xamarin giving object file was built for newer iOS Simulator version (9.0) than being linked (8.0)

I am trying to build a gRPC client for mobile using Xamarin.Forms and Grpc.Core and Grpc.Core.Xamarin. Everything is currently working for Android, however my iOS project will not build. I get a little over 100 errors (and 1000 warnings) stating "warning: object file (C:/Users/Matt/.nuget/packages/grpc.core.xamarin/2.41.1/build/Xamarin.iOS10/../../native/ios/universal/libgrpc.a(server_address.o)) was built for newer iOS Simulator version (9.0) than being linked (8.0)"
Now the iOS .csproj file does indeed show the version of my simulator is 8
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{AA8D5164-21F8-4A44-96F9-A8D3E0021486}</ProjectGuid>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TemplateGuid>{89a4fe7c-635d-49c9-8d8c-5cd363c0d68d}</TemplateGuid>
<OutputType>Exe</OutputType>
<RootNamespace>myProject.iOS</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>myProject.iOS</AssemblyName>
<MtouchEnableSGenConc>true</MtouchEnableSGenConc>
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
<ProvisioningType>manual</ProvisioningType>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
As you can see above the version is 8.0.30703. I cannot however seem to find any information on how to update my simulator to version 9.0.
Any and all help is appreciated, I'm sure I'm just missing something simple.
As Cahyo mentioned, the solution was in my info.plist file. Just needed to change my deployment target from 8.0 to 9.0 or above.

Cordova / Wikitude - ERROR: Plugin 'WikitudePlugin' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml

I'm using wikitude and cordova plugin for my augmented reality iOS mobile app project in xcode5. I got this error when try to execute WikitudePlugin.loadARchitectWorld(successCallback, errorCallback, "path/to/your/world"); command.
2014-01-29 11:23:22.152 Bii[5441:60b] ERROR: Plugin 'WikitudePlugin' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
2014-01-29 11:23:22.154 Bii[5441:60b] -[CDVCommandQueue executePending] [Line 117] FAILED pluginJSON = [
"WikitudePlugin308741238",
"WikitudePlugin",
"open",
[
"ENTER-YOUR-KEY-HERE",
null
]
]
I already add WTWikitudePlugin h/m into my project. This is my config.xml
<feature name="WTWikitudePlugin">
<param name="ios-package" value="WTWikitudePlugin"/>
</feature>
Why?
I would make sure your Wikitude plugin header and source files are in the Plugins folder in your Xcode project. I would then verify what the interface name of this plugin is.
<feature name="WTWikitudePlugin">
<param name="ios-package" value="WTWikitudePlugin"/>
</feature>
Particulary, you want to pair up the value in the <feature> tag to the interface name in your header/source file. This is how config.xml links the plugins. The JavaScript file will call the plugin using the "name" property - so this is how Cordova links the JavaScript to the config.xml, to the native library.
Seems to me that you're using a old version of PhoneGap. The current release (PhoneGap 3.3) uses Plugman to manage plugin installation.
Using Plugman, the feature name is WikitudePlugin.
So try to use WikitudePlugin instead of WTWikitudePlugin.
In my case, i removed and re-added wikitude plugin. In result it broke references in xcode project then starts showing this error.
I had to add all the frameworks and compile source files manually.
To do that go to Build Phases
Drag missing .m files in Plugins (possibly WTWikitudePlugin.m and WTARViewController.m) directory to 'Compile Sources' section
Drag all files in Frameworks to 'Link Binary With Libraries' section

An implementation for native extension 'file' required by the application was not found for the target platform

I'm trying to make my first ANE for iOS and I found a problem trying to compile the .IPA file.
The error I get is:
An implementation for native extension 'XXX' required by the application was not found for the target platform.
where, 'XXX' is the package for my ANE.
Well, I used Flash Build 4.6 with AIR 3.2 SDK to compile a SWC file with all functions I need.
I used XCode to compile a .A file with all Objective-C code needed.
Both files compiled fine.
Than I used ADT to compile the .ANE file. It also worked fine.
My extension.xml file seems ok:
<extension xmlns="http://ns.adobe.com/air/extension/3.1">
<id>XXX</id>
<versionNumber>1.0.0</versionNumber>
<name>ANE_NAME</name>
<platforms>
<platform name="iPhone-ARM">
<applicationDeployment>
<nativeLibrary>libExtension.a</nativeLibrary>
<initializer>ExtensionInitializer</initializer>
<finalizer>ExtensionFinalizer</finalizer>
</applicationDeployment>
</platform>
<platform name="default">
<applicationDeployment/>
</platform>
</platforms>
</extension>
Again, XXX is my extension's package. (like: com.example.myANE)
I'm also using a platform.xml file:
<?xml version="1.0" encoding="utf-8" ?>
<platform xmlns="http://ns.adobe.com/air/extension/3.1">
<sdkVersion>5.1</sdkVersion>
<linkerOptions>
<option>-ios_version_min 4.2</option>
</linkerOptions>
</platform>
And using the following code to compile the ANE:
adt -package -target ane MyANE.ANE extension.xml -swc MyANE.swc -platform iPhone-ARM -platformoptions platform.xml library.swf libExtension.a -platform default library.swf
It all works great and I have an ANE file.
Well, the project I'm working on already have 4 other ANE's so I don't think something is wrong with the flash part. But when I use ADT to compile an IPA, I get the error.
Anyone have an insight that could help?
You code to compile the ANE doesn't include the signing options.
My script to compile is similar than yours but it includes the following arguments:
-storetype pkcs12 -keystore mac.p12
Do not use a windows generated .p12 file if you are compiling on Mac. (The opposite is also true)
If it was that, you should be able to see errors on you iOS device's logs (something about not signed ANE that can't be loaded)
Also, remember to extract library.swf each time you compile your .swc project. Then you should clean your mobile project to include the new ANE.
Your ANE looks fine and if you're getting the ANE at the end I'd say you're doing that part correctly.
Most likely you're missing the -extdir option from when you're actually compiling your application.
adt -package
-target ipa-ad-hoc
-storetype pkcs12 -keystore YOUR_CERT.p12
-provisioning-profile YOUR_PROVISIONING_PROFILE.mobileprofile
myApp.ipa
myApp-app.xml
myApp.swf icons Default.png
-extdir extensionsDir
Or in FlashBuilder you've forgotten to package the extension with your application build, in settings under "Build Packaging". Take a look here for more information: http://distriqt.com/post/815

Cannot find lib when packaging for iOS

for numbers in (), see links at the end
I am developping an Air Native Extension (ANE) in order to be able to use the burstly ads on mobile devices.
As for my setup, I am using the FlashDevelop 4.0.4 and Adobe Air 3.3. I'm using Flex 4.6.0 SDK. The project is setup on Windows7.
In order to work on iOS devices, Burstly requires a number of frameworks and librares
I managed to write and compile the .a library for iOS. I also have the interface (actionscript code) that will be shared for Android and iOS compiled into a swc and a librairy.swf. All of this is successfully packaged into a .ane which is included in my project.
When compiling a .a library on MacOS, all the framework and library used don't seems to be packaged in the ".a". This is why I had to use Air 3.3, for the -platformsdk option(1).
Since I work on Windows, I followed the instruction in this post to get the iOS SDK (2).
Following the required framework and (1), I made a platformConfig.xml file like this, which is packaged in the .ane
<platform xmlns="http://ns.adobe.com/air/extension/3.1">
<sdkVersion>4.2</sdkVersion>
<linkerOptions>
<!-- to use the AssetsLibrary framework -->
<option>-framework AssetsLibrary</option>
<option>-framework AudioToolbox</option>
<option>-framework AddressBook</option>
<option>-framework AVFoundation</option>
<option>-framework CFNetwork</option>
<option>-framework CoreLocation</option>
<option>-framework MapKit</option>
<option>-framework MediaPlayer</option>
<option>-framework MessageUI</option>
<option>-framework OpenAL</option>
<option>-framework OpenGLES</option>
<option>-framework QuartzCore</option>
<option>-framework StoreKit</option>
<option>-framework SystemConfiguration</option>
<option>-framework Foundation</option>
<option>-framework CoreGraphics</option>
<option>-libsqlite3</option>
<option>-libxml2</option>
<option>-libz</option>
</linkerOptions>
</platform>
and this is the line to compile the actuale .ane
call "%FLEX_SDK%\bin\adt" -package -target ane ../release/burstlyadsextension.ane extension.xml -swc burstlyAds.swc -platform iPhone-ARM library.swf libBurstlyAds.a -platformoptions platformConfig.xml
Problem arises when I try to package the iOS app with ADT:
call adt -package -target %TYPE%%TARGET% %OPTIONS% %SIGNING_OPTIONS% "%OUTPUT%" "%APP_XML%" %FILE_OR_DIR% -extdir lib/external/ -platformsdk ../Libraries/iPhoneOS5.0.sdk/
this happens:
"ld: library not found for -libsqlite3
Compilation failed while executing : ld64"
frameworks seems to be added fine, but the dylib are not. I tried to add the line:
<option>-L usr/lib/</option>
before including the lib, but I got this error instead:
"ld: warning: directory not found for option '-Lusr/lib/'
ld: library not found for -libsqlite3
Compilation failed while executing : ld64"
I tried to use the full path, other relative path, but no matter what path I put in the option, I always get a "warning: directory not found for option". Even "-L ../" give me this warning. The only thing that seems to work is "-L /../", but my .dylib obviousle are not there.
So my questions are: What did I do wrong? Any idead what else I could try? Even an explanation as to why it is not working would be helpful!
Links:
1: http://blogs.adobe.com/rajorshi/2011/11/16/ios5-support-for-airusing-external-sdks-to-package-apps/
2: http://blogs.adobe.com/airodynamics/2012/05/18/using-platformsdk-for-ios-on-windows/

Resources