facebook twitter hatena line email

「Ios/swift/実機確認」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(実機検証)
(xcodeのビルドディレクトリ)
 
(同じ利用者による、間の9版が非表示)
行12: 行12:
 
==The run destination is not valid for Running the scheme ==
 
==The run destination is not valid for Running the scheme ==
 
xcodeのgeneralから端末をregisterするボタンを押す
 
xcodeのgeneralから端末をregisterするボタンを押す
 +
 +
#開発端末のxcodeの中身を確認する
 +
$ cd ~/Library/Developer/Xcode/iOS\ DeviceSupport/
 +
$ ls
 +
10.0.2 (14A456) 10.3.1 (14E304)
 +
もしくは
 +
$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
 +
$ ls
 +
10.0 10.1 10.2
 +
#https://github.com/iGhibli/iOS-DeviceSupport/tree/master/DeviceSupport から
 +
#端末のosに相当するverをDLして上記どちか存在するDIRにいれてビルド、もしくはxcode再起動すれば良い。
 +
#ios12の場合12.0 (16A5288q)をいれればビルドできた。(12.0 (16A366)だとできなかった)
 +
 +
参考:https://qiita.com/_CHUBURA/items/ffd280e50ed623989045
 +
 +
==xcodeのビルドディレクトリ==
 +
不要であればざっくり削除する
 +
$ du -sh ~/Library/Developer/Xcode/DerivedData/
 +
14G DerivedData
 +
$ rm -fr ~/Library/Developer/Xcode/DerivedData/*
 +
 +
参考:https://qiita.com/star__hoshi/items/0ce9cd1c3793e6a951fc
 +
 +
==iphonexsへのビルド==
 +
iphonexs doesn’t support any of app’s architectures.
 +
You can add iphonexs’s arm64e architecture to app’s Architectures build setting.
 +
 +
xcode10である必要がある(macosのsierraはhigh sierraにしないとだめ)
 +
 +
参考:https://github.com/apache/cordova-ios/issues/423
 +
 +
==usb未接続端末でテスト==
 +
iosのdeveloperサイトに端末のUDIDを登録し再度証明書を使ってipaを作成する

2019年2月27日 (水) 10:59時点における最新版

実機検証

  1. 実機をUSBで接続
  2. xcodeの上部にあるiPhone6などと書かれている部分を自分のDeviceに選択しなおす。
  3. ▶︎を押してビルド実行

以下メッセージが出た場合

Verify the Developer App certificate for your account is 
  1. 実機について以下確認
  2. 設定/一般/プロファイルとデバイス管理/デベロッパAPP/信頼するに変更

The run destination is not valid for Running the scheme

xcodeのgeneralから端末をregisterするボタンを押す

  1. 開発端末のxcodeの中身を確認する
$ cd ~/Library/Developer/Xcode/iOS\ DeviceSupport/
$ ls 
10.0.2 (14A456)	10.3.1 (14E304)

もしくは

$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
$ ls 
10.0		10.1		10.2
  1. https://github.com/iGhibli/iOS-DeviceSupport/tree/master/DeviceSupport から
  2. 端末のosに相当するverをDLして上記どちか存在するDIRにいれてビルド、もしくはxcode再起動すれば良い。
  3. ios12の場合12.0 (16A5288q)をいれればビルドできた。(12.0 (16A366)だとできなかった)

参考:https://qiita.com/_CHUBURA/items/ffd280e50ed623989045

xcodeのビルドディレクトリ

不要であればざっくり削除する

$ du -sh ~/Library/Developer/Xcode/DerivedData/
14G DerivedData
$ rm -fr ~/Library/Developer/Xcode/DerivedData/*

参考:https://qiita.com/star__hoshi/items/0ce9cd1c3793e6a951fc

iphonexsへのビルド

iphonexs doesn’t support any of app’s architectures.
You can add iphonexs’s arm64e architecture to app’s Architectures build setting.

xcode10である必要がある(macosのsierraはhigh sierraにしないとだめ)

参考:https://github.com/apache/cordova-ios/issues/423

usb未接続端末でテスト

iosのdeveloperサイトに端末のUDIDを登録し再度証明書を使ってipaを作成する