日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

Xcode的Architectures和Valid Architectures的区别

發(fā)布時(shí)間:2023/12/13 编程问答 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Xcode的Architectures和Valid Architectures的区别 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

?

目錄[-]

  • Xcode的Architectures和Valid Architectures的區(qū)別
  • Architectures
  • Valid Architectures
  • 原因解釋如下:
  • 參考1:
  • 所有IOS設(shè)備詳情列表 List of iOS devices - Wikipedia, the free encyclopedia
  • 參考2:
  • iOS 7: 如何為iPhone 5S編譯64位應(yīng)用。
  • 參考3:
  • What's the difference between “Architectures” and “Valid Architectures” in Xcode Build Settings?
  • 參考4:
  • Xcode 5 and iOS 7: Architecture and Valid architectures
  • 參考5:
  • how to stop xcode5.1 building for 64bit
  • 參考6:
  • 1. Xcode Build Setting Reference (蘋果官方文檔)
  • 2. 64-Bit transition Guide for Cocoa Touch (蘋果官方文檔)
  • 3. Xcode設(shè)置項(xiàng)之Architectures和Valid Architectures

作者:shede333?
主頁(yè):http://my.oschina.net/shede333?
版權(quán)聲明:原創(chuàng)文章,版權(quán)聲明:自由轉(zhuǎn)載-非商用-非衍生-保持署名 |?Creative Commons BY-NC-ND 3.0


Xcode的Architectures和Valid Architectures的區(qū)別

Architectures

這代表,在這個(gè)項(xiàng)目里你想要Xcode編譯的目標(biāo)設(shè)備列表。

Valid Architectures

還不是太明確這個(gè)設(shè)置的意圖,但是一般來(lái)說(shuō)是不需要更改的。


在Xcode5.0里的Valid Architectures?設(shè)置里,有2個(gè)選項(xiàng):

  • 默認(rèn)為standard architectures (including 64-bit)(armv7,armv7s,arm64),這樣設(shè)置,你的Deployment target最低只能設(shè)置為 6.0,(在Xcode5.0.1 之后,最低能夠兼容IOS 5.1.1);
  • standard architectures (armv7,armv7s),這樣設(shè)置,你的Deployment target最低能設(shè)置為 4.3;
  • 原因解釋如下:

    使用standard architectures (including 64-bit)(armv7,armv7s,arm64)參數(shù),?
    則打的包里面有32位、64位兩份代碼,?
    在iPhone5s(iPhone5s的cpu是64位的)下,會(huì)首選運(yùn)行64位代碼包,?
    其余的iPhone(其余iPhone都是32位的,iPhone5c也是32位),?
    只能運(yùn)行32位包,?
    但是包含兩種架構(gòu)的代碼包,只有運(yùn)行在ios6,ios7系統(tǒng)上。?
    這也就是說(shuō),這種打包方式,對(duì)手機(jī)幾乎沒(méi)啥要求,但是對(duì)系統(tǒng)有要求,即ios6以上。

    而使用standard architectures (armv7,armv7s)參數(shù),?
    則打的包里只有32位代碼,?
    iPhone5s的cpu是64位,但是可以兼容32位代碼,即可以運(yùn)行32位代碼。但是這會(huì)降低iPhone5s的性能,原因下面的參考有解釋。?
    其余的iPhone對(duì)32位代碼包更沒(méi)問(wèn)題,?
    而32位代碼包,對(duì)系統(tǒng)也幾乎也沒(méi)什么限制。

    所以總結(jié)如下:?
    要發(fā)揮iPhone5s的64位性能,就要包含64位包,那么系統(tǒng)最低要求為ios6。?
    如果要兼容ios5以及更低的系統(tǒng),只能打32位的包,系統(tǒng)都能通用,但是會(huì)喪失iPhone5s的性能。


    參考1:

    所有IOS設(shè)備詳情列表 List of iOS devices - Wikipedia, the free encyclopedia

    armv6:iPhone 2G/3G,iPod 1G/2G?
    armv7:iPhone 3GS/4/4s,iPod 3G/4G,iPad 1G/2G/3G ,iPad Mini 1?
    armv7s:iPhone5 ,iPhone5C ,iPad4?
    armv8:iPhone5S ,iPad5(iPad Air), iPad Mini 2(iPad Mini Retina)


    參考2:

    iOS 7: 如何為iPhone 5S編譯64位應(yīng)用。

    Xcode 5編譯的iOS 7程序包含了32位和64位兩套二進(jìn)制代碼,在32位的iOS系統(tǒng)上會(huì)調(diào)用32位的二進(jìn)制代碼,在64位系統(tǒng)上會(huì)調(diào)用64位的二進(jìn)制代碼,以此來(lái)解決向后兼容的問(wèn)題。

    同時(shí),考慮到很多32位的程序可能在沒(méi)有重新編譯的情況下部署到64位系統(tǒng)上,64位的iOS系統(tǒng)中帶有兩套FrameWork,一套是32位的,一套是64位的。?
    當(dāng)64位的iOS系統(tǒng)運(yùn)行原來(lái)的32位程序時(shí),系統(tǒng)會(huì)調(diào)用32位的FrameWork作為底層支撐,當(dāng)系統(tǒng)運(yùn)行64位程序時(shí),系統(tǒng)會(huì)調(diào)用64位的FrameWork作為底層支撐。

    也就是說(shuō),當(dāng)一個(gè)iPhone 5S上同時(shí)運(yùn)行32位程序和64位程序時(shí),系統(tǒng)同時(shí)將32位和64位兩套FrameWork載入了內(nèi)存中,所以消耗的內(nèi)存也比較多。

    如果一臺(tái)64位的iOS設(shè)備上運(yùn)行的所有程序都是為64位系統(tǒng)編譯過(guò)的,iOS系統(tǒng)將只載入64位的FrameWork,這將節(jié)省好多內(nèi)存。所以,如果大家都可以快速將程序傳換成64位的,iOS將跑得更快。真的是“大家好才是真的好”。


    參考3:

    What's the difference between “Architectures” and “Valid Architectures” in Xcode Build Settings?

    Architectures are the ones you want to build, valid architectures are the ones you could conceive of building with your codebase.

    So maybe you only want to build your binary for armv7s, but the same source code would compile fine for armv7 and armv6. So?VALID_ARCHS = armv6 armv7 armv7s, but you set?ARCHS = armv7s?because that's all you actually?want?to build with your code.

    Or, in Apple-ese:

    ARCHS (Architectures)

    Space-separated list of identifiers. Specifies the architectures (ABIs, processor models) to which the binary is targeted. When this build setting specifies more than one architecture, the generated binary may contain object code for each of the specified architectures.

    and:

    VALID_ARCHS (Valid Architectures)

    Space-separated list of identifiers. Specifies the architectures for which the binary may be built. During the build, this list is intersected with the value of ARCHS build setting; the resulting list specifies the architectures the binary can run on. If the resulting architecture list is empty, the target generates no binary.

    Source:?Xcode Build Setting Reference

    In practice, you leave?VALID_ARCHS?alone and don't worry about changing it, and just fiddle with?ARCHSto set the architectures you want to build. Typically, you set a Debug build to just?NATIVE_ARCH, since you only want to build the debug version for the machine you'll be testing/running it on, and Release builds for the full spectrum of architectures you plan to support.


    參考4:

    Xcode 5 and iOS 7: Architecture and Valid architectures

    Set the architecture in build setting to?Standard architectures(armv7,armv7s)

    iPhone 5S is powered by A7 64bit processor. From?apple docs

    Xcode can build your app with both 32-bit and 64-bit binaries included. This combined binary requires a minimum deployment target of iOS 7 or later.

    Note: A future version of Xcode will let you create a single app that supports the 32-bit runtime on iOS 6 and later, and that supports the 64-bit runtime on iOS 7.

    From the documentation what i understood is

    • Xcode can create both 64bit 32bit binaries for a single app but the?
      deployment target should be iOS7. They are saying in future it will?
      be iOS 6.0
    • 32 bit binary will work fine in iPhone 5S(64 bit processor).

    Update (Xcode 5.0.1)?
    In Xcode 5.0.1 they added the support to create 64 bit binary for iOS 5.1.1 onwards.

    Xcode 5.0.1 can build your app with both 32-bit and 64-bit binaries included. This combined binary requires a minimum deployment target of iOS 5.1.1 or later. The 64-bit binary runs only on 64-bit devices running iOS 7.0.3 and later.

    Update (Xcode 5.1)?
    Xcode 5.1 made significant change in the architecture section. This?answer?will be a followup for you.?
    Check this


    參考5:

    how to stop xcode5.1 building for 64bit

    OP is posted the solution along with the question itself. But I feel it would be better to add it as an answer. In?Xcode 5.1?apple made significant changes to the?architecture?section. They made?arm64?as part of?Standard architectures. That means the projects using the default setting will be automatically build for?arm64?also. So?what you will do if your app does not support?arm64?.

    Doc says:

    Projects not able to support 64-bit need to specifically set the architectures build setting to not include 64-bit.

    How to do that?

  • Goto Targets–>Build Settings–>Architectures–>Architectures

  • Double click on the architecture will popup a menu. Choose others

  • Delete the existing row - $(ARCH_STANDARD). Add the required architectures one by one

  • Now your architecture section will look like this


  • 參考6:

    1.?Xcode Build Setting Reference (蘋果官方文檔)

    2.?64-Bit transition Guide for Cocoa Touch (蘋果官方文檔)

    3.?Xcode設(shè)置項(xiàng)之Architectures和Valid Architectures

    目錄[-]

    • Xcode的Architectures和Valid Architectures的區(qū)別
    • Architectures
    • Valid Architectures
    • 原因解釋如下:
    • 參考1:
    • 所有IOS設(shè)備詳情列表 List of iOS devices - Wikipedia, the free encyclopedia
    • 參考2:
    • iOS 7: 如何為iPhone 5S編譯64位應(yīng)用。
    • 參考3:
    • What's the difference between “Architectures” and “Valid Architectures” in Xcode Build Settings?
    • 參考4:
    • Xcode 5 and iOS 7: Architecture and Valid architectures
    • 參考5:
    • how to stop xcode5.1 building for 64bit
    • 參考6:
    • 1. Xcode Build Setting Reference (蘋果官方文檔)
    • 2. 64-Bit transition Guide for Cocoa Touch (蘋果官方文檔)
    • 3. Xcode設(shè)置項(xiàng)之Architectures和Valid Architectures

    作者:shede333?
    主頁(yè):http://my.oschina.net/shede333?
    版權(quán)聲明:原創(chuàng)文章,版權(quán)聲明:自由轉(zhuǎn)載-非商用-非衍生-保持署名 |?Creative Commons BY-NC-ND 3.0


    Xcode的Architectures和Valid Architectures的區(qū)別

    Architectures

    這代表,在這個(gè)項(xiàng)目里你想要Xcode編譯的目標(biāo)設(shè)備列表。

    Valid Architectures

    還不是太明確這個(gè)設(shè)置的意圖,但是一般來(lái)說(shuō)是不需要更改的。


    在Xcode5.0里的Valid Architectures?設(shè)置里,有2個(gè)選項(xiàng):

  • 默認(rèn)為standard architectures (including 64-bit)(armv7,armv7s,arm64),這樣設(shè)置,你的Deployment target最低只能設(shè)置為 6.0,(在Xcode5.0.1 之后,最低能夠兼容IOS 5.1.1);
  • standard architectures (armv7,armv7s),這樣設(shè)置,你的Deployment target最低能設(shè)置為 4.3;
  • 原因解釋如下:

    使用standard architectures (including 64-bit)(armv7,armv7s,arm64)參數(shù),?
    則打的包里面有32位、64位兩份代碼,?
    在iPhone5s(iPhone5s的cpu是64位的)下,會(huì)首選運(yùn)行64位代碼包,?
    其余的iPhone(其余iPhone都是32位的,iPhone5c也是32位),?
    只能運(yùn)行32位包,?
    但是包含兩種架構(gòu)的代碼包,只有運(yùn)行在ios6,ios7系統(tǒng)上。?
    這也就是說(shuō),這種打包方式,對(duì)手機(jī)幾乎沒(méi)啥要求,但是對(duì)系統(tǒng)有要求,即ios6以上。

    而使用standard architectures (armv7,armv7s)參數(shù),?
    則打的包里只有32位代碼,?
    iPhone5s的cpu是64位,但是可以兼容32位代碼,即可以運(yùn)行32位代碼。但是這會(huì)降低iPhone5s的性能,原因下面的參考有解釋。?
    其余的iPhone對(duì)32位代碼包更沒(méi)問(wèn)題,?
    而32位代碼包,對(duì)系統(tǒng)也幾乎也沒(méi)什么限制。

    所以總結(jié)如下:?
    要發(fā)揮iPhone5s的64位性能,就要包含64位包,那么系統(tǒng)最低要求為ios6。?
    如果要兼容ios5以及更低的系統(tǒng),只能打32位的包,系統(tǒng)都能通用,但是會(huì)喪失iPhone5s的性能。


    參考1:

    所有IOS設(shè)備詳情列表 List of iOS devices - Wikipedia, the free encyclopedia

    armv6:iPhone 2G/3G,iPod 1G/2G?
    armv7:iPhone 3GS/4/4s,iPod 3G/4G,iPad 1G/2G/3G ,iPad Mini 1?
    armv7s:iPhone5 ,iPhone5C ,iPad4?
    armv8:iPhone5S ,iPad5(iPad Air), iPad Mini 2(iPad Mini Retina)


    參考2:

    iOS 7: 如何為iPhone 5S編譯64位應(yīng)用。

    Xcode 5編譯的iOS 7程序包含了32位和64位兩套二進(jìn)制代碼,在32位的iOS系統(tǒng)上會(huì)調(diào)用32位的二進(jìn)制代碼,在64位系統(tǒng)上會(huì)調(diào)用64位的二進(jìn)制代碼,以此來(lái)解決向后兼容的問(wèn)題。

    同時(shí),考慮到很多32位的程序可能在沒(méi)有重新編譯的情況下部署到64位系統(tǒng)上,64位的iOS系統(tǒng)中帶有兩套FrameWork,一套是32位的,一套是64位的。?
    當(dāng)64位的iOS系統(tǒng)運(yùn)行原來(lái)的32位程序時(shí),系統(tǒng)會(huì)調(diào)用32位的FrameWork作為底層支撐,當(dāng)系統(tǒng)運(yùn)行64位程序時(shí),系統(tǒng)會(huì)調(diào)用64位的FrameWork作為底層支撐。

    也就是說(shuō),當(dāng)一個(gè)iPhone 5S上同時(shí)運(yùn)行32位程序和64位程序時(shí),系統(tǒng)同時(shí)將32位和64位兩套FrameWork載入了內(nèi)存中,所以消耗的內(nèi)存也比較多。

    如果一臺(tái)64位的iOS設(shè)備上運(yùn)行的所有程序都是為64位系統(tǒng)編譯過(guò)的,iOS系統(tǒng)將只載入64位的FrameWork,這將節(jié)省好多內(nèi)存。所以,如果大家都可以快速將程序傳換成64位的,iOS將跑得更快。真的是“大家好才是真的好”。


    參考3:

    What's the difference between “Architectures” and “Valid Architectures” in Xcode Build Settings?

    Architectures are the ones you want to build, valid architectures are the ones you could conceive of building with your codebase.

    So maybe you only want to build your binary for armv7s, but the same source code would compile fine for armv7 and armv6. So?VALID_ARCHS = armv6 armv7 armv7s, but you set?ARCHS = armv7s?because that's all you actually?want?to build with your code.

    Or, in Apple-ese:

    ARCHS (Architectures)

    Space-separated list of identifiers. Specifies the architectures (ABIs, processor models) to which the binary is targeted. When this build setting specifies more than one architecture, the generated binary may contain object code for each of the specified architectures.

    and:

    VALID_ARCHS (Valid Architectures)

    Space-separated list of identifiers. Specifies the architectures for which the binary may be built. During the build, this list is intersected with the value of ARCHS build setting; the resulting list specifies the architectures the binary can run on. If the resulting architecture list is empty, the target generates no binary.

    Source:?Xcode Build Setting Reference

    In practice, you leave?VALID_ARCHS?alone and don't worry about changing it, and just fiddle with?ARCHSto set the architectures you want to build. Typically, you set a Debug build to just?NATIVE_ARCH, since you only want to build the debug version for the machine you'll be testing/running it on, and Release builds for the full spectrum of architectures you plan to support.


    參考4:

    Xcode 5 and iOS 7: Architecture and Valid architectures

    Set the architecture in build setting to?Standard architectures(armv7,armv7s)

    iPhone 5S is powered by A7 64bit processor. From?apple docs

    Xcode can build your app with both 32-bit and 64-bit binaries included. This combined binary requires a minimum deployment target of iOS 7 or later.

    Note: A future version of Xcode will let you create a single app that supports the 32-bit runtime on iOS 6 and later, and that supports the 64-bit runtime on iOS 7.

    From the documentation what i understood is

    • Xcode can create both 64bit 32bit binaries for a single app but the?
      deployment target should be iOS7. They are saying in future it will?
      be iOS 6.0
    • 32 bit binary will work fine in iPhone 5S(64 bit processor).

    Update (Xcode 5.0.1)?
    In Xcode 5.0.1 they added the support to create 64 bit binary for iOS 5.1.1 onwards.

    Xcode 5.0.1 can build your app with both 32-bit and 64-bit binaries included. This combined binary requires a minimum deployment target of iOS 5.1.1 or later. The 64-bit binary runs only on 64-bit devices running iOS 7.0.3 and later.

    Update (Xcode 5.1)?
    Xcode 5.1 made significant change in the architecture section. This?answer?will be a followup for you.?
    Check this


    參考5:

    how to stop xcode5.1 building for 64bit

    OP is posted the solution along with the question itself. But I feel it would be better to add it as an answer. In?Xcode 5.1?apple made significant changes to the?architecture?section. They made?arm64?as part of?Standard architectures. That means the projects using the default setting will be automatically build for?arm64?also. So?what you will do if your app does not support?arm64?.

    Doc says:

    Projects not able to support 64-bit need to specifically set the architectures build setting to not include 64-bit.

    How to do that?

  • Goto Targets–>Build Settings–>Architectures–>Architectures

  • Double click on the architecture will popup a menu. Choose others

  • Delete the existing row - $(ARCH_STANDARD). Add the required architectures one by one

  • Now your architecture section will look like this


  • 參考6:

    1.?Xcode Build Setting Reference (蘋果官方文檔)

    2.?64-Bit transition Guide for Cocoa Touch (蘋果官方文檔)

    3.?Xcode設(shè)置項(xiàng)之Architectures和Valid Architectures

    總結(jié)

    以上是生活随笔為你收集整理的Xcode的Architectures和Valid Architectures的区别的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

    如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。

    主站蜘蛛池模板: 午夜啪啪福利视频 | 岳奶大又白下面又肥又黑水多 | 日本在线视频不卡 | 欧美成人91 | 徐锦江一级淫片免费看 | 一区二区日韩电影 | 电影寂寞少女免费观看 | 中文字幕亚洲一区二区三区五十路 | 成人在线激情视频 | 欧美骚视频 | 狠狠干干 | 狠狠综合久久 | 国产精品久久久久久久裸模 | 精品成人无码一区二区三区 | 一级黄色片在线看 | 狠狠撸视频 | 麻豆黄色一级片 | h小视频在线观看 | 刘亦菲毛片一区二区三区 | 制服.丝袜.亚洲.中文.综合懂 | 久久深夜视频 | 国产不卡精品视频 | 日本在线不卡一区 | 国产精品xxxx喷水欧美 | 亚洲系列中文字幕 | 一区二区三区黄 | 6080福利| 精人妻无码一区二区三区 | 一级淫片免费 | 亚洲色图国产视频 | 深夜国产视频 | 粉嫩av一区二区三区免费观看 | 日本一本视频 | 伊人网影院 | 免费一级片视频 | 国精产品99永久一区一区 | 精品国产九九九 | 韩国伦理大片 | 美女一级视频 | 久久理伦 | 精品www久久久久久奶水 | 又黄又色又爽的视频 | 欧美一二三区 | 国产伦理片在线观看 | 国产精品老熟女视频一区二区 | 国产又黄又硬又粗 | 欧亚免费视频 | 天天爽天天操 | 最新地址在线观看 | 国产一区二区视频免费 | 男女超碰| 男人天堂久久久 | 亚洲欧美在线视频 | 特极毛片 | 在线观看免费黄视频 | 在线视频三区 | 国产自产视频 | 台湾swag在线播放 | 色哟哟日韩精品 | 免费看日产一区二区三区 | 久久不卡视频 | 长篇乱肉合集乱500小说日本 | 国产精品99re| 亚洲av无码国产精品久久不卡 | 日韩三级中文字幕 | 香蕉视频毛片 | 男人亚洲天堂 | 欧美一区二区三区黄片 | 黄频在线免费观看 | 三级黄色免费片 | 手机av在线免费 | 国产精品一区二区久久 | 欧美 日韩 人妻 高清 中文 | 91成人一区 | 国产精品天天干 | 国色天香网站 | 中文字幕人妻一区二区三区在线视频 | 好吊妞一区二区三区 | 国产乱淫视频 | 国产熟女一区二区丰满 | 亚洲色图校园春色 | 久久黄色片视频 | 黄色特级视频 | 久久久久久9 | 在线免费观看视频 | 国产精品怡红院 | 色女人天堂 | 五月婷婷开心 | 嫩草影院在线免费观看 | 国产精品无码影院 | 亚洲av无码一区二区三区在线 | 一出一进一爽一粗一大视频 | 免费裸体视频女性 | ass日本粉嫩pics珍品 | 久久国产精品精品国产色婷婷 | 中文字幕一区二区三区四区免费看 | 91在线小视频 | 国产精品视频网址 | 欧洲成人在线 |