| | |
| | | _project.ReadFromString(File.ReadAllText(_projectPath)); |
| | | |
| | | string _targetGUID = _project.TargetGuidByName(PBXProject.GetUnityTargetName()); |
| | | string _fwTargetGUID = _project.TargetGuidByName("UnityFramework"); |
| | | |
| | | //var _codeSign = Debug.isDebugBuild ? CODE_SIGN_DEVELOPER : CODE_SIGN_DISTRIBUTION; |
| | | //var _provision = Debug.isDebugBuild ? PROVISIONING_DEVELOPER : PROVISIONING_DISTRIBUTION; |
| | |
| | | _project.AddFileToBuild(_targetGUID, _project.AddFile("/usr/lib/libc++.tbd", "Frameworks/libc++.tbd", PBXSourceTree.Sdk)); |
| | | _project.AddFileToBuild(_targetGUID, _project.AddFile("/usr/lib/libiconv.tbd", "Frameworks/libiconv.tbd", PBXSourceTree.Sdk)); |
| | | _project.AddFileToBuild(_targetGUID, _project.AddFile("/usr/lib/libresolv.tbd", "Frameworks/libresolv.tbd", PBXSourceTree.Sdk)); |
| | | |
| | | |
| | | //UnityFramework |
| | | _project.AddBuildProperty(_fwTargetGUID, "OTHER_LDFLAGS", "-ObjC"); |
| | | |
| | | |
| | | File.WriteAllText(_projectPath, _project.WriteToString()); |
| | | |
| | |
| | | _xclass.WriteBelow("extern \"C\" ScreenOrientation UnityCurrentOrientation() { return GetAppController().unityView.contentOrientation; }",newCode); |
| | | //初始化UniversalSDK |
| | | newCode = "\n" + |
| | | " _universalSDK = [[UniversalSDK alloc] init];\n"; |
| | | " _universalSDK = [[UniversalSDK alloc] init];\n [_universalSDK QuickSDKInit:application didFinishLaunchingWithOptions:launchOptions];"; |
| | | _xclass.WriteBelow("[KeyboardDelegate Initialize];", newCode); |
| | | //quick sdk 生命周期 |
| | | _xclass.WriteBelow("supportedInterfaceOrientationsForWindow:(UIWindow*)window\n{", "[[SMPCQuickSDK defaultInstance] application:application supportedInterfaceOrientationsForWindow:window];"); |
| | |
| | | _xclass.WriteBelow("DisplayConnection* _mainDisplay;", "UniversalSDK* _universalSDK;"); |
| | | _xclass.WriteBelow("@property (readonly, copy, nonatomic) DisplayConnection* mainDisplay;", |
| | | "@property (readonly, copy, nonatomic) UniversalSDK* universalSDK;"); |
| | | |
| | | |
| | | //适配iPhoneX 底部白条 |
| | | _xclass = new XClass(projectPath + "/Classes/UI/UnityViewControllerBase+iOS.mm"); |
| | | _xclass.Replace("return res;", "return UIRectEdgeAll;"); |
| | | } |
| | | |
| | | private static string GetBuildPath() |