xuguohong

idfa

Showing 427 changed files with 220 additions and 236 deletions
No preview for this file type
......@@ -466,7 +466,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer: luo yuanyuan (82PEUDVHS9)";
CODE_SIGN_IDENTITY = "iPhone Developer: Yufeng Wang (N5VLW9NRUG)";
DEAD_CODE_STRIPPING = NO;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
......@@ -475,19 +475,20 @@
"$(PROJECT_DIR)/poolsdk_file/poolsdk",
);
INFOPLIST_FILE = poolsdk_file/poolsdk/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Demo",
"$(PROJECT_DIR)/poolsdk_file/poolsdk",
);
ONLY_ACTIVE_ARCH = YES;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = com.jian.wuji;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
VALID_ARCHS = "arm64 armv7";
PROVISIONING_PROFILE = "e6d180fd-5532-4218-bf56-0c1afa8ea0b4";
TARGETED_DEVICE_FAMILY = 2;
VALID_ARCHS = "arm64 armv7s";
};
name = Debug;
};
......@@ -495,7 +496,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer: luo yuanyuan (82PEUDVHS9)";
CODE_SIGN_IDENTITY = "iPhone Developer: Yufeng Wang (N5VLW9NRUG)";
DEAD_CODE_STRIPPING = NO;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
......@@ -504,19 +505,20 @@
"$(PROJECT_DIR)/poolsdk_file/poolsdk",
);
INFOPLIST_FILE = poolsdk_file/poolsdk/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Demo",
"$(PROJECT_DIR)/poolsdk_file/poolsdk",
);
ONLY_ACTIVE_ARCH = YES;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = com.jian.wuji;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
VALID_ARCHS = "arm64 armv7";
PROVISIONING_PROFILE = "e6d180fd-5532-4218-bf56-0c1afa8ea0b4";
TARGETED_DEVICE_FAMILY = 2;
VALID_ARCHS = "arm64 armv7s";
};
name = Release;
};
......
......@@ -37,11 +37,7 @@
[[PoolSdk shareSDK]applicationDidEnterBackground:application];
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
NSLog(@"applicationWillEnterForeground1111111");
[[PoolSdk shareSDK] applicationWillEnterForeground:application];
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
......@@ -58,10 +54,22 @@
return true;
}
-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options
{
[[PoolSdk shareSDK]application:app openURL:url options:options];
return YES;
}
-(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
[[PoolSdk shareSDK] application:application openURL:url sourceApplication:sourceApplication annotation:annotation];
return YES;
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
[[PoolSdk shareSDK] applicationWillEnterForeground:application];
}
@end
......
......@@ -154,4 +154,36 @@
}
}
#pragma mark - 截屏
- (void)screenShot:(UIView *)view{
UIImage* image = nil;
UIGraphicsBeginImageContext(view.bounds.size);
[view.layer renderInContext:UIGraphicsGetCurrentContext()];
image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIGraphicsEndImageContext();
if (image != nil) {
NSLog(@"截图成功!");
UIImageWriteToSavedPhotosAlbum(image,self,@selector(image:didFinishSavingWithError:contextInfo:),NULL);
}
}
#pragma mark - 保存到相册
-(void)image:(UIImage *)image didFinishSavingWithError:(NSError*)error contextInfo:(void*)contextInfo
{
if(!error){
NSLog(@"存到相册");
}else{
NSLog(@"存储失败");
}
}
@end
......
No preview for this file type
......@@ -9,7 +9,7 @@
#include "UnionInterface.h"
#import <SafariServices/SafariServices.h>
@interface Interface : NSObject <UnionInterface,SFSafariViewControllerDelegate>
@interface Interface : NSObject <UnionInterface>
@property(nonatomic, strong)UIViewController *controller;
......
......@@ -29,5 +29,7 @@
- (void)httpPostAsyncOpen:(NSString*)postUrl :(NSDictionary*)postDict;
- (NSString *)dicToString:(NSDictionary *) dict;
-(void)httpGetAsync:(NSString *)url completionHandler:(void (^ __nullable)(NSURLResponse* __nullable response, NSData* __nullable data, NSError* __nullable connectionError)) handler;
- (NSString * __nullable)dicToString:(NSDictionary * __nullable) dict;
@end
......
......@@ -30,7 +30,10 @@
@property(nonatomic, strong)NSString *openId;
#define REPORT_URL @"https://statistic.public.sdk.gzyouai.com/sdk/statistic" //@http://public.sdk.gzyouai.com:9030/sdk/statistic"//@"http://10.200.201.230:9001/sdk/statistic"//@"https://statistic.public.sdk.gzyouai.com/sdk/statistic"//
#define REPORT_URL @"https://statistic.public.sdk.gzyouai.com/sdk/statistic" //http://183.57.76.181:9030/sdk/statistic
#define REPORT_IDFA_URL @"https://statistic.public.sdk.gzyouai.com/sdk/last_channel?idfa=" //@"http://183.57.76.181:9030/sdk/last_channel?idfa="//
#define REPORT_OPEN @"open"
#define REPORT_ENTER @"enter"
#define REPORT_CREATEROLE @"createrole"
......
......@@ -36,6 +36,8 @@
-(void)viewDidAppear;
- (void)setViewController:(UIViewController *)viewController;
/**
登录SDK
*/
......@@ -185,6 +187,8 @@
- (void)applicationWillResignActive:(UIApplication *)application;
-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options;
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation;
@end
......
......@@ -19,6 +19,9 @@
- (void)SDKinit:(UIViewController *) control;
- (void)setViewController:(UIViewController *) viewController;
/**
登录SDK
*/
......@@ -123,5 +126,7 @@
- (void)applicationWillResignActive:(UIApplication *)application;
-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options;
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation;
@end
\ No newline at end of file
......
import shutil
import os
import plistlib
import config
import json
import packageProj
from mod_pbxproj import XcodeProject
gameProjName = config.gameProjName
channelName = "bingxue"
#copy dir xcodeproj
copyNewDirName = gameProjName + '_' + channelName + '.xcodeproj'
currentPath = os.path.abspath('.')
currentPath += '/' + copyNewDirName
if os.path.exists(currentPath):
shutil.rmtree(currentPath)
shutil.copytree(gameProjName + '.xcodeproj',currentPath)
project = XcodeProject.Load(copyNewDirName + '/project.pbxproj')
project.add_other_ldflags('-ObjC')
#frameworks = project.add_folder('poolsdk_file/poolsdk_itools')
#print(frameworks);
#add search path
channelRootPath = config.channelRootPath#'poolsdk_file'
frameworksPath = '$(PROJECT_DIR)/' + channelRootPath + '/poolsdk_' + channelName + '/SDK'
print(frameworksPath);
#add header search path
project.add_header_search_paths(frameworksPath, recursive=False)
#add framework search path
project.add_framework_search_paths(frameworksPath, recursive=False)
#add library search path
project.add_library_search_paths(frameworksPath, recursive=False)
#add poolsdk_xy dir all file into project
project.remove_group_by_name('poolsdk')
frameworkRelativePath = project.add_folder(channelRootPath + '/poolsdk_' + channelName + '/SDK')
#add sdk lib framework
#project.add_file_if_doesnt_exist('XYPlatform.framework',parent=frameworkRelativePath, weak=True)
#project.add_file_if_doesnt_exist('XYPlatformResources.bundle',parent=frameworkRelativePath, weak=True)
#remove demo file and replace sdk file
#project.remove_file_by_path('poolsdk_file/Demo')
#project.remove_group_by_name('poolsdk_file')
#project.add_file_if_doesnt_exist('PoolSdk.h',parent=frameworkRelativePath, weak=True)
#project.add_file_if_doesnt_exist('PoolSdk.m',parent=frameworkRelativePath, weak=True)
#project.add_file_if_doesnt_exist('SDKInterface.h',parent=frameworkRelativePath, weak=True)
#project.add_file_if_doesnt_exist('SDKInterface.m',parent=frameworkRelativePath, weak=True)
#ignore_unknown_type
project.add_file_if_doesnt_exist('pool_setting',parent=frameworkRelativePath, weak=True,ignore_unknown_type=True)
systemFrameworks = project.get_or_create_group('Frameworks')
#add system framework
project.add_file_if_doesnt_exist('System/Library/Frameworks/CoreTelephony.framework',parent=systemFrameworks, weak=True, tree='SDKROOT')
project.add_file_if_doesnt_exist('System/Library/Frameworks/SystemConfiguration.framework',parent=systemFrameworks, weak=True, tree='SDKROOT')
#add system dylib
systemLibs = project.get_or_create_group('Libraries')
project.add_file_if_doesnt_exist('/usr/lib/libsqlite3.dylib',parent=systemLibs, weak=True, tree='<absolute>')#absolute path
#modify info.plist reference path
project.add_single_valued_flag('INFOPLIST_FILE',channelRootPath + '/poolsdk_' + channelName + '/Info.plist')
project.add_single_valued_flag('ENABLE_BITCODE', 'NO')
readInfoPlistFilePath = channelRootPath + '/poolsdk/Info.plist'
writeInfoFilePath = channelRootPath + '/poolsdk_' + channelName + '/Info.plist'
infoContent = plistlib.readPlist(readInfoPlistFilePath)
xyInfoPath = channelRootPath + '/poolsdk_' + channelName + '/Info_' + channelName + '.plist'
xyInfoContent = plistlib.readPlist(xyInfoPath)
#read pool_setting file
settingFile = open(channelRootPath + '/poolsdk_' + channelName + '/SDK/pool_setting','rw')
try:
settingFileContent = settingFile.read( )
finally:
settingFile.close( )
#json op
jsonStr = json.loads(settingFileContent)
#modify bundle id
project.add_single_valued_flag('PRODUCT_BUNDLE_IDENTIFIER',jsonStr["appScheme"])
#update and add info.plist content
infoContent.update(xyInfoContent)
#write
plistlib.writePlist(infoContent,writeInfoFilePath)
project.save()
packageProj.buildProjName = gameProjName + '_' + channelName
packageProj.targetName = gameProjName
packageProj.buildProj()
channelRootPath = "poolsdk_file"
gameProjName = 'Demo'
\ No newline at end of file
No preview for this file type
This diff is collapsed. Click to expand it.
No preview for this file type
import os
import commands
buildProjName = ''
targetName = ''
import shutil
import os
def buildProj():
if buildProjName == '':
print('buildProjName is not define')
else:
#build project
print('start build proj')
commands.getstatusoutput('xcodebuild -project ' + buildProjName + '.xcodeproj')
releaseDir = os.path.abspath('.') + '/Release'
if not os.path.exists(releaseDir):
os.mkdir(releaseDir)
ipaPath = releaseDir + '/' + buildProjName + '-Release.ipa'
buildPath = os.path.abspath('.') + '/build'
if os.path.exists(ipaPath):
os.remove(ipaPath)
resultStr = commands.getstatusoutput('xcrun -sdk iphoneos PackageApplication -v build/Release-iphoneos/' + targetName + '.app -o ' +ipaPath)
#print(resultStr)
if os.path.exists(buildPath):
shutil.rmtree(buildPath)
No preview for this file type
......@@ -33,6 +33,11 @@
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
......
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.youai.sdk</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>mqq</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
<?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>LSApplicationQueriesSchemes</key>
<array>
<string>mqq</string>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
</dict>
</plist>
<?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>StringsTable</key>
<string>Root</string>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>Group</string>
</dict>
<dict>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>Title</key>
<string>Name</string>
<key>Key</key>
<string>name_preference</string>
<key>DefaultValue</key>
<string></string>
<key>IsSecure</key>
<false/>
<key>KeyboardType</key>
<string>Alphabet</string>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Enabled</string>
<key>Key</key>
<string>enabled_preference</string>
<key>DefaultValue</key>
<true/>
</dict>
<dict>
<key>Type</key>
<string>PSSliderSpecifier</string>
<key>Key</key>
<string>slider_preference</string>
<key>DefaultValue</key>
<real>0.5</real>
<key>MinimumValue</key>
<integer>0</integer>
<key>MaximumValue</key>
<integer>1</integer>
<key>MinimumValueImage</key>
<string></string>
<key>MaximumValueImage</key>
<string></string>
</dict>
</array>
</dict>
</plist>
Binary files a/PoolSdk_Demo/poolsdk_file/poolsdk_350/SDK/JWSDK.bundle/en.lproj/Root.strings and /dev/null differ
......
//
// DYUserAccountModel.h
// JWSDKDemo
//
// Created by DovYoung on 16/9/26.
// Copyright © 2016年 DovYoung. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface DYExtraMessageModel : UIView
@property (nonatomic, copy) NSString *serverid; //!< 服务器ID(非常重要)
@property (nonatomic, copy) NSString *roleid; //!< 角色id
@property (nonatomic, copy) NSString *rolename; //!< 角色名字
@property (nonatomic, copy) NSString *rolelevel; //!< 角色等级
@property (nonatomic, copy) NSString *scenetype; //!< 场景类型
@property (nonatomic, copy) NSString *zonename; //!< 服务区名字
@property (nonatomic, copy) NSString *balance; //!< 游戏币金额
@property (nonatomic, copy) NSString *vip; //!< 玩家vip等级
@property (nonatomic, copy) NSString *partyname; //!< 用户所属帮派
/**
* 根据字典创建模型
*
* @param dic 字典
*
* @return 模型
*/
- (instancetype)initWithDic:(NSDictionary *)dic;
@end
//
// DYInitModel.h
// JWSDKDemo
//
// Created by DovYoung on 16/9/21.
// Copyright © 2016年 DovYoung. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface DYInitModel : NSObject
@property (nonatomic, copy) NSString *url; //!< 应用更新地址
@property (nonatomic, copy) NSString *ver; //!< 版本号
@property (nonatomic, copy) NSString *isForce; //!< 是否强制更新
@property (nonatomic, copy) NSString *msg; //!< 版本更新信息
/**
* 根据字典创建模型
*
* @param dic 字典
*
* @return 模型
*/
- (instancetype)initWithDic:(NSDictionary *)dic;
@end
//
// DYLoginModel.h
// JWSDKDemo
//
// Created by DovYoung on 16/9/21.
// Copyright © 2016年 DovYoung. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface DYLoginDataModel : NSObject
//@property (nonatomic, copy) NSString *username; //!< 用户名
@property (nonatomic, copy) NSString *uid; //!< 用户id
@property (nonatomic, copy) NSString *token; //!< 令牌
@property (nonatomic, copy) NSString *timestamp; //!< 时间戳
- (instancetype)initWithDic:(NSDictionary *)dic;
+ (instancetype)loginDataModelWithDic:(NSDictionary *)dic;
@end
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.