|
Viewing 61 to (278 Total) |
|
This only happens on Android for me.
[LOG] ./src/neash/display/Stage.cpp: In member function 'virtual Dynamic neash::display::Stage_obj::nmeProcessStageEvent(Dynamic)':
[LOG] ./src/neash/display/Stage.cpp:1060: error: 'haxe::Log_obj' has not been declared
[LOG] Called from ? line 1
[LOG] Called from BuildTool.hx line 1310
[LOG] Called from BuildTool.hx line 580
[LOG] Called from a C function
[LOG] Called from BuildTool.hx line 617
[LOG] Called from BuildTool.hx line 748
[LOG] Called from BuildTool.hx line 782
[LOG] Called from BuildTool.hx line 200
The only Google entry that comes up is this -http://haxenme.atlassian.net/browse/NME-70... - but I'm not using dead code elimination.
Posted on September 26, 2012 at 7:12 PM
|
|
Ah, my little secret.
Because my main project's a Java project, I manage it in Eclipse and stuck my entire haxe install under that. The advantage is that I can do a fast global file search on it from within Eclipse. That's how I've been able to locate things really conveniently within the codebase.
There are other ways of doing it, but that's how I do it myself.
It's located here.
http://code.google.com/p/nekonme/source/browse/trunk/project/iPhone...
Posted on September 26, 2012 at 12:29 PM
|
|
The solution above works great. Just a couple caveats you may bump into.
- If in Flash, hitting ESC will exit full screen mode, so you'll want to add a key listener and run the "turn off full screen" portion of that code above when that happens.
- In fact, you want to do that across the board. I can't exactly tell what the default key is for turning off full screen mode in desktop apps, but it wasn't simply "ESC".
- There's a small typo in the final line of the sample. It should be _gameMain.height, not _gameMain.width.
- Set the background attribute for your window to a desired color.
- If stuff goes off screen, it gets drawn in the empty areas, I think. This is easy to fix, just be aware of it.
Posted on September 26, 2012 at 1:47 AM
|
|
I've never worked with the Facebook SDK before, so this is just a guess, but just based on what I've had to do for most of Apple's API's, you generally don't have to touch NME's original AppDelegate class (UIStageView.mm) and through calls like the following, that's usually sufficient to get what you need done.
[[UIApplication sharedApplication] delegate]
[[UIApplication sharedApplication] keyWindow]
If you write a custom delegate, I imagine Facebook wants you to implement their own delegate, something like FacebookDelegate, and there's no obligation for it to be mounted to the "main" application. Again, I'm not familiar at all with the details am am going just off what I've worked with so far.
Posted on September 25, 2012 at 6:31 PM
|
|
If you need to touch the original application file, you'll need to edit the generated template. I believe this is UIStageView.mm or something in that vicinity.
But often, it's sufficient to just make a custom class that implements the delegate and assign that instead. If you just need to add something to the screen, there are a number of ways to do that from an extension's space. For example, when I was implementing show-keyboard support for iOS, I had to provide a UITextFieldDelegate.
@interface MyView : NSObject <UITextFieldDelegate> { } @end
@implementation MyView //DO STUFF @end
[...]
mTextField = [[UITextField alloc] initWithFrame: CGRectMake(0,0,0,0)]; mTextField.delegate = [[MyView alloc] init]; [[[UIApplication sharedApplication] keyWindow] addSubview:mTextField];
I'm not sure if it's possible to communicate directly with the rest of NME from an extension, outside of sending Events back to Haxe like I talked about before. That's what I had to do to complete my Keyboard extension.
Posted on September 25, 2012 at 3:36 PM
|
|
Make sure that this folder - system/ndll/Android/ - exists for you, or it'll complain. This got me stuck for a while when I first got started.
Posted on September 25, 2012 at 3:30 PM
|
|
If you don't want to hassle with an SDK upgrade, you can grab an older version of AdMob instead. I forgot the exact version that's OK, but a quick Google search should get you an answer.
Posted on September 24, 2012 at 7:05 PM
|
|
A while back we had a discussion about using Neko to allow Windows developers to build iOS apps.
Since I'm building a toolset with a large Windows base, I've been thinking of ways to enable this. Just this past weekend, I spent some time getting the AIR -> iOS path to work. I got it to work. It takes 1-2 minutes on a fast computer to build an IPA. It runs OK on an iPad 3. It's not the best, but it's not bad.
I'm really interested in exploring the Neko path further. It was suggested in that discussion that we could compile an NME app into a Neko one and with some unspecified work, get that running on iOS. While that would theoretically work, I'm thinking about a less ambitious project that would serve just as well.
Is it possible to treat Neko like Lua and embed it as an "interpreter" of sorts inside a Haxe app? If I can do that and have the Neko scripts refer to Haxe classes, then I'm 90% of the way towards a solution.
Google isn't coming up with anything useful, but I know that there's gotta be a way to do this given how intertwined the two are.
Posted on September 24, 2012 at 7:02 PM
|
|
I've been getting more reports of this same error and pondered about a workaround - any chance this could be looked into further? It tends to show up in other forms, like: AMDeviceInstallApplication failed: -402653114
Posted on September 24, 2012 at 4:38 AM
|
|
haxelib.exe is consistently crashing for several of my users. All of them run Vista 64-bit. It says "haxelib.exe has stopped working"
Is it a known issue that haxelib doesn't function under Vista 64-bit? What's the solution to this?
Posted on September 24, 2012 at 4:26 AM
|
|
There are a couple issues with this on Windows.
1) IOSHelper searches for the IOS SDK path, which won't exist on Windows and will crash the script.
2) If the "AIR_SDK" define contains a space in the path, the command will fail to run because it's passed in literally and not escaped. I'm not knowledgeable enough to know if there's a function for this (wrapping it in quotes did not work). I worked around it by using Sys.putEnv to alter the path, and that worked.
3) It's unnecessary to specify the platformsdk flag unless you're targeting the iOS simulator.
Posted on September 23, 2012 at 7:06 PM
|
|
All of these apply to the application.xml template.
Orientation is specified using this tag under initialWindow.
<aspectRatio>landscape</aspectRatio>
Auto-rotation is handled using this under initialWindow.
<autoOrients>false</autoOrients>
Retina display support is enabled under the iPhone node using this.
<requestedDisplayResolution>high</requestedDisplayResolution>
Device compatibility (phone only, tablet only, universal) is specified by including 1, 2, or both like this. This is a top level node. Including the code breaks forum formatting, so here's a page that explains how.
http://blogs.adobe.com/cantrell/archives/2010/11/how-to-build-an-ai...
Last but not least, turn off the status bar. This goes under initialWindow.
<fullScreen>true</fullScreen>
Posted on September 23, 2012 at 3:39 PM
|
|
I think this was also causing XML parsing to fail entirely on the HTML5 target since Parser.hx was being passed a non-String on those targets. I worked around that a while back by calling toString on the data being passed in.
But there's no getting around the IE9 issue. Any chance we could see a fix for this soon?
Posted on September 23, 2012 at 12:26 PM
|
|
I was referring to device testing. Simulator should always work fine.
Posted on September 22, 2012 at 5:48 PM
|
|
In AIRHelper.hx, the run target uninstalls an app before reinstalling it. This errors out on several of my devices. This might be because the app doesn't exist yet, so it'll fail for a new app?
Moreover, I don't think it's necessary to do at all. Just the installApp step is sufficient, and it will properly update the app each time.
Posted on September 22, 2012 at 1:33 PM
|
|
From what I understand, each major version of Xcode is coupled to an iOS SDK. At least, before, you've never been able to run on a device whose major version differed from the SDK version.
For example, the new Xcode ships with iOS 6. You can only debug on iOS 6 devices. If you want iOS 5 and below, you have to use an older version. The reverse is also true.
This only applies to running from Xcode. You can still generate an IPA and sync to the device OTA or over a cable. If the AIR SDK is open source, I've found that the IPA running portion is pretty reliable compared to fruitstrap and I *think* it works on any IPA, not just the ones generated by AIR.
Posted on September 22, 2012 at 12:23 PM
|
|
AIRHelper.hx
if (target == "ios") { args.push ("-provisioning-profile"); args.push (IOSHelper.getProvisioningFile ()); }
Right now, the way it embeds a provisioning profile is weird. It searches through the user's provisioning profiles folder (which assumes they're on a Mac) and arbitrarily picks the first one it encounters.
You should let the user specify this field before resorting to that method like you allow for the keystore fields.
Posted on September 22, 2012 at 3:18 AM
|
|
I figured out the first issue by digging down into the source. I've turned this into an ad hoc guide on how to get stuff working on AIR (since there's no guide yet).
I'm not to the point where it's working yet, unfortunately, but I'll ask questions, answer some and hopefully we'll figure this one out.
Right now, I'm hitting "Uninstallation Error: APIInternal Error" when I run on iOS. But at least I see an IPA and could theoretically sync it manually, but that defeats the purpose of the bridging stuff that Adobe added in recently. I was able to launch the app manually over the command line using adt, so it seems that something NME is doing in its commands might be off.
Posted on September 22, 2012 at 1:20 AM
|
|
I've started looking at AIR as a temporary workaround for allowing my users to test iOS apps from Windows.
I got it working, but I had to rework AIRInstaller.hx a bit to get it to ru properly.
Requirements
- NME 3.4.3 or better
- armv7 device (old ones do not work)
- iTunes 10.5 or better
- iOS Developer License
- p12 certificate and mobile provision profile
The Commands
nme setup air
nme test project.nmml flash -air
nme test project.nmml ios -air
nme test project.nmml android -air
Stuff You Must Include in your NMML file (that you might not have)
The NMML spec
http://code.google.com/p/nekonme/source/browse/trunk/tools/command-...
- Company
- Title
- Version
- Description
<meta title="Example Application" description="A really cool application!" package="com.example.myapp" version="1.0.0" company="My Company"/>
- For IOS, you need to specify the certificate type (pkcs12), location of your p12 certificate (and password). I found it easier to specify this through env variables.
<setenv name="KEY_STORE_TYPE" value="pkcs12" if="air"></setenv> <setenv name="KEY_STORE" value="/path/to/mycertificate.p12" if="air"></setenv> <setenv name="KEY_STORE_PASSWORD" value="aaa" if="air"></setenv>
- For iOS, you also need to specify the provisioning profile, but there's currently no way to do this. It instead arbitrarily picks the first profile on your computer. I've filed a bug report about this. If you must get around it, edit AIRHelper and replace the line with "IOSHelper.getProvisioningFile ()" with "defines.get ("PROVISION_PROFILE")" - then just set that value in your NMML.
<setenv name="PROVISION_PROFILE" value="path/to/something.mobileprovision" if="air"></setenv>
- If your app name contains a space, you may want to specify the APP_FILE property, or you may run into a cryptic error.
<setenv name="APP_FILE" value="myapp" if="air"/>
- NME may give you trouble and say it can't find blah blah blah in the keychain. If it does, edit AIRHelper.hx and remove the KEY_STORE_ALIAS and KEY_STORE_ALIAS_PASSWORD branches of code. Despite me not using them, they were somehow interpreted as set threw things off.
Troubleshooting
1) If you get "error 105: application.installFolder contains an invalid value", you're missing either the company or title attribute for your game. You need both.
2) If you get "Uninstallation Error: APIInternal Error" - open up AIRHelper.hx and look for a line that contains "uninstallApp" - remove that line, rebuild tools (nme rebuild tools) and try again.
3) If you get "ApplicationVerificationError" when running on the device, it's a provisioning profile / certificates issue. Install a Console Viewer app to see the exact error. Google away.
4) Not everything Flash or Haxe supports is supported in the AIR target. The Haxe Resource API doesn't work, for example.
5) If you're on Windows and it gives you trouble with the keychain/keystore, your p12 may need to be remade if it was made on a Mac but used on Windows. See:
http://stackoverflow.com/questions/6642170/error-could-not-retreive...
6) If you have multiple iOS devices connected, either disconnect them so you only have 1, or consult the following page.
http://blogs.adobe.com/airodynamics/2012/07/17/installinguninstalli...
Need to hack on it?
I only figured this stuff out because I peeked at the source to figure out how it was generating the application.xml manifest and what values it needed from NMML. So if you're stuck, it helps to peek at what's going on.
[NME]/tools/command-line/src/helpers/AIRHelper.hx
[NME]/tools/command-line/src/installers/FlashInstaller.hx
[NME]/tools/command-line/src/installers/IOSInstaller.hx
[NME]/templates/default/flash/templates/air/application.xml
OK, so NME's commands don't work. How can I get this working?
1) Build for the Flash AIR target first.
nme test project.nmml flash -air
2) Run the following command INSIDE the Export/flash/bin directory. Replace the parts accordingly. Wait a long time for it to finish.
[PATH_TO_ADOBE_AIR]/bin/adt -package -target ipa-test -storetype pkcs12 -keystore [YOUR_P12] -storepass [YOUR_P12_PASSWORD] -provisioning-profile [YOUR_PROVISION_PROFILE] [IPA_FILE_OUT] application.xml [SWF_FILE_IN]
3) Finally, run this to install and launch on your device. It takes just a few seconds.
[PATH_TO_ADOBE_AIR]/bin/adt -installApp -platform ios -package [IPA_FILE_OUT]
Posted on September 21, 2012 at 8:00 PM
|
|
Please post a stacktrace, so I know which NMEX file to look in.
Posted on September 21, 2012 at 7:01 PM
|