Romo SDK 1.0でデフォルトだとiPhone5までしか対応してなかった問題と解決


![](http://i.gyazo.com/8238baa2520d5cdf31df303e239fc978.png)

iOS開発のド初心者ながら、romo SDKで開発しようとしてsdkのサンプルプロジェクトをビルドしようとしたらエラーになったのでメモ。

http://www.romotive.com/developers/

##環境
* OS X 10.9
* Xcode6.0
* RomoSDK1.0

##エラー内容
色々調べたけど分からんかった。

```
Ld /Users/sugawara_ryosuke/Library/Developer/Xcode/DerivedData/HelloRMCore-gppdnygudvnlhveeuuydyhglfcux/Build/Products/Debug-iphonesimulator/HelloRMCore.app/HelloRMCore normal x86_64
    cd /Users/sugawara_ryosuke/Downloads/RomoSDK_v1.0C/examples/HelloRMCore
    export IPHONEOS_DEPLOYMENT_TARGET=6.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -L/Users/sugawara_ryosuke/Library/Developer/Xcode/DerivedData/HelloRMCore-gppdnygudvnlhveeuuydyhglfcux/Build/Products/Debug-iphonesimulator -F/Users/sugawara_ryosuke/Library/Developer/Xcode/DerivedData/HelloRMCore-gppdnygudvnlhveeuuydyhglfcux/Build/Products/Debug-iphonesimulator -F../../frameworks -F../../frameworks/RMCharacter.bundle -filelist /Users/sugawara_ryosuke/Library/Developer/Xcode/DerivedData/HelloRMCore-gppdnygudvnlhveeuuydyhglfcux/Build/Intermediates/HelloRMCore.build/Debug-iphonesimulator/HelloRMCore.build/Objects-normal/x86_64/HelloRMCore.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.0 -framework UIKit -framework Foundation -framework CoreGraphics -framework ExternalAccessory -framework RMCore -framework CoreMotion -framework QuartzCore -Xlinker -dependency_info -Xlinker /Users/sugawara_ryosuke/Library/Developer/Xcode/DerivedData/HelloRMCore-gppdnygudvnlhveeuuydyhglfcux/Build/Intermediates/HelloRMCore.build/Debug-iphonesimulator/HelloRMCore.build/Objects-normal/x86_64/HelloRMCore_dependency_info.dat -o /Users/sugawara_ryosuke/Library/Developer/Xcode/DerivedData/HelloRMCore-gppdnygudvnlhveeuuydyhglfcux/Build/Products/Debug-iphonesimulator/HelloRMCore.app/HelloRMCore

ld: warning: ignoring file ../../frameworks/RMCore.framework/RMCore, missing required architecture x86_64 in file ../../frameworks/RMCore.framework/RMCore (3 slices)
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_RMCore", referenced from:
      objc-class-ref in ViewController.o
  "_OBJC_CLASS_$_RMCoreRobotRomo3", referenced from:
      objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```

![](http://i.gyazo.com/645ad28bddbe3fb593ec3e3b276abaef.png)

* 知人曰く、arm64 x86_64とかエラーが出てたのでiPhone5まで32bitOSでiPhone5sからが64bitOSな設計になってるとかなんとか... 

## build targetをiPhone5以前のものにするとエラー解消しました。

![](http://i.gyazo.com/b210a1c809957b1de787b5eb07fc6b9c.png)



## iPhone5sや6でもbuildする方法

* Build Settings -> Architectures -> ArchitecturesでOtherを選択

![](http://i.gyazo.com/deaed1bb0c89893a1807e8eb355244db.png)
![](http://i.gyazo.com/c2ba827e1b7d1211cc77395b9b3bca5b.png)

`$(ARCHS_STANDARD)`って書いてあると思うのですが、その項目を削除して`armv7`と入力しましょう。

![](http://i.gyazo.com/e904df5a841ddbe9d0c73bc1140b00b4.png)
![](http://i.gyazo.com/52a2fbaa5866e53d7ff1cb24b8c5402d.png)

Architecruersがarmv7の状態でbuildするとiPhone5s(ちなみにiOS8)でも動きました!

よっしゃ! 

##謝辞
@web_chiro さんありがとう。