XUPorter配合XCode 7/iOS 9

Author Avatar
Kanglai Qian 10月 09, 2015

最近升级XCode 7之后发现xuporter在Jenkins上跪了,对做的修改稍作记录。

ENABLE_BITCODE

在代码里加上这两句话就能关掉 (理论上第三个参数默认是"all",但是木有用的样子)

project.overwriteBuildSetting("ENABLE_BITCODE", "NO", "Release");
project.overwriteBuildSetting("ENABLE_BITCODE", "NO", "Debug");

HTTPS

另外iOS 9引入了新特性App Transport Security (ATS),会导致HTTP访问失败,因此需要在plist里添加一处。从偷懒角度出发,我修改了下XUPorter使其支持通用的plist修改(原来只支持urltype,见commit 0c7c246),然后引入下面这个https.projmods就好了。

{
"group":"https",
"libs": [],
"frameworks":[],
"headerpaths": [],
"files": [],
"folders": [],
"excludes": [],
"compiler_flags": [],
"linker_flags": [],
"embed_binaries": [],
"plist": {
"NSAppTransportSecurity" : {
"NSAllowsArbitraryLoads":true
}
}
}

ps. XUPorter真心神器,极大节约重复劳动,今天小刀在群里还说这个=w=