How do I run an app on a device without an Apple developer account - ios

I've found several sites with information on how this can be done, but none that seems to apply to Xcode 10.1 or iOS 12.1. The ones I've tried don't seem to work.
I've tried this:
Create an empty swift project 'single view app'
Set the Signing Team to my Personal Team (Apple ID)
Set the active scheme to my connected (USB) iPhone 7 plus
Press the Play button
What I get is a 'Failed with exit code 1' and a horrendous log message.
My device turns up with a red frame in the active scheme dropdown list. What does that mean?
I'm running a MacBook Air with High Sierra.
Any help is appreciated.

You need to only have a free account then add it to
Xcode->Preferences->Accounts
after that select it in automatic signing process , then you'll get a trust message upon first run to fix go to
Settings->General->Device Managament -> Your profile name -> Trust
then re run

You just need to have apple developer account, which is free. If you don't have that create a using this link:- https://developer.apple.com
Go to Xcode -> Preferences -> Accounts, login with your developer account, and download profiles.
Select your project, Go to general tab, select automatically manage signing and Team as your personal team.
Run your project, After successful build. you will get an error in Xcode stating your app is not from trustworthy source.
Now in your device, Go to Settings, search for "Device Managament", select Your profile name and Trust.
Run your app again.

Related

In Xcode, how can I register a device to test on it, without having a paid Apple Developer account?

I am trying to test an app in a real device, using XCode 9.
In Xcode > General > "Automatically manage signing" I get this error: Failed to create provisioning profile. There are no devices registered in your account on the developer website. Plug in and select a device to have Xcode register it.
I have tried physically plugging in an iPod, an iPad and an iPhone. They all show up in iTunes, and also in XCode under Windows > "Devices and Simulators", but XCode simply doesn't register anything.
I also tried to go to the website to register the devices manually, but it seems I cannot even access this website without having a paid Apple developer account?
I do NOT have a paid Apple developer account, but I do have the Apple ID. I know that I can test in a real device without an account because in this page https://developer.apple.com/support/compare-memberships/ under Benefits and Resources the Sign in with Apple ID column has Test on Device checked.
Please, how can I solve this?
At the top of the Xcode window, from left to right, after the Run and the Stop buttons, there is another button which displays the tooltip "Set the active scheme" when you hover the mouse over it.
This button lets you choose a simulator. But once your device is plugged in it also let you select that device. Once you select your device, the problem disappears.
Note to those using Xcode to run code developed for Google's Flutter: You probably must also select Product > Run in Xcode, before you are able to go the device to trust the certificate, under the device's General > Device Management.
What I normally do when I test on a device is by selecting general device before I archive the build, and then after you follow the prompts after the build, choose install on a device.
If you are really set on just being able to run directly without archiving, make sure that you are signed in with your apple id (the only reason you would need to pay would be if you are submitting to the app store, so you don't have to worry about that) under accounts (XCode -> Preferences -> Accounts), and then replug your device.
And if that doesn't work, try following the instructions on this site: https://help.apple.com/developer-account/#/ under Registera Single Device.

Unable to set Signing certificate in XCode. Executable contains an invalid signature

I want to run my cordova iOS Application on my iOS Device for testing.
Following are my build settings:
Clicking Enable Development Signing sets the Team to None.
My build is successful. On installing, XCode shows the following error:
Does it require a developer account to run the Cordova iOS build on a device for testing? The Cordova Android version is already on Play Store.
How to set a Signing Certificate without a developer account? How to fix the invalid signature error. I haven't set any signature yet.
I am completely new to iOS.
Yes, you must have a developer account to get a signing certificate. The signing certificate pairs with your provisioning profile, which also requires a developer account to create. You need both to run on a physical device. Your device must also be registered with your account and included in your provisioning profile device list to be allowed to run the app, outside of the App Store environment.
Xcode handles much of this for you automatically, if you have a developer account set up under Xcode Preferences > Accounts > Apple IDs. On the right-hand side of that screen you have a list of "Teams" along with buttons that say "Download Manual Profiles" and "Manage Certificates..." Is anything listed in there?
Your screenshot shows a Team with your name, which should mean that you have a developer account already?
You also have a button in your screenshot that says "Enable Development Signing." Have you tried running that? Does it not take care of things automatically for you? "Automatically manage signing" enabled should be helping you get through these issues with simple clicks of those buttons.
Otherwise, you will need to go to the Developer portal and register a signing certificate manually. That's a process that many have written blogs and manuals about already. I don't think it is necessary to re-write what has been said by many others already. Here's a YouTube video that does a nice job of explaining things: https://youtu.be/OwXIJchrDdA

Xcode 8 asks for a device to be registered to create provisioning profile

I am trying to publish an app for testing, without having to connect a device in my mac.
I have created a developer account, created an app in itunes, generated bundle id, signed into xcode with the developer account, generated a distributor certificate.
When I tried to archive the app, I got the error "conflict provisioning setting. app is automatically signed for development ..."
I read in this post and followed the tip of unchecking and rechecking the option "Automatically manage signing". After re-choosing my team, I get the error "There are no devices registered in your account on the developer website. Plug in and select a device to have Xcode register it".
The goal all along was that I wouldn't need an ios device, because I intended to immediately publish the application and invite people to test it via testflight. Is it not possible to do it like this? Am I missing something.
I have read lots of documentation, but being a first timer in this, everything seems confusing.
Edit: I created a provisioning profile as distributor. Even after creating and installing the distributor profile (it now appears also in xcode at Account -> provisioning profiles), I still get that same error. I also noticed that in signing, The signing certificate is iOS Developer. I am sure
I fixed it by plugging in my iPhone and going to the Product menu > Destination > iPhone (my device).
Then after clicking Try Again on this properties page the warnings went away.
Source
The solution (though I would welcome more elaborate, insightful explanations):
#General -> Signing, disable the option "Automatically manage signing"
#General -> Signing and certificates choose your team
Though in my case that was not the issue, I would recommend making sure that in the device list, you choose Generic iOS device in your target devices.
This really sucked to figure out.
What you do is add a distribution profile in https://developer.apple.com/account/resources/profiles/add. Don't choose development! Don't let the Xcode Automatically manage signing!!
Then, you download the provision.
Then, in the Signing & Capabilities -> Signing Section of the project.xcodeproj file, turn off Automatcially manage signing, choose import and import the file you just downloaded.
Then, in the top, you choose Any iOS Device (arm64, armv7) and then you go Product -> Archive.
What happened to me was that I was about to run my app on a physical device for the first time and I didn't have a Team. So I created it in the process before connecting my phone with the USB cable. After I created the team a message like the listed above appeared. I did some research on internet but nothing found.
So here's what I did: I connected my phone, did all the trusted process, then restarted Xcode, and it worked. I am not sure what happened, but it was some of my first experiences using Xcode. It could sounds silly but it helped me. Hope to you too.
If you do not wish to register a device follow this advice:
https://stackoverflow.com/a/44157307/499581
* In short use "Generic" as the device while archiving.
If you do wish to register a device then the solution to:
"There are no devices registered in your account on the developer
website. Plug in and select a device to have Xcode register it".
Is to physically plug-in your device (an actual iPhone, or iPad) so that Xcode can register it for development use (note: this will not affect the normal everyday use of the device). After the device is registered it can then be used for development testing, load provisioning profiles onto it, etc.
↳ Disabling and Enabling Devices Using Your Developer Account
For those who are trying to develop without a mac computer using MacInCloud don't follow the standard advice out there. Its will lead you down a hole. I have wasted hours of my time.
The reason it say something about "a device to be registered to create provisioning profile" is that you need to provision an iOS device that you can test on before you can get it signed. If you are using MacInCloud you probably can't physically connect an iPhone or iPad to the MacInCloud and therefore it can't automatically provision devices for you.
Before you get to far into this you will need to get your iPhone/iPad UDID. Which I was able to do with https://get.udid.io/ on my iPhone, but it didn't work on my iPad. Instead, with the iPad I had to download iTunes from the Windows store and connect my iPad. Then click on the little gray square in the menu that's inline with Library tab.
image of itunes
Then when it pops up with your device info (mine didn't come up with my info at first, I had to sync my device). You will see your SN. Click on your SN and it will change to your UDID. Once you have your UDID you are ready to create a provisioning profile. What is confusing is this isn't done in the appstoreconnect section of your account online. Its done in your developer account: https://developer.apple.com/account
developer.apple.com account screen shot
When you go there you will want to click: Certificates, Ids & Profiles
Here you will need to add your devices and then with auto signing checked in Xcode that made the problem go away. NOTE: I originally tried to create a profile, download it, and import into Xcode under the Provisioning Profile dropdown in Signing & Capabilities. As described in another answer here, but that proved more problematic and wasn't necessary.
Then you can chose Any iOS Device from emulator device drop down then go to Product > Archive > Distribute App and create a certificate to place it on the app store (TestFlight).
you can also plug an iphone, run the app the app on your iphone as the target, it will ask you to register the device and then the certificates will be generated
Have you paid the $99/year developer fee? TestFlight is only available for paid developers. I would highly recommend plugging in an iOS device, though. It's more fun and rewarding testing that way.

Xcode add app to iPhone for testing

I have an app build with Meteor like this meteor build <path> --server <address:port>. What is the next step to add it to my iPhone for testing?
When I open the myApp.xproject file it saying in Identity section no matching provisioning profiles found I did try 'Fix issue' btn, which guided me to make an account etc. But this did not fix it. Is it possible because I haven't paid yet for for my account? I just would like to see how it would work on my iPhone for now.
Yes, you need a developer account to run on an actual device. Pay for the account and you will get development profiles and distribution profiles so you can run on your phone and submit to The App Store. Good luck!
There's a weird way that used to work. It's like a debugging mode but the most recommended way is to do it getting the developer account as Douglas said.
These are the steps:
Go to Xcode > Preferences and where says Accounts add your apple id. It will ask you for a team name, type your name for example.
Now go back to Xcode and click on the blue file at the top of the navigator with your project name. Then General.
The system will ask you about fixing an issue, do it and after a while it will finish.
Then choose a version available on your device and your iPhone in the device selection.
It worked with some of my classmates, I can't verify it 100% because I have the developer account. Hope it helps.

Xcode 7.1 "iTunes store operation failed you are not authorized to use this service"

Trying to submit iOS and Apple Watch OS2 extension update from ios 9.0 to 9.1. I recently updated Xcode to version 7.1 and now I'm hitting this problem without changing anything else.
iTunes store operation failed you are not authorized to use this service
What I've tried:
Removed developer account from Xcode -> added developer account back into Xcode -> Still hit the error.
I tried Xcode -> Preferences -> Apple ID -> Download All to get my latest provisioning profiles up to date. Still get the error.
Deleted all old archives, cleaned project, archive again. Still get the error.
Increased build number and version number in both the project and in itunes connect. Still get the error.
Deleted derived data in the Library -> Developer folder and I still get the error.
Cleaned the project -> Archived the project again -> Unchecked "enable bitcode" and I still receive the error.
Code Signing Settings:
Watch Target -> Provisioning profile automatic code signing iOS Developer
Watch Target Extension -> Provisioning profile automatic code signing iOS Developer
iOS Target -> Provisioning profile automatic code signing iOS Developer
Still hit the error message with the provisioning profile settings.
Reinstalled Xcode 7.1 -> Still hit the error message.
I've also confirmed that all my developer and distribution provisioning profiles are valid and downloaded.
Observations:
One thing I've noticed is that when I archive the app and look in the Window -> Organizer I notice my iOS apps on the left side for my archives. This app I'm trying to submit has no name next to it. However, if I delete all old archives for this app the app name shows up again next to the app icon. Maybe a bug with Xcode but I have no clue.
Another thing I've noticed is I've been able to successfully submit iOS archives that have no WatchKit extension using Xcode 7.1. I'm not sure if the WatchKit extension could be the problem but it is a possibility.
Also when the archive is ready to be uploaded to iTunes Connect I notice a couple of things. First, the iOS App defaults to the active provisioning profile: "MyApp" Distribution profile. However, both the WatchKit app and app extensions automatically default to the XC* wildcard provisioning profile. I'm not sure if this whole problem could just be related to a provisioning profile error but it is possible.
iOS Target -> Build Phases -> Embed Watch Content is set as:
$(CONTENTS_FOLDER_PATH)/Watch
Application Loader Submission Attempt:
Tried and failed with the following error message:
ERROR ITMS-90171 "Invalid Bundle Structure - The Binary file 'MyApp.app/Watch/MyAppWatch.app/_WatchKitStub/WK' is not permitted. Your app can't contain stand alone executables or libraries other then the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide..."
Again, I used this exact same project structure to submit the ios app and watchkit OS2 extension on Xcode 7.0 ios 9.0.x no problem. I think the error message is inaccurate unless I'm misconfiguring something but I imagine I would've hit the error back on Xcode 7.0
Any help on how to solve this would be awesome. I've found no help googling and reading other SO posts and I've been stuck on this for far too long. Thanks!
I met the same issue today and I think it is a bug of Xcode 7.1
Finally I managed to submit my app via Application Loader. There were warnings but it did work.
Here are the basic steps:
Archive
Export
Xcode menu --> Xcode --> Open Developer Tool --> Application Loader
Double click "Deliver Your App" and choose the file exported in step #2
click next and follow the instructions until the end
I found the solution by unchecking the Include bitcode option.
In mi case, it seems that updating to Xcode 7.1 removed some account information. So, after a few attempts to upload it from Xcode, I opened Application Loader, and it asked me to login. I logged in and finally could submit to the App Store from the Organizer. Hope it helps someone.
it is the enable bitcode on the bottom when you submit the upload. uncheck the box. for some reason it comes with 2 boxes checked by default on xcode 7.1
Set team in target-> General-> Team
Check and set appropriate provisioning profile in targets/project build settings.
Try with Xcode to upload build if find same issue.
Or
Try with application loader it will work.
In my case I think it should be a xcode 7.1 bug. I re-added my account, re-generated profile, rebuild the app (restart my mac) but none of them work! I got this error when I first validated the app.
Then I created a new profile and the validation passed. But the first time uploading the app xcode still showed that error. Unwilling to give up I clicked the upload button again and this time it succeeded!
I faced the same issue then I uploaded through Application Loader from XCODE menu and it showed so many error like missing icon for iPad etc .
So please try you app to load through Application Loader and see complete detail of errors you might have in your application.
I got it working through Application Loader after fixing these issues.
I am using Xcode 7.1.1. and it appears to be an issue with Xcode, because I successfully submitted the build via Application Loader. Now, I suspect that I added too many SDKs / adapters inside the code that may have caused issues with the app's delivery. But there's no way of knowing that for sure.
During upload my API Analysis to the App Store was skipped, because it was too large, but I doubt that may caused Xcode to upload the app to the App Store.
If Xcode fails to upload, try Application Loader.
Solved for Xcode 7.2 by revoking and recreating the cert:
Image of what to click here (sorry no embed reputation)
In XCode go into this menu:
XCode -> Preferences -> Accounts
When on the accounts tab, I selected my email in the Apple Id list (on the left).
Then on the right there is a list of of teams under Team Name, select the correct Team and click on View Details.
Finally, there's a list of Signing Identities, next to "iOS Distribution" click Reset.
I didn't have to restart XCode, I just immediately resubmitted to iTunes from Organizer with no problems.
Edit: Thanks #Dover8 for the info about possible effects.
https://developer.apple.com/library/mac/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html
Resetting Certificates Using Xcode
If Xcode detects an issue with a signing identity, it displays an
appropriate action in Accounts preferences. If Xcode displays a Create
button, the signing identity doesn’t exist in Member Center or on your
Mac. If Xcode displays a Reset button, the signing identity is not
usable on your Mac—for example, it is missing the private key. If you
click the Reset button, Xcode revokes and re-creates the corresponding
certificate.
Try to check your iOS Provisioning Profiles on
https://developer.apple.com/account/ios/profile/profileList.action
In my case one of profiles was marked as "Invalid" and after profile regeneration an error no longer appears
I got the same problem.
Tried to Upload To App Store.. 3-4 times.
Then I Hit the Validate... button and validation was success.
After that tried to upload again and it succeeded.
Then i cursed apple...
It seems to be related to the latest iTunesConnect update and "roles".
If I look at the "iTunesConnect Users" screen, we have three accounts,
(1) is "Admin, Legal", (2) is "Technical, Marketer", and (3) is "Technical Only".
Now when you click the email address to check the details and "roles" of #2 then only "Marketer" is checked, and only the marketer permissions are available.
For #3 the correct checkmark ( Technical ) is set, and also "Create Apps and Submit versions" is shown as an available "App feature".
It might be a work-around to change permissions to disable and re-enable "technical", or maybe give more permissions and make the person an Admin (temporary, of course).
Also - for the Jenkins users out there, you might have copied some certificates from the "login" keychain to the "system" keychain. Try removing them from the system-keychain ( I think that was this step which made my "Archive" not end up in 'not authorized ...' message and actually pass the verify again).

Resources