@@ -18,13 +18,14 @@ def main():
18
18
# path of the Xcode SDK on the system
19
19
xcode_sdk_path = get_xcode_sdk_path (LogFunc )
20
20
21
- # path for unity iOS Xcode project and adFramework on the system
22
- unity_xcode_project_path , adFramework_path = get_paths (LogFunc , parser , xcode_sdk_path )
21
+ # path for unity iOS Xcode project and framework on the system
22
+ unity_xcode_project_path , framework_path = get_paths (LogFunc , parser , xcode_sdk_path )
23
23
24
24
# edit the Xcode project using mod_pbxproj
25
- # add the adFramework library
25
+ # add the adSupport framework library
26
+ # add the iAd framework library
26
27
# change the compilation flags of the adjust project files to support non-ARC
27
- edit_unity_xcode_project (LogFunc , unity_xcode_project_path , adFramework_path )
28
+ edit_unity_xcode_project (LogFunc , unity_xcode_project_path , framework_path )
28
29
29
30
# change the Xcode project directly
30
31
# allow objective-c exceptions
@@ -43,20 +44,24 @@ def get_paths(Log, parser, xcode_sdk_path):
43
44
44
45
unity_xcode_project_path = ios_project_path + "/Unity-iPhone.xcodeproj/project.pbxproj"
45
46
Log ("Unity3d Xcode project path: {0}" , unity_xcode_project_path )
46
-
47
- adFramework_path = xcode_sdk_path + "/System/Library/Frameworks/AdSupport.framework"
48
- Log ("adFramework path: {0}" , adFramework_path )
49
47
50
- return unity_xcode_project_path , adFramework_path
48
+ framework_path = xcode_sdk_path + "/System/Library/Frameworks/"
49
+ Log ("framework path: {0}" , framework_path )
50
+
51
+ return unity_xcode_project_path , framework_path
51
52
52
- def edit_unity_xcode_project (Log , unity_xcode_project_path , adFramework_path ):
53
+ def edit_unity_xcode_project (Log , unity_xcode_project_path , framework_path ):
53
54
# load unity iOS pbxproj project file
54
55
unity_XcodeProject = XcodeProject .Load (unity_xcode_project_path )
55
56
56
- # add adFramework to unity
57
- unity_XcodeProject .add_file_if_doesnt_exist (adFramework_path , tree = "SDKROOT" , create_build_files = True ,weak = True )
57
+ # add adSupport framework to unity
58
+ unity_XcodeProject .add_file_if_doesnt_exist (framework_path + "AdSupport.framework" , tree = "SDKROOT" , create_build_files = True ,weak = True )
58
59
Log ("added adSupport framework" )
59
60
61
+ # add iAd framework to unity
62
+ unity_XcodeProject .add_file_if_doesnt_exist (framework_path + "iAd.framework" , tree = "SDKROOT" , create_build_files = True ,weak = True )
63
+ Log ("added iAd framework" )
64
+
60
65
# regex for adjust sdk files
61
66
re_adjust_files = re .compile (r"AI.*\.m|.*\+AI.*\.m|Adjust\.m|AdjustUnity\.mm" )
62
67
0 commit comments