flutter_unity_pod/simulator_stub/UnityFrameworkStub.m
zj 1256b5db50 升级到 XCFramework,添加模拟器支持
- 创建支持真机和模拟器的 XCFramework
- 模拟器版本使用空壳实现,用于开发调试
- 真机版本包含完整 Unity 运行时
- 更新 podspec 版本到 1.0.7
- 移除所有架构排除配置,XCFramework 自动处理
2025-11-25 13:37:00 +08:00

95 lines
1.8 KiB
Objective-C

#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
// Stub implementation for simulator
typedef struct mach_header_64 MachHeader;
@protocol UnityFrameworkListener<NSObject>
@optional
- (void)unityDidUnload:(NSNotification*)notification;
- (void)unityDidQuit:(NSNotification*)notification;
@end
@interface UnityAppController : NSObject
@end
@implementation UnityAppController
@end
@interface UnityFramework : NSObject
@end
@implementation UnityFramework
+ (instancetype)getInstance {
static UnityFramework *instance = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
instance = [[self alloc] init];
});
return instance;
}
- (id)appController {
return nil;
}
- (UITextField*)keyboardTextField {
return nil;
}
- (void)setDataBundleId:(const char*)bundleId {
// Stub
}
- (void)runUIApplicationMainWithArgc:(int)argc argv:(char*[])argv {
// Stub
}
- (void)runEmbeddedWithArgc:(int)argc argv:(char*[])argv appLaunchOpts:(NSDictionary*)appLaunchOpts {
// Stub - 模拟器不运行 Unity
NSLog(@"UnityFramework: Simulator stub - Unity not available");
}
- (void)unloadApplication {
// Stub
}
- (void)quitApplication:(int)exitCode {
// Stub
}
- (void)registerFrameworkListener:(id)obj {
// Stub
}
- (void)unregisterFrameworkListener:(id)obj {
// Stub
}
- (void)showUnityWindow {
// Stub
}
- (void)pause:(bool)pause {
// Stub
}
- (void)setAbsoluteURL:(const char *)url {
// Stub
}
- (void)setExecuteHeader:(const MachHeader*)header {
// Stub
}
- (void)sendMessageToGOWithName:(const char*)goName functionName:(const char*)name message:(const char*)msg {
// Stub
}
@end
// Export version symbols
double UnityFrameworkVersionNumber = 1.0;
const unsigned char UnityFrameworkVersionString[] = "1.0";