nweber / SystemVolumeNativeExtension

An AIR native extension to interact with the system volume for iOS and Android devices.
55 stars 32 forks source link

exception, information=ArgumentError: Error #3500: The extension context does not have a method with the name init. #3

Open klopsknoedel opened 11 years ago

klopsknoedel commented 11 years ago

Always get this error as it comes to private var iOSAudioControll:VolumeController = VolumeController.instance;

application.xml - part looks like this:

net.digitalprimates.volume

If tried to include the volume.ane as an external library or instrinsic library ... but no luck with both.

nweber commented 11 years ago

Check to be sure that the ANE is included in the build path of the project and that it is checked in the build packaging. In Flash Builder, right click on your project and go to properties. Expands the Build Packaging item and select iOS. Then click on the native extensions tab and be sure that the included ANE is checked.

klopsknoedel commented 11 years ago

Unfortunatly I'm using FlashDevelop 4.1 and not FlashBuilder! But any other Extensions works as expected, so that's quite strange behaviour. I even encounter this on SoundExtension by mateuszmackowiak https://github.com/mateuszmackowiak/SoundExtension!

I'm using Windows 7 with -platformsdk with iOS6 installed on my iPad.

nweber commented 11 years ago

Ah, I haven't tried with any IDE other than Flash Builder.

Do you mean that any other native extension (including SoundExtension) works as expected? Or that all other native extensions work as expected but that the SystemVolume and SoundExtension extensions do not? If both sound extensions work, it's possible that there's some sort of missing iOS library or something.

I have compiled an application against iOS 6 and the SystemVolumeNativeExtension worked fine for me.

In my experience, this error happens when part of the native extension (namely the native code) doesn't make it into the final packaged application. Because the ActionScript (the swc) makes it into the application compilation goes as expected, but when you attempt to access a native method it fails.

klopsknoedel commented 11 years ago

That's what I'm talking about. Any other extensions works as expected except "SystemVolumeNativeExtension" AND "SoundExtension". As said I'm compiling under Windows 7 with iPhoneOS5.1.sdk and test the App on an iPad with iOS6 installed. I can't try Adobe AIR 3.4 SDK with iOS 6 support because it's not stable (or am I wrong) because the app I'm currently building is for a client and commercial use. So I need a stable environment.

klopsknoedel commented 11 years ago

I forgot to say that I don't get any compiling errors or any hint that the native extension was excluded from packaging.

Edit: This is the ADT-Command adt -package -target ipa-ad-hoc -storetype pkcs12 -keystore "cert\iphone_dist.p12" -provisioning-profile cert\XXX_AdHoc.mobileprovision "dist\XXX-ad-hoc.ipa" "application.xml" -platformsdk "C:\iPhoneOS5.1.sdk" -C bin . -C "icons/ios" . -extdir lib/

nweber commented 11 years ago

Ah. I wonder if it’s something to do with compiling on Windows. That isn’t supported by Adobe. I have a feeling that one of the media frameworks in the iOS SDK isn’t compiling correctly on Windows.

From: klopsknoedel [mailto:notifications@github.com] Sent: Thursday, October 18, 2012 8:01 AM To: nweber/SystemVolumeNativeExtension Cc: Nathan Weber Subject: Re: [SystemVolumeNativeExtension] exception, information=ArgumentError: Error #3500: The extension context does not have a method with the name init. (#3)

That's what I'm talking about. Any other extensions works as expected except "SystemVolumeNativeExtension" AND "SoundExtension". As said I'm compiling under Windows 7 with iPhoneOS5.1.sdk and test the App on an iPad with iOS6 installed. I can't try Adobe AIR 3.4 SDK with iOS 6 support because it's not stable (or am I wrong) because the app I'm currently building is for a client and commercial use. So I need a stable environment.

— Reply to this email directly or view it on GitHubhttps://github.com/nweber/SystemVolumeNativeExtension/issues/3#issuecomment-9563350.

Notice: This transmission is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged or confidential. Any dissemination, distribution or copying of this transmission by anyone other than the intended recipient is strictly prohibited. If you have received this transmission in error, please notify the sender immediately by e-mail or telephone and delete the original transmission. Thank you.

klopsknoedel commented 11 years ago

Hm ... I also have an extension called "as3Bonjour" to implement AirPlay (works better then the native one :D) which also uses and needs the iOS - SDK and I don't have any problems with it. Since Adobe AIR 3.4 it is possible to use -platformsdk with windows and as said I don't get any Errors or Warnings for duplicated symbols, missing linkage or any other hint that something goes wrong.

May I give it a try with the iOS6 - SDK even "Adobe AIR 3.4 with iOS6 support" is not stable yet and post my feedback. But thanks for your help so far!!

nweber commented 11 years ago

I was not aware that Adobe officially supported –platformsdk on Windows. That’s interesting.

There are no stable AIR builds with iOS 6 support yet, to my knowledge.

The SystemVolume extension requires the iOS frameworks MediaPlayer and AudioToolbox. You could check the SoundExtension and as3Bonjour to see if they use the same frameworks. To do this, there should be a platformoptions.xml file used to build the ane. This file lists any iOS frameworks/libraries that the ANE requires. Perhaps one of those is not present in your iOS SDK on Windows, or there may be a bug when trying to use one of those frameworks on Windows.

From: klopsknoedel [mailto:notifications@github.com] Sent: Thursday, October 18, 2012 8:30 AM To: nweber/SystemVolumeNativeExtension Cc: Nathan Weber Subject: Re: [SystemVolumeNativeExtension] exception, information=ArgumentError: Error #3500: The extension context does not have a method with the name init. (#3)

Hm ... I also have an extension called "as3Bonjour" to implement AirPlay (works better then the native one :D) which also uses and needs the iOS - SDK and I don't have any problems with it. Since Adobe AIR 3.4 it is possible to use -platformsdk with windows and as said I don't get any Errors or Warnings for duplicated symbols, missing linkage or any other hint that something goes wrong.

May I give it a try with the iOS6 - SDK even "Adobe AIR 3.4 with iOS6 support" is not stable yet and post my feedback. But thanks for your help so far!!

— Reply to this email directly or view it on GitHubhttps://github.com/nweber/SystemVolumeNativeExtension/issues/3#issuecomment-9564258.

Notice: This transmission is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged or confidential. Any dissemination, distribution or copying of this transmission by anyone other than the intended recipient is strictly prohibited. If you have received this transmission in error, please notify the sender immediately by e-mail or telephone and delete the original transmission. Thank you.

klopsknoedel commented 11 years ago

Oh ... I was wrong. You can use the iOSSDK under windows since Adobe AIR 3.3: http://blogs.adobe.com/airodynamics/2012/05/18/using-platformsdk-for-ios-on-windows/

You are right, SystemVolumeNativeExtension AND SoundExtension uses your mentioned frameworks (MediaPlayer and AudioToolbox). But these frameworks are present in my iOSSDK - Subfolders. May indeed it's a problem with windows.

Will it be possible to integrated all dependencies inside the .ane so that others (especially windows-users) don't have to have the iOSSDK at all? Like the "Notifications" - Extension by Daniel Koestler: http://www.adobe.com/devnet/air/native-extensions-for-air/extensions/notification.html where you don't need the SDK installed.

nweber commented 11 years ago

According to the release notes for AIR 3.5 on labs.adobe.com, it should be possible to package libraries with the ANE. The problem is that AIR 3.5 is still in beta, so that probably won’t help you yet.

From: klopsknoedel [mailto:notifications@github.com] Sent: Thursday, October 18, 2012 8:45 AM To: nweber/SystemVolumeNativeExtension Cc: Nathan Weber Subject: Re: [SystemVolumeNativeExtension] exception, information=ArgumentError: Error #3500: The extension context does not have a method with the name init. (#3)

Oh ... I was wrong. You can use the iOSSDK under windows since Adobe AIR 3.3: http://blogs.adobe.com/airodynamics/2012/05/18/using-platformsdk-for-ios-on-windows/

You are right, SystemVolumeNativeExtension AND SoundExtension uses your mentioned frameworks (MediaPlayer and AudioToolbox). But these frameworks are present in my iOSSDK - Subfolders. My indeed it's a problem with windows.

Will it be possible to integrated all dependencies inside the .ane so that others (especially windows-users) don't have to have the iOSSDK at all? Like the "Notications" - Extension by Daniel Koestler: http://www.adobe.com/devnet/air/native-extensions-for-air/extensions/notification.html where you don't need the SDK installed.

— Reply to this email directly or view it on GitHubhttps://github.com/nweber/SystemVolumeNativeExtension/issues/3#issuecomment-9564740.

Notice: This transmission is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged or confidential. Any dissemination, distribution or copying of this transmission by anyone other than the intended recipient is strictly prohibited. If you have received this transmission in error, please notify the sender immediately by e-mail or telephone and delete the original transmission. Thank you.

klopsknoedel commented 11 years ago

As Adobe AIR 3.5 is out, would it be possible to provide an ANE which has all dependencies/libraries included? That would be awsome. I build your ANE on my own and the resulting file is 10kb larger. Strange. But this ANE didn't work as well.

May this has something to do with my setup (Using iOS5.1 - SDK and an iPad with iOS6 installed).

klopsknoedel commented 11 years ago

Even not working with Adobe AIR 3.5Beta

klopsknoedel commented 11 years ago

Sorry for annoying but I got it to work. But only in this constalation: :: set "-hideAneSymbols yes" :: package as ad-hoc

Haven't tested it with app-store - packaging yet. Unfortunatly i HAVE TO package my app as ad-hoc because every other packaging-type don't like the "-hideAneSymbols yes" - Flag.