HTML5版(Canvas)のLWFで、あるフレームを実行するとrootMovieがdestroyされる。 そのフレーム以降のアニメーションも同様。 iOS6のUIWebView, Chromeで確認。その他は未確認。
以下を使ってmainを回してexec & renderしている。 https://github.com/yonekawa/lwf.enchant.js/blob/master/lwf.enchant.coffee
package main | |
import "sync" | |
// deferはreturnの後だよ | |
func A() string { | |
str := "A" | |
defer func() { | |
str = "B" | |
}() |
module Fastlane | |
module Actions | |
class AppiumAction < Action | |
INVOKE_TIMEOUT = 30 | |
APPIUM_PATH_HOMEBREW = '/usr/local/bin/appium' | |
APPIUM_APP_PATH = '/Applications/Appium.app' | |
APPIUM_APP_BUNDLE_PATH = 'Contents/Resources/node_modules/.bin/appium' | |
def self.run(params) | |
Actions.verify_gem!('rspec') |
import APIKit | |
import SwiftFlux | |
struct TodoActions { | |
struct Fetch { | |
typealias Payload = Todo | |
func invoke(dispatcher: Dispatcher) { | |
Session.sendRequest(TodoFetch(id: 1)) { (result) in | |
switch response { | |
case .Success(let todo): |
import SwiftFlux | |
struct CounterActions { | |
struct Plus: Action { | |
typealias Payload = Int | |
let number: Int | |
func invoke(dispatcher: Dispatcher) { | |
dispatcher.dispatch(self, result: Result(value: number)) | |
} |
diff --git a/facebook/src/com/facebook/internal/AttributionIdentifiers.java b/facebook/src/com/facebook/internal/AttributionIdentifiers.java | |
index 1c8f630..f142f25 100644 | |
--- a/facebook/src/com/facebook/internal/AttributionIdentifiers.java | |
+++ b/facebook/src/com/facebook/internal/AttributionIdentifiers.java | |
@@ -104,25 +104,23 @@ public class AttributionIdentifiers { | |
try { | |
String [] projection = {ATTRIBUTION_ID_COLUMN_NAME, ANDROID_ID_COLUMN_NAME, LIMIT_TRACKING_COLUMN_NAME}; | |
Cursor c = context.getContentResolver().query(ATTRIBUTION_ID_CONTENT_URI, projection, null, null, null); | |
- if (c == null || !c.moveToFirst()) { | |
- return null; |
<?xml version='1.0'?> | |
<signatures version='1.0'> | |
<enum name='kDynamicBodyType' value='2'/> | |
<enum name='kKinematicBodyType' value='1'/> | |
<enum name='kStaticBodyType' value='0'/> | |
<class name='B2DBody'> | |
<method selector='addFixureForShape:friction:restitution:density:isSensor:'> | |
<arg name='shape' index='0' declared_type='B2DShape*' type='@'/> | |
<arg name='friction' index='1' declared_type='id' type='@'/> | |
<arg name='restitution' index='2' declared_type='id' type='@'/> |
HTML5版(Canvas)のLWFで、あるフレームを実行するとrootMovieがdestroyされる。 そのフレーム以降のアニメーションも同様。 iOS6のUIWebView, Chromeで確認。その他は未確認。
以下を使ってmainを回してexec & renderしている。 https://github.com/yonekawa/lwf.enchant.js/blob/master/lwf.enchant.coffee
diff --git a/cordova/ios/CordovaLib/Classes/CDVCommandDelegate.h b/cordova/ios/CordovaLib/Classes/CDVCommandDelegate.h | |
--- a/cordova/ios/CordovaLib/Classes/CDVCommandDelegate.h | |
+++ b/cordova/ios/CordovaLib/Classes/CDVCommandDelegate.h | |
@@ -42,6 +42,8 @@ | |
// without reason. Without the run-loop delay, alerts used in JS callbacks may result | |
// in dead-lock. This method must be called from the UI thread. | |
- (void)evalJs:(NSString*)js scheduledOnRunLoop:(BOOL)scheduledOnRunLoop; | |
+// Patch for using RequireJS. | |
+- (void)evalJs:(NSString*)js scheduledOnRunLoop:(BOOL)scheduledOnRunLoop useNativeEvalAndFetch:(BOOL)useNativeEvalAndFetch; | |
// Runs the given block on a background thread using a shared thread-pool. |
enchant(); | |
var NewScene = enchant.Class.create(enchant.Scene, { | |
initialize: function() { | |
enchant.Scene.call(this); | |
for (var i = 0; i < 100; i++) { | |
var sprite = new Sprite(32, 32); | |
sprite.image = enchant.Game.instance.assets['chara1.png']; | |
this.addChild(sprite); | |
} |
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m | |
index a0a29f0..520050d 100644 | |
--- a/CordovaLib/Classes/CDVViewController.m | |
+++ b/CordovaLib/Classes/CDVViewController.m | |
@@ -510,7 +510,7 @@ | |
// The iOSVCAddr is used to identify the WebView instance when using one of the XHR js->native bridge modes. | |
// The .onNativeReady().fire() will work when cordova.js is already loaded. | |
// The _nativeReady = true; is used when this is run before cordova.js is loaded. | |
- NSString* nativeReady = [NSString stringWithFormat:@"cordova.iOSVCAddr='%lld';try{cordova.require('cordova/channel').onNativeReady.fire();}catch(e){window._nativeReady = true;}", (long long)self]; | |
+ NSString* nativeReady = [NSString stringWithFormat:@"window.iOSVCAddr='%lld';try{cordova.require('cordova/channel').onNativeReady.fire();}catch(e){window._nativeReady = true;}", (long long)self]; |