{"id":1178,"date":"2015-12-01T00:00:03","date_gmt":"2015-11-30T15:00:03","guid":{"rendered":"https:\/\/blog.ymyzk.com\/?p=1178"},"modified":"2016-11-30T18:25:06","modified_gmt":"2016-11-30T09:25:06","slug":"ios-tvos-watchos-architectures","status":"publish","type":"post","link":"https:\/\/blog.ymyzk.com\/2015\/12\/ios-tvos-watchos-architectures\/","title":{"rendered":"iOS\u30fbtvOS\u30fbwatchOS \u30c7\u30d0\u30a4\u30b9\u306e\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306b\u3064\u3044\u3066\u306e\u307e\u3068\u3081"},"content":{"rendered":"

\u3053\u306e\u8a18\u4e8b\u306f CAMPHOR- Advent Calendar 2015<\/a> \u306e1\u65e5\u76ee\u306e\u8a18\u4e8b\u3067\u3059.<\/p>\n

iOS\u30fbtvOS\u30fbwatchOS \u30a2\u30d7\u30ea\u3092\u4f5c\u6210\u3057\u30d3\u30eb\u30c9\u3059\u308b\u306b\u3042\u305f\u3063\u3066, \u547d\u4ee4\u30bb\u30c3\u30c8\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306b\u3064\u3044\u3066\u7406\u89e3\u3057\u3066\u304a\u304f\u3053\u3068\u306f, \u9069\u5207\u306a\u30d0\u30a4\u30ca\u30ea\u3092\u51fa\u529b\u3059\u308b\u3053\u3068\u306b\u5f79\u7acb\u3061\u307e\u3059. \u307e\u305f watchOS 2 \u4ee5\u964d\u7b49\u3067\u5bfe\u5fdc\u304c\u5fc5\u9808\u306b\u306a\u3063\u3066\u3044\u308b Bitcode \u306b\u3064\u3044\u3066\u306e\u7406\u89e3\u3092\u6df1\u3081\u308b\u3053\u3068\u306b\u3082\u5f79\u7acb\u3064\u304b\u3082\u3057\u308c\u307e\u305b\u3093.<\/p>\n

\u3053\u306e\u8a18\u4e8b\u3067\u306f\u00a0iOS\u30fbtvOS\u30fbwatchOS \u30c7\u30d0\u30a4\u30b9\u306e\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306b\u3064\u3044\u3066\u306e\u69d8\u3005\u306a\u60c5\u5831\u3092\u307e\u3068\u3081\u307e\u3059.<\/p>\n

<\/p>\n

\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3068\u306f<\/h2>\n

\u3053\u306e\u8a18\u4e8b\u3067\u306e\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3068\u306f\u4e3b\u306b CPU \u306e\u547d\u4ee4\u30bb\u30c3\u30c8\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3 (ISA)<\/a> \u306e\u3053\u3068\u3092\u6307\u3057\u307e\u3059. \u547d\u4ee4\u30bb\u30c3\u30c8\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3067\u306f\u547d\u4ee4\u30bb\u30c3\u30c8, \u30ec\u30b8\u30b9\u30bf, \u30a2\u30c9\u30ec\u30c3\u30b7\u30f3\u30b0\u30e2\u30fc\u30c9\u306a\u3069\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059. ISA \u306f CPU \u306b\u7269\u7406\u7684\u306b\u5b9f\u88c5\u3055\u308c\u3066\u3044\u308b\u306e\u3067, OS \u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u3066\u3082\u5909\u308f\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093.<\/p>\n

\u30c7\u30d0\u30a4\u30b9\u306e\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u4e00\u89a7<\/h2>\n

iOS\u30fbwatchOS \u30fbtvOS \u30c7\u30d0\u30a4\u30b9\u3067\u63a1\u7528\u3055\u308c\u3066\u3044\u308b\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u4e00\u89a7\u3092\u4ee5\u4e0b\u306b\u307e\u3068\u3081\u307e\u3059. \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u540d\u306f Apple \u304c Xcode \u7b49\u3067\u7528\u3044\u3066\u3044\u308b\u540d\u79f0\u3067\u3059.<\/p>\n\n\n\n\n\n\n\n\n\n\n\n
\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u540d<\/th>\n32\/64bit<\/th>\n\u63a1\u7528\u3057\u3066\u3044\u308b\u30c7\u30d0\u30a4\u30b9\u306e\u4f8b<\/th>\n<\/tr>\n<\/thead>\n
armv6<\/td>\n32bit<\/td>\niPhone, iPhone 3G<\/td>\n<\/tr>\n
armv7<\/td>\n32bit<\/td>\niPhone 3GS \u4ee5\u964d<\/td>\n<\/tr>\n
armv7s<\/td>\n32bit<\/td>\niPhone 5 \u4ee5\u964d<\/td>\n<\/tr>\n
arm64<\/td>\n64bit<\/td>\niPhone 5s \u4ee5\u964d<\/td>\n<\/tr>\n
armv7k<\/td>\n32bit<\/td>\nApple Watch<\/td>\n<\/tr>\n
i386<\/td>\n32bit<\/td>\nSimulator<\/td>\n<\/tr>\n
x86_64<\/td>\n64bit<\/td>\nSimulator<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\u3088\u308a\u8a73\u7d30\u306a CPU \u3068\u547d\u4ee4\u30bb\u30c3\u30c8\u306e\u4e00\u89a7\u306f Wikipedia \u306e Apple mobile application processors<\/a> \u3092\u3054\u89a7\u304f\u3060\u3055\u3044.<\/p>\n

armv7 \u306b\u5bfe\u5fdc\u3057\u305f\u30d0\u30a4\u30ca\u30ea\u306f armv7s \u3084 arm64 \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e CPU \u3067\u3082\u52d5\u4f5c\u3057\u307e\u3059. (\u4f8b: arm64 \u30ea\u30ea\u30fc\u30b9\u4ee5\u524d\u306b\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u305f\u30a2\u30d7\u30ea\u3082, \u305d\u306e\u307e\u307e arm64 \u306e\u30c7\u30d0\u30a4\u30b9\u3067\u5229\u7528\u3067\u304d\u308b.) \u3053\u308c\u306f Apple \u306e arm64 \u306b\u5bfe\u5fdc\u3057\u305f CPU \u304c armv7 \u306b\u3082\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u3053\u3068\u3067\u5b9f\u73fe\u3067\u304d\u3066\u3044\u307e\u3059.<\/p>\n

i386 (IA-32) \u3084 x86_64 (AMD64 \/ Intel 64) \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306f Simulator \u3067\u306e\u5b9f\u884c\u3067\u5229\u7528\u3055\u308c\u3066\u3044\u307e\u3059.<\/p>\n

Xcode \u3067\u306e\u8a2d\u5b9a<\/h2>\n

\u3069\u306e\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u5411\u3051\u306b\u30a2\u30d7\u30ea\u3092\u30d3\u30eb\u30c9\u3059\u308b\u306e\u304b\u306b\u3064\u3044\u3066\u306e\u8a2d\u5b9a\u306f Xcode \u306e Build Settings \u3067\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059. \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306b\u95a2\u4fc2\u3059\u308b\u8a2d\u5b9a\u306f Architectures (ARCHS<\/code>) \u3068 Valid Architectures (VALID_ARCHS<\/code>) \u3067\u3059.<\/p>\n

\"Xcode<\/a><\/p>\n

\u57fa\u672c\u7684\u306b\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u8a2d\u5b9a\u3067\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u304c, \u6a19\u6e96\u8a2d\u5b9a\u306b\u306f\u542b\u307e\u308c\u306a\u3044\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u5411\u3051\u306b\u30d3\u30eb\u30c9\u3057\u305f\u3044\u5834\u5408\u3084, 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u307f\u306b\u5bfe\u5fdc\u3057\u305f\u3044\u5834\u5408\u306f, \u8a2d\u5b9a\u3092\u5909\u66f4\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059.<\/p>\n

Architectures \u3068 Valid Architectures \u306b\u3064\u3044\u3066\u306f\u305d\u308c\u305e\u308c Apple \u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8aac\u660e\u3055\u308c\u3066\u3044\u307e\u3059.<\/p>\n

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.<\/p><\/blockquote>\n

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.<\/p><\/blockquote>\n

\u5b9f\u969b\u306b\u51fa\u529b\u3055\u308c\u308b\u30d0\u30a4\u30ca\u30ea\u306b\u306f Architectures \u3068 Valid Architectures \u306e\u4e21\u65b9\u3067\u6307\u5b9a\u3055\u308c\u305f\u3082\u306e\u304c\u51fa\u529b\u3055\u308c\u307e\u3059.<\/p>\n

\u51fa\u529b\u3055\u308c\u308b\u30d0\u30a4\u30ca\u30ea<\/h2>\n

\u8907\u6570\u306e\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306b\u5bfe\u5fdc\u3057\u305f\u5834\u5408, 1\u3064\u306e\u30d0\u30a4\u30ca\u30ea\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u306b\u8907\u6570\u306e\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306b\u5bfe\u5fdc\u3057\u305f\u30d0\u30a4\u30ca\u30ea\u304c\u542b\u307e\u308c\u307e\u3059. \u3053\u306e iOS \u3084 OS X \u7b49\u3067\u5229\u7528\u3055\u308c\u308b\u30d0\u30a4\u30ca\u30ea\u306e\u5f62\u5f0f\u306f Mach-O \u3068\u547c\u3070\u308c\u307e\u3059.<\/p>\n

\"Mach-O\"<\/a><\/p>\n

\u30d0\u30a4\u30ca\u30ea\u30d5\u30a1\u30a4\u30eb\u306b\u3069\u306e\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u5411\u3051\u306e\u30d0\u30a4\u30ca\u30ea\u304c\u542b\u307e\u308c\u308b\u304b\u306f file \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3063\u3066\u7c21\u5358\u306b\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059.<\/p>\n

\"file<\/a><\/p>\n

\u8907\u6570\u306e\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306b\u5bfe\u5fdc\u3059\u308b\u3068, \u305d\u306e\u5206\u3060\u3051\u30d0\u30a4\u30ca\u30ea\u30d5\u30a1\u30a4\u30eb\u306e\u30b5\u30a4\u30ba\u304c\u5897\u5927\u3057\u3066\u3057\u307e\u3044\u307e\u3059. (\u4f8b: arm64 \u306e\u307f\u306e\u30d0\u30a4\u30ca\u30ea\u306e\u30b5\u30a4\u30ba 2.4MB, armv7 \u3068 arm64 \u3092\u542b\u3080\u30d0\u30a4\u30ca\u30ea\u306e\u30b5\u30a4\u30ba 4.9MB) \u3053\u306e\u554f\u984c\u306f\u6b21\u306b\u8aac\u660e\u3059\u308b App Thinning \u3067\u89e3\u6c7a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059.<\/p>\n

\"Mach-O<\/a><\/p>\n

App Thinning \u3068\u306e\u95a2\u4fc2<\/h2>\n

App Thinning \u306f iOS\u30fbwatchOS\u30fbtvOS \u30a2\u30d7\u30ea\u306e\u914d\u4fe1\u3092\u6700\u9069\u5316\u3059\u308b\u6280\u8853\u306e\u7dcf\u79f0\u3067\u3059. \u30a2\u30d7\u30ea\u306e\u30b5\u30a4\u30ba\u3092\u5c0f\u3055\u304f\u3057\u305f\u308a, \u5404\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306b\u6700\u9069\u5316\u3055\u308c\u305f\u30a2\u30d7\u30ea\u3092\u914d\u4fe1\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a, \u30e6\u30fc\u30b6\u30fc\u4f53\u9a13\u304c\u5411\u4e0a\u3057\u307e\u3059. \u4e00\u65b9\u3067\u958b\u767a\u8005\u306f\u3053\u308c\u307e\u3067\u4ee5\u4e0a\u306b\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3084 Bitcode \u5bfe\u5fdc\u7b49\u306b\u3064\u3044\u3066\u6ce8\u610f\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059.<\/p>\n

Slicing<\/h3>\n

Slicing \u306f App Thinning \u3092\u69cb\u6210\u3059\u308b\u6280\u8853\u306e\u4e00\u3064\u3067, App Store \u304b\u3089\u30a2\u30d7\u30ea\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u969b\u306b, \u4f7f\u7528\u3059\u308b\u30c7\u30d0\u30a4\u30b9\u306b\u3042\u3063\u305f\u30d0\u30a4\u30ca\u30ea\u3084\u30ea\u30bd\u30fc\u30b9\u306e\u307f\u3092\u542b\u3080\u30d0\u30a4\u30ca\u30ea\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u6280\u8853\u3067\u3059. iOS 9 \u4ee5\u964d\u3068 tvOS \u3067\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059.<\/p>\n

\u4f8b\u3048\u3070 armv7, armv7s, arm64 \u306e3\u3064\u306e\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306b\u5bfe\u5fdc\u3057\u305f\u30a2\u30d7\u30ea\u3092\u516c\u958b\u3057\u3066\u3044\u308b\u3068\u3057\u307e\u3059. \u3053\u306e\u30a2\u30d7\u30ea\u3092 iPhone 6s \u3092\u5229\u7528\u3057\u3066\u3044\u308b\u30e6\u30fc\u30b6\u30fc\u304c\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u5834\u5408, App Store \u306f arm64 \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u307f\u3092\u542b\u3080\u30d0\u30a4\u30ca\u30ea\u3092\u914d\u4fe1\u3057\u307e\u3059.<\/p>\n

\"Slicing\"<\/a><\/p>\n

Slicing \u306e\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f Apple \u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044.<\/p>\n

Bitcode<\/h3>\n

Bitcode \u3082\u00a0App Thinning \u3092\u69cb\u6210\u3059\u308b\u6280\u8853\u306e\u4e00\u3064\u3067\u3059.\u00a0\u5f93\u6765\u306f, \u958b\u767a\u8005\u304c\u6a5f\u68b0\u8a9e\u306b\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u305f\u30d0\u30a4\u30ca\u30ea\u3092 App Store \u3067\u914d\u4fe1\u3057\u3066\u3044\u307e\u3057\u305f. Bitcode \u306b\u5bfe\u5fdc\u3057\u305f\u5834\u5408, \u958b\u767a\u8005\u306f\u6a5f\u68b0\u8a9e\u306e\u624b\u524d\u306e Bitcode \u306b\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u305f\u30d0\u30a4\u30ca\u30ea\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057, Bitcode \u304b\u3089\u6a5f\u68b0\u8a9e\u3078\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u306f Apple \u304c\u884c\u3044\u307e\u3059.<\/p>\n

\"Bitcode\"<\/a><\/p>\n

\u3053\u308c\u306b\u3088\u308a\u65b0\u3057\u3044\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u304c\u767b\u5834\u3057\u305f\u5834\u5408\u3082, Apple \u5074\u306e\u307f\u3067\u5bfe\u5fdc\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u308a, \u6700\u9069\u5316\u6280\u8853\u304c\u9032\u3093\u3060\u5834\u5408\u306f Apple \u304c\u518d\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u3053\u3068\u3067\u3088\u308a\u6700\u9069\u5316\u3057\u305f\u30d0\u30a4\u30ca\u30ea\u3092\u914d\u4fe1\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u308a\u3059\u308b\u3053\u3068\u304c\u8003\u3048\u3089\u308c\u307e\u3059.<\/p>\n

Bitcode \u306b\u3064\u3044\u3066\u306e\u8a73\u7d30\u306f Apple \u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u3084, \u5f53\u30d6\u30ed\u30b0\u306e\u00a0Carthage \u3068 Bitcode \u5bfe\u5fdc\u306b\u3064\u3044\u3066\u306e\u307e\u3068\u3081<\/a>\u00a0\u3092\u3054\u89a7\u304f\u3060\u3055\u3044.<\/p>\n

\u3069\u306e\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306b\u5bfe\u5fdc\u3059\u308b\u3079\u304d\u304b<\/h2>\n

\u57fa\u672c\u7684\u306b\u306f Xcode \u3067 Target \u3092\u4f5c\u6210\u3057\u305f\u6642\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u8a2d\u5b9a\u3092\u4f7f\u7528\u3059\u308c\u3070\u554f\u984c\u306a\u3044\u3067\u3057\u3087\u3046. Xcode 7.1.1 \u6642\u70b9\u3067\u306e\u5404 OS \u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u8a2d\u5b9a\u3092\u307e\u3068\u3081\u307e\u3059.<\/p>\n