ios development: Unable to launch /private/var/containers/Bundle/Application/ - swift

I am trying to test my app on my iPhone but it fails to launch the app and the error message "Unable to launch /private/var/containers/Bundle/Application/" keeps coming up. This happens to other apps that I have made.
I have tried all the methods proposed on the internet but none of them worked.
I haven't signed up to the apple developer. Can anyone please help me with this problem?

Please see this answer, it worked for me:
https://stackoverflow.com/a/53266043/9093967
After deleting and renewing all Apple certificates which was not
effective, I clicked on "system" tab in keychain access and changed
Apple Worldwide Developer Relations Certification Authority from
"always approved" to "default" setting.
Built again in xcode and it nows run properly.
Hope this helps!

Related

App store rejected my app due to "Cannot contact reCAPTCHA. Check your connection and try again"

App is built in flutter using Firebase authentication. When Apple review team tries to sign in by using provided testing phone number and they always stuck at reCaptcha based authentication screen. They are seeing attached screen forever.
App store rejected by giving reason:
Hello,
The issues we previously identified still need your attention.
If you have any questions, we are here to help. Reply to this message
in App Store Connect and let us know.
Guideline 2.1 - Performance - App Completeness
We discovered one or more bugs in your app.
Specifically, your app still displayed error message when we tried to
login.
Please review the details below and complete the next steps.
Review device details:
Device type: iPhone
OS version: iOS 15.5
Next Steps
Please run your app on a device to reproduce the issues, then revise
and submit your app for review. If at first you're unable to reproduce
the issue, try the following:
For new apps, uninstall all previous versions of your app from a device, then install and follow the steps to reproduce.
For app updates, install the new version as an update to the previous version, then follow the steps to reproduce.
If we misunderstood the intended behavior of your app, please reply to
this message in App Store Connect to provide information on how these
features were intended to work.
Resources
For information about testing apps and preparing them for review, see Technical Note TN2431: App Testing Guide.
To learn about troubleshooting networking issues, see About Networking.
Please see attached screenshot for details.
Issue faced by Apple Review Team
I have tried following things:
https://firebase.google.com/docs/auth/ios/phone-auth#set-up-recaptcha-verification - As per this link i have done same configuration in Xcode, Put my REVERSED_CLIENT_ID in the URL schemes,
iOS URL Scheme in xCode
Also I have done APNs authentication key at firebase side,
Firebase APNS Configuration
However, I am unable to reproduce this issue at my end. But though, I tried all the possible solution based on answers on the SO. Still issue doesn't resolved for them.
Please let me know if am I missing some configuration?
Have you tried this?
Go to your firebase Project settings => App Check => Apps
Register your apps for app attention.

Xcode says: "Identity ___ is not trusted." and won't allow me to submit my app

I've been living the nightmare of trying to submit an app to the iTunes store... The newest massive waste of time is an error message that I get when I try to validate or distribute my archive from the "organizer".
The exact message is:
My Xcode is version 4.3.2. I'm pretty sure my WWDR is installed, because this has never been an issue before. I also tried to re-install it just to be safe.
The most frustrating/confusing part is that I JUST submitted my app successfully two weeks ago and nothing was changed. My app was rejected for meta-data reasons. I fixed those issues, re-installed one of my plugins, and now this.
Any suggestions? Even a link to some helpful documentation would be great. I've found the Apple developer docs extremely confusing and UN-helpful.
EDIT1:
I think I may have gotten closer to the problem. I changed some of the build settings and now my build fails with this error:
Code Sign error: Certificate identity 'iPhone Distribution: [my name]' appears more than once in the keychain. The codesign tool requires there only be one. I want to fix this but I'm not clear on which code signing profile should be set where. There are different settings depending on whether I click the "project" icon or the "target" icon and each of those has four different choices. Do all of these require code signing? Can anyone give me an example of a working configuration?
EDIT2:
I think I maybe found the problem. There is a small note that says my Distribution profile has no provisioning portal. I've been downloading and installing new .mobileprovision files but they all say "Developer". I think just need to figure out to download a new distribution profile.
SOLUTION:
Thanks to some pointers from Saad (see below), I figured out what was wrong. I was using the auto-select option for code signing, and the only distribution profile had an invalid provisioning profile. This happened very quietly, and I'm not sure why. I only noticed it when I went back into the provisioning portal to create a new distribution profile. After installing this, everything works.
your provisioning profile is not properly set
Code Sign error: Certificate identity 'iPhone Distribution: [my
name]' appears more than once in the keychain. The codesign tool
requires there only be one.
Open Applications > Utilities > Keychain Access and search for your Distribution certificate. Sometimes the Xcode Organizer decides to generate a new certificate for you and invalidates your old one, but does not remove it from your keychain. Remove the expired/older certificate and quit/re-launch Xcode (make a backup first, in case, by dragging to Desktop or Exporting). That should at least clear up part of your problem.
As for the provisioning profile, if that still is a problem, I'd manually go into the iOS development center and download the App Store Distribution Provision Profile for your app, removing all other provisioning profiles, until you figure this out. Quitting and relaunching Xcode when dealing with certs/provisioning profiles is something I've always had to do.
project identifier and your profile identifier must match

Please help me to create .ipa of my app

I tried last 1 day. refer all the question related my problem but can't find such a solution.
I had follow all the steps create certificates, appid, adding device id , create provision, set in the project. with this provision the app work fine in my iPhone4.
please help me
Thank you in advance
In xcode 4.2 there is a totally bug for when the creating the ipa and share that time best solution find me first of all find the share bundle and then following link for the solve that problem it's rally amazing
I solve that problem while creating the project
Reference link is here :-)
You need to go to Build Settings > Code Signing and set the code signing profile automatically for each setting. Don't just use 'Automatic'.
there maybe problem with Entitlements file as well.
You can find it in XCode 4.2 -> Targets -> bottom section 'Entitlements'
There you can "Enable Entitlements". Other fields may be empty if the app doesn't need it.
Other codesign problems issued many time here. So you can find one of lots tutorials and remake codesign profile.
There is currently a lot of chatter on the forums (especially the Apple dev forums) that something has broken or been modified in the creation of certificates in the dev portal. All Apple dev portals are currently down (displaying the "back soon" post-it message) so hopefully this means that Apple are providing a fix.

app could not be verified alert

HEllo,
I am quite new to iphone development, I am following the specified steps to test app on my device.
I have two provisioning profiles outof which none are expired. These profiles aare working fine on 3.0 devices, but when I try on 2.0(iphone) devices it says application could not be verified.
I am using snow lepord and it doesnot provide simulator support below 3.0 thats why I have to test my app on devce.
Can you help me regarding this.
Thnx in advance
edit:
ok I think this one is done but now its showing "Failed to upload MyApp.app" due to which app appears in iphone but I cannot debug my code.
I have checked the tick box in entitlements.plist
Google is your friend here.
Two good articles right off the bat...

Error Installing iPhone App on Device

I set up all my certificates and keys today and am trying to run my project on my iPhone.
I'm encountering this strange error:
Your mobile device has encountered an unexpected error (0xE800003A) during the install phase: Verifying application
Poking around the Apple Developer forums, I've attempted to set new certificates and provisioning profiles as well as editing Info.plist, but no matter what I do I can't seem to run the app on my device.
The only think I can currently think of is that my project name in Xcode differs slightly from my development provisioning profile (it uses a question mark), but I've named it according to Apple's conventions: com.mycompany.myapp, so I'm unsure if that's the problem.
Any ideas?
Edit: I've hard restarted the phone, rebooted Xcode, cleaed my targets, set up a new wildcard App ID and respective provisioning profile and still nothing. Any other ideas?
It turned out that I had 2 certs in keychain that were simultaneously overwriting each other! I hope this helps people in the future.
You should create a wildcard app ID; com.mycompany.*. That may help.
I've encountered this on many occasions. What i do is clean all targets, shut down xcode, and hard reboot my phone.
This is a different error than the more common problem of getting the cert wrong...
Restore the phone (using the XCode Organizer to reload the latest OS), to be safe do not restore from backup when you sync with iTunes the first time (it'll still keep your number when you sync even if you don't use the backup). I've had to do this a very few times, the last one was when it was in the middle of deployment when I unhooked the phone from the cable (had to answer a call).
Try the reboot (of the phone) first, hooking it up with XCode off. But if that does not solve things, restore is the way.
The console tab in the XCode Organizer sometimes gives helpful hints as to what happens during the install phase. In one case my problem was my app already existing on the phone. I deleted my app and the install succeeded.
Regardless, it looks like a lot of error messages are bundled into this one cryptic message and to really diagnose what is going on, I found the Console tab very useful...
One other thing to try is reinstalling the iPhone SDK. I ran into an error like this when I first got my developer key and this was the only way around.
Just want to say to everyone, when you go to edit Targets-> be sure to set "configuration" in the top left corner to "All Configurations" or the correct config you are building for (Debug or Release). You might think you have things set correctly but it will be for the wrong configuration.
I've seen that error on a correctly provisioned device that has had success installing apps from XCode before, and I've had luck restarting the device and trying again. Maybe that will help.
Try running in Release mode instead of Debug. I have a working project with this problem. No idea what the issue was, but running it in Release mode works, but Debug mode produces the error code.
I have a support ticket open with Apple dev support for the same problem, and (FWIW) I'll post their recommendations if and when they can get my toolchain working.
Try this: (source: http://ephemera.lifewithalacrity.com/iphone_development/)
Even though this is supposedly only for Distribution builds, it helped me to be able to install my Debug version on my iPhone again, after it mysteriously broke yesterday.
"just triple check that all the code signing in your project properties are clear or default"
Note, this is the PROJECT properties as opposed to the TARGET properties. I set my Code Signing Provisioning Profile back to the default and removed the Code Signing Identity string.