feat: update ios delegate handler , remove taptap login editor folder
parent
639c43d923
commit
3da78163b0
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 66c985194a5444c2a336b60bdb132f74
|
||||
timeCreated: 1617120951
|
|
@ -1,24 +0,0 @@
|
|||
using TapTap.Common.Editor;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Callbacks;
|
||||
using UnityEngine;
|
||||
|
||||
namespace TapTap.Login.Editor
|
||||
{
|
||||
public static class TapLoginIOSProcessor
|
||||
{
|
||||
[PostProcessBuild(102)]
|
||||
public static void OnPostprocessBuild(BuildTarget buildTarget, string path)
|
||||
{
|
||||
if (buildTarget != BuildTarget.iOS) return;
|
||||
|
||||
var unityAppControllerPath = path + "/Classes/UnityAppController.mm";
|
||||
var unityAppController = new TapFileHelper(unityAppControllerPath);
|
||||
unityAppController.WriteBelow(@"#import <OpenGLES/ES2/glext.h>", @"#import <TapLoginSDK/TapLoginHelper.h>");
|
||||
unityAppController.WriteBelow(
|
||||
@"id sourceApplication = options[UIApplicationOpenURLOptionsSourceApplicationKey], annotation = options[UIApplicationOpenURLOptionsAnnotationKey];",
|
||||
@"if(url){[TapLoginHelper handleTapTapOpenURL:url];}");
|
||||
Debug.Log("TapLogin Change AppControler File!");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 50ded018333a4dc8ba19e7806c5bc693
|
||||
timeCreated: 1617120951
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"name": "TapTap.Login.Editor",
|
||||
"references": [
|
||||
"TapTap.Common.Editor"
|
||||
],
|
||||
"optionalUnityReferences": [],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": []
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a9157d20880b14db485aa407a4532958
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,16 @@
|
|||
//
|
||||
// TapDelegate.h
|
||||
// Unity-iPhone
|
||||
//
|
||||
// Created by xe on 2021/7/14.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TapLoginDelegate : NSObject
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,27 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1520c63afb87b41f282b202f5313765e
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,33 @@
|
|||
//
|
||||
// TapDelegate.m
|
||||
// Unity-iPhone
|
||||
//
|
||||
// Created by xe on 2021/7/14.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <UserNotifications/UserNotifications.h>
|
||||
#include "AppDelegateListener.h"
|
||||
#include "LifeCycleListener.h"
|
||||
#import "TapLoginDelegate.h"
|
||||
#import <TapLoginSDK/TapLoginHelper.h>
|
||||
|
||||
@implementation TapLoginDelegate
|
||||
|
||||
+(void) load{
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken,^{
|
||||
|
||||
NSNotificationCenter* nc = [NSNotificationCenter defaultCenter];
|
||||
[nc addObserverForName:kUnityOnOpenURL object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification * _Nonnull note) {
|
||||
if ([note.userInfo isKindOfClass: [NSMutableDictionary<NSString*, id> class]]) {
|
||||
NSURL* url = [note.userInfo objectForKey:@"url"];
|
||||
[TapLoginHelper handleTapTapOpenURL:url];
|
||||
}
|
||||
}];
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@end
|
|
@ -0,0 +1,37 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 199b104d5cf2740eca32b1d48f6f59fc
|
||||
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: {}
|
||||
- first:
|
||||
tvOS: tvOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue