Is there someone who is using cocos2d 0.99.5 beta3? - cocos2d-iphone

Definitely, I'm a newbie on 'cocos2d for iOS', and in trouble with importing the "CCTouchDispatcher.h".
Cocos2d for iphone version 0.99.4 or below, I've seen CCTouchDispatcher class successful,
but does not occur importing.
Importing works, but I cannot use CCTouchDispatcher.
Warning shows just "may not respond to..", and there's no even coloring in purple.
I hope so who solved this failure..
My preference below
OS X ver: 10.6.4
Xcode ver: 3.2.4
cocos2d for iOS: 0.99.5 beta3

I am using cocos2d 0.99.5 beta 3 and the CCTouchDispatcher with auto complete.
In my header i import the .h file
#import "CCTouchDispatcher.h"
Then in my init method I'm doing this:
[[CCTouchDispatcher sharedDispatcher] addTargetedDelegate:self
priority:0
swallowsTouches:FALSE];
This works as expected after implementing the CCTouchMoved etc methods. Hope this helps!

Related

Qt virtualkeyboard assertion error in 5.15.2 vs 5.12.3

I recently updated my Qt version from 5.12.3 to 5.15.2. I rebuilt an application that uses a qt virtualkeyboard in QML using InputPanel {}. The virtual keyboard is defined in main as qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));. Everything works in release mode but when I run in debug mode I get the following application output from qt creator:
Program: C:\Qt\5.15.2\msvc2019_64\bin\Qt5Cored.dll
Module: 5.15.2
File: qvirtualkeyboardinputcontext_p.cpp
Line: 221
ASSERT: "!this->inputPanel" in file qvirtualkeyboardinputcontext_p.cpp, line 221
I inspected the source file on Github for 5.15.2 and the line number points to method void QVirtualKeyboardInputContextPrivate::registerInputPanel(QObject *inputPanel) with Q_ASSERT(!this->inputPanel);. I wanted to compare this method with Github for 5.12.3 but it looks like this method was added after 5.12.3 hence why I didn't see the error before.
Now, my understanding is that Q_ASSERT(bool) will call qFatal() when the flag is false. If inputPanel is of type QObject* should the Q_ASSERT be Q_ASSERT(this->inputPanel)? The Q_ASSERT should only trigger when the pointer is a nullptr. Or maybe I'm just confused?
There was already an existing bug report on Qt's bug tracker. Previously I only searched by virtualkeyboard and not InputPanel. The bug report is here. BTW, it looks like this is only an issue in debug mode and a workaround is to click the ignore button several times to continue in debug mode.
Edit: Qt responded that this assert check is to make sure that there is only 1 InputPanel component in the whole application. So, I am not sure how InputPanel is suppose to work when we have multiple dynamic views in a MVVM architecture design where each view has it's own self contained InputPanel.
Edit2: Updating per my last edit comment. I put the InputPanel at the main qml file that controls the StackView and the views that are dynamically loaded are able to use the same InputPanel.

Using ReplayKit with MacCatalyst

I have an app for iOS that also runs on macOS via MacCatalyst. I have just started using ReplayKit to add screen recording to the app. It is working well under iOS, but when used on Mac I get the following error when calling startRecording()
RPDaemonProxy: startRecordingWithHandler: proxy error: 4099
Any idea how to fix this?

SwiftUI app crash on run in macOS environment [duplicate]

I build an app with the 2nd beta of Xcode 11, using SwiftUI, and everything worked completely fine, but now, with the 3rd beta, the app isn't even build. I get errors like "Use of undeclared type 'View'", "Unknown attribute 'State'" etc. What can I do? Is the problem in my code or is it just a bug?
The problem is when I'm trying to build the app to run on my Mac (with UIKit for Mac)
#State var score = 0
The error is "Unknown attribute 'State'"
struct ContentView : View {
/*...*/
}
The error is "Use of undeclared type 'View'"
Got same issue on Xcode 11.2. Found out that the reason was that somewhere in same module I declared protocol State {}. This breaks compiler without any reasonable errors.
This is from the Xcode 11 Beta 3 Release Notes.
Known Issues
Xcode 11 doesn’t support working with SwiftUI in an iPad app brought to macOS. (41416222, 51201699)
I downloaded the Xcode 11 Beta 3 myself just to confirm the errors you mentioned, and I had the same issues when trying to build a SwiftUI project for Mac.
I would suggest going back to using Xcode Beta 2 if possible. Unfortunately, Apple doesn't provide download links to previous betas, so hopefully you have a Time Machine backup or Beta 2 still installed on your computer. Otherwise, you might be out of luck until the next beta is released.
I was getting the same "Unknown attribute 'State'" issue in Beta 5. But I was doing "#state" and not "#State". Case matters. It's hard to notice because both ways are shown as purple.
If you are doing a Kotlin multi-platform project, check if your shared module has a component named "State".
Instead #main, please replace #UIApplicationMain.
I've attached screenshots.
https://prnt.sc/vimvwn
I got the same error while trying to compile a Swift project created with Xcode 13 on Xcode 11. The problem was that the newer version uses the SDK 12.1 while the older one uses the SDK 10.15. To let the project compile on the older Xcode/SDK I just performed these steps:
remove the #main attribute from the swift source code
add Cocoa.framework in the section Frameworks, Libraries, and Embedded Content
add a file named main.m to the project (no bridge header) with this content:
#include <Cocoa/Cocoa.h>
int main(int argc, const char * argv[]) {
return NSApplicationMain(argc, argv);
}

integrating cocos2d-x with gaf in visual studio

i'm using cocos2d-x 3.7 on windows, visual studio 2013 and GAF_VERSION 5.0.
i'v downloaded "Cocos2dxGAFPlayer" and copied it into cocos2d/external, after that i added the gafplayer project to my cocos2dx project solution. i'm not sure but i think i have configured it properly as its running while it has this code in "HelloWorld::init()" :
auto animation = GAFAsset::createWithBundle("anim1.zip", "anim1/anim1.gaf", nullptr);
object = animation->createObjectAndRun(true);
object->setAnchorPoint(Vec2::ANCHOR_MIDDLE);
object->setPosition(Director::getInstance()->getVisibleSize() / 2);
this->addChild(object,1);
but by using this only the png file, containing parts of animation is shown( i have attached the file i mean).
when i use the zip file generated by gap in the GAFTest project by only replacing the recourse (not the source code) it works fine.
i've searched the net for a solution, and a correct way to integrate cocos2d-x and gaf. but i couldn't find a way.
please guide me.
is there any tutorial about how to integrate cocos2d-x with gaf on visual studio so i make sure i'm doing the configuration right?
tnx
A member of GAFmedia forum suggested something which solved the problem : http://gafmedia.com/forum/viewtopic.php?f=8&t=447
Postby Dmitry Bushtets » October 7th, 2015, 7:36 am
I have one idea. Have you method call to CODE: SELECT ALL
cocos2d::Director::setContentScaleFactor
in the code? (it can be in AppDelegate.cpp) If yes - try to remove
this call (set content scale factor to 1) and check result. Or
convert swf to gaf with CSF 1 and 2 (and 3, 4 maybe :) ). You can find
this option in GAF Converter. [Texture Atlas -> Scale Settings ->
Advanced]

Irrlicht Mac OS X crash

I'm trying to get Irrlicht running on Mac OS X, but when I try to run the "Demo" project, I see a screen with some options, but as soon as I click something, I get a lldb error for the following line of code:
[Window setIsVisible:FALSE];
It's line 554 of file CllrDeviceMacOSX.mm, and it gives this error in about every example I try to run
My system:
MacBook Pro Retina late 2012
Mac OS X 10.9 Mavericks
It appears that the NSWindow object Window is being released before the call to [Window setIsVisible:FALSE];.
Looking at Apple's documentation (NSWindow isReleasedWhenClosed) this is the expected behaviour as by default NSWindow objects are automatically released when closed.
As a workaround add:
[Window setReleasedWhenClosed:FALSE];
after the Window = [[NSWindow alloc]..... calls in CllrDeviceMacOSX.mm (there are two of them). I do not know enough about Irrlicht to know if this is a valid fix.