airsdk / Adobe-Runtime-Support

Report, track and discuss issues in Adobe AIR. Monitored by Adobe - and HARMAN - and maintained by the AIR community.
203 stars 11 forks source link

Called ANE for ios with arm64, exception, could not be found #2137

Open Ekitty opened 2 years ago

Ekitty commented 2 years ago

Which AIR SDK did you use? harman 33.1.1.929 Describe the affected environment: iOS ANE Can you reproduce it yourself ? yes

I set the minimum iOS SDK to 12,the target "Any iOS Device (arm64)", I add to platform.xml. it was successful! (AneSDK_IOS.ane)

image image

My project Calls ANE , It is exception, could not be found.

Example: import com.jic.anesdk.tools.Tools; ...

            var tool:Tools = new Tools();
            tool.canOpenURL("https://www.baidu.com");

Output: [Fault] exception, information=VerifyError: Error #1014: Class com.jic.anesdk.tools::Tools could not be found. java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248) at java.base/java.util.Objects.checkIndex(Objects.java:372) at java.base/java.util.ArrayList.get(ArrayList.java:459) at flash.tools.debugger.concrete.DManager.getFrame(DManager.java:921)

image

Environment: AIR SDK 33.1.1.929 macOS 12.5 xcode 14.0

marchbold commented 2 years ago

Are you adding your extension to the extensions list in your app descriptor and adding it to your packaging settings?

Ekitty commented 2 years ago
image image

All added. I don't know if it's the correct settings?

marchbold commented 2 years ago

First screenshot is correct, the second is not, you should remove it from the files/folders to package.

You need to make sure you add it to your app descriptor as well!

Ekitty commented 2 years ago

hi I add it to My app descriptor, Create IOS Package show Error.

image
    libAneSDK.a(minimum iOS SDK to 12,the target "Any iOS Device (arm64)", )
    AneSDK_IOS.ane ( “<sdkVersion>11.0</sdkVersion>” “<option>-ios_version_min 11.0</option>”)    
   see below
image
marchbold commented 2 years ago

Do you have a minimum ios version tag in your info additions?

<InfoAdditions><![CDATA[

  <key>MinimumOSVersion</key>
  <string>11.0</string>

]]></InfoAdditions>
Ekitty commented 2 years ago
(a.)libAneSDK.a (the minimum iOS SDK to 12)===> AneSDK_IOS.ane
image
 (b.) libAneSDK.a (the minimum iOS SDK to 11) ====> AneSDK_IOS.ane
image
marchbold commented 2 years ago

That second one looks correct, like you are missing a framework reference or something. Hard to advise further as i don't know what your ane does.

ajwfrost commented 2 years ago

I'm also curious on this part:

I set the minimum iOS SDK to 12,the target "Any iOS Device (arm64)", I add -ios_version_min 11.0 to platform.xml

Surely these should be the same? and worth also setting this the same value in InfoAdditions?

The warnings (in the 'a' case above) are just warnings rather than errors .. what happens if you scroll down there, do you then see a set of undefined symbols? It does look like there's a dependency missing...

thanks

marchbold commented 2 years ago

Yeah, I'd say that you are missing some options in your platform xml specifying the frameworks you are using in your ane.

Ekitty commented 2 years ago

I tested the old version of ANE (arm64+armv7) and it do work.

platform.xml (added "\<sdkVersion>11.0\</sdkVersion>" "\<option>-ios_version_min 11.0\</option> ")

image

I don't know which link library has failed

marchbold commented 2 years ago

Not really sure, but I'd guess you are missing the security framework:

    <option>-framework Security</option>
Ekitty commented 2 years ago
image image

Added All framework

image

Test result: Undefined symbols for architecture arm64: "_objc_msgSend$execute:", referenced from: _tools in libcom.jic.vplayane.a(AneSDK_IOS.o) _openqq in libcom.jic.vplayane.a(AneSDK_IOS.o) _avplayer in libcom.jic.vplayane.a(AneSDK_IOS.o) "_objc_msgSend$insertObject:forKey:withAccessGroup:", referenced from: -[KeychainAccessor insertOrUpdateObject:forKey:withAccessGroup:] in libcom.jic.vplayane.a(KeychainAccessor.o) "_objc_msgSend$queryDictionaryForKey:accessGroup:", referenced from: -[KeychainAccessor insertObject:forKey:withAccessGroup:] in libcom.jic.vplayane.a(KeychainAccessor.o) -[KeychainAccessor updateObject:forKey:withAccessGroup:] in libcom.jic.vplayane.a(KeychainAccessor.o) -[KeychainAccessor objectForKey:withAccessGroup:] in libcom.jic.vplayane.a(KeychainAccessor.o) -[KeychainAccessor deleteObjectForKey:withAccessGroup:] in libcom.jic.vplayane.a(KeychainAccessor.o) "_objc_msgSend$insertObject:forKey:", referenced from: -[KeychainAccessor insertOrUpdateObject:forKey:] in libcom.jic.vplayane.a(KeychainAccessor.o) "_objc_msgSend$queryDictionaryForKey:", referenced from: -[KeychainAccessor queryDictionaryForKey:accessGroup:] in libcom.jic.vplayane.a(KeychainAccessor.o) -[KeychainAccessor insertObject:forKey:] in libcom.jic.vplayane.a(KeychainAccessor.o) -[KeychainAccessor updateObject:forKey:] in libcom.jic.vplayane.a(KeychainAccessor.o) -[KeychainAccessor objectForKey:] in libcom.jic.vplayane.a(KeychainAccessor.o) -[KeychainAccessor deleteObjectForKey:] in libcom.jic.vplayane.a(KeychainAccessor.o) "_objc_msgSend$dictionary", referenced from: -[KeychainAccessor queryDictionaryForKey:] in libcom.jic.vplayane.a(KeychainAccessor.o) -[KeychainAccessor updateObject:forKey:] in libcom.jic.vplayane.a(KeychainAccessor.o) -[KeychainAccessor updateObject:forKey:withAccessGroup:] in libcom.jic.vplayane.a(KeychainAccessor.o) "_objc_msgSend$setAccessToken:", referenced from: -[OpenQQDelegate login] in libcom.jic.vplayane.a(OpenQQDelegate.o) -[OpenQQDelegate isLogin] in libcom.jic.vplayane.a(OpenQQDelegate.o) "_objc_msgSend$tencentDidLogin", referenced from: -[OpenQQDelegate login] in libcom.jic.vplayane.a(OpenQQDelegate.o) "_objc_msgSend$retCode", referenced from: -[OpenQQDelegate getUserInfoResponse:] in libcom.jic.vplayane.a(OpenQQDelegate.o) -[OpenQQDelegate addTopicResponse:] in libcom.jic.vplayane.a(OpenQQDelegate.o) "_objc_msgSend$jsonResponse", referenced from: -[OpenQQDelegate getUserInfoResponse:] in libcom.jic.vplayane.a(OpenQQDelegate.o) "_objc_msgSend$arrayWithObjects:", referenced from: -[OpenQQDelegate initOpenQQ:] in libcom.jic.vplayane.a(OpenQQDelegate.o) "_objc_msgSend$setRedirectURI:", referenced from: -[OpenQQDelegate initOpenQQ:] in libcom.jic.vplayane.a(OpenQQDelegate.o) "_objc_msgSend$objectWithURL:title:description:previewImageURL:", referenced from: -[OpenQQDelegate share:url:comment:summary:images:qzone:] in libcom.jic.vplayane.a(OpenQQDelegate.o) "_objc_msgSend$accessToken", referenced from: -[OpenQQDelegate tencentDidLogin] in libcom.jic.vplayane.a(OpenQQDelegate.o) "_objc_msgSend$intValue", referenced from: -[OpenQQDelegate onResp:] in libcom.jic.vplayane.a(OpenQQDelegate.o) "_objc_msgSend$initWithAppId:andDelegate:", referenced from: -[OpenQQDelegate initOpenQQ:] in libcom.jic.vplayane.a(OpenQQDelegate.o) "_objc_msgSend$HandleOpenURL:", referenced from: -[OpenQQDelegate execute:] in libcom.jic.vplayane.a(OpenQQDelegate.o) "_objc_msgSend$openId", referenced from: -[OpenQQDelegate tencentDidLogin] in libcom.jic.vplayane.a(OpenQQDelegate.o) "_objc_msgSend$getBoolFromFreObject:", referenced from: -[AneSDKTools StatusBarvisible:] in libcom.jic.vplayane.a(AneSDKTools.o) -[AneSDKTools setIdleTimerDisabled:] in libcom.jic.vplayane.a(AneSDKTools.o) -[OpenQQDelegate execute:] in libcom.jic.vplayane.a(OpenQQDelegate.o) "_objc_msgSend$presentViewController:animated:completion:", ref erenced from: -[AneAVPlayer beginplayVideo] in libcom.jic.vplayane.a(AVPlayer-51da4b34aaca6f2fb5aa2e6f86bad2ac.o) "_objc_msgSend$handleOpenURL:delegate:", referenced from: -[OpenQQDelegate execute:] in libcom.jic.vplayane.a(OpenQQDelegate.o) "_objc_msgSend$share:url:comment:summary:images:qzone:", referenced from: -[OpenQQDelegate execute:] in libcom.jic.vplayane.a(OpenQQDelegate.o) "_objc_msgSend$removeObserver:", referenced from: -[AneAVPlayer removevent] in libcom.jic.vplayane.a(AVPlayer-51da4b34aaca6f2fb5aa2e6f86bad2ac.o) "_objc_msgSend$currentItem", referenced from: -[AneAVPlayer removevent] in libcom.jic.vplayane.a(AVPlayer-51da4b34aaca6f2fb5aa2e6f86bad2ac.o) -[AneAVPlayer addevent] in libcom.jic.vplayane.a(AVPlayer-51da4b34aaca6f2fb5aa2e6f86bad2ac.o) ___29-[AneAVPlayer beginplayVideo]_block_invoke in libcom.jic.vplayane.a(AVPlayer-51da4b34aaca6f2fb5aa2e6f86bad2ac.o) -[AneAVPlayer videoPlayDidEnd:] in libcom.jic.vplayane.a(AVPlayer-51da4b34aaca6f2fb5aa2e6f86bad2ac.o) -[AneAVPlayer availableDuration] in libcom.jic.vplayane.a(AVPlayer-51da4b34aaca6f2fb5aa2e6f86bad2ac.o) "_objc_msgSend$isLogin", referenced from: -[OpenQQDelegate execute:] in libcom.jic.vplayane.a(OpenQQDelegate.o) "_objc_msgSend$scanRestOfArray:", referenced from: -[SBJsonParser scanValue:] in libcom.jic.vplayane.a(SBJsonParser.o) "_objc_msgSend$setSortKeys:", referenced from: -[SBJSON setSortKeys:] in libcom.jic.vplayane.a(SBJSON.o) "_objc_msgSend$getfreobjectFromNSString:", referenced from: -[AneSDKTools getDeviceID] in libcom.jic.vplayane.a(AneSDKTools.o) -[AneSDKTools parseTransactionReceipt:] in libcom.jic.vplayane.a(AneSDKTools.o) -[AneSDKTools deviceString] in libcom.jic.vplayane.a(AneSDKTools.o) -[AneSDKTools keychainget:] in libcom.jic.vplayane.a(AneSDKTools.o) "_objc_msgSend$objectWithString:", referenced from: -[SBJSON objectWithString:] in libcom.jic.vplayane.a(SBJSON.o) -[SBJSON objectWithString:allowScalar:error:] in libcom.jic.vplayane.a(SBJSON.o) -[NSString(NSString_SBJSON) JSONValue] in libcom.jic.vplayane.a(NSString+SBJSON.o) "_objc_msgSend$setNumberOfLines:", referenced from: -[AneSDKTools showLogArea:] in libcom.jic.vplayane.a(AneSDKTools.o) "_objc_msgSend$seekToTime:", referenced from: -[AneAVPlayer beginplayVideo] in libcom.jic.vplayane.a(AVPlayer-51da4b34aaca6f2fb5aa2e6f86bad2ac.o) -[AneAVPlayer nextplayVideo] in libcom.jic.vplayane.a(AVPlayer-51da4b34aaca6f2fb5aa2e6f86bad2ac.o) "_objc_msgSend$stringWithObject:allowScalar:error:", referenced from: -[SBJSON stringWithFragment:error:] in libcom.jic.vplayane.a(SBJSON.o) -[SBJSON stringWithObject:error:] in libcom.jic.vplayane.a(SBJSON.o) "_objc_msgSend$errorTrace", referenced from: -[SBJSON stringWithObject:] in libcom.jic.vplayane.a(SBJSON.o) -[SBJSON stringWithObject:allowScalar:error:] in libcom.jic.vplayane.a(SBJSON.o) -[SBJSON objectWithString:] in libcom.jic.vplayane.a(SBJSON.o) -[SBJSON objectWithString:allowScalar:error:] in libcom.jic.vplayane.a(SBJSON.o) -[NSObject(NSObject_SBJSON) JSONFragment] in libcom.jic.vplayane.a(NSObject+SBJSON.o) -[NSObject(NSObject_SBJSON) JSONRepresentation] in libcom.jic.vplayane.a(NSObject+SBJSON.o) -[NSString(NSString_SBJSON) JSONFragmentValue] in libcom.jic.vplayane.a(NSString+SBJSON.o) ... "_objc_msgSend$mutableCopy", referenced from: -[SBJSON stringWithObject:] in libcom.jic.vplayane.a(SBJSON.o) -[SBJSON stringWithObject:allowScalar:error:] in libcom.jic.vplayane.a(SBJSON.o) -[SBJSON objectWithString:] in libcom.jic.vplayane.a(SBJSON.o) -[SBJSON objectWithString:allowScalar:error:] in libcom.jic.vplayane.a(SBJSON.o) "_objc_msgSend$initOpenQQ:", referenced from: -[OpenQQDelegate execute:] in libcom.jic.vplayane.a(OpenQQDelegate.o) "_objc_msgSend$decimalNumberWithString:", referenced from: -[SBJsonParser scanNumber:] in libcom.jic.vplayane.a(SBJsonParser.o) "_objc_msgSend$initWithByt esNoCopy:length:encoding:freeWhenDone:", referenced from: -[SBJsonParser scanRestOfString:] in libcom.jic.vplayane.a(SBJsonParser.o) -[SBJsonParser scanNumber:] in libcom.jic.vplayane.a(SBJsonParser.o) "_objc_msgSend$arrayWithCapacity:", referenced from: -[SBJsonParser scanRestOfArray:] in libcom.jic.vplayane.a(SBJsonParser.o) "_objc_msgSend$objCType", referenced from: -[SBJsonWriter appendValue:into:] in libcom.jic.vplayane.a(SBJsonWriter.o) "_objc_msgSend$scanRestOfString:", referenced from: -[SBJsonParser scanValue:] in libcom.jic.vplayane.a(SBJsonParser.o) -[SBJsonParser scanRestOfDictionary:] in libcom.jic.vplayane.a(SBJsonParser.o) "_objc_msgSend$scanRestOfFalse:", referenced from: -[SBJsonParser scanValue:] in libcom.jic.vplayane.a(SBJsonParser.o) "_objc_msgSend$sortKeys", referenced from: -[SBJsonWriter appendDictionary:into:] in libcom.jic.vplayane.a(SBJsonWriter.o) -[SBJSON sortKeys] in libcom.jic.vplayane.a(SBJSON.o) "_objc_msgSend$scanRestOfNull:", referenced from: -[SBJsonParser scanValue:] in libcom.jic.vplayane.a(SBJsonParser.o) "_objc_msgSend$scanValue:", referenced from: -[SBJsonParser fragmentWithString:] in libcom.jic.vplayane.a(SBJsonParser.o) -[SBJsonParser scanRestOfArray:] in libcom.jic.vplayane.a(SBJsonParser.o) -[SBJsonParser scanRestOfDictionary:] in libcom.jic.vplayane.a(SBJsonParser.o) "_objc_msgSend$nativeAlert:", referenced from: -[AneSDKTools execute:] in libcom.jic.vplayane.a(AneSDKTools.o) "_objc_msgSend$scanIsAtEnd", referenced from: -[SBJsonParser fragmentWithString:] in libcom.jic.vplayane.a(SBJsonParser.o) "_objcmsgSend$initWithFrame:", referenced from: -[AneSDKTools showLogArea:] in libcom.jic.vplayane.a(AneSDKTools.o) "...

ADT command line: /Applications/IntelliJ IDEA1.app/Contents/jbr/Contents/Home/bin/java -Dapplication.home=/Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Duser.language=en -Duser.region=en -Xmx512m -jar /Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/lib/adt.jar -package -target ipa-debug-interpreter -listen 7936 -storetype PKCS12 -keystore /Users/chenjie/Downloads/ok_jic/xbb_d.p12 -storepass 854985 -provisioning-profile /Users/chenjie/Downloads/ok_jic/xbb_d.mobileprovision /Users/chenjie/IdeaProjects/StarQ_XBB/out/production/Test_Iphone_it/Main.ipa /Users/chenjie/IdeaProjects/StarQ_XBB/out/production/Test_Iphone_it/StarQ_XBB7_IPhone-ios-descriptor.xml -extdir /Users/chenjie/IdeaProjects/StarQ_XBB/Test_Iphone_it/anes -C /Users/chenjie/IdeaProjects/StarQ_XBB/out/production/Test_Iphone_it Main.swf -C /Users/chenjie/IdeaProjects/StarQ_XBB/Test_Iphone_it/src icons -C /Users/chenjie/IdeaProjects/StarQ_XBB/Test_Iphone_it/src Assets.car -C /Users/chenjie/IdeaProjects/StarQ_XBB/Test_Iphone_it/src Default-568h@2x.png -C /Users/chenjie/IdeaProjects/StarQ_XBB/Test_Iphone_it/src Default-568h@2x1.png -C /Users/chenjie/IdeaProjects/StarQ_XBB/Test_Iphone_it/src Default-812h_3x1~iphone.png -C /Users/chenjie/IdeaProjects/StarQ_XBB/Test_Iphone_it/src Default-812h@3x~iphone.png -C /Users/chenjie/IdeaProjects/StarQ_XBB/Test_Iphone_it/src Default-812h@3x1~iphone.png -C /Users/chenjie/IdeaProjects/StarQ_XBB/Test_Iphone_it/src Default-896h@2x~iphone.png -C /Users/chenjie/IdeaProjects/StarQ_XBB/Test_Iphone_it/src icon128.png -C /Users/chenjie/IdeaProjects/StarQ_XBB/Test_Iphone_it/anes AneSDK_IOS.ane

marchbold commented 2 years ago

Is the "TencentOpenAPI" framework dynamic? Maybe you need to include it in your Frameworks folder?