Copy link to clipboard
Copied
hi
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
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."
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
Copy link to clipboard
Copied
I had the same when I tried to use iOS Deployment Target as iOS 11.
Xcode outputs an arm64 only lib with this setting.
To resolve:
Set your base SDK to iOS 11
Set iOS Deployment Target to iOS 10
Add @available directives around any iOS 11 only methods / vars
Set both Architectures and Valid Architectures to arm64, armv7 (Standard didn't work for me)
This should produce a .a lib which has both arches and therefore satisfy the universal library requirement.
Copy link to clipboard
Copied
Hi
thanks a lot for yr answer but plz iam new to xcode could u plz explain exactly where to:
Add @available directives around any iOS 11 only methods / vars
thanks a lot
Copy link to clipboard
Copied
Make the other changes and run build.
Xcode will complain only if you are using any iOS 11 only functions. (You may not be) It will probably prompt you to fix these. Click fix.
It looks like this.
if (@available(iOS 11, *)) {
// iOS 11 (or newer) ObjC code
} else {
// iOS 10 or older code
}
Copy link to clipboard
Copied
ok ,i have no special IOS 11 methods
i did all above but still have the same problem
Thanks in advance
Copy link to clipboard
Copied
from Terminal run
lipo -info /path/to/the/library.a
Do this on each .a file the packager is complaining about.
This will tell you what architectures they have been compiled as.
What does it output eg- arm64, armv7, x86 ?
Copy link to clipboard
Copied
the output is : armv7 ,arm64
i put in the Architectures and Valid Architectures but still the same any suppestions
Copy link to clipboard
Copied
Another thing if i compile the code with air 23 it works fine
Copy link to clipboard
Copied
Hi SamiKaraeen,
Can you please provide the resources you're using so that we can investigate further.
Thanks,
Pravishti | Adobe AIR Engineering
Copy link to clipboard
Copied
This link above have the xcode for the ane iam trying to do i think the error is the air itself couse i dont get any error while i compile the .a file and i don't get an error when i create the ane i only get when i compile the ipa file
this is the descriptor to create the ane
<?
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
>
thanxks in advance
Copy link to clipboard
Copied
The .rar file you linked does not contain a binary called 'libZebraChecker.a
'. But it contains a binary 'libZebraPrintersExtension.a'
The extension descriptor XML however lists it with the former name.
Check if that is causing the problem.
I had a similar problem a few days ago, where I got the capitalization in the name of the binary wrong. In the descriptor XML I wrote 'binaryNameABC.a' and the actual file was 'binarynameabc.a'.
This gave me the same error message, indicating that the binary is not a universal one. It was a pain to find the cause because of the misleading error message. It seems whenever the name of the binary in the descriptor XML is wrong, you will receive an error that the binary is not a universal one.