Closed DagAgren closed 5 years ago
I'm blocked by the same issue.
I have imported SwiftMonkeyPaw into an Objective-C project, but it doesn't work at runtime.
//AppDelegate.h
@import SwiftMonkeyPaws;
@property (strong, nonatomic) MonkeyPaws *paws;
//AppDelegate.m
@import SwiftMonkeyPaws;
self.paws = [[MonkeyPaws alloc] initWithView:self.window tapUIApplication:true];
What happens exactly? Does it crash, or just not do anything?
If it does nothing, can you try putting a breakpoint in the append
function to see if it ever gets called?
The paw's layer didn't display, however, I have found the problem.
I inited MonkeyPaws too earlier, as my Objective-C project modified the UIApplication in the method (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions
It worked after put the init statement behind :)
Oh good, at least that is solved then!
Hi guys, help me please! I did the following step: //AppDelegate.h @import SwiftMonkeyPaws; @property (strong, nonatomic) MonkeyPaws *paws;
//AppDelegate.m @import SwiftMonkeyPaws; self.paws = [[MonkeyPaws alloc] initWithView:self.window tapUIApplication:true];
But in AppDelegate.h, failed in line : @import SwiftMonkeyPaws; error message: AppDelegate.h:15:1: Use of '@import' when C++ modules are disabled, consider using fmodules and fcxx-modules. And in AppDelegate.m, no error for @import SwiftMonkeyPaws;
Could you guys help to take a look? How can I fix it? thanks very much. :D
I might be a bit late, but I've been working on an Objective-C version of MonkeyPaws. Please have a look here: https://github.com/donaldhu/xc-auto-monkey
What if it is a mix and match project of Swift & Obj C. Will SwiftMonkey function the way it should?
Closing due to inactivity. Please reopen the issue if you think it should be addressed.
It might be worth creating an Objective-C version of MonkeyPaws, so that it can be more easily included in Objective-C only projects.
The test side can still use Swift without forcing the rest of the app to use it, and doesn't really need an Objective-C version, but the embedded visualisation could benefit.
If this is something you would like, please comment.