onevcat / XUPorter

Add files and frameworks to your Xcode project after it is generated by Unity 3D.
http://onevcat.com/2012/12/xuporter/
MIT License
596 stars 241 forks source link

Adding multiple depth tags into Info.plist... #61

Open sweatyc opened 8 years ago

sweatyc commented 8 years ago

Any way to add muliple depth tags into Info.plist? e.g. from Facebook:

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSExceptionDomains</key>
    <dict>
        <key>facebook.com</key>
        <dict>
            <key>NSIncludesSubdomains</key>
            <true/>                
            <key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
            <false/>
        </dict>
        <key>fbcdn.net</key>
        <dict>
            <key>NSIncludesSubdomains</key>
            <true/>
            <key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
            <false/>
        </dict>
        <key>akamaihd.net</key>
        <dict>
            <key>NSIncludesSubdomains</key>
            <true/>
            <key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
            <false/>
        </dict>
    </dict>
</dict>

I tried in XCodePostProcess.cs add:

            XCPlist list = new XCPlist (plistFullPath);

            Hashtable ht = new Hashtable {
                {"NSAppTransportSecurity", new Hashtable {
                        {"NSExceptionDomains", new Hashtable {
                                {"facebook.com", new Hashtable {
                                    {"NSIncludesSubdomains", true},
                                    {"NSThirdPartyExceptionRequiresForwardSecrecy", false}
                                    }
                                },
                                {"fbcdn.net", new Hashtable {
                                    {"NSIncludesSubdomains", true},
                                    {"NSThirdPartyExceptionRequiresForwardSecrecy", false}
                                    }
                                },
                                {"akamaihd.net", new Hashtable {
                                    {"NSIncludesSubdomains", true},
                                    {"NSThirdPartyExceptionRequiresForwardSecrecy", false}
                                    }}
                            }
                        }
                    }
                }
            };

            list.Process (ht);

But error throw seems XUPorter cannot handle tags with depth more than 2