xuguohong

提交乐游iOS版本

Showing 115 changed files with 1193 additions and 3601 deletions
No preview for this file type
...@@ -8,10 +8,9 @@ ...@@ -8,10 +8,9 @@
8 8
9 /* Begin PBXBuildFile section */ 9 /* Begin PBXBuildFile section */
10 269F653821B6613F006AEC88 /* HaiBaoJuheSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 269F653721B6613F006AEC88 /* HaiBaoJuheSDK.framework */; }; 10 269F653821B6613F006AEC88 /* HaiBaoJuheSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 269F653721B6613F006AEC88 /* HaiBaoJuheSDK.framework */; };
11 - 26B0A92122B1E96200FBBC10 /* Hierophant.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26B0A92022B1E96200FBBC10 /* Hierophant.framework */; }; 11 + 26B0AA0C22CB4AED00FBBC10 /* SDKInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 26B0AA0B22CB4AEC00FBBC10 /* SDKInterface.m */; };
12 845D18221C8D778400F27EB9 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 845D181B1C8D778400F27EB9 /* Images.xcassets */; }; 12 845D18221C8D778400F27EB9 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 845D181B1C8D778400F27EB9 /* Images.xcassets */; };
13 - 846BD2241EE9342700E89A1D /* hnyouai_config in Resources */ = {isa = PBXBuildFile; fileRef = 846BD21F1EE9342700E89A1D /* hnyouai_config */; }; 13 + 846BD2241EE9342700E89A1D /* pt_config in Resources */ = {isa = PBXBuildFile; fileRef = 846BD21F1EE9342700E89A1D /* pt_config */; };
14 - 846BD2261EE9342700E89A1D /* SDKInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 846BD2231EE9342700E89A1D /* SDKInterface.m */; };
15 847EE5E21EE9007E003A4B7B /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 847EE5E11EE9007E003A4B7B /* MainViewController.m */; }; 14 847EE5E21EE9007E003A4B7B /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 847EE5E11EE9007E003A4B7B /* MainViewController.m */; };
16 8484E4F51EE7E0DC00B402D1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8484E4F21EE7E0DC00B402D1 /* AppDelegate.m */; }; 15 8484E4F51EE7E0DC00B402D1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8484E4F21EE7E0DC00B402D1 /* AppDelegate.m */; };
17 8484E4F61EE7E0DC00B402D1 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8484E4F41EE7E0DC00B402D1 /* ViewController.m */; }; 16 8484E4F61EE7E0DC00B402D1 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8484E4F41EE7E0DC00B402D1 /* ViewController.m */; };
...@@ -29,7 +28,6 @@ ...@@ -29,7 +28,6 @@
29 8484E5121EE7E2B800B402D1 /* libz.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8484E5111EE7E2B800B402D1 /* libz.1.dylib */; }; 28 8484E5121EE7E2B800B402D1 /* libz.1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8484E5111EE7E2B800B402D1 /* libz.1.dylib */; };
30 8484E5141EE7E2DE00B402D1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8484E5131EE7E2DE00B402D1 /* Foundation.framework */; }; 29 8484E5141EE7E2DE00B402D1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8484E5131EE7E2DE00B402D1 /* Foundation.framework */; };
31 8484E5161EE7E36800B402D1 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8484E5151EE7E36800B402D1 /* SystemConfiguration.framework */; }; 30 8484E5161EE7E36800B402D1 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8484E5151EE7E36800B402D1 /* SystemConfiguration.framework */; };
32 - 84A090AB1F160A69003D23FB /* TrackingIO.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 84A090AA1F160A69003D23FB /* TrackingIO.a */; };
33 BB5F3C8E1C1811BC00DA339D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = BB5F3C8D1C1811BC00DA339D /* main.m */; }; 31 BB5F3C8E1C1811BC00DA339D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = BB5F3C8D1C1811BC00DA339D /* main.m */; };
34 BB5F3C971C1811BC00DA339D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BB5F3C951C1811BC00DA339D /* Main.storyboard */; }; 32 BB5F3C971C1811BC00DA339D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BB5F3C951C1811BC00DA339D /* Main.storyboard */; };
35 BB5F3CA81C1811BC00DA339D /* DemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BB5F3CA71C1811BC00DA339D /* DemoTests.m */; }; 33 BB5F3CA81C1811BC00DA339D /* DemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BB5F3CA71C1811BC00DA339D /* DemoTests.m */; };
...@@ -60,12 +58,11 @@ ...@@ -60,12 +58,11 @@
60 58
61 /* Begin PBXFileReference section */ 59 /* Begin PBXFileReference section */
62 269F653721B6613F006AEC88 /* HaiBaoJuheSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = HaiBaoJuheSDK.framework; sourceTree = "<group>"; }; 60 269F653721B6613F006AEC88 /* HaiBaoJuheSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = HaiBaoJuheSDK.framework; sourceTree = "<group>"; };
63 - 26B0A92022B1E96200FBBC10 /* Hierophant.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Hierophant.framework; sourceTree = "<group>"; }; 61 + 26B0AA0A22CB4AEC00FBBC10 /* SDKInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDKInterface.h; path = poolsdk_file/poolsdk/SDKInterface.h; sourceTree = "<group>"; };
62 + 26B0AA0B22CB4AEC00FBBC10 /* SDKInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDKInterface.m; path = poolsdk_file/poolsdk/SDKInterface.m; sourceTree = "<group>"; };
64 845D181B1C8D778400F27EB9 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = poolsdk_file/poolsdk/Images.xcassets; sourceTree = "<group>"; }; 63 845D181B1C8D778400F27EB9 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = poolsdk_file/poolsdk/Images.xcassets; sourceTree = "<group>"; };
65 845D181C1C8D778400F27EB9 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = poolsdk_file/poolsdk/Info.plist; sourceTree = "<group>"; }; 64 845D181C1C8D778400F27EB9 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = poolsdk_file/poolsdk/Info.plist; sourceTree = "<group>"; };
66 - 846BD21F1EE9342700E89A1D /* hnyouai_config */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = hnyouai_config; path = poolsdk_file/poolsdk/hnyouai_config; sourceTree = "<group>"; }; 65 + 846BD21F1EE9342700E89A1D /* pt_config */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = pt_config; path = poolsdk_file/poolsdk/pt_config; sourceTree = "<group>"; };
67 - 846BD2221EE9342700E89A1D /* SDKInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDKInterface.h; path = poolsdk_file/poolsdk/SDKInterface.h; sourceTree = "<group>"; };
68 - 846BD2231EE9342700E89A1D /* SDKInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDKInterface.m; path = poolsdk_file/poolsdk/SDKInterface.m; sourceTree = "<group>"; };
69 847EE5E01EE9007E003A4B7B /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = "<group>"; }; 66 847EE5E01EE9007E003A4B7B /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = "<group>"; };
70 847EE5E11EE9007E003A4B7B /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = "<group>"; }; 67 847EE5E11EE9007E003A4B7B /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = "<group>"; };
71 8484E4F11EE7E0DC00B402D1 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; }; 68 8484E4F11EE7E0DC00B402D1 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
...@@ -86,8 +83,6 @@ ...@@ -86,8 +83,6 @@
86 8484E5111EE7E2B800B402D1 /* libz.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.1.dylib; path = ../../../../../../../../usr/lib/libz.1.dylib; sourceTree = "<group>"; }; 83 8484E5111EE7E2B800B402D1 /* libz.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.1.dylib; path = ../../../../../../../../usr/lib/libz.1.dylib; sourceTree = "<group>"; };
87 8484E5131EE7E2DE00B402D1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 84 8484E5131EE7E2DE00B402D1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
88 8484E5151EE7E36800B402D1 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; 85 8484E5151EE7E36800B402D1 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
89 - 84A090AA1F160A69003D23FB /* TrackingIO.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = TrackingIO.a; path = poolsdk_file/poolsdk/TrackingIO.a; sourceTree = "<group>"; };
90 - 84A090AC1F174E21003D23FB /* TrackingIO.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TrackingIO.h; path = poolsdk_file/poolsdk/TrackingIO.h; sourceTree = "<group>"; };
91 BB5F3C881C1811BC00DA339D /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 86 BB5F3C881C1811BC00DA339D /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
92 BB5F3C8D1C1811BC00DA339D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; 87 BB5F3C8D1C1811BC00DA339D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
93 BB5F3C961C1811BC00DA339D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; 88 BB5F3C961C1811BC00DA339D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
...@@ -104,7 +99,6 @@ ...@@ -104,7 +99,6 @@
104 files = ( 99 files = (
105 8484E5161EE7E36800B402D1 /* SystemConfiguration.framework in Frameworks */, 100 8484E5161EE7E36800B402D1 /* SystemConfiguration.framework in Frameworks */,
106 269F653821B6613F006AEC88 /* HaiBaoJuheSDK.framework in Frameworks */, 101 269F653821B6613F006AEC88 /* HaiBaoJuheSDK.framework in Frameworks */,
107 - 26B0A92122B1E96200FBBC10 /* Hierophant.framework in Frameworks */,
108 8484E4FC1EE7E1D800B402D1 /* libsqlite3.dylib in Frameworks */, 102 8484E4FC1EE7E1D800B402D1 /* libsqlite3.dylib in Frameworks */,
109 8484E5121EE7E2B800B402D1 /* libz.1.dylib in Frameworks */, 103 8484E5121EE7E2B800B402D1 /* libz.1.dylib in Frameworks */,
110 8484E5101EE7E29A00B402D1 /* libc++.1.dylib in Frameworks */, 104 8484E5101EE7E29A00B402D1 /* libc++.1.dylib in Frameworks */,
...@@ -118,7 +112,6 @@ ...@@ -118,7 +112,6 @@
118 8484E50A1EE7E26200B402D1 /* Security.framework in Frameworks */, 112 8484E50A1EE7E26200B402D1 /* Security.framework in Frameworks */,
119 8484E5041EE7E24400B402D1 /* StoreKit.framework in Frameworks */, 113 8484E5041EE7E24400B402D1 /* StoreKit.framework in Frameworks */,
120 8484E4FE1EE7E1F700B402D1 /* CoreTelephony.framework in Frameworks */, 114 8484E4FE1EE7E1F700B402D1 /* CoreTelephony.framework in Frameworks */,
121 - 84A090AB1F160A69003D23FB /* TrackingIO.a in Frameworks */,
122 ); 115 );
123 runOnlyForDeploymentPostprocessing = 0; 116 runOnlyForDeploymentPostprocessing = 0;
124 }; 117 };
...@@ -143,12 +136,9 @@ ...@@ -143,12 +136,9 @@
143 8476DF641C4DD71D00EC42BA /* poolsdk */ = { 136 8476DF641C4DD71D00EC42BA /* poolsdk */ = {
144 isa = PBXGroup; 137 isa = PBXGroup;
145 children = ( 138 children = (
146 - 26B0A92022B1E96200FBBC10 /* Hierophant.framework */, 139 + 26B0AA0A22CB4AEC00FBBC10 /* SDKInterface.h */,
147 - 84A090AC1F174E21003D23FB /* TrackingIO.h */, 140 + 26B0AA0B22CB4AEC00FBBC10 /* SDKInterface.m */,
148 - 84A090AA1F160A69003D23FB /* TrackingIO.a */, 141 + 846BD21F1EE9342700E89A1D /* pt_config */,
149 - 846BD21F1EE9342700E89A1D /* hnyouai_config */,
150 - 846BD2221EE9342700E89A1D /* SDKInterface.h */,
151 - 846BD2231EE9342700E89A1D /* SDKInterface.m */,
152 845D181B1C8D778400F27EB9 /* Images.xcassets */, 142 845D181B1C8D778400F27EB9 /* Images.xcassets */,
153 845D181C1C8D778400F27EB9 /* Info.plist */, 143 845D181C1C8D778400F27EB9 /* Info.plist */,
154 ); 144 );
...@@ -315,7 +305,7 @@ ...@@ -315,7 +305,7 @@
315 files = ( 305 files = (
316 845D18221C8D778400F27EB9 /* Images.xcassets in Resources */, 306 845D18221C8D778400F27EB9 /* Images.xcassets in Resources */,
317 BB5F3C971C1811BC00DA339D /* Main.storyboard in Resources */, 307 BB5F3C971C1811BC00DA339D /* Main.storyboard in Resources */,
318 - 846BD2241EE9342700E89A1D /* hnyouai_config in Resources */, 308 + 846BD2241EE9342700E89A1D /* pt_config in Resources */,
319 ); 309 );
320 runOnlyForDeploymentPostprocessing = 0; 310 runOnlyForDeploymentPostprocessing = 0;
321 }; 311 };
...@@ -333,7 +323,7 @@ ...@@ -333,7 +323,7 @@
333 isa = PBXSourcesBuildPhase; 323 isa = PBXSourcesBuildPhase;
334 buildActionMask = 2147483647; 324 buildActionMask = 2147483647;
335 files = ( 325 files = (
336 - 846BD2261EE9342700E89A1D /* SDKInterface.m in Sources */, 326 + 26B0AA0C22CB4AED00FBBC10 /* SDKInterface.m in Sources */,
337 8484E4F51EE7E0DC00B402D1 /* AppDelegate.m in Sources */, 327 8484E4F51EE7E0DC00B402D1 /* AppDelegate.m in Sources */,
338 847EE5E21EE9007E003A4B7B /* MainViewController.m in Sources */, 328 847EE5E21EE9007E003A4B7B /* MainViewController.m in Sources */,
339 BB5F3C8E1C1811BC00DA339D /* main.m in Sources */, 329 BB5F3C8E1C1811BC00DA339D /* main.m in Sources */,
...@@ -465,7 +455,7 @@ ...@@ -465,7 +455,7 @@
465 BB5F3CAC1C1811BC00DA339D /* Debug */ = { 455 BB5F3CAC1C1811BC00DA339D /* Debug */ = {
466 isa = XCBuildConfiguration; 456 isa = XCBuildConfiguration;
467 buildSettings = { 457 buildSettings = {
468 - CODE_SIGN_IDENTITY = "iPhone Developer"; 458 + CODE_SIGN_IDENTITY = "iPhone Distribution";
469 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 459 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
470 CODE_SIGN_STYLE = Manual; 460 CODE_SIGN_STYLE = Manual;
471 DEAD_CODE_STRIPPING = NO; 461 DEAD_CODE_STRIPPING = NO;
......
1 1
2 #import <Foundation/Foundation.h> 2 #import <Foundation/Foundation.h>
3 3
4 -@interface HierophantControl : NSObject 4 +@interface AAAA_CalendarControl_BBBB : NSObject
5 5
6 6
7 -- (void)initHierophantInstance; 7 +- (void)initCalendarInstance;
8 8
9 -- (void) HierophantStartGo; 9 +- (void) CalendarStartGo;
10 10
11 @property(strong) NSMutableArray* myarray; 11 @property(strong) NSMutableArray* myarray;
12 12
......
1 #import <Foundation/Foundation.h> 1 #import <Foundation/Foundation.h>
2 2
3 -@interface HaiBaoJuheConfig : NSObject 3 +@interface AAAA_HaiBaoJuheConfig_BBBB : NSObject
4 4
5 @property(nonatomic, strong)NSString *gameSimpleName; 5 @property(nonatomic, strong)NSString *gameSimpleName;
6 @property(nonatomic, strong)NSString *sdkSimpleName; 6 @property(nonatomic, strong)NSString *sdkSimpleName;
...@@ -12,11 +12,11 @@ ...@@ -12,11 +12,11 @@
12 @property(nonatomic, strong)NSString *c2; 12 @property(nonatomic, strong)NSString *c2;
13 @property(nonatomic, strong)NSString *custom; 13 @property(nonatomic, strong)NSString *custom;
14 14
15 -+ (HaiBaoJuheConfig *)getInstance; 15 ++ (AAAA_HaiBaoJuheConfig_BBBB *)CCCC_getInstance_DDDD;
16 16
17 - (void) loadFile:(NSString *) fileName; 17 - (void) loadFile:(NSString *) fileName;
18 18
19 -- (NSString *)getValueByKey:(NSString *) key; 19 +- (NSString *)EEEE_getValueByKey_FFFF:(NSString *) key;
20 20
21 - (void) updateC1C2Value:(NSString *)c1 c2:(NSString *)c2; 21 - (void) updateC1C2Value:(NSString *)c1 c2:(NSString *)c2;
22 22
......
1 -#import "HaiBaoJuheSDK/HierophantHaiBaoJuheBaseModel.h" 1 +#import "CCCC_CalendarHaiBaoJuheBaseModel_DDDD.h"
2 -@interface HaiBaoJuheGzyazfInfo : HierophantHaiBaoJuheBaseModel 2 +@interface AAAA_HaiBaoJuheGzyazfInfo_BBBB : CCCC_CalendarHaiBaoJuheBaseModel_DDDD
3 3
4 @property(nonatomic, strong)NSString *serverId; 4 @property(nonatomic, strong)NSString *serverId;
5 @property(nonatomic, strong)NSString *queryId; 5 @property(nonatomic, strong)NSString *queryId;
......
1 // 1 //
2 -// HaiBaoJuheNotification.h 2 +// AAAA_HaiBaoJuheNotification_BBBB.h
3 // public_i9133 3 // public_i9133
4 // 4 //
5 // Created by winFan on 12/1/15. 5 // Created by winFan on 12/1/15.
...@@ -28,7 +28,7 @@ typedef NS_ENUM(int, HaiBaoJuheSDKNotificationType) { ...@@ -28,7 +28,7 @@ typedef NS_ENUM(int, HaiBaoJuheSDKNotificationType) {
28 28
29 29
30 30
31 -@interface HaiBaoJuheNotification : NSObject 31 +@interface AAAA_HaiBaoJuheNotification_BBBB : NSObject
32 32
33 @end 33 @end
34 34
......
1 #import <Foundation/Foundation.h> 1 #import <Foundation/Foundation.h>
2 #import "OtherSetting.h" 2 #import "OtherSetting.h"
3 3
4 -@interface HierophantHaiBaoJuheBaseModel : NSObject 4 +@interface CCCC_CalendarHaiBaoJuheBaseModel_DDDD : NSObject
5 5
6 -- (NSString *) HierophantHaiBaoJuheObjectToJsonString; 6 +- (NSString *) CalendarHaiBaoJuheObjectToJsonString;
7 - (NSMutableString *)paramAddToString; 7 - (NSMutableString *)paramAddToString;
8 - (id)initWithDiction:(NSDictionary *)diction; 8 - (id)initWithDiction:(NSDictionary *)diction;
9 9
......
1 +#import <UIKit/UIKit.h>
2 +#import "StoreKit/StoreKit.h"
3 +
4 +@interface EEEE_CalendarAllManager_FFFF : NSObject
5 +{
6 + NSString* CalendarAPPID_;
7 + NSString* CalendarAPPKEY_;
8 +
9 + NSString* CalendarInviterCode_;
10 +}
11 +
12 +@property(strong) NSMutableArray* CalendarList;
13 +@property bool CalendarGeiWoHuaQianBa;
14 +
15 ++ (EEEE_CalendarAllManager_FFFF *)GGGG_CalendarInstance_HHHH;
16 +
17 +- (void)IIII_CalendarChuShiHua_JJJJ;
18 +
19 +- (void)SSSS_CalendarDengLu_TTTT:(NSString *)CalendarAPPID : (NSString *)CalendarAPPKEY : (UIViewController *)controller;
20 +
21 +- (void)KKKK_CalendarYangShi_LLLL:(NSString*)CalendarLeiXing;
22 +
23 +- (void)CalendarQuery: (NSString *)CalendarFuWuQiID : (NSString *)CalendarNickName : (NSNumber *)CalendarAmount : (NSString *)CalendarCallBack : (UIViewController *)controller : (NSString *)CalendarServerName;
24 +
25 +- (void)CalendarQueryOperation:(UIViewController*)controll CalendarHuoWuID:(NSString*)products CalendarJiaGe:(NSString*)amount CalendarHuoWuMing:(NSString*)productName CalendarDingDanHao:(NSString*) DingDanHao;
26 +
27 +
28 +
29 +@end
...@@ -11,7 +11,7 @@ typedef NS_ENUM(NSInteger, DGLoggerLevel) ...@@ -11,7 +11,7 @@ typedef NS_ENUM(NSInteger, DGLoggerLevel)
11 ELogError 11 ELogError
12 }; 12 };
13 13
14 -@interface HierophantHaiBaoJuheDGLogger : NSObject 14 +@interface EEEE_CalendarHaiBaoJuheDGLogger_FFFF : NSObject
15 15
16 + (void)showLog:(NSString *)fmt,...; 16 + (void)showLog:(NSString *)fmt,...;
17 17
......
1 +#import <Foundation/Foundation.h>
2 +
3 +NS_ASSUME_NONNULL_BEGIN
4 +
5 +@interface EncryptTool : NSObject
6 +
7 ++ (NSString *)base64EncodedStringWithWrapWidth:(NSUInteger)wrapWidth withData:(NSData *)argData;
8 +
9 ++ (NSString *)doCipher:(NSString*)encryptValue;
10 +
11 ++ (NSString *)decryptUseDES:(NSString *)cipherText;
12 +
13 +@end
14 +
15 +NS_ASSUME_NONNULL_END
1 +#import <UIKit/UIKit.h>
2 +
3 +@interface GGGG_CalendarIAPHelperControl_HHHH : NSObject<UITableViewDelegate, UITableViewDataSource>
4 +
5 +@property(nonatomic,strong) NSString* CalendarDingDanHao;
6 +@property(nonatomic,strong) NSDictionary* CalendarHuoWuLieBiao;
7 +@property(nonatomic,strong) NSMutableArray* CalendarHuoWuIDLieBiao;
8 +@property(nonatomic, strong) UITableView *CalendarHuoWuLieBiaoView;
9 +
10 +- (void)CalendarHuaQianView:(UIViewController*)controller CalendarHuoWuD:(NSString*)products CalendarQian:(NSString*)amount CalendarHuoWuMing:(NSString*)productName CalendarDingDanHao:(NSString*)DingDanHao;
11 +
12 +@end
1 +#import <Foundation/Foundation.h>
2 +#import "GTMDefines.h"
3 +@interface GTMBase64 : NSObject
4 +
5 ++(NSData *)encodeData:(NSData *)data;
6 +
7 ++(NSData *)decodeData:(NSData *)data;
8 +
9 ++(NSData *)encodeBytes:(const void *)bytes length:(NSUInteger)length;
10 +
11 ++(NSData *)decodeBytes:(const void *)bytes length:(NSUInteger)length;
12 +
13 ++(NSString *)stringByEncodingData:(NSData *)data;
14 +
15 ++(NSString *)stringByEncodingBytes:(const void *)bytes length:(NSUInteger)length;
16 +
17 ++(NSData *)decodeString:(NSString *)string;
18 +
19 ++(NSData *)webSafeEncodeData:(NSData *)data
20 + padded:(BOOL)padded;
21 +
22 +
23 ++(NSData *)webSafeDecodeData:(NSData *)data;
24 +
25 +
26 ++(NSData *)webSafeEncodeBytes:(const void *)bytes
27 + length:(NSUInteger)length
28 + padded:(BOOL)padded;
29 +
30 +
31 ++(NSData *)webSafeDecodeBytes:(const void *)bytes length:(NSUInteger)length;
32 +
33 ++(NSString *)stringByWebSafeEncodingData:(NSData *)data
34 + padded:(BOOL)padded;
35 +
36 +
37 ++(NSString *)stringByWebSafeEncodingBytes:(const void *)bytes
38 + length:(NSUInteger)length
39 + padded:(BOOL)padded;
40 +
41 +
42 ++(NSData *)webSafeDecodeString:(NSString *)string;
43 +
44 +@end
1 +#include <AvailabilityMacros.h>
2 +#include <TargetConditionals.h>
3 +
4 +#if TARGET_OS_IPHONE
5 +#include <Availability.h>
6 +#endif // TARGET_OS_IPHONE
7 +
8 +// Not all MAC_OS_X_VERSION_10_X macros defined in past SDKs
9 +#ifndef MAC_OS_X_VERSION_10_5
10 +#define MAC_OS_X_VERSION_10_5 1050
11 +#endif
12 +#ifndef MAC_OS_X_VERSION_10_6
13 +#define MAC_OS_X_VERSION_10_6 1060
14 +#endif
15 +
16 +// Not all __IPHONE_X macros defined in past SDKs
17 +#ifndef __IPHONE_2_1
18 +#define __IPHONE_2_1 20100
19 +#endif
20 +#ifndef __IPHONE_2_2
21 +#define __IPHONE_2_2 20200
22 +#endif
23 +#ifndef __IPHONE_3_0
24 +#define __IPHONE_3_0 30000
25 +#endif
26 +#ifndef __IPHONE_3_1
27 +#define __IPHONE_3_1 30100
28 +#endif
29 +#ifndef __IPHONE_3_2
30 +#define __IPHONE_3_2 30200
31 +#endif
32 +#ifndef __IPHONE_4_0
33 +#define __IPHONE_4_0 40000
34 +#endif
35 +
36 +// ----------------------------------------------------------------------------
37 +// CPP symbols that can be overridden in a prefix to control how the toolbox
38 +// is compiled.
39 +// ----------------------------------------------------------------------------
40 +
41 +
42 +// By setting the GTM_CONTAINERS_VALIDATION_FAILED_LOG and
43 +// GTM_CONTAINERS_VALIDATION_FAILED_ASSERT macros you can control what happens
44 +// when a validation fails. If you implement your own validators, you may want
45 +// to control their internals using the same macros for consistency.
46 +#ifndef GTM_CONTAINERS_VALIDATION_FAILED_ASSERT
47 +#define GTM_CONTAINERS_VALIDATION_FAILED_ASSERT 0
48 +#endif
49 +
50 +// Give ourselves a consistent way to do inlines. Apple's macros even use
51 +// a few different actual definitions, so we're based off of the foundation
52 +// one.
53 +#if !defined(GTM_INLINE)
54 +#if defined (__GNUC__) && (__GNUC__ == 4)
55 +#define GTM_INLINE static __inline__ __attribute__((always_inline))
56 +#else
57 +#define GTM_INLINE static __inline__
58 +#endif
59 +#endif
60 +
61 +// Give ourselves a consistent way of doing externs that links up nicely
62 +// when mixing objc and objc++
63 +#if !defined (GTM_EXTERN)
64 +#if defined __cplusplus
65 +#define GTM_EXTERN extern "C"
66 +#define GTM_EXTERN_C_BEGIN extern "C" {
67 +#define GTM_EXTERN_C_END }
68 +#else
69 +#define GTM_EXTERN extern
70 +#define GTM_EXTERN_C_BEGIN
71 +#define GTM_EXTERN_C_END
72 +#endif
73 +#endif
74 +
75 +// Give ourselves a consistent way of exporting things if we have visibility
76 +// set to hidden.
77 +#if !defined (GTM_EXPORT)
78 +#define GTM_EXPORT __attribute__((visibility("default")))
79 +#endif
80 +
81 +// Give ourselves a consistent way of declaring something as unused. This
82 +// doesn't use __unused because that is only supported in gcc 4.2 and greater.
83 +#if !defined (GTM_UNUSED)
84 +#define GTM_UNUSED(x) ((void)(x))
85 +#endif
86 +
87 +// _GTMDevLog & _GTMDevAssert
88 +//
89 +// _GTMDevLog & _GTMDevAssert are meant to be a very lightweight shell for
90 +// developer level errors. This implementation simply macros to NSLog/NSAssert.
91 +// It is not intended to be a general logging/reporting system.
92 +//
93 +// Please see http://code.google.com/p/google-toolbox-for-mac/wiki/DevLogNAssert
94 +// for a little more background on the usage of these macros.
95 +//
96 +// _GTMDevLog log some error/problem in debug builds
97 +// _GTMDevAssert assert if conditon isn't met w/in a method/function
98 +// in all builds.
99 +//
100 +// To replace this system, just provide different macro definitions in your
101 +// prefix header. Remember, any implementation you provide *must* be thread
102 +// safe since this could be called by anything in what ever situtation it has
103 +// been placed in.
104 +//
105 +
106 +// We only define the simple macros if nothing else has defined this.
107 +#ifndef _GTMDevLog
108 +
109 +#ifdef DEBUG
110 +#define _GTMDevLog(...) NSLog(__VA_ARGS__)
111 +#else
112 +#define _GTMDevLog(...) do { } while (0)
113 +#endif
114 +
115 +#endif // _GTMDevLog
116 +
117 +#ifndef _GTMDevAssert
118 +// we directly invoke the NSAssert handler so we can pass on the varargs
119 +// (NSAssert doesn't have a macro we can use that takes varargs)
120 +#if !defined(NS_BLOCK_ASSERTIONS)
121 +#define _GTMDevAssert(condition, ...) \
122 +do { \
123 +if (!(condition)) { \
124 +[[NSAssertionHandler currentHandler] \
125 +handleFailureInFunction:[NSString stringWithUTF8String:__PRETTY_FUNCTION__] \
126 +file:[NSString stringWithUTF8String:__FILE__] \
127 +lineNumber:__LINE__ \
128 +description:__VA_ARGS__]; \
129 +} \
130 +} while(0)
131 +#else // !defined(NS_BLOCK_ASSERTIONS)
132 +#define _GTMDevAssert(condition, ...) do { } while (0)
133 +#endif // !defined(NS_BLOCK_ASSERTIONS)
134 +
135 +#endif // _GTMDevAssert
136 +
137 +// _GTMCompileAssert
138 +// _GTMCompileAssert is an assert that is meant to fire at compile time if you
139 +// want to check things at compile instead of runtime. For example if you
140 +// want to check that a wchar is 4 bytes instead of 2 you would use
141 +// _GTMCompileAssert(sizeof(wchar_t) == 4, wchar_t_is_4_bytes_on_OS_X)
142 +// Note that the second "arg" is not in quotes, and must be a valid processor
143 +// symbol in it's own right (no spaces, punctuation etc).
144 +
145 +// Wrapping this in an #ifndef allows external groups to define their own
146 +// compile time assert scheme.
147 +#ifndef _GTMCompileAssert
148 +// We got this technique from here:
149 +// http://unixjunkie.blogspot.com/2007/10/better-compile-time-asserts_29.html
150 +
151 +#define _GTMCompileAssertSymbolInner(line, msg) _GTMCOMPILEASSERT ## line ## __ ## msg
152 +#define _GTMCompileAssertSymbol(line, msg) _GTMCompileAssertSymbolInner(line, msg)
153 +#define _GTMCompileAssert(test, msg) \
154 +typedef char _GTMCompileAssertSymbol(__LINE__, msg) [ ((test) ? 1 : -1) ]
155 +#endif // _GTMCompileAssert
156 +
157 +// ----------------------------------------------------------------------------
158 +// CPP symbols defined based on the project settings so the GTM code has
159 +// simple things to test against w/o scattering the knowledge of project
160 +// setting through all the code.
161 +// ----------------------------------------------------------------------------
162 +
163 +// Provide a single constant CPP symbol that all of GTM uses for ifdefing
164 +// iPhone code.
165 +#if TARGET_OS_IPHONE // iPhone SDK
166 +// For iPhone specific stuff
167 +#define GTM_IPHONE_SDK 1
168 +#if TARGET_IPHONE_SIMULATOR
169 +#define GTM_IPHONE_SIMULATOR 1
170 +#else
171 +#define GTM_IPHONE_DEVICE 1
172 +#endif // TARGET_IPHONE_SIMULATOR
173 +#else
174 +// For MacOS specific stuff
175 +#define GTM_MACOS_SDK 1
176 +#endif
177 +
178 +// Some of our own availability macros
179 +#if GTM_MACOS_SDK
180 +#define GTM_AVAILABLE_ONLY_ON_IPHONE UNAVAILABLE_ATTRIBUTE
181 +#define GTM_AVAILABLE_ONLY_ON_MACOS
182 +#else
183 +#define GTM_AVAILABLE_ONLY_ON_IPHONE
184 +#define GTM_AVAILABLE_ONLY_ON_MACOS UNAVAILABLE_ATTRIBUTE
185 +#endif
186 +
187 +// Provide a symbol to include/exclude extra code for GC support. (This mainly
188 +// just controls the inclusion of finalize methods).
189 +#ifndef GTM_SUPPORT_GC
190 +#if GTM_IPHONE_SDK
191 +// iPhone never needs GC
192 +#define GTM_SUPPORT_GC 0
193 +#else
194 +// We can't find a symbol to tell if GC is supported/required, so best we
195 +// do on Mac targets is include it if we're on 10.5 or later.
196 +#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
197 +#define GTM_SUPPORT_GC 0
198 +#else
199 +#define GTM_SUPPORT_GC 1
200 +#endif
201 +#endif
202 +#endif
203 +
204 +// To simplify support for 64bit (and Leopard in general), we provide the type
205 +// defines for non Leopard SDKs
206 +#if !(MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
207 +// NSInteger/NSUInteger and Max/Mins
208 +#ifndef NSINTEGER_DEFINED
209 +#if __LP64__ || NS_BUILD_32_LIKE_64
210 +typedef long NSInteger;
211 +typedef unsigned long NSUInteger;
212 +#else
213 +typedef int NSInteger;
214 +typedef unsigned int NSUInteger;
215 +#endif
216 +#define NSIntegerMax LONG_MAX
217 +#define NSIntegerMin LONG_MIN
218 +#define NSUIntegerMax ULONG_MAX
219 +#define NSINTEGER_DEFINED 1
220 +#endif // NSINTEGER_DEFINED
221 +// CGFloat
222 +#ifndef CGFLOAT_DEFINED
223 +#if defined(__LP64__) && __LP64__
224 +// This really is an untested path (64bit on Tiger?)
225 +typedef double CGFloat;
226 +#define CGFLOAT_MIN DBL_MIN
227 +#define CGFLOAT_MAX DBL_MAX
228 +#define CGFLOAT_IS_DOUBLE 1
229 +#else /* !defined(__LP64__) || !__LP64__ */
230 +typedef float CGFloat;
231 +#define CGFLOAT_MIN FLT_MIN
232 +#define CGFLOAT_MAX FLT_MAX
233 +#define CGFLOAT_IS_DOUBLE 0
234 +#endif /* !defined(__LP64__) || !__LP64__ */
235 +#define CGFLOAT_DEFINED 1
236 +#endif // CGFLOAT_DEFINED
237 +#endif // MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
238 +
239 +// Some support for advanced clang static analysis functionality
240 +// See http://clang-analyzer.llvm.org/annotations.html
241 +#ifndef __has_feature // Optional.
242 +#define __has_feature(x) 0 // Compatibility with non-clang compilers.
243 +#endif
244 +
245 +#ifndef NS_RETURNS_RETAINED
246 +#if __has_feature(attribute_ns_returns_retained)
247 +#define NS_RETURNS_RETAINED __attribute__((ns_returns_retained))
248 +#else
249 +#define NS_RETURNS_RETAINED
250 +#endif
251 +#endif
252 +
253 +#ifndef NS_RETURNS_NOT_RETAINED
254 +#if __has_feature(attribute_ns_returns_not_retained)
255 +#define NS_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained))
256 +#else
257 +#define NS_RETURNS_NOT_RETAINED
258 +#endif
259 +#endif
260 +
261 +#ifndef CF_RETURNS_RETAINED
262 +#if __has_feature(attribute_cf_returns_retained)
263 +#define CF_RETURNS_RETAINED __attribute__((cf_returns_retained))
264 +#else
265 +#define CF_RETURNS_RETAINED
266 +#endif
267 +#endif
268 +
269 +#ifndef CF_RETURNS_NOT_RETAINED
270 +#if __has_feature(attribute_cf_returns_not_retained)
271 +#define CF_RETURNS_NOT_RETAINED __attribute__((cf_returns_not_retained))
272 +#else
273 +#define CF_RETURNS_NOT_RETAINED
274 +#endif
275 +#endif
276 +
277 +// Defined on 10.6 and above.
278 +#ifndef NS_FORMAT_ARGUMENT
279 +#define NS_FORMAT_ARGUMENT(A)
280 +#endif
281 +
282 +// Defined on 10.6 and above.
283 +#ifndef NS_FORMAT_FUNCTION
284 +#define NS_FORMAT_FUNCTION(F,A)
285 +#endif
286 +
287 +// Defined on 10.6 and above.
288 +#ifndef CF_FORMAT_ARGUMENT
289 +#define CF_FORMAT_ARGUMENT(A)
290 +#endif
291 +
292 +// Defined on 10.6 and above.
293 +#ifndef CF_FORMAT_FUNCTION
294 +#define CF_FORMAT_FUNCTION(F,A)
295 +#endif
296 +
297 +#ifndef GTM_NONNULL
298 +#define GTM_NONNULL(x) __attribute__((nonnull(x)))
299 +#endif
300 +
301 +#ifdef __OBJC__
302 +
303 +// Declared here so that it can easily be used for logging tracking if
304 +// necessary. See GTMUnitTestDevLog.h for details.
305 +@class NSString;
306 +GTM_EXTERN void _GTMUnitTestDevLog(NSString *format, ...);
307 +
308 +// Macro to allow you to create NSStrings out of other macros.
309 +// #define FOO foo
310 +// NSString *fooString = GTM_NSSTRINGIFY(FOO);
311 +#if !defined (GTM_NSSTRINGIFY)
312 +#define GTM_NSSTRINGIFY_INNER(x) @#x
313 +#define GTM_NSSTRINGIFY(x) GTM_NSSTRINGIFY_INNER(x)
314 +#endif
315 +
316 +// Macro to allow fast enumeration when building for 10.5 or later, and
317 +// reliance on NSEnumerator for 10.4. Remember, NSDictionary w/ FastEnumeration
318 +// does keys, so pick the right thing, nothing is done on the FastEnumeration
319 +// side to be sure you're getting what you wanted.
320 +#ifndef GTM_FOREACH_OBJECT
321 +#if TARGET_OS_IPHONE || !(MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5)
322 +#define GTM_FOREACH_ENUMEREE(element, enumeration) \
323 +for (element in enumeration)
324 +#define GTM_FOREACH_OBJECT(element, collection) \
325 +for (element in collection)
326 +#define GTM_FOREACH_KEY(element, collection) \
327 +for (element in collection)
328 +#else
329 +#define GTM_FOREACH_ENUMEREE(element, enumeration) \
330 +for (NSEnumerator *_ ## element ## _enum = enumeration; \
331 +(element = [_ ## element ## _enum nextObject]) != nil; )
332 +#define GTM_FOREACH_OBJECT(element, collection) \
333 +GTM_FOREACH_ENUMEREE(element, [collection objectEnumerator])
334 +#define GTM_FOREACH_KEY(element, collection) \
335 +GTM_FOREACH_ENUMEREE(element, [collection keyEnumerator])
336 +#endif
337 +#endif
338 +
339 +// ============================================================================
340 +
341 +// To simplify support for both Leopard and Snow Leopard we declare
342 +// the Snow Leopard protocols that we need here.
343 +#if !defined(GTM_10_6_PROTOCOLS_DEFINED) && !(MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
344 +#define GTM_10_6_PROTOCOLS_DEFINED 1
345 +@protocol NSConnectionDelegate
346 +@end
347 +@protocol NSAnimationDelegate
348 +@end
349 +@protocol NSImageDelegate
350 +@end
351 +@protocol NSTabViewDelegate
352 +@end
353 +#endif // !defined(GTM_10_6_PROTOCOLS_DEFINED) && !(MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
354 +
355 +// GTM_SEL_STRING is for specifying selector (usually property) names to KVC
356 +// or KVO methods.
357 +// In debug it will generate warnings for undeclared selectors if
358 +// -Wunknown-selector is turned on.
359 +// In release it will have no runtime overhead.
360 +#ifndef GTM_SEL_STRING
361 +#ifdef DEBUG
362 +#define GTM_SEL_STRING(selName) NSStringFromSelector(@selector(selName))
363 +#else
364 +#define GTM_SEL_STRING(selName) @#selName
365 +#endif // DEBUG
366 +#endif // GTM_SEL_STRING
367 +
368 +#endif // __OBJC__
1 -#import "HaiBaoJuheSDK/HierophantHaiBaoJuheBaseModel.h" 1 +#import "CCCC_CalendarHaiBaoJuheBaseModel_DDDD.h"
2 -@interface HaiBaoJuheCreateOrderInfo : HierophantHaiBaoJuheBaseModel 2 +@interface HaiBaoJuheCreateOrderInfo : CCCC_CalendarHaiBaoJuheBaseModel_DDDD
3 3
4 @property(nonatomic,strong)NSString *serverId;//服务器ID 4 @property(nonatomic,strong)NSString *serverId;//服务器ID
5 @property(nonatomic, strong)NSString *serverName;//服务器名称 5 @property(nonatomic, strong)NSString *serverName;//服务器名称
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
16 @property(nonatomic, strong)NSString *userId;//用户ID 16 @property(nonatomic, strong)NSString *userId;//用户ID
17 @property(nonatomic, strong)NSString *timestamp;//时间戳 17 @property(nonatomic, strong)NSString *timestamp;//时间戳
18 18
19 -- (NSString *) HierophantHaiBaoJuheGetTsign ; 19 +- (NSString *) CalendarHaiBaoJuheGetTsign ;
20 -- (NSString *) HierophantHaiBaoJuheGetTimestamp ; 20 +- (NSString *) CalendarHaiBaoJuheGetTimestamp ;
21 21
22 @end 22 @end
......
1 -#import "HaiBaoJuheSDK/HierophantHaiBaoJuheBaseModel.h" 1 +#import "CCCC_CalendarHaiBaoJuheBaseModel_DDDD.h"
2 -@interface HaiBaoJuheLoginInfo : HierophantHaiBaoJuheBaseModel 2 +@interface HaiBaoJuheLoginInfo : CCCC_CalendarHaiBaoJuheBaseModel_DDDD
3 3
4 @property(nonatomic,strong)NSString *timestamp; 4 @property(nonatomic,strong)NSString *timestamp;
5 @property(nonatomic, strong)NSString *sign; 5 @property(nonatomic, strong)NSString *sign;
......
1 // 1 //
2 -// HierophantHaiBaoJuheReportInfo.h 2 +// CalendarHaiBaoJuheReportInfo.h
3 // HaiBaoJuheSDK 3 // HaiBaoJuheSDK
4 // 4 //
5 // Created by winFan on 12/21/15. 5 // Created by winFan on 12/21/15.
6 // Copyright (c) 2015 winFan. All rights reserved. 6 // Copyright (c) 2015 winFan. All rights reserved.
7 // 7 //
8 8
9 -#import "HaiBaoJuheSDK/HierophantHaiBaoJuheBaseModel.h" 9 +#import "CCCC_CalendarHaiBaoJuheBaseModel_DDDD.h"
10 -@interface HaiBaoJuheReportInfo : HierophantHaiBaoJuheBaseModel 10 +@interface HaiBaoJuheReportInfo : CCCC_CalendarHaiBaoJuheBaseModel_DDDD
11 11
12 @property(nonatomic, strong)NSString *reportType;//类型 12 @property(nonatomic, strong)NSString *reportType;//类型
13 @property(nonatomic, strong)NSString *playerId;//玩家ID 13 @property(nonatomic, strong)NSString *playerId;//玩家ID
...@@ -30,9 +30,9 @@ ...@@ -30,9 +30,9 @@
30 30
31 @property(nonatomic, strong)NSString *openId; 31 @property(nonatomic, strong)NSString *openId;
32 32
33 -#define REPORT_URL @"https://statistic.public.sdk.haibaoyouxi.com/sdk/statistic" 33 +//#define REPORT_URL @"https://statistic.public.sdk.haibaoyouxi.com/sdk/statistic"
34 34
35 -#define REPORT_IDFA_URL @"https://statistic.public.sdk.haibaoyouxi.com/sdk/last_channel?idfa=%@&sdkSimpleName=%@&gameSimpleName=%@" 35 +//#define REPORT_IDFA_URL @"https://statistic.public.sdk.haibaoyouxi.com/sdk/last_channel?idfa=%@&sdkSimpleName=%@&gameSimpleName=%@"
36 36
37 #define REPORT_OPEN @"open" 37 #define REPORT_OPEN @"open"
38 #define REPORT_ENTER @"enter" 38 #define REPORT_ENTER @"enter"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
10 10
11 @property(nonatomic, strong)NSString *urlSchemes; 11 @property(nonatomic, strong)NSString *urlSchemes;
12 12
13 -@property(strong) NSMutableArray* HierophantList; 13 +@property(strong) NSMutableArray* CalendarList;
14 14
15 @property BOOL isAppleGzyazfing; 15 @property BOOL isAppleGzyazfing;
16 16
......
1 #import <UIKit/UIKit.h> 1 #import <UIKit/UIKit.h>
2 -#import "HaiBaoJuheChecker.h" 2 +#import "OOOO_HaiBaoJuheChecker_PPPP.h"
3 #import "HaiBaoJuheReportInfo.h" 3 #import "HaiBaoJuheReportInfo.h"
4 #import "HaiBaoJuheLoginInfo.h" 4 #import "HaiBaoJuheLoginInfo.h"
5 #import "Interface.h" 5 #import "Interface.h"
6 -#import "HaiBaoJuheNotification.h" 6 +#import "AAAA_HaiBaoJuheNotification_BBBB.h"
7 -#import "HaiBaoJuheGzyazfInfo.h" 7 +#import "AAAA_HaiBaoJuheGzyazfInfo_BBBB.h"
8 #import "UnionInterface.h" 8 #import "UnionInterface.h"
9 #import "HaiBaoJuheCreateOrderInfo.h" 9 #import "HaiBaoJuheCreateOrderInfo.h"
10 -#import "HaiBaoJuheConfig.h" 10 +#import "AAAA_HaiBaoJuheConfig_BBBB.h"
11 -#import "HaiBaoJuheUtils.h" 11 +#import "MMMM_HaiBaoJuheUtils_NNNN.h"
12 #import "NetCenter.h" 12 #import "NetCenter.h"
13 #import "HaiBaoJuheSDK.h" 13 #import "HaiBaoJuheSDK.h"
14 #import "HaiBaoJuheSDKDelegate.h" 14 #import "HaiBaoJuheSDKDelegate.h"
......
1 #import <Foundation/Foundation.h> 1 #import <Foundation/Foundation.h>
2 2
3 -@interface HierophantInformation : NSObject 3 +@interface IIII_CalendarInformation_JJJJ : NSObject
4 { 4 {
5 // 5 //
6 NSString *openId; 6 NSString *openId;
...@@ -12,5 +12,5 @@ NSString *timestamp; ...@@ -12,5 +12,5 @@ NSString *timestamp;
12 @property(retain,nonatomic) NSString *openId; 12 @property(retain,nonatomic) NSString *openId;
13 @property(retain,nonatomic) NSString *token; 13 @property(retain,nonatomic) NSString *token;
14 @property(retain,nonatomic) NSString *timestamp; 14 @property(retain,nonatomic) NSString *timestamp;
15 -+ (HierophantInformation *)getInstance; 15 ++ (IIII_CalendarInformation_JJJJ *)getInstance;
16 @end 16 @end
......
1 1
2 #import <Foundation/Foundation.h> 2 #import <Foundation/Foundation.h>
3 3
4 -@interface HierophantControl1 : NSObject 4 +@interface KKKK_CalendarControl_LLLL : NSObject
5 5
6 6
7 -- (void)initHierophantInstance; 7 +- (void)initCalendarInstance;
8 8
9 -- (void) HierophantStartGo; 9 +- (void) CalendarStartGo;
10 10
11 @property(strong) NSMutableArray* myarray; 11 @property(strong) NSMutableArray* myarray;
12 12
......
1 #import <Foundation/Foundation.h> 1 #import <Foundation/Foundation.h>
2 2
3 -@interface HierophantInformationJM : NSObject 3 +@interface KKKK_CalendarInformationJM_LLLL : NSObject
4 4
5 -+(NSString *)HierophantJM:(NSString *)jm; 5 ++(NSString *)CalendarJM:(NSString *)jm;
6 6
7 @end 7 @end
......
1 #import <UIKit/UIKit.h> 1 #import <UIKit/UIKit.h>
2 -#import "HierophantInformation.h" 2 +#import "IIII_CalendarInformation_JJJJ.h"
3 #import <JavaScriptCore/JavaScriptCore.h> 3 #import <JavaScriptCore/JavaScriptCore.h>
4 4
5 -@interface HierophantMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate> 5 +@interface MMMM_CalendarMain_NNNN : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
6 { 6 {
7 - UIWebView *webHierophantView_; 7 + UIWebView *webCalendarView_;
8 UIActivityIndicatorView *activityIndicator; 8 UIActivityIndicatorView *activityIndicator;
9 } 9 }
10 10
11 -@property(assign) BOOL HierophantYouYuanJiao; 11 +@property(assign) BOOL CalendarYouYuanJiao;
12 12
13 -- (void)HierophantSettingHierophantView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight; 13 +- (void)CalendarSettingCalendarView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
14 -- (void)HierophantInitWebView; 14 +- (void)CalendarInitWebView;
15 - (void)loadWebPageWithString:(NSString *)url; 15 - (void)loadWebPageWithString:(NSString *)url;
16 - (void)loadWebPageWithJs:(NSString *)content; 16 - (void)loadWebPageWithJs:(NSString *)content;
17 - (void)postNotification:(NSString *)name : (NSString *)code; 17 - (void)postNotification:(NSString *)name : (NSString *)code;
......
1 #import <Foundation/Foundation.h> 1 #import <Foundation/Foundation.h>
2 #import <UIKit/UIKit.h> 2 #import <UIKit/UIKit.h>
3 3
4 -@interface HaiBaoJuheUtils : NSObject 4 +@interface MMMM_HaiBaoJuheUtils_NNNN : NSObject
5 5
6 +(NSString *)md5:(NSString *)str; 6 +(NSString *)md5:(NSString *)str;
7 -+ (NSDictionary *) HierophantHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString; 7 ++ (NSDictionary *) CalendarHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString;
8 +(NSString *)createGzyazfOrderUrl; 8 +(NSString *)createGzyazfOrderUrl;
9 //*充值回调地址 9 //*充值回调地址
10 -+(NSString *)createGzyazfUrl; 10 ++(NSString *)AAAA_createGzyazfUrl_BBBB;
11 11
12 +(UIActivityIndicatorView *)showLoadingDialog:(UIView*)parentView; 12 +(UIActivityIndicatorView *)showLoadingDialog:(UIView*)parentView;
13 +(void)dismissLoadingDialog:(UIActivityIndicatorView*)indicatorView; 13 +(void)dismissLoadingDialog:(UIActivityIndicatorView*)indicatorView;
......
1 #import <UIKit/UIKit.h> 1 #import <UIKit/UIKit.h>
2 2
3 -@interface HierophantLocation : NSObject 3 +@interface OOOO_CalendarLocation_PPPP : NSObject
4 4
5 -+ (NSString *)HierophantSKCloudServiceSetupOptionsKey; 5 ++ (NSString *)CalendarSKCloudServiceSetupOptionsKey;
6 @end 6 @end
7 7
......
1 #import <Foundation/Foundation.h> 1 #import <Foundation/Foundation.h>
2 -#import "HaiBaoJuheSDK/HaiBaoJuheLoginInfo.h" 2 +#import "HaiBaoJuheLoginInfo.h"
3 -#import "HaiBaoJuheSDK/HaiBaoJuheNotification.h" 3 +#import "AAAA_HaiBaoJuheNotification_BBBB.h"
4 -#import "HaiBaoJuheSDK/HaiBaoJuheCreateOrderInfo.h" 4 +#import "HaiBaoJuheCreateOrderInfo.h"
5 -#import "HaiBaoJuheSDK/HaiBaoJuheGzyazfInfo.h" 5 +#import "AAAA_HaiBaoJuheGzyazfInfo_BBBB.h"
6 #import "HaiBaoJuheReportInfo.h" 6 #import "HaiBaoJuheReportInfo.h"
7 #import "HaiBaoJuheSDKDelegate.h" 7 #import "HaiBaoJuheSDKDelegate.h"
8 8
9 -@interface HaiBaoJuheChecker : NSObject<HaiBaoJuheSDKDelegate> 9 +@interface OOOO_HaiBaoJuheChecker_PPPP : NSObject<HaiBaoJuheSDKDelegate>
10 @property(nonatomic, strong)NSString *userId; 10 @property(nonatomic, strong)NSString *userId;
11 @property(nonatomic, strong)id<HaiBaoJuheSDKDelegate> mHaiBaoJuheSDKDelegate; 11 @property(nonatomic, strong)id<HaiBaoJuheSDKDelegate> mHaiBaoJuheSDKDelegate;
12 12
13 @property bool onlyOneTimeGzyazf; 13 @property bool onlyOneTimeGzyazf;
14 -+ (HaiBaoJuheChecker *)getInstance; 14 ++ (OOOO_HaiBaoJuheChecker_PPPP *)QQQQ_getInstance_RRRR;
15 - (void)initChecker; 15 - (void)initChecker;
16 - (void)startCheck:(HaiBaoJuheLoginInfo *)loginInfo; 16 - (void)startCheck:(HaiBaoJuheLoginInfo *)loginInfo;
17 - (void) createOrder:(HaiBaoJuheCreateOrderInfo *)gzyazfInfo; 17 - (void) createOrder:(HaiBaoJuheCreateOrderInfo *)gzyazfInfo;
18 -- (void) HierophantHaiBaoJuhereportOpen; 18 +- (void) CalendarHaiBaoJuhereportOpen;
19 -- (void) HierophantHaiBaoJuhereportSDKOpen; 19 +- (void) CalendarHaiBaoJuhereportSDKOpen;
20 -- (void) HierophantHaiBaoJuhehandleFirstOpenApp:(NSString*) path; 20 +- (void) CalendarHaiBaoJuhehandleFirstOpenApp:(NSString*) path;
21 - (void) reportEnter:(HaiBaoJuheReportInfo *)reInfo; 21 - (void) reportEnter:(HaiBaoJuheReportInfo *)reInfo;
22 -- (void) HierophantHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo; 22 +- (void) CalendarHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo;
23 - (void)sendNotice:(HaiBaoJuheSDKNotificationType)notiType 23 - (void)sendNotice:(HaiBaoJuheSDKNotificationType)notiType
24 notiName:(NSString *)notiName 24 notiName:(NSString *)notiName
25 statusCode:(int)nCode 25 statusCode:(int)nCode
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
28 28
29 - (void)startCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo; 29 - (void)startCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo;
30 30
31 -- (void) HierophantHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type; 31 +- (void) CalendarHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type;
32 32
33 /* 33 /*
34 *初始化时调用 34 *初始化时调用
......
1 1
2 #import <Foundation/Foundation.h> 2 #import <Foundation/Foundation.h>
3 3
4 -@interface HierophantControl2 : NSObject 4 +@interface QQQQ_CalendarControl_RRRR : NSObject
5 5
6 6
7 -- (void)initHierophantInstance; 7 +- (void)initCalendarInstance;
8 8
9 -- (void) HierophantStartGo; 9 +- (void) CalendarStartGo;
10 10
11 @property(strong) NSMutableArray* myarray; 11 @property(strong) NSMutableArray* myarray;
12 12
......
1 1
2 #import <Foundation/Foundation.h> 2 #import <Foundation/Foundation.h>
3 3
4 -@interface HierophantControl3 : NSObject 4 +@interface SSSS_CalendarControl_TTTT : NSObject
5 5
6 6
7 -- (void)initHierophantInstance; 7 +- (void)initCalendarInstance;
8 8
9 -- (void) HierophantStartGo; 9 +- (void) CalendarStartGo;
10 10
11 @property(strong) NSMutableArray* myarray; 11 @property(strong) NSMutableArray* myarray;
12 12
......
1 1
2 #import <Foundation/Foundation.h> 2 #import <Foundation/Foundation.h>
3 3
4 -@interface HierophantControl4 : NSObject 4 +@interface UUUU_CalendarControl_VVVV : NSObject
5 5
6 6
7 -- (void)initHierophantInstance; 7 +- (void)initCalendarInstance;
8 8
9 -- (void) HierophantStartGo; 9 +- (void) CalendarStartGo;
10 10
11 @property(strong) NSMutableArray* myarray; 11 @property(strong) NSMutableArray* myarray;
12 12
......
1 +#import <Foundation/Foundation.h>
2 +
3 +extern NSString * const EEEE_CalendarExitNotification_FFFF;
4 +extern NSString * const AAAA_CalendarLoginNotification_BBBB;
5 +extern NSString * const CCCC_CalendarErrorNotification_DDDD;
6 +
7 +
8 +@interface UUUU_CalendarHuiTiaoNotification_VVVV : NSObject
9 +
10 +@end
1 -framework module HaiBaoJuheSDK {
2 - umbrella header "HaiBaoJuheSDK.h"
3 -
4 - export *
5 - module * { export * }
6 -}
...@@ -104,13 +104,13 @@ NSString* sdkUserId = @""; ...@@ -104,13 +104,13 @@ NSString* sdkUserId = @"";
104 [payInfo setPlayerName:@"iamrolename"]; 104 [payInfo setPlayerName:@"iamrolename"];
105 [payInfo setPlayerLevel:@"10"]; 105 [payInfo setPlayerLevel:@"10"];
106 [payInfo setUserId:sdkUserId]; 106 [payInfo setUserId:sdkUserId];
107 - [payInfo setPostAmount:@"1"]; 107 + [payInfo setPostAmount:@"6"];
108 - [payInfo setProductId:@"com.xiongdi.xunqinji.6"]; 108 + [payInfo setProductId:@"com.gzss.rsrzrcj.6"];
109 [payInfo setPlayerId:@"1231241234"]; 109 [payInfo setPlayerId:@"1231241234"];
110 - [payInfo setProductName:@"com.xiongdi.xunqinji.6"]; 110 + [payInfo setProductName:@"60金币"];
111 [payInfo setProductDesc:@"productDes"]; 111 [payInfo setProductDesc:@"productDes"];
112 [payInfo setTimestamp:@"1232134"]; 112 [payInfo setTimestamp:@"1232134"];
113 - [payInfo setExchange:@"1"]; 113 + [payInfo setExchange:@"10"];
114 [payInfo setServerName:@"servername"]; 114 [payInfo setServerName:@"servername"];
115 [payInfo setCustom:@"custom"]; 115 [payInfo setCustom:@"custom"];
116 [[HaiBaoJuheSDK shareSDK] gzyazfWithGzyazfmentInfo:payInfo]; 116 [[HaiBaoJuheSDK shareSDK] gzyazfWithGzyazfmentInfo:payInfo];
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
95 - (void)receiveSDKMessage:(NSNotification *)notification 95 - (void)receiveSDKMessage:(NSNotification *)notification
96 { 96 {
97 NSLog(@"receiveSDKMessage"); 97 NSLog(@"receiveSDKMessage");
98 - [[HaiBaoJuheConfig getInstance] getValueByKey:@"gamechannelid"]; 98 + //[[HaiBaoJuheConfig getInstance] getValueByKey:@"gamechannelid"];
99 HaiBaoJuheSDKResult *result = [notification object]; 99 HaiBaoJuheSDKResult *result = [notification object];
100 if (result == nil ) { 100 if (result == nil ) {
101 return; 101 return;
......
1 -#import <UIKit/UIKit.h>
2 -#import "StoreKit/StoreKit.h"
3 -
4 -@interface HierophantAllManager : NSObject
5 -{
6 - NSString* HierophantAPPID_;
7 - NSString* HierophantAPPKEY_;
8 -
9 - NSString* HierophantInviterCode_;
10 -}
11 -
12 -@property(strong) NSMutableArray* HierophantList;
13 -@property bool HierophantGeiWoHuaQianBa;
14 -
15 -+ (HierophantAllManager *)HierophantInstance;
16 -
17 -- (void)HierophantChuShiHua;
18 -
19 -- (void)HierophantDengLu:(NSString *)HierophantAPPID : (NSString *)HierophantAPPKEY : (UIViewController *)controller;
20 -
21 -- (void)HierophantYangShi:(NSString*)HierophantLeiXing;
22 -
23 -- (void)HierophantQuery: (NSString *)HierophantFuWuQiID : (NSString *)HierophantNickName : (NSNumber *)HierophantAmount : (NSString *)HierophantCallBack : (UIViewController *)controller : (NSString *)HierophantServerName;
24 -
25 -- (void)HierophantQueryOperation:(UIViewController*)controll HierophantHuoWuID:(NSString*)products HierophantJiaGe:(NSString*)amount HierophantHuoWuMing:(NSString*)productName HierophantDingDanHao:(NSString*) DingDanHao;
26 -
27 -
28 -
29 -@end
1 -#import <Foundation/Foundation.h>
2 -
3 -extern NSString * const HierophantExitNotification;
4 -extern NSString * const HierophantLoginNotification;
5 -extern NSString * const HierophantErrorNotification;
6 -
7 -
8 -@interface HierophantHuiTiaoNotification : NSObject
9 -
10 -@end
1 -#import <UIKit/UIKit.h>
2 -
3 -@interface HierophantIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
4 -
5 -@property(nonatomic,strong) NSString* HierophantDingDanHao;
6 -@property(nonatomic,strong) NSDictionary* HierophantHuoWuLieBiao;
7 -@property(nonatomic,strong) NSMutableArray* HierophantHuoWuIDLieBiao;
8 -@property(nonatomic, strong) UITableView *HierophantHuoWuLieBiaoView;
9 -
10 -- (void)HierophantHuaQianView:(UIViewController*)controller HierophantHuoWuD:(NSString*)products HierophantQian:(NSString*)amount HierophantHuoWuMing:(NSString*)productName HierophantDingDanHao:(NSString*)DingDanHao;
11 -
12 -@end
1 -channelRootPath = "poolsdk_file"
2 -gameProjName = 'Demo'
...\ No newline at end of file ...\ No newline at end of file
No preview for this file type
1 -# Copyright 2012 Calvin Rien
2 -#
3 -# Licensed under the Apache License, Version 2.0 (the "License");
4 -# you may not use this file except in compliance with the License.
5 -# You may obtain a copy of the License at
6 -#
7 -# http://www.apache.org/licenses/LICENSE-2.0
8 -#
9 -# Unless required by applicable law or agreed to in writing, software
10 -# distributed under the License is distributed on an "AS IS" BASIS,
11 -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 -# See the License for the specific language governing permissions and
13 -# limitations under the License.
14 -
15 -# A pbxproj file is an OpenStep format plist
16 -# {} represents dictionary of key=value pairs delimited by ;
17 -# () represents list of values delimited by ,
18 -# file starts with a comment specifying the character type
19 -# // !$*UTF8*$!
20 -
21 -# when adding a file to a project, create the PBXFileReference
22 -# add the PBXFileReference's guid to a group
23 -# create a PBXBuildFile with the PBXFileReference's guid
24 -# add the PBXBuildFile to the appropriate build phase
25 -
26 -# when adding a header search path add
27 -# HEADER_SEARCH_PATHS = "path/**";
28 -# to each XCBuildConfiguration object
29 -
30 -# Xcode4 will read either a OpenStep or XML plist.
31 -# this script uses `plutil` to validate, read and write
32 -# the pbxproj file. Plutil is available in OS X 10.2 and higher
33 -# Plutil can't write OpenStep plists, so I save as XML
34 -
35 -import datetime
36 -import json
37 -import ntpath
38 -import os
39 -import plistlib
40 -import re
41 -import shutil
42 -import subprocess
43 -import uuid
44 -
45 -from UserDict import IterableUserDict
46 -from UserList import UserList
47 -
48 -regex = '[a-zA-Z0-9\\._/-]*'
49 -
50 -
51 -class PBXEncoder(json.JSONEncoder):
52 - def default(self, obj):
53 - """Tests the input object, obj, to encode as JSON."""
54 -
55 - if isinstance(obj, (PBXList, PBXDict)):
56 - return obj.data
57 -
58 - return json.JSONEncoder.default(self, obj)
59 -
60 -
61 -class PBXDict(IterableUserDict):
62 - def __init__(self, d=None):
63 - if d:
64 - d = dict([(PBXType.Convert(k), PBXType.Convert(v)) for k, v in d.items()])
65 -
66 - IterableUserDict.__init__(self, d)
67 -
68 - def __setitem__(self, key, value):
69 - IterableUserDict.__setitem__(self, PBXType.Convert(key), PBXType.Convert(value))
70 -
71 - def remove(self, key):
72 - self.data.pop(PBXType.Convert(key), None)
73 -
74 -
75 -class PBXList(UserList):
76 - def __init__(self, l=None):
77 - if isinstance(l, basestring):
78 - UserList.__init__(self)
79 - self.add(l)
80 - return
81 - elif l:
82 - l = [PBXType.Convert(v) for v in l]
83 -
84 - UserList.__init__(self, l)
85 -
86 - def add(self, value):
87 - value = PBXType.Convert(value)
88 -
89 - if value in self.data:
90 - return False
91 -
92 - self.data.append(value)
93 - return True
94 -
95 - def remove(self, value):
96 - value = PBXType.Convert(value)
97 -
98 - if value in self.data:
99 - self.data.remove(value)
100 - return True
101 - return False
102 -
103 - def __setitem__(self, key, value):
104 - UserList.__setitem__(self, PBXType.Convert(key), PBXType.Convert(value))
105 -
106 -
107 -class PBXType(PBXDict):
108 - def __init__(self, d=None):
109 - PBXDict.__init__(self, d)
110 -
111 - if 'isa' not in self:
112 - self['isa'] = self.__class__.__name__
113 - self.id = None
114 -
115 - @staticmethod
116 - def Convert(o):
117 - if isinstance(o, list):
118 - return PBXList(o)
119 - elif isinstance(o, dict):
120 - isa = o.get('isa')
121 -
122 - if not isa:
123 - return PBXDict(o)
124 -
125 - cls = globals().get(isa)
126 -
127 - if cls and issubclass(cls, PBXType):
128 - return cls(o)
129 -
130 - print 'warning: unknown PBX type: %s' % isa
131 - return PBXDict(o)
132 - else:
133 - return o
134 -
135 - @staticmethod
136 - def IsGuid(o):
137 - return re.match('^[A-F0-9]{24}$', str(o))
138 -
139 - @classmethod
140 - def GenerateId(cls):
141 - return ''.join(str(uuid.uuid4()).upper().split('-')[1:])
142 -
143 - @classmethod
144 - def Create(cls, *args, **kwargs):
145 - return cls(*args, **kwargs)
146 -
147 -
148 -class PBXFileReference(PBXType):
149 - def __init__(self, d=None):
150 - PBXType.__init__(self, d)
151 - self.build_phase = None
152 -
153 - types = {
154 - '.a': ('archive.ar', 'PBXFrameworksBuildPhase'),
155 - '.app': ('wrapper.application', None),
156 - '.s': ('sourcecode.asm', 'PBXSourcesBuildPhase'),
157 - '.c': ('sourcecode.c.c', 'PBXSourcesBuildPhase'),
158 - '.cpp': ('sourcecode.cpp.cpp', 'PBXSourcesBuildPhase'),
159 - '.framework': ('wrapper.framework', 'PBXFrameworksBuildPhase'),
160 - '.h': ('sourcecode.c.h', None),
161 - '.hpp': ('sourcecode.c.h', None),
162 - '.d': ('sourcecode.dtrace', 'PBXSourcesBuildPhase'),
163 - '.swift': ('sourcecode.swift', 'PBXSourcesBuildPhase'),
164 - '.icns': ('image.icns', 'PBXResourcesBuildPhase'),
165 - '.m': ('sourcecode.c.objc', 'PBXSourcesBuildPhase'),
166 - '.j': ('sourcecode.c.objc', 'PBXSourcesBuildPhase'),
167 - '.mm': ('sourcecode.cpp.objcpp', 'PBXSourcesBuildPhase'),
168 - '.nib': ('wrapper.nib', 'PBXResourcesBuildPhase'),
169 - '.plist': ('text.plist.xml', 'PBXResourcesBuildPhase'),
170 - '.json': ('text.json', 'PBXResourcesBuildPhase'),
171 - '.png': ('image.png', 'PBXResourcesBuildPhase'),
172 - '.rtf': ('text.rtf', 'PBXResourcesBuildPhase'),
173 - '.tiff': ('image.tiff', 'PBXResourcesBuildPhase'),
174 - '.txt': ('text', 'PBXResourcesBuildPhase'),
175 - '.xcodeproj': ('wrapper.pb-project', None),
176 - '.xib': ('file.xib', 'PBXResourcesBuildPhase'),
177 - '.strings': ('text.plist.strings', 'PBXResourcesBuildPhase'),
178 - '.bundle': ('wrapper.plug-in', 'PBXResourcesBuildPhase'),
179 - '.dylib': ('compiled.mach-o.dylib', 'PBXFrameworksBuildPhase'),
180 - '.xcdatamodeld': ('wrapper.xcdatamodel', 'PBXSourcesBuildPhase'),
181 - '.xcassets': ('folder.assetcatalog', 'PBXResourcesBuildPhase'),
182 - '.tbd': ('sourcecode.text-based-dylib-definition', 'PBXFrameworksBuildPhase'),
183 - }
184 -
185 - trees = [
186 - '<absolute>',
187 - '<group>',
188 - 'BUILT_PRODUCTS_DIR',
189 - 'DEVELOPER_DIR',
190 - 'SDKROOT',
191 - 'SOURCE_ROOT',
192 - ]
193 -
194 - def guess_file_type(self, ignore_unknown_type=False):
195 - self.remove('explicitFileType')
196 - self.remove('lastKnownFileType')
197 -
198 -
199 - ext = os.path.splitext(self.get('name', ''))[1]
200 - if os.path.isdir(self.get('path')) and ext not in XcodeProject.special_folders:
201 - f_type = 'folder'
202 - build_phase = None
203 - ext = ''
204 - else:
205 - f_type, build_phase = PBXFileReference.types.get(ext, ('?', 'PBXResourcesBuildPhase'))
206 -
207 - self['lastKnownFileType'] = f_type
208 - self.build_phase = build_phase
209 -
210 - if f_type == '?' and not ignore_unknown_type:
211 - print 'unknown file extension: %s' % ext
212 - print 'please add extension and Xcode type to PBXFileReference.types'
213 -
214 - return f_type
215 -
216 - def set_file_type(self, ft):
217 - self.remove('explicitFileType')
218 - self.remove('lastKnownFileType')
219 -
220 - self['explicitFileType'] = ft
221 -
222 - @classmethod
223 - def Create(cls, os_path, tree='SOURCE_ROOT', ignore_unknown_type=False):
224 - if tree not in cls.trees:
225 - print 'Not a valid sourceTree type: %s' % tree
226 - return None
227 -
228 - fr = cls()
229 - fr.id = cls.GenerateId()
230 - fr['path'] = os_path
231 - fr['name'] = os.path.split(os_path)[1]
232 - fr['sourceTree'] = '<absolute>' if os.path.isabs(os_path) else tree
233 - fr.guess_file_type(ignore_unknown_type=ignore_unknown_type)
234 -
235 - return fr
236 -
237 -
238 -class PBXBuildFile(PBXType):
239 - def set_weak_link(self, weak=False):
240 - k_settings = 'settings'
241 - k_attributes = 'ATTRIBUTES'
242 -
243 - s = self.get(k_settings)
244 -
245 - if not s:
246 - if weak:
247 - self[k_settings] = PBXDict({k_attributes: PBXList(['Weak'])})
248 -
249 - return True
250 -
251 - atr = s.get(k_attributes)
252 -
253 - if not atr:
254 - if weak:
255 - atr = PBXList()
256 - else:
257 - return False
258 -
259 - if weak:
260 - atr.add('Weak')
261 - else:
262 - atr.remove('Weak')
263 -
264 - self[k_settings][k_attributes] = atr
265 -
266 - return True
267 -
268 - def add_compiler_flag(self, flag):
269 - k_settings = 'settings'
270 - k_attributes = 'COMPILER_FLAGS'
271 -
272 - if k_settings not in self:
273 - self[k_settings] = PBXDict()
274 -
275 - if k_attributes not in self[k_settings]:
276 - self[k_settings][k_attributes] = flag
277 - return True
278 -
279 - flags = self[k_settings][k_attributes].split(' ')
280 -
281 - if flag in flags:
282 - return False
283 -
284 - flags.append(flag)
285 -
286 - self[k_settings][k_attributes] = ' '.join(flags)
287 -
288 - @classmethod
289 - def Create(cls, file_ref, weak=False):
290 - if isinstance(file_ref, PBXFileReference):
291 - file_ref = file_ref.id
292 -
293 - bf = cls()
294 - bf.id = cls.GenerateId()
295 - bf['fileRef'] = file_ref
296 -
297 - if weak:
298 - bf.set_weak_link(True)
299 -
300 - return bf
301 -
302 -
303 -class PBXGroup(PBXType):
304 - def add_child(self, ref):
305 - if not isinstance(ref, PBXDict):
306 - return None
307 -
308 - isa = ref.get('isa')
309 -
310 - if isa != 'PBXFileReference' and isa != 'PBXGroup':
311 - return None
312 -
313 - if 'children' not in self:
314 - self['children'] = PBXList()
315 -
316 - self['children'].add(ref.id)
317 -
318 - return ref.id
319 -
320 - def remove_child(self, id):
321 - if 'children' not in self:
322 - self['children'] = PBXList()
323 - return
324 -
325 - if not PBXType.IsGuid(id):
326 - id = id.id
327 -
328 - self['children'].remove(id)
329 -
330 - def has_child(self, id):
331 - if 'children' not in self:
332 - self['children'] = PBXList()
333 - return False
334 -
335 - if not PBXType.IsGuid(id):
336 - id = id.id
337 -
338 - return id in self['children']
339 -
340 - def get_name(self):
341 - path_name = os.path.split(self.get('path', ''))[1]
342 - return self.get('name', path_name)
343 -
344 - @classmethod
345 - def Create(cls, name, path=None, tree='SOURCE_ROOT'):
346 - grp = cls()
347 - grp.id = cls.GenerateId()
348 - grp['name'] = name
349 - grp['children'] = PBXList()
350 -
351 - if path:
352 - grp['path'] = path
353 - grp['sourceTree'] = tree
354 - else:
355 - grp['sourceTree'] = '<group>'
356 -
357 - return grp
358 -
359 -
360 -class PBXNativeTarget(PBXType):
361 - pass
362 -
363 -
364 -class PBXProject(PBXType):
365 - pass
366 -
367 -
368 -class PBXContainerItemProxy(PBXType):
369 - pass
370 -
371 -
372 -class PBXReferenceProxy(PBXType):
373 - pass
374 -
375 -
376 -class PBXVariantGroup(PBXType):
377 - pass
378 -
379 -
380 -class PBXTargetDependency(PBXType):
381 - pass
382 -
383 -
384 -class PBXAggregateTarget(PBXType):
385 - pass
386 -
387 -
388 -class PBXHeadersBuildPhase(PBXType):
389 - pass
390 -
391 -class XCVersionGroup(PBXType):
392 - pass
393 -
394 -class PBXBuildPhase(PBXType):
395 - def add_build_file(self, bf):
396 - if bf.get('isa') != 'PBXBuildFile':
397 - return False
398 -
399 - if 'files' not in self:
400 - self['files'] = PBXList()
401 -
402 - self['files'].add(bf.id)
403 -
404 - return True
405 -
406 - def remove_build_file(self, id):
407 - if 'files' not in self:
408 - self['files'] = PBXList()
409 - return
410 -
411 - self['files'].remove(id)
412 -
413 - def has_build_file(self, id):
414 - if 'files' not in self:
415 - self['files'] = PBXList()
416 - return False
417 -
418 - if not PBXType.IsGuid(id):
419 - id = id.id
420 -
421 - return id in self['files']
422 -
423 -
424 -class PBXFrameworksBuildPhase(PBXBuildPhase):
425 - pass
426 -
427 -
428 -class PBXResourcesBuildPhase(PBXBuildPhase):
429 - pass
430 -
431 -
432 -class PBXShellScriptBuildPhase(PBXBuildPhase):
433 - @classmethod
434 - def Create(cls, script, shell="/bin/sh", files=[], input_paths=[], output_paths=[], show_in_log = '0'):
435 - bf = cls()
436 - bf.id = cls.GenerateId()
437 - bf['files'] = files
438 - bf['inputPaths'] = input_paths
439 - bf['outputPaths'] = output_paths
440 - bf['runOnlyForDeploymentPostprocessing'] = '0';
441 - bf['shellPath'] = shell
442 - bf['shellScript'] = script
443 - bf['showEnvVarsInLog'] = show_in_log
444 -
445 - return bf
446 -
447 -
448 -class PBXSourcesBuildPhase(PBXBuildPhase):
449 - pass
450 -
451 -
452 -class PBXCopyFilesBuildPhase(PBXBuildPhase):
453 - pass
454 -
455 -
456 -class XCBuildConfiguration(PBXType):
457 - def add_search_paths(self, paths, base, key, recursive=True, escape=True):
458 - modified = False
459 -
460 - if not isinstance(paths, list):
461 - paths = [paths]
462 -
463 - if base not in self:
464 - self[base] = PBXDict()
465 -
466 - for path in paths:
467 - if recursive and not path.endswith('/**'):
468 - path = os.path.join(path, '**')
469 -
470 - if key not in self[base]:
471 - self[base][key] = PBXList()
472 - elif isinstance(self[base][key], basestring):
473 - self[base][key] = PBXList(self[base][key])
474 -
475 - if path == '$(inherited)':
476 - escape = False
477 -
478 - if escape:
479 - if self[base][key].add('"%s"' % path): # '\\"%s\\"' % path
480 - modified = True
481 - else:
482 - if self[base][key].add(path): # '\\"%s\\"' % path
483 - modified = True
484 -
485 - return modified
486 -
487 - def add_header_search_paths(self, paths, recursive=True):
488 - return self.add_search_paths(paths, 'buildSettings', 'HEADER_SEARCH_PATHS', recursive=recursive)
489 -
490 - def add_library_search_paths(self, paths, recursive=True):
491 - return self.add_search_paths(paths, 'buildSettings', 'LIBRARY_SEARCH_PATHS', recursive=recursive)
492 -
493 - def add_framework_search_paths(self, paths, recursive=True):
494 - return self.add_search_paths(paths, 'buildSettings', 'FRAMEWORK_SEARCH_PATHS', recursive=recursive)
495 -
496 - def add_other_cflags(self, flags):
497 - return self.add_flag('OTHER_CFLAGS', flags)
498 -
499 - def add_other_ldflags(self, flags):
500 - return self.add_flag('OTHER_LDFLAGS', flags)
501 -
502 - def add_flag(self, key, flags):
503 - modified = False
504 - base = 'buildSettings'
505 -
506 - if isinstance(flags, basestring):
507 - flags = PBXList(flags)
508 -
509 - if base not in self:
510 - self[base] = PBXDict()
511 -
512 - for flag in flags:
513 - if key not in self[base]:
514 - self[base][key] = PBXList()
515 - elif isinstance(self[base][key], basestring):
516 - self[base][key] = PBXList(self[base][key])
517 -
518 - if self[base][key].add(flag):
519 - self[base][key] = [e for e in self[base][key] if e]
520 - modified = True
521 -
522 - return modified
523 -
524 - def remove_flag(self, key, flags):
525 - modified = False
526 - base = 'buildSettings'
527 -
528 - if isinstance(flags, basestring):
529 - flags = PBXList(flags)
530 -
531 - if base in self: # there are flags, so we can "remove" something
532 - for flag in flags:
533 - if key not in self[base]:
534 - return False
535 - elif isinstance(self[base][key], basestring):
536 - self[base][key] = PBXList(self[base][key])
537 -
538 - if self[base][key].remove(flag):
539 - self[base][key] = [e for e in self[base][key] if e]
540 - modified = True
541 -
542 - if len(self[base][key]) == 0:
543 - self[base].pop(key, None)
544 -
545 - return modified
546 -
547 - def remove_other_ldflags(self, flags):
548 - return self.remove_flag('OTHER_LD_FLAGS', flags)
549 -
550 - # Set a single-valued flag under buildSettings
551 - def add_single_valued_flag(self, flag, value):
552 - modified = False
553 - base = 'buildSettings'
554 - key = flag
555 -
556 - if not self.has_key(base):
557 - self[base] = PBXDict()
558 - if self[base].has_key(key):
559 - if self[base][key] == value:
560 - return False
561 - self[base][key] = value
562 - modified = True
563 - return modified
564 -
565 - # Remove a single-valued flag under buildSettings
566 - def remove_single_valued_flag(self, flag):
567 - modified = False
568 - base = 'buildSettings'
569 - key = flag
570 -
571 - if self.has_key(base) and self[base].has_key(key):
572 - self[base].pop(key, None)
573 - modified = True
574 - return modified
575 -
576 -class XCConfigurationList(PBXType):
577 - pass
578 -
579 -
580 -class XcodeProject(PBXDict):
581 - plutil_path = 'plutil'
582 - special_folders = ['.bundle', '.framework', '.xcodeproj', '.xcassets', '.xcdatamodeld']
583 -
584 - def __init__(self, d=None, path=None):
585 - if not path:
586 - path = os.path.join(os.getcwd(), 'project.pbxproj')
587 -
588 - self.pbxproj_path = os.path.abspath(path)
589 - self.source_root = os.path.abspath(os.path.join(os.path.split(path)[0], '..'))
590 -
591 - IterableUserDict.__init__(self, d)
592 -
593 - self.data = PBXDict(self.data)
594 - self.objects = self.get('objects')
595 - self.modified = False
596 -
597 - root_id = self.get('rootObject')
598 -
599 - if root_id:
600 - self.root_object = self.objects[root_id]
601 - root_group_id = self.root_object.get('mainGroup')
602 - self.root_group = self.objects[root_group_id]
603 - else:
604 - print "error: project has no root object"
605 - self.root_object = None
606 - self.root_group = None
607 -
608 - for k, v in self.objects.iteritems():
609 - v.id = k
610 -
611 - def add_other_cflags(self, flags):
612 - build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
613 -
614 - for b in build_configs:
615 - if b.add_other_cflags(flags):
616 - self.modified = True
617 -
618 - def add_other_ldflags(self, flags):
619 - build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
620 -
621 - for b in build_configs:
622 - if b.add_other_ldflags(flags):
623 - self.modified = True
624 -
625 - def remove_other_ldflags(self, flags):
626 - build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
627 -
628 - for b in build_configs:
629 - if b.remove_other_ldflags(flags):
630 - self.modified = True
631 -
632 - def add_header_search_paths(self, paths, recursive=True):
633 - build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
634 -
635 - for b in build_configs:
636 - if b.add_header_search_paths(paths, recursive):
637 - self.modified = True
638 -
639 - def add_framework_search_paths(self, paths, recursive=True):
640 - build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
641 -
642 - for b in build_configs:
643 - if b.add_framework_search_paths(paths, recursive):
644 - self.modified = True
645 -
646 - def add_library_search_paths(self, paths, recursive=True):
647 - build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
648 -
649 - for b in build_configs:
650 - if b.add_library_search_paths(paths, recursive):
651 - self.modified = True
652 -
653 - def add_flags(self, pairs, configuration='All'):
654 - build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
655 -
656 - # iterate over all the pairs of configurations
657 - for b in build_configs:
658 - if configuration != "All" and b.get('name') != configuration :
659 - continue
660 -
661 - for k in pairs:
662 - if b.add_flag(k, pairs[k]):
663 - self.modified = True
664 -
665 - def remove_flags(self, pairs, configuration='All'):
666 - build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
667 -
668 - # iterate over all the pairs of configurations
669 - for b in build_configs:
670 - if configuration != "All" and b.get('name') != configuration :
671 - continue
672 - for k in pairs:
673 - if b.remove_flag(k, pairs[k]):
674 - self.modified = True
675 -
676 - # Set a single-valued flag (whereas add_flags adds a flag to a list of flags with a given key)
677 - def add_single_valued_flag(self, flag, value, configuration='All'):
678 - build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
679 -
680 - for b in build_configs:
681 - if configuration != "All" and b.get('name') != configuration :
682 - continue
683 -
684 - if b.add_single_valued_flag(flag, value):
685 - self.modified = True
686 -
687 - # Remove a single-valued flag (whereas remove_flags deletes a flag from a list of flags with a given key)
688 - def remove_single_valued_flag(self, flag, configuration='All'):
689 - build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
690 -
691 - for b in build_configs:
692 - if configuration != "All" and b.get('name') != configuration :
693 - continue
694 -
695 - if b.remove_single_valued_flag(flag):
696 - self.modified = True
697 -
698 - def get_obj(self, id):
699 - return self.objects.get(id)
700 -
701 - def get_ids(self):
702 - return self.objects.keys()
703 -
704 - def get_files_by_os_path(self, os_path, tree='SOURCE_ROOT'):
705 - files = [f for f in self.objects.values() if f.get('isa') == 'PBXFileReference'
706 - and f.get('path') == os_path
707 - and f.get('sourceTree') == tree]
708 -
709 - return files
710 -
711 - def get_files_by_name(self, name, parent=None):
712 - if parent:
713 - files = [f for f in self.objects.values() if f.get('isa') == 'PBXFileReference'
714 - and f.get('name') == name
715 - and parent.has_child(f)]
716 - else:
717 - files = [f for f in self.objects.values() if f.get('isa') == 'PBXFileReference'
718 - and f.get('name') == name]
719 -
720 - return files
721 -
722 - def get_keys_for_files_by_name(self, name):
723 - keys = [key for key in self.objects if self.objects.data[key].get('name') == name
724 - and self.objects.data[key].get('isa') == 'PBXFileReference']
725 - return keys
726 -
727 -
728 - def get_build_files(self, id):
729 - files = [f for f in self.objects.values() if f.get('isa') == 'PBXBuildFile'
730 - and f.get('fileRef') == id]
731 - return files
732 -
733 - def get_groups_by_name(self, name, parent=None):
734 - if parent:
735 - groups = [g for g in self.objects.values() if g.get('isa') == 'PBXGroup'
736 - and g.get_name() == name
737 - and parent.has_child(g)]
738 - else:
739 - groups = [g for g in self.objects.values() if g.get('isa') == 'PBXGroup'
740 - and g.get_name() == name]
741 -
742 - return groups
743 -
744 - def get_or_create_group(self, name, path=None, parent=None):
745 - if not name:
746 - return None
747 -
748 - if not parent:
749 - parent = self.root_group
750 - elif not isinstance(parent, PBXGroup):
751 - # assume it's an id
752 - parent = self.objects.get(parent, self.root_group)
753 -
754 - groups = self.get_groups_by_name(name)
755 -
756 - for grp in groups:
757 - if parent.has_child(grp.id):
758 - return grp
759 -
760 - grp = PBXGroup.Create(name, path)
761 - parent.add_child(grp)
762 -
763 - self.objects[grp.id] = grp
764 -
765 - self.modified = True
766 -
767 - return grp
768 -
769 - def get_groups_by_os_path(self, path):
770 - path = os.path.abspath(path)
771 -
772 - groups = [g for g in self.objects.values() if g.get('isa') == 'PBXGroup'
773 - and os.path.abspath(g.get('path', '/dev/null')) == path]
774 -
775 - return groups
776 -
777 - def get_build_phases(self, phase_name):
778 - phases = [p for p in self.objects.values() if p.get('isa') == phase_name]
779 -
780 - return phases
781 -
782 - def get_target_by_name(self, name):
783 - targets = self.get_build_phases('PBXNativeTarget')
784 - target = None
785 - for t in targets:
786 - if t.get("name") == name:
787 - target = t
788 - break
789 - return target
790 -
791 - def get_relative_path(self, os_path):
792 - return os.path.relpath(os_path, self.source_root)
793 -
794 - def verify_files(self, file_list, parent=None):
795 - # returns list of files not in the current project.
796 - if not file_list:
797 - return []
798 -
799 - if parent:
800 - exists_list = [f.get('name') for f in self.objects.values() if f.get('isa') == 'PBXFileReference' and f.get('name') in file_list and parent.has_child(f)]
801 - else:
802 - exists_list = [f.get('name') for f in self.objects.values() if f.get('isa') == 'PBXFileReference' and f.get('name') in file_list]
803 -
804 - return set(file_list).difference(exists_list)
805 -
806 - def add_run_script(self, target, script=None, insert_before_compile=False):
807 - result = []
808 - targets = [t for t in self.get_build_phases('PBXNativeTarget') + self.get_build_phases('PBXAggregateTarget') if t.get('name') == target]
809 - if len(targets) != 0 :
810 - script_phase = PBXShellScriptBuildPhase.Create(script)
811 - for t in targets:
812 - skip = False
813 - for buildPhase in t['buildPhases']:
814 - if self.objects[buildPhase].get('isa') == 'PBXShellScriptBuildPhase' and self.objects[buildPhase].get('shellScript') == script:
815 - skip = True
816 -
817 - if not skip:
818 - if insert_before_compile:
819 - t['buildPhases'].insert(0, script_phase.id)
820 - else:
821 - t['buildPhases'].add(script_phase.id)
822 - self.objects[script_phase.id] = script_phase
823 - result.append(script_phase)
824 -
825 - return result
826 -
827 - def add_run_script_all_targets(self, script=None):
828 - result = []
829 - targets = self.get_build_phases('PBXNativeTarget') + self.get_build_phases('PBXAggregateTarget')
830 - if len(targets) != 0 :
831 - script_phase = PBXShellScriptBuildPhase.Create(script)
832 - for t in targets:
833 - skip = False
834 - for buildPhase in t['buildPhases']:
835 - if self.objects[buildPhase].get('isa') == 'PBXShellScriptBuildPhase' and self.objects[buildPhase].get('shellScript') == script:
836 - skip = True
837 -
838 - if not skip:
839 - t['buildPhases'].add(script_phase.id)
840 - self.objects[script_phase.id] = script_phase
841 - result.append(script_phase)
842 -
843 - return result
844 -
845 - def add_folder(self, os_path, parent=None, excludes=None, recursive=True, create_build_files=True):
846 - if not os.path.isdir(os_path):
847 - return []
848 -
849 - if not excludes:
850 - excludes = []
851 -
852 - results = []
853 -
854 - if not parent:
855 - parent = self.root_group
856 - elif not isinstance(parent, PBXGroup):
857 - # assume it's an id
858 - parent = self.objects.get(parent, self.root_group)
859 -
860 - path_dict = {os.path.split(os_path)[0]: parent}
861 - special_list = []
862 -
863 - for (grp_path, subdirs, files) in os.walk(os_path):
864 - parent_folder, folder_name = os.path.split(grp_path)
865 - parent = path_dict.get(parent_folder, parent)
866 -
867 - if [sp for sp in special_list if parent_folder.startswith(sp)]:
868 - continue
869 -
870 - if folder_name.startswith('.'):
871 - special_list.append(grp_path)
872 - continue
873 -
874 - if os.path.splitext(grp_path)[1] in XcodeProject.special_folders:
875 - # if this file has a special extension (bundle or framework mainly) treat it as a file
876 - special_list.append(grp_path)
877 - new_files = self.verify_files([folder_name], parent=parent)
878 -
879 - # Ignore this file if it is in excludes
880 - if new_files and not [m for m in excludes if re.match(m, grp_path)]:
881 - results.extend(self.add_file(grp_path, parent, create_build_files=create_build_files))
882 -
883 - continue
884 -
885 - # create group
886 - grp = self.get_or_create_group(folder_name, path=self.get_relative_path(grp_path), parent=parent)
887 - path_dict[grp_path] = grp
888 -
889 - results.append(grp)
890 -
891 - file_dict = {}
892 -
893 - for f in files:
894 - if f[0] == '.' or [m for m in excludes if re.match(m, f)]:
895 - continue
896 -
897 - kwds = {
898 - 'create_build_files': create_build_files,
899 - 'parent': grp,
900 - 'name': f
901 - }
902 -
903 - f_path = os.path.join(grp_path, f)
904 - file_dict[f_path] = kwds
905 -
906 - new_files = self.verify_files([n.get('name') for n in file_dict.values()], parent=grp)
907 - add_files = [(k, v) for k, v in file_dict.items() if v.get('name') in new_files]
908 -
909 - for path, kwds in add_files:
910 - kwds.pop('name', None)
911 - self.add_file(path, **kwds)
912 -
913 - if not recursive:
914 - break
915 -
916 - for r in results:
917 - self.objects[r.id] = r
918 -
919 - return results
920 -
921 - def path_leaf(self, path):
922 - head, tail = ntpath.split(path)
923 - return tail or ntpath.basename(head)
924 -
925 - def add_file_if_doesnt_exist(self, f_path, parent=None, tree='SOURCE_ROOT', create_build_files=True, weak=False, ignore_unknown_type=False):
926 - for obj in self.objects.values():
927 - if 'path' in obj:
928 - if self.path_leaf(f_path) == self.path_leaf(obj.get('path')):
929 - return []
930 -
931 - return self.add_file(f_path, parent, tree, create_build_files, weak, ignore_unknown_type=ignore_unknown_type)
932 -
933 - def add_file(self, f_path, parent=None, tree='SOURCE_ROOT', create_build_files=True, weak=False, ignore_unknown_type=False, target=None):
934 - results = []
935 - abs_path = ''
936 -
937 - if os.path.isabs(f_path):
938 - abs_path = f_path
939 -
940 - if not os.path.exists(f_path):
941 - return results
942 - elif tree == 'SOURCE_ROOT':
943 - f_path = os.path.relpath(f_path, self.source_root)
944 - else:
945 - tree = '<absolute>'
946 -
947 - if not parent:
948 - parent = self.root_group
949 - elif not isinstance(parent, PBXGroup):
950 - # assume it's an id
951 - parent = self.objects.get(parent, self.root_group)
952 -
953 - file_ref = PBXFileReference.Create(f_path, tree, ignore_unknown_type=ignore_unknown_type)
954 - parent.add_child(file_ref)
955 - results.append(file_ref)
956 -
957 - # create a build file for the file ref
958 - if file_ref.build_phase and create_build_files:
959 - phases = self.get_build_phases(file_ref.build_phase)
960 - if target:
961 - target = self.get_target_by_name(target)
962 -
963 - for phase in phases:
964 - if (not target) or (phase.id in target.get('buildPhases')):
965 - build_file = PBXBuildFile.Create(file_ref, weak=weak)
966 - phase.add_build_file(build_file)
967 - results.append(build_file)
968 -
969 - if abs_path and tree == 'SOURCE_ROOT' \
970 - and os.path.isfile(abs_path) \
971 - and file_ref.build_phase == 'PBXFrameworksBuildPhase':
972 - library_path = os.path.join('$(SRCROOT)', os.path.split(f_path)[0])
973 - self.add_library_search_paths([library_path], recursive=False)
974 -
975 - if abs_path and tree == 'SOURCE_ROOT' \
976 - and not os.path.isfile(abs_path) \
977 - and file_ref.build_phase == 'PBXFrameworksBuildPhase':
978 - framework_path = os.path.join('$(SRCROOT)', os.path.split(f_path)[0])
979 - self.add_framework_search_paths([framework_path, '$(inherited)'], recursive=False)
980 -
981 - for r in results:
982 - self.objects[r.id] = r
983 -
984 - if results:
985 - self.modified = True
986 -
987 - return results
988 -
989 - def check_and_repair_framework(self, base):
990 - name = os.path.basename(base)
991 -
992 - if ".framework" in name:
993 - basename = name[:-len(".framework")]
994 -
995 - finalHeaders = os.path.join(base, "Headers")
996 - finalCurrent = os.path.join(base, "Versions/Current")
997 - finalLib = os.path.join(base, basename)
998 - srcHeaders = "Versions/A/Headers"
999 - srcCurrent = "A"
1000 - srcLib = "Versions/A/" + basename
1001 -
1002 - if not os.path.exists(finalHeaders):
1003 - os.symlink(srcHeaders, finalHeaders)
1004 - if not os.path.exists(finalCurrent):
1005 - os.symlink(srcCurrent, finalCurrent)
1006 - if not os.path.exists(finalLib):
1007 - os.symlink(srcLib, finalLib)
1008 -
1009 -
1010 - def get_file_id_by_path(self, f_path):
1011 - for k, v in self.objects.iteritems():
1012 - if str(v.get('path')) == f_path:
1013 - return k
1014 - return 0
1015 -
1016 -
1017 - def remove_file_by_path(self, f_path, recursive=True):
1018 - id = self.get_file_id_by_path(f_path)
1019 - if id != 0:
1020 - self.remove_file(id, recursive=recursive)
1021 - return
1022 -
1023 -
1024 - def remove_file(self, id, recursive=True):
1025 - if not PBXType.IsGuid(id):
1026 - id = id.id
1027 -
1028 - if id in self.objects:
1029 - self.objects.remove(id)
1030 - # Remove from PBXResourcesBuildPhase and PBXSourcesBuildPhase if necessary
1031 - buildFiles = [f for f in self.objects.values() if f.get('isa') == 'PBXBuildFile']
1032 - for buildFile in buildFiles:
1033 - if id == buildFile.get('fileRef'):
1034 - key = buildFile.id
1035 - PBXRBP = [f for f in self.objects.values() if f.get('isa') == 'PBXResourcesBuildPhase']
1036 - PBXSBP = [f for f in self.objects.values() if f.get('isa') == 'PBXSourcesBuildPhase']
1037 - self.objects.remove(key)
1038 - if len(PBXSBP) and PBXSBP[0].has_build_file(key):
1039 - PBXSBP[0].remove_build_file(key)
1040 - if len(PBXRBP) and PBXRBP[0].has_build_file(key):
1041 - PBXRBP[0].remove_build_file(key)
1042 - if recursive:
1043 - groups = [g for g in self.objects.values() if g.get('isa') == 'PBXGroup']
1044 -
1045 - for group in groups:
1046 - if id in group['children']:
1047 - group.remove_child(id)
1048 -
1049 - self.modified = True
1050 -
1051 - def remove_group(self, id, recursive = True):
1052 - if not PBXType.IsGuid(id):
1053 - id = id.id
1054 - name = self.objects.get(id).get('path')
1055 - children = self.objects.get(id).get('children')
1056 - if name is None:
1057 - name = id
1058 - if id in self.objects:
1059 - if recursive:
1060 - for childKey in children:
1061 - childValue = self.objects.get(childKey)
1062 - if childValue.get('isa') == 'PBXGroup':
1063 - self.remove_group(childKey, True)
1064 - else:
1065 - self.remove_file(childKey, False)
1066 -
1067 - self.objects.remove(id);
1068 -
1069 - def remove_group_by_name(self, name, recursive = True):
1070 - groups = self.get_groups_by_name(name)
1071 - if len(groups):
1072 - for group in groups:
1073 - self.remove_group(group.id, recursive)
1074 -
1075 - def move_file(self, id, dest_grp=None):
1076 - pass
1077 -
1078 - def apply_patch(self, patch_path, xcode_path):
1079 - if not os.path.isfile(patch_path) or not os.path.isdir(xcode_path):
1080 - print 'ERROR: couldn\'t apply "%s" to "%s"' % (patch_path, xcode_path)
1081 - return
1082 -
1083 - print 'applying "%s" to "%s"' % (patch_path, xcode_path)
1084 -
1085 - return subprocess.call(['patch', '-p1', '--forward', '--directory=%s' % xcode_path, '--input=%s' % patch_path])
1086 -
1087 - def apply_mods(self, mod_dict, default_path=None):
1088 - if not default_path:
1089 - default_path = os.getcwd()
1090 -
1091 - keys = mod_dict.keys()
1092 -
1093 - for k in keys:
1094 - v = mod_dict.pop(k)
1095 - mod_dict[k.lower()] = v
1096 -
1097 - parent = mod_dict.pop('group', None)
1098 -
1099 - if parent:
1100 - parent = self.get_or_create_group(parent)
1101 -
1102 - excludes = mod_dict.pop('excludes', [])
1103 -
1104 - if excludes:
1105 - excludes = [re.compile(e) for e in excludes]
1106 -
1107 - compiler_flags = mod_dict.pop('compiler_flags', {})
1108 -
1109 - for k, v in mod_dict.items():
1110 - if k == 'patches':
1111 - for p in v:
1112 - if not os.path.isabs(p):
1113 - p = os.path.join(default_path, p)
1114 -
1115 - self.apply_patch(p, self.source_root)
1116 - elif k == 'folders':
1117 - # get and compile excludes list
1118 - # do each folder individually
1119 - for folder in v:
1120 - kwds = {}
1121 -
1122 - # if path contains ':' remove it and set recursive to False
1123 - if ':' in folder:
1124 - args = folder.split(':')
1125 - kwds['recursive'] = False
1126 - folder = args.pop(0)
1127 -
1128 - if os.path.isabs(folder) and os.path.isdir(folder):
1129 - pass
1130 - else:
1131 - folder = os.path.join(default_path, folder)
1132 - if not os.path.isdir(folder):
1133 - continue
1134 -
1135 - if parent:
1136 - kwds['parent'] = parent
1137 -
1138 - if excludes:
1139 - kwds['excludes'] = excludes
1140 -
1141 - self.add_folder(folder, **kwds)
1142 - elif k == 'headerpaths' or k == 'librarypaths':
1143 - paths = []
1144 -
1145 - for p in v:
1146 - if p.endswith('/**'):
1147 - p = os.path.split(p)[0]
1148 -
1149 - if not os.path.isabs(p):
1150 - p = os.path.join(default_path, p)
1151 -
1152 - if not os.path.exists(p):
1153 - continue
1154 -
1155 - p = self.get_relative_path(p)
1156 - paths.append(os.path.join('$(SRCROOT)', p, "**"))
1157 -
1158 - if k == 'headerpaths':
1159 - self.add_header_search_paths(paths)
1160 - else:
1161 - self.add_library_search_paths(paths)
1162 - elif k == 'other_cflags':
1163 - self.add_other_cflags(v)
1164 - elif k == 'other_ldflags':
1165 - self.add_other_ldflags(v)
1166 - elif k == 'libs' or k == 'frameworks' or k == 'files':
1167 - paths = {}
1168 -
1169 - for p in v:
1170 - kwds = {}
1171 -
1172 - if ':' in p:
1173 - args = p.split(':')
1174 - p = args.pop(0)
1175 -
1176 - if 'weak' in args:
1177 - kwds['weak'] = True
1178 -
1179 - file_path = os.path.join(default_path, p)
1180 - search_path, file_name = os.path.split(file_path)
1181 -
1182 - if [m for m in excludes if re.match(m, file_name)]:
1183 - continue
1184 -
1185 - try:
1186 - expr = re.compile(file_name)
1187 - except re.error:
1188 - expr = None
1189 -
1190 - if expr and os.path.isdir(search_path):
1191 - file_list = os.listdir(search_path)
1192 -
1193 - for f in file_list:
1194 - if [m for m in excludes if re.match(m, f)]:
1195 - continue
1196 -
1197 - if re.search(expr, f):
1198 - kwds['name'] = f
1199 - paths[os.path.join(search_path, f)] = kwds
1200 - p = None
1201 -
1202 - if k == 'libs':
1203 - kwds['parent'] = self.get_or_create_group('Libraries', parent=parent)
1204 - elif k == 'frameworks':
1205 - kwds['parent'] = self.get_or_create_group('Frameworks', parent=parent)
1206 -
1207 - if p:
1208 - kwds['name'] = file_name
1209 -
1210 - if k == 'libs':
1211 - p = os.path.join('usr', 'lib', p)
1212 - kwds['tree'] = 'SDKROOT'
1213 - elif k == 'frameworks':
1214 - p = os.path.join('System', 'Library', 'Frameworks', p)
1215 - kwds['tree'] = 'SDKROOT'
1216 - elif k == 'files' and not os.path.exists(file_path):
1217 - # don't add non-existent files to the project.
1218 - continue
1219 -
1220 - paths[p] = kwds
1221 -
1222 - new_files = self.verify_files([n.get('name') for n in paths.values()])
1223 - add_files = [(k, v) for k, v in paths.items() if v.get('name') in new_files]
1224 -
1225 - for path, kwds in add_files:
1226 - kwds.pop('name', None)
1227 -
1228 - if 'parent' not in kwds and parent:
1229 - kwds['parent'] = parent
1230 -
1231 - self.add_file(path, **kwds)
1232 -
1233 - if compiler_flags:
1234 - for k, v in compiler_flags.items():
1235 - filerefs = []
1236 -
1237 - for f in v:
1238 - filerefs.extend([fr.id for fr in self.objects.values() if fr.get('isa') == 'PBXFileReference'
1239 - and fr.get('name') == f])
1240 -
1241 - buildfiles = [bf for bf in self.objects.values() if bf.get('isa') == 'PBXBuildFile'
1242 - and bf.get('fileRef') in filerefs]
1243 -
1244 - for bf in buildfiles:
1245 - if bf.add_compiler_flag(k):
1246 - self.modified = True
1247 -
1248 - def backup(self, file_name=None, backup_name=None):
1249 - if not file_name:
1250 - file_name = self.pbxproj_path
1251 -
1252 - if not backup_name:
1253 - backup_name = "%s.%s.backup" % (file_name, datetime.datetime.now().strftime('%d%m%y-%H%M%S'))
1254 -
1255 - shutil.copy2(file_name, backup_name)
1256 - return backup_name
1257 -
1258 - def save(self, file_name=None, old_format=False, sort=False):
1259 - if old_format :
1260 - self.save_format_xml(file_name)
1261 - else:
1262 - self.save_new_format(file_name, sort)
1263 -
1264 - def save_format_xml(self, file_name=None):
1265 - """Saves in old (xml) format"""
1266 - if not file_name:
1267 - file_name = self.pbxproj_path
1268 -
1269 - # This code is adapted from plistlib.writePlist
1270 - with open(file_name, "w") as f:
1271 - writer = PBXWriter(f)
1272 - writer.writeln("<plist version=\"1.0\">")
1273 - writer.writeValue(self.data)
1274 - writer.writeln("</plist>")
1275 -
1276 - def save_new_format(self, file_name=None, sort=False):
1277 - """Save in Xcode 3.2 compatible (new) format"""
1278 - if not file_name:
1279 - file_name = self.pbxproj_path
1280 -
1281 - # process to get the section's info and names
1282 - objs = self.data.get('objects')
1283 - sections = dict()
1284 - uuids = dict()
1285 -
1286 - for key in objs:
1287 - l = list()
1288 -
1289 - if objs.get(key).get('isa') in sections:
1290 - l = sections.get(objs.get(key).get('isa'))
1291 -
1292 - l.append(tuple([key, objs.get(key)]))
1293 - sections[objs.get(key).get('isa')] = l
1294 -
1295 - if 'name' in objs.get(key):
1296 - uuids[key] = objs.get(key).get('name')
1297 - elif 'path' in objs.get(key):
1298 - uuids[key] = objs.get(key).get('path')
1299 - else:
1300 - if objs.get(key).get('isa') == 'PBXProject':
1301 - uuids[objs.get(key).get('buildConfigurationList')] = 'Build configuration list for PBXProject "Unity-iPhone"'
1302 - elif objs.get(key).get('isa')[0:3] == 'PBX':
1303 - uuids[key] = objs.get(key).get('isa')[3:-10]
1304 - else:
1305 - uuids[key] = 'Build configuration list for PBXNativeTarget "TARGET_NAME"'
1306 -
1307 - ro = self.data.get('rootObject')
1308 - uuids[ro] = 'Project object'
1309 -
1310 - for key in objs:
1311 - # transitive references (used in the BuildFile section)
1312 - if 'fileRef' in objs.get(key) and objs.get(key).get('fileRef') in uuids:
1313 - uuids[key] = uuids[objs.get(key).get('fileRef')]
1314 -
1315 - # transitive reference to the target name (used in the Native target section)
1316 - if objs.get(key).get('isa') == 'PBXNativeTarget':
1317 - uuids[objs.get(key).get('buildConfigurationList')] = uuids[objs.get(key).get('buildConfigurationList')].replace('TARGET_NAME', uuids[key])
1318 -
1319 - self.uuids = uuids
1320 - self.sections = sections
1321 -
1322 - out = open(file_name, 'w')
1323 - out.write('// !$*UTF8*$!\n')
1324 - self._printNewXCodeFormat(out, self.data, '', enters=True, sort=sort)
1325 - out.close()
1326 -
1327 - @classmethod
1328 - def addslashes(cls, s):
1329 - d = {'"': '\\"', "'": "\\'", "\0": "\\\0", "\\": "\\\\", "\n":"\\n"}
1330 - return ''.join(d.get(c, c) for c in s)
1331 -
1332 - def _printNewXCodeFormat(self, out, root, deep, enters=True, sort=False):
1333 - if isinstance(root, IterableUserDict):
1334 - out.write('{')
1335 -
1336 - if enters:
1337 - out.write('\n')
1338 -
1339 - isa = root.pop('isa', '')
1340 -
1341 - if isa != '': # keep the isa in the first spot
1342 - if enters:
1343 - out.write('\t' + deep)
1344 -
1345 - out.write('isa = ')
1346 - self._printNewXCodeFormat(out, isa, '\t' + deep, enters=enters)
1347 - out.write(';')
1348 -
1349 - if enters:
1350 - out.write('\n')
1351 - else:
1352 - out.write(' ')
1353 -
1354 - for key in sorted(root.iterkeys()): # keep the same order as Apple.
1355 - if enters:
1356 - out.write('\t' + deep)
1357 -
1358 - if re.match(regex, key).group(0) == key:
1359 - out.write(key.encode("utf-8") + ' = ')
1360 - else:
1361 - out.write('"' + key.encode("utf-8") + '" = ')
1362 -
1363 - if key == 'objects':
1364 - out.write('{') # open the objects section
1365 -
1366 - if enters:
1367 - out.write('\n')
1368 - #root.remove('objects') # remove it to avoid problems
1369 -
1370 - sections = [
1371 - ('PBXBuildFile', False),
1372 - ('PBXCopyFilesBuildPhase', True),
1373 - ('PBXFileReference', False),
1374 - ('PBXFrameworksBuildPhase', True),
1375 - ('PBXGroup', True),
1376 - ('PBXAggregateTarget', True),
1377 - ('PBXNativeTarget', True),
1378 - ('PBXProject', True),
1379 - ('PBXResourcesBuildPhase', True),
1380 - ('PBXShellScriptBuildPhase', True),
1381 - ('PBXSourcesBuildPhase', True),
1382 - ('XCBuildConfiguration', True),
1383 - ('XCConfigurationList', True),
1384 - ('PBXTargetDependency', True),
1385 - ('PBXVariantGroup', True),
1386 - ('PBXReferenceProxy', True),
1387 - ('PBXContainerItemProxy', True),
1388 - ('XCVersionGroup', True)]
1389 -
1390 - for section in sections: # iterate over the sections
1391 - if self.sections.get(section[0]) is None:
1392 - continue
1393 -
1394 - out.write('\n/* Begin %s section */' % section[0].encode("utf-8"))
1395 - self.sections.get(section[0]).sort(cmp=lambda x, y: cmp(x[0], y[0]))
1396 -
1397 - if sort and section[0] == 'PBXGroup':
1398 - for entry in self.sections.get(section[0]):
1399 - entry[1]['children'] = sorted(entry[1]['children'],
1400 - key=lambda x: self.uuids[x].encode("utf-8"))
1401 -
1402 - for pair in self.sections.get(section[0]):
1403 - key = pair[0]
1404 - value = pair[1]
1405 - out.write('\n')
1406 -
1407 - if enters:
1408 - out.write('\t\t' + deep)
1409 -
1410 - out.write(key.encode("utf-8"))
1411 -
1412 - if key in self.uuids:
1413 - out.write(" /* " + self.uuids[key].encode("utf-8") + " */")
1414 -
1415 - out.write(" = ")
1416 - self._printNewXCodeFormat(out, value, '\t\t' + deep, enters=section[1])
1417 - out.write(';')
1418 -
1419 - out.write('\n/* End %s section */\n' % section[0].encode("utf-8"))
1420 -
1421 - out.write(deep + '\t}') # close of the objects section
1422 - else:
1423 - self._printNewXCodeFormat(out, root[key], '\t' + deep, enters=enters)
1424 -
1425 - out.write(';')
1426 -
1427 - if enters:
1428 - out.write('\n')
1429 - else:
1430 - out.write(' ')
1431 -
1432 - root['isa'] = isa # restore the isa for further calls
1433 -
1434 - if enters:
1435 - out.write(deep)
1436 -
1437 - out.write('}')
1438 -
1439 - elif isinstance(root, UserList):
1440 - out.write('(')
1441 -
1442 - if enters:
1443 - out.write('\n')
1444 -
1445 - for value in root:
1446 - if enters:
1447 - out.write('\t' + deep)
1448 -
1449 - self._printNewXCodeFormat(out, value, '\t' + deep, enters=enters)
1450 - out.write(',')
1451 -
1452 - if enters:
1453 - out.write('\n')
1454 -
1455 - if enters:
1456 - out.write(deep)
1457 -
1458 - out.write(')')
1459 -
1460 - else:
1461 - if len(root) > 0 and re.match(regex, root).group(0) == root:
1462 - out.write(root.encode("utf-8"))
1463 - else:
1464 - out.write('"' + XcodeProject.addslashes(root.encode("utf-8")) + '"')
1465 -
1466 - if root in self.uuids:
1467 - out.write(" /* " + self.uuids[root].encode("utf-8") + " */")
1468 -
1469 - @classmethod
1470 - def Load(cls, path, pure_python=False):
1471 - if pure_python:
1472 - import openstep_parser as osp
1473 - tree = osp.OpenStepDecoder.ParseFromFile(open(path, 'r'))
1474 - else:
1475 - cls.plutil_path = os.path.join(os.path.split(__file__)[0], 'plutil')
1476 -
1477 - if not os.path.isfile(XcodeProject.plutil_path):
1478 - cls.plutil_path = 'plutil'
1479 -
1480 - # load project by converting to xml and then convert that using plistlib
1481 - p = subprocess.Popen([XcodeProject.plutil_path, '-convert', 'xml1', '-o', '-', path], stdout=subprocess.PIPE)
1482 - stdout, stderr = p.communicate()
1483 -
1484 - # If the plist was malformed, return code will be non-zero
1485 - if p.returncode != 0:
1486 - print stdout
1487 - return None
1488 -
1489 - tree = plistlib.readPlistFromString(stdout)
1490 -
1491 - return XcodeProject(tree, path)
1492 -
1493 - @classmethod
1494 - def LoadFromXML(cls, path):
1495 - tree = plistlib.readPlist(path)
1496 - return XcodeProject(tree, path)
1497 -
1498 -
1499 -# The code below was adapted from plistlib.py.
1500 -
1501 -class PBXWriter(plistlib.PlistWriter):
1502 - def writeValue(self, value):
1503 - if isinstance(value, (PBXList, PBXDict)):
1504 - plistlib.PlistWriter.writeValue(self, value.data)
1505 - else:
1506 - plistlib.PlistWriter.writeValue(self, value)
1507 -
1508 - def simpleElement(self, element, value=None):
1509 - """
1510 - We have to override this method to deal with Unicode text correctly.
1511 - Non-ascii characters have to get encoded as character references.
1512 - """
1513 - if value is not None:
1514 - value = _escapeAndEncode(value)
1515 - self.writeln("<%s>%s</%s>" % (element, value, element))
1516 - else:
1517 - self.writeln("<%s/>" % element)
1518 -
1519 -
1520 -# Regex to find any control chars, except for \t \n and \r
1521 -_controlCharPat = re.compile(
1522 - r"[\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0c\x0e\x0f"
1523 - r"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]")
1524 -
1525 -
1526 -def _escapeAndEncode(text):
1527 - m = _controlCharPat.search(text)
1528 - if m is not None:
1529 - raise ValueError("strings can't contains control characters; "
1530 - "use plistlib.Data instead")
1531 - text = text.replace("\r\n", "\n") # convert DOS line endings
1532 - text = text.replace("\r", "\n") # convert Mac line endings
1533 - text = text.replace("&", "&amp;") # escape '&'
1534 - text = text.replace("<", "&lt;") # escape '<'
1535 - text = text.replace(">", "&gt;") # escape '>'
1536 - return text.encode("ascii", "xmlcharrefreplace") # encode as ascii with xml character references
No preview for this file type
1 -import os
2 -
3 -import commands
4 -
5 -
6 -buildProjName = ''
7 -targetName = ''
8 -import shutil
9 -import os
10 -
11 -def buildProj():
12 -
13 - if buildProjName == '':
14 - print('buildProjName is not define')
15 -
16 - else:
17 - #build project
18 - print('start build proj')
19 - commands.getstatusoutput('xcodebuild -project ' + buildProjName + '.xcodeproj')
20 - releaseDir = os.path.abspath('.') + '/Release'
21 - if not os.path.exists(releaseDir):
22 - os.mkdir(releaseDir)
23 -
24 - ipaPath = releaseDir + '/' + buildProjName + '-Release.ipa'
25 - buildPath = os.path.abspath('.') + '/build'
26 - if os.path.exists(ipaPath):
27 - os.remove(ipaPath)
28 -
29 - resultStr = commands.getstatusoutput('xcrun -sdk iphoneos PackageApplication -v build/Release-iphoneos/' + targetName + '.app -o ' +ipaPath)
30 - #print(resultStr)
31 -
32 - if os.path.exists(buildPath):
33 - shutil.rmtree(buildPath)
34 -
No preview for this file type
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
5 <key>CFBundleDevelopmentRegion</key> 5 <key>CFBundleDevelopmentRegion</key>
6 <string>en</string> 6 <string>en</string>
7 <key>CFBundleDisplayName</key> 7 <key>CFBundleDisplayName</key>
8 - <string>海南游爱DEMO</string> 8 + <string>神手DEMO</string>
9 <key>CFBundleExecutable</key> 9 <key>CFBundleExecutable</key>
10 <string>$(EXECUTABLE_NAME)</string> 10 <string>$(EXECUTABLE_NAME)</string>
11 <key>CFBundleIdentifier</key> 11 <key>CFBundleIdentifier</key>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
17 <key>CFBundlePackageType</key> 17 <key>CFBundlePackageType</key>
18 <string>APPL</string> 18 <string>APPL</string>
19 <key>CFBundleShortVersionString</key> 19 <key>CFBundleShortVersionString</key>
20 - <string>1.1.408</string> 20 + <string>1.0</string>
21 <key>CFBundleSignature</key> 21 <key>CFBundleSignature</key>
22 <string>????</string> 22 <string>????</string>
23 <key>CFBundleURLTypes</key> 23 <key>CFBundleURLTypes</key>
......
1 #include "SDKInterface.h" 1 #include "SDKInterface.h"
2 #import <UIKit/UIKit.h> 2 #import <UIKit/UIKit.h>
3 3
4 -#import "Hierophant/HierophantAllManager.h" 4 +#import "HaiBaoJuheSDK/EEEE_CalendarAllManager_FFFF.h"
5 -#import "Hierophant/HierophantHuiTiaoNotification.h" 5 +#import "HaiBaoJuheSDK/UUUU_CalendarHuiTiaoNotification_VVVV.h"
6 -#import "Hierophant/HierophantInformation.h" 6 +#import "HaiBaoJuheSDK/IIII_CalendarInformation_JJJJ.h"
7 -
8 -#import "TrackingIO.h"
9 7
10 @implementation SDKInterface : Interface 8 @implementation SDKInterface : Interface
11 9
12 int mExchange; 10 int mExchange;
13 -NSString *HierophantAppId; 11 +NSString *CalendarAppId;
14 -NSString *HierophantAppKey; 12 +NSString *CalendarAppKey;
15 -NSString *HierophantLeakOrderUrl; 13 +NSString *CalendarLeakOrderUrl;
16 14
17 - (void)SDKinit:(UIViewController *) control 15 - (void)SDKinit:(UIViewController *) control
18 { 16 {
19 17
20 [super SDKinit:control]; 18 [super SDKinit:control];
21 19
22 - [HaiBaoJuheConfig getInstance]; 20 + [AAAA_HaiBaoJuheConfig_BBBB CCCC_getInstance_DDDD];
23 - [[HierophantAllManager HierophantInstance]HierophantChuShiHua]; 21 + [[EEEE_CalendarAllManager_FFFF GGGG_CalendarInstance_HHHH]IIII_CalendarChuShiHua_JJJJ];
24 - [[HierophantAllManager HierophantInstance]HierophantYangShi:@"sdk"]; 22 + [[EEEE_CalendarAllManager_FFFF GGGG_CalendarInstance_HHHH]KKKK_CalendarYangShi_LLLL:@"sdk"];
25 - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:HierophantLoginNotification object:nil]; 23 + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:AAAA_CalendarLoginNotification_BBBB object:nil];
26 - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"HierophantToolCallBack" object:nil]; 24 + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"CalendarToolCallBack" object:nil];
27 25
28 - [[HaiBaoJuheChecker getInstance] sendNotice:HaiBaoJuheSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:HaiBaoJuheSDK_NO_ERROR description:@"initSuccess" extendData:nil]; 26 + [[OOOO_HaiBaoJuheChecker_PPPP QQQQ_getInstance_RRRR] sendNotice:HaiBaoJuheSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:HaiBaoJuheSDK_NO_ERROR description:@"initSuccess" extendData:nil];
29 27
30 - NSString* channelId = [[HaiBaoJuheConfig getInstance] getValueByKey:@"gamechannelid"]; 28 + NSString* channelId = [[AAAA_HaiBaoJuheConfig_BBBB CCCC_getInstance_DDDD] EEEE_getValueByKey_FFFF:@"gamechannelid"];
31 if(channelId == nil || [channelId length] <= 0){ 29 if(channelId == nil || [channelId length] <= 0){
32 channelId = @"unknown"; 30 channelId = @"unknown";
33 } 31 }
34 - [TrackingIO initWithappKey:[[HaiBaoJuheConfig getInstance] getValueByKey:@"renyunAppKey"] withChannelId:channelId];
35 } 32 }
36 33
37 /** 34 /**
...@@ -40,9 +37,9 @@ NSString *HierophantLeakOrderUrl; ...@@ -40,9 +37,9 @@ NSString *HierophantLeakOrderUrl;
40 - (void)SDKloginSDK 37 - (void)SDKloginSDK
41 { 38 {
42 //APPID APPKEY 39 //APPID APPKEY
43 - HierophantAppId = [[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_ID"]; 40 + CalendarAppId = [[AAAA_HaiBaoJuheConfig_BBBB CCCC_getInstance_DDDD] EEEE_getValueByKey_FFFF:@"APP_ID"];
44 - HierophantAppKey =[[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_KEY"]; 41 + CalendarAppKey =[[AAAA_HaiBaoJuheConfig_BBBB CCCC_getInstance_DDDD] EEEE_getValueByKey_FFFF:@"APP_KEY"];
45 - [[HierophantAllManager HierophantInstance]HierophantDengLu:HierophantAppId :HierophantAppKey :self.controller]; 42 + [[EEEE_CalendarAllManager_FFFF GGGG_CalendarInstance_HHHH]SSSS_CalendarDengLu_TTTT:CalendarAppId :CalendarAppKey :self.controller];
46 43
47 } 44 }
48 45
...@@ -53,12 +50,12 @@ NSString *HierophantLeakOrderUrl; ...@@ -53,12 +50,12 @@ NSString *HierophantLeakOrderUrl;
53 { 50 {
54 NSLog(@"loginchek"); 51 NSLog(@"loginchek");
55 HaiBaoJuheLoginInfo *loginInfo = [HaiBaoJuheLoginInfo alloc]; 52 HaiBaoJuheLoginInfo *loginInfo = [HaiBaoJuheLoginInfo alloc];
56 - loginInfo.openId = [[HierophantInformation getInstance]openId]; 53 + loginInfo.openId = [[IIII_CalendarInformation_JJJJ getInstance]openId];
57 - loginInfo.sign = [[HierophantInformation getInstance] token]; 54 + loginInfo.sign = [[IIII_CalendarInformation_JJJJ getInstance] token];
58 - loginInfo.timestamp = [[HierophantInformation getInstance] timestamp]; 55 + loginInfo.timestamp = [[IIII_CalendarInformation_JJJJ getInstance] timestamp];
59 56
60 dispatch_async(dispatch_get_global_queue(0, 0), ^{ 57 dispatch_async(dispatch_get_global_queue(0, 0), ^{
61 - [[HaiBaoJuheChecker getInstance] startCheck:loginInfo]; 58 + [[OOOO_HaiBaoJuheChecker_PPPP QQQQ_getInstance_RRRR] startCheck:loginInfo];
62 }); 59 });
63 60
64 } 61 }
...@@ -82,7 +79,7 @@ NSString *HierophantLeakOrderUrl; ...@@ -82,7 +79,7 @@ NSString *HierophantLeakOrderUrl;
82 - (void)HCKAssetsToolCallBack:(NSNotification *)notification 79 - (void)HCKAssetsToolCallBack:(NSNotification *)notification
83 { 80 {
84 NSDictionary* payResultDic = notification.object; 81 NSDictionary* payResultDic = notification.object;
85 - NSString* receiptStr = [payResultDic objectForKey:@"HierophantToolResult"]; 82 + NSString* receiptStr = [payResultDic objectForKey:@"CalendarToolResult"];
86 NSString* queryId = [payResultDic objectForKey:@"query_id"]; 83 NSString* queryId = [payResultDic objectForKey:@"query_id"];
87 84
88 //收到回调,保存queryid和data 85 //收到回调,保存queryid和data
...@@ -101,9 +98,10 @@ NSString *HierophantLeakOrderUrl; ...@@ -101,9 +98,10 @@ NSString *HierophantLeakOrderUrl;
101 [userDefaults setObject:receiptStr forKey:queryId]; 98 [userDefaults setObject:receiptStr forKey:queryId];
102 99
103 NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil]; 100 NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
104 - NSString* result = [[NetCenter getInstance] httpPostSyn:HierophantLeakOrderUrl :receiptDic]; 101 + NSString* result = [[NetCenter getInstance] httpPostSyn:CalendarLeakOrderUrl :receiptDic];
105 102
106 if([@"success" isEqualToString:result]){//确认订单成功 103 if([@"success" isEqualToString:result]){//确认订单成功
104 + [[OOOO_HaiBaoJuheChecker_PPPP QQQQ_getInstance_RRRR] sendNotice:HaiBaoJuheSDKNotificationGzyazf notiName:@"success" statusCode:HaiBaoJuheSDK_NO_ERROR description:@"success" extendData:nil];
107 //删除已保存的 105 //删除已保存的
108 [userDefaults removeObjectForKey:queryId]; 106 [userDefaults removeObjectForKey:queryId];
109 [tempQueryIdArray removeObject:queryId]; 107 [tempQueryIdArray removeObject:queryId];
...@@ -121,11 +119,11 @@ NSString *HierophantLeakOrderUrl; ...@@ -121,11 +119,11 @@ NSString *HierophantLeakOrderUrl;
121 NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults]; 119 NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
122 NSString* lastqueryid = [userDefaults objectForKey:@"lastqueryid"]; 120 NSString* lastqueryid = [userDefaults objectForKey:@"lastqueryid"];
123 121
124 - HierophantLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@", 122 + CalendarLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
125 - [HaiBaoJuheUtils createGzyazfUrl], 123 + [MMMM_HaiBaoJuheUtils_NNNN AAAA_createGzyazfUrl_BBBB],
126 [payInfo userId], 124 [payInfo userId],
127 [payInfo playerId]]; 125 [payInfo playerId]];
128 - [userDefaults setObject:HierophantLeakOrderUrl forKey:@"lastHierophantLeakOrderUrl"]; 126 + [userDefaults setObject:CalendarLeakOrderUrl forKey:@"lastCalendarLeakOrderUrl"];
129 127
130 if (lastqueryid!=nil) { 128 if (lastqueryid!=nil) {
131 //创建订单前进行补单 129 //创建订单前进行补单
...@@ -135,7 +133,7 @@ NSString *HierophantLeakOrderUrl; ...@@ -135,7 +133,7 @@ NSString *HierophantLeakOrderUrl;
135 receiptStr = [receiptStr stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]; 133 receiptStr = [receiptStr stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
136 //如果不为空,进行最后一次补单 134 //如果不为空,进行最后一次补单
137 NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",lastqueryid,@"query_id", nil]; 135 NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",lastqueryid,@"query_id", nil];
138 - NSString* result = [[NetCenter getInstance] httpPostSyn:HierophantLeakOrderUrl :receiptDic]; 136 + NSString* result = [[NetCenter getInstance] httpPostSyn:CalendarLeakOrderUrl :receiptDic];
139 if([@"success" isEqualToString:result]){//确认订单成功 137 if([@"success" isEqualToString:result]){//确认订单成功
140 //删除已保存的 138 //删除已保存的
141 [userDefaults removeObjectForKey:@"lastqueryid"]; 139 [userDefaults removeObjectForKey:@"lastqueryid"];
...@@ -145,8 +143,8 @@ NSString *HierophantLeakOrderUrl; ...@@ -145,8 +143,8 @@ NSString *HierophantLeakOrderUrl;
145 143
146 mExchange = [payInfo exchange].intValue; 144 mExchange = [payInfo exchange].intValue;
147 [super SDKgzyazfWithGzyazfmentInfo:payInfo]; 145 [super SDKgzyazfWithGzyazfmentInfo:payInfo];
148 - HierophantLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@", 146 + CalendarLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
149 - [HaiBaoJuheUtils createGzyazfUrl], 147 + [MMMM_HaiBaoJuheUtils_NNNN AAAA_createGzyazfUrl_BBBB],
150 [payInfo userId], 148 [payInfo userId],
151 [payInfo playerId]]; 149 [payInfo playerId]];
152 [userDefaults synchronize]; 150 [userDefaults synchronize];
...@@ -165,13 +163,10 @@ NSString *HierophantLeakOrderUrl; ...@@ -165,13 +163,10 @@ NSString *HierophantLeakOrderUrl;
165 NSString* reportType = [reportInfo reportType]; 163 NSString* reportType = [reportInfo reportType];
166 if (reportInfo) { 164 if (reportInfo) {
167 if ([reportType isEqualToString:REPORT_ENTER]) { 165 if ([reportType isEqualToString:REPORT_ENTER]) {
168 - [TrackingIO setLoginWithAccountID:[reportInfo playerId]];
169 -
170 dispatch_async(dispatch_get_global_queue(0, 0), ^{ 166 dispatch_async(dispatch_get_global_queue(0, 0), ^{
171 [self handlerLeakOrder]; 167 [self handlerLeakOrder];
172 }); 168 });
173 }else if ([reportType isEqualToString:REPORT_CREATEROLE]){ 169 }else if ([reportType isEqualToString:REPORT_CREATEROLE]){
174 - [TrackingIO setRegisterWithAccountID:[reportInfo playerId]];
175 } 170 }
176 } 171 }
177 } 172 }
...@@ -212,12 +207,12 @@ NSString *HierophantLeakOrderUrl; ...@@ -212,12 +207,12 @@ NSString *HierophantLeakOrderUrl;
212 for (NSString* queryId in queryIdArray) { 207 for (NSString* queryId in queryIdArray) {
213 NSString* receiptStr = [userDefaults valueForKey:queryId]; 208 NSString* receiptStr = [userDefaults valueForKey:queryId];
214 NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil]; 209 NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
215 - NSString* lastHierophantLeakOrderUrl = [userDefaults objectForKey:@"lastHierophantLeakOrderUrl"]; 210 + NSString* lastCalendarLeakOrderUrl = [userDefaults objectForKey:@"lastCalendarLeakOrderUrl"];
216 NSString* result; 211 NSString* result;
217 - if (lastHierophantLeakOrderUrl!=nil) { 212 + if (lastCalendarLeakOrderUrl!=nil) {
218 - result = [[NetCenter getInstance] httpPostSyn:lastHierophantLeakOrderUrl :receiptDic]; 213 + result = [[NetCenter getInstance] httpPostSyn:lastCalendarLeakOrderUrl :receiptDic];
219 }else{ 214 }else{
220 - result = [[NetCenter getInstance] httpPostSyn:[HaiBaoJuheUtils createGzyazfUrl] :receiptDic]; 215 + result = [[NetCenter getInstance] httpPostSyn:[MMMM_HaiBaoJuheUtils_NNNN AAAA_createGzyazfUrl_BBBB] :receiptDic];
221 } 216 }
222 if([@"success" isEqualToString:result]){//成功 217 if([@"success" isEqualToString:result]){//成功
223 [userDefaults removeObjectForKey:queryId]; 218 [userDefaults removeObjectForKey:queryId];
...@@ -239,34 +234,25 @@ NSString *HierophantLeakOrderUrl; ...@@ -239,34 +234,25 @@ NSString *HierophantLeakOrderUrl;
239 - (void)receiveCreateOrder:(NSNotification *)notification 234 - (void)receiveCreateOrder:(NSNotification *)notification
240 { 235 {
241 NSLog(@"创建订单成功"); 236 NSLog(@"创建订单成功");
242 - HaiBaoJuheGzyazfInfo *payInfo = [notification object]; 237 + AAAA_HaiBaoJuheGzyazfInfo_BBBB *payInfo = [notification object];
243 238
244 - NSNumber *amount = @([[payInfo postAmount] integerValue] * mExchange);
245 - NSString *serverId = [payInfo serverId];
246 - NSString *roleName = [payInfo playerName];
247 NSString *queryId = [payInfo queryId]; 239 NSString *queryId = [payInfo queryId];
248 240
249 dispatch_async(dispatch_get_global_queue(0, 0), ^{ 241 dispatch_async(dispatch_get_global_queue(0, 0), ^{
250 [self handlerLeakOrder]; 242 [self handlerLeakOrder];
251 }); 243 });
252 244
253 - NSString *other = [payInfo other];
254 -
255 - if (other && [other length] > 0) {
256 - [[HierophantAllManager HierophantInstance] HierophantQuery:serverId :roleName :amount :[payInfo queryId] :self.controller :[payInfo serverName]];
257 - }else{
258 NSString* products = [payInfo products]; 245 NSString* products = [payInfo products];
259 //保存订单号到本地 246 //保存订单号到本地
260 NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults]; 247 NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
261 [userDefaults setObject:queryId forKey:@"lastqueryid"]; 248 [userDefaults setObject:queryId forKey:@"lastqueryid"];
262 [userDefaults synchronize]; 249 [userDefaults synchronize];
263 - [[HierophantAllManager HierophantInstance] HierophantQueryOperation:self.controller HierophantHuoWuID:products HierophantJiaGe:[payInfo postAmount] HierophantHuoWuMing:[payInfo productName] HierophantDingDanHao:queryId]; 250 + [[EEEE_CalendarAllManager_FFFF GGGG_CalendarInstance_HHHH] CalendarQueryOperation:self.controller CalendarHuoWuID:products CalendarJiaGe:[payInfo postAmount] CalendarHuoWuMing:[payInfo productName] CalendarDingDanHao:queryId];
264 - } 251 +
265 } 252 }
266 253
267 -(void)paymentSuccess:(NSString *)accountId orderId:(NSString *)orderId currencyAmount:(double)amount currencyType:(NSString *)currencyType payType:(NSString *)payType custom:(NSArray *)customArray 254 -(void)paymentSuccess:(NSString *)accountId orderId:(NSString *)orderId currencyAmount:(double)amount currencyType:(NSString *)currencyType payType:(NSString *)payType custom:(NSArray *)customArray
268 { 255 {
269 - [TrackingIO setPayment:orderId paymentType:payType currentType:currencyType currencyAmount:amount];
270 } 256 }
271 257
272 @end 258 @end
......
1 -//
2 -// NewTtack.h
3 -// NewTtack
4 -//
5 -// Created by yun on 16/1/11.
6 -// Copyright © 2016年 yun. All rights reserved.
7 -//
8 -#define TRACK_VERSION @"1.0.1"
9 -
10 -#import <Foundation/Foundation.h>
11 -#import <UIKit/UIKit.h>
12 -
13 -
14 -/*
15 - 热云移动广告效果监测 平台 api 请选择对应的api进行使用
16 - */
17 -NS_ASSUME_NONNULL_BEGIN
18 -@interface TrackingIO : NSObject
19 -//开启打印日志 正式上线包请关掉
20 -+(void) setPrintLog :(BOOL)print;
21 -// 开启数据统计
22 -+ (void)initWithappKey:(NSString *)appKey withChannelId:(NSString *)channelId;
23 -//注册成功后调用
24 -+ (void)setRegisterWithAccountID:(NSString *)account;
25 -//登陆成功后调用
26 -+ (void)setLoginWithAccountID:(NSString *)account;
27 -//开始付费时 调用(人民币单位是元)
28 -+(void)setPaymentStart:(NSString *)transactionId paymentType:(NSString*)paymentType currentType:(NSString*)currencyType currencyAmount:(float)currencyAmount;
29 -// 支付完成,付费分析,记录玩家充值的金额(人民币单位是元)
30 -+(void)setPayment:(NSString *)transactionId paymentType:(NSString*)paymentType currentType:(NSString*)currencyType currencyAmount:(float)currencyAmount;
31 -//自定义事件
32 -+(void)setEvent:(NSString *)eventName andExtra:(nullable NSDictionary *)extra;
33 -//标准接口
34 -+(void)setProfile:(NSDictionary *)dataDic;
35 -//获取设备信息
36 -+(NSString*)getDeviceId;
37 -@end
38 -NS_ASSUME_NONNULL_END
1 -{"renyunAppKey": "", "payorderurl": "https://public.sdk.haibaoyouxi.com/paycheck/create", "usertype": 527, "sdkSimpleName": "apple_hainanyouai", "gamechannelid": "", "APP_KEY": "3ffc998a226aded345f668fe3b6d1f39", "custom": "{}", "sdkVersionCode": "V1_2", "loginCheckUrl": "https://public.sdk.haibaoyouxi.com/logincheck/check", "appScheme": "com.IOshv.hlTcv", "c2": "", "c1": "", "APP_ID": "5c6e4b4448d88d469e322b8a", "paycheckurl": "https://public.sdk.haibaoyouxi.com/paycheck/confirm", "gameSimpleName": "dqqmzz"}
1 +{"payorderurl": "https://pay.public.hkleyougame.com/paycheck/create", "usertype": 5, "sdkSimpleName": "apple_leyou", "gamechannelid": "", "APP_KEY": "b1b13ca8609d29036ceae3c565647d6a", "custom": "{}","logReportUrl": "https://statistic.public.hkleyougame.com/sdk/statistic", "encode": "0", "sdkVersionCode": "V1_2", "loginCheckUrl": "https://login.public.hkleyougame.com/logincheck/check", "appScheme": "com.xxx.xxx11", "descode": "12345678", "c2": "", "c1": "", "APP_ID": "5cecee0487192a3460670102", "paycheckurl": "https://pay.public.hkleyougame.com/paycheck/confirm", "gameSimpleName": "fytx_test"}
1 -#海外SDK
...\ No newline at end of file ...\ No newline at end of file
1 +新接入请参考对接文档和demo<br>
2 +
3 +## 曾接入公共SDK的快速更新 聚合SDK <br>
4 +1、``` 删除poolsdk_file文件夹中原来framework ``` <br>
5 +3、``` 替换SDKInterface.m文件 ``` <br>
6 +4、``` 删除 PoolSdk.framework ``` <br>
7 +5、``` 引入HaiBaoJuheSDK.framework ``` <br>
8 +6、``` 原pool_setting文件 替换成新 pt_config 文件 ``` <br>
9 +7、``` 所有接口PoolSdk 替换成 HaiBaoJuheSDK(如不理解可以参考demo或者详细文档) ```
...\ No newline at end of file ...\ No newline at end of file
......
No preview for this file type
1 -channelRootPath = "poolsdk_file"
2 -gameProjName = 'Demo'
...\ No newline at end of file ...\ No newline at end of file
1 -# Copyright 2012 Calvin Rien
2 -#
3 -# Licensed under the Apache License, Version 2.0 (the "License");
4 -# you may not use this file except in compliance with the License.
5 -# You may obtain a copy of the License at
6 -#
7 -# http://www.apache.org/licenses/LICENSE-2.0
8 -#
9 -# Unless required by applicable law or agreed to in writing, software
10 -# distributed under the License is distributed on an "AS IS" BASIS,
11 -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 -# See the License for the specific language governing permissions and
13 -# limitations under the License.
14 -
15 -# A pbxproj file is an OpenStep format plist
16 -# {} represents dictionary of key=value pairs delimited by ;
17 -# () represents list of values delimited by ,
18 -# file starts with a comment specifying the character type
19 -# // !$*UTF8*$!
20 -
21 -# when adding a file to a project, create the PBXFileReference
22 -# add the PBXFileReference's guid to a group
23 -# create a PBXBuildFile with the PBXFileReference's guid
24 -# add the PBXBuildFile to the appropriate build phase
25 -
26 -# when adding a header search path add
27 -# HEADER_SEARCH_PATHS = "path/**";
28 -# to each XCBuildConfiguration object
29 -
30 -# Xcode4 will read either a OpenStep or XML plist.
31 -# this script uses `plutil` to validate, read and write
32 -# the pbxproj file. Plutil is available in OS X 10.2 and higher
33 -# Plutil can't write OpenStep plists, so I save as XML
34 -
35 -import datetime
36 -import json
37 -import ntpath
38 -import os
39 -import plistlib
40 -import re
41 -import shutil
42 -import subprocess
43 -import uuid
44 -
45 -from UserDict import IterableUserDict
46 -from UserList import UserList
47 -
48 -regex = '[a-zA-Z0-9\\._/-]*'
49 -
50 -
51 -class PBXEncoder(json.JSONEncoder):
52 - def default(self, obj):
53 - """Tests the input object, obj, to encode as JSON."""
54 -
55 - if isinstance(obj, (PBXList, PBXDict)):
56 - return obj.data
57 -
58 - return json.JSONEncoder.default(self, obj)
59 -
60 -
61 -class PBXDict(IterableUserDict):
62 - def __init__(self, d=None):
63 - if d:
64 - d = dict([(PBXType.Convert(k), PBXType.Convert(v)) for k, v in d.items()])
65 -
66 - IterableUserDict.__init__(self, d)
67 -
68 - def __setitem__(self, key, value):
69 - IterableUserDict.__setitem__(self, PBXType.Convert(key), PBXType.Convert(value))
70 -
71 - def remove(self, key):
72 - self.data.pop(PBXType.Convert(key), None)
73 -
74 -
75 -class PBXList(UserList):
76 - def __init__(self, l=None):
77 - if isinstance(l, basestring):
78 - UserList.__init__(self)
79 - self.add(l)
80 - return
81 - elif l:
82 - l = [PBXType.Convert(v) for v in l]
83 -
84 - UserList.__init__(self, l)
85 -
86 - def add(self, value):
87 - value = PBXType.Convert(value)
88 -
89 - if value in self.data:
90 - return False
91 -
92 - self.data.append(value)
93 - return True
94 -
95 - def remove(self, value):
96 - value = PBXType.Convert(value)
97 -
98 - if value in self.data:
99 - self.data.remove(value)
100 - return True
101 - return False
102 -
103 - def __setitem__(self, key, value):
104 - UserList.__setitem__(self, PBXType.Convert(key), PBXType.Convert(value))
105 -
106 -
107 -class PBXType(PBXDict):
108 - def __init__(self, d=None):
109 - PBXDict.__init__(self, d)
110 -
111 - if 'isa' not in self:
112 - self['isa'] = self.__class__.__name__
113 - self.id = None
114 -
115 - @staticmethod
116 - def Convert(o):
117 - if isinstance(o, list):
118 - return PBXList(o)
119 - elif isinstance(o, dict):
120 - isa = o.get('isa')
121 -
122 - if not isa:
123 - return PBXDict(o)
124 -
125 - cls = globals().get(isa)
126 -
127 - if cls and issubclass(cls, PBXType):
128 - return cls(o)
129 -
130 - print 'warning: unknown PBX type: %s' % isa
131 - return PBXDict(o)
132 - else:
133 - return o
134 -
135 - @staticmethod
136 - def IsGuid(o):
137 - return re.match('^[A-F0-9]{24}$', str(o))
138 -
139 - @classmethod
140 - def GenerateId(cls):
141 - return ''.join(str(uuid.uuid4()).upper().split('-')[1:])
142 -
143 - @classmethod
144 - def Create(cls, *args, **kwargs):
145 - return cls(*args, **kwargs)
146 -
147 -
148 -class PBXFileReference(PBXType):
149 - def __init__(self, d=None):
150 - PBXType.__init__(self, d)
151 - self.build_phase = None
152 -
153 - types = {
154 - '.a': ('archive.ar', 'PBXFrameworksBuildPhase'),
155 - '.app': ('wrapper.application', None),
156 - '.s': ('sourcecode.asm', 'PBXSourcesBuildPhase'),
157 - '.c': ('sourcecode.c.c', 'PBXSourcesBuildPhase'),
158 - '.cpp': ('sourcecode.cpp.cpp', 'PBXSourcesBuildPhase'),
159 - '.framework': ('wrapper.framework', 'PBXFrameworksBuildPhase'),
160 - '.h': ('sourcecode.c.h', None),
161 - '.hpp': ('sourcecode.c.h', None),
162 - '.d': ('sourcecode.dtrace', 'PBXSourcesBuildPhase'),
163 - '.swift': ('sourcecode.swift', 'PBXSourcesBuildPhase'),
164 - '.icns': ('image.icns', 'PBXResourcesBuildPhase'),
165 - '.m': ('sourcecode.c.objc', 'PBXSourcesBuildPhase'),
166 - '.j': ('sourcecode.c.objc', 'PBXSourcesBuildPhase'),
167 - '.mm': ('sourcecode.cpp.objcpp', 'PBXSourcesBuildPhase'),
168 - '.nib': ('wrapper.nib', 'PBXResourcesBuildPhase'),
169 - '.plist': ('text.plist.xml', 'PBXResourcesBuildPhase'),
170 - '.json': ('text.json', 'PBXResourcesBuildPhase'),
171 - '.png': ('image.png', 'PBXResourcesBuildPhase'),
172 - '.rtf': ('text.rtf', 'PBXResourcesBuildPhase'),
173 - '.tiff': ('image.tiff', 'PBXResourcesBuildPhase'),
174 - '.txt': ('text', 'PBXResourcesBuildPhase'),
175 - '.xcodeproj': ('wrapper.pb-project', None),
176 - '.xib': ('file.xib', 'PBXResourcesBuildPhase'),
177 - '.strings': ('text.plist.strings', 'PBXResourcesBuildPhase'),
178 - '.bundle': ('wrapper.plug-in', 'PBXResourcesBuildPhase'),
179 - '.dylib': ('compiled.mach-o.dylib', 'PBXFrameworksBuildPhase'),
180 - '.xcdatamodeld': ('wrapper.xcdatamodel', 'PBXSourcesBuildPhase'),
181 - '.xcassets': ('folder.assetcatalog', 'PBXResourcesBuildPhase'),
182 - '.tbd': ('sourcecode.text-based-dylib-definition', 'PBXFrameworksBuildPhase'),
183 - }
184 -
185 - trees = [
186 - '<absolute>',
187 - '<group>',
188 - 'BUILT_PRODUCTS_DIR',
189 - 'DEVELOPER_DIR',
190 - 'SDKROOT',
191 - 'SOURCE_ROOT',
192 - ]
193 -
194 - def guess_file_type(self, ignore_unknown_type=False):
195 - self.remove('explicitFileType')
196 - self.remove('lastKnownFileType')
197 -
198 -
199 - ext = os.path.splitext(self.get('name', ''))[1]
200 - if os.path.isdir(self.get('path')) and ext not in XcodeProject.special_folders:
201 - f_type = 'folder'
202 - build_phase = None
203 - ext = ''
204 - else:
205 - f_type, build_phase = PBXFileReference.types.get(ext, ('?', 'PBXResourcesBuildPhase'))
206 -
207 - self['lastKnownFileType'] = f_type
208 - self.build_phase = build_phase
209 -
210 - if f_type == '?' and not ignore_unknown_type:
211 - print 'unknown file extension: %s' % ext
212 - print 'please add extension and Xcode type to PBXFileReference.types'
213 -
214 - return f_type
215 -
216 - def set_file_type(self, ft):
217 - self.remove('explicitFileType')
218 - self.remove('lastKnownFileType')
219 -
220 - self['explicitFileType'] = ft
221 -
222 - @classmethod
223 - def Create(cls, os_path, tree='SOURCE_ROOT', ignore_unknown_type=False):
224 - if tree not in cls.trees:
225 - print 'Not a valid sourceTree type: %s' % tree
226 - return None
227 -
228 - fr = cls()
229 - fr.id = cls.GenerateId()
230 - fr['path'] = os_path
231 - fr['name'] = os.path.split(os_path)[1]
232 - fr['sourceTree'] = '<absolute>' if os.path.isabs(os_path) else tree
233 - fr.guess_file_type(ignore_unknown_type=ignore_unknown_type)
234 -
235 - return fr
236 -
237 -
238 -class PBXBuildFile(PBXType):
239 - def set_weak_link(self, weak=False):
240 - k_settings = 'settings'
241 - k_attributes = 'ATTRIBUTES'
242 -
243 - s = self.get(k_settings)
244 -
245 - if not s:
246 - if weak:
247 - self[k_settings] = PBXDict({k_attributes: PBXList(['Weak'])})
248 -
249 - return True
250 -
251 - atr = s.get(k_attributes)
252 -
253 - if not atr:
254 - if weak:
255 - atr = PBXList()
256 - else:
257 - return False
258 -
259 - if weak:
260 - atr.add('Weak')
261 - else:
262 - atr.remove('Weak')
263 -
264 - self[k_settings][k_attributes] = atr
265 -
266 - return True
267 -
268 - def add_compiler_flag(self, flag):
269 - k_settings = 'settings'
270 - k_attributes = 'COMPILER_FLAGS'
271 -
272 - if k_settings not in self:
273 - self[k_settings] = PBXDict()
274 -
275 - if k_attributes not in self[k_settings]:
276 - self[k_settings][k_attributes] = flag
277 - return True
278 -
279 - flags = self[k_settings][k_attributes].split(' ')
280 -
281 - if flag in flags:
282 - return False
283 -
284 - flags.append(flag)
285 -
286 - self[k_settings][k_attributes] = ' '.join(flags)
287 -
288 - @classmethod
289 - def Create(cls, file_ref, weak=False):
290 - if isinstance(file_ref, PBXFileReference):
291 - file_ref = file_ref.id
292 -
293 - bf = cls()
294 - bf.id = cls.GenerateId()
295 - bf['fileRef'] = file_ref
296 -
297 - if weak:
298 - bf.set_weak_link(True)
299 -
300 - return bf
301 -
302 -
303 -class PBXGroup(PBXType):
304 - def add_child(self, ref):
305 - if not isinstance(ref, PBXDict):
306 - return None
307 -
308 - isa = ref.get('isa')
309 -
310 - if isa != 'PBXFileReference' and isa != 'PBXGroup':
311 - return None
312 -
313 - if 'children' not in self:
314 - self['children'] = PBXList()
315 -
316 - self['children'].add(ref.id)
317 -
318 - return ref.id
319 -
320 - def remove_child(self, id):
321 - if 'children' not in self:
322 - self['children'] = PBXList()
323 - return
324 -
325 - if not PBXType.IsGuid(id):
326 - id = id.id
327 -
328 - self['children'].remove(id)
329 -
330 - def has_child(self, id):
331 - if 'children' not in self:
332 - self['children'] = PBXList()
333 - return False
334 -
335 - if not PBXType.IsGuid(id):
336 - id = id.id
337 -
338 - return id in self['children']
339 -
340 - def get_name(self):
341 - path_name = os.path.split(self.get('path', ''))[1]
342 - return self.get('name', path_name)
343 -
344 - @classmethod
345 - def Create(cls, name, path=None, tree='SOURCE_ROOT'):
346 - grp = cls()
347 - grp.id = cls.GenerateId()
348 - grp['name'] = name
349 - grp['children'] = PBXList()
350 -
351 - if path:
352 - grp['path'] = path
353 - grp['sourceTree'] = tree
354 - else:
355 - grp['sourceTree'] = '<group>'
356 -
357 - return grp
358 -
359 -
360 -class PBXNativeTarget(PBXType):
361 - pass
362 -
363 -
364 -class PBXProject(PBXType):
365 - pass
366 -
367 -
368 -class PBXContainerItemProxy(PBXType):
369 - pass
370 -
371 -
372 -class PBXReferenceProxy(PBXType):
373 - pass
374 -
375 -
376 -class PBXVariantGroup(PBXType):
377 - pass
378 -
379 -
380 -class PBXTargetDependency(PBXType):
381 - pass
382 -
383 -
384 -class PBXAggregateTarget(PBXType):
385 - pass
386 -
387 -
388 -class PBXHeadersBuildPhase(PBXType):
389 - pass
390 -
391 -class XCVersionGroup(PBXType):
392 - pass
393 -
394 -class PBXBuildPhase(PBXType):
395 - def add_build_file(self, bf):
396 - if bf.get('isa') != 'PBXBuildFile':
397 - return False
398 -
399 - if 'files' not in self:
400 - self['files'] = PBXList()
401 -
402 - self['files'].add(bf.id)
403 -
404 - return True
405 -
406 - def remove_build_file(self, id):
407 - if 'files' not in self:
408 - self['files'] = PBXList()
409 - return
410 -
411 - self['files'].remove(id)
412 -
413 - def has_build_file(self, id):
414 - if 'files' not in self:
415 - self['files'] = PBXList()
416 - return False
417 -
418 - if not PBXType.IsGuid(id):
419 - id = id.id
420 -
421 - return id in self['files']
422 -
423 -
424 -class PBXFrameworksBuildPhase(PBXBuildPhase):
425 - pass
426 -
427 -
428 -class PBXResourcesBuildPhase(PBXBuildPhase):
429 - pass
430 -
431 -
432 -class PBXShellScriptBuildPhase(PBXBuildPhase):
433 - @classmethod
434 - def Create(cls, script, shell="/bin/sh", files=[], input_paths=[], output_paths=[], show_in_log = '0'):
435 - bf = cls()
436 - bf.id = cls.GenerateId()
437 - bf['files'] = files
438 - bf['inputPaths'] = input_paths
439 - bf['outputPaths'] = output_paths
440 - bf['runOnlyForDeploymentPostprocessing'] = '0';
441 - bf['shellPath'] = shell
442 - bf['shellScript'] = script
443 - bf['showEnvVarsInLog'] = show_in_log
444 -
445 - return bf
446 -
447 -
448 -class PBXSourcesBuildPhase(PBXBuildPhase):
449 - pass
450 -
451 -
452 -class PBXCopyFilesBuildPhase(PBXBuildPhase):
453 - pass
454 -
455 -
456 -class XCBuildConfiguration(PBXType):
457 - def add_search_paths(self, paths, base, key, recursive=True, escape=True):
458 - modified = False
459 -
460 - if not isinstance(paths, list):
461 - paths = [paths]
462 -
463 - if base not in self:
464 - self[base] = PBXDict()
465 -
466 - for path in paths:
467 - if recursive and not path.endswith('/**'):
468 - path = os.path.join(path, '**')
469 -
470 - if key not in self[base]:
471 - self[base][key] = PBXList()
472 - elif isinstance(self[base][key], basestring):
473 - self[base][key] = PBXList(self[base][key])
474 -
475 - if path == '$(inherited)':
476 - escape = False
477 -
478 - if escape:
479 - if self[base][key].add('"%s"' % path): # '\\"%s\\"' % path
480 - modified = True
481 - else:
482 - if self[base][key].add(path): # '\\"%s\\"' % path
483 - modified = True
484 -
485 - return modified
486 -
487 - def add_header_search_paths(self, paths, recursive=True):
488 - return self.add_search_paths(paths, 'buildSettings', 'HEADER_SEARCH_PATHS', recursive=recursive)
489 -
490 - def add_library_search_paths(self, paths, recursive=True):
491 - return self.add_search_paths(paths, 'buildSettings', 'LIBRARY_SEARCH_PATHS', recursive=recursive)
492 -
493 - def add_framework_search_paths(self, paths, recursive=True):
494 - return self.add_search_paths(paths, 'buildSettings', 'FRAMEWORK_SEARCH_PATHS', recursive=recursive)
495 -
496 - def add_other_cflags(self, flags):
497 - return self.add_flag('OTHER_CFLAGS', flags)
498 -
499 - def add_other_ldflags(self, flags):
500 - return self.add_flag('OTHER_LDFLAGS', flags)
501 -
502 - def add_flag(self, key, flags):
503 - modified = False
504 - base = 'buildSettings'
505 -
506 - if isinstance(flags, basestring):
507 - flags = PBXList(flags)
508 -
509 - if base not in self:
510 - self[base] = PBXDict()
511 -
512 - for flag in flags:
513 - if key not in self[base]:
514 - self[base][key] = PBXList()
515 - elif isinstance(self[base][key], basestring):
516 - self[base][key] = PBXList(self[base][key])
517 -
518 - if self[base][key].add(flag):
519 - self[base][key] = [e for e in self[base][key] if e]
520 - modified = True
521 -
522 - return modified
523 -
524 - def remove_flag(self, key, flags):
525 - modified = False
526 - base = 'buildSettings'
527 -
528 - if isinstance(flags, basestring):
529 - flags = PBXList(flags)
530 -
531 - if base in self: # there are flags, so we can "remove" something
532 - for flag in flags:
533 - if key not in self[base]:
534 - return False
535 - elif isinstance(self[base][key], basestring):
536 - self[base][key] = PBXList(self[base][key])
537 -
538 - if self[base][key].remove(flag):
539 - self[base][key] = [e for e in self[base][key] if e]
540 - modified = True
541 -
542 - if len(self[base][key]) == 0:
543 - self[base].pop(key, None)
544 -
545 - return modified
546 -
547 - def remove_other_ldflags(self, flags):
548 - return self.remove_flag('OTHER_LD_FLAGS', flags)
549 -
550 - # Set a single-valued flag under buildSettings
551 - def add_single_valued_flag(self, flag, value):
552 - modified = False
553 - base = 'buildSettings'
554 - key = flag
555 -
556 - if not self.has_key(base):
557 - self[base] = PBXDict()
558 - if self[base].has_key(key):
559 - if self[base][key] == value:
560 - return False
561 - self[base][key] = value
562 - modified = True
563 - return modified
564 -
565 - # Remove a single-valued flag under buildSettings
566 - def remove_single_valued_flag(self, flag):
567 - modified = False
568 - base = 'buildSettings'
569 - key = flag
570 -
571 - if self.has_key(base) and self[base].has_key(key):
572 - self[base].pop(key, None)
573 - modified = True
574 - return modified
575 -
576 -class XCConfigurationList(PBXType):
577 - pass
578 -
579 -
580 -class XcodeProject(PBXDict):
581 - plutil_path = 'plutil'
582 - special_folders = ['.bundle', '.framework', '.xcodeproj', '.xcassets', '.xcdatamodeld']
583 -
584 - def __init__(self, d=None, path=None):
585 - if not path:
586 - path = os.path.join(os.getcwd(), 'project.pbxproj')
587 -
588 - self.pbxproj_path = os.path.abspath(path)
589 - self.source_root = os.path.abspath(os.path.join(os.path.split(path)[0], '..'))
590 -
591 - IterableUserDict.__init__(self, d)
592 -
593 - self.data = PBXDict(self.data)
594 - self.objects = self.get('objects')
595 - self.modified = False
596 -
597 - root_id = self.get('rootObject')
598 -
599 - if root_id:
600 - self.root_object = self.objects[root_id]
601 - root_group_id = self.root_object.get('mainGroup')
602 - self.root_group = self.objects[root_group_id]
603 - else:
604 - print "error: project has no root object"
605 - self.root_object = None
606 - self.root_group = None
607 -
608 - for k, v in self.objects.iteritems():
609 - v.id = k
610 -
611 - def add_other_cflags(self, flags):
612 - build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
613 -
614 - for b in build_configs:
615 - if b.add_other_cflags(flags):
616 - self.modified = True
617 -
618 - def add_other_ldflags(self, flags):
619 - build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
620 -
621 - for b in build_configs:
622 - if b.add_other_ldflags(flags):
623 - self.modified = True
624 -
625 - def remove_other_ldflags(self, flags):
626 - build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
627 -
628 - for b in build_configs:
629 - if b.remove_other_ldflags(flags):
630 - self.modified = True
631 -
632 - def add_header_search_paths(self, paths, recursive=True):
633 - build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
634 -
635 - for b in build_configs:
636 - if b.add_header_search_paths(paths, recursive):
637 - self.modified = True
638 -
639 - def add_framework_search_paths(self, paths, recursive=True):
640 - build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
641 -
642 - for b in build_configs:
643 - if b.add_framework_search_paths(paths, recursive):
644 - self.modified = True
645 -
646 - def add_library_search_paths(self, paths, recursive=True):
647 - build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
648 -
649 - for b in build_configs:
650 - if b.add_library_search_paths(paths, recursive):
651 - self.modified = True
652 -
653 - def add_flags(self, pairs, configuration='All'):
654 - build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
655 -
656 - # iterate over all the pairs of configurations
657 - for b in build_configs:
658 - if configuration != "All" and b.get('name') != configuration :
659 - continue
660 -
661 - for k in pairs:
662 - if b.add_flag(k, pairs[k]):
663 - self.modified = True
664 -
665 - def remove_flags(self, pairs, configuration='All'):
666 - build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
667 -
668 - # iterate over all the pairs of configurations
669 - for b in build_configs:
670 - if configuration != "All" and b.get('name') != configuration :
671 - continue
672 - for k in pairs:
673 - if b.remove_flag(k, pairs[k]):
674 - self.modified = True
675 -
676 - # Set a single-valued flag (whereas add_flags adds a flag to a list of flags with a given key)
677 - def add_single_valued_flag(self, flag, value, configuration='All'):
678 - build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
679 -
680 - for b in build_configs:
681 - if configuration != "All" and b.get('name') != configuration :
682 - continue
683 -
684 - if b.add_single_valued_flag(flag, value):
685 - self.modified = True
686 -
687 - # Remove a single-valued flag (whereas remove_flags deletes a flag from a list of flags with a given key)
688 - def remove_single_valued_flag(self, flag, configuration='All'):
689 - build_configs = [b for b in self.objects.values() if b.get('isa') == 'XCBuildConfiguration']
690 -
691 - for b in build_configs:
692 - if configuration != "All" and b.get('name') != configuration :
693 - continue
694 -
695 - if b.remove_single_valued_flag(flag):
696 - self.modified = True
697 -
698 - def get_obj(self, id):
699 - return self.objects.get(id)
700 -
701 - def get_ids(self):
702 - return self.objects.keys()
703 -
704 - def get_files_by_os_path(self, os_path, tree='SOURCE_ROOT'):
705 - files = [f for f in self.objects.values() if f.get('isa') == 'PBXFileReference'
706 - and f.get('path') == os_path
707 - and f.get('sourceTree') == tree]
708 -
709 - return files
710 -
711 - def get_files_by_name(self, name, parent=None):
712 - if parent:
713 - files = [f for f in self.objects.values() if f.get('isa') == 'PBXFileReference'
714 - and f.get('name') == name
715 - and parent.has_child(f)]
716 - else:
717 - files = [f for f in self.objects.values() if f.get('isa') == 'PBXFileReference'
718 - and f.get('name') == name]
719 -
720 - return files
721 -
722 - def get_keys_for_files_by_name(self, name):
723 - keys = [key for key in self.objects if self.objects.data[key].get('name') == name
724 - and self.objects.data[key].get('isa') == 'PBXFileReference']
725 - return keys
726 -
727 -
728 - def get_build_files(self, id):
729 - files = [f for f in self.objects.values() if f.get('isa') == 'PBXBuildFile'
730 - and f.get('fileRef') == id]
731 - return files
732 -
733 - def get_groups_by_name(self, name, parent=None):
734 - if parent:
735 - groups = [g for g in self.objects.values() if g.get('isa') == 'PBXGroup'
736 - and g.get_name() == name
737 - and parent.has_child(g)]
738 - else:
739 - groups = [g for g in self.objects.values() if g.get('isa') == 'PBXGroup'
740 - and g.get_name() == name]
741 -
742 - return groups
743 -
744 - def get_or_create_group(self, name, path=None, parent=None):
745 - if not name:
746 - return None
747 -
748 - if not parent:
749 - parent = self.root_group
750 - elif not isinstance(parent, PBXGroup):
751 - # assume it's an id
752 - parent = self.objects.get(parent, self.root_group)
753 -
754 - groups = self.get_groups_by_name(name)
755 -
756 - for grp in groups:
757 - if parent.has_child(grp.id):
758 - return grp
759 -
760 - grp = PBXGroup.Create(name, path)
761 - parent.add_child(grp)
762 -
763 - self.objects[grp.id] = grp
764 -
765 - self.modified = True
766 -
767 - return grp
768 -
769 - def get_groups_by_os_path(self, path):
770 - path = os.path.abspath(path)
771 -
772 - groups = [g for g in self.objects.values() if g.get('isa') == 'PBXGroup'
773 - and os.path.abspath(g.get('path', '/dev/null')) == path]
774 -
775 - return groups
776 -
777 - def get_build_phases(self, phase_name):
778 - phases = [p for p in self.objects.values() if p.get('isa') == phase_name]
779 -
780 - return phases
781 -
782 - def get_target_by_name(self, name):
783 - targets = self.get_build_phases('PBXNativeTarget')
784 - target = None
785 - for t in targets:
786 - if t.get("name") == name:
787 - target = t
788 - break
789 - return target
790 -
791 - def get_relative_path(self, os_path):
792 - return os.path.relpath(os_path, self.source_root)
793 -
794 - def verify_files(self, file_list, parent=None):
795 - # returns list of files not in the current project.
796 - if not file_list:
797 - return []
798 -
799 - if parent:
800 - exists_list = [f.get('name') for f in self.objects.values() if f.get('isa') == 'PBXFileReference' and f.get('name') in file_list and parent.has_child(f)]
801 - else:
802 - exists_list = [f.get('name') for f in self.objects.values() if f.get('isa') == 'PBXFileReference' and f.get('name') in file_list]
803 -
804 - return set(file_list).difference(exists_list)
805 -
806 - def add_run_script(self, target, script=None, insert_before_compile=False):
807 - result = []
808 - targets = [t for t in self.get_build_phases('PBXNativeTarget') + self.get_build_phases('PBXAggregateTarget') if t.get('name') == target]
809 - if len(targets) != 0 :
810 - script_phase = PBXShellScriptBuildPhase.Create(script)
811 - for t in targets:
812 - skip = False
813 - for buildPhase in t['buildPhases']:
814 - if self.objects[buildPhase].get('isa') == 'PBXShellScriptBuildPhase' and self.objects[buildPhase].get('shellScript') == script:
815 - skip = True
816 -
817 - if not skip:
818 - if insert_before_compile:
819 - t['buildPhases'].insert(0, script_phase.id)
820 - else:
821 - t['buildPhases'].add(script_phase.id)
822 - self.objects[script_phase.id] = script_phase
823 - result.append(script_phase)
824 -
825 - return result
826 -
827 - def add_run_script_all_targets(self, script=None):
828 - result = []
829 - targets = self.get_build_phases('PBXNativeTarget') + self.get_build_phases('PBXAggregateTarget')
830 - if len(targets) != 0 :
831 - script_phase = PBXShellScriptBuildPhase.Create(script)
832 - for t in targets:
833 - skip = False
834 - for buildPhase in t['buildPhases']:
835 - if self.objects[buildPhase].get('isa') == 'PBXShellScriptBuildPhase' and self.objects[buildPhase].get('shellScript') == script:
836 - skip = True
837 -
838 - if not skip:
839 - t['buildPhases'].add(script_phase.id)
840 - self.objects[script_phase.id] = script_phase
841 - result.append(script_phase)
842 -
843 - return result
844 -
845 - def add_folder(self, os_path, parent=None, excludes=None, recursive=True, create_build_files=True):
846 - if not os.path.isdir(os_path):
847 - return []
848 -
849 - if not excludes:
850 - excludes = []
851 -
852 - results = []
853 -
854 - if not parent:
855 - parent = self.root_group
856 - elif not isinstance(parent, PBXGroup):
857 - # assume it's an id
858 - parent = self.objects.get(parent, self.root_group)
859 -
860 - path_dict = {os.path.split(os_path)[0]: parent}
861 - special_list = []
862 -
863 - for (grp_path, subdirs, files) in os.walk(os_path):
864 - parent_folder, folder_name = os.path.split(grp_path)
865 - parent = path_dict.get(parent_folder, parent)
866 -
867 - if [sp for sp in special_list if parent_folder.startswith(sp)]:
868 - continue
869 -
870 - if folder_name.startswith('.'):
871 - special_list.append(grp_path)
872 - continue
873 -
874 - if os.path.splitext(grp_path)[1] in XcodeProject.special_folders:
875 - # if this file has a special extension (bundle or framework mainly) treat it as a file
876 - special_list.append(grp_path)
877 - new_files = self.verify_files([folder_name], parent=parent)
878 -
879 - # Ignore this file if it is in excludes
880 - if new_files and not [m for m in excludes if re.match(m, grp_path)]:
881 - results.extend(self.add_file(grp_path, parent, create_build_files=create_build_files))
882 -
883 - continue
884 -
885 - # create group
886 - grp = self.get_or_create_group(folder_name, path=self.get_relative_path(grp_path), parent=parent)
887 - path_dict[grp_path] = grp
888 -
889 - results.append(grp)
890 -
891 - file_dict = {}
892 -
893 - for f in files:
894 - if f[0] == '.' or [m for m in excludes if re.match(m, f)]:
895 - continue
896 -
897 - kwds = {
898 - 'create_build_files': create_build_files,
899 - 'parent': grp,
900 - 'name': f
901 - }
902 -
903 - f_path = os.path.join(grp_path, f)
904 - file_dict[f_path] = kwds
905 -
906 - new_files = self.verify_files([n.get('name') for n in file_dict.values()], parent=grp)
907 - add_files = [(k, v) for k, v in file_dict.items() if v.get('name') in new_files]
908 -
909 - for path, kwds in add_files:
910 - kwds.pop('name', None)
911 - self.add_file(path, **kwds)
912 -
913 - if not recursive:
914 - break
915 -
916 - for r in results:
917 - self.objects[r.id] = r
918 -
919 - return results
920 -
921 - def path_leaf(self, path):
922 - head, tail = ntpath.split(path)
923 - return tail or ntpath.basename(head)
924 -
925 - def add_file_if_doesnt_exist(self, f_path, parent=None, tree='SOURCE_ROOT', create_build_files=True, weak=False, ignore_unknown_type=False):
926 - for obj in self.objects.values():
927 - if 'path' in obj:
928 - if self.path_leaf(f_path) == self.path_leaf(obj.get('path')):
929 - return []
930 -
931 - return self.add_file(f_path, parent, tree, create_build_files, weak, ignore_unknown_type=ignore_unknown_type)
932 -
933 - def add_file(self, f_path, parent=None, tree='SOURCE_ROOT', create_build_files=True, weak=False, ignore_unknown_type=False, target=None):
934 - results = []
935 - abs_path = ''
936 -
937 - if os.path.isabs(f_path):
938 - abs_path = f_path
939 -
940 - if not os.path.exists(f_path):
941 - return results
942 - elif tree == 'SOURCE_ROOT':
943 - f_path = os.path.relpath(f_path, self.source_root)
944 - else:
945 - tree = '<absolute>'
946 -
947 - if not parent:
948 - parent = self.root_group
949 - elif not isinstance(parent, PBXGroup):
950 - # assume it's an id
951 - parent = self.objects.get(parent, self.root_group)
952 -
953 - file_ref = PBXFileReference.Create(f_path, tree, ignore_unknown_type=ignore_unknown_type)
954 - parent.add_child(file_ref)
955 - results.append(file_ref)
956 -
957 - # create a build file for the file ref
958 - if file_ref.build_phase and create_build_files:
959 - phases = self.get_build_phases(file_ref.build_phase)
960 - if target:
961 - target = self.get_target_by_name(target)
962 -
963 - for phase in phases:
964 - if (not target) or (phase.id in target.get('buildPhases')):
965 - build_file = PBXBuildFile.Create(file_ref, weak=weak)
966 - phase.add_build_file(build_file)
967 - results.append(build_file)
968 -
969 - if abs_path and tree == 'SOURCE_ROOT' \
970 - and os.path.isfile(abs_path) \
971 - and file_ref.build_phase == 'PBXFrameworksBuildPhase':
972 - library_path = os.path.join('$(SRCROOT)', os.path.split(f_path)[0])
973 - self.add_library_search_paths([library_path], recursive=False)
974 -
975 - if abs_path and tree == 'SOURCE_ROOT' \
976 - and not os.path.isfile(abs_path) \
977 - and file_ref.build_phase == 'PBXFrameworksBuildPhase':
978 - framework_path = os.path.join('$(SRCROOT)', os.path.split(f_path)[0])
979 - self.add_framework_search_paths([framework_path, '$(inherited)'], recursive=False)
980 -
981 - for r in results:
982 - self.objects[r.id] = r
983 -
984 - if results:
985 - self.modified = True
986 -
987 - return results
988 -
989 - def check_and_repair_framework(self, base):
990 - name = os.path.basename(base)
991 -
992 - if ".framework" in name:
993 - basename = name[:-len(".framework")]
994 -
995 - finalHeaders = os.path.join(base, "Headers")
996 - finalCurrent = os.path.join(base, "Versions/Current")
997 - finalLib = os.path.join(base, basename)
998 - srcHeaders = "Versions/A/Headers"
999 - srcCurrent = "A"
1000 - srcLib = "Versions/A/" + basename
1001 -
1002 - if not os.path.exists(finalHeaders):
1003 - os.symlink(srcHeaders, finalHeaders)
1004 - if not os.path.exists(finalCurrent):
1005 - os.symlink(srcCurrent, finalCurrent)
1006 - if not os.path.exists(finalLib):
1007 - os.symlink(srcLib, finalLib)
1008 -
1009 -
1010 - def get_file_id_by_path(self, f_path):
1011 - for k, v in self.objects.iteritems():
1012 - if str(v.get('path')) == f_path:
1013 - return k
1014 - return 0
1015 -
1016 -
1017 - def remove_file_by_path(self, f_path, recursive=True):
1018 - id = self.get_file_id_by_path(f_path)
1019 - if id != 0:
1020 - self.remove_file(id, recursive=recursive)
1021 - return
1022 -
1023 -
1024 - def remove_file(self, id, recursive=True):
1025 - if not PBXType.IsGuid(id):
1026 - id = id.id
1027 -
1028 - if id in self.objects:
1029 - self.objects.remove(id)
1030 - # Remove from PBXResourcesBuildPhase and PBXSourcesBuildPhase if necessary
1031 - buildFiles = [f for f in self.objects.values() if f.get('isa') == 'PBXBuildFile']
1032 - for buildFile in buildFiles:
1033 - if id == buildFile.get('fileRef'):
1034 - key = buildFile.id
1035 - PBXRBP = [f for f in self.objects.values() if f.get('isa') == 'PBXResourcesBuildPhase']
1036 - PBXSBP = [f for f in self.objects.values() if f.get('isa') == 'PBXSourcesBuildPhase']
1037 - self.objects.remove(key)
1038 - if len(PBXSBP) and PBXSBP[0].has_build_file(key):
1039 - PBXSBP[0].remove_build_file(key)
1040 - if len(PBXRBP) and PBXRBP[0].has_build_file(key):
1041 - PBXRBP[0].remove_build_file(key)
1042 - if recursive:
1043 - groups = [g for g in self.objects.values() if g.get('isa') == 'PBXGroup']
1044 -
1045 - for group in groups:
1046 - if id in group['children']:
1047 - group.remove_child(id)
1048 -
1049 - self.modified = True
1050 -
1051 - def remove_group(self, id, recursive = True):
1052 - if not PBXType.IsGuid(id):
1053 - id = id.id
1054 - name = self.objects.get(id).get('path')
1055 - children = self.objects.get(id).get('children')
1056 - if name is None:
1057 - name = id
1058 - if id in self.objects:
1059 - if recursive:
1060 - for childKey in children:
1061 - childValue = self.objects.get(childKey)
1062 - if childValue.get('isa') == 'PBXGroup':
1063 - self.remove_group(childKey, True)
1064 - else:
1065 - self.remove_file(childKey, False)
1066 -
1067 - self.objects.remove(id);
1068 -
1069 - def remove_group_by_name(self, name, recursive = True):
1070 - groups = self.get_groups_by_name(name)
1071 - if len(groups):
1072 - for group in groups:
1073 - self.remove_group(group.id, recursive)
1074 -
1075 - def move_file(self, id, dest_grp=None):
1076 - pass
1077 -
1078 - def apply_patch(self, patch_path, xcode_path):
1079 - if not os.path.isfile(patch_path) or not os.path.isdir(xcode_path):
1080 - print 'ERROR: couldn\'t apply "%s" to "%s"' % (patch_path, xcode_path)
1081 - return
1082 -
1083 - print 'applying "%s" to "%s"' % (patch_path, xcode_path)
1084 -
1085 - return subprocess.call(['patch', '-p1', '--forward', '--directory=%s' % xcode_path, '--input=%s' % patch_path])
1086 -
1087 - def apply_mods(self, mod_dict, default_path=None):
1088 - if not default_path:
1089 - default_path = os.getcwd()
1090 -
1091 - keys = mod_dict.keys()
1092 -
1093 - for k in keys:
1094 - v = mod_dict.pop(k)
1095 - mod_dict[k.lower()] = v
1096 -
1097 - parent = mod_dict.pop('group', None)
1098 -
1099 - if parent:
1100 - parent = self.get_or_create_group(parent)
1101 -
1102 - excludes = mod_dict.pop('excludes', [])
1103 -
1104 - if excludes:
1105 - excludes = [re.compile(e) for e in excludes]
1106 -
1107 - compiler_flags = mod_dict.pop('compiler_flags', {})
1108 -
1109 - for k, v in mod_dict.items():
1110 - if k == 'patches':
1111 - for p in v:
1112 - if not os.path.isabs(p):
1113 - p = os.path.join(default_path, p)
1114 -
1115 - self.apply_patch(p, self.source_root)
1116 - elif k == 'folders':
1117 - # get and compile excludes list
1118 - # do each folder individually
1119 - for folder in v:
1120 - kwds = {}
1121 -
1122 - # if path contains ':' remove it and set recursive to False
1123 - if ':' in folder:
1124 - args = folder.split(':')
1125 - kwds['recursive'] = False
1126 - folder = args.pop(0)
1127 -
1128 - if os.path.isabs(folder) and os.path.isdir(folder):
1129 - pass
1130 - else:
1131 - folder = os.path.join(default_path, folder)
1132 - if not os.path.isdir(folder):
1133 - continue
1134 -
1135 - if parent:
1136 - kwds['parent'] = parent
1137 -
1138 - if excludes:
1139 - kwds['excludes'] = excludes
1140 -
1141 - self.add_folder(folder, **kwds)
1142 - elif k == 'headerpaths' or k == 'librarypaths':
1143 - paths = []
1144 -
1145 - for p in v:
1146 - if p.endswith('/**'):
1147 - p = os.path.split(p)[0]
1148 -
1149 - if not os.path.isabs(p):
1150 - p = os.path.join(default_path, p)
1151 -
1152 - if not os.path.exists(p):
1153 - continue
1154 -
1155 - p = self.get_relative_path(p)
1156 - paths.append(os.path.join('$(SRCROOT)', p, "**"))
1157 -
1158 - if k == 'headerpaths':
1159 - self.add_header_search_paths(paths)
1160 - else:
1161 - self.add_library_search_paths(paths)
1162 - elif k == 'other_cflags':
1163 - self.add_other_cflags(v)
1164 - elif k == 'other_ldflags':
1165 - self.add_other_ldflags(v)
1166 - elif k == 'libs' or k == 'frameworks' or k == 'files':
1167 - paths = {}
1168 -
1169 - for p in v:
1170 - kwds = {}
1171 -
1172 - if ':' in p:
1173 - args = p.split(':')
1174 - p = args.pop(0)
1175 -
1176 - if 'weak' in args:
1177 - kwds['weak'] = True
1178 -
1179 - file_path = os.path.join(default_path, p)
1180 - search_path, file_name = os.path.split(file_path)
1181 -
1182 - if [m for m in excludes if re.match(m, file_name)]:
1183 - continue
1184 -
1185 - try:
1186 - expr = re.compile(file_name)
1187 - except re.error:
1188 - expr = None
1189 -
1190 - if expr and os.path.isdir(search_path):
1191 - file_list = os.listdir(search_path)
1192 -
1193 - for f in file_list:
1194 - if [m for m in excludes if re.match(m, f)]:
1195 - continue
1196 -
1197 - if re.search(expr, f):
1198 - kwds['name'] = f
1199 - paths[os.path.join(search_path, f)] = kwds
1200 - p = None
1201 -
1202 - if k == 'libs':
1203 - kwds['parent'] = self.get_or_create_group('Libraries', parent=parent)
1204 - elif k == 'frameworks':
1205 - kwds['parent'] = self.get_or_create_group('Frameworks', parent=parent)
1206 -
1207 - if p:
1208 - kwds['name'] = file_name
1209 -
1210 - if k == 'libs':
1211 - p = os.path.join('usr', 'lib', p)
1212 - kwds['tree'] = 'SDKROOT'
1213 - elif k == 'frameworks':
1214 - p = os.path.join('System', 'Library', 'Frameworks', p)
1215 - kwds['tree'] = 'SDKROOT'
1216 - elif k == 'files' and not os.path.exists(file_path):
1217 - # don't add non-existent files to the project.
1218 - continue
1219 -
1220 - paths[p] = kwds
1221 -
1222 - new_files = self.verify_files([n.get('name') for n in paths.values()])
1223 - add_files = [(k, v) for k, v in paths.items() if v.get('name') in new_files]
1224 -
1225 - for path, kwds in add_files:
1226 - kwds.pop('name', None)
1227 -
1228 - if 'parent' not in kwds and parent:
1229 - kwds['parent'] = parent
1230 -
1231 - self.add_file(path, **kwds)
1232 -
1233 - if compiler_flags:
1234 - for k, v in compiler_flags.items():
1235 - filerefs = []
1236 -
1237 - for f in v:
1238 - filerefs.extend([fr.id for fr in self.objects.values() if fr.get('isa') == 'PBXFileReference'
1239 - and fr.get('name') == f])
1240 -
1241 - buildfiles = [bf for bf in self.objects.values() if bf.get('isa') == 'PBXBuildFile'
1242 - and bf.get('fileRef') in filerefs]
1243 -
1244 - for bf in buildfiles:
1245 - if bf.add_compiler_flag(k):
1246 - self.modified = True
1247 -
1248 - def backup(self, file_name=None, backup_name=None):
1249 - if not file_name:
1250 - file_name = self.pbxproj_path
1251 -
1252 - if not backup_name:
1253 - backup_name = "%s.%s.backup" % (file_name, datetime.datetime.now().strftime('%d%m%y-%H%M%S'))
1254 -
1255 - shutil.copy2(file_name, backup_name)
1256 - return backup_name
1257 -
1258 - def save(self, file_name=None, old_format=False, sort=False):
1259 - if old_format :
1260 - self.save_format_xml(file_name)
1261 - else:
1262 - self.save_new_format(file_name, sort)
1263 -
1264 - def save_format_xml(self, file_name=None):
1265 - """Saves in old (xml) format"""
1266 - if not file_name:
1267 - file_name = self.pbxproj_path
1268 -
1269 - # This code is adapted from plistlib.writePlist
1270 - with open(file_name, "w") as f:
1271 - writer = PBXWriter(f)
1272 - writer.writeln("<plist version=\"1.0\">")
1273 - writer.writeValue(self.data)
1274 - writer.writeln("</plist>")
1275 -
1276 - def save_new_format(self, file_name=None, sort=False):
1277 - """Save in Xcode 3.2 compatible (new) format"""
1278 - if not file_name:
1279 - file_name = self.pbxproj_path
1280 -
1281 - # process to get the section's info and names
1282 - objs = self.data.get('objects')
1283 - sections = dict()
1284 - uuids = dict()
1285 -
1286 - for key in objs:
1287 - l = list()
1288 -
1289 - if objs.get(key).get('isa') in sections:
1290 - l = sections.get(objs.get(key).get('isa'))
1291 -
1292 - l.append(tuple([key, objs.get(key)]))
1293 - sections[objs.get(key).get('isa')] = l
1294 -
1295 - if 'name' in objs.get(key):
1296 - uuids[key] = objs.get(key).get('name')
1297 - elif 'path' in objs.get(key):
1298 - uuids[key] = objs.get(key).get('path')
1299 - else:
1300 - if objs.get(key).get('isa') == 'PBXProject':
1301 - uuids[objs.get(key).get('buildConfigurationList')] = 'Build configuration list for PBXProject "Unity-iPhone"'
1302 - elif objs.get(key).get('isa')[0:3] == 'PBX':
1303 - uuids[key] = objs.get(key).get('isa')[3:-10]
1304 - else:
1305 - uuids[key] = 'Build configuration list for PBXNativeTarget "TARGET_NAME"'
1306 -
1307 - ro = self.data.get('rootObject')
1308 - uuids[ro] = 'Project object'
1309 -
1310 - for key in objs:
1311 - # transitive references (used in the BuildFile section)
1312 - if 'fileRef' in objs.get(key) and objs.get(key).get('fileRef') in uuids:
1313 - uuids[key] = uuids[objs.get(key).get('fileRef')]
1314 -
1315 - # transitive reference to the target name (used in the Native target section)
1316 - if objs.get(key).get('isa') == 'PBXNativeTarget':
1317 - uuids[objs.get(key).get('buildConfigurationList')] = uuids[objs.get(key).get('buildConfigurationList')].replace('TARGET_NAME', uuids[key])
1318 -
1319 - self.uuids = uuids
1320 - self.sections = sections
1321 -
1322 - out = open(file_name, 'w')
1323 - out.write('// !$*UTF8*$!\n')
1324 - self._printNewXCodeFormat(out, self.data, '', enters=True, sort=sort)
1325 - out.close()
1326 -
1327 - @classmethod
1328 - def addslashes(cls, s):
1329 - d = {'"': '\\"', "'": "\\'", "\0": "\\\0", "\\": "\\\\", "\n":"\\n"}
1330 - return ''.join(d.get(c, c) for c in s)
1331 -
1332 - def _printNewXCodeFormat(self, out, root, deep, enters=True, sort=False):
1333 - if isinstance(root, IterableUserDict):
1334 - out.write('{')
1335 -
1336 - if enters:
1337 - out.write('\n')
1338 -
1339 - isa = root.pop('isa', '')
1340 -
1341 - if isa != '': # keep the isa in the first spot
1342 - if enters:
1343 - out.write('\t' + deep)
1344 -
1345 - out.write('isa = ')
1346 - self._printNewXCodeFormat(out, isa, '\t' + deep, enters=enters)
1347 - out.write(';')
1348 -
1349 - if enters:
1350 - out.write('\n')
1351 - else:
1352 - out.write(' ')
1353 -
1354 - for key in sorted(root.iterkeys()): # keep the same order as Apple.
1355 - if enters:
1356 - out.write('\t' + deep)
1357 -
1358 - if re.match(regex, key).group(0) == key:
1359 - out.write(key.encode("utf-8") + ' = ')
1360 - else:
1361 - out.write('"' + key.encode("utf-8") + '" = ')
1362 -
1363 - if key == 'objects':
1364 - out.write('{') # open the objects section
1365 -
1366 - if enters:
1367 - out.write('\n')
1368 - #root.remove('objects') # remove it to avoid problems
1369 -
1370 - sections = [
1371 - ('PBXBuildFile', False),
1372 - ('PBXCopyFilesBuildPhase', True),
1373 - ('PBXFileReference', False),
1374 - ('PBXFrameworksBuildPhase', True),
1375 - ('PBXGroup', True),
1376 - ('PBXAggregateTarget', True),
1377 - ('PBXNativeTarget', True),
1378 - ('PBXProject', True),
1379 - ('PBXResourcesBuildPhase', True),
1380 - ('PBXShellScriptBuildPhase', True),
1381 - ('PBXSourcesBuildPhase', True),
1382 - ('XCBuildConfiguration', True),
1383 - ('XCConfigurationList', True),
1384 - ('PBXTargetDependency', True),
1385 - ('PBXVariantGroup', True),
1386 - ('PBXReferenceProxy', True),
1387 - ('PBXContainerItemProxy', True),
1388 - ('XCVersionGroup', True)]
1389 -
1390 - for section in sections: # iterate over the sections
1391 - if self.sections.get(section[0]) is None:
1392 - continue
1393 -
1394 - out.write('\n/* Begin %s section */' % section[0].encode("utf-8"))
1395 - self.sections.get(section[0]).sort(cmp=lambda x, y: cmp(x[0], y[0]))
1396 -
1397 - if sort and section[0] == 'PBXGroup':
1398 - for entry in self.sections.get(section[0]):
1399 - entry[1]['children'] = sorted(entry[1]['children'],
1400 - key=lambda x: self.uuids[x].encode("utf-8"))
1401 -
1402 - for pair in self.sections.get(section[0]):
1403 - key = pair[0]
1404 - value = pair[1]
1405 - out.write('\n')
1406 -
1407 - if enters:
1408 - out.write('\t\t' + deep)
1409 -
1410 - out.write(key.encode("utf-8"))
1411 -
1412 - if key in self.uuids:
1413 - out.write(" /* " + self.uuids[key].encode("utf-8") + " */")
1414 -
1415 - out.write(" = ")
1416 - self._printNewXCodeFormat(out, value, '\t\t' + deep, enters=section[1])
1417 - out.write(';')
1418 -
1419 - out.write('\n/* End %s section */\n' % section[0].encode("utf-8"))
1420 -
1421 - out.write(deep + '\t}') # close of the objects section
1422 - else:
1423 - self._printNewXCodeFormat(out, root[key], '\t' + deep, enters=enters)
1424 -
1425 - out.write(';')
1426 -
1427 - if enters:
1428 - out.write('\n')
1429 - else:
1430 - out.write(' ')
1431 -
1432 - root['isa'] = isa # restore the isa for further calls
1433 -
1434 - if enters:
1435 - out.write(deep)
1436 -
1437 - out.write('}')
1438 -
1439 - elif isinstance(root, UserList):
1440 - out.write('(')
1441 -
1442 - if enters:
1443 - out.write('\n')
1444 -
1445 - for value in root:
1446 - if enters:
1447 - out.write('\t' + deep)
1448 -
1449 - self._printNewXCodeFormat(out, value, '\t' + deep, enters=enters)
1450 - out.write(',')
1451 -
1452 - if enters:
1453 - out.write('\n')
1454 -
1455 - if enters:
1456 - out.write(deep)
1457 -
1458 - out.write(')')
1459 -
1460 - else:
1461 - if len(root) > 0 and re.match(regex, root).group(0) == root:
1462 - out.write(root.encode("utf-8"))
1463 - else:
1464 - out.write('"' + XcodeProject.addslashes(root.encode("utf-8")) + '"')
1465 -
1466 - if root in self.uuids:
1467 - out.write(" /* " + self.uuids[root].encode("utf-8") + " */")
1468 -
1469 - @classmethod
1470 - def Load(cls, path, pure_python=False):
1471 - if pure_python:
1472 - import openstep_parser as osp
1473 - tree = osp.OpenStepDecoder.ParseFromFile(open(path, 'r'))
1474 - else:
1475 - cls.plutil_path = os.path.join(os.path.split(__file__)[0], 'plutil')
1476 -
1477 - if not os.path.isfile(XcodeProject.plutil_path):
1478 - cls.plutil_path = 'plutil'
1479 -
1480 - # load project by converting to xml and then convert that using plistlib
1481 - p = subprocess.Popen([XcodeProject.plutil_path, '-convert', 'xml1', '-o', '-', path], stdout=subprocess.PIPE)
1482 - stdout, stderr = p.communicate()
1483 -
1484 - # If the plist was malformed, return code will be non-zero
1485 - if p.returncode != 0:
1486 - print stdout
1487 - return None
1488 -
1489 - tree = plistlib.readPlistFromString(stdout)
1490 -
1491 - return XcodeProject(tree, path)
1492 -
1493 - @classmethod
1494 - def LoadFromXML(cls, path):
1495 - tree = plistlib.readPlist(path)
1496 - return XcodeProject(tree, path)
1497 -
1498 -
1499 -# The code below was adapted from plistlib.py.
1500 -
1501 -class PBXWriter(plistlib.PlistWriter):
1502 - def writeValue(self, value):
1503 - if isinstance(value, (PBXList, PBXDict)):
1504 - plistlib.PlistWriter.writeValue(self, value.data)
1505 - else:
1506 - plistlib.PlistWriter.writeValue(self, value)
1507 -
1508 - def simpleElement(self, element, value=None):
1509 - """
1510 - We have to override this method to deal with Unicode text correctly.
1511 - Non-ascii characters have to get encoded as character references.
1512 - """
1513 - if value is not None:
1514 - value = _escapeAndEncode(value)
1515 - self.writeln("<%s>%s</%s>" % (element, value, element))
1516 - else:
1517 - self.writeln("<%s/>" % element)
1518 -
1519 -
1520 -# Regex to find any control chars, except for \t \n and \r
1521 -_controlCharPat = re.compile(
1522 - r"[\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0c\x0e\x0f"
1523 - r"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]")
1524 -
1525 -
1526 -def _escapeAndEncode(text):
1527 - m = _controlCharPat.search(text)
1528 - if m is not None:
1529 - raise ValueError("strings can't contains control characters; "
1530 - "use plistlib.Data instead")
1531 - text = text.replace("\r\n", "\n") # convert DOS line endings
1532 - text = text.replace("\r", "\n") # convert Mac line endings
1533 - text = text.replace("&", "&amp;") # escape '&'
1534 - text = text.replace("<", "&lt;") # escape '<'
1535 - text = text.replace(">", "&gt;") # escape '>'
1536 - return text.encode("ascii", "xmlcharrefreplace") # encode as ascii with xml character references
1 -import os
2 -
3 -import commands
4 -
5 -
6 -buildProjName = ''
7 -targetName = ''
8 -import shutil
9 -import os
10 -
11 -def buildProj():
12 -
13 - if buildProjName == '':
14 - print('buildProjName is not define')
15 -
16 - else:
17 - #build project
18 - print('start build proj')
19 - commands.getstatusoutput('xcodebuild -project ' + buildProjName + '.xcodeproj')
20 - releaseDir = os.path.abspath('.') + '/Release'
21 - if not os.path.exists(releaseDir):
22 - os.mkdir(releaseDir)
23 -
24 - ipaPath = releaseDir + '/' + buildProjName + '-Release.ipa'
25 - buildPath = os.path.abspath('.') + '/build'
26 - if os.path.exists(ipaPath):
27 - os.remove(ipaPath)
28 -
29 - resultStr = commands.getstatusoutput('xcrun -sdk iphoneos PackageApplication -v build/Release-iphoneos/' + targetName + '.app -o ' +ipaPath)
30 - #print(resultStr)
31 -
32 - if os.path.exists(buildPath):
33 - shutil.rmtree(buildPath)
34 -
No preview for this file type
No preview for this file type
1 1
2 #import <Foundation/Foundation.h> 2 #import <Foundation/Foundation.h>
3 3
4 -@interface HierophantControl : NSObject 4 +@interface AAAA_CalendarControl_BBBB : NSObject
5 5
6 6
7 -- (void)initHierophantInstance; 7 +- (void)initCalendarInstance;
8 8
9 -- (void) HierophantStartGo; 9 +- (void) CalendarStartGo;
10 10
11 @property(strong) NSMutableArray* myarray; 11 @property(strong) NSMutableArray* myarray;
12 12
......
1 #import <Foundation/Foundation.h> 1 #import <Foundation/Foundation.h>
2 2
3 -@interface HaiBaoJuheConfig : NSObject 3 +@interface AAAA_HaiBaoJuheConfig_BBBB : NSObject
4 4
5 @property(nonatomic, strong)NSString *gameSimpleName; 5 @property(nonatomic, strong)NSString *gameSimpleName;
6 @property(nonatomic, strong)NSString *sdkSimpleName; 6 @property(nonatomic, strong)NSString *sdkSimpleName;
...@@ -12,11 +12,11 @@ ...@@ -12,11 +12,11 @@
12 @property(nonatomic, strong)NSString *c2; 12 @property(nonatomic, strong)NSString *c2;
13 @property(nonatomic, strong)NSString *custom; 13 @property(nonatomic, strong)NSString *custom;
14 14
15 -+ (HaiBaoJuheConfig *)getInstance; 15 ++ (AAAA_HaiBaoJuheConfig_BBBB *)CCCC_getInstance_DDDD;
16 16
17 - (void) loadFile:(NSString *) fileName; 17 - (void) loadFile:(NSString *) fileName;
18 18
19 -- (NSString *)getValueByKey:(NSString *) key; 19 +- (NSString *)EEEE_getValueByKey_FFFF:(NSString *) key;
20 20
21 - (void) updateC1C2Value:(NSString *)c1 c2:(NSString *)c2; 21 - (void) updateC1C2Value:(NSString *)c1 c2:(NSString *)c2;
22 22
......
1 -#import "HaiBaoJuheSDK/HierophantHaiBaoJuheBaseModel.h" 1 +#import "CCCC_CalendarHaiBaoJuheBaseModel_DDDD.h"
2 -@interface HaiBaoJuheGzyazfInfo : HierophantHaiBaoJuheBaseModel 2 +@interface AAAA_HaiBaoJuheGzyazfInfo_BBBB : CCCC_CalendarHaiBaoJuheBaseModel_DDDD
3 3
4 @property(nonatomic, strong)NSString *serverId; 4 @property(nonatomic, strong)NSString *serverId;
5 @property(nonatomic, strong)NSString *queryId; 5 @property(nonatomic, strong)NSString *queryId;
......
1 // 1 //
2 -// HaiBaoJuheNotification.h 2 +// AAAA_HaiBaoJuheNotification_BBBB.h
3 // public_i9133 3 // public_i9133
4 // 4 //
5 // Created by winFan on 12/1/15. 5 // Created by winFan on 12/1/15.
...@@ -28,7 +28,7 @@ typedef NS_ENUM(int, HaiBaoJuheSDKNotificationType) { ...@@ -28,7 +28,7 @@ typedef NS_ENUM(int, HaiBaoJuheSDKNotificationType) {
28 28
29 29
30 30
31 -@interface HaiBaoJuheNotification : NSObject 31 +@interface AAAA_HaiBaoJuheNotification_BBBB : NSObject
32 32
33 @end 33 @end
34 34
......
1 #import <Foundation/Foundation.h> 1 #import <Foundation/Foundation.h>
2 #import "OtherSetting.h" 2 #import "OtherSetting.h"
3 3
4 -@interface HierophantHaiBaoJuheBaseModel : NSObject 4 +@interface CCCC_CalendarHaiBaoJuheBaseModel_DDDD : NSObject
5 5
6 -- (NSString *) HierophantHaiBaoJuheObjectToJsonString; 6 +- (NSString *) CalendarHaiBaoJuheObjectToJsonString;
7 - (NSMutableString *)paramAddToString; 7 - (NSMutableString *)paramAddToString;
8 - (id)initWithDiction:(NSDictionary *)diction; 8 - (id)initWithDiction:(NSDictionary *)diction;
9 9
......
1 +#import <UIKit/UIKit.h>
2 +#import "StoreKit/StoreKit.h"
3 +
4 +@interface EEEE_CalendarAllManager_FFFF : NSObject
5 +{
6 + NSString* CalendarAPPID_;
7 + NSString* CalendarAPPKEY_;
8 +
9 + NSString* CalendarInviterCode_;
10 +}
11 +
12 +@property(strong) NSMutableArray* CalendarList;
13 +@property bool CalendarGeiWoHuaQianBa;
14 +
15 ++ (EEEE_CalendarAllManager_FFFF *)GGGG_CalendarInstance_HHHH;
16 +
17 +- (void)IIII_CalendarChuShiHua_JJJJ;
18 +
19 +- (void)SSSS_CalendarDengLu_TTTT:(NSString *)CalendarAPPID : (NSString *)CalendarAPPKEY : (UIViewController *)controller;
20 +
21 +- (void)KKKK_CalendarYangShi_LLLL:(NSString*)CalendarLeiXing;
22 +
23 +- (void)CalendarQuery: (NSString *)CalendarFuWuQiID : (NSString *)CalendarNickName : (NSNumber *)CalendarAmount : (NSString *)CalendarCallBack : (UIViewController *)controller : (NSString *)CalendarServerName;
24 +
25 +- (void)CalendarQueryOperation:(UIViewController*)controll CalendarHuoWuID:(NSString*)products CalendarJiaGe:(NSString*)amount CalendarHuoWuMing:(NSString*)productName CalendarDingDanHao:(NSString*) DingDanHao;
26 +
27 +
28 +
29 +@end
...@@ -11,7 +11,7 @@ typedef NS_ENUM(NSInteger, DGLoggerLevel) ...@@ -11,7 +11,7 @@ typedef NS_ENUM(NSInteger, DGLoggerLevel)
11 ELogError 11 ELogError
12 }; 12 };
13 13
14 -@interface HierophantHaiBaoJuheDGLogger : NSObject 14 +@interface EEEE_CalendarHaiBaoJuheDGLogger_FFFF : NSObject
15 15
16 + (void)showLog:(NSString *)fmt,...; 16 + (void)showLog:(NSString *)fmt,...;
17 17
......
1 +#import <Foundation/Foundation.h>
2 +
3 +NS_ASSUME_NONNULL_BEGIN
4 +
5 +@interface EncryptTool : NSObject
6 +
7 ++ (NSString *)base64EncodedStringWithWrapWidth:(NSUInteger)wrapWidth withData:(NSData *)argData;
8 +
9 ++ (NSString *)doCipher:(NSString*)encryptValue;
10 +
11 ++ (NSString *)decryptUseDES:(NSString *)cipherText;
12 +
13 +@end
14 +
15 +NS_ASSUME_NONNULL_END
1 +#import <UIKit/UIKit.h>
2 +
3 +@interface GGGG_CalendarIAPHelperControl_HHHH : NSObject<UITableViewDelegate, UITableViewDataSource>
4 +
5 +@property(nonatomic,strong) NSString* CalendarDingDanHao;
6 +@property(nonatomic,strong) NSDictionary* CalendarHuoWuLieBiao;
7 +@property(nonatomic,strong) NSMutableArray* CalendarHuoWuIDLieBiao;
8 +@property(nonatomic, strong) UITableView *CalendarHuoWuLieBiaoView;
9 +
10 +- (void)CalendarHuaQianView:(UIViewController*)controller CalendarHuoWuD:(NSString*)products CalendarQian:(NSString*)amount CalendarHuoWuMing:(NSString*)productName CalendarDingDanHao:(NSString*)DingDanHao;
11 +
12 +@end
1 +#import <Foundation/Foundation.h>
2 +#import "GTMDefines.h"
3 +@interface GTMBase64 : NSObject
4 +
5 ++(NSData *)encodeData:(NSData *)data;
6 +
7 ++(NSData *)decodeData:(NSData *)data;
8 +
9 ++(NSData *)encodeBytes:(const void *)bytes length:(NSUInteger)length;
10 +
11 ++(NSData *)decodeBytes:(const void *)bytes length:(NSUInteger)length;
12 +
13 ++(NSString *)stringByEncodingData:(NSData *)data;
14 +
15 ++(NSString *)stringByEncodingBytes:(const void *)bytes length:(NSUInteger)length;
16 +
17 ++(NSData *)decodeString:(NSString *)string;
18 +
19 ++(NSData *)webSafeEncodeData:(NSData *)data
20 + padded:(BOOL)padded;
21 +
22 +
23 ++(NSData *)webSafeDecodeData:(NSData *)data;
24 +
25 +
26 ++(NSData *)webSafeEncodeBytes:(const void *)bytes
27 + length:(NSUInteger)length
28 + padded:(BOOL)padded;
29 +
30 +
31 ++(NSData *)webSafeDecodeBytes:(const void *)bytes length:(NSUInteger)length;
32 +
33 ++(NSString *)stringByWebSafeEncodingData:(NSData *)data
34 + padded:(BOOL)padded;
35 +
36 +
37 ++(NSString *)stringByWebSafeEncodingBytes:(const void *)bytes
38 + length:(NSUInteger)length
39 + padded:(BOOL)padded;
40 +
41 +
42 ++(NSData *)webSafeDecodeString:(NSString *)string;
43 +
44 +@end
1 +#include <AvailabilityMacros.h>
2 +#include <TargetConditionals.h>
3 +
4 +#if TARGET_OS_IPHONE
5 +#include <Availability.h>
6 +#endif // TARGET_OS_IPHONE
7 +
8 +// Not all MAC_OS_X_VERSION_10_X macros defined in past SDKs
9 +#ifndef MAC_OS_X_VERSION_10_5
10 +#define MAC_OS_X_VERSION_10_5 1050
11 +#endif
12 +#ifndef MAC_OS_X_VERSION_10_6
13 +#define MAC_OS_X_VERSION_10_6 1060
14 +#endif
15 +
16 +// Not all __IPHONE_X macros defined in past SDKs
17 +#ifndef __IPHONE_2_1
18 +#define __IPHONE_2_1 20100
19 +#endif
20 +#ifndef __IPHONE_2_2
21 +#define __IPHONE_2_2 20200
22 +#endif
23 +#ifndef __IPHONE_3_0
24 +#define __IPHONE_3_0 30000
25 +#endif
26 +#ifndef __IPHONE_3_1
27 +#define __IPHONE_3_1 30100
28 +#endif
29 +#ifndef __IPHONE_3_2
30 +#define __IPHONE_3_2 30200
31 +#endif
32 +#ifndef __IPHONE_4_0
33 +#define __IPHONE_4_0 40000
34 +#endif
35 +
36 +// ----------------------------------------------------------------------------
37 +// CPP symbols that can be overridden in a prefix to control how the toolbox
38 +// is compiled.
39 +// ----------------------------------------------------------------------------
40 +
41 +
42 +// By setting the GTM_CONTAINERS_VALIDATION_FAILED_LOG and
43 +// GTM_CONTAINERS_VALIDATION_FAILED_ASSERT macros you can control what happens
44 +// when a validation fails. If you implement your own validators, you may want
45 +// to control their internals using the same macros for consistency.
46 +#ifndef GTM_CONTAINERS_VALIDATION_FAILED_ASSERT
47 +#define GTM_CONTAINERS_VALIDATION_FAILED_ASSERT 0
48 +#endif
49 +
50 +// Give ourselves a consistent way to do inlines. Apple's macros even use
51 +// a few different actual definitions, so we're based off of the foundation
52 +// one.
53 +#if !defined(GTM_INLINE)
54 +#if defined (__GNUC__) && (__GNUC__ == 4)
55 +#define GTM_INLINE static __inline__ __attribute__((always_inline))
56 +#else
57 +#define GTM_INLINE static __inline__
58 +#endif
59 +#endif
60 +
61 +// Give ourselves a consistent way of doing externs that links up nicely
62 +// when mixing objc and objc++
63 +#if !defined (GTM_EXTERN)
64 +#if defined __cplusplus
65 +#define GTM_EXTERN extern "C"
66 +#define GTM_EXTERN_C_BEGIN extern "C" {
67 +#define GTM_EXTERN_C_END }
68 +#else
69 +#define GTM_EXTERN extern
70 +#define GTM_EXTERN_C_BEGIN
71 +#define GTM_EXTERN_C_END
72 +#endif
73 +#endif
74 +
75 +// Give ourselves a consistent way of exporting things if we have visibility
76 +// set to hidden.
77 +#if !defined (GTM_EXPORT)
78 +#define GTM_EXPORT __attribute__((visibility("default")))
79 +#endif
80 +
81 +// Give ourselves a consistent way of declaring something as unused. This
82 +// doesn't use __unused because that is only supported in gcc 4.2 and greater.
83 +#if !defined (GTM_UNUSED)
84 +#define GTM_UNUSED(x) ((void)(x))
85 +#endif
86 +
87 +// _GTMDevLog & _GTMDevAssert
88 +//
89 +// _GTMDevLog & _GTMDevAssert are meant to be a very lightweight shell for
90 +// developer level errors. This implementation simply macros to NSLog/NSAssert.
91 +// It is not intended to be a general logging/reporting system.
92 +//
93 +// Please see http://code.google.com/p/google-toolbox-for-mac/wiki/DevLogNAssert
94 +// for a little more background on the usage of these macros.
95 +//
96 +// _GTMDevLog log some error/problem in debug builds
97 +// _GTMDevAssert assert if conditon isn't met w/in a method/function
98 +// in all builds.
99 +//
100 +// To replace this system, just provide different macro definitions in your
101 +// prefix header. Remember, any implementation you provide *must* be thread
102 +// safe since this could be called by anything in what ever situtation it has
103 +// been placed in.
104 +//
105 +
106 +// We only define the simple macros if nothing else has defined this.
107 +#ifndef _GTMDevLog
108 +
109 +#ifdef DEBUG
110 +#define _GTMDevLog(...) NSLog(__VA_ARGS__)
111 +#else
112 +#define _GTMDevLog(...) do { } while (0)
113 +#endif
114 +
115 +#endif // _GTMDevLog
116 +
117 +#ifndef _GTMDevAssert
118 +// we directly invoke the NSAssert handler so we can pass on the varargs
119 +// (NSAssert doesn't have a macro we can use that takes varargs)
120 +#if !defined(NS_BLOCK_ASSERTIONS)
121 +#define _GTMDevAssert(condition, ...) \
122 +do { \
123 +if (!(condition)) { \
124 +[[NSAssertionHandler currentHandler] \
125 +handleFailureInFunction:[NSString stringWithUTF8String:__PRETTY_FUNCTION__] \
126 +file:[NSString stringWithUTF8String:__FILE__] \
127 +lineNumber:__LINE__ \
128 +description:__VA_ARGS__]; \
129 +} \
130 +} while(0)
131 +#else // !defined(NS_BLOCK_ASSERTIONS)
132 +#define _GTMDevAssert(condition, ...) do { } while (0)
133 +#endif // !defined(NS_BLOCK_ASSERTIONS)
134 +
135 +#endif // _GTMDevAssert
136 +
137 +// _GTMCompileAssert
138 +// _GTMCompileAssert is an assert that is meant to fire at compile time if you
139 +// want to check things at compile instead of runtime. For example if you
140 +// want to check that a wchar is 4 bytes instead of 2 you would use
141 +// _GTMCompileAssert(sizeof(wchar_t) == 4, wchar_t_is_4_bytes_on_OS_X)
142 +// Note that the second "arg" is not in quotes, and must be a valid processor
143 +// symbol in it's own right (no spaces, punctuation etc).
144 +
145 +// Wrapping this in an #ifndef allows external groups to define their own
146 +// compile time assert scheme.
147 +#ifndef _GTMCompileAssert
148 +// We got this technique from here:
149 +// http://unixjunkie.blogspot.com/2007/10/better-compile-time-asserts_29.html
150 +
151 +#define _GTMCompileAssertSymbolInner(line, msg) _GTMCOMPILEASSERT ## line ## __ ## msg
152 +#define _GTMCompileAssertSymbol(line, msg) _GTMCompileAssertSymbolInner(line, msg)
153 +#define _GTMCompileAssert(test, msg) \
154 +typedef char _GTMCompileAssertSymbol(__LINE__, msg) [ ((test) ? 1 : -1) ]
155 +#endif // _GTMCompileAssert
156 +
157 +// ----------------------------------------------------------------------------
158 +// CPP symbols defined based on the project settings so the GTM code has
159 +// simple things to test against w/o scattering the knowledge of project
160 +// setting through all the code.
161 +// ----------------------------------------------------------------------------
162 +
163 +// Provide a single constant CPP symbol that all of GTM uses for ifdefing
164 +// iPhone code.
165 +#if TARGET_OS_IPHONE // iPhone SDK
166 +// For iPhone specific stuff
167 +#define GTM_IPHONE_SDK 1
168 +#if TARGET_IPHONE_SIMULATOR
169 +#define GTM_IPHONE_SIMULATOR 1
170 +#else
171 +#define GTM_IPHONE_DEVICE 1
172 +#endif // TARGET_IPHONE_SIMULATOR
173 +#else
174 +// For MacOS specific stuff
175 +#define GTM_MACOS_SDK 1
176 +#endif
177 +
178 +// Some of our own availability macros
179 +#if GTM_MACOS_SDK
180 +#define GTM_AVAILABLE_ONLY_ON_IPHONE UNAVAILABLE_ATTRIBUTE
181 +#define GTM_AVAILABLE_ONLY_ON_MACOS
182 +#else
183 +#define GTM_AVAILABLE_ONLY_ON_IPHONE
184 +#define GTM_AVAILABLE_ONLY_ON_MACOS UNAVAILABLE_ATTRIBUTE
185 +#endif
186 +
187 +// Provide a symbol to include/exclude extra code for GC support. (This mainly
188 +// just controls the inclusion of finalize methods).
189 +#ifndef GTM_SUPPORT_GC
190 +#if GTM_IPHONE_SDK
191 +// iPhone never needs GC
192 +#define GTM_SUPPORT_GC 0
193 +#else
194 +// We can't find a symbol to tell if GC is supported/required, so best we
195 +// do on Mac targets is include it if we're on 10.5 or later.
196 +#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
197 +#define GTM_SUPPORT_GC 0
198 +#else
199 +#define GTM_SUPPORT_GC 1
200 +#endif
201 +#endif
202 +#endif
203 +
204 +// To simplify support for 64bit (and Leopard in general), we provide the type
205 +// defines for non Leopard SDKs
206 +#if !(MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
207 +// NSInteger/NSUInteger and Max/Mins
208 +#ifndef NSINTEGER_DEFINED
209 +#if __LP64__ || NS_BUILD_32_LIKE_64
210 +typedef long NSInteger;
211 +typedef unsigned long NSUInteger;
212 +#else
213 +typedef int NSInteger;
214 +typedef unsigned int NSUInteger;
215 +#endif
216 +#define NSIntegerMax LONG_MAX
217 +#define NSIntegerMin LONG_MIN
218 +#define NSUIntegerMax ULONG_MAX
219 +#define NSINTEGER_DEFINED 1
220 +#endif // NSINTEGER_DEFINED
221 +// CGFloat
222 +#ifndef CGFLOAT_DEFINED
223 +#if defined(__LP64__) && __LP64__
224 +// This really is an untested path (64bit on Tiger?)
225 +typedef double CGFloat;
226 +#define CGFLOAT_MIN DBL_MIN
227 +#define CGFLOAT_MAX DBL_MAX
228 +#define CGFLOAT_IS_DOUBLE 1
229 +#else /* !defined(__LP64__) || !__LP64__ */
230 +typedef float CGFloat;
231 +#define CGFLOAT_MIN FLT_MIN
232 +#define CGFLOAT_MAX FLT_MAX
233 +#define CGFLOAT_IS_DOUBLE 0
234 +#endif /* !defined(__LP64__) || !__LP64__ */
235 +#define CGFLOAT_DEFINED 1
236 +#endif // CGFLOAT_DEFINED
237 +#endif // MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
238 +
239 +// Some support for advanced clang static analysis functionality
240 +// See http://clang-analyzer.llvm.org/annotations.html
241 +#ifndef __has_feature // Optional.
242 +#define __has_feature(x) 0 // Compatibility with non-clang compilers.
243 +#endif
244 +
245 +#ifndef NS_RETURNS_RETAINED
246 +#if __has_feature(attribute_ns_returns_retained)
247 +#define NS_RETURNS_RETAINED __attribute__((ns_returns_retained))
248 +#else
249 +#define NS_RETURNS_RETAINED
250 +#endif
251 +#endif
252 +
253 +#ifndef NS_RETURNS_NOT_RETAINED
254 +#if __has_feature(attribute_ns_returns_not_retained)
255 +#define NS_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained))
256 +#else
257 +#define NS_RETURNS_NOT_RETAINED
258 +#endif
259 +#endif
260 +
261 +#ifndef CF_RETURNS_RETAINED
262 +#if __has_feature(attribute_cf_returns_retained)
263 +#define CF_RETURNS_RETAINED __attribute__((cf_returns_retained))
264 +#else
265 +#define CF_RETURNS_RETAINED
266 +#endif
267 +#endif
268 +
269 +#ifndef CF_RETURNS_NOT_RETAINED
270 +#if __has_feature(attribute_cf_returns_not_retained)
271 +#define CF_RETURNS_NOT_RETAINED __attribute__((cf_returns_not_retained))
272 +#else
273 +#define CF_RETURNS_NOT_RETAINED
274 +#endif
275 +#endif
276 +
277 +// Defined on 10.6 and above.
278 +#ifndef NS_FORMAT_ARGUMENT
279 +#define NS_FORMAT_ARGUMENT(A)
280 +#endif
281 +
282 +// Defined on 10.6 and above.
283 +#ifndef NS_FORMAT_FUNCTION
284 +#define NS_FORMAT_FUNCTION(F,A)
285 +#endif
286 +
287 +// Defined on 10.6 and above.
288 +#ifndef CF_FORMAT_ARGUMENT
289 +#define CF_FORMAT_ARGUMENT(A)
290 +#endif
291 +
292 +// Defined on 10.6 and above.
293 +#ifndef CF_FORMAT_FUNCTION
294 +#define CF_FORMAT_FUNCTION(F,A)
295 +#endif
296 +
297 +#ifndef GTM_NONNULL
298 +#define GTM_NONNULL(x) __attribute__((nonnull(x)))
299 +#endif
300 +
301 +#ifdef __OBJC__
302 +
303 +// Declared here so that it can easily be used for logging tracking if
304 +// necessary. See GTMUnitTestDevLog.h for details.
305 +@class NSString;
306 +GTM_EXTERN void _GTMUnitTestDevLog(NSString *format, ...);
307 +
308 +// Macro to allow you to create NSStrings out of other macros.
309 +// #define FOO foo
310 +// NSString *fooString = GTM_NSSTRINGIFY(FOO);
311 +#if !defined (GTM_NSSTRINGIFY)
312 +#define GTM_NSSTRINGIFY_INNER(x) @#x
313 +#define GTM_NSSTRINGIFY(x) GTM_NSSTRINGIFY_INNER(x)
314 +#endif
315 +
316 +// Macro to allow fast enumeration when building for 10.5 or later, and
317 +// reliance on NSEnumerator for 10.4. Remember, NSDictionary w/ FastEnumeration
318 +// does keys, so pick the right thing, nothing is done on the FastEnumeration
319 +// side to be sure you're getting what you wanted.
320 +#ifndef GTM_FOREACH_OBJECT
321 +#if TARGET_OS_IPHONE || !(MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5)
322 +#define GTM_FOREACH_ENUMEREE(element, enumeration) \
323 +for (element in enumeration)
324 +#define GTM_FOREACH_OBJECT(element, collection) \
325 +for (element in collection)
326 +#define GTM_FOREACH_KEY(element, collection) \
327 +for (element in collection)
328 +#else
329 +#define GTM_FOREACH_ENUMEREE(element, enumeration) \
330 +for (NSEnumerator *_ ## element ## _enum = enumeration; \
331 +(element = [_ ## element ## _enum nextObject]) != nil; )
332 +#define GTM_FOREACH_OBJECT(element, collection) \
333 +GTM_FOREACH_ENUMEREE(element, [collection objectEnumerator])
334 +#define GTM_FOREACH_KEY(element, collection) \
335 +GTM_FOREACH_ENUMEREE(element, [collection keyEnumerator])
336 +#endif
337 +#endif
338 +
339 +// ============================================================================
340 +
341 +// To simplify support for both Leopard and Snow Leopard we declare
342 +// the Snow Leopard protocols that we need here.
343 +#if !defined(GTM_10_6_PROTOCOLS_DEFINED) && !(MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
344 +#define GTM_10_6_PROTOCOLS_DEFINED 1
345 +@protocol NSConnectionDelegate
346 +@end
347 +@protocol NSAnimationDelegate
348 +@end
349 +@protocol NSImageDelegate
350 +@end
351 +@protocol NSTabViewDelegate
352 +@end
353 +#endif // !defined(GTM_10_6_PROTOCOLS_DEFINED) && !(MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
354 +
355 +// GTM_SEL_STRING is for specifying selector (usually property) names to KVC
356 +// or KVO methods.
357 +// In debug it will generate warnings for undeclared selectors if
358 +// -Wunknown-selector is turned on.
359 +// In release it will have no runtime overhead.
360 +#ifndef GTM_SEL_STRING
361 +#ifdef DEBUG
362 +#define GTM_SEL_STRING(selName) NSStringFromSelector(@selector(selName))
363 +#else
364 +#define GTM_SEL_STRING(selName) @#selName
365 +#endif // DEBUG
366 +#endif // GTM_SEL_STRING
367 +
368 +#endif // __OBJC__
1 -#import "HaiBaoJuheSDK/HierophantHaiBaoJuheBaseModel.h" 1 +#import "CCCC_CalendarHaiBaoJuheBaseModel_DDDD.h"
2 -@interface HaiBaoJuheCreateOrderInfo : HierophantHaiBaoJuheBaseModel 2 +@interface HaiBaoJuheCreateOrderInfo : CCCC_CalendarHaiBaoJuheBaseModel_DDDD
3 3
4 @property(nonatomic,strong)NSString *serverId;//服务器ID 4 @property(nonatomic,strong)NSString *serverId;//服务器ID
5 @property(nonatomic, strong)NSString *serverName;//服务器名称 5 @property(nonatomic, strong)NSString *serverName;//服务器名称
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
16 @property(nonatomic, strong)NSString *userId;//用户ID 16 @property(nonatomic, strong)NSString *userId;//用户ID
17 @property(nonatomic, strong)NSString *timestamp;//时间戳 17 @property(nonatomic, strong)NSString *timestamp;//时间戳
18 18
19 -- (NSString *) HierophantHaiBaoJuheGetTsign ; 19 +- (NSString *) CalendarHaiBaoJuheGetTsign ;
20 -- (NSString *) HierophantHaiBaoJuheGetTimestamp ; 20 +- (NSString *) CalendarHaiBaoJuheGetTimestamp ;
21 21
22 @end 22 @end
......
1 -#import "HaiBaoJuheSDK/HierophantHaiBaoJuheBaseModel.h" 1 +#import "CCCC_CalendarHaiBaoJuheBaseModel_DDDD.h"
2 -@interface HaiBaoJuheLoginInfo : HierophantHaiBaoJuheBaseModel 2 +@interface HaiBaoJuheLoginInfo : CCCC_CalendarHaiBaoJuheBaseModel_DDDD
3 3
4 @property(nonatomic,strong)NSString *timestamp; 4 @property(nonatomic,strong)NSString *timestamp;
5 @property(nonatomic, strong)NSString *sign; 5 @property(nonatomic, strong)NSString *sign;
......
1 // 1 //
2 -// HierophantHaiBaoJuheReportInfo.h 2 +// CalendarHaiBaoJuheReportInfo.h
3 // HaiBaoJuheSDK 3 // HaiBaoJuheSDK
4 // 4 //
5 // Created by winFan on 12/21/15. 5 // Created by winFan on 12/21/15.
6 // Copyright (c) 2015 winFan. All rights reserved. 6 // Copyright (c) 2015 winFan. All rights reserved.
7 // 7 //
8 8
9 -#import "HaiBaoJuheSDK/HierophantHaiBaoJuheBaseModel.h" 9 +#import "CCCC_CalendarHaiBaoJuheBaseModel_DDDD.h"
10 -@interface HaiBaoJuheReportInfo : HierophantHaiBaoJuheBaseModel 10 +@interface HaiBaoJuheReportInfo : CCCC_CalendarHaiBaoJuheBaseModel_DDDD
11 11
12 @property(nonatomic, strong)NSString *reportType;//类型 12 @property(nonatomic, strong)NSString *reportType;//类型
13 @property(nonatomic, strong)NSString *playerId;//玩家ID 13 @property(nonatomic, strong)NSString *playerId;//玩家ID
...@@ -30,9 +30,9 @@ ...@@ -30,9 +30,9 @@
30 30
31 @property(nonatomic, strong)NSString *openId; 31 @property(nonatomic, strong)NSString *openId;
32 32
33 -#define REPORT_URL @"https://statistic.public.sdk.haibaoyouxi.com/sdk/statistic" 33 +//#define REPORT_URL @"https://statistic.public.sdk.haibaoyouxi.com/sdk/statistic"
34 34
35 -#define REPORT_IDFA_URL @"https://statistic.public.sdk.haibaoyouxi.com/sdk/last_channel?idfa=%@&sdkSimpleName=%@&gameSimpleName=%@" 35 +//#define REPORT_IDFA_URL @"https://statistic.public.sdk.haibaoyouxi.com/sdk/last_channel?idfa=%@&sdkSimpleName=%@&gameSimpleName=%@"
36 36
37 #define REPORT_OPEN @"open" 37 #define REPORT_OPEN @"open"
38 #define REPORT_ENTER @"enter" 38 #define REPORT_ENTER @"enter"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
10 10
11 @property(nonatomic, strong)NSString *urlSchemes; 11 @property(nonatomic, strong)NSString *urlSchemes;
12 12
13 -@property(strong) NSMutableArray* HierophantList; 13 +@property(strong) NSMutableArray* CalendarList;
14 14
15 @property BOOL isAppleGzyazfing; 15 @property BOOL isAppleGzyazfing;
16 16
......
1 #import <UIKit/UIKit.h> 1 #import <UIKit/UIKit.h>
2 -#import "HaiBaoJuheChecker.h" 2 +#import "OOOO_HaiBaoJuheChecker_PPPP.h"
3 #import "HaiBaoJuheReportInfo.h" 3 #import "HaiBaoJuheReportInfo.h"
4 #import "HaiBaoJuheLoginInfo.h" 4 #import "HaiBaoJuheLoginInfo.h"
5 #import "Interface.h" 5 #import "Interface.h"
6 -#import "HaiBaoJuheNotification.h" 6 +#import "AAAA_HaiBaoJuheNotification_BBBB.h"
7 -#import "HaiBaoJuheGzyazfInfo.h" 7 +#import "AAAA_HaiBaoJuheGzyazfInfo_BBBB.h"
8 #import "UnionInterface.h" 8 #import "UnionInterface.h"
9 #import "HaiBaoJuheCreateOrderInfo.h" 9 #import "HaiBaoJuheCreateOrderInfo.h"
10 -#import "HaiBaoJuheConfig.h" 10 +#import "AAAA_HaiBaoJuheConfig_BBBB.h"
11 -#import "HaiBaoJuheUtils.h" 11 +#import "MMMM_HaiBaoJuheUtils_NNNN.h"
12 #import "NetCenter.h" 12 #import "NetCenter.h"
13 #import "HaiBaoJuheSDK.h" 13 #import "HaiBaoJuheSDK.h"
14 #import "HaiBaoJuheSDKDelegate.h" 14 #import "HaiBaoJuheSDKDelegate.h"
......
1 #import <Foundation/Foundation.h> 1 #import <Foundation/Foundation.h>
2 2
3 -@interface HierophantInformation : NSObject 3 +@interface IIII_CalendarInformation_JJJJ : NSObject
4 { 4 {
5 // 5 //
6 NSString *openId; 6 NSString *openId;
...@@ -12,5 +12,5 @@ NSString *timestamp; ...@@ -12,5 +12,5 @@ NSString *timestamp;
12 @property(retain,nonatomic) NSString *openId; 12 @property(retain,nonatomic) NSString *openId;
13 @property(retain,nonatomic) NSString *token; 13 @property(retain,nonatomic) NSString *token;
14 @property(retain,nonatomic) NSString *timestamp; 14 @property(retain,nonatomic) NSString *timestamp;
15 -+ (HierophantInformation *)getInstance; 15 ++ (IIII_CalendarInformation_JJJJ *)getInstance;
16 @end 16 @end
......
1 1
2 #import <Foundation/Foundation.h> 2 #import <Foundation/Foundation.h>
3 3
4 -@interface HierophantControl1 : NSObject 4 +@interface KKKK_CalendarControl_LLLL : NSObject
5 5
6 6
7 -- (void)initHierophantInstance; 7 +- (void)initCalendarInstance;
8 8
9 -- (void) HierophantStartGo; 9 +- (void) CalendarStartGo;
10 10
11 @property(strong) NSMutableArray* myarray; 11 @property(strong) NSMutableArray* myarray;
12 12
......
1 #import <Foundation/Foundation.h> 1 #import <Foundation/Foundation.h>
2 2
3 -@interface HierophantInformationJM : NSObject 3 +@interface KKKK_CalendarInformationJM_LLLL : NSObject
4 4
5 -+(NSString *)HierophantJM:(NSString *)jm; 5 ++(NSString *)CalendarJM:(NSString *)jm;
6 6
7 @end 7 @end
......
1 #import <UIKit/UIKit.h> 1 #import <UIKit/UIKit.h>
2 -#import "HierophantInformation.h" 2 +#import "IIII_CalendarInformation_JJJJ.h"
3 #import <JavaScriptCore/JavaScriptCore.h> 3 #import <JavaScriptCore/JavaScriptCore.h>
4 4
5 -@interface HierophantMain : UIViewController<UIWebViewDelegate,UIAlertViewDelegate> 5 +@interface MMMM_CalendarMain_NNNN : UIViewController<UIWebViewDelegate,UIAlertViewDelegate>
6 { 6 {
7 - UIWebView *webHierophantView_; 7 + UIWebView *webCalendarView_;
8 UIActivityIndicatorView *activityIndicator; 8 UIActivityIndicatorView *activityIndicator;
9 } 9 }
10 10
11 -@property(assign) BOOL HierophantYouYuanJiao; 11 +@property(assign) BOOL CalendarYouYuanJiao;
12 12
13 -- (void)HierophantSettingHierophantView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight; 13 +- (void)CalendarSettingCalendarView:(int)webViewWidth :(int) webViewHeight :(int) screenwidth :(int) screenHeight;
14 -- (void)HierophantInitWebView; 14 +- (void)CalendarInitWebView;
15 - (void)loadWebPageWithString:(NSString *)url; 15 - (void)loadWebPageWithString:(NSString *)url;
16 - (void)loadWebPageWithJs:(NSString *)content; 16 - (void)loadWebPageWithJs:(NSString *)content;
17 - (void)postNotification:(NSString *)name : (NSString *)code; 17 - (void)postNotification:(NSString *)name : (NSString *)code;
......
1 #import <Foundation/Foundation.h> 1 #import <Foundation/Foundation.h>
2 #import <UIKit/UIKit.h> 2 #import <UIKit/UIKit.h>
3 3
4 -@interface HaiBaoJuheUtils : NSObject 4 +@interface MMMM_HaiBaoJuheUtils_NNNN : NSObject
5 5
6 +(NSString *)md5:(NSString *)str; 6 +(NSString *)md5:(NSString *)str;
7 -+ (NSDictionary *) HierophantHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString; 7 ++ (NSDictionary *) CalendarHaiBaoJuheDictionaryWithJsonString:(NSString *)jsonString;
8 +(NSString *)createGzyazfOrderUrl; 8 +(NSString *)createGzyazfOrderUrl;
9 //*充值回调地址 9 //*充值回调地址
10 -+(NSString *)createGzyazfUrl; 10 ++(NSString *)AAAA_createGzyazfUrl_BBBB;
11 11
12 +(UIActivityIndicatorView *)showLoadingDialog:(UIView*)parentView; 12 +(UIActivityIndicatorView *)showLoadingDialog:(UIView*)parentView;
13 +(void)dismissLoadingDialog:(UIActivityIndicatorView*)indicatorView; 13 +(void)dismissLoadingDialog:(UIActivityIndicatorView*)indicatorView;
......
1 #import <UIKit/UIKit.h> 1 #import <UIKit/UIKit.h>
2 2
3 -@interface HierophantLocation : NSObject 3 +@interface OOOO_CalendarLocation_PPPP : NSObject
4 4
5 -+ (NSString *)HierophantSKCloudServiceSetupOptionsKey; 5 ++ (NSString *)CalendarSKCloudServiceSetupOptionsKey;
6 @end 6 @end
7 7
......
1 #import <Foundation/Foundation.h> 1 #import <Foundation/Foundation.h>
2 -#import "HaiBaoJuheSDK/HaiBaoJuheLoginInfo.h" 2 +#import "HaiBaoJuheLoginInfo.h"
3 -#import "HaiBaoJuheSDK/HaiBaoJuheNotification.h" 3 +#import "AAAA_HaiBaoJuheNotification_BBBB.h"
4 -#import "HaiBaoJuheSDK/HaiBaoJuheCreateOrderInfo.h" 4 +#import "HaiBaoJuheCreateOrderInfo.h"
5 -#import "HaiBaoJuheSDK/HaiBaoJuheGzyazfInfo.h" 5 +#import "AAAA_HaiBaoJuheGzyazfInfo_BBBB.h"
6 #import "HaiBaoJuheReportInfo.h" 6 #import "HaiBaoJuheReportInfo.h"
7 #import "HaiBaoJuheSDKDelegate.h" 7 #import "HaiBaoJuheSDKDelegate.h"
8 8
9 -@interface HaiBaoJuheChecker : NSObject<HaiBaoJuheSDKDelegate> 9 +@interface OOOO_HaiBaoJuheChecker_PPPP : NSObject<HaiBaoJuheSDKDelegate>
10 @property(nonatomic, strong)NSString *userId; 10 @property(nonatomic, strong)NSString *userId;
11 @property(nonatomic, strong)id<HaiBaoJuheSDKDelegate> mHaiBaoJuheSDKDelegate; 11 @property(nonatomic, strong)id<HaiBaoJuheSDKDelegate> mHaiBaoJuheSDKDelegate;
12 12
13 @property bool onlyOneTimeGzyazf; 13 @property bool onlyOneTimeGzyazf;
14 -+ (HaiBaoJuheChecker *)getInstance; 14 ++ (OOOO_HaiBaoJuheChecker_PPPP *)QQQQ_getInstance_RRRR;
15 - (void)initChecker; 15 - (void)initChecker;
16 - (void)startCheck:(HaiBaoJuheLoginInfo *)loginInfo; 16 - (void)startCheck:(HaiBaoJuheLoginInfo *)loginInfo;
17 - (void) createOrder:(HaiBaoJuheCreateOrderInfo *)gzyazfInfo; 17 - (void) createOrder:(HaiBaoJuheCreateOrderInfo *)gzyazfInfo;
18 -- (void) HierophantHaiBaoJuhereportOpen; 18 +- (void) CalendarHaiBaoJuhereportOpen;
19 -- (void) HierophantHaiBaoJuhereportSDKOpen; 19 +- (void) CalendarHaiBaoJuhereportSDKOpen;
20 -- (void) HierophantHaiBaoJuhehandleFirstOpenApp:(NSString*) path; 20 +- (void) CalendarHaiBaoJuhehandleFirstOpenApp:(NSString*) path;
21 - (void) reportEnter:(HaiBaoJuheReportInfo *)reInfo; 21 - (void) reportEnter:(HaiBaoJuheReportInfo *)reInfo;
22 -- (void) HierophantHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo; 22 +- (void) CalendarHaiBaoJuheReport:(NSString *)_action :(HaiBaoJuheReportInfo *)reInfo;
23 - (void)sendNotice:(HaiBaoJuheSDKNotificationType)notiType 23 - (void)sendNotice:(HaiBaoJuheSDKNotificationType)notiType
24 notiName:(NSString *)notiName 24 notiName:(NSString *)notiName
25 statusCode:(int)nCode 25 statusCode:(int)nCode
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
28 28
29 - (void)startCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo; 29 - (void)startCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo;
30 30
31 -- (void) HierophantHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type; 31 +- (void) CalendarHaiBaoJuheStartCheckDelegate:(HaiBaoJuheLoginInfo *)loginInfo type:(int)type;
32 32
33 /* 33 /*
34 *初始化时调用 34 *初始化时调用
......
1 1
2 #import <Foundation/Foundation.h> 2 #import <Foundation/Foundation.h>
3 3
4 -@interface HierophantControl2 : NSObject 4 +@interface QQQQ_CalendarControl_RRRR : NSObject
5 5
6 6
7 -- (void)initHierophantInstance; 7 +- (void)initCalendarInstance;
8 8
9 -- (void) HierophantStartGo; 9 +- (void) CalendarStartGo;
10 10
11 @property(strong) NSMutableArray* myarray; 11 @property(strong) NSMutableArray* myarray;
12 12
......
1 1
2 #import <Foundation/Foundation.h> 2 #import <Foundation/Foundation.h>
3 3
4 -@interface HierophantControl3 : NSObject 4 +@interface SSSS_CalendarControl_TTTT : NSObject
5 5
6 6
7 -- (void)initHierophantInstance; 7 +- (void)initCalendarInstance;
8 8
9 -- (void) HierophantStartGo; 9 +- (void) CalendarStartGo;
10 10
11 @property(strong) NSMutableArray* myarray; 11 @property(strong) NSMutableArray* myarray;
12 12
......
1 1
2 #import <Foundation/Foundation.h> 2 #import <Foundation/Foundation.h>
3 3
4 -@interface HierophantControl4 : NSObject 4 +@interface UUUU_CalendarControl_VVVV : NSObject
5 5
6 6
7 -- (void)initHierophantInstance; 7 +- (void)initCalendarInstance;
8 8
9 -- (void) HierophantStartGo; 9 +- (void) CalendarStartGo;
10 10
11 @property(strong) NSMutableArray* myarray; 11 @property(strong) NSMutableArray* myarray;
12 12
......
1 +#import <Foundation/Foundation.h>
2 +
3 +extern NSString * const EEEE_CalendarExitNotification_FFFF;
4 +extern NSString * const AAAA_CalendarLoginNotification_BBBB;
5 +extern NSString * const CCCC_CalendarErrorNotification_DDDD;
6 +
7 +
8 +@interface UUUU_CalendarHuiTiaoNotification_VVVV : NSObject
9 +
10 +@end
1 -framework module HaiBaoJuheSDK {
2 - umbrella header "HaiBaoJuheSDK.h"
3 -
4 - export *
5 - module * { export * }
6 -}
No preview for this file type
1 -#import <UIKit/UIKit.h>
2 -#import "StoreKit/StoreKit.h"
3 -
4 -@interface HierophantAllManager : NSObject
5 -{
6 - NSString* HierophantAPPID_;
7 - NSString* HierophantAPPKEY_;
8 -
9 - NSString* HierophantInviterCode_;
10 -}
11 -
12 -@property(strong) NSMutableArray* HierophantList;
13 -@property bool HierophantGeiWoHuaQianBa;
14 -
15 -+ (HierophantAllManager *)HierophantInstance;
16 -
17 -- (void)HierophantChuShiHua;
18 -
19 -- (void)HierophantDengLu:(NSString *)HierophantAPPID : (NSString *)HierophantAPPKEY : (UIViewController *)controller;
20 -
21 -- (void)HierophantYangShi:(NSString*)HierophantLeiXing;
22 -
23 -- (void)HierophantQuery: (NSString *)HierophantFuWuQiID : (NSString *)HierophantNickName : (NSNumber *)HierophantAmount : (NSString *)HierophantCallBack : (UIViewController *)controller : (NSString *)HierophantServerName;
24 -
25 -- (void)HierophantQueryOperation:(UIViewController*)controll HierophantHuoWuID:(NSString*)products HierophantJiaGe:(NSString*)amount HierophantHuoWuMing:(NSString*)productName HierophantDingDanHao:(NSString*) DingDanHao;
26 -
27 -
28 -
29 -@end
1 -#import <Foundation/Foundation.h>
2 -
3 -extern NSString * const HierophantExitNotification;
4 -extern NSString * const HierophantLoginNotification;
5 -extern NSString * const HierophantErrorNotification;
6 -
7 -
8 -@interface HierophantHuiTiaoNotification : NSObject
9 -
10 -@end
1 -#import <UIKit/UIKit.h>
2 -
3 -@interface HierophantIAPHelperControl : NSObject<UITableViewDelegate, UITableViewDataSource>
4 -
5 -@property(nonatomic,strong) NSString* HierophantDingDanHao;
6 -@property(nonatomic,strong) NSDictionary* HierophantHuoWuLieBiao;
7 -@property(nonatomic,strong) NSMutableArray* HierophantHuoWuIDLieBiao;
8 -@property(nonatomic, strong) UITableView *HierophantHuoWuLieBiaoView;
9 -
10 -- (void)HierophantHuaQianView:(UIViewController*)controller HierophantHuoWuD:(NSString*)products HierophantQian:(NSString*)amount HierophantHuoWuMing:(NSString*)productName HierophantDingDanHao:(NSString*)DingDanHao;
11 -
12 -@end
1 #include "SDKInterface.h" 1 #include "SDKInterface.h"
2 #import <UIKit/UIKit.h> 2 #import <UIKit/UIKit.h>
3 3
4 -#import "Hierophant/HierophantAllManager.h" 4 +#import "HaiBaoJuheSDK/EEEE_CalendarAllManager_FFFF.h"
5 -#import "Hierophant/HierophantHuiTiaoNotification.h" 5 +#import "HaiBaoJuheSDK/UUUU_CalendarHuiTiaoNotification_VVVV.h"
6 -#import "Hierophant/HierophantInformation.h" 6 +#import "HaiBaoJuheSDK/IIII_CalendarInformation_JJJJ.h"
7 -
8 -#import "TrackingIO.h"
9 7
10 @implementation SDKInterface : Interface 8 @implementation SDKInterface : Interface
11 9
12 int mExchange; 10 int mExchange;
13 -NSString *HierophantAppId; 11 +NSString *CalendarAppId;
14 -NSString *HierophantAppKey; 12 +NSString *CalendarAppKey;
15 -NSString *HierophantLeakOrderUrl; 13 +NSString *CalendarLeakOrderUrl;
16 14
17 - (void)SDKinit:(UIViewController *) control 15 - (void)SDKinit:(UIViewController *) control
18 { 16 {
19 17
20 [super SDKinit:control]; 18 [super SDKinit:control];
21 19
22 - [HaiBaoJuheConfig getInstance]; 20 + [AAAA_HaiBaoJuheConfig_BBBB CCCC_getInstance_DDDD];
23 - [[HierophantAllManager HierophantInstance]HierophantChuShiHua]; 21 + [[EEEE_CalendarAllManager_FFFF GGGG_CalendarInstance_HHHH]IIII_CalendarChuShiHua_JJJJ];
24 - [[HierophantAllManager HierophantInstance]HierophantYangShi:@"sdk"]; 22 + [[EEEE_CalendarAllManager_FFFF GGGG_CalendarInstance_HHHH]KKKK_CalendarYangShi_LLLL:@"sdk"];
25 - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:HierophantLoginNotification object:nil]; 23 + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveLoginMessage:) name:AAAA_CalendarLoginNotification_BBBB object:nil];
26 - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"HierophantToolCallBack" object:nil]; 24 + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(HCKAssetsToolCallBack:) name:@"CalendarToolCallBack" object:nil];
27 25
28 - [[HaiBaoJuheChecker getInstance] sendNotice:HaiBaoJuheSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:HaiBaoJuheSDK_NO_ERROR description:@"initSuccess" extendData:nil]; 26 + [[OOOO_HaiBaoJuheChecker_PPPP QQQQ_getInstance_RRRR] sendNotice:HaiBaoJuheSDKNotificationInitSDK notiName:@"InitSuccess" statusCode:HaiBaoJuheSDK_NO_ERROR description:@"initSuccess" extendData:nil];
29 27
30 - NSString* channelId = [[HaiBaoJuheConfig getInstance] getValueByKey:@"gamechannelid"]; 28 + NSString* channelId = [[AAAA_HaiBaoJuheConfig_BBBB CCCC_getInstance_DDDD] EEEE_getValueByKey_FFFF:@"gamechannelid"];
31 if(channelId == nil || [channelId length] <= 0){ 29 if(channelId == nil || [channelId length] <= 0){
32 channelId = @"unknown"; 30 channelId = @"unknown";
33 } 31 }
34 - [TrackingIO initWithappKey:[[HaiBaoJuheConfig getInstance] getValueByKey:@"renyunAppKey"] withChannelId:channelId];
35 } 32 }
36 33
37 /** 34 /**
...@@ -40,9 +37,9 @@ NSString *HierophantLeakOrderUrl; ...@@ -40,9 +37,9 @@ NSString *HierophantLeakOrderUrl;
40 - (void)SDKloginSDK 37 - (void)SDKloginSDK
41 { 38 {
42 //APPID APPKEY 39 //APPID APPKEY
43 - HierophantAppId = [[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_ID"]; 40 + CalendarAppId = [[AAAA_HaiBaoJuheConfig_BBBB CCCC_getInstance_DDDD] EEEE_getValueByKey_FFFF:@"APP_ID"];
44 - HierophantAppKey =[[HaiBaoJuheConfig getInstance] getValueByKey:@"APP_KEY"]; 41 + CalendarAppKey =[[AAAA_HaiBaoJuheConfig_BBBB CCCC_getInstance_DDDD] EEEE_getValueByKey_FFFF:@"APP_KEY"];
45 - [[HierophantAllManager HierophantInstance]HierophantDengLu:HierophantAppId :HierophantAppKey :self.controller]; 42 + [[EEEE_CalendarAllManager_FFFF GGGG_CalendarInstance_HHHH]SSSS_CalendarDengLu_TTTT:CalendarAppId :CalendarAppKey :self.controller];
46 43
47 } 44 }
48 45
...@@ -53,12 +50,12 @@ NSString *HierophantLeakOrderUrl; ...@@ -53,12 +50,12 @@ NSString *HierophantLeakOrderUrl;
53 { 50 {
54 NSLog(@"loginchek"); 51 NSLog(@"loginchek");
55 HaiBaoJuheLoginInfo *loginInfo = [HaiBaoJuheLoginInfo alloc]; 52 HaiBaoJuheLoginInfo *loginInfo = [HaiBaoJuheLoginInfo alloc];
56 - loginInfo.openId = [[HierophantInformation getInstance]openId]; 53 + loginInfo.openId = [[IIII_CalendarInformation_JJJJ getInstance]openId];
57 - loginInfo.sign = [[HierophantInformation getInstance] token]; 54 + loginInfo.sign = [[IIII_CalendarInformation_JJJJ getInstance] token];
58 - loginInfo.timestamp = [[HierophantInformation getInstance] timestamp]; 55 + loginInfo.timestamp = [[IIII_CalendarInformation_JJJJ getInstance] timestamp];
59 56
60 dispatch_async(dispatch_get_global_queue(0, 0), ^{ 57 dispatch_async(dispatch_get_global_queue(0, 0), ^{
61 - [[HaiBaoJuheChecker getInstance] startCheck:loginInfo]; 58 + [[OOOO_HaiBaoJuheChecker_PPPP QQQQ_getInstance_RRRR] startCheck:loginInfo];
62 }); 59 });
63 60
64 } 61 }
...@@ -82,7 +79,7 @@ NSString *HierophantLeakOrderUrl; ...@@ -82,7 +79,7 @@ NSString *HierophantLeakOrderUrl;
82 - (void)HCKAssetsToolCallBack:(NSNotification *)notification 79 - (void)HCKAssetsToolCallBack:(NSNotification *)notification
83 { 80 {
84 NSDictionary* payResultDic = notification.object; 81 NSDictionary* payResultDic = notification.object;
85 - NSString* receiptStr = [payResultDic objectForKey:@"HierophantToolResult"]; 82 + NSString* receiptStr = [payResultDic objectForKey:@"CalendarToolResult"];
86 NSString* queryId = [payResultDic objectForKey:@"query_id"]; 83 NSString* queryId = [payResultDic objectForKey:@"query_id"];
87 84
88 //收到回调,保存queryid和data 85 //收到回调,保存queryid和data
...@@ -101,9 +98,10 @@ NSString *HierophantLeakOrderUrl; ...@@ -101,9 +98,10 @@ NSString *HierophantLeakOrderUrl;
101 [userDefaults setObject:receiptStr forKey:queryId]; 98 [userDefaults setObject:receiptStr forKey:queryId];
102 99
103 NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil]; 100 NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
104 - NSString* result = [[NetCenter getInstance] httpPostSyn:HierophantLeakOrderUrl :receiptDic]; 101 + NSString* result = [[NetCenter getInstance] httpPostSyn:CalendarLeakOrderUrl :receiptDic];
105 102
106 if([@"success" isEqualToString:result]){//确认订单成功 103 if([@"success" isEqualToString:result]){//确认订单成功
104 + [[OOOO_HaiBaoJuheChecker_PPPP QQQQ_getInstance_RRRR] sendNotice:HaiBaoJuheSDKNotificationGzyazf notiName:@"success" statusCode:HaiBaoJuheSDK_NO_ERROR description:@"success" extendData:nil];
107 //删除已保存的 105 //删除已保存的
108 [userDefaults removeObjectForKey:queryId]; 106 [userDefaults removeObjectForKey:queryId];
109 [tempQueryIdArray removeObject:queryId]; 107 [tempQueryIdArray removeObject:queryId];
...@@ -121,11 +119,11 @@ NSString *HierophantLeakOrderUrl; ...@@ -121,11 +119,11 @@ NSString *HierophantLeakOrderUrl;
121 NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults]; 119 NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
122 NSString* lastqueryid = [userDefaults objectForKey:@"lastqueryid"]; 120 NSString* lastqueryid = [userDefaults objectForKey:@"lastqueryid"];
123 121
124 - HierophantLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@", 122 + CalendarLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
125 - [HaiBaoJuheUtils createGzyazfUrl], 123 + [MMMM_HaiBaoJuheUtils_NNNN AAAA_createGzyazfUrl_BBBB],
126 [payInfo userId], 124 [payInfo userId],
127 [payInfo playerId]]; 125 [payInfo playerId]];
128 - [userDefaults setObject:HierophantLeakOrderUrl forKey:@"lastHierophantLeakOrderUrl"]; 126 + [userDefaults setObject:CalendarLeakOrderUrl forKey:@"lastCalendarLeakOrderUrl"];
129 127
130 if (lastqueryid!=nil) { 128 if (lastqueryid!=nil) {
131 //创建订单前进行补单 129 //创建订单前进行补单
...@@ -135,7 +133,7 @@ NSString *HierophantLeakOrderUrl; ...@@ -135,7 +133,7 @@ NSString *HierophantLeakOrderUrl;
135 receiptStr = [receiptStr stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]; 133 receiptStr = [receiptStr stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
136 //如果不为空,进行最后一次补单 134 //如果不为空,进行最后一次补单
137 NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",lastqueryid,@"query_id", nil]; 135 NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",lastqueryid,@"query_id", nil];
138 - NSString* result = [[NetCenter getInstance] httpPostSyn:HierophantLeakOrderUrl :receiptDic]; 136 + NSString* result = [[NetCenter getInstance] httpPostSyn:CalendarLeakOrderUrl :receiptDic];
139 if([@"success" isEqualToString:result]){//确认订单成功 137 if([@"success" isEqualToString:result]){//确认订单成功
140 //删除已保存的 138 //删除已保存的
141 [userDefaults removeObjectForKey:@"lastqueryid"]; 139 [userDefaults removeObjectForKey:@"lastqueryid"];
...@@ -145,8 +143,8 @@ NSString *HierophantLeakOrderUrl; ...@@ -145,8 +143,8 @@ NSString *HierophantLeakOrderUrl;
145 143
146 mExchange = [payInfo exchange].intValue; 144 mExchange = [payInfo exchange].intValue;
147 [super SDKgzyazfWithGzyazfmentInfo:payInfo]; 145 [super SDKgzyazfWithGzyazfmentInfo:payInfo];
148 - HierophantLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@", 146 + CalendarLeakOrderUrl = [[NSString alloc] initWithFormat:@"%@?uid=%@&playerid=%@",
149 - [HaiBaoJuheUtils createGzyazfUrl], 147 + [MMMM_HaiBaoJuheUtils_NNNN AAAA_createGzyazfUrl_BBBB],
150 [payInfo userId], 148 [payInfo userId],
151 [payInfo playerId]]; 149 [payInfo playerId]];
152 [userDefaults synchronize]; 150 [userDefaults synchronize];
...@@ -165,13 +163,10 @@ NSString *HierophantLeakOrderUrl; ...@@ -165,13 +163,10 @@ NSString *HierophantLeakOrderUrl;
165 NSString* reportType = [reportInfo reportType]; 163 NSString* reportType = [reportInfo reportType];
166 if (reportInfo) { 164 if (reportInfo) {
167 if ([reportType isEqualToString:REPORT_ENTER]) { 165 if ([reportType isEqualToString:REPORT_ENTER]) {
168 - [TrackingIO setLoginWithAccountID:[reportInfo playerId]];
169 -
170 dispatch_async(dispatch_get_global_queue(0, 0), ^{ 166 dispatch_async(dispatch_get_global_queue(0, 0), ^{
171 [self handlerLeakOrder]; 167 [self handlerLeakOrder];
172 }); 168 });
173 }else if ([reportType isEqualToString:REPORT_CREATEROLE]){ 169 }else if ([reportType isEqualToString:REPORT_CREATEROLE]){
174 - [TrackingIO setRegisterWithAccountID:[reportInfo playerId]];
175 } 170 }
176 } 171 }
177 } 172 }
...@@ -212,12 +207,12 @@ NSString *HierophantLeakOrderUrl; ...@@ -212,12 +207,12 @@ NSString *HierophantLeakOrderUrl;
212 for (NSString* queryId in queryIdArray) { 207 for (NSString* queryId in queryIdArray) {
213 NSString* receiptStr = [userDefaults valueForKey:queryId]; 208 NSString* receiptStr = [userDefaults valueForKey:queryId];
214 NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil]; 209 NSDictionary* receiptDic = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt",queryId,@"query_id", nil];
215 - NSString* lastHierophantLeakOrderUrl = [userDefaults objectForKey:@"lastHierophantLeakOrderUrl"]; 210 + NSString* lastCalendarLeakOrderUrl = [userDefaults objectForKey:@"lastCalendarLeakOrderUrl"];
216 NSString* result; 211 NSString* result;
217 - if (lastHierophantLeakOrderUrl!=nil) { 212 + if (lastCalendarLeakOrderUrl!=nil) {
218 - result = [[NetCenter getInstance] httpPostSyn:lastHierophantLeakOrderUrl :receiptDic]; 213 + result = [[NetCenter getInstance] httpPostSyn:lastCalendarLeakOrderUrl :receiptDic];
219 }else{ 214 }else{
220 - result = [[NetCenter getInstance] httpPostSyn:[HaiBaoJuheUtils createGzyazfUrl] :receiptDic]; 215 + result = [[NetCenter getInstance] httpPostSyn:[MMMM_HaiBaoJuheUtils_NNNN AAAA_createGzyazfUrl_BBBB] :receiptDic];
221 } 216 }
222 if([@"success" isEqualToString:result]){//成功 217 if([@"success" isEqualToString:result]){//成功
223 [userDefaults removeObjectForKey:queryId]; 218 [userDefaults removeObjectForKey:queryId];
...@@ -239,34 +234,25 @@ NSString *HierophantLeakOrderUrl; ...@@ -239,34 +234,25 @@ NSString *HierophantLeakOrderUrl;
239 - (void)receiveCreateOrder:(NSNotification *)notification 234 - (void)receiveCreateOrder:(NSNotification *)notification
240 { 235 {
241 NSLog(@"创建订单成功"); 236 NSLog(@"创建订单成功");
242 - HaiBaoJuheGzyazfInfo *payInfo = [notification object]; 237 + AAAA_HaiBaoJuheGzyazfInfo_BBBB *payInfo = [notification object];
243 238
244 - NSNumber *amount = @([[payInfo postAmount] integerValue] * mExchange);
245 - NSString *serverId = [payInfo serverId];
246 - NSString *roleName = [payInfo playerName];
247 NSString *queryId = [payInfo queryId]; 239 NSString *queryId = [payInfo queryId];
248 240
249 dispatch_async(dispatch_get_global_queue(0, 0), ^{ 241 dispatch_async(dispatch_get_global_queue(0, 0), ^{
250 [self handlerLeakOrder]; 242 [self handlerLeakOrder];
251 }); 243 });
252 244
253 - NSString *other = [payInfo other];
254 -
255 - if (other && [other length] > 0) {
256 - [[HierophantAllManager HierophantInstance] HierophantQuery:serverId :roleName :amount :[payInfo queryId] :self.controller :[payInfo serverName]];
257 - }else{
258 NSString* products = [payInfo products]; 245 NSString* products = [payInfo products];
259 //保存订单号到本地 246 //保存订单号到本地
260 NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults]; 247 NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
261 [userDefaults setObject:queryId forKey:@"lastqueryid"]; 248 [userDefaults setObject:queryId forKey:@"lastqueryid"];
262 [userDefaults synchronize]; 249 [userDefaults synchronize];
263 - [[HierophantAllManager HierophantInstance] HierophantQueryOperation:self.controller HierophantHuoWuID:products HierophantJiaGe:[payInfo postAmount] HierophantHuoWuMing:[payInfo productName] HierophantDingDanHao:queryId]; 250 + [[EEEE_CalendarAllManager_FFFF GGGG_CalendarInstance_HHHH] CalendarQueryOperation:self.controller CalendarHuoWuID:products CalendarJiaGe:[payInfo postAmount] CalendarHuoWuMing:[payInfo productName] CalendarDingDanHao:queryId];
264 - } 251 +
265 } 252 }
266 253
267 -(void)paymentSuccess:(NSString *)accountId orderId:(NSString *)orderId currencyAmount:(double)amount currencyType:(NSString *)currencyType payType:(NSString *)payType custom:(NSArray *)customArray 254 -(void)paymentSuccess:(NSString *)accountId orderId:(NSString *)orderId currencyAmount:(double)amount currencyType:(NSString *)currencyType payType:(NSString *)payType custom:(NSArray *)customArray
268 { 255 {
269 - [TrackingIO setPayment:orderId paymentType:payType currentType:currencyType currencyAmount:amount];
270 } 256 }
271 257
272 @end 258 @end
......
No preview for this file type
1 -//
2 -// NewTtack.h
3 -// NewTtack
4 -//
5 -// Created by yun on 16/1/11.
6 -// Copyright © 2016年 yun. All rights reserved.
7 -//
8 -#define TRACK_VERSION @"1.0.1"
9 -
10 -#import <Foundation/Foundation.h>
11 -#import <UIKit/UIKit.h>
12 -
13 -
14 -/*
15 - 热云移动广告效果监测 平台 api 请选择对应的api进行使用
16 - */
17 -NS_ASSUME_NONNULL_BEGIN
18 -@interface TrackingIO : NSObject
19 -//开启打印日志 正式上线包请关掉
20 -+(void) setPrintLog :(BOOL)print;
21 -// 开启数据统计
22 -+ (void)initWithappKey:(NSString *)appKey withChannelId:(NSString *)channelId;
23 -//注册成功后调用
24 -+ (void)setRegisterWithAccountID:(NSString *)account;
25 -//登陆成功后调用
26 -+ (void)setLoginWithAccountID:(NSString *)account;
27 -//开始付费时 调用(人民币单位是元)
28 -+(void)setPaymentStart:(NSString *)transactionId paymentType:(NSString*)paymentType currentType:(NSString*)currencyType currencyAmount:(float)currencyAmount;
29 -// 支付完成,付费分析,记录玩家充值的金额(人民币单位是元)
30 -+(void)setPayment:(NSString *)transactionId paymentType:(NSString*)paymentType currentType:(NSString*)currencyType currencyAmount:(float)currencyAmount;
31 -//自定义事件
32 -+(void)setEvent:(NSString *)eventName andExtra:(nullable NSDictionary *)extra;
33 -//标准接口
34 -+(void)setProfile:(NSDictionary *)dataDic;
35 -//获取设备信息
36 -+(NSString*)getDeviceId;
37 -@end
38 -NS_ASSUME_NONNULL_END
1 -{"renyunAppKey": "false", "payorderurl": "https://public.sdk.haibaoyouxi.com/paycheck/create", "usertype": 150, "sdkSimpleName": "apple_youyu", "gamechannelid": "", "APP_KEY": "736b4d81e2f7da30faea1eaa90afa522", "custom": "{}", "sdkVersionCode": "V1_1", "loginCheckUrl": "https://public.sdk.haibaoyouxi.com/logincheck/check", "appScheme": "com.jghb.xinqinji", "c2": "", "c1": "", "APP_ID": "5c3eb15b48d88d102762a7e5", "paycheckurl": "https://public.sdk.haibaoyouxi.com/paycheck/confirm", "gameSimpleName": "testest"}
1 +{"payorderurl": "https://pay.public.hkleyougame.com/paycheck/create", "usertype": 5, "sdkSimpleName": "leyou_ios", "gamechannelid": "", "APP_KEY": "b1b13ca8609d29036ceae3c565647d6a", "custom": "{}","logReportUrl": "https://statistic.public.hkleyougame.com/sdk/statistic", "encode": "0", "sdkVersionCode": "V1_0", "loginCheckUrl": "https://login.public.hkleyougame.com/logincheck/check", "appScheme": "com.xxx.xxx11", "descode": "12345678", "c2": "", "c1": "", "APP_ID": "5cecee0487192a3460670102", "paycheckurl": "https://pay.public.hkleyougame.com/paycheck/confirm", "gameSimpleName": "fytx_test"}