Unable to Validate on actual device. Plugins?

Ive been struggling with getting an app deployed to a device.
It runs in simulator, and I can build.
But when I put it onto an actual iPad, it is greyed out and wont start ‘unable to validate’

I created a new project, totally empty, same Bundle ID
That works fine. (Doesnt do anything, but it installs and it starts)

I copied all my code and resources from ‘bad’ project to this one.
That builds, but gives me the unable to validate message.

Removed a lot of screens and classes, and it installs.

Something in my code, or the resources, or the MBS plugins, is causing this issue.

Should I see plugins listed inside the .APP bundle, in the way I do for desktop apps?
(because I don’t)

What else could cause this issue?

Go look through the iOS capabilities list and see if there’s anything in that list that you might be using. If so, list them and describe what you are doing. This may simply be an undeclared entitlement issue.

I only have ‘file sharing’ and ‘photos’ ticked.

Not sure if I should have camera ticked too ( does that piggy back on Photos?)

What would require Associated Domains or Custom URL Schemes?
(eg trying to display my own website in a browser?)

Definitely not trying for any of the other items.

Associated domains is used for sharing credentials with your website. For instance in the XDC app, we use it so the login form will offer to enter your credentials from Xojo.com

Custom url schemes is used to launch your app when a specific protocol on a url is used, like how feedback:// launches Feedback on your computer.

Camera is only needed if you have a picture picker which specifies that it gets pics from the camera (or you have declares that might use it)

Another thing you might try is connecting your device to your computer with a cable, launching the Console app, selecting the device name and then type your app name into the filter. If there are any specific errors, they should appear there.

Things to try.
Thanks for the suggestions.

Right now, it looks like I need to painfully comment out all code and then undo that - method by method - until it stops working.

I don’t understand why the mere presence of code/something is enough to do this, even when the app isn’t running.

Please try the console thing first. I’d bet that it’ll point us in the right direction

I do think the people who create these logs just open a thesaurus and chuck things into into a big ‘word salad’

I can see code signing mentioned.
‘A signed resource has been added, modified, or deleted’

Doesnt make sense that this would be a problem when code is present compared to when it is not. (Plugins?)

Jan 10 17:35:48 Testing-iPad SpringBoard(MobileInstallation)[58] : com.ursasoftware.mobistitch:10:6:3:1:Requesting to prioritize placeholder.
Jan 10 17:35:48 Testing-iPad SpringBoard(InstallCoordination)[58] : +[IXAppInstallCoordinator removabilityForAppWithBundleID:completion:]_block_invoke: Returning locally read removability, PossibleAndAllowed, for com.ursasoftware.mobistitch.
Jan 10 17:35:48 Testing-iPad installcoordinationd[180] : -[IXSClientConnection _remote_prioritizeCoordinatorForAppWithBundleID:completion:]: Prioritizing coordinator for com.ursasoftware.mobistitch as requested by SpringBoard (pid 58)
Jan 10 17:35:48 Testing-iPad installcoordinationd[180] : -[IXSClientConnection _remote_prioritizeCoordinatorForAppWithBundleID:completion:]: Failed to fetch LSApplicationRecord for application with identifier com.ursasoftware.mobistitch: Error Domain=NSOSStatusErrorDomain Code=-10814 “(null)” UserInfo={_LSLine=1483, _LSFunction=runEvaluator}
Jan 10 17:35:48 Testing-iPad installd(MobileSystemServices)[303] : 0x16b977000 -[MIClientConnection getAppMetadataForApp:completion:]: Get app metadata requested by client installcoordinationd (pid 180 (501/501)) for app com.ursasoftware.mobistitch
Jan 10 17:35:48 Testing-iPad installcoordinationd[180] : -[IXSClientConnection _remote_prioritizeCoordinatorForAppWithBundleID:completion:]: No coordinator found for com.ursasoftware.mobistitch and app is not vendable by App Store or is a hard error (14) so showing alert.
Jan 10 17:35:48 Testing-iPad installcoordinationd[180] : -[IXSErrorPresenter presentErrorForBundleIDs:code:underlyingError:errorSource:]: Asked to present alert for error 14 source MobileInstallation underlying error Error Domain=MIInstallerErrorDomain Code=13 “Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.NNCiBQ/extracted/mobistitch.app : 0xe8008017 (A signed resource has been added, modified, or deleted.)” UserInfo={NSLocalizedDescription=Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.NNCiBQ/extracted/mobistitch.app : 0xe8008017 (A signed resource has been added, modified, or deleted.), LegacyErrorString=ApplicationVerificationFailed, FunctionName=+[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:], SourceFileLine=77, LibMISErrorNumber=-402620393} for bundle IDs ( “com.ursasoftware.mobistitch”
Jan 10 17:35:48 Testing-iPad SpringBoard(SpringBoard)[58] : Received request to activate alertItem: <SBUserNotificationAlert: 0x11fdbaef0; title: Unable To Install \M-b\M^@\M^\mobistitch\M-b\M^@\M^]; source: installcoordinationd; pid: 180>
Jan 10 17:35:48 Testing-iPad SpringBoard(SpringBoard)[58] : Activation - Presenting <SBUserNotificationAlert: 0x11fdbaef0; title: Unable To Install \M-b\M^@\M^\mobistitch\M-b\M^@\M^]; source: installcoordinationd; pid: 180> with presenter: <SBUnlockedAlertItemPresenter: 0x2800114e0>

Do you have a build step located after the signing process?

1 Like

I dont have any build steps.
(or ‘signing process’, to be honest…)

No signing process ?! :thinking:
Screenshot 2021-01-10 at 22.18.40

1 Like

And if you don’t, we’ve got to figure out how you’re getting into that state. Do you (for instance) have a project item in your project that you created named “Sign” or “iOS”

That option exists. I wasnt sure what was being asked, because I didnt put it there and cannot amend it in any way
There is nothing after it.
The only item called ‘Sign’ is this one.

My team is selected in the iOS part.

Other apps load using the same settings
This app loads if I comment out or remove parts of the code - I just haven’t worked out which parts yet.

Still trying.

Today I created a new empty project and gave it the same bundle ID
Threw a button and a text field onto a screen, built it.
Loaded straight onto device with no trouble.

So the issue must be one of
code (even before it has been opened!)

I cannot understand how any of them CAN make a difference.
‘The app cannot be installed because its integrity cannot be verified’

Well… it could be a signing issue though. Like other platforms, all of the enclosed resources must be signed with your certificate (which the IDE does) and must not be modified after they are signed.

Over which I have no control.
Seems it works on an empty project.
Maybe one or more of the embedded images, or the plugins dont get signed properly.

and must not be modified after they are signed.

I have no build steps that could do that.
My program code doesnt attempt to write to resources, but the ‘full’ compiled app never gets to the stage where it could run.

(first thing it would do if it WAS running, is to copy some files to the sandboxed documents area, if that’s relevant. I cant tell if that code is being run/attempted, because the app isnt ‘installed’ for me to look on the device)

I guess I just have to keep chipping away at things until I find out what the bad apple is.

You might try using System.DebugLog at the top of your App.Opening event to see if you are getting that far. That will show up in the log when you connect the device to Xcode.

Other than that I’d have to see your project.

It may come to that.

I’ll give system.debuglog a try too.
Does stuff from that show up in the console logs?

Problem found:

If the iPad layout has a screen that uses a MobileCanvas, it wont load to my device.
Change the super to IOSCanvas (and comment out the event code), and it does work.
(well, at least installs… there is no working code there now)

MobileCanvas appears to be the problem.

it would be helpful to see that in a sample project.