Esempio n. 1
0
    private static void EditInfoPlist(string projPath)
    {
        XCPlist plist = new XCPlist(projPath);

        //URL Scheme 添加
        string PlistAdd = @"  
            <key>CFBundleURLTypes</key>
			<array>
                <dict>
                  <key>CFBundleURLSchemes</key>
                  <array>
                    <string>lg0124578befjklmopuy</string>
                  </array>
                  <key>CFBundleURLName</key>
                  <string>linkGameApp</string>
                </dict>
			</array>"            ;

        //白名单添加
        string LSAdd = @"
		<key>LSApplicationQueriesSchemes</key>
		<array>
			<string>linkgame</string>
		</array>"        ;


        //在plist里面增加一行
        plist.AddKey(PlistAdd);
        plist.AddKey(LSAdd);
        plist.Save();
    }
Esempio n. 2
0
    private static void EditInfoPlist(string projPath)
    {
        XCPlist plist = new XCPlist(projPath);

        //URL Scheme 添加
        string PlistAdd = @"  
            <key>CFBundleURLTypes</key>
			<array>
				<dict>
					<key>CFBundleURLSchemes</key>
					<array>
					<string>wx228713e6d3afcd18</string>
					</array>
				</dict>
			</array>
            <key>NSMicrophoneUsageDescription</key>
            <string>1</string>
			<key>NSCameraUsageDescription</key>
			<string>1</string>"            ;

        //白名单添加
        string LSAdd = @"
		<key>LSApplicationQueriesSchemes</key>
			<array>
			<string>wechat</string>
			<string>weixin</string>
		</array>"        ;


        //在plist里面增加一行
        plist.AddKey(PlistAdd);
        plist.AddKey(LSAdd);
        plist.Save();
    }
Esempio n. 3
0
    private static void EditInfoPlist(string projPath)
    {
        XCPlist plist = new XCPlist(projPath);

        //URL Scheme 添加
        string PlistAdd = @"  
            <key>CFBundleURLTypes</key>
			<array>
				<dict>
					<key>CFBundleURLName</key>
					<string>ipai</string>
					<key>CFBundleURLSchemes</key>
					<array>
						<string>wx678d669000724916</string>
					</array>
				</dict>
			</array>"            ;

        //白名单添加
        string LSAdd = @"
		<key>LSApplicationQueriesSchemes</key>
			<array>
			<string>wechat</string>
		</array>"        ;


        //在plist里面增加一行
        plist.AddKey(PlistAdd);
        plist.AddKey(LSAdd);
        plist.Save();
    }
    private static void EditInfoPlist(string projPath)
    {
        SMSSDKConfig theConfig;

        try
        {
            string          filePath  = Application.dataPath + "/iOSAutoPackage/Editor/SDKPorter/SMSSDKConfig.bin";
            BinaryFormatter formatter = new BinaryFormatter();
            Stream          destream  = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.Read);
            SMSSDKConfig    config    = (SMSSDKConfig)formatter.Deserialize(destream);
            destream.Flush();
            destream.Close();
            theConfig = config;
        }
        catch (Exception)
        {
            theConfig = new SMSSDKConfig();
        }

        XCPlist plist = new XCPlist(projPath);

        string AppKey     = @"<key>MOBAppkey</key> <string>" + theConfig.appKey + "</string>";
        string AppSecret  = @"<key>MOBAppSecret</key> <string>" + theConfig.appSecret + "</string>";
        string ContactKey = @"<key>NSContactsUsageDescription</key> <string>开启通讯录好友功能</string>";

        //在plist里面增加一行
        plist.AddKey(AppKey);
        plist.AddKey(AppSecret);
        plist.AddKey(ContactKey);

        plist.Save();
    }
Esempio n. 5
0
    public override void EditInfoPlist(XCPlist plist)
    {
        string AppKey    = @"<key>MOBAppkey</key> <string>" + "appid" + "</string>";
        string AppSecret = @"<key>MOBAppSecret</key> <string>" + "screctkey" + "</string>";

        plist.AddKey(AppKey);
        plist.AddKey(AppSecret);
        string wechatURL = @"  
            <key>CFBundleURLTypes</key>
            <array>
            <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLSchemes</key>
            <array>
            <string>" + "wechatappid" + @"</string>
            </array>
            </dict>
			<dict>
			<key>CFBundleTypeRole</key>
			<string>Editor</string>
			<key>CFBundleURLSchemes</key>
			<array>
			<string>QQ41E81479</string>
			</array>
			</dict>
            </array>";

        plist.AddKey(wechatURL);
        string thirdAllow = @"
        <key>LSApplicationQueriesSchemes</key>
        <array>
        <string>wechat</string>
        <string>weixin</string>
        <string>mqqOpensdkSSoLogin</string>
        <string>mqqopensdkapiV2</string>
        <string>mqqopensdkapiV3</string>
        <string>wtloginmqq2</string>
        <string>mqq</string>
        <string>mqqapi</string>
        <string>mqzoneopensdk</string>
        <string>mqzoneopensdkapi</string>
        <string>mqzoneopensdkapi19</string>
        <string>mqzoneopensdkapiV2</string>
        <string>mqqwpa</string>
        <string>mqzone</string>
        </array>";

        plist.AddKey(thirdAllow);
    }
Esempio n. 6
0
    private static void EditorPlist(string filePath)
    {
        XCPlist list     = new XCPlist(filePath);
        string  PlistAdd =
            @"
		

		<key>LSApplicationQueriesSchemes</key>
		<array>
			<string>fbapi</string>
			<string>fb-messenger-api</string>
			<string>fbauth2</string>
			<string>fbshareextension</string>
			<string>com.hagame.Sdk</string>
			<string>com.googleusercontent.apps.1234567890-abcdefghijklmnopqrstuvwxyz</string>
			<string>com-google-gidconsent-google</string>
			<string>com-google-gidconsent-youtube</string>
			<string>com-google-gidconsent</string>
			<string>com.google.gppconsent.2.4.1</string>
			<string>com.google.gppconsent.2.4.0</string>
			<string>com.google.gppconsent.2.3.0</string>
			<string>com.google.gppconsent.2.2.0</string>
			<string>com.google.gppconsent</string>
			<string>googlechrome</string>
			<string>googlechrome-x-callback</string>
			<string>hasgplus4</string>
		</array>"        ;

        list.AddKey(PlistAdd);

        list.Save();
    }
Esempio n. 7
0
    private static void EditorPlist(string filePath)
    {
        XCPlist list     = new XCPlist(filePath);
        string  PlistAdd = @"
            <key>CFBundleIdentifier</key>
            <string>com.scbczx.luckystar</string>
			<key>XUPORTER</key>
			<string>XUPorter XCodePostProcess Add</string>
			<key>CFBundleDisplayName</key>
			<string>掌上游乐场</string>
			<key>CFBundleURLTypes</key>
			<array>
				<dict>
					<key>CFBundleTypeRole</key>
					<string>Editor</string>
					<key>CFBundleURLName</key>
					<string>wechat</string>
					<key>CFBundleURLSchemes</key>
					<array>
						<string>wx801def83edbb80a3</string>
					</array>
				</dict>
				<dict>
					<key>CFBundleTypeRole</key>
					<string>Editor</string>
					<key>CFBundleURLName</key>
					<string></string>
					<key>CFBundleURLSchemes</key>
					<array>
						<string>com.scbczx.luckystar</string>
					</array>
				</dict>
			</array>
			<key>LSApplicationQueriesSchemes</key>
			<array>
				<string>weixin</string>
				<string>wechat</string>
			</array>
			<key>NSAppTransportSecurity</key>
			<dict>
				<key>NSAllowsArbitraryLoads</key>
				<true/>
			</dict>	
			<key>NSLocationAlwaysUsageDescription</key>
			<string>若允许,“个人信息”面板中将显示精准的位置信息;否则,“个人信息”面板中的位置信息可能有误</string>
			<key>NSLocationUsageDescription</key>
			<string>若允许,“个人信息”面板中将显示精准的位置信息;否则,“个人信息”面板中的位置信息可能有误</string>
			<key>NSLocationWhenInUseUsageDescription</key>
			<string>若允许,“个人信息”面板中将显示精准的位置信息;否则,“个人信息”面板中的位置信息可能有误</string>
			<key>NSMicrophoneUsageDescription</key>
			<string>microphoneDesciption</string>
			"            ;

        list.AddKey(PlistAdd);
        list.ReplaceKey("<string>en</string>", "<string>zh_CN</string>");
        list.ReplaceKey("<string>Hydra</string>", "<string>????</string>");
        list.ReplaceKey("<string>0.0.0</string>", "<string>0.0.0</string>");
        list.ReplaceKey("<string>1.0</string>", "<string>0</string>");
        list.Save();
    }
Esempio n. 8
0
    //修正PList
    static void EditorPlist(string filePath)
    {
        XCPlist list    = new XCPlist(filePath);
        string  bundle  = "com.afeiyingyou.dragonball";
        string  appname = "七龙珠";


        string PlistAdd = @"
			<key>UIViewControllerBasedStatusBarAppearance</key>
			<false/>
			<key>NSLocationWhenInUseDescription</key>
			<string>YES</string>
			<key>NSLocationAlwaysUsageDescription</key>
			<string>YES</string>"            ;

        //在plist里面增加一行
        list.AddKey(PlistAdd);

        list.ReplaceKey("<string>dragonball</string>", "<string>" + appname + "</string>");

        //在plist里面替换Bundle ID
        list.ReplaceKey("<string>com.afeiyingyou.${PRODUCT_NAME}</string>", "<string>" + bundle + "</string>");
        //保存
        list.Save();
    }
Esempio n. 9
0
    private static void aibeiPayEditorPlist(string filePath, string bundleID)
    {
        XCPlist list     = new XCPlist(filePath);
        string  plistAdd = @"
			<key>CFBundleURLTypes</key>
            <array>
            <dict>            
            <key>CFBundleURLSchemes</key>
            <array>
            <string>iapppay.alipay." + bundleID + @"</string>
            </array>
			<key>CFBundleURLName</key>
            <string>iapppay.alipay</string>
            </dict>
            </array>
			<key>NSAppTransportSecurity</key>
			<dict>
			<key>NSAllowsArbitraryLoads</key>
			<true/>
			</dict>"            ;

        //在plist里面增加一行
        list.AddKey(plistAdd);
        //保存
        list.Save();
    }
Esempio n. 10
0
    private static void EditorPlist(string filePath)
    {
        XCPlist list   = new XCPlist(filePath);
        string  bundle = "com.ema.SSWWIOS";

        string PlistAdd = @"  
            <key>CFBundleURLTypes</key>
            <array>
            <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLIconFile</key>
            <string>Icon@2x</string>
            <key>CFBundleURLName</key>
            <string>" + bundle + @"</string>
            <key>CFBundleURLSchemes</key>
            <array>
            <string>ww123456</string>
            </array>
            </dict>
            </array>";

        list.AddKey(PlistAdd);
        list.ReplaceKey("<string>com.koramgame.${PRODUCT_NAME}</string>", "<string>" + bundle + "</string>");
        //淇濆瓨
        list.Save();
    }
Esempio n. 11
0
    private static void pphelperEditorPlist(string filePath, string appId)
    {
        XCPlist list     = new XCPlist(filePath);
        string  plistAdd = @"
			<key>CFBundleURLTypes</key>
            <array>
            <dict>            
            <key>CFBundleURLSchemes</key>
            <array>
            <string>teiron" + appId + @"</string>
            </array>
            </dict>
            </array>
			<key>NSAppTransportSecurity</key>
			<dict>
			<key>NSAllowsArbitraryLoads</key>
			<true/>
			</dict>"            ;

        //在plist里面增加一行
        list.AddKey(plistAdd);

        //保存
        list.Save();
    }
Esempio n. 12
0
    private static void yundingEditorPlist(string filePath, string bundleID)
    {
        XCPlist list     = new XCPlist(filePath);
        string  plistAdd = @"
			<key>CFBundleURLTypes</key>
            <array>
            <dict>            
            <key>CFBundleURLSchemes</key>
            <array>
            <string>" + bundleID + @"</string>
            </array>			
            </dict>
            </array>
			<key>UIViewControllerBasedStatusBarAppearance</key>
			<false/>
			<key>UIViewControllerBasedStatusBarAppearance - 2</key>
			<false/>
		    <key>LSApplicationQueriesSchemes</key>
		    <array>
		        <string>goxiapp520</string>
		        <string>weixin</string>
		        <string>alipay</string>
		    </array>
			<key>NSAppTransportSecurity</key>
            <dict>
            <key>NSAllowsArbitraryLoads</key>
            <true/>
            </dict>"    ;

        //在plist里面增加一行
        list.AddKey(plistAdd);
        //保存
        list.Save();
    }
Esempio n. 13
0
    private static void aisiEditorPlist(string filePath, string appid)
    {
        XCPlist list     = new XCPlist(filePath);
        string  plistAdd = @"
			<key>CFBundleURLTypes</key>
            <array>
            <dict>            
            <key>CFBundleURLSchemes</key>
            <array>
            <string>As" + appid + @"</string>
            </array>
			<key>CFBundleURLName</key>
            <string></string>		
			</dict> 
			</array>
			<key>LSApplicationQueriesSchemes</key>
			<array>
			<string>alipay</string> 
			<string>weixin</string> 
			<string>mqqapiwallet</string>
            </array>
            <key>NSAppTransportSecurity</key>
            <dict>
            <key>NSAllowsArbitraryLoads</key>
            <true/>
            </dict>";

        //在plist里面增加一行
        list.AddKey(plistAdd);
        //保存
        list.Save();
    }
Esempio n. 14
0
    private static void EditorPlist(string filePath)
    {
        XCPlist list   = new XCPlist(filePath);
        string  bundle = "com.yusong.momo";

        string PlistAdd = @"  
            <key>CFBundleURLTypes</key>
            <array>
            <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLIconFile</key>
            <string>Icon@2x</string>
            <key>CFBundleURLName</key>
            <string>" + bundle + @"</string>
            <key>CFBundleURLSchemes</key>
            <array>
            <string>ww123456</string>
            </array>
            </dict>
            </array>";

        //在plist里面增加一行
        list.AddKey(PlistAdd);
        //在plist里面替换一行
        list.ReplaceKey("<string>com.yusong.${PRODUCT_NAME}</string>", "<string>" + bundle + "</string>");
        //保存
        list.Save();
    }
Esempio n. 15
0
    private static void xyEditorPlist(string filePath, string bundleID)
    {
        XCPlist list     = new XCPlist(filePath);
        string  plistAdd = @"
			<key>CFBundleURLTypes</key>
            <array>
            <dict>            
            <key>CFBundleURLSchemes</key>
            <array>
            <string>" + bundleID + @".alipay</string>
            </array>			
            </dict>
            </array>
			<key>LSApplicationQueriesSchemes</key>
			<array>
				<string>alipay</string>
				<string>aliminipayauth</string>
				<string>wechat</string>
				<string>weixin</string>
				<string>xyzsapp</string>
			</array>
            <key>NSAppTransportSecurity</key>
            <dict>
            <key>NSAllowsArbitraryLoads</key>
            <true/>
            </dict>"    ;

        //在plist里面增加一行
        list.AddKey(plistAdd);
        //保存
        list.Save();
    }
Esempio n. 16
0
    private static void itoolsEditorPlist(string filePath, string bundleID)
    {
        XCPlist list     = new XCPlist(filePath);
        string  plistAdd = @"
			<key>CFBundleURLTypes</key>
            <array>
            <dict>            
            <key>CFBundleURLSchemes</key>
            <array>
            <string>" + bundleID + @"</string>
            </array>			
            </dict>
            </array>
			<key>LSApplicationQueriesSchemes</key>
            <array>
            <string>ailplay</string>
            <string>QQ41C2A839</string>
            </array>
            <key>NSAppTransportSecurity</key>
            <dict>
            <key>NSAllowsArbitraryLoads</key>
            <true/>
            </dict>"    ;

        //在plist里面增加一行
        list.AddKey(plistAdd);
        //保存
        list.Save();
    }
Esempio n. 17
0
    private static void EditorPlist(string filePath)
    {
        DeployIOS.UpdateBaseInfo();
        XCPlist list     = new XCPlist(filePath);
        string  plistAdd = File.ReadAllText(iosConfigPath);

        list.AddKey(plistAdd);
        list.Save();
    }
Esempio n. 18
0
    private static void EditInfoPlist(string projPath)
    {
        //读取UnityAppController.mm文件

        XCPlist plist = new XCPlist(projPath + "/Info.plist");

        //info 添加
        string PlistAdd1 = @"	<key>NSCameraUsageDescription</key> <string>${PRODUCT_NAME}自定义头像需要</string>";
        string PlistAdd2 = @"  	<key>NSPhotoLibraryUsageDescription</key><string>${PRODUCT_NAME}自定义头像需要</string>";
        string PlistAdd3 = @"	<key>NSMicrophoneUsageDescription</key><string>${PRODUCT_NAME}语音聊天需要</string>";

        //URL Scheme 添加
        string PlistAdd = @"  
            <key>CFBundleURLTypes</key>
			<array>
				<dict>
					<key>CFBundleURLName</key>
					<string>WX</string>
					<key>CFBundleURLSchemes</key>
					<array>
						<string>wxca7116033db16bdf</string>
					</array>
				</dict>
				<dict>
					<key>CFBundleURLSchemes</key>
					<array>
						<string>alipayruiqugamesniuniu</string>
					</array>
					<key>CFBundleURLName</key>
					<string>Alipay</string>
				</dict>
			</array>"            ;

        //在plist里面增加一行
        plist.AddKey(PlistAdd1);
        plist.AddKey(PlistAdd2);
        plist.AddKey(PlistAdd3);
        plist.AddKey(PlistAdd);
        plist.Save();

        //XClass PlistController = new XClass(projPath + "/Info.plist");
        //PlistController.Replace("<key>System.Collections.Hashtable</key>", "<key>NSAppTransportSecurity</key>");
    }
    private static void EditInfoPlist(string projPath)
    {
        XCPlist plist = new XCPlist(projPath);

        //URL Scheme 添加
        string PlistAdd = @"  
            <key>CFBundleURLTypes</key>
			<array>
				<dict>
					<key>CFBundleURLName</key>
					<string>njmj</string>
					<key>CFBundleURLSchemes</key>
					<array>
						<string>wxa8fd7582c564fa94</string>
					</array>
				</dict>
			</array>"            ;

        //白名单添加
        string LSAdd = @"
		<key>LSApplicationQueriesSchemes</key>
			<array>
			<string>wechat</string>
            <string>weixin</string>
		</array>"        ;

        string Location = @"
		<key>NSLocationWhenInUseDescription</key>
		<string>location</string>
		<key>NSLocationAlwaysUsageDescription</key>
		<string>location</string>"        ;

        //在plist里面增加一行
        plist.AddKey(PlistAdd);
        plist.AddKey(LSAdd);
        plist.AddKey(Location);
        plist.Save();
    }
Esempio n. 20
0
    private static void EditorPlist(string filePath)
    {
        XCPlist list = new XCPlist(filePath);

        string PlistAdd = @"<key>CFBundleDevelopmentRegion</key>
                            <string>zh_CN</string>
                            <key>CFBundleAllowMixedLocalizations</key>
                            <true/>
                            <key>ITSAppUsesNonExemptEncryption</key>
                            <false/>";

        list.AddKey(PlistAdd);
        list.Save();
    }
Esempio n. 21
0
    private static void EditorPlist(string filePath)
    {
        XCPlist list   = new XCPlist(filePath);
        string  bundle = "com.DreamFactionGame.DreamHeros";

        string PlistAdd = @"            
            <key>NSAppTransportSecurity</key>
            <dict>
            <key>NSAllowsArbitraryLoads</key>
            <true/>
            </dict>";

        //在plist里面增加一行
        list.AddKey(PlistAdd);
        //在plist里面替换一行
        //list.ReplaceKey("<string>com.koramgame.${PRODUCT_NAME}</string>","<string>"+bundle+"</string>");
        //保存
        list.Save();
    }
Esempio n. 22
0
    public override void EditInfoPlist(XCPlist plist)
    {
        string permission = @"  
            <key>NSCameraUsageDescription</key>
            <string>本应用需要您的同意才能使用您的摄像头</string>
            <key>NSLocationWhenInUseUsageDescription</key>
            <string>本应用需要您的同意才能使用您的位置信息</string>
			<key>NSPhotoLibraryUsageDescription</key>
            <string>本应用需要您的同意才能使用您的照片库</string>
			<key>NSMicrophoneUsageDescription</key>
            <string>本应用需要您的同意才能使用您的麦克风</string>
            <key>NSContactsUsageDescription</key>
            <string>本应用需要您的同意才能使用您的联系人</string>
            <key>NSPhotoLibraryAddUsageDescription</key>
            <string>本应用需要您的同意才能添加照片</string>
            ";

        plist.AddKey(permission);
    }
Esempio n. 23
0
    private static void downjoyEditorPlist(string filePath)
    {
        XCPlist list     = new XCPlist(filePath);
        string  plistAdd = @"
			<key>CFBundleURLTypes</key>
            <array>
            <dict>            
            <key>CFBundleURLSchemes</key>
            <array>
            <string>sdk</string>
            </array>
			<key>URL identifier</key>
            <string>com.downjoy.sdk</string>
            </dict>
            </array>";

        //在plist里面增加一行
        list.AddKey(plistAdd);
        //保存
        list.Save();
    }
Esempio n. 24
0
    private static void xxEditorPlist(string filePath, string bundleID)
    {
        XCPlist list     = new XCPlist(filePath);
        string  plistAdd = @"
			<key>CFBundleURLTypes</key>
            <array>
            <dict>            
            <key>CFBundleURLSchemes</key>
            <array>
            <string>" + bundleID + @"</string>
            </array>			
            </dict>
            </array>
			<key>CFBundleAllowMixedLocalizations</key>
			<true/>
			<key>NSLocationAlwaysUsageDescription</key>
			<string></string>
			<key>NSLocationWhenInUseUsageDescription</key>
			<string></string>
			<key>LSApplicationQueriesSchemes</key>
			<array>
				<string>cydia</string>
				<string>xxassistant</string>
				<string>xxassistantsdk</string>
				<string>alipay</string>
				<string>weixin</string>
				<string>wechat</string>
			</array>
			<key>NSAppTransportSecurity</key>
            <dict>
            <key>NSAllowsArbitraryLoads</key>
            <true/>
            </dict>"    ;

        //在plist里面增加一行
        list.AddKey(plistAdd);
        //保存
        list.Save();
    }
    private static void EditInfoPlist(string projPath)
    {
        XCPlist plist = new XCPlist(projPath);

        //URL Scheme 添加
        string PlistAdd = @"  
            <key>CFBundleURLTypes</key>
			<array>
				<dict>
					<key>CFBundleURLName</key>
					<string>meipai</string>
					<key>CFBundleURLSchemes</key>
					<array>
						<string>mp1089867596</string>
					</array>
				</dict>
				<dict>
					<key>CFBundleURLSchemes</key>
					<array>
						<string>dingoanxyrpiscaovl4qlw</string>
					</array>
					<key>CFBundleURLName</key>
					<string>dingtalk</string>
				</dict>
				<dict>
					<key>CFBundleURLSchemes</key>
					<array>
						<string>ap2015072400185895</string>
					</array>
					<key>CFBundleURLName</key>
					<string>alipayShare</string>
				</dict>
				<dict>
					<key>CFBundleURLSchemes</key>
					<array>
					<string>vk5312801</string>
					<string>yx0d9a9f9088ea44d78680f3274da1765f</string>
					<string>pin4797078908495202393</string>
					<string>kakao48d3f524e4a636b08d81b3ceb50f1003</string>
					<string>pdk4797078908495202393</string>
					<string>tb2QUXqO9fcgGdtGG1FcvML6ZunIQzAEL8xY6hIaxdJnDti2DYwM</string>
					<string>com.mob.demoShareSDK</string>
					<string>rm226427com.mob.demoShareSDK</string>
					<string>pocketapp1234</string>
					<string>QQ41EC8DB4</string>
					<string>wxe959e86bfda2583c</string>
					<string>tencent1106021812</string>
					<string>fb732683093575228</string>
					<string>wb3456727435</string>
					</array>
				</dict>
			</array>"            ;

        //白名单添加
        string LSAdd = @"
		<key>LSApplicationQueriesSchemes</key>
			<array>
			<string>dingtalk-open</string>
			<string>dingtalk</string>
			<string>mqqopensdkapiV4</string>
			<string>weibosdk</string>
			<string>sinaweibohd</string>
			<string>sinaweibo</string>
			<string>vkauthorize</string>
			<string>fb-messenger</string>
			<string>yixinfav</string>
			<string>yixinoauth</string>
			<string>yixinopenapi</string>
			<string>yixin</string>
			<string>pinit</string>
			<string>kakaolink</string>
			<string>kakao48d3f524e4a636b08d81b3ceb50f1003</string>
			<string>alipay</string>
			<string>storykompassauth</string>
			<string>pinterestsdk.v1</string>
			<string>kakaokompassauth</string>
			<string>alipayshare</string>
			<string>pinit</string>
			<string>line</string>
			<string>whatsapp</string>
			<string>mqqwpa</string>
			<string>instagram</string>
			<string>fbauth2</string>
			<string>renren</string>
			<string>renrenios</string>
			<string>renrenapi</string>
			<string>rm226427com.mob.demoShareSDK</string>
			<string>mqq</string>
			<string>mqqopensdkapiV2</string>
			<string>mqqopensdkapiV3</string>
			<string>wtloginmqq2</string>
			<string>mqqapi</string>
			<string>mqqOpensdkSSoLogin</string>
			<string>sinaweibohdsso</string>
			<string>sinaweibosso</string>
			<string>wechat</string>
			<string>weixin</string>
		</array>"        ;

        //权限
        string NSAdd = @"
			<key>UIRequiresPersistentWiFi</key>
			<true/>
			<key>NSCameraUsageDescription</key>
			<string>请求访问摄像机</string>
			<key>NSMicrophoneUsageDescription</key>
			<string>请求访问麦克风</string>
            <key>NSPhotoLibraryUsageDescription</key>
            <string>请求访问相册</string>";

        //在plist里面增加一行
        plist.AddKey(PlistAdd);
        plist.AddKey(LSAdd);
        plist.AddKey(NSAdd);
        plist.Save();
    }
Esempio n. 26
0
    private static void ConfigXcodeProject(string projectPath)
    {
        string    projectname = projectPath + "/" + CN_APP_NAME + "/Unity-iPhone.xcodeproj";
        string    plistPath   = Path.GetFullPath(projectname);
        XCProject project     = new XCProject(projectname);

        string[] files = Directory.GetFiles(Path.Combine(Application.dataPath, "Plugins/iOSProjectMods"), "*.projmods", SearchOption.AllDirectories);
        {
            var __array1       = files;
            var __arrayLength1 = __array1.Length;
            for (int __i1 = 0; __i1 < __arrayLength1; ++__i1)
            {
                var file = (string)__array1[__i1];
                {
                    project.ApplyMod(file);
                }
            }
        }
        project.overwriteBuildSetting("GCC_ENABLE_CPP_EXCEPTIONS", "YES", "Release");
        project.overwriteBuildSetting("GCC_ENABLE_OBJC_EXCEPTIONS", "YES", "Release");
        project.overwriteBuildSetting("GCC_ENABLE_CPP_RTTI", "YES", "Release");
        project.overwriteBuildSetting("ENABLE_BITCODE", "NO", "Release");

        project.overwriteBuildSetting("GCC_ENABLE_CPP_EXCEPTIONS", "YES", "Debug");
        project.overwriteBuildSetting("GCC_ENABLE_OBJC_EXCEPTIONS", "YES", "Debug");
        project.overwriteBuildSetting("GCC_ENABLE_CPP_RTTI", "YES", "Debug");
        project.overwriteBuildSetting("ENABLE_BITCODE", "NO", "Debug");

        //debug generate dSYM
        project.overwriteBuildSetting("DEBUG_INFORMATION_FORMAT", "dwarf-with-dsym", "Debug");

        plistPath = Path.Combine(projectPath + "/" + CN_APP_NAME, "info.plist");
        XCPlist list = new XCPlist(plistPath);

        list.ReplaceKey("<string>en</string>", "<string>zh_CN</string>");

        string plistAdd = @"	
	<key>NSAppTransportSecurity</key>
	<dict>
		<key>NSAllowsArbitraryLoads</key>
		<true/>
	</dict>
	<key>LSApplicationQueriesSchemes</key>
	<array>
		<string>sinaweibo</string>
		<string>sinaweibohd</string>
		<string>sinaweibosso</string>
		<string>sinaweibohdsso</string>
		<string>weibosdk</string>
		<string>weibosdk2.5</string>
		<string>wechat</string>
		<string>weixin</string>
		<string>fbauth2</string>
	</array>
	<key>CFBundleURLTypes</key>
	<array>
		<dict>
			<key>CFBundleTypeRole</key>
			<string>Editor</string>
			<key>CFBundleURLSchemes</key>
			<array>
				<string>wb568898243</string>
			</array>
		</dict>
		<dict>
			<key>CFBundleTypeRole</key>
			<string>Editor</string>
			<key>CFBundleURLSchemes</key>
			<array>
				<string>wx4868b35061f87885</string>
			</array>
		</dict>
	</array>"    ;


        list.AddKey(plistAdd);
        list.Save();
        project.Save();

        CopyLunchImage(projectPath);
    }
Esempio n. 27
0
    private static void EditorPlist(string filePath)
    {
        XCPlist list = new XCPlist(filePath);

        string PlistAdd = @"
				<key>APPKEY_DENGTA</key>
				<string>0I200A6H7A04ZKTA</string>
				<key>CFBundleURLTypes</key>
				<array>
					<dict>
						<key>CFBundleTypeRole</key>
						<string>Editor</string>
						<key>CFBundleURLName</key>
						<string>weixin</string>
						<key>CFBundleURLSchemes</key>
						<array>
							<string>"                             + "WXAPP_ID" + @"</string>
						</array>
					</dict>
					<dict>
						<key>CFBundleTypeRole</key>
						<string>Editor</string>
						<key>CFBundleURLName</key>
						<string>tencentopenapi</string>
						<key>CFBundleURLSchemes</key>
						<array>
							<string>tencent"                             + "QQ_APPID" + @"</string>
						</array>
					</dict>
					<dict>
						<key>CFBundleTypeRole</key>
						<string>Editor</string>
						<key>CFBundleURLName</key>
						<string>QQ</string>
						<key>CFBundleURLSchemes</key>
						<array>
							<string>QQ"                             + "QQ_APPID_x8" + @"</string>
						</array>
					</dict>
					<dict>
						<key>CFBundleTypeRole</key>
						<string>Editor</string>
						<key>CFBundleURLName</key>
						<string>QQLaunch</string>
						<key>CFBundleURLSchemes</key>
						<array>
							<string>QQ"                             + "QQ_APPID" + @"</string>
						</array>
					</dict>
				</array>
				<key>CHANNEL_DENGTA</key>
				<string>10001</string>
				<key>LSApplicationCategoryType</key>
					<string></string>
					<key>LSApplicationQueriesSchemes</key>
					<array>
						<string>mqq</string>
						<string>mqqapi</string>
						<string>wtloginmqq2</string>
						<string>mqqopensdkapiV3</string>
						<string>mqqopensdkapiV2</string>
						<string>mqqwpa</string>
						<string>mqqOpensdkSSoLogin</string>
						<string>mqqgamebindinggroup</string>
						<string>mqqopensdkfriend</string>
						<string>mqzone</string>
						<string>weixin</string>
						<string>wechat</string>
					</array>
				<key>LSRequiresIPhoneOS</key>
				<true/>
				<key>MSDKKey</key>
				<string>"                 + "MSDKKey" + @"</string>
				<key>MSDK_OfferId</key>
				<string>"                 + "OfferID" + @"</string>
				<key>MSDK_URL</key>
				<string>"                 + "MsdkUrl" + @"</string>
				<key>QQAppID</key>
				<string>"                 + "QQ_APPID" + @"</string>
				<key>QQAppKey</key>
				<string>"                 + "QQ_KEY" + @"</string>
				<key>WXAppID</key>
				<string>"                 + "WX_APPID" + @"</string>
				<key>WXAppKey</key>
				<string>"                 + "WX_Key" + @"</string>
				<key>NeedNotice</key>
				<true/>
				<key>NoticeTime</key>
				<integer>600</integer>"                ;

        list.AddKey(PlistAdd);

        list.Save();
    }
    private static void EditInfoPlist(string projPath)
    {
        XCPlist plist = new XCPlist(projPath);
        //URL Scheme 添加
        string PlistAdd = @"  
            <key>CFBundleURLTypes</key>
			<array>

				<dict>
					<key>CFBundleURLSchemes</key>
					<array>
						<string>tencent1106301431</string>
					</array>
					<key>CFBundleURLName</key>
					<string>QQ2</string>
				</dict>
				<dict>
					<key>CFBundleURLSchemes</key>
					<array>
						<string>QQ41F0D1F7</string>
					</array>
					<key>CFBundleURLName</key>
					<string>QQ</string>
				</dict>

				<dict>
					<key>CFBundleURLSchemes</key>
					<array>
					<string>vk5312801</string>
					<string>yx0d9a9f9088ea44d78680f3274da1765f</string>
					<string>pin4797078908495202393</string>
					<string>kakao48d3f524e4a636b08d81b3ceb50f1003</string>
					<string>pdk4797078908495202393</string>
					<string>tb2QUXqO9fcgGdtGG1FcvML6ZunIQzAEL8xY6hIaxdJnDti2DYwM</string>
					<string>com.mob.demoShareSDK</string>
					<string>rm226427com.mob.demoShareSDK</string>
					<string>pocketapp1234</string>
					<string>QQ05FB8B52</string>
					<string>wx4868b35061f87885</string>
					<string>tencent100371282</string>
					<string>fb107704292745179</string>
					<string>wb568898243</string>
					</array>
				</dict>
			</array>"            ;

        //白名单添加
        string LSAdd = @"
		<key>LSApplicationQueriesSchemes</key>
			<array>
			<string>dingtalk-open</string>
			<string>dingtalk</string>
			<string>mqqopensdkapiV4</string>
			<string>weibosdk</string>
			<string>sinaweibohd</string>
			<string>sinaweibo</string>
			<string>vkauthorize</string>
			<string>fb-messenger</string>
			<string>yixinfav</string>
			<string>yixinoauth</string>
			<string>yixinopenapi</string>
			<string>yixin</string>
			<string>pinit</string>
			<string>kakaolink</string>
			<string>kakao48d3f524e4a636b08d81b3ceb50f1003</string>
			<string>alipay</string>
			<string>storykompassauth</string>
			<string>pinterestsdk.v1</string>
			<string>kakaokompassauth</string>
			<string>alipayshare</string>
			<string>pinit</string>
			<string>line</string>
			<string>whatsapp</string>
			<string>mqqwpa</string>
			<string>instagram</string>
			<string>fbauth2</string>
			<string>renren</string>
			<string>renrenios</string>
			<string>renrenapi</string>
			<string>rm226427com.mob.demoShareSDK</string>
			<string>mqq</string>
			<string>mqqopensdkapiV2</string>
			<string>mqqopensdkapiV3</string>
			<string>wtloginmqq2</string>
			<string>mqqapi</string>
			<string>mqqOpensdkSSoLogin</string>
			<string>sinaweibohdsso</string>
			<string>sinaweibosso</string>
			<string>wechat</string>
			<string>weixin</string>
		</array>"        ;


        //在plist里面增加一行
        plist.AddKey(PlistAdd);
        plist.AddKey(LSAdd);

        ShareSDKConfig theConfig;

        try
        {
            string          filePath  = Application.dataPath + "/Plugins/ShareSDK/Editor/ShareSDKConfig.bin";
            BinaryFormatter formatter = new BinaryFormatter();
            Stream          destream  = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.Read);
            ShareSDKConfig  config    = (ShareSDKConfig)formatter.Deserialize(destream);
            destream.Flush();
            destream.Close();
            theConfig = config;
        }
        catch (Exception)
        {
            theConfig = new ShareSDKConfig();
        }

        string AppKey    = @"<key>MOBAppkey</key> <string>" + theConfig.appKey + "</string>";
        string AppSecret = @"<key>MOBAppSecret</key> <string>" + theConfig.appSecret + "</string>";

        //在plist里面增加一行
        plist.AddKey(AppKey);
        plist.AddKey(AppSecret);

        plist.Save();
    }
    private static void EditInfoPlist(string projPath)
    {
        XCPlist plist = new XCPlist(projPath);

        //URL Scheme 添加
        string PlistAdd = @"  
            <key>CFBundleURLTypes</key>
			<array>
				<dict>
					<key>CFBundleURLSchemes</key>
					<array>
						<string>ap2015072400185895</string>
					</array>
					<key>CFBundleURLName</key>
					<string>alipayShare</string>
				</dict>
				<dict>
					<key>CFBundleURLSchemes</key>
					<array>
						<string>vk5312801</string>
					<string>yx0d9a9f9088ea44d78680f3274da1765f</string>
					<string>pin4797078908495202393</string>
					<string>kakao48d3f524e4a636b08d81b3ceb50f1003</string>
					<string>pdk4797078908495202393</string>
					<string>tb2QUXqO9fcgGdtGG1FcvML6ZunIQzAEL8xY6hIaxdJnDti2DYwM</string>
					<string>com.mob.demoShareSDK</string>
					<string>rm226427com.mob.demoShareSDK</string>
					<string>pocketapp1234</string>
					<string>QQ05FB8B52</string>
					<string>wx4868b35061f87885</string>
					<string>tencent100371282</string>
					<string>fb107704292745179</string>
					<string>wb568898243</string>
					</array>
				</dict>
			</array>"            ;

        //白名单添加
        string LSAdd = @"
		<key>LSApplicationQueriesSchemes</key>
			<array>
			<string>mqqopensdkapiV4</string>
			<string>weibosdk</string>
			<string>sinaweibohd</string>
			<string>sinaweibo</string>
			<string>vkauthorize</string>
			<string>fb-messenger</string>
			<string>yixinfav</string>
			<string>yixinoauth</string>
			<string>yixinopenapi</string>
			<string>yixin</string>
			<string>pinit</string>
			<string>kakaolink</string>
			<string>kakao48d3f524e4a636b08d81b3ceb50f1003</string>
			<string>alipay</string>
			<string>storykompassauth</string>
			<string>pinterestsdk.v1</string>
			<string>kakaokompassauth</string>
			<string>alipayshare</string>
			<string>pinit</string>
			<string>line</string>
			<string>whatsapp</string>
			<string>mqqwpa</string>
			<string>instagram</string>
			<string>fbauth2</string>
			<string>renren</string>
			<string>renrenios</string>
			<string>renrenapi</string>
			<string>rm226427com.mob.demoShareSDK</string>
			<string>mqq</string>
			<string>mqqopensdkapiV2</string>
			<string>mqqopensdkapiV3</string>
			<string>wtloginmqq2</string>
			<string>mqqapi</string>
			<string>mqqOpensdkSSoLogin</string>
			<string>sinaweibohdsso</string>
			<string>sinaweibosso</string>
			<string>wechat</string>
			<string>weixin</string>
		</array>"        ;


        //在plist里面增加一行
        plist.AddKey(PlistAdd);
        plist.AddKey(LSAdd);
        plist.Save();
    }
Esempio n. 30
0
    private static void EditShareSDKInfoPlist(string projPath)
    {
        XCPlist plist = new XCPlist(projPath);

        //URL Scheme 添加
        string PlistAdd = @"  
            <key>CFBundleURLTypes</key>
            <array>
                <dict>
                    <key>CFBundleURLSchemes</key>
                    <array>
                    <string>com.mob.demoShareSDK</string>
                    <string>rm226427com.mob.demoShareSDK</string>
                    <string>QQ41E5EF91</string>
                    <string>wx5b07442483553ba5</string>
                    <string>tencent100371282</string>
                    <string>wb568898243</string>
                    </array>
                </dict>
            </array>";

        //白名单添加
        string LSAdd = @"
        <key>LSApplicationQueriesSchemes</key>
            <array>
            <string>mqqopensdkapiV4</string>
            <string>weibosdk</string>
            <string>sinaweibohd</string>
            <string>sinaweibo</string>
           
            <string>rm226427com.mob.demoShareSDK</string>
            <string>mqq</string>
            <string>mqqopensdkapiV2</string>
            <string>mqqopensdkapiV3</string>
            <string>wtloginmqq2</string>
            <string>mqqapi</string>
            <string>mqqOpensdkSSoLogin</string>
            <string>sinaweibohdsso</string>
            <string>sinaweibosso</string>
            <string>wechat</string>
            <string>weixin</string>
        </array>";

        //ios10相关问题解决
        string ios10Add = @"
            <key>NSCameraUsageDescription</key>
            <string>装扮您的个人空间</string>
            <key>NSPhotoLibraryUsageDescription</key>
            <string>装扮您的个人空间</string>
            <key>NSMicrophoneUsageDescription</key>  
            <string>游戏内发语音</string>
            <key>NSCalendarsUsageDescription</key>
            <string>有些广告需要访问日历</string>
            <key>NSRemindersUsageDescription</key>
            <string>有些广告需要访问日历</string>
        ";


        //在plist里面增加一行
        plist.AddKey(PlistAdd);
        plist.AddKey(LSAdd);
        plist.AddKey(ios10Add);
        plist.Save();
    }