-2

I'm building a unity game ready to be uploaded to Appstore. Xcode gives me this error.

image

I do not have an iPhone. So the question is: do I need an iPhone to build in Xcode and upload to Appstore? Is there other way around this?

EDIT: So I ended up registering an iPhone in my account. For anyone else wondering: you really do need an iPhone to build an app even if you are not going to play it. Having a developer license it not enough.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Evgen
  • 21
  • 1
  • 6
  • Choose generic device on the device list situated in the top left – Midhun MP Dec 19 '18 at 09:15
  • It says "build failed" – Evgen Dec 19 '18 at 09:20
  • There is a drop down near the play button, please tell me what is the value currently displayed in there. – Midhun MP Dec 19 '18 at 09:23
  • There is two variants: 1) No device. No devices connected to 'My Mac'. 2) Generic iOS Device. Second is selected. – Evgen Dec 19 '18 at 09:27
  • I believe you do require at least one device registered to your account in order to archive your app. You really should test on a real device, especially a unity game, as the simulator is not the same as a device. – Paulw11 Dec 19 '18 at 10:19
  • So i ended up registering an iphone in my account. You really do need an iphone to build an app. – Evgen Dec 20 '18 at 11:46

1 Answers1

1

You can select Generic iOS Device from the drop down at the top of menu beside the app target.

enter image description here

Select it and Archive from the product menu to Validate and upload your app. you don't require iPhone to upload your app in App store.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Pankaj K.
  • 535
  • 8
  • 18
  • Thank you for answering, but it still gives the same error. You really do need an iphone to build an app even if you are not gonna play it on iphone. – Evgen Dec 20 '18 at 11:45
  • do you have app certificates and all ? – Pankaj K. Dec 20 '18 at 11:48
  • can you show the device list you select and i suggest if Automatic sign in is not working in your case then you can create certificates manually. you can also check this similar question. https://stackoverflow.com/questions/45204842/xcode-8-asks-for-a-device-to-be-registered-to-create-provisioning-profile, this one can also help you. https://stackoverflow.com/questions/18724654/could-i-submit-app-to-appstore-without-ios-device/44157307#44157307 – Pankaj K. Dec 20 '18 at 11:56