Commit 354e08ac authored by 王雪伟's avatar 王雪伟

加入bugly

parent cda73a19
fileFormatVersion: 2
guid: 177a1d071db62497eaefdad1e71ed57b
folderAsset: yes
DefaultImporter:
userData:
Copyright (c) 2012 Wei Wang @onevcat
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
fileFormatVersion: 2
guid: 7d871c3f471cb423c8254b5a352ad529
DefaultImporter:
userData:
fileFormatVersion: 2
guid: 9a2ac820893b640c083f6f6c6116b420
folderAsset: yes
DefaultImporter:
userData:
This diff is collapsed.
fileFormatVersion: 2
guid: a9dbf5a8118504261a2be5785b0eca30
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
fileFormatVersion: 2
guid: 841b334890ac942dabe8737fbfcf46db
folderAsset: yes
DefaultImporter:
userData:
fileFormatVersion: 2
guid: 9b2756cd90b6c46a6b28d9d972aee86b
folderAsset: yes
DefaultImporter:
userData:
{
"group": "Bugly",
"libs": [
"libz.dylib",
"libc++.dylib"
],
"frameworks": [
"SystemConfiguration.framework",
"Security.framework",
"JavaScriptCore.framework"
],
"headerpaths": [],
"files": [
"Bugly/Bugly.framework",
"Bugly/BuglyBridge/libBuglyBridge.a",
"Bugly/BuglyBridge/BuglyBridge.h"
],
"folders": [],
"excludes": ["^.*.meta$", "^.*.mdown$", "^.*.pdf$"],
"compiler_flags": [],
"linker_flags": [
"-ObjC"
]
}
\ No newline at end of file
fileFormatVersion: 2
guid: af9acc5fe01ef4dac8882dea364ffb92
DefaultImporter:
userData:
fileFormatVersion: 2
guid: 75b10080bdc104b83beb6663fc9985fb
folderAsset: yes
DefaultImporter:
userData:
fileFormatVersion: 2
guid: 0dd2027a6278544d4acc46c208b9f5f5
timeCreated: 1497948394
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 2e39c573403bc479cb19650e7436097c
folderAsset: yes
timeCreated: 1497947584
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//
// Bugly.h
// Bugly
//
// Version: 2.4(8)
//
// Copyright (c) 2016年 Bugly. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "BuglyConfig.h"
#import "BuglyLog.h"
BLY_START_NONNULL
@interface Bugly : NSObject
/**
* 初始化Bugly,使用默认BuglyConfig
*
* @param appId 注册Bugly分配的应用唯一标识
*/
+ (void)startWithAppId:(NSString * BLY_NULLABLE)appId;
/**
* 使用指定配置初始化Bugly
*
* @param appId 注册Bugly分配的应用唯一标识
* @param config 传入配置的 BuglyConfig
*/
+ (void)startWithAppId:(NSString * BLY_NULLABLE)appId
config:(BuglyConfig * BLY_NULLABLE)config;
/**
* 使用指定配置初始化Bugly
*
* @param appId 注册Bugly分配的应用唯一标识
* @param development 是否开发设备
* @param config 传入配置的 BuglyConfig
*/
+ (void)startWithAppId:(NSString * BLY_NULLABLE)appId
developmentDevice:(BOOL)development
config:(BuglyConfig * BLY_NULLABLE)config;
/**
* 设置用户标识
*
* @param userId 用户标识
*/
+ (void)setUserIdentifier:(NSString *)userId;
/**
* 更新版本信息
*
* @param version 应用版本信息
*/
+ (void)updateAppVersion:(NSString *)version;
/**
* 设置关键数据,随崩溃信息上报
*
* @param value KEY
* @param key VALUE
*/
+ (void)setUserValue:(NSString *)value
forKey:(NSString *)key;
/**
* 获取关键数据
*
* @return 关键数据
*/
+ (NSDictionary * BLY_NULLABLE)allUserValues;
/**
* 设置标签
*
* @param tag 标签ID,可在网站生成
*/
+ (void)setTag:(NSUInteger)tag;
/**
* 获取当前设置标签
*
* @return 当前标签ID
*/
+ (NSUInteger)currentTag;
/**
* 获取设备ID
*
* @return 设备ID
*/
+ (NSString *)buglyDeviceId;
/**
* 上报自定义Objective-C异常
*
* @param exception 异常信息
*/
+ (void)reportException:(NSException *)exception;
/**
* 上报错误
*
* @param error 错误信息
*/
+ (void)reportError:(NSError *)error;
/**
* @brief 上报自定义错误
*
* @param category 类型(Cocoa=3,CSharp=4,JS=5,Lua=6)
* @param aName 名称
* @param aReason 错误原因
* @param aStackArray 堆栈
* @param info 附加数据
* @param terminate 上报后是否退出应用进程
*/
+ (void)reportExceptionWithCategory:(NSUInteger)category name:(NSString *)aName reason:(NSString *)aReason callStack:(NSArray *)aStackArray extraInfo:(NSDictionary *)info terminateApp:(BOOL)terminate;
/**
* SDK 版本信息
*
* @return SDK版本号
*/
+ (NSString *)sdkVersion;
/**
* App 是否发生了连续闪退
* 如果启动SDK 且 5秒内 闪退,且次数达到 3次 则判定为连续闪退
*
* @return 是否连续闪退
*/
+ (BOOL)isAppCrashedOnStartUpExceedTheLimit;
+ (void)setComponentIdentifier:(NSString *)componentId version:(NSString *)version;
BLY_END_NONNULL
@end
fileFormatVersion: 2
guid: 841e5a51a12834159aeebd4cbad0d2ce
timeCreated: 1497948394
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//
// BuglyConfig.h
//
//
// Copyright (c) 2016年 Tencent. All rights reserved.
//
#pragma once
#define BLY_UNAVAILABLE(x) __attribute__((unavailable(x)))
#if __has_feature(nullability)
#define BLY_NONNULL __nonnull
#define BLY_NULLABLE __nullable
#define BLY_START_NONNULL _Pragma("clang assume_nonnull begin")
#define BLY_END_NONNULL _Pragma("clang assume_nonnull end")
#else
#define BLY_NONNULL
#define BLY_NULLABLE
#define BLY_START_NONNULL
#define BLY_END_NONNULL
#endif
#import <Foundation/Foundation.h>
#import "BuglyLog.h"
BLY_START_NONNULL
@protocol BuglyDelegate <NSObject>
@optional
/**
* 发生异常时回调
*
* @param exception 异常信息
*
* @return 返回需上报记录,随异常上报一起上报
*/
- (NSString * BLY_NULLABLE)attachmentForException:(NSException * BLY_NULLABLE)exception;
@end
@interface BuglyConfig : NSObject
/**
* SDK Debug信息开关, 默认关闭
*/
@property (nonatomic, assign) BOOL debugMode;
/**
* 设置自定义渠道标识
*/
@property (nonatomic, copy) NSString *channel;
/**
* 设置自定义版本号
*/
@property (nonatomic, copy) NSString *version;
/**
* 设置自定义设备唯一标识
*/
@property (nonatomic, copy) NSString *deviceIdentifier;
/**
* 卡顿监控开关,默认关闭
*/
@property (nonatomic) BOOL blockMonitorEnable;
/**
* 卡顿监控判断间隔,单位为秒
*/
@property (nonatomic) NSTimeInterval blockMonitorTimeout;
/**
* 设置 App Groups Id (如有使用 Bugly iOS Extension SDK,请设置该值)
*/
@property (nonatomic, copy) NSString *applicationGroupIdentifier;
/**
* 进程内还原开关,默认开启
*/
@property (nonatomic) BOOL symbolicateInProcessEnable;
/**
* 非正常退出事件记录开关,默认关闭
*/
@property (nonatomic) BOOL unexpectedTerminatingDetectionEnable;
/**
* 页面信息记录开关,默认开启
*/
@property (nonatomic) BOOL viewControllerTrackingEnable;
/**
* Bugly Delegate
*/
@property (nonatomic, assign) id<BuglyDelegate> delegate;
/**
* 控制自定义日志上报,默认值为BuglyLogLevelSilent,即关闭日志记录功能。
* 如果设置为BuglyLogLevelWarn,则在崩溃时会上报Warn、Error接口打印的日志
*/
@property (nonatomic, assign) BuglyLogLevel reportLogLevel;
/**
* 崩溃数据过滤器,如果崩溃堆栈的模块名包含过滤器中设置的关键字,则崩溃数据不会进行上报
* 例如,过滤崩溃堆栈中包含搜狗输入法的数据,可以添加过滤器关键字SogouInputIPhone.dylib等
*/
@property (nonatomic, copy) NSArray *excludeModuleFilter;
/**
* 控制台日志上报开关,默认开启
*/
@property (nonatomic, assign) BOOL consolelogEnable;
@end
BLY_END_NONNULL
fileFormatVersion: 2
guid: dca72c35ab06f4c9abf2877ad9a9f718
timeCreated: 1497948394
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//
// BuglyLog.h
//
// Copyright © 2017 tencent.com. All rights reserved.
//
#import <Foundation/Foundation.h>
// Log level for Bugly Log
typedef NS_ENUM(NSUInteger, BuglyLogLevel) {
BuglyLogLevelSilent = 0,
BuglyLogLevelError = 1,
BuglyLogLevelWarn = 2,
BuglyLogLevelInfo = 3,
BuglyLogLevelDebug = 4,
BuglyLogLevelVerbose = 5,
};
#pragma mark -
OBJC_EXTERN void BLYLog(BuglyLogLevel level, NSString *format, ...) NS_FORMAT_FUNCTION(2, 3);
OBJC_EXTERN void BLYLogv(BuglyLogLevel level, NSString *format, va_list args) NS_FORMAT_FUNCTION(2, 0);
#pragma mark -
#define BUGLY_LOG_MACRO(_level, fmt, ...) [BuglyLog level:_level tag:nil log:fmt, ##__VA_ARGS__]
#define BLYLogError(fmt, ...) BUGLY_LOG_MACRO(BuglyLogLevelError, fmt, ##__VA_ARGS__)
#define BLYLogWarn(fmt, ...) BUGLY_LOG_MACRO(BuglyLogLevelWarn, fmt, ##__VA_ARGS__)
#define BLYLogInfo(fmt, ...) BUGLY_LOG_MACRO(BuglyLogLevelInfo, fmt, ##__VA_ARGS__)
#define BLYLogDebug(fmt, ...) BUGLY_LOG_MACRO(BuglyLogLevelDebug, fmt, ##__VA_ARGS__)
#define BLYLogVerbose(fmt, ...) BUGLY_LOG_MACRO(BuglyLogLevelVerbose, fmt, ##__VA_ARGS__)
#pragma mark - Interface
@interface BuglyLog : NSObject
/**
* @brief 初始化日志模块
*
* @param level 设置默认日志级别,默认BLYLogLevelSilent
*
* @param printConsole 是否打印到控制台,默认NO
*/
+ (void)initLogger:(BuglyLogLevel) level consolePrint:(BOOL)printConsole;
/**
* @brief 打印BLYLogLevelInfo日志
*
* @param format 日志内容 总日志大小限制为:字符串长度30k,条数200
*/
+ (void)log:(NSString *)format, ... NS_FORMAT_FUNCTION(1, 2);
/**
* @brief 打印日志
*
* @param level 日志级别
* @param message 日志内容 总日志大小限制为:字符串长度30k,条数200
*/
+ (void)level:(BuglyLogLevel) level logs:(NSString *)message;
/**
* @brief 打印日志
*
* @param level 日志级别
* @param format 日志内容 总日志大小限制为:字符串长度30k,条数200
*/
+ (void)level:(BuglyLogLevel) level log:(NSString *)format, ... NS_FORMAT_FUNCTION(2, 3);
/**
* @brief 打印日志
*
* @param level 日志级别
* @param tag 日志模块分类
* @param format 日志内容 总日志大小限制为:字符串长度30k,条数200
*/
+ (void)level:(BuglyLogLevel) level tag:(NSString *) tag log:(NSString *)format, ... NS_FORMAT_FUNCTION(3, 4);
@end
fileFormatVersion: 2
guid: 52d616a4d69ce46469563ec4166a5da7
timeCreated: 1497948394
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 877eab29b0d76443883ae4dbb398cb69
folderAsset: yes
timeCreated: 1497948394
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
framework module Bugly {
umbrella header "Bugly.h"
export *
module * { export * }
link framework "Foundation"
link framework "Security"
link framework "SystemConfiguration"
link "c++"
link "z"
}
fileFormatVersion: 2
guid: 01fcf8f3340eb42758a274ba09bbfa74
timeCreated: 1497948394
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: d6b25bfcf65a44ec0a0e6973f612af2a
folderAsset: yes
DefaultImporter:
userData:
//
// BuglyBridge.h
// BuglyAgent
//
// Created by Yeelik on 15/11/25.
// Copyright © 2015年 Bugly. All rights reserved.
//
// Version: 1.3.3
//
#import <Foundation/Foundation.h>
#pragma mark - Interface for Bridge
#ifdef __cplusplus
extern "C"{
#endif
/**
* @brief 初始化
*
* @param appId 应用标识
* @param debug 是否开启debug模式,开启后会在控制台打印调试信息,默认为NO
* @param level 自定义日志上报级别,使用SDK接口打印的日志会跟崩溃信息一起上报,默认为Info(即Info、Warning、Error级别的日志都会上报)
* Debug=4,Info=3,Warnning=2,Error=1,Off=0
*/
void _BuglyInit(const char * appId, bool debug, int level);
/**
* @brief 设置用户唯一标识
*
* @param userId
*/
void _BuglySetUserId(const char * userId);
/**
* @brief 设置自定义标签
*
* @param tag
*/
void _BuglySetTag(int tag);
/**
* @brief 设置自定义键值对数据
*
* @param key
* @param value
*/
void _BuglySetKeyValue(const char * key, const char * value);
/**
* @brief 自定义异常数据上报
*
* @param type
* @param name 异常类型
* @param reason 异常原因
* @param stackTrace 异常堆栈
* @param extras 附加数据
* @param quit 上报后是否退出应用
*/
void _BuglyReportException(int type, const char * name, const char * reason, const char * stackTrace, const char * extras, bool quit);
/**
* @brief 设置默认的应用配置,在初始化之前调用
*
* @param channel 渠道
* @param version 应用版本
* @param user 用户
* @param deviceId 设备唯一标识
*/
void _BuglyDefaultConfig(const char * channel, const char * version, const char *user, const char * deviceId);
/**
* @brief 自定义日志打印接口
*
* @param level 日志级别, 1=Error、2=Warning、3=Info、4=Debug
* @param tag 日志标签
* @param log 日志内容
*/
void _BuglyLogMessage(int level, const char * tag, const char * log);
/**
* @brief 设置崩溃上报组件的类别
*
* @param type 0=Default、1=Bugly、2=MSDK、3=IMSDK
*/
void _BuglyConfigCrashReporterType(int type);
/**
* @brief 设置额外的配置信息
*
* @param key
* @param value
*/
void _BuglySetExtraConfig(const char *key, const char * value);
#ifdef __cplusplus
} // extern "C"
#endif
#pragma mark -
fileFormatVersion: 2
guid: aded946ff2bdf40ff9ac3e5c10f8fa5d
timeCreated: 1497947595
licenseType: Free
PluginImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
isPreloaded: 0
platformData:
Any:
enabled: 0
settings: {}
Editor:
enabled: 1
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 8e4622a66135549e18a59de3c9348ba7
timeCreated: 1497947594
licenseType: Free
PluginImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
isPreloaded: 0
platformData:
Any:
enabled: 0
settings: {}
Editor:
enabled: 1
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 50e42c3e8d4df4693be96cca1b0333f6
folderAsset: yes
DefaultImporter:
userData:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
namespace UnityEditor.XCodeEditor
{
public class PBXBuildFile : PBXObject
{
private const string FILE_REF_KEY = "fileRef";
private const string SETTINGS_KEY = "settings";
private const string ATTRIBUTES_KEY = "ATTRIBUTES";
private const string WEAK_VALUE = "Weak";
private const string COMPILER_FLAGS_KEY = "COMPILER_FLAGS";
public PBXBuildFile( PBXFileReference fileRef, bool weak = false ) : base()
{
this.Add( FILE_REF_KEY, fileRef.guid );
SetWeakLink( weak );
if (!string.IsNullOrEmpty(fileRef.compilerFlags))
{
foreach (var flag in fileRef.compilerFlags.Split(','))
AddCompilerFlag(flag);
}
}
public PBXBuildFile( string guid, PBXDictionary dictionary ) : base ( guid, dictionary )
{
}
public string fileRef
{
get {
return (string)_data[ FILE_REF_KEY ];
}
}
public bool SetWeakLink( bool weak = false )
{
PBXDictionary settings = null;
PBXList attributes = null;
if( !_data.ContainsKey( SETTINGS_KEY ) ) {
if( weak ) {
attributes = new PBXList();
attributes.Add( WEAK_VALUE );
settings = new PBXDictionary();
settings.Add( ATTRIBUTES_KEY, attributes );
_data.Add( SETTINGS_KEY, settings );
}
return true;
}
settings = _data[ SETTINGS_KEY ] as PBXDictionary;
if( !settings.ContainsKey( ATTRIBUTES_KEY ) ) {
if( weak ) {
attributes = new PBXList();
attributes.Add( WEAK_VALUE );
settings.Add( ATTRIBUTES_KEY, attributes );
return true;
}
else {
return false;
}
}
else {
attributes = settings[ ATTRIBUTES_KEY ] as PBXList;
}
if( weak ) {
attributes.Add( WEAK_VALUE );
}
else {
attributes.Remove( WEAK_VALUE );
}
settings.Add( ATTRIBUTES_KEY, attributes );
this.Add( SETTINGS_KEY, settings );
return true;
}
//CodeSignOnCopy
public bool AddCodeSignOnCopy()
{
if( !_data.ContainsKey( SETTINGS_KEY ) )
_data[ SETTINGS_KEY ] = new PBXDictionary();
var settings = _data[ SETTINGS_KEY ] as PBXDictionary;
if( !settings.ContainsKey( ATTRIBUTES_KEY ) ) {
var attributes = new PBXList();
attributes.Add( "CodeSignOnCopy" );
attributes.Add( "RemoveHeadersOnCopy" );
settings.Add( ATTRIBUTES_KEY, attributes );
}
else {
var attributes = settings[ ATTRIBUTES_KEY ] as PBXList;
attributes.Add( "CodeSignOnCopy" );
attributes.Add( "RemoveHeadersOnCopy" );
}
return true;
}
public bool AddCompilerFlag( string flag )
{
if( !_data.ContainsKey( SETTINGS_KEY ) )
_data[ SETTINGS_KEY ] = new PBXDictionary();
if( !((PBXDictionary)_data[ SETTINGS_KEY ]).ContainsKey( COMPILER_FLAGS_KEY ) ) {
((PBXDictionary)_data[ SETTINGS_KEY ]).Add( COMPILER_FLAGS_KEY, flag );
return true;
}
string[] flags = ((string)((PBXDictionary)_data[ SETTINGS_KEY ])[ COMPILER_FLAGS_KEY ]).Split( ' ' );
foreach( string item in flags ) {
if( item.CompareTo( flag ) == 0 )
return false;
}
((PBXDictionary)_data[ SETTINGS_KEY ])[ COMPILER_FLAGS_KEY ] = ( string.Join( " ", flags ) + " " + flag );
return true;
}
}
}
fileFormatVersion: 2
guid: 9992e69c513ea481ebe3119a011e16cd
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
namespace UnityEditor.XCodeEditor
{
public class PBXBuildPhase : PBXObject
{
protected const string FILES_KEY = "files";
public PBXBuildPhase() :base()
{
}
public PBXBuildPhase( string guid, PBXDictionary dictionary ) : base ( guid, dictionary )
{
}
public bool AddBuildFile( PBXBuildFile file )
{
if( !ContainsKey( FILES_KEY ) ){
this.Add( FILES_KEY, new PBXList() );
}
((PBXList)_data[ FILES_KEY ]).Add( file.guid );
return true;
}
public void RemoveBuildFile( string id )
{
if( !ContainsKey( FILES_KEY ) ) {
this.Add( FILES_KEY, new PBXList() );
return;
}
((PBXList)_data[ FILES_KEY ]).Remove( id );
}
public bool HasBuildFile( string id )
{
if( !ContainsKey( FILES_KEY ) ) {
this.Add( FILES_KEY, new PBXList() );
return false;
}
if( !IsGuid( id ) )
return false;
return ((PBXList)_data[ FILES_KEY ]).Contains( id );
}
public PBXList files {
get {
if( !ContainsKey( FILES_KEY ) ) {
this.Add( FILES_KEY, new PBXList() );
}
return (PBXList)_data[ FILES_KEY ];
}
}
}
public class PBXFrameworksBuildPhase : PBXBuildPhase
{
public PBXFrameworksBuildPhase( string guid, PBXDictionary dictionary ) : base ( guid, dictionary )
{
}
}
public class PBXResourcesBuildPhase : PBXBuildPhase
{
public PBXResourcesBuildPhase( string guid, PBXDictionary dictionary ) : base ( guid, dictionary )
{
}
}
public class PBXShellScriptBuildPhase : PBXBuildPhase
{
public PBXShellScriptBuildPhase( string guid, PBXDictionary dictionary ) : base ( guid, dictionary )
{
}
}
public class PBXSourcesBuildPhase : PBXBuildPhase
{
public PBXSourcesBuildPhase( string guid, PBXDictionary dictionary ) : base ( guid, dictionary )
{
}
}
public class PBXCopyFilesBuildPhase : PBXBuildPhase
{
//Embed Frameworks PBXCopyFilesBuildPhase constructor
//to make sure "isa" = "PBXCopyFilesBuildPhase"
public PBXCopyFilesBuildPhase( int buildActionMask ) :base()
{
this.Add("buildActionMask", buildActionMask);
this.Add("dstPath", "");
this.Add("dstSubfolderSpec", 10);
this.Add("name", "Embed Frameworks");
this.Add("runOnlyForDeploymentPostprocessing", 0);
}
public PBXCopyFilesBuildPhase( string guid, PBXDictionary dictionary ) : base ( guid, dictionary )
{
}
}
}
fileFormatVersion: 2
guid: dbd728e6c046340b98e080ac6bc58670
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
namespace UnityEditor.XCodeEditor
{
public class PBXDictionary : Dictionary<string, object>
{
public void Append( PBXDictionary dictionary )
{
foreach( var item in dictionary) {
this.Add( item.Key, item.Value );
}
}
public void Append<T>( PBXDictionary<T> dictionary ) where T : PBXObject
{
foreach( var item in dictionary) {
this.Add( item.Key, item.Value );
}
}
public void Append( PBXSortedDictionary dictionary )
{
foreach( var item in dictionary) {
this.Add( item.Key, item.Value );
}
}
public void Append<T>( PBXSortedDictionary<T> dictionary ) where T : PBXObject
{
foreach( var item in dictionary) {
this.Add( item.Key, item.Value );
}
}
/// <summary>
/// This allows us to use the form:
/// "if (x)" or "if (!x)"
/// </summary>
public static implicit operator bool( PBXDictionary x ) {
//if null or empty, treat us as false/null
return (x == null) ? false : (x.Count == 0);
}
/// <summary>
/// I find this handy. return our fields as comma-separated values
/// </summary>
public string ToCSV() {
// TODO use a char sep argument to allow specifying separator
string ret = string.Empty;
foreach (KeyValuePair<string, object> item in this) {
ret += "<";
ret += item.Key;
ret += ", ";
ret += item.Value;
ret += ">, ";
}
return ret;
}
/// <summary>
/// Concatenate and format so appears as "{,,,}"
/// </summary>
public override string ToString() {
return "{" + this.ToCSV() + "}";
}
}
public class PBXDictionary<T> : Dictionary<string, T> where T : PBXObject
{
public PBXDictionary()
{
}
public PBXDictionary( PBXDictionary genericDictionary )
{
foreach( KeyValuePair<string, object> currentItem in genericDictionary ) {
if( ((string)((PBXDictionary)currentItem.Value)[ "isa" ]).CompareTo( typeof(T).Name ) == 0 ) {
T instance = (T)System.Activator.CreateInstance( typeof(T), currentItem.Key, (PBXDictionary)currentItem.Value );
this.Add( currentItem.Key, instance );
}
}
}
public PBXDictionary( PBXSortedDictionary genericDictionary )
{
foreach( KeyValuePair<string, object> currentItem in genericDictionary ) {
if( ((string)((PBXDictionary)currentItem.Value)[ "isa" ]).CompareTo( typeof(T).Name ) == 0 ) {
T instance = (T)System.Activator.CreateInstance( typeof(T), currentItem.Key, (PBXDictionary)currentItem.Value );
this.Add( currentItem.Key, instance );
}
}
}
public void Add( T newObject )
{
this.Add( newObject.guid, newObject );
}
public void Append( PBXDictionary<T> dictionary )
{
foreach( KeyValuePair<string, T> item in dictionary) {
this.Add( item.Key, (T)item.Value );
}
}
}
}
fileFormatVersion: 2
guid: 80ec175e8a0a4490597beec8a365dcb3
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
namespace UnityEditor.XCodeEditor
{
public class PBXFileReference : PBXObject
{
protected const string PATH_KEY = "path";
protected const string NAME_KEY = "name";
protected const string SOURCETREE_KEY = "sourceTree";
protected const string EXPLICIT_FILE_TYPE_KEY = "explicitFileType";
protected const string LASTKNOWN_FILE_TYPE_KEY = "lastKnownFileType";
protected const string ENCODING_KEY = "fileEncoding";
public string compilerFlags;
public string buildPhase;
public readonly Dictionary<TreeEnum, string> trees = new Dictionary<TreeEnum, string> {
{ TreeEnum.ABSOLUTE, "<absolute>" },
{ TreeEnum.GROUP, "<group>" },
{ TreeEnum.BUILT_PRODUCTS_DIR, "BUILT_PRODUCTS_DIR" },
{ TreeEnum.DEVELOPER_DIR, "DEVELOPER_DIR" },
{ TreeEnum.SDKROOT, "SDKROOT" },
{ TreeEnum.SOURCE_ROOT, "SOURCE_ROOT" }
};
public static readonly Dictionary<string, string> typeNames = new Dictionary<string, string> {
{ ".a", "archive.ar" },
{ ".app", "wrapper.application" },
{ ".s", "sourcecode.asm" },
{ ".c", "sourcecode.c.c" },
{ ".cpp", "sourcecode.cpp.cpp" },
{ ".framework", "wrapper.framework" },
{ ".h", "sourcecode.c.h" },
{ ".pch", "sourcecode.c.h" },
{ ".icns", "image.icns" },
{ ".m", "sourcecode.c.objc" },
{ ".mm", "sourcecode.cpp.objcpp" },
{ ".nib", "wrapper.nib" },
{ ".plist", "text.plist.xml" },
{ ".png", "image.png" },
{ ".rtf", "text.rtf" },
{ ".tiff", "image.tiff" },
{ ".txt", "text" },
{ ".xcodeproj", "wrapper.pb-project" },
{ ".xib", "file.xib" },
{ ".strings", "text.plist.strings" },
{ ".bundle", "wrapper.plug-in" },
{ ".dylib", "compiled.mach-o.dylib" },
{ ".tbd", "sourcecode.text-based-dylib-definition" },
{ ".json", "text.json" }
};
public static readonly Dictionary<string, string> typePhases = new Dictionary<string, string> {
{ ".a", "PBXFrameworksBuildPhase" },
{ ".app", null },
{ ".s", "PBXSourcesBuildPhase" },
{ ".c", "PBXSourcesBuildPhase" },
{ ".cpp", "PBXSourcesBuildPhase" },
{ ".framework", "PBXFrameworksBuildPhase" },
{ ".h", null },
{ ".pch", null },
{ ".icns", "PBXResourcesBuildPhase" },
{ ".m", "PBXSourcesBuildPhase" },
{ ".mm", "PBXSourcesBuildPhase" },
{ ".nib", "PBXResourcesBuildPhase" },
{ ".plist", "PBXResourcesBuildPhase" },
{ ".png", "PBXResourcesBuildPhase" },
{ ".rtf", "PBXResourcesBuildPhase" },
{ ".tiff", "PBXResourcesBuildPhase" },
{ ".txt", "PBXResourcesBuildPhase" },
{ ".json", "PBXResourcesBuildPhase" },
{ ".xcodeproj", null },
{ ".xib", "PBXResourcesBuildPhase" },
{ ".strings", "PBXResourcesBuildPhase" },
{ ".bundle", "PBXResourcesBuildPhase" },
{ ".dylib", "PBXFrameworksBuildPhase" },
{ ".tbd", "PBXFrameworksBuildPhase" }
};
public PBXFileReference( string guid, PBXDictionary dictionary ) : base( guid, dictionary )
{
}
//TODO see if XCode has a preference for ordering these attributes
public PBXFileReference( string filePath, TreeEnum tree = TreeEnum.SOURCE_ROOT ) : base()
{
this.Add( PATH_KEY, filePath );
this.Add( NAME_KEY, System.IO.Path.GetFileName( filePath ) );
this.Add( SOURCETREE_KEY, (string)( System.IO.Path.IsPathRooted( filePath ) ? trees[TreeEnum.ABSOLUTE] : trees[tree] ) );
this.GuessFileType();
}
public string name {
get {
if( !ContainsKey( NAME_KEY ) ) {
return null;
}
return (string)_data[NAME_KEY];
}
}
public string path {
get {
if( !ContainsKey( PATH_KEY ) ) {
return null;
}
return (string)_data[PATH_KEY];
}
}
private void GuessFileType()
{
this.Remove( EXPLICIT_FILE_TYPE_KEY );
this.Remove( LASTKNOWN_FILE_TYPE_KEY );
string extension = System.IO.Path.GetExtension( (string)_data[ PATH_KEY ] );
if( !PBXFileReference.typeNames.ContainsKey( extension ) ){
Debug.LogWarning( "Unknown file extension: " + extension + "\nPlease add extension and Xcode type to PBXFileReference.types" );
return;
}
this.Add( LASTKNOWN_FILE_TYPE_KEY, PBXFileReference.typeNames[ extension ] );
this.buildPhase = PBXFileReference.typePhases[ extension ];
}
private void SetFileType( string fileType )
{
this.Remove( EXPLICIT_FILE_TYPE_KEY );
this.Remove( LASTKNOWN_FILE_TYPE_KEY );
this.Add( EXPLICIT_FILE_TYPE_KEY, fileType );
}
}
public enum TreeEnum {
ABSOLUTE,
GROUP,
BUILT_PRODUCTS_DIR,
DEVELOPER_DIR,
SDKROOT,
SOURCE_ROOT
}
}
fileFormatVersion: 2
guid: 9e85cd63a1f5947d9bc04aa70c0a211e
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
namespace UnityEditor.XCodeEditor
{
public class PBXGroup : PBXObject
{
protected const string NAME_KEY = "name";
protected const string CHILDREN_KEY = "children";
protected const string PATH_KEY = "path";
protected const string SOURCETREE_KEY = "sourceTree";
#region Constructor
public PBXGroup( string name, string path = null, string tree = "SOURCE_ROOT" ) : base()
{
this.Add( CHILDREN_KEY, new PBXList() );
this.Add( NAME_KEY, name );
if( path != null ) {
this.Add( PATH_KEY, path );
this.Add( SOURCETREE_KEY, tree );
}
else {
this.Add( SOURCETREE_KEY, "<group>" );
}
}
public PBXGroup( string guid, PBXDictionary dictionary ) : base( guid, dictionary )
{
}
#endregion
#region Properties
public PBXList children {
get {
if( !ContainsKey( CHILDREN_KEY ) ) {
this.Add( CHILDREN_KEY, new PBXList() );
}
return (PBXList)_data[CHILDREN_KEY];
}
}
public string name {
get {
if( !ContainsKey( NAME_KEY ) ) {
return null;
}
return (string)_data[NAME_KEY];
}
}
public string path {
get {
if( !ContainsKey( PATH_KEY ) ) {
return null;
}
return (string)_data[PATH_KEY];
}
}
public string sourceTree {
get {
return (string)_data[SOURCETREE_KEY];
}
}
#endregion
public string AddChild( PBXObject child )
{
if( child is PBXFileReference || child is PBXGroup ) {
children.Add( child.guid );
return child.guid;
}
return null;
}
public void RemoveChild( string id )
{
if( !IsGuid( id ) )
return;
children.Remove( id );
}
public bool HasChild( string id )
{
if( !ContainsKey( CHILDREN_KEY ) ) {
this.Add( CHILDREN_KEY, new PBXList() );
return false;
}
if( !IsGuid( id ) )
return false;
return ((PBXList)_data[ CHILDREN_KEY ]).Contains( id );
}
public string GetName()
{
return (string)_data[ NAME_KEY ];
}
}
}
fileFormatVersion: 2
guid: 7244995014f654f3d8749bb32782ab95
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
namespace UnityEditor.XCodeEditor
{
public class PBXList : ArrayList
{
public PBXList()
{
}
public PBXList( object firstValue )
{
this.Add( firstValue );
}
/// <summary>
/// This allows us to use the form:
/// "if (x)" or "if (!x)"
/// </summary>
public static implicit operator bool( PBXList x ) {
//if null or empty, treat us as false/null
return (x == null) ? false : (x.Count == 0);
}
/// <summary>
/// I find this handy. return our fields as comma-separated values
/// </summary>
public string ToCSV() {
// TODO use a char sep argument to allow specifying separator
string ret = string.Empty;
foreach (string item in this) {
ret += "\"";
ret += item;
ret += "\", ";
}
return ret;
}
/// <summary>
/// Concatenate and format so appears as "{,,,}"
/// </summary>
public override string ToString() {
return "{" + this.ToCSV() + "} ";
}
}
}
fileFormatVersion: 2
guid: 3f75b6962285f4b0fae8024b6fac0947
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
namespace UnityEditor.XCodeEditor
{
public class PBXObject
{
protected const string ISA_KEY = "isa";
protected string _guid;
protected PBXDictionary _data;
#region Properties
public string guid {
get {
if( string.IsNullOrEmpty( _guid ) )
_guid = GenerateGuid();
return _guid;
}
}
public PBXDictionary data {
get {
if( _data == null )
_data = new PBXDictionary();
return _data;
}
}
#endregion
#region Constructors
public PBXObject()
{
_data = new PBXDictionary();
_data[ ISA_KEY ] = this.GetType().Name;
_guid = GenerateGuid();
}
public PBXObject( string guid ) : this()
{
if( IsGuid( guid ) )
_guid = guid;
}
public PBXObject( string guid, PBXDictionary dictionary ) : this( guid )
{
if( !dictionary.ContainsKey( ISA_KEY ) || ((string)dictionary[ ISA_KEY ]).CompareTo( this.GetType().Name ) != 0 )
Debug.LogError( "PBXDictionary is not a valid ISA object" );
foreach( KeyValuePair<string, object> item in dictionary ) {
_data[ item.Key ] = item.Value;
}
}
#endregion
#region Static methods
public static bool IsGuid( string aString )
{
// Note: Unity3d generates mixed-case GUIDs, Xcode use uppercase GUIDs only.
return System.Text.RegularExpressions.Regex.IsMatch( aString, @"^[A-Fa-f0-9]{24}$" );
}
public static string GenerateGuid()
{
return System.Guid.NewGuid().ToString("N").Substring( 8 ).ToUpper();
}
#endregion
#region Data manipulation
public void Add( string key, object obj )
{
_data.Add( key, obj );
}
public bool Remove( string key )
{
return _data.Remove( key );
}
public bool ContainsKey( string key )
{
return _data.ContainsKey( key );
}
#endregion
#region syntactic sugar
/// <summary>
/// This allows us to use the form:
/// "if (x)" or "if (!x)"
/// </summary>
public static implicit operator bool( PBXObject x ) {
//if null or no data, treat us as false/null
return (x == null) ? false : (x.data.Count == 0);
}
/// <summary>
/// I find this handy. return our fields as comma-separated values
/// </summary>
public string ToCSV() {
return "\"" + data + "\", ";
}
/// <summary>
/// Concatenate and format so appears as "{,,,}"
/// </summary>
public override string ToString() {
return "{" + this.ToCSV() + "} ";
}
#endregion
}
public class PBXNativeTarget : PBXObject
{
public PBXNativeTarget() : base() {
}
public PBXNativeTarget( string guid, PBXDictionary dictionary ) : base( guid, dictionary ) {
}
}
public class PBXContainerItemProxy : PBXObject
{
public PBXContainerItemProxy() : base() {
}
public PBXContainerItemProxy( string guid, PBXDictionary dictionary ) : base( guid, dictionary ) {
}
}
public class PBXReferenceProxy : PBXObject
{
public PBXReferenceProxy() : base() {
}
public PBXReferenceProxy( string guid, PBXDictionary dictionary ) : base( guid, dictionary ) {
}
}
}
fileFormatVersion: 2
guid: c2821fff09674488a8ed27548cee3074
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
This diff is collapsed.
fileFormatVersion: 2
guid: cfba1f9c564074681a0f55c9eaada210
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
namespace UnityEditor.XCodeEditor
{
public class PBXProject : PBXObject
{
protected string MAINGROUP_KEY = "mainGroup";
protected string KNOWN_REGIONS_KEY = "knownRegions";
protected bool _clearedLoc = false;
public PBXProject() : base() {
}
public PBXProject( string guid, PBXDictionary dictionary ) : base( guid, dictionary ) {
}
public string mainGroupID {
get {
return (string)_data[ MAINGROUP_KEY ];
}
}
public PBXList knownRegions {
get {
return (PBXList)_data[ KNOWN_REGIONS_KEY ];
}
}
public void AddRegion(string region) {
if (!_clearedLoc)
{
// Only include localizations we explicitly specify
knownRegions.Clear();
_clearedLoc = true;
}
knownRegions.Add(region);
}
}
}
fileFormatVersion: 2
guid: 8f0018d37205a4b0abb08efa4a0afd3c
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
namespace UnityEditor.XCodeEditor
{
public class PBXSortedDictionary : SortedDictionary<string, object>
{
public void Append( PBXDictionary dictionary )
{
foreach( var item in dictionary) {
this.Add( item.Key, item.Value );
}
}
public void Append<T>( PBXDictionary<T> dictionary ) where T : PBXObject
{
foreach( var item in dictionary) {
this.Add( item.Key, item.Value );
}
}
}
public class PBXSortedDictionary<T> : SortedDictionary<string, T> where T : PBXObject
{
public PBXSortedDictionary()
{
}
public PBXSortedDictionary( PBXDictionary genericDictionary )
{
foreach( KeyValuePair<string, object> currentItem in genericDictionary ) {
if( ((string)((PBXDictionary)currentItem.Value)[ "isa" ]).CompareTo( typeof(T).Name ) == 0 ) {
T instance = (T)System.Activator.CreateInstance( typeof(T), currentItem.Key, (PBXDictionary)currentItem.Value );
this.Add( currentItem.Key, instance );
}
}
}
public void Add( T newObject )
{
this.Add( newObject.guid, newObject );
}
public void Append( PBXDictionary<T> dictionary )
{
foreach( KeyValuePair<string, T> item in dictionary) {
this.Add( item.Key, (T)item.Value );
}
}
}
}
fileFormatVersion: 2
guid: f18f43a4db7a840d28721bc57cd91137
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
namespace UnityEditor.XCodeEditor
{
public class PBXVariantGroup : PBXGroup
{
#region Constructor
public PBXVariantGroup( string name, string path = null, string tree = "SOURCE_ROOT" )
: base(name, path, tree)
{
}
public PBXVariantGroup( string guid, PBXDictionary dictionary ) : base( guid, dictionary )
{
}
#endregion
}
}
fileFormatVersion: 2
guid: eff306ff024494b8cb41d590dd4e6da9
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
fileFormatVersion: 2
guid: 964405d7aabe24c63b8f9719682db466
folderAsset: yes
DefaultImporter:
userData:
This diff is collapsed.
fileFormatVersion: 2
guid: aa641998e0e1d4b8594cfce2d1b0bb6d
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
#XUPorter
## Overview
`XUPorter` can help you to add files and frameworks to your Xcode 4 project after it is generated by Unity 3D automatically and dramatically. Lot of changes from [XCodeEditor-for-Unity](https://github.com/dcariola/XCodeEditor-for-Unity).
中文版的说明请看[这里](http://www.onevcat.com/2012/12/xuporter/)
## Installation
Add all files of the repo to your Unity project's Editor Folder: {$ProjectFolder}/Assets/Editor/XUPorter or you can download [this unity package](https://www.dropbox.com/s/lo2wu7gur64py7a/XUPorter.unitypackage) and import to your project.
Some demos are contained in /Mods folder, they are just a tutorial to help you getting start. Please feel free to delete or substitute all files in that folder as soon as you know how to use `XUPorter`. [A simplified MiniJSON](https://github.com/prime31/UIToolkit/blob/master/Assets/Plugins/MiniJSON.cs) is now used in `XUPorter`, but I put it into a namespace, so there is no worry of conflicting, even if you are already using a same JSON wrapper.
`XUPorter` require Unity 3.5 or higher and Xcode 4 to work properly. I have tested for Xcode 5 DP and it can work well now too.
## Usage
After the Unity's building phase, OnPostProcessBuild in XCodePostProcess.cs will be called and Xcode project file will be modified. All .projmods (which is in JSON) will be treated as Xcode patch setting files (In the demos, all .projmods files are in /Mods folder). `XUPorter` will find and read all projmods files in /Assets and modify Xcode project file as settings.
In these setting files, specify the fields using a json pattern.
* group:The group name in Xcode to which files and folders will added by this projmods file
* libs:The name of libs should be added in Xcode Build Phases, libz.dylib for example. If you want to import a .a lib to Xcode, add it as a file(in "files")
* frameworks:The name of framework should be added in Xcode Build Phases, Security.framework for example. If you want to add a third party framework, add it using a relative path to `files` section instead of here.
* headerpaths:Header Search Paths in Build Setting of Xcode
* files:Files which should be added
* folders:Folders which should be added. All file and folders(recursively) will be added
* excludes:Regular expression pattern. Matched files will not be added.
* compiler_flags: Compiler flags which should be added, e.g. "-Wno-vexing-parse"
* linker_flags: Linker flags which should be added, e.g. "-ObjC"
* embed_binaries: Optional fields, support XCode 6+ `Embed Framework` feature. Notice: The frameworks must added already in `frameworks` or `files` fields.
* plist: edit the Info.plist file, only the urltype is supported currently. in url type settings, `name` and `schemes` are required, while `role` is optional and is `Editor` by default.
Use : for folders and files to add compiler flags to those files. For example: `path/to/my/folder:-fobjc-arc` or `path/to/my/file.m:-fobjc-arc`. You can add multiple compiler flags by using , to seperate them, too.
One example, the following file will add all files in /iOS/KKKeychain to the Xcode group `KKKeychain` and add the `Security.framework` to Xcode project.
```
{
"group": "KKKeychain",
"libs": [],
"frameworks": ["Security.framework"],
"headerpaths": [],
"files": [],
"folders": ["iOS/KKKeychain/"],
"excludes": ["^.*.meta$", "^.*.mdown$", "^.*.pdf$"],
"compiler_flags": [],
"linker_flags": [],
"embed_binaries": [],
"plist": {
"urltype" : [
{
"role": "Editor",
"name" : "wechat",
"schemes":["wxyz123456789"]
},
{
"name" : "twitter",
"schemes":["www1234566"]
}
],
},
}
```
### Contributor
Thanks for all contributors of this project. Especially [@pronebird](https://github.com/pronebird) and [@MatthewMaker](https://github.com/MatthewMaker)'s great effort!
## LICENSE
This code is distributed under the terms and conditions of the MIT license.
Copyright (c) 2012 Wei Wang @onevcat
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
fileFormatVersion: 2
guid: e85372c76e7b241e3b5378850b220436
DefaultImporter:
userData:
using UnityEngine;
using System.Collections;
namespace UnityEditor.XCodeEditor
{
public class XCBuildConfiguration : PBXObject
{
protected const string BUILDSETTINGS_KEY = "buildSettings";
protected const string HEADER_SEARCH_PATHS_KEY = "HEADER_SEARCH_PATHS";
protected const string LIBRARY_SEARCH_PATHS_KEY = "LIBRARY_SEARCH_PATHS";
protected const string FRAMEWORK_SEARCH_PATHS_KEY = "FRAMEWORK_SEARCH_PATHS";
protected const string OTHER_C_FLAGS_KEY = "OTHER_CFLAGS";
protected const string OTHER_LDFLAGS_KEY = "OTHER_LDFLAGS";
public XCBuildConfiguration( string guid, PBXDictionary dictionary ) : base( guid, dictionary )
{
}
public PBXSortedDictionary buildSettings {
get {
if( ContainsKey( BUILDSETTINGS_KEY ) ) {
if (_data[BUILDSETTINGS_KEY].GetType() == typeof(PBXDictionary)) {
PBXSortedDictionary ret = new PBXSortedDictionary();
ret.Append((PBXDictionary)_data[BUILDSETTINGS_KEY]);
return ret;
}
return (PBXSortedDictionary)_data[BUILDSETTINGS_KEY];
}
return null;
}
}
protected bool AddSearchPaths( string path, string key, bool recursive = true )
{
PBXList paths = new PBXList();
paths.Add( path );
return AddSearchPaths( paths, key, recursive );
}
protected bool AddSearchPaths( PBXList paths, string key, bool recursive = true, bool quoted = false ) //we want no quoting whenever we can get away with it
{
//Debug.Log ("AddSearchPaths " + paths + key + (recursive?" recursive":"") + " " + (quoted?" quoted":""));
bool modified = false;
if( !ContainsKey( BUILDSETTINGS_KEY ) )
this.Add( BUILDSETTINGS_KEY, new PBXSortedDictionary() );
foreach( string path in paths ) {
string currentPath = path;
//Debug.Log ("path " + currentPath);
if( !((PBXDictionary)_data[BUILDSETTINGS_KEY]).ContainsKey( key ) ) {
((PBXDictionary)_data[BUILDSETTINGS_KEY]).Add( key, new PBXList() );
}
else if( ((PBXDictionary)_data[BUILDSETTINGS_KEY])[key] is string ) {
PBXList list = new PBXList();
list.Add( ((PBXDictionary)_data[BUILDSETTINGS_KEY])[key] );
((PBXDictionary)_data[BUILDSETTINGS_KEY])[key] = list;
}
//Xcode uses space as the delimiter here, so if there's a space in the filename, we *must* quote. Escaping with slash may work when you are in the Xcode UI, in some situations, but it doesn't work here.
if (currentPath.Contains(@" ")) quoted = true;
if (quoted) {
//if it ends in "/**", it wants to be recursive, and the "/**" needs to be _outside_ the quotes
if (currentPath.EndsWith("/**")) {
currentPath = "\\\"" + currentPath.Replace("/**", "\\\"/**");
} else {
currentPath = "\\\"" + currentPath + "\\\"";
}
}
//Debug.Log ("currentPath = " + currentPath);
if( !((PBXList)((PBXDictionary)_data[BUILDSETTINGS_KEY])[key]).Contains( currentPath ) ) {
((PBXList)((PBXDictionary)_data[BUILDSETTINGS_KEY])[key]).Add( currentPath );
modified = true;
}
}
return modified;
}
public bool AddHeaderSearchPaths( PBXList paths, bool recursive = true )
{
return this.AddSearchPaths( paths, HEADER_SEARCH_PATHS_KEY, recursive );
}
public bool AddLibrarySearchPaths( PBXList paths, bool recursive = true )
{
Debug.Log ("AddLibrarySearchPaths " + paths);
return this.AddSearchPaths( paths, LIBRARY_SEARCH_PATHS_KEY, recursive );
}
public bool AddFrameworkSearchPaths( PBXList paths, bool recursive = true )
{
return this.AddSearchPaths( paths, FRAMEWORK_SEARCH_PATHS_KEY, recursive );
}
public bool AddOtherCFlags( string flag )
{
//Debug.Log( "INIZIO 1" );
PBXList flags = new PBXList();
flags.Add( flag );
return AddOtherCFlags( flags );
}
public bool AddOtherCFlags( PBXList flags )
{
//Debug.Log( "INIZIO 2" );
bool modified = false;
if( !ContainsKey( BUILDSETTINGS_KEY ) )
this.Add( BUILDSETTINGS_KEY, new PBXSortedDictionary() );
foreach( string flag in flags ) {
if( !((PBXDictionary)_data[BUILDSETTINGS_KEY]).ContainsKey( OTHER_C_FLAGS_KEY ) ) {
((PBXDictionary)_data[BUILDSETTINGS_KEY]).Add( OTHER_C_FLAGS_KEY, new PBXList() );
}
else if ( ((PBXDictionary)_data[BUILDSETTINGS_KEY])[ OTHER_C_FLAGS_KEY ] is string ) {
string tempString = (string)((PBXDictionary)_data[BUILDSETTINGS_KEY])[OTHER_C_FLAGS_KEY];
((PBXDictionary)_data[BUILDSETTINGS_KEY])[ OTHER_C_FLAGS_KEY ] = new PBXList();
((PBXList)((PBXDictionary)_data[BUILDSETTINGS_KEY])[OTHER_C_FLAGS_KEY]).Add( tempString );
}
if( !((PBXList)((PBXDictionary)_data[BUILDSETTINGS_KEY])[OTHER_C_FLAGS_KEY]).Contains( flag ) ) {
((PBXList)((PBXDictionary)_data[BUILDSETTINGS_KEY])[OTHER_C_FLAGS_KEY]).Add( flag );
modified = true;
}
}
return modified;
}
public bool AddOtherLinkerFlags( string flag )
{
PBXList flags = new PBXList();
flags.Add( flag );
return AddOtherLinkerFlags( flags );
}
public bool AddOtherLinkerFlags( PBXList flags )
{
bool modified = false;
if( !ContainsKey( BUILDSETTINGS_KEY ) )
this.Add( BUILDSETTINGS_KEY, new PBXSortedDictionary() );
foreach( string flag in flags ) {
if( !((PBXDictionary)_data[BUILDSETTINGS_KEY]).ContainsKey( OTHER_LDFLAGS_KEY ) ) {
((PBXDictionary)_data[BUILDSETTINGS_KEY]).Add( OTHER_LDFLAGS_KEY, new PBXList() );
}
else if ( ((PBXDictionary)_data[BUILDSETTINGS_KEY])[ OTHER_LDFLAGS_KEY ] is string ) {
string tempString = (string)((PBXDictionary)_data[BUILDSETTINGS_KEY])[OTHER_LDFLAGS_KEY];
((PBXDictionary)_data[BUILDSETTINGS_KEY])[ OTHER_LDFLAGS_KEY ] = new PBXList();
if( !string.IsNullOrEmpty(tempString) ) {
((PBXList)((PBXDictionary)_data[BUILDSETTINGS_KEY])[OTHER_LDFLAGS_KEY]).Add( tempString );
}
}
if( !((PBXList)((PBXDictionary)_data[BUILDSETTINGS_KEY])[OTHER_LDFLAGS_KEY]).Contains( flag ) ) {
((PBXList)((PBXDictionary)_data[BUILDSETTINGS_KEY])[OTHER_LDFLAGS_KEY]).Add( flag );
modified = true;
}
}
return modified;
}
public bool overwriteBuildSetting(string settingName, string settingValue) {
Debug.Log ("overwriteBuildSetting " + settingName + " " + settingValue);
bool modified = false;
if( !ContainsKey( BUILDSETTINGS_KEY ) ) {
Debug.Log ("creating key " + BUILDSETTINGS_KEY);
this.Add( BUILDSETTINGS_KEY, new PBXSortedDictionary() );
}
if( !((PBXDictionary)_data[BUILDSETTINGS_KEY]).ContainsKey( settingName ) ) {
Debug.Log("adding key " + settingName);
((PBXDictionary)_data[BUILDSETTINGS_KEY]).Add( settingName, new PBXList() );
}
else if ( ((PBXDictionary)_data[BUILDSETTINGS_KEY])[ settingName ] is string ) {
//Debug.Log("key is string:" + settingName);
//string tempString = (string)((PBXDictionary)_data[BUILDSETTINGS_KEY])[settingName];
((PBXDictionary)_data[BUILDSETTINGS_KEY])[ settingName ] = new PBXList();
//((PBXList)((PBXDictionary)_data[BUILDSETTINGS_KEY])[settingName]).Add( tempString );
}
if( !((PBXList)((PBXDictionary)_data[BUILDSETTINGS_KEY])[settingName]).Contains( settingValue ) ) {
Debug.Log("setting " + settingName + " to " + settingValue);
((PBXList)((PBXDictionary)_data[BUILDSETTINGS_KEY])[settingName]).Add( settingValue );
modified = true;
}
return modified;
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 189232aeaab4d4a90b9fe88d7259b672
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
namespace UnityEditor.XCodeEditor
{
public class XCConfigurationList : PBXObject
{
// XCBuildConfigurationList buildConfigurations;
// bool defaultConfigurationIsVisible = false;
// string defaultConfigurationName;
public XCConfigurationList( string guid, PBXDictionary dictionary ) : base( guid, dictionary ) {
}
}
}
fileFormatVersion: 2
guid: 4e44773a3df3045898aeb2f515f4dfa7
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
using UnityEngine;
using System.Collections;
using System.IO;
namespace UnityEditor.XCodeEditor
{
public class XCMod
{
private Hashtable _datastore = new Hashtable();
private ArrayList _libs = null;
public string name { get; private set; }
public string path { get; private set; }
public string group {
get {
if (_datastore != null && _datastore.Contains("group"))
return (string)_datastore["group"];
return string.Empty;
}
}
public ArrayList patches {
get {
return (ArrayList)_datastore["patches"];
}
}
public ArrayList libs {
get {
if( _libs == null ) {
_libs = new ArrayList( ((ArrayList)_datastore["libs"]).Count );
foreach( string fileRef in (ArrayList)_datastore["libs"] ) {
Debug.Log("Adding to Libs: "+fileRef);
_libs.Add( new XCModFile( fileRef ) );
}
}
return _libs;
}
}
public ArrayList frameworks {
get {
return (ArrayList)_datastore["frameworks"];
}
}
public ArrayList headerpaths {
get {
return (ArrayList)_datastore["headerpaths"];
}
}
public ArrayList files {
get {
return (ArrayList)_datastore["files"];
}
}
public ArrayList folders {
get {
return (ArrayList)_datastore["folders"];
}
}
public ArrayList excludes {
get {
return (ArrayList)_datastore["excludes"];
}
}
public ArrayList compiler_flags {
get {
return (ArrayList)_datastore["compiler_flags"];
}
}
public ArrayList linker_flags {
get {
return (ArrayList)_datastore["linker_flags"];
}
}
public ArrayList embed_binaries {
get {
return (ArrayList)_datastore["embed_binaries"];
}
}
public Hashtable plist {
get {
return (Hashtable)_datastore["plist"];
}
}
public XCMod( string filename )
{
FileInfo projectFileInfo = new FileInfo( filename );
if( !projectFileInfo.Exists ) {
Debug.LogWarning( "File does not exist." );
}
name = System.IO.Path.GetFileNameWithoutExtension( filename );
path = System.IO.Path.GetDirectoryName( filename );
string contents = projectFileInfo.OpenText().ReadToEnd();
Debug.Log (contents);
_datastore = (Hashtable)XUPorterJSON.MiniJSON.jsonDecode( contents );
if (_datastore == null || _datastore.Count == 0) {
Debug.Log (contents);
throw new UnityException("Parse error in file " + System.IO.Path.GetFileName(filename) + "! Check for typos such as unbalanced quotation marks, etc.");
}
}
}
public class XCModFile
{
public string filePath { get; private set; }
public bool isWeak { get; private set; }
public XCModFile( string inputString )
{
isWeak = false;
if( inputString.Contains( ":" ) ) {
string[] parts = inputString.Split( ':' );
filePath = parts[0];
isWeak = ( parts[1].CompareTo( "weak" ) == 0 );
}
else {
filePath = inputString;
}
}
}
}
fileFormatVersion: 2
guid: d3f1c78985b914f54b218977a3d51933
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.IO;
namespace UnityEditor.XCodeEditor
{
public class XCPlist
{
string plistPath;
bool plistModified;
// URLTypes constant --- plist
const string BundleUrlTypes = "CFBundleURLTypes";
const string BundleTypeRole = "CFBundleTypeRole";
const string BundleUrlName = "CFBundleURLName";
const string BundleUrlSchemes = "CFBundleURLSchemes";
// URLTypes constant --- projmods
const string PlistUrlType = "urltype";
const string PlistRole = "role";
const string PlistEditor = "Editor";
const string PlistName = "name";
const string PlistSchemes = "schemes";
public XCPlist(string plistPath)
{
this.plistPath = plistPath;
}
public void Process(Hashtable plist)
{
if (plist == null) return;
Dictionary<string, object> dict = (Dictionary<string, object>)PlistCS.Plist.readPlist(plistPath);
foreach( DictionaryEntry entry in plist)
{
this.AddPlistItems((string)entry.Key, entry.Value, dict);
}
if (plistModified)
{
PlistCS.Plist.writeXml(dict, plistPath);
}
}
// http://stackoverflow.com/questions/20618809/hashtable-to-dictionary
public static Dictionary<K,V> HashtableToDictionary<K,V> (Hashtable table)
{
Dictionary<K,V> dict = new Dictionary<K,V>();
foreach(DictionaryEntry kvp in table)
dict.Add((K)kvp.Key, (V)kvp.Value);
return dict;
}
public void AddPlistItems(string key, object value, Dictionary<string, object> dict)
{
Debug.Log ("AddPlistItems: key=" + key);
if (key.CompareTo(PlistUrlType) == 0)
{
processUrlTypes((ArrayList)value, dict);
}
else
{
dict[key] = HashtableToDictionary<string, object>((Hashtable)value);
plistModified = true;
}
}
private void processUrlTypes(ArrayList urltypes, Dictionary<string, object> dict)
{
List<object> bundleUrlTypes;
if (dict.ContainsKey(BundleUrlTypes))
{
bundleUrlTypes = (List<object>)dict[BundleUrlTypes];
}
else
{
bundleUrlTypes = new List<object>();
}
foreach(Hashtable table in urltypes)
{
string role = (string)table[PlistRole];
if (string.IsNullOrEmpty(role))
{
role = PlistEditor;
}
string name = (string)table[PlistName];
ArrayList shcemes = (ArrayList)table[PlistSchemes];
// new schemes
List<object> urlTypeSchemes = new List<object>();
foreach(string s in shcemes)
{
urlTypeSchemes.Add(s);
}
Dictionary<string, object> urlTypeDict = this.findUrlTypeByName(bundleUrlTypes, name);
if (urlTypeDict == null)
{
urlTypeDict = new Dictionary<string, object>();
urlTypeDict[BundleTypeRole] = role;
urlTypeDict[BundleUrlName] = name;
urlTypeDict[BundleUrlSchemes] = urlTypeSchemes;
bundleUrlTypes.Add(urlTypeDict);
}
else
{
urlTypeDict[BundleTypeRole] = role;
urlTypeDict[BundleUrlSchemes] = urlTypeSchemes;
}
plistModified = true;
}
dict[BundleUrlTypes] = bundleUrlTypes;
}
private Dictionary<string, object> findUrlTypeByName(List<object> bundleUrlTypes, string name)
{
if ((bundleUrlTypes == null) || (bundleUrlTypes.Count == 0))
return null;
foreach(Dictionary<string, object> dict in bundleUrlTypes)
{
string _n = (string)dict[BundleUrlName];
if (string.Compare(_n, name) == 0)
{
return dict;
}
}
return null;
}
}
}
fileFormatVersion: 2
guid: 1d139ac4b68374224a37243fb4dd87fc
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
This diff is collapsed.
fileFormatVersion: 2
guid: 386979592dd7e47b9a195f851501f676
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.IO;
namespace UnityEditor.XCodeEditor
{
public partial class XClass : System.IDisposable
{
private string filePath;
public XClass(string fPath)
{
filePath = fPath;
if( !System.IO.File.Exists( filePath ) ) {
Debug.LogError( filePath +"路径下文件不存在" );
return;
}
}
public void WriteBelow(string below, string text)
{
StreamReader streamReader = new StreamReader(filePath);
string text_all = streamReader.ReadToEnd();
streamReader.Close();
int beginIndex = text_all.IndexOf(below);
if(beginIndex == -1){
Debug.LogError(filePath +"中没有找到标致"+below);
return;
}
int endIndex = text_all.LastIndexOf("\n", beginIndex + below.Length);
text_all = text_all.Substring(0, endIndex) + "\n"+text+"\n" + text_all.Substring(endIndex);
StreamWriter streamWriter = new StreamWriter(filePath);
streamWriter.Write(text_all);
streamWriter.Close();
}
public void Replace(string below, string newText)
{
StreamReader streamReader = new StreamReader(filePath);
string text_all = streamReader.ReadToEnd();
streamReader.Close();
int beginIndex = text_all.IndexOf(below);
if(beginIndex == -1){
Debug.LogError(filePath +"中没有找到标致"+below);
return;
}
text_all = text_all.Replace(below,newText);
StreamWriter streamWriter = new StreamWriter(filePath);
streamWriter.Write(text_all);
streamWriter.Close();
}
public void Dispose()
{
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: eb7e547716f574410a007ce72ca068c4
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.XCodeEditor;
#endif
using System.IO;
public static class XCodePostProcess
{
#if UNITY_EDITOR
[PostProcessBuild(999)]
public static void OnPostProcessBuild( BuildTarget target, string pathToBuiltProject )
{
#if UNITY_5
if (target != BuildTarget.iOS) {
#else
if (target != BuildTarget.iOS) {
#endif
Debug.LogWarning("Target is not iPhone. XCodePostProcess will not run");
return;
}
// Create a new project object from build target
XCProject project = new XCProject( pathToBuiltProject );
// Find and run through all projmods files to patch the project.
// Please pay attention that ALL projmods files in your project folder will be excuted!
string[] files = Directory.GetFiles( Application.dataPath, "*.projmods", SearchOption.AllDirectories );
foreach( string file in files ) {
UnityEngine.Debug.Log("ProjMod File: "+file);
project.ApplyMod( file );
}
//TODO disable the bitcode for iOS 9
project.overwriteBuildSetting("ENABLE_BITCODE", "NO", "Release");
project.overwriteBuildSetting("ENABLE_BITCODE", "NO", "Debug");
//TODO implement generic settings as a module option
// project.overwriteBuildSetting("CODE_SIGN_IDENTITY[sdk=iphoneos*]", "iPhone Distribution", "Release");
// Finally save the xcode project
project.Save();
}
#endif
public static void Log(string message)
{
UnityEngine.Debug.Log("PostProcess: "+message);
}
}
fileFormatVersion: 2
guid: 02d512b8c59ab43e1ad091cdb5510314
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
......@@ -35,7 +35,7 @@ public final class UnionApplication extends Application {
mApplcation = this;
AppliContext.init(this);
UMConfigure.setLogEnabled(true);
UMConfigure.init(this, "60bb4765799cce47f93624d9", "toutiao", UMConfigure.DEVICE_TYPE_PHONE,"");
UMConfigure.init(this, "608669265844f15425eb7953", "toutiao", UMConfigure.DEVICE_TYPE_PHONE,"");
}
......
fileFormatVersion: 2
guid: 5cef439187fbb41ab879da2b95ac4291
folderAsset: yes
DefaultImporter:
userData:
fileFormatVersion: 2
guid: 694411f45e4e64facb88eebfc2e1df1c
folderAsset: yes
DefaultImporter:
userData:
fileFormatVersion: 2
guid: e8fc61bed8a2640c7a2c6d5a51574621
guid: 644a9f5710e62403c94066ef9b61e775
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 9b3f9e305d4804719b5f4505912accf2
guid: fb7b442d8e32443e5856838741007f70
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 432060a129574479db0cfd441cdf3d69
timeCreated: 1497948394
licenseType: Free
PluginImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
isPreloaded: 0
platformData:
Android:
enabled: 1
settings:
CPU: ARMv7
Any:
enabled: 0
settings: {}
Editor:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 70c2f5016d12841a58b22885903c1170
timeCreated: 1481808880
licenseType: Free
PluginImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
isPreloaded: 0
platformData:
Android:
enabled: 1
settings: {}
Any:
enabled: 0
settings: {}
Editor:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 1db231dca0f72420cb880590f799d7d5
timeCreated: 1481808880
licenseType: Free
PluginImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
isPreloaded: 0
platformData:
Android:
enabled: 1
settings: {}
Any:
enabled: 0
settings: {}
Editor:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: a75f8ac9bc3f8414cb9b1aca48735084
guid: 79531ba82725e4071861c982307805c3
folderAsset: yes
timeCreated: 1443426231
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 16eaf0ec67588418783d6f5311aa71ce
timeCreated: 1497948394
licenseType: Free
PluginImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
isPreloaded: 0
platformData:
Android:
enabled: 1
settings:
CPU: x86
Any:
enabled: 0
settings: {}
Editor:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: be621fe31508b4f2ab134ee879ec97b4
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
// ----------------------------------------
//
// BuglyCallbackDelegate.cs
//
// Author:
// Yeelik, <bugly@tencent.com>
//
// Copyright (c) 2015 Bugly, Tencent. All rights reserved.
//
// ----------------------------------------
//
using UnityEngine;
using System.Collections;
public abstract class BuglyCallback
{
// The delegate of callback handler which Call the Application.RegisterLogCallback(Application.LogCallback)
/// <summary>
/// Raises the application log callback handler event.
/// </summary>
/// <param name="condition">Condition.</param>
/// <param name="stackTrace">Stack trace.</param>
/// <param name="type">Type.</param>
public abstract void OnApplicationLogCallbackHandler (string condition, string stackTrace, LogType type);
}
fileFormatVersion: 2
guid: 78e76f643d1884dcab602d5fe79b08e1
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
This diff is collapsed.
fileFormatVersion: 2
guid: a717f6955eddf4463ad541714a1b5483
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
......@@ -34,6 +34,11 @@ public class InitProject : MonoBehaviour
#if !UNITY_EDITOR && UNITY_IOS
// 初始化友盟sdk
InitUMSDK(Constant.Instance.UM_ID);
#endif
#if UNITY_IPHONE || UNITY_IOS
//BuglyAgent.InitWithAppId ("Your App ID");
#elif UNITY_ANDROID
BuglyAgent.InitWithAppId("43671e8612");
#endif
}
......
......@@ -33,6 +33,7 @@ public class Splash : MonoBehaviour
{
EventUtils.OnEvent("app_start");
getPermission();
BuglyAgent.EnableExceptionHandler();
}
/// <summary>
......
This diff is collapsed.
......@@ -17,7 +17,7 @@ MonoBehaviour:
m_Registries:
- m_Id: main
m_Name:
m_Url: https://packages.unity.com
m_Url: https://packages.unity.cn
m_Scopes: []
m_IsDefault: 1
m_UserSelectedRegistryName:
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment