提交项目
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// CircularProgressBar.h
|
||||
// TestGameWeb
|
||||
//
|
||||
// Created by Mac on 2024/1/30.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface CircularProgressBar : UIView
|
||||
-(void)updateUI;
|
||||
-(void)animateCircleWithStrokeEnd:(float)end;
|
||||
-(void)setProgress:(float)value;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 401c653728b324d80ad80177e7b651d9
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,59 @@
|
||||
//
|
||||
// CircularProgressBar.m
|
||||
// TestGameWeb
|
||||
//
|
||||
// Created by Mac on 2024/1/30.
|
||||
//
|
||||
|
||||
#import "CircularProgressBar.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@implementation CircularProgressBar
|
||||
{
|
||||
UIImageView* imageView;
|
||||
CAShapeLayer* maskLayer;
|
||||
float currentValue;
|
||||
}
|
||||
|
||||
-(void)updateUI{
|
||||
[self makeGradient];
|
||||
[self setUpMask];
|
||||
}
|
||||
-(void)animateCircleWithStrokeEnd:(float)end{
|
||||
// let oldStrokeEnd = maskLayer.strokeEnd
|
||||
// maskLayer.strokeEnd = strokeEnd
|
||||
//
|
||||
// //override strokeEnd implicit animation
|
||||
// let animation = CABasicAnimation(keyPath: "strokeEnd")
|
||||
// animation.duration = 0.5
|
||||
// animation.fromValue = oldStrokeEnd
|
||||
// animation.toValue = strokeEnd
|
||||
// animation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut)
|
||||
// maskLayer.add(animation, forKey: "animateCircle")
|
||||
//
|
||||
// currentValue = strokeEnd
|
||||
}
|
||||
-(void)setProgress:(float)value{
|
||||
maskLayer.strokeEnd = value;
|
||||
}
|
||||
|
||||
-(void)makeGradient{
|
||||
imageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"12"]];
|
||||
imageView.frame = CGRectMake(0,0,self.frame.size.width, self.frame.size.height);
|
||||
imageView.contentMode = UIViewContentModeScaleToFill;
|
||||
[self addSubview:imageView];
|
||||
}
|
||||
|
||||
-(void)setUpMask{
|
||||
UIBezierPath*circlePath = [UIBezierPath bezierPathWithArcCenter:CGPointMake(self.frame.size.width / 2.0,self.frame.size.height / 2.0) radius:(self.frame.size.width - 10)/2 startAngle:-M_PI/2 endAngle:M_PI*1.5 clockwise:YES];
|
||||
maskLayer = [CAShapeLayer layer];
|
||||
[maskLayer setPath: circlePath.CGPath];
|
||||
maskLayer.fillColor = UIColor.clearColor.CGColor;
|
||||
maskLayer.strokeColor = UIColor.redColor.CGColor;
|
||||
maskLayer.lineWidth = 8.0;
|
||||
maskLayer.strokeEnd = 0;
|
||||
maskLayer.lineCap = kCALineCapButt;// CAShapeLayerLineCap;
|
||||
imageView.layer.mask = maskLayer;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 04828e5b563ce4632aa47ccddfa54560
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
////
|
||||
//// CustomAppController.h
|
||||
//// UnityFramework
|
||||
////
|
||||
//// Created by Mac on 2024/1/17.
|
||||
////
|
||||
//
|
||||
//#import <UnityFramework/UnityFramework.h>
|
||||
//
|
||||
//NS_ASSUME_NONNULL_BEGIN
|
||||
//
|
||||
//@interface CustomAppController : UnityAppController
|
||||
//
|
||||
//@end
|
||||
//IMPL_APP_CONTROLLER_SUBCLASS(CustomAppController)
|
||||
//
|
||||
//NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dc223686fd5104500a48f5ad02663355
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,132 @@
|
||||
//
|
||||
// CustomAppController.m
|
||||
// UnityFramework
|
||||
//
|
||||
// Created by Mac on 2024/1/17.
|
||||
//
|
||||
//#import "CustomAppController.h"
|
||||
//#import "H5View.h"
|
||||
//
|
||||
//#import <CoreTelephony/CTTelephonyNetworkInfo.h>
|
||||
//#import <CoreTelephony/CTCarrier.h>
|
||||
//@interface CustomAppController ()
|
||||
//
|
||||
//@property(nonatomic, strong) WKWebView *webView;
|
||||
//
|
||||
//@end
|
||||
|
||||
//@implementation CustomAppController {
|
||||
// UIButton *btn;
|
||||
// H5View *hview;
|
||||
//}
|
||||
//- (void)startUnity:(UIApplication *)application {
|
||||
// [super startUnity:application];
|
||||
//
|
||||
// UIView* unityView = UnityGetGLView();
|
||||
//
|
||||
// UIViewController *vc = [UIViewController new];
|
||||
// vc.modalPresentationStyle = UIModalPresentationFullScreen;
|
||||
// //[vc.view setFrame:self.window.bounds];
|
||||
// //[vc.view setBackgroundColor:[UIColor orangeColor]];
|
||||
// [self.window setRootViewController:vc];
|
||||
//
|
||||
// [vc.view addSubview:unityView];
|
||||
//
|
||||
// hview = [H5View shared];
|
||||
// [vc.view addSubview:hview];
|
||||
//
|
||||
// [hview setFrame:self.window.bounds];
|
||||
// [hview initView];
|
||||
//
|
||||
// CTTelephonyNetworkInfo *networkInfo = [[CTTelephonyNetworkInfo alloc] init];
|
||||
//
|
||||
// if (@available(iOS 12.0, *)) {
|
||||
// NSDictionary *ctDict = networkInfo.serviceSubscriberCellularProviders;
|
||||
// if ([ctDict allKeys].count > 1) {
|
||||
// NSArray *keys = [ctDict allKeys];
|
||||
// CTCarrier *carrier1 = [ctDict objectForKey:[keys firstObject]];
|
||||
// CTCarrier *carrier2 = [ctDict objectForKey:[keys lastObject]];
|
||||
// if (carrier1.mobileCountryCode.length && carrier2.mobileCountryCode.length) {
|
||||
// UnitySendMessage("NetworkManager", "diaoyongtest", "TRUE");
|
||||
//
|
||||
// }else if (!carrier1.mobileCountryCode.length && !carrier2.mobileCountryCode.length) {
|
||||
// UnitySendMessage("NetworkManager", "diaoyongtest", "FALSE");
|
||||
//
|
||||
// }else {
|
||||
// UnitySendMessage("NetworkManager", "diaoyongtest", "TRUE");
|
||||
// }
|
||||
// }else if ([ctDict allKeys].count == 1) {
|
||||
// NSArray *keys = [ctDict allKeys];
|
||||
// CTCarrier *carrier1 = [ctDict objectForKey:[keys firstObject]];
|
||||
// if (carrier1.mobileCountryCode.length) {
|
||||
// UnitySendMessage("NetworkManager", "diaoyongtest", "TRUE");
|
||||
// }else {
|
||||
// UnitySendMessage("NetworkManager", "diaoyongtest", "FALSE");
|
||||
// }
|
||||
// }else {
|
||||
// UnitySendMessage("NetworkManager", "diaoyongtest", "FALSE");
|
||||
// }
|
||||
// }
|
||||
// NSArray *preferredLanguages = [NSLocale preferredLanguages];
|
||||
// NSString *firstLanguage = preferredLanguages.firstObject;
|
||||
//
|
||||
// if ([firstLanguage hasPrefix:@"pt"]) {
|
||||
// // 设备设置为葡萄牙语
|
||||
// UnitySendMessage("UIManager", "setLangguage", "pt");
|
||||
// } else {
|
||||
// // 设备未设置为葡萄牙语
|
||||
// UnitySendMessage("UIManager", "setLangguage", "en");
|
||||
// }
|
||||
//
|
||||
|
||||
// customView = [CustomView shared];
|
||||
// [vc.view addSubview:customView];
|
||||
|
||||
// [customView setFrame:self.window.bounds];
|
||||
// [customView initView];
|
||||
|
||||
// [customView addSubview:unityView];
|
||||
//unityView.userInteractionEnabled = false;
|
||||
|
||||
|
||||
|
||||
// [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(:) name:@"OpenWebview" object:nil];
|
||||
|
||||
// UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
|
||||
// [button setTitle:@"show Webview" forState:UIControlStateNormal];
|
||||
// [button sizeToFit];
|
||||
// [button addTarget:self action:@selector(showWebview:)
|
||||
// forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
// // Set a new (x,y) point for the button's center
|
||||
// button.center = CGPointMake(100, 80);
|
||||
|
||||
// [customView addSubview:button];
|
||||
|
||||
// UIButton *button2 = [UIButton buttonWithType:UIButtonTypeSystem];
|
||||
// [button2 setTitle:@"hide Webview" forState:UIControlStateNormal];
|
||||
// [button2 sizeToFit];
|
||||
// [button2 addTarget:self action:@selector(hideWebview:)
|
||||
// forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
// // Set a new (x,y) point for the button's center
|
||||
// button2.center = CGPointMake(100, 120);
|
||||
|
||||
// [customView addSubview:button2];
|
||||
//}
|
||||
|
||||
//- (void)notificationFired:(NSNotification *)notification {
|
||||
// customView showWebview:<#(nonnull NSString *)#>
|
||||
//}
|
||||
|
||||
// -(void)showWebview:(UIButton *)button{
|
||||
// [[CustomView shared] showWebview:@"https://baidu.com"];
|
||||
// }
|
||||
|
||||
// -(void)hideWebview:(UIButton *)button{
|
||||
// [customView hideWebview];
|
||||
// }
|
||||
|
||||
|
||||
//@end
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4bcc02d08d5694f24af51ceb979658f7
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// CustomView.h
|
||||
// UnityFramework
|
||||
//
|
||||
// Created by Mac on 2024/1/19.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <WebKit/WebKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface CustomView : UIView<WKUIDelegate, WKNavigationDelegate, WKScriptMessageHandler>
|
||||
+(id) shared;
|
||||
-(void)initView;
|
||||
//-(void)setConfig:(ViewCfg)cfg;
|
||||
-(void)userContentController:(WKUserContentController*) userContentController didReceiveScriptMessage:(WKScriptMessage*)message;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 672a7b6ad9ba34c40afb06bc19d7d0ca
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,162 @@
|
||||
//
|
||||
// CustomView.m
|
||||
// UnityFramework
|
||||
//
|
||||
// Created by Mac on 2024/1/19.
|
||||
//
|
||||
|
||||
#import "CustomView.h"
|
||||
#import "H5View.h"
|
||||
@implementation CustomView
|
||||
{
|
||||
// WKWebView *webview;
|
||||
// UIView* unityView;
|
||||
// //ViewCfg config;
|
||||
// CGPoint hitTestLocation;
|
||||
// BOOL isTouchWebView;
|
||||
// BOOL isWebviewOpen;
|
||||
// BOOL canCT;
|
||||
int test;
|
||||
}
|
||||
+(id) shared{
|
||||
static CustomView *view = nil;
|
||||
static dispatch_once_t onceToken;
|
||||
|
||||
dispatch_once(&onceToken, ^{view = [[self alloc] init];});
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
-(void)initView{
|
||||
// Initialize a WKWebViewConfiguration object.
|
||||
|
||||
|
||||
// UITapGestureRecognizer *gest = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
|
||||
// [unityView addGestureRecognizer:gest];
|
||||
// [gest setDelegate:self];
|
||||
// CustomGestureDelegate *deleg = [[CustomGestureDelegate alloc] init];
|
||||
// [gest setDelegate:deleg];
|
||||
// gest.cancelsTouchesInView = false; // to recieve touchesBegan callback even if gesture is recognized
|
||||
// gest.delaysTouchesBegan = false; // to not delay touchesBegan callback
|
||||
// gest.delaysTouchesEnded = false; // to not delay touchesEnded callback
|
||||
// CustomGestureDelegate *deleg = [[CustomGestureDelegate alloc] init];
|
||||
// [gest setDelegate:deleg];
|
||||
// NSTimeInterval delayInSeconds = 7;
|
||||
// dispatch_time_t popTime2 = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
|
||||
// dispatch_after(popTime2, dispatch_get_main_queue(), ^(void){
|
||||
//
|
||||
// [self loop];
|
||||
// });
|
||||
// [self setWebviewPadding:CGRectMake(0, 120, 0, 180)];
|
||||
}
|
||||
|
||||
|
||||
//-(void)setConfig:(ViewCfg)cfg{
|
||||
// config = cfg;
|
||||
//
|
||||
// webview.frame = config.rect;
|
||||
// // webview.frame = CGRectMake(0, 100, self.bounds.size.width, 500);
|
||||
// //canCT = YES;
|
||||
//}
|
||||
|
||||
|
||||
|
||||
// -(void)handleTap:(UITapGestureRecognizer*) gest{
|
||||
// CGPoint pt = [gest locationInView:webview];
|
||||
// // NSLog(@"GestureRecognizer x:%f, y:%f", pt.x, pt.y);
|
||||
// // if (gest.state == UIGestureRecognizerStateBegan){
|
||||
// // NSLog(@"Begin x:%f, y:%f", pt.x, pt.y);
|
||||
// // }
|
||||
// if (gest.state == UIGestureRecognizerStateEnded){
|
||||
// NSLog(@"GestureRecognizer End x:%f, y:%f", pt.x, pt.y);
|
||||
// }
|
||||
// }
|
||||
// //- (void) touchesBegan:(NSSet *)touches withEvent:(nullable UIEvent *)event{
|
||||
// // UITouch *touch = [[event allTouches] anyObject];
|
||||
// //
|
||||
// // CGPoint location = [touch locationInView:self];
|
||||
// // beginTouches = touches;
|
||||
// // beginEvent = event;
|
||||
// // NSLog(@"Touch Began CustomView");
|
||||
// //}
|
||||
// //
|
||||
// //- (void) touchesEnded:(NSSet *)touches withEvent:(nullable UIEvent *)event{
|
||||
// // UITouch *touch = [[event allTouches] anyObject];
|
||||
// //
|
||||
// // CGPoint location = [touch locationInView:self];
|
||||
// // beginTouches = touches;
|
||||
// // beginEvent = event;
|
||||
// // NSLog(@"Touch Ended CustomView");
|
||||
// //}
|
||||
|
||||
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
|
||||
|
||||
//UIView* touchedView = [super hitTest:point withEvent:event];
|
||||
// if([[H5View shared] isDarkThough]){
|
||||
// NSLog(@"Point coordinates: x = %f, y = %f", point.x, point.y);
|
||||
// NSLog(@"Point coordinates: max = %f,",self.bounds.size.width);
|
||||
UIView* testview = [ [H5View shared]hitTest:point withEvent:event];
|
||||
return testview;
|
||||
// }
|
||||
// else
|
||||
// return touchedView;
|
||||
}
|
||||
|
||||
// -(void)showWebview:(NSString*)url{
|
||||
// // NSLog(@"Native showWebview: %@", url);
|
||||
// NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0];
|
||||
// [webview loadRequest:request];
|
||||
// if (webview.superview == nil)
|
||||
// [self insertSubview:webview atIndex:0];
|
||||
// isWebviewOpen = YES;
|
||||
// }
|
||||
|
||||
// -(void)hideWebview{
|
||||
// // NSLog(@"Native hideWebview");
|
||||
// [webview removeFromSuperview];
|
||||
// isWebviewOpen = NO;
|
||||
// }
|
||||
|
||||
// -(void)scrollWebview:(CGPoint)offset{
|
||||
// CGPoint pt = [webview.scrollView contentOffset];
|
||||
// if (offset.y < 0 && pt.y <= 0) return;
|
||||
// float val = pt.y + offset.y*0.5;
|
||||
// if (val<0) val = 0;
|
||||
// [webview.scrollView setContentOffset:CGPointMake(0, val)];
|
||||
// }
|
||||
|
||||
// -(void)setTouchWebview:(BOOL)flag forceCT:(BOOL)force{
|
||||
// if (!isWebviewOpen) return;
|
||||
// isTouchWebView = flag;
|
||||
// //unityView.userInteractionEnabled = !flag;
|
||||
|
||||
// if (canCT || force){
|
||||
// if (!CGRectContainsPoint(webview.bounds, hitTestLocation))
|
||||
// return;
|
||||
// [self doCT];
|
||||
// }
|
||||
// }
|
||||
|
||||
// -(void)tapWithPoint:(CGPoint)zspoint{
|
||||
// [Helpers helpAt:1 AtPoint:zspoint withTouchPhase:UITouchPhaseBegan];
|
||||
// [Helpers helpAt:1 AtPoint:zspoint withTouchPhase:UITouchPhaseEnded];
|
||||
// }
|
||||
|
||||
|
||||
// -(void)enableCT:(BOOL)flag{
|
||||
// // NSLog(@"Native enableCT: %d",flag);
|
||||
// canCT = flag;
|
||||
// }
|
||||
|
||||
// -(void)doCT{
|
||||
// NSTimeInterval delayInSeconds = 0.1;
|
||||
// dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
|
||||
// dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
|
||||
// // NSLog(@"CT x:%f, y:%f", self->hitTestLocation.x, self->hitTestLocation.y);
|
||||
// self->unityView.userInteractionEnabled = false;
|
||||
// [self tapWithPoint:self->hitTestLocation];
|
||||
// self->unityView.userInteractionEnabled = true;
|
||||
// });
|
||||
// }
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,93 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9cdb389af033b478f8273050f8b73d79
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
: Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Editor: 1
|
||||
Exclude Linux64: 1
|
||||
Exclude OSXUniversal: 1
|
||||
Exclude VisionOS: 1
|
||||
Exclude WebGL: 1
|
||||
Exclude Win: 1
|
||||
Exclude Win64: 1
|
||||
Exclude iOS: 0
|
||||
Exclude tvOS: 1
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
- first:
|
||||
Standalone: Linux64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Standalone: OSXUniversal
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Standalone: Win
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Standalone: Win64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
VisionOS: VisionOS
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
CPU: ARM64
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
CPU: AnyCPU
|
||||
CompileFlags:
|
||||
FrameworkDependencies: CoreData;
|
||||
- first:
|
||||
tvOS: tvOS
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,61 @@
|
||||
#import <AdSupport/ASIdentifierManager.h>
|
||||
#import <AppTrackingTransparency/AppTrackingTransparency.h> // iOS 14及以上需要
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
// 获取IDFA的函数
|
||||
const char* _GetIDFA() {
|
||||
// 检查iOS版本
|
||||
if (@available(iOS 14, *)) {
|
||||
// 检查当前追踪授权状态。注意:实际请求权限的弹窗应在合适时机主动调用,这里仅获取当前状态下的IDFA。
|
||||
ATTrackingManagerAuthorizationStatus status = [ATTrackingManager trackingAuthorizationStatus];
|
||||
if (status == ATTrackingManagerAuthorizationStatusAuthorized) {
|
||||
// 用户已授权
|
||||
NSString *idfaString = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
|
||||
return strdup([idfaString UTF8String]);
|
||||
} else {
|
||||
// 用户未授权、拒绝或受限
|
||||
NSLog(@"用户未授权广告追踪。状态: %ld", (long)status);
|
||||
return strdup("");
|
||||
}
|
||||
} else {
|
||||
// Fallback on earlier versions - iOS 14以下版本
|
||||
if ([[ASIdentifierManager sharedManager] isAdvertisingTrackingEnabled]) {
|
||||
NSString *idfaString = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
|
||||
return strdup([idfaString UTF8String]);
|
||||
} else {
|
||||
NSLog(@"用户限制了广告追踪。");
|
||||
return strdup("");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 请求追踪权限的函数 (应在C#端选择合适的时机调用,例如用户点击同意隐私协议后)
|
||||
void _RequestTrackingPermission() {
|
||||
if (@available(iOS 14, *)) {
|
||||
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
|
||||
// 此回调在用户做出选择后执行
|
||||
NSString *idfaString = @"";
|
||||
if (status == ATTrackingManagerAuthorizationStatusAuthorized) {
|
||||
idfaString = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
|
||||
}
|
||||
// 可以使用UnitySendMessage将结果异步回传给Unity
|
||||
// UnitySendMessage("GameObjectName", "MethodName", [idfaString UTF8String]);
|
||||
}];
|
||||
} else {
|
||||
// iOS 13或更低版本,无需请求权限,直接检查isAdvertisingTrackingEnabled
|
||||
// 这里可以不做处理,或者也通过UnitySendMessage通知Unity
|
||||
}
|
||||
}
|
||||
|
||||
// 获取IDFV的函数
|
||||
const char* _GetIDFV() {
|
||||
NSString *idfvString = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
|
||||
if (idfvString) {
|
||||
return strdup([idfvString UTF8String]);
|
||||
} else {
|
||||
return strdup("");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6ca1a33377b43c4448729e3052dbb58a
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f6d1cb4664beff64595976ffb1f68ca0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,81 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bf523cc64d194963aa7661e7d2944feb
|
||||
labels:
|
||||
- gvh
|
||||
- gvh_version-12.8.0
|
||||
- gvhp_exportpath-Plugins/iOS/Firebase/libFirebaseCppAnalytics.a
|
||||
timeCreated: 1480838400
|
||||
PluginImporter:
|
||||
serializedVersion: 1
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
platformData:
|
||||
Android:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
Any:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
Editor:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
Linux:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
Linux64:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
LinuxUniversal:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
OSXIntel:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
OSXIntel64:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
OSXUniversal:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
Web:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
WebStreamed:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
Win:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
Win64:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
WindowsStoreApps:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
iOS:
|
||||
enabled: 1
|
||||
settings:
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
tvOS:
|
||||
enabled: 0
|
||||
settings:
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,81 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 601e8e1d2d2744929ede33676cbeccc0
|
||||
labels:
|
||||
- gvh
|
||||
- gvh_version-12.8.0
|
||||
- gvhp_exportpath-Plugins/iOS/Firebase/libFirebaseCppApp.a
|
||||
timeCreated: 1480838400
|
||||
PluginImporter:
|
||||
serializedVersion: 1
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
platformData:
|
||||
Android:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
Any:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
Editor:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
Linux:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
Linux64:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
LinuxUniversal:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
OSXIntel:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
OSXIntel64:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
OSXUniversal:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
Web:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
WebStreamed:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
Win:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
Win64:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
WindowsStoreApps:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
iOS:
|
||||
enabled: 1
|
||||
settings:
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
tvOS:
|
||||
enabled: 0
|
||||
settings:
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,81 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c9a5f5c47ed44459ae2c09b918d44344
|
||||
labels:
|
||||
- gvh
|
||||
- gvh_version-12.8.0
|
||||
- gvhp_exportpath-Plugins/iOS/Firebase/libFirebaseCppCrashlytics.a
|
||||
timeCreated: 1480838400
|
||||
PluginImporter:
|
||||
serializedVersion: 1
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
platformData:
|
||||
Android:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
Any:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
Editor:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
Linux:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
Linux64:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
LinuxUniversal:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
OSXIntel:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
OSXIntel64:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
OSXUniversal:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
Web:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
WebStreamed:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
Win:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
Win64:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
WindowsStoreApps:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
iOS:
|
||||
enabled: 1
|
||||
settings:
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
tvOS:
|
||||
enabled: 0
|
||||
settings:
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,81 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 33ee8d6580a8412d811e9c6eab8c2cb9
|
||||
labels:
|
||||
- gvh
|
||||
- gvh_version-12.8.0
|
||||
- gvhp_exportpath-Plugins/iOS/Firebase/libFirebaseCppMessaging.a
|
||||
timeCreated: 1480838400
|
||||
PluginImporter:
|
||||
serializedVersion: 1
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
platformData:
|
||||
Android:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
Any:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
Editor:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
Linux:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
Linux64:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
LinuxUniversal:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
OSXIntel:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
OSXIntel64:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
OSXUniversal:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
Web:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
WebStreamed:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
Win:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
Win64:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
WindowsStoreApps:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
iOS:
|
||||
enabled: 1
|
||||
settings:
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
tvOS:
|
||||
enabled: 0
|
||||
settings:
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,10 @@
|
||||
// Copyright 2016 Google Inc. All Rights Reserved.
|
||||
|
||||
#import <GoogleMobileAds/GoogleMobileAds.h>
|
||||
|
||||
@protocol GADUAdNetworkExtras <NSObject>
|
||||
|
||||
- (nonnull id<GADAdNetworkExtras>)adNetworkExtrasWithDictionary:
|
||||
(nonnull NSDictionary<NSString *, NSString *> *)extras;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,81 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1c0d8a6c9b36440eaa4c01518670217f
|
||||
labels:
|
||||
- gvh
|
||||
- gvh_version-10.6.0
|
||||
- gvhp_exportpath-Plugins/iOS/GADUAdNetworkExtras.h
|
||||
timeCreated: 1480838400
|
||||
PluginImporter:
|
||||
serializedVersion: 1
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
platformData:
|
||||
Android:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
Any:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
Editor:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
Linux:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86
|
||||
Linux64:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86_64
|
||||
LinuxUniversal:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
OSXIntel:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86
|
||||
OSXIntel64:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86_64
|
||||
OSXUniversal:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
Web:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
WebStreamed:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
Win:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86
|
||||
Win64:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86_64
|
||||
WindowsStoreApps:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
iOS:
|
||||
enabled: 1
|
||||
settings:
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
tvOS:
|
||||
enabled: 0
|
||||
settings:
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>API_KEY</key>
|
||||
<string>AIzaSyCQKdu4-goO2dQhQSqCsuroIyo0RASAI9w</string>
|
||||
<key>GCM_SENDER_ID</key>
|
||||
<string>1019035639411</string>
|
||||
<key>PLIST_VERSION</key>
|
||||
<string>1</string>
|
||||
<key>BUNDLE_ID</key>
|
||||
<string>com.fashionstargame.zoomatch</string>
|
||||
<key>PROJECT_ID</key>
|
||||
<string>piko-wild-safari-915be</string>
|
||||
<key>STORAGE_BUCKET</key>
|
||||
<string>piko-wild-safari-915be.firebasestorage.app</string>
|
||||
<key>IS_ADS_ENABLED</key>
|
||||
<false></false>
|
||||
<key>IS_ANALYTICS_ENABLED</key>
|
||||
<false></false>
|
||||
<key>IS_APPINVITE_ENABLED</key>
|
||||
<true></true>
|
||||
<key>IS_GCM_ENABLED</key>
|
||||
<true></true>
|
||||
<key>IS_SIGNIN_ENABLED</key>
|
||||
<true></true>
|
||||
<key>GOOGLE_APP_ID</key>
|
||||
<string>1:1019035639411:ios:c21f215cc75527e606d406</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7fceb9682f34943e48d8a4aa91da5c43
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// H5View.h
|
||||
// TestGameWeb
|
||||
//
|
||||
// Created by Mac on 2024/1/30.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <WebKit/WebKit.h>
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface H5View : UIView<WKUIDelegate, WKNavigationDelegate,WKScriptMessageHandler>
|
||||
+(id) shared;
|
||||
-(void)initView;
|
||||
-(void)showWebview:(NSString*)url;
|
||||
-(void)showDarkWebview:(int)type;
|
||||
-(void)hideWebview;
|
||||
-(void)showView:(BOOL)show;
|
||||
-(void)setIconProgress:(float)value;
|
||||
-(void)setViewPadding:(CGRect)rect;
|
||||
-(void)SetDarkThough:(BOOL)though;
|
||||
-(void)setViewBtn:(CGRect)rect;
|
||||
-(void)setFullScreen;
|
||||
-(void)addH5Field:(int)field1 field2:(int)field2 field3:(int)field3 field4:(int)field4 field5:(int)field5 field6:(char* )field6 field7:(char* )field7 dark_url:(char*)dark_url light_url:(char*)light_url field8:(BOOL)field8 web_through_probability:(char*)web_through_probability click_add_time:(char*)click_add_time ;
|
||||
-(void)setClickView;
|
||||
-(void)enableCT:(BOOL)flag;
|
||||
-(void)showFlyBtn:(BOOL)flag;
|
||||
-(void)setInH5View:(BOOL)flag;
|
||||
-(void)upDataH5times:(char*)weblink times:(int)times is_dark:(BOOL)is_dark;
|
||||
-(void)setFlyBtnTag:(BOOL)isShow;
|
||||
-(void)setRewardBtnTag:(BOOL)isShow;
|
||||
-(void)SetOffset:(int)offsety offset_y1:(int)offsety1;
|
||||
|
||||
@end
|
||||
@interface H5View (WKNavigationDelegate) <WKNavigationDelegate>
|
||||
@end
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7b81939315f9c4cd9bad890bebc3acd8
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e0a15e7dc96084b68b1e4e3d7d74a932
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 28c983f67bd71da4bbd4883eda7f2855
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,192 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina5_5" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="GADTMediumTemplateView"/>
|
||||
<view opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" translatesAutoresizingMaskIntoConstraints="NO" id="h2X-7h-r2O" customClass="GADTTemplateView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="355" height="402"/>
|
||||
<subviews>
|
||||
<view opaque="NO" clearsContextBeforeDrawing="NO" userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qZf-ej-Zxg">
|
||||
<rect key="frame" x="10" y="199.66666666666663" width="335" height="202.33333333333337"/>
|
||||
<subviews>
|
||||
<button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ekc-Zs-FHH">
|
||||
<rect key="frame" x="0.0" y="153.33333333333334" width="335" height="39"/>
|
||||
<color key="backgroundColor" red="0.25882352939999997" green="0.52156862749999999" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="39" id="y8W-B6-JKk"/>
|
||||
</constraints>
|
||||
<state key="normal" title="Button">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JRU-6T-XIW">
|
||||
<rect key="frame" x="0.0" y="0.0" width="335" height="51"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dtV-H5-CUV">
|
||||
<rect key="frame" x="0.0" y="0.0" width="335" height="51"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" horizontalCompressionResistancePriority="1" verticalCompressionResistancePriority="1" translatesAutoresizingMaskIntoConstraints="NO" id="IDQ-dK-aNl">
|
||||
<rect key="frame" x="0.0" y="0.0" width="51" height="51"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1" verticalCompressionResistancePriority="1" translatesAutoresizingMaskIntoConstraints="NO" id="tcZ-gP-ynt">
|
||||
<rect key="frame" x="0.0" y="0.0" width="51" height="51"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="tcZ-gP-ynt" firstAttribute="leading" secondItem="IDQ-dK-aNl" secondAttribute="leading" id="080-xf-xNS"/>
|
||||
<constraint firstItem="tcZ-gP-ynt" firstAttribute="top" secondItem="IDQ-dK-aNl" secondAttribute="top" id="7ay-A1-lkK"/>
|
||||
<constraint firstAttribute="trailing" secondItem="tcZ-gP-ynt" secondAttribute="trailing" id="D58-gg-wEz"/>
|
||||
<constraint firstAttribute="width" secondItem="IDQ-dK-aNl" secondAttribute="height" multiplier="1:1" id="fy0-5g-4fT"/>
|
||||
<constraint firstAttribute="bottom" secondItem="tcZ-gP-ynt" secondAttribute="bottom" id="mcB-Kl-8SB"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZMg-Gj-lfR">
|
||||
<rect key="frame" x="51" y="0.0" width="284" height="51"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Ad" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PfZ-cd-zxs">
|
||||
<rect key="frame" x="10" y="30" width="28" height="21"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="5e5-3M-FF3"/>
|
||||
<constraint firstAttribute="width" constant="28" id="L2a-Ko-fWP"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.2274509804" green="0.4039215686" blue="0.15686274510000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NKU-cb-NgA">
|
||||
<rect key="frame" x="10" y="0.0" width="266" height="25"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="25" id="iVB-Nr-QJm"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ic2-4I-EtF">
|
||||
<rect key="frame" x="43" y="30" width="241" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Nc5-4a-DC8">
|
||||
<rect key="frame" x="43" y="29" width="241" height="20.333333333333329"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="PfZ-cd-zxs" firstAttribute="top" secondItem="NKU-cb-NgA" secondAttribute="bottom" constant="5" id="8CL-eR-AJN"/>
|
||||
<constraint firstAttribute="trailing" secondItem="ic2-4I-EtF" secondAttribute="trailing" id="9Ig-ff-Xy9"/>
|
||||
<constraint firstItem="ic2-4I-EtF" firstAttribute="leading" secondItem="PfZ-cd-zxs" secondAttribute="trailing" constant="5" id="BvN-q8-2tx"/>
|
||||
<constraint firstItem="NKU-cb-NgA" firstAttribute="leading" secondItem="ZMg-Gj-lfR" secondAttribute="leading" constant="10" id="R0a-Yh-5hA"/>
|
||||
<constraint firstAttribute="bottom" secondItem="ic2-4I-EtF" secondAttribute="bottom" id="RsF-hZ-dlg"/>
|
||||
<constraint firstAttribute="trailing" secondItem="NKU-cb-NgA" secondAttribute="trailing" constant="8" id="Rur-KX-Eao"/>
|
||||
<constraint firstItem="Nc5-4a-DC8" firstAttribute="top" secondItem="NKU-cb-NgA" secondAttribute="bottom" constant="4" id="Vd7-ge-1KD"/>
|
||||
<constraint firstItem="PfZ-cd-zxs" firstAttribute="leading" secondItem="ZMg-Gj-lfR" secondAttribute="leading" constant="10" id="XOm-ic-qzo"/>
|
||||
<constraint firstItem="NKU-cb-NgA" firstAttribute="top" secondItem="ZMg-Gj-lfR" secondAttribute="top" id="XXu-i3-Bb8"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Nc5-4a-DC8" secondAttribute="trailing" id="fr4-RB-zCl"/>
|
||||
<constraint firstItem="ic2-4I-EtF" firstAttribute="leading" secondItem="PfZ-cd-zxs" secondAttribute="trailing" constant="5" id="hI7-l2-cCQ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="PfZ-cd-zxs" secondAttribute="bottom" id="s9K-uZ-2fK"/>
|
||||
<constraint firstItem="Nc5-4a-DC8" firstAttribute="leading" secondItem="PfZ-cd-zxs" secondAttribute="trailing" constant="5" id="uDG-1E-LGP"/>
|
||||
<constraint firstItem="ic2-4I-EtF" firstAttribute="top" secondItem="NKU-cb-NgA" secondAttribute="bottom" constant="5" id="zDa-Y8-eNv"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="IDQ-dK-aNl" secondAttribute="bottom" id="Pz3-Ne-UvS"/>
|
||||
<constraint firstItem="IDQ-dK-aNl" firstAttribute="top" secondItem="dtV-H5-CUV" secondAttribute="top" id="Um4-Pc-PRn"/>
|
||||
<constraint firstItem="IDQ-dK-aNl" firstAttribute="leading" secondItem="dtV-H5-CUV" secondAttribute="leading" id="ygw-iI-8p3"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="dtV-H5-CUV" secondAttribute="bottom" id="JTS-sy-ZIx"/>
|
||||
<constraint firstItem="dtV-H5-CUV" firstAttribute="leading" secondItem="JRU-6T-XIW" secondAttribute="leading" id="KnB-yd-LES"/>
|
||||
<constraint firstAttribute="trailing" secondItem="dtV-H5-CUV" secondAttribute="trailing" id="c6Z-Wa-u8v"/>
|
||||
<constraint firstItem="dtV-H5-CUV" firstAttribute="top" secondItem="JRU-6T-XIW" secondAttribute="top" id="hLc-rA-agZ"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="41W-IZ-S0S">
|
||||
<rect key="frame" x="0.0" y="61.000000000000021" width="335" height="82.333333333333314"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="20.329999999999998" id="NUh-RX-SnN"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EEy-n8-ZT9">
|
||||
<rect key="frame" x="0.0" y="61.000000000000021" width="335" height="82.333333333333314"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<accessibility key="accessibilityConfiguration">
|
||||
<accessibilityTraits key="traits" notEnabled="YES"/>
|
||||
</accessibility>
|
||||
<constraints>
|
||||
<constraint firstItem="EEy-n8-ZT9" firstAttribute="top" secondItem="JRU-6T-XIW" secondAttribute="bottom" constant="10" id="07C-eK-e4L"/>
|
||||
<constraint firstAttribute="trailing" secondItem="EEy-n8-ZT9" secondAttribute="trailing" id="0eV-cw-Vb0"/>
|
||||
<constraint firstItem="JRU-6T-XIW" firstAttribute="top" secondItem="qZf-ej-Zxg" secondAttribute="top" id="7V3-bf-fEw"/>
|
||||
<constraint firstItem="JRU-6T-XIW" firstAttribute="leading" secondItem="qZf-ej-Zxg" secondAttribute="leading" id="7q0-md-byq"/>
|
||||
<constraint firstItem="EEy-n8-ZT9" firstAttribute="leading" secondItem="qZf-ej-Zxg" secondAttribute="leading" id="H9Y-Xr-Mvb"/>
|
||||
<constraint firstItem="Ekc-Zs-FHH" firstAttribute="top" secondItem="41W-IZ-S0S" secondAttribute="bottom" constant="10" id="Haj-5X-7Jq"/>
|
||||
<constraint firstItem="41W-IZ-S0S" firstAttribute="top" secondItem="JRU-6T-XIW" secondAttribute="bottom" constant="10" id="LUq-TO-4Ri"/>
|
||||
<constraint firstItem="Ekc-Zs-FHH" firstAttribute="leading" secondItem="qZf-ej-Zxg" secondAttribute="leading" id="N0d-Ud-bcH"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Ekc-Zs-FHH" secondAttribute="trailing" id="QEk-Nl-LP0"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Ekc-Zs-FHH" secondAttribute="bottom" constant="10" id="fQb-8m-kWu"/>
|
||||
<constraint firstAttribute="trailing" secondItem="JRU-6T-XIW" secondAttribute="trailing" id="fpH-cd-zrf"/>
|
||||
<constraint firstAttribute="trailing" secondItem="41W-IZ-S0S" secondAttribute="trailing" id="rZu-Yd-6qa"/>
|
||||
<constraint firstItem="Ekc-Zs-FHH" firstAttribute="top" secondItem="EEy-n8-ZT9" secondAttribute="bottom" constant="10" id="rx0-LH-lgr"/>
|
||||
<constraint firstItem="41W-IZ-S0S" firstAttribute="leading" secondItem="qZf-ej-Zxg" secondAttribute="leading" id="w16-DI-Ydj"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view clipsSubviews="YES" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="1ne-Xk-CBH" customClass="GADMediaView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="355" height="199.66666666666666"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="1ne-Xk-CBH" secondAttribute="height" multiplier="16:9" id="kTC-ip-nfX"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<accessibility key="accessibilityConfiguration">
|
||||
<accessibilityTraits key="traits" notEnabled="YES"/>
|
||||
</accessibility>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="qZf-ej-Zxg" secondAttribute="trailing" constant="10" id="1Rv-ij-HDB"/>
|
||||
<constraint firstItem="qZf-ej-Zxg" firstAttribute="leading" secondItem="h2X-7h-r2O" secondAttribute="leading" constant="10" id="OCX-hu-Rvd"/>
|
||||
<constraint firstItem="qZf-ej-Zxg" firstAttribute="top" secondItem="1ne-Xk-CBH" secondAttribute="bottom" id="aHY-Ht-nDt"/>
|
||||
<constraint firstItem="1ne-Xk-CBH" firstAttribute="leading" secondItem="h2X-7h-r2O" secondAttribute="leading" id="cj9-Mw-8MR"/>
|
||||
<constraint firstAttribute="trailing" secondItem="1ne-Xk-CBH" secondAttribute="trailing" id="gLW-Sf-wcR"/>
|
||||
<constraint firstItem="1ne-Xk-CBH" firstAttribute="top" secondItem="h2X-7h-r2O" secondAttribute="top" id="ipR-Fl-Mie"/>
|
||||
<constraint firstAttribute="bottom" secondItem="qZf-ej-Zxg" secondAttribute="bottom" id="sWi-Jm-MXA"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="adBadge" destination="PfZ-cd-zxs" id="l4Z-NW-nRv"/>
|
||||
<outlet property="advertiserView" destination="ic2-4I-EtF" id="l3s-ci-Wqi"/>
|
||||
<outlet property="bodyView" destination="41W-IZ-S0S" id="Iwg-fc-zE1"/>
|
||||
<outlet property="callToActionView" destination="Ekc-Zs-FHH" id="jEd-fy-AYv"/>
|
||||
<outlet property="headlineView" destination="NKU-cb-NgA" id="rQk-ZH-WzT"/>
|
||||
<outlet property="iconView" destination="tcZ-gP-ynt" id="v9E-Jd-ls7"/>
|
||||
<outlet property="mediaView" destination="1ne-Xk-CBH" id="ym4-4P-qZ1"/>
|
||||
<outlet property="starRatingView" destination="EEy-n8-ZT9" id="2zm-9R-j0T"/>
|
||||
<outlet property="storeView" destination="Nc5-4a-DC8" id="hEJ-Yq-J1P"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-68.840579710144937" y="794.83695652173924"/>
|
||||
</view>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
</objects>
|
||||
</document>
|
||||
@@ -0,0 +1,81 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 766f36c9503c48e5915b2dbb1b312f64
|
||||
labels:
|
||||
- gvh
|
||||
- gvh_version-10.6.0
|
||||
- gvhp_exportpath-Plugins/iOS/NativeTemplates/GADTMediumTemplateView.xib
|
||||
timeCreated: 1480838400
|
||||
PluginImporter:
|
||||
serializedVersion: 1
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
platformData:
|
||||
Android:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
Any:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
Editor:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
Linux:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86
|
||||
Linux64:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86_64
|
||||
LinuxUniversal:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
OSXIntel:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86
|
||||
OSXIntel64:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86_64
|
||||
OSXUniversal:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
Web:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
WebStreamed:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
Win:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86
|
||||
Win64:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86_64
|
||||
WindowsStoreApps:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
iOS:
|
||||
enabled: 1
|
||||
settings:
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
tvOS:
|
||||
enabled: 0
|
||||
settings:
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina5_5" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="GADTSmallTemplateView"/>
|
||||
<view opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" translatesAutoresizingMaskIntoConstraints="NO" id="h2X-7h-r2O" customClass="GADTTemplateView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="403" height="101"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="L39-RW-Fxr">
|
||||
<rect key="frame" x="0.0" y="0.0" width="100.66666666666667" height="101"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6ux-FJ-pGo" customClass="GADMediaView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="100.66666666666667" height="101"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="6ux-FJ-pGo" firstAttribute="leading" secondItem="L39-RW-Fxr" secondAttribute="leading" id="27x-eI-Vv6"/>
|
||||
<constraint firstItem="6ux-FJ-pGo" firstAttribute="top" secondItem="L39-RW-Fxr" secondAttribute="top" id="ags-Wp-AEy"/>
|
||||
<constraint firstAttribute="bottom" secondItem="6ux-FJ-pGo" secondAttribute="bottom" id="dPo-Dh-hjm"/>
|
||||
<constraint firstAttribute="width" secondItem="L39-RW-Fxr" secondAttribute="height" multiplier="1:1" id="evj-q8-mFJ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="6ux-FJ-pGo" secondAttribute="trailing" id="kq2-nx-atN"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9ag-e3-7oH">
|
||||
<rect key="frame" x="110.66666666666666" y="60" width="282.33333333333337" height="31"/>
|
||||
<color key="backgroundColor" red="0.25882352941176467" green="0.52156862745098043" blue="0.95686274509803915" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<state key="normal" title="Button">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Lx5-Xt-1uw">
|
||||
<rect key="frame" x="110.66666666666666" y="10" width="282.33333333333337" height="40"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Headline" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DKj-id-Sm4">
|
||||
<rect key="frame" x="0.0" y="0.0" width="282.33333333333331" height="16"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Zjv-ch-qcM">
|
||||
<rect key="frame" x="29.999999999999986" y="21" width="252.33333333333331" height="19"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Ad" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hl4-7y-gXg">
|
||||
<rect key="frame" x="0.0" y="21" width="25" height="19"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="19" id="zKN-zg-1DK"/>
|
||||
<constraint firstAttribute="width" constant="25" id="zzo-oJ-f7v"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.2274509804" green="0.4039215686" blue="0.15686274510000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pWT-IG-tgy">
|
||||
<rect key="frame" x="29" y="18" width="245" height="24"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="hl4-7y-gXg" firstAttribute="top" secondItem="DKj-id-Sm4" secondAttribute="bottom" constant="5" id="0Tg-39-lC8"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Zjv-ch-qcM" secondAttribute="bottom" id="CjG-2q-n2F"/>
|
||||
<constraint firstAttribute="trailing" secondItem="DKj-id-Sm4" secondAttribute="trailing" id="UoI-a1-i42"/>
|
||||
<constraint firstItem="Zjv-ch-qcM" firstAttribute="leading" secondItem="hl4-7y-gXg" secondAttribute="trailing" constant="5" id="fU5-cu-7Xt"/>
|
||||
<constraint firstItem="Zjv-ch-qcM" firstAttribute="top" secondItem="DKj-id-Sm4" secondAttribute="bottom" constant="5" id="rEn-LP-hhs"/>
|
||||
<constraint firstItem="DKj-id-Sm4" firstAttribute="top" secondItem="Lx5-Xt-1uw" secondAttribute="top" id="sSI-Oo-ibp"/>
|
||||
<constraint firstItem="DKj-id-Sm4" firstAttribute="leading" secondItem="Lx5-Xt-1uw" secondAttribute="leading" id="syr-GK-hqO"/>
|
||||
<constraint firstAttribute="bottom" secondItem="hl4-7y-gXg" secondAttribute="bottom" id="x5d-wM-uYg"/>
|
||||
<constraint firstItem="hl4-7y-gXg" firstAttribute="leading" secondItem="Lx5-Xt-1uw" secondAttribute="leading" id="xIO-Ue-ETa"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Zjv-ch-qcM" secondAttribute="trailing" id="ygc-FQ-5ah"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<accessibility key="accessibilityConfiguration">
|
||||
<accessibilityTraits key="traits" notEnabled="YES"/>
|
||||
<bool key="isElement" value="YES"/>
|
||||
</accessibility>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="9ag-e3-7oH" secondAttribute="trailing" constant="10" id="170-UP-YGV"/>
|
||||
<constraint firstItem="Lx5-Xt-1uw" firstAttribute="top" secondItem="h2X-7h-r2O" secondAttribute="top" constant="10" id="3QL-ag-qrO"/>
|
||||
<constraint firstItem="Lx5-Xt-1uw" firstAttribute="height" secondItem="9ag-e3-7oH" secondAttribute="height" multiplier="1.3" id="Hdt-VV-9Kw"/>
|
||||
<constraint firstItem="L39-RW-Fxr" firstAttribute="leading" secondItem="h2X-7h-r2O" secondAttribute="leading" id="ISF-wz-Ozg"/>
|
||||
<constraint firstItem="L39-RW-Fxr" firstAttribute="width" relation="lessThanOrEqual" secondItem="h2X-7h-r2O" secondAttribute="width" multiplier="0.25" id="ItS-CH-KDp"/>
|
||||
<constraint firstItem="Lx5-Xt-1uw" firstAttribute="leading" secondItem="L39-RW-Fxr" secondAttribute="trailing" constant="10" id="Qgh-CR-lQY"/>
|
||||
<constraint firstItem="9ag-e3-7oH" firstAttribute="top" secondItem="Lx5-Xt-1uw" secondAttribute="bottom" constant="10" id="RyV-eO-eP8"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Lx5-Xt-1uw" secondAttribute="trailing" constant="10" id="YId-cX-a5U"/>
|
||||
<constraint firstItem="9ag-e3-7oH" firstAttribute="top" secondItem="Lx5-Xt-1uw" secondAttribute="bottom" constant="10" id="b2E-4c-sl4"/>
|
||||
<constraint firstItem="L39-RW-Fxr" firstAttribute="centerY" secondItem="h2X-7h-r2O" secondAttribute="centerY" id="eXQ-jP-VfJ"/>
|
||||
<constraint firstItem="9ag-e3-7oH" firstAttribute="leading" secondItem="L39-RW-Fxr" secondAttribute="trailing" constant="10" id="mXy-rL-NiY"/>
|
||||
<constraint firstAttribute="bottom" secondItem="9ag-e3-7oH" secondAttribute="bottom" constant="10" id="ywj-Y9-XCT"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="adBadge" destination="hl4-7y-gXg" id="Bp7-FM-VVW"/>
|
||||
<outlet property="advertiserView" destination="Zjv-ch-qcM" id="Ku9-M6-SEf"/>
|
||||
<outlet property="callToActionView" destination="9ag-e3-7oH" id="Uh9-xd-ccJ"/>
|
||||
<outlet property="headlineView" destination="DKj-id-Sm4" id="fwg-CO-DrR"/>
|
||||
<outlet property="mediaView" destination="6ux-FJ-pGo" id="aCz-rd-9bD"/>
|
||||
<outlet property="storeView" destination="pWT-IG-tgy" id="f3q-8l-We7"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-50.000000000000007" y="652.58152173913049"/>
|
||||
</view>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
</objects>
|
||||
</document>
|
||||
@@ -0,0 +1,81 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6af78782470b4da9994fc4cf04f03183
|
||||
labels:
|
||||
- gvh
|
||||
- gvh_version-10.6.0
|
||||
- gvhp_exportpath-Plugins/iOS/NativeTemplates/GADTSmallTemplateView.xib
|
||||
timeCreated: 1480838400
|
||||
PluginImporter:
|
||||
serializedVersion: 1
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
platformData:
|
||||
Android:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
Any:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
Editor:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
Linux:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86
|
||||
Linux64:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86_64
|
||||
LinuxUniversal:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
OSXIntel:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86
|
||||
OSXIntel64:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86_64
|
||||
OSXUniversal:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
Web:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
WebStreamed:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
Win:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86
|
||||
Win64:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86_64
|
||||
WindowsStoreApps:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
iOS:
|
||||
enabled: 1
|
||||
settings:
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
tvOS:
|
||||
enabled: 0
|
||||
settings:
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,286 @@
|
||||
|
||||
#import <WebKit/WKWebView.h>
|
||||
#import <WebKit/WKNavigationDelegate.h>
|
||||
#import <WebKit/WKNavigationAction.h>
|
||||
#import <WebKit/WKNavigationResponse.h>
|
||||
#import <WebKit/WKNavigation.h>
|
||||
#import <WebKit/WKUserContentController.h>
|
||||
#import <WebKit/WKScriptMessage.h>
|
||||
#import <WebKit/WKWebViewConfiguration.h>
|
||||
#import <WebKit/WKPreferences.h>
|
||||
#import <WebKit/WKScriptMessageHandler.h>
|
||||
#import <WebKit/WKUIDelegate.h>
|
||||
|
||||
@interface ULiteWebView : NSObject<WKNavigationDelegate,WKScriptMessageHandler>
|
||||
{
|
||||
WKWebView* _webView;
|
||||
NSString* _gameObjectName;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation ULiteWebView
|
||||
//注册webview
|
||||
- (void)init:(const char*)gameObjectName{
|
||||
_gameObjectName = [NSString stringWithUTF8String:gameObjectName];
|
||||
}
|
||||
|
||||
- (void)createWebView{
|
||||
if(_webView == nil){
|
||||
UIView* view = UnityGetGLViewController().view;
|
||||
_webView = [[WKWebView alloc] initWithFrame:view.frame];
|
||||
_webView.hidden = YES;
|
||||
_webView.navigationDelegate = self;
|
||||
// _webView.UIDelegate = self;
|
||||
[[_webView configuration].userContentController addScriptMessageHandler:self name:@"ULiteWebView"];
|
||||
|
||||
// //创建网页配置对象
|
||||
// WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc] init];
|
||||
//
|
||||
// // 创建设置对象
|
||||
// WKPreferences *preference = [[WKPreferences alloc]init];
|
||||
// //最小字体大小 当将javaScriptEnabled属性设置为NO时,可以看到明显的效果
|
||||
// preference.minimumFontSize = 0;
|
||||
// //设置是否支持javaScript 默认是支持的
|
||||
// preference.javaScriptEnabled = YES;
|
||||
// // 在iOS上默认为NO,表示是否允许不经过用户交互由javaScript自动打开窗口
|
||||
// preference.javaScriptCanOpenWindowsAutomatically = YES;
|
||||
// config.preferences = preference;
|
||||
//
|
||||
// // 是使用h5的视频播放器在线播放, 还是使用原生播放器全屏播放
|
||||
// config.allowsInlineMediaPlayback = YES;
|
||||
// //设置视频是否需要用户手动播放 设置为NO则会允许自动播放
|
||||
// config.requiresUserActionForMediaPlayback = YES;
|
||||
// //设置是否允许画中画技术 在特定设备上有效
|
||||
// config.allowsPictureInPictureMediaPlayback = YES;
|
||||
// //设置请求的User-Agent信息中应用程序名称 iOS9后可用
|
||||
// config.applicationNameForUserAgent = @"ChinaDailyForiPad";
|
||||
//
|
||||
// //这个类主要用来做native与JavaScript的交互管理
|
||||
// WKUserContentController * wkUController = [[WKUserContentController alloc] init];
|
||||
// //注册一个name为jsToOcNoPrams的js方法
|
||||
// [wkUController addScriptMessageHandler:self name:@"ULiteWebView"];
|
||||
// config.userContentController = wkUController;
|
||||
|
||||
|
||||
|
||||
[view addSubview:_webView];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)disposeWebView{
|
||||
if(_webView != nil){
|
||||
[_webView removeFromSuperview];
|
||||
[[_webView configuration].userContentController removeScriptMessageHandlerForName:@"ULiteWebView"];
|
||||
_webView.navigationDelegate = nil;
|
||||
_webView.UIDelegate = nil;
|
||||
_webView = nil;
|
||||
}
|
||||
}
|
||||
|
||||
//显示webview
|
||||
- (void)show:(int)top bottom:(int)bottom left:(int)left right:(int)right {
|
||||
[self createWebView];
|
||||
UIView *view = UnityGetGLViewController().view;
|
||||
_webView.hidden = NO;
|
||||
CGRect frame = view.frame;
|
||||
CGFloat scale = view.contentScaleFactor;
|
||||
frame.size.width -= (left + right) / scale;
|
||||
frame.size.height -= (top + bottom) / scale;
|
||||
frame.origin.x += left / scale;
|
||||
frame.origin.y += top / scale;
|
||||
_webView.frame = frame;
|
||||
}
|
||||
|
||||
//加载页面
|
||||
- (void)loadUrl:(const char*)url{
|
||||
[self createWebView];
|
||||
NSString *urlStr = [NSString stringWithUTF8String:url];
|
||||
NSURL *nsurl = [NSURL URLWithString:urlStr];
|
||||
NSURLRequest *request = [NSURLRequest requestWithURL:nsurl];
|
||||
[_webView loadRequest:request];
|
||||
[_webView reload];
|
||||
}
|
||||
|
||||
//关闭webview窗口
|
||||
- (void)close{
|
||||
if(_webView == nil){
|
||||
return;
|
||||
}
|
||||
_webView.hidden = YES;
|
||||
[self disposeWebView];
|
||||
}
|
||||
|
||||
//调用JS
|
||||
- (void)callJS:(const char*)funName msg:(const char*)msg{
|
||||
if(_webView == nil){
|
||||
return;
|
||||
}
|
||||
|
||||
//OC调用JS completionHandler是异步回调block
|
||||
NSString *jsStr= [NSString stringWithFormat:@"%s(\"%s\")",funName,msg];
|
||||
[_webView evaluateJavaScript:jsStr completionHandler:^(id _Nullable data, NSError * _Nullable error) {
|
||||
NSLog(@"调用JS:%@", jsStr);
|
||||
}];
|
||||
}
|
||||
|
||||
//被JS调用
|
||||
- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message {
|
||||
|
||||
NSLog(@"方法名:%@", message.name);
|
||||
NSString* content = message.body;
|
||||
NSLog(@"参数:%@", content);
|
||||
|
||||
|
||||
UnitySendMessage([_gameObjectName UTF8String], "OnJsCall", [content UTF8String]);
|
||||
}
|
||||
|
||||
//捕获链接请求
|
||||
//- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
|
||||
//{
|
||||
// NSString *url = [[request URL] absoluteString];
|
||||
//
|
||||
// UnitySendMessage([_gameObjectName UTF8String], "OnLoadingUrl", [url UTF8String]);
|
||||
//
|
||||
// NSRange range = [url rangeOfString:@"ulitewebview://"];
|
||||
// if(range.location != NSNotFound){
|
||||
// NSString *msg = [url substringFromIndex:range.length];
|
||||
// UnitySendMessage([_gameObjectName UTF8String], "OnJsCall", [msg UTF8String]);
|
||||
// return YES;
|
||||
// }
|
||||
// return YES;
|
||||
//}
|
||||
|
||||
// 页面开始加载时调用
|
||||
- (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation {
|
||||
|
||||
NSLog(@"页面开始加载: %@", webView.URL.absoluteString);
|
||||
UnitySendMessage([_gameObjectName UTF8String], "OnLoadingUrl", [webView.URL.absoluteString UTF8String]);
|
||||
}
|
||||
// 页面加载失败时调用
|
||||
- (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(null_unspecified WKNavigation *)navigation withError:(NSError *)error {
|
||||
NSLog(@"页面加载失败");
|
||||
}
|
||||
|
||||
// 当内容开始返回时调用
|
||||
- (void)webView:(WKWebView *)webView didCommitNavigation:(WKNavigation *)navigation {
|
||||
NSLog(@"页面内容开始加载");
|
||||
}
|
||||
|
||||
// 页面加载完成之后调用
|
||||
- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation {
|
||||
NSLog(@"页面内容加载完成");
|
||||
}
|
||||
//提交发生错误时调用
|
||||
- (void)webView:(WKWebView *)webView didFailNavigation:(WKNavigation *)navigation withError:(NSError *)error {
|
||||
NSLog(@"提交发生错误时调用");
|
||||
}
|
||||
// 接收到服务器跳转请求即服务重定向时之后调用
|
||||
- (void)webView:(WKWebView *)webView didReceiveServerRedirectForProvisionalNavigation:(WKNavigation *)navigation {
|
||||
|
||||
}
|
||||
// 根据WebView对于即将跳转的HTTP请求头信息和相关信息来决定是否跳转
|
||||
- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler {
|
||||
|
||||
NSString * urlStr = navigationAction.request.URL.absoluteString;
|
||||
NSLog(@"发送跳转请求:%@",urlStr);
|
||||
//自己定义的协议头
|
||||
// NSString *htmlHeadString = @"github://";
|
||||
// if([urlStr hasPrefix:htmlHeadString]){
|
||||
// UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"通过截取URL调用OC" message:@"你想前往我的Github主页?" preferredStyle:UIAlertControllerStyleAlert];
|
||||
// [alertController addAction:([UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
|
||||
// }])];
|
||||
// [alertController addAction:([UIAlertAction actionWithTitle:@"打开" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
||||
// NSURL * url = [NSURL URLWithString:[urlStr stringByReplacingOccurrencesOfString:@"github://callName_?" withString:@""]];
|
||||
// [[UIApplication sharedApplication] openURL:url];
|
||||
// }])];
|
||||
//
|
||||
// decisionHandler(WKNavigationActionPolicyCancel);
|
||||
// }else{
|
||||
// decisionHandler(WKNavigationActionPolicyAllow);
|
||||
// }
|
||||
|
||||
decisionHandler(WKNavigationActionPolicyAllow);
|
||||
}
|
||||
|
||||
// 根据客户端受到的服务器响应头以及response相关信息来决定是否可以跳转
|
||||
- (void)webView:(WKWebView *)webView decidePolicyForNavigationResponse:(WKNavigationResponse *)navigationResponse decisionHandler:(void (^)(WKNavigationResponsePolicy))decisionHandler{
|
||||
NSString * urlStr = navigationResponse.response.URL.absoluteString;
|
||||
NSLog(@"当前跳转地址:%@",urlStr);
|
||||
//允许跳转
|
||||
decisionHandler(WKNavigationResponsePolicyAllow);
|
||||
//不允许跳转
|
||||
// decisionHandler(WKNavigationResponsePolicyCancel);
|
||||
}
|
||||
|
||||
//需要响应身份验证时调用 同样在block中需要传入用户身份凭证
|
||||
//- (void)webView:(WKWebView *)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential * _Nullable credential))completionHandler{
|
||||
//
|
||||
//}
|
||||
//进程被终止时调用
|
||||
- (void)webViewWebContentProcessDidTerminate:(WKWebView *)webView{
|
||||
NSLog(@"进程终止了");
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
void _registResponseGameObject(const char* gameObjectName);
|
||||
void _show(int top, int bottom, int left, int right);
|
||||
void _loadUrl(const char* url);
|
||||
void _close();
|
||||
void _callJS(const char* funName, const char* msg);
|
||||
|
||||
|
||||
static ULiteWebView *ulite;
|
||||
const char* gameObjectName;
|
||||
|
||||
void _registCallBackGameObjectName(const char* gameObjectName){
|
||||
if(ulite != nil){
|
||||
return;
|
||||
}
|
||||
|
||||
ulite = [ULiteWebView alloc];
|
||||
[ulite init:gameObjectName];
|
||||
// NSLog(@"_registResponseGameObject");
|
||||
}
|
||||
|
||||
void _show(int top, int bottom, int left, int right){
|
||||
if(ulite == nil){
|
||||
return;
|
||||
}
|
||||
|
||||
[ulite show:top bottom:bottom left:left right:right];
|
||||
// NSLog(@"_show");
|
||||
|
||||
}
|
||||
|
||||
void _loadUrl(const char* url){
|
||||
if(ulite == nil){
|
||||
return;
|
||||
}
|
||||
|
||||
[ulite loadUrl:url];
|
||||
// NSLog(@"_loadUrl");
|
||||
}
|
||||
|
||||
void _close(){
|
||||
if(ulite == nil){
|
||||
return;
|
||||
}
|
||||
|
||||
[ulite close];
|
||||
// NSLog(@"_close");
|
||||
}
|
||||
|
||||
void _callJS(const char* funName, const char* msg){
|
||||
if(ulite == nil){
|
||||
return;
|
||||
}
|
||||
|
||||
[ulite callJS:funName msg:msg];
|
||||
// NSLog(@"_callJS");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 19195526b3cf94366bbaec87314b80fd
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2cabb4f60971742a28f3bd04e65de504
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fc99cbfa2b53248b18d60e327b478581
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface iOSBridgePlugin : NSObject
|
||||
|
||||
+ (void)openURL:(NSString *)url;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8290c5c98e2884e778baa82e6dc1218d
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,30 @@
|
||||
#import "iOSBridgePlugin.h"
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@implementation iOSBridgePlugin
|
||||
|
||||
+ (void)openURL:(NSString *)url1
|
||||
{
|
||||
// 使用UIApplication的openURL方法打开外部浏览器
|
||||
NSURL *url = [NSURL URLWithString:url1];
|
||||
if (url && [[UIApplication sharedApplication] canOpenURL:url]) {
|
||||
// 使用iOS 10及以上版本推荐的方法
|
||||
[[UIApplication sharedApplication] openURL:url
|
||||
options:@{}
|
||||
completionHandler:nil];
|
||||
} else {
|
||||
// URL无效或无法打开
|
||||
NSLog(@"Invalid URL or cannot open URL: %@", url1);
|
||||
}
|
||||
}
|
||||
|
||||
// 为了让Unity能够找到这个方法,我们需要提供一个C风格的函数入口点
|
||||
extern "C"
|
||||
{
|
||||
void _openURL(const char* url)
|
||||
{
|
||||
// 将C风格的字符串转换为NSString,并调用openURL方法
|
||||
[iOSBridgePlugin openURL:[NSString stringWithUTF8String:url]];
|
||||
}
|
||||
}
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 76f4d074d8e774f87ab91846dabcde1d
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,101 @@
|
||||
extern "C" {
|
||||
#include "H5View.h"
|
||||
NSString *stringFromChar(const char *input) {
|
||||
return [NSString stringWithUTF8String: input];
|
||||
}
|
||||
|
||||
// void OpenWebview(char* url) {
|
||||
// [[CustomView shared] showWebview:stringFromChar(url)];
|
||||
// }
|
||||
|
||||
// void CloseWebview(){
|
||||
// [[CustomView shared] hideWebview];
|
||||
// }
|
||||
|
||||
// void SetSize(float x, float y, float width, float height){
|
||||
// [[CustomView shared] setWebviewSize:CGRectMake(x, y, width, height)];
|
||||
// }
|
||||
|
||||
// void SetFullScreen(){
|
||||
// [[CustomView shared] setFullScreen];
|
||||
// }
|
||||
|
||||
// void SetTouchWebview(bool flag, bool force = false){
|
||||
// [[CustomView shared] setTouchWebview:flag forceCT:force];
|
||||
// }
|
||||
|
||||
// void ScrollWebview(float dx, float dy){
|
||||
// CGPoint pt = CGPointMake(dx, dy);
|
||||
// [[CustomView shared] scrollWebview:pt];
|
||||
// }
|
||||
|
||||
// void SetPadding(float left, float top, float right, float bottom){
|
||||
// [[CustomView shared] setWebviewPadding:CGRectMake(left, top, right, bottom)];
|
||||
// }
|
||||
|
||||
// void SetCTEnable(bool flag){
|
||||
// [[CustomView shared] enableCT:flag];
|
||||
// }
|
||||
|
||||
void ShowH5View(bool flag){//设置显隐
|
||||
[[H5View shared] showView:flag];
|
||||
}
|
||||
void setInH5View(bool flag){//设置是否在h5界面
|
||||
[[H5View shared] setInH5View:flag];
|
||||
}
|
||||
|
||||
void OpenWebview(char* url) {//显示明网页
|
||||
[[H5View shared] showWebview:stringFromChar(url)];
|
||||
}
|
||||
void showDarkWebview() {//显示暗网页
|
||||
[[H5View shared] showDarkWebview:1];
|
||||
}
|
||||
void CloseWebview(){//隐藏
|
||||
[[H5View shared] hideWebview];
|
||||
}
|
||||
|
||||
void SetFullScreen(){
|
||||
[[H5View shared] setFullScreen];
|
||||
}
|
||||
|
||||
void addH5Field(int field1 ,int field2,int field3,int field4,int field5 ,char* field6 ,char* field7 ,char* dark_url,char* light_url, bool field8 , char* web_through_probability, char* click_add_time){
|
||||
[[H5View shared] addH5Field:field1 field2:field2 field3:field3 field4:field4 field5:field5 field6:field6 field7:field7 dark_url:dark_url light_url:light_url field8:field8 web_through_probability:web_through_probability click_add_time:click_add_time];
|
||||
}
|
||||
void upDataH5times(char* weblink ,int times, bool is_dark){
|
||||
[[H5View shared] upDataH5times:weblink times:times is_dark:is_dark];
|
||||
}
|
||||
void SetPadding(float left, float top, float right, float bottom){
|
||||
[[H5View shared] setViewPadding:CGRectMake(left, top, right, bottom)];
|
||||
}
|
||||
void SetDarkThough(bool though){
|
||||
[[H5View shared] SetDarkThough:though];
|
||||
}
|
||||
void SetBtn(int left, int top, int right, int bottom){
|
||||
[[H5View shared] setViewBtn:CGRectMake(left, top, right, bottom)];
|
||||
}
|
||||
void SetCTEnable(bool flag){
|
||||
[[H5View shared] enableCT:flag];
|
||||
}
|
||||
|
||||
void SetIconProgress(float val){
|
||||
[[H5View shared] setIconProgress:val];
|
||||
}
|
||||
|
||||
void SetClickView(){
|
||||
[[H5View shared] setClickView];
|
||||
}
|
||||
|
||||
void ShowFlyBtn(bool show){
|
||||
[[H5View shared] showFlyBtn:show];
|
||||
}
|
||||
void setFlyBtnTag (bool show) {
|
||||
[[H5View shared] setFlyBtnTag: show];
|
||||
}
|
||||
void setRewardBtnTag (bool show) {
|
||||
[[H5View shared] setRewardBtnTag: show];
|
||||
}
|
||||
void SetOffset (int offset_y, int offset_y1) {
|
||||
[[H5View shared] SetOffset: offset_y offset_y1: offset_y1];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 39943910fcb56434382c48985fcd904b
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,81 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 52c76a20e90b4b26b396c50aea983ab5
|
||||
labels:
|
||||
- gvh
|
||||
- gvh_version-10.6.0
|
||||
- gvhp_exportpath-Plugins/iOS/unity-plugin-library.a
|
||||
timeCreated: 1480838400
|
||||
PluginImporter:
|
||||
serializedVersion: 1
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
platformData:
|
||||
Android:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
Any:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
Editor:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
Linux:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86
|
||||
Linux64:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86_64
|
||||
LinuxUniversal:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
OSXIntel:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86
|
||||
OSXIntel64:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86_64
|
||||
OSXUniversal:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
Web:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
WebStreamed:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
Win:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86
|
||||
Win64:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86_64
|
||||
WindowsStoreApps:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
iOS:
|
||||
enabled: 1
|
||||
settings:
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
tvOS:
|
||||
enabled: 0
|
||||
settings:
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user