Unity-匯出Xcode工程時的自動設定

來源:互聯網
上載者:User
使用開源庫XUporter,詳見https://onevcat.com/2012/12/xuporter/ 1.自動更改認證及描述檔案
//更改認證,設定認證名稱即可,在鑰匙串中可見project.overwriteBuildSetting ("CODE_SIGN_IDENTITY", "xxxxxxxxxx");//iphone配置工具 + 生產力(高版本Mac系統雖提示安裝失敗,但依然可用)中查看描述檔案的編號,格式如下//描述檔案的存放地址為:~/Library/MobileDevice/Provisioning Profilesproject.overwriteBuildSetting ("PROVISIONING_PROFILE", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");
2.設定其它項目設定
//bitcode修改(所有名稱在Xcode中可見)project.overwriteBuildSetting ("ENABLE_BITCODE", "No");
3.自動添加FrameWorks,tbd(自己做部分修改)
project.AddFile("System/Library/Frameworks/WebKit.framework",project.GetGroup( "Frameworks" ), "SDKROOT",true,false);        project.AddFile("System/usr/lib/libz.1.2.5.tbd",project.GetGroup( "Frameworks" ), "SDKROOT",true,false);        project.AddFile("System/Library/Frameworks/Social.framework",project.GetGroup( "Frameworks" ), "SDKROOT",true,false);
4.修改Info資訊
// 編輯plist 檔案EditorPlist(path);private static void EditorPlist(string filePath){        XCPlist list =new XCPlist(filePath);        string PlistAdd = @"              <key>NSAppTransportSecurity</key>            <dict>                <key>NSAllowsArbitraryLoads</key>                <true />            </dict>";        //在plist裡面增加一行        list.AddKey(PlistAdd);        //在plist裡面替換一行//      list.ReplaceKey("<string>com.yusong.${PRODUCT_NAME}</string>","<string>"+bundle+"</string>");        //儲存        list.Save();    }
5.單個檔案的Compile Flags

6.PC打包注意

project.AddFrameworkSearchPaths("$(PROJECT_DIR)/Frameworks/Plugins/iOS/UMSocial_Sdk_Extra_Frameworks/TencentOpenAPI");project.AddLibrarySearchPaths("$(SRCROOT)/Libraries/Plugins/iOS");

對於某些第三方庫,PC下的Unity會產生反斜線,需要手動調整

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.