UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Test on real device issue

Forums > 100 Days of SwiftUI

I am attempting to test on my iPhone 12 Pro instead of the Simulator. I connect the iPhone and the app icon appears. When I launch the app on the iPhone I get error dialogs on the iPhone and in Xcode :

The iPhone displays:

Untrusted Developer Your device management settings do not allow using apps from developer eveloper Apple "Apple Development: vcina@mac.com (JD9746M3J8)" on this iPhone. You can allow using these apps in Settings.

XCode displays:

Could not launch "HotProspects" The operation couldn't be completed. Unable to launch com.cinalewis.HotProspects because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.

…with the following details:

Details Could not launch "BucketList" Domain: IDEDebugSessionrrorDmai Code: 3 Failure Reason: The operation couldn't be completed. Unable to launch com.cinalewis.BucketList because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user. User Info: { DVTRadarComponentKey = 855031; RawnderlyingErrorMessage = "The operation couldn\2019t be completed. Unable to launch com.cinalewis.BucketList because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user."; } System Information macOS Version 11.5.1 (Build 20G80) Xcode 12.5.1 (18212) (Build 12E507) Timestamp: 2021-08-08T14:18:41-04:00

The iPhone says "You can allow using these apps in Settings." - But I can not find a setting to do that. Xcode says: " invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user."

I have a free apple developer account - Is that the issue? Do I need to "sign" the code or generate a profile?

Need help! Thanks Vincent Cina vcina@me.com

4      

You will need to sign the code to use it on a real device.

Apple documnetation - Running on a device

In the device section it states that you will need to use an Apple id in your Xcode settings - Adding Apple ID

Also in order sign your code, you will need to assign a project team to the app (as a sole developer you will be in a project team of 1) Assign project team

You may also need to allow access to your Mac keychain, so that you can upload the built app to your device. You will get a prompt if this is needed.

3      

@Greenamberred - thanks for the quick reply.

I think I have Xcode configured correctly with my Apple developer ID and I have the project Target Team set to me as a Personal Team. I have read through the documentation you referenced.

From the Xcode signing and certificates tab for the project target:

D Automatically manage signing Xcode will create and update profiles, app IDs, and certificates. Team VINCENT CINA (Personal Team) Bundle Identifier com.cinalewis.Test-3 Provisioning Profile Xcode Managed Profile i Signing Certificate Apple Development: vcina@mac.com (JD9746M3...

From XCode Preferences Accounts:

Apple ID Apple ID: vcina@mac.com Description: vcina@mac.com Team Role VINCENT CINA (Personal Team) User

The only thing I am not sure about is one sentense that says:

If you belong to the Apple Developer Program, you need to register the device before you can run the app.

but there is no instruction on how to do this.

My test app compiles and loads on to the phone OK. When I click the app on the iPhone it, the iPhone says:

Untrusted Developer Your device management settings do not allow using apps from developer "Apple Development: vcina@mac.com (JD9746M3J8)" on this iPhone. You can allow using these apps in Settings.

I can not find anwhere in iOS Settings to 'allow using these apps'.

I only have one AppleID that the iPhone uses and it is also my Apple Developer account ID.

Any help would be greatly appreciated.

3      

Hacking with Swift is sponsored by RevenueCat

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

Sponsor Hacking with Swift and reach the world's largest Swift community!

OK, from what I read in your reply you already have an Apple Developer Account.

With your device connected to the Mac, log in to your Apple Developer Account, and access the Certificates, Identifiers & Profiles. In there you can click on the Devices tab (on the left hand side) and add a new device. Follow the instructions. Some of the details you will need to obtain from the device itself.

Back in Xcode, with the device still connected, and once the device has been confirmed to be registered on your account, you can rebuild your app and download to the device again.

For the app, in the Signing & Capabilities tab, click the info icon next to Provisioning Profile Xcode Managed Profile. You should see a provisioning profile with an expiration date, and all the items should be ticked, indicating that there are no issues.

You can also check the provisioning profiles on the device, in Xcode, by going to Window>Device & Simulators, then choosing Devices in the top left. Right-click / Control-click on the device and select Show Provisioning Profiles…. You should see a provisioning profile for you app, with an expiration date.

As this explanation is linked to Xcode and devices, and Xcode and devices will change in the future, the reference for this information is Xcode 12.5 & Xcode 12.5.1 and iOS 14.5.

3      

@Greenamberred, thanks again for the quick response.

In the Xcode Signing & Capabilities tab for the project Target - the 'info' (i) shows:

iOS Team Provisioning Profile: com.cinale... Created Aug 10, 2021 (Expires in 2 days)

App ID: com.cinalewis.Test-3 Matches bundle ID "com.cinalewis.Test-3"

Certificates: 2 Included Includes newest signing certificate "Apple Development: vcina@mac.com (JD9746M3J8)"

Team: VINCENT CINA Matches team "VINCENT CINA (Personal Team)"

Capabilities: 3 Included Includes Game Center, In-App Purchase, and Keychain Sharing.

Entitlements: 4 Included Includes application-identifier, keychain-access-groups, get-task-allow, and com.apple.developer.team-identifier.

Devices: 1 Included Includes "IPhone 12 Pro"

… all with check marks.

XCode Device & Simulators shows my iPhone 12 Pro device and Show Provisioning Profiles…. shows my app:

name Expires iOS Team Provisioning Profile: com.cinalewis.Test-3 Aug 17, 2021

The only thing that looks wrong is…

I log into my debeloper account at [https.deverloper.apple.com] and click Certificates, Identifiers & Profiles and I get:

Access Unavailable

This resource is only for developers enrolled in a developer program or members of an organization’s team in a developer program.

I have a Free developer account - is that the issue? Do I need a paid account to test on a real device?

Thanks again for the great information.

3      

I see that the capabilities in your app include Game Center

For Game Center you will need to access the App Store Connect in your account. This may be the paid developer subscription. What happens when you click on the App Store Connect in your free developer account, as it is right now.

Enabling Game Center.

3      

For several capabilities you need a paid developer subscription (ADP). There is an overview: https://help.apple.com/developer-account/#/dev21218dfd6

3      

Game Center???

I'm just learning iOS development and have never requested Game Center capabilities (or in-app purchases) for any app. I have never had a paid apple developer account.

To make things as simple as possible the app I am now trying to test on a real devicec (iPhone 12 Pro) is the SwiftUI basic proffile - "Hello World!".

Thanks for the pointer tho the XCode "Signing & Capabilities" tab and I see it says:

"Capabilities: 3 Included: Includes Game Center, In-App Purchase, and Keychain Sharing."

I have never asked for these capabilities. XCode automatically added my Apple ID as an account. Many years ago I used some game that connected me to Game Center as a user but I have never tried to use gameKit for any development.

Assuming that this "Game Center" capability is the reason I can not test on a real device with my free account…

Is there a way to clear out my "capabilities" on this free account? I see I am listed only as a "User" (not the "Account-Holder" or "Admin"). I cant find any way to edit those capabilities.

Thanks again for your continued efforts to help.

3      

In your Signing and Capabilities tab you do not have Game Center listed - is that correct?

If it is showing, then deleting the capability can be done just by clicking on the x (right hand side) on the Game Center entry.

You can also confirm that it doesn't exist by selecting the Info.plist file in your project, then under the Required device capabilities check that GameKit is not listed.

I have been re-reading the earlier comments, and if it is not the above, I would suggest logging in to developer account, and using the Contact Us to see if Apple can help you.

3      

@Greenamberred, Thanks for your continued efforts.

You can also confirm that it doesn't exist by selecting the Info.plist file in your project, then under the Required device capabilities check that GameKit is not listed.

Info.plist - "Required device capabilities" has only one item (Item 0) a String that says "arm7", so no GameKit listed.

In your Signing and Capabilities tab you do not have Game Center listed - is that correct?

If it is showing, then deleting the capability can be done just by clicking on the x (right hand side) on the Game Center entry.

I assume by "Signing and Capabilities tab" you refer to Xcode's Project settings for the target. The only thing I am able to do on that page is press the info ⓘ button on "Provisioning Profile Xcode Managed Profile ⓘ" that gives me a 'read-only' panel that includes:

Capabilities: 3 Included Includes Game Center. In-App Purchase, and Keychain Sharing.

with a ✓. There is no way to edit or delete anything.

I have been re-reading the earlier comments, and if it is not the above, I would suggest logging in to developer account, and using the Contact Us to see if Apple can help you.

That is my next step. If I get a resolution I will post here.

Again, thanks for your efforts.

3      

I have the same problem, ever since maybe beta 3. I've installed apps multiple times on my iphone. Apparently there should be an option to trust the developer entitlements in Settings - General - VPN & Device Management, but the only thing that's there is the beta configuration profile.

I've went back to Xcode 12, reinstalled multiple times, set up a new macOS, used just Xcode 12, I cannot create a new "Hello World" and run it immediately on iphone. Again, I have been able to do this for many years, it isn't the first time I've run an app on device. All apps I've made before can still run no problem. I can amend them but new apps won't run. The apps are listed in xcode -> Devices and simulators, they're on springboard but can't run.

3      

Same problem ... I have just installed Xcode 13.0 on my Mac (MacOS 11.6), using an iPhone running iOS 15, and I can not run a basic app on my iPhone. Few days ago, I could do it on Xcode 12.4 / iOS 14.7 ... I can't find how to trust my app in the iPhone settings. Before, there was a setting to allow apps. I have also an expired developer account. But you don't need a paid account to test an app on your device. At least, you could do it before.

4      

I have same issue with my iphone6s ios15 since install first beta. And also latest beta 15.1 has same issue. i tried all things but could not able to get cetificate into settings. Also i get error into live device rendering. In simulator preview its working fine but in device preview it is thowing error.

MessageSendFailure: Message send failure for relaunch

==================================

RemoteHumanReadableError: The operation couldn’t be completed. Transaction failed. Process failed to launch. (process launch failed)
BSTransactionError (1):
==error-description: Process failed to launch.
==error-reason: process launch failed
==NSLocalizedFailureReason: Transaction failed. Process failed to launch. (process launch failed)
==transaction: <FBApplicationProcessLaunchTransaction: 0x28005d500>

3      

After reading some posts related to this problem, I have created a new Apple Id and use it as my new developer account. This way, I could create and run apps on my iPhone and iPad. In Settings / VPN and device management, I could trust myself as a developer and get (as before) the list of apps of the developer (myself). That does not explain why my other account does not work ...

3      

I've just received an email from Apple stating 'we've discovered that development provisioning profiles issued to a subset of developer accounts won't function properly on the most recent releases of iOS'. Asking to delete provisioning profiles made after June.

Just tried it, now works fine, so must have been something wrong on Apple's side.

3      

Hacking with Swift is sponsored by RevenueCat

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.