Can`t debug iphone apps with on xcode - ios

I can`t debug apps on my test device.
Error says,
A valid provisioning profile for this executable was not found.
I created the distribution provisioning file for App store.
Then on xcode, changed the build configuration to Release.
But above error shows.
When I debug with Debug mode, it works.
Could someone help me with this problem?

The type provisioning profile that you need to 'directly' run on your device is called 'Ad hoc'.
Not sure it still is the only way today but before you had to put the .ipa in your itunes and synchronise to install the application.
Nowadays, I find it is easier in the long run just to upload the 'appstore' builds to itunes connect build and enable testflight instead of the 'ad hoc' way

Related

flutter ios build fail - do i need to enroll apple developer?

I am starter of flutter.
I finished building my first app and I want to export ipa app to give my friends.
I don't want to release to apple app store, I just want to use myself(and my friends).
So, once I input flutter build ios (also i tried flutter build ios --debug ) ,
Running "flutter pub get" in mighty_v2... 4.0s
Building com.example.mightyV2 for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: 66H5V644W9
Running pod install... 2,370ms
Running Xcode build...
Xcode build done. 5.3s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
error: No profiles for 'com.example.mightyV2' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.example.mightyV2'. Automatic
signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'Runner' from project
'Runner')
above error was founded.
I already know what is wrong. My problem is, do not enrolled apple developer, and do not enrolled my app profiles init.
So question is, do I have to enroll and give 100$? I just use this app myself although the app is debug mode. I just want light ipa file. What can I do?
It can be two things. First you need to create a iOS App Development provisioning profile,to create that click on Xcode at top of the screen beside apple logo then > preferences > accounts here you will find you apple id and below that you will see download manual profiles and manage certificate options. Create a profile here and clean the build folder then build again.
Second, if you have the provisioning profile and still won't be able to create the .ipa file from Product > Archive then you definitely need a developer account.
You do not need to have a developer account if you are not publishing. However, you will have to open your app in Xcode and go to the Signing & Capabilities tab under Runner to set a Team in order to build. This can be any Apple ID.
Using this method, you will not be able to just send the .ipa to your friends and them easily install it. You will need to push to their phones via Xcode.
I encourage you to checkout Firebase App Distribution as a much easier, free alternative to distribute your app to your friends if you do not want to publish yet.

"A valid provisioning profile for this executable was not found" for Xamarin.Forms iOS RELEASE build to an iPhone Device

So my certificates recently expired, and I had to create new ones. I created both an Apple Development and an Apple Distribution certificate from Visual Studio and they both show up as valid and/or in keychain in Apple Developer, Visual Studio, and Xcode.
I of course updated the app's development and distribution profiles to use these new certificates and made sure to re-download them to my workstation.
The iOS component of the (Xamarin.Forms) app can deploy the Debug build to both a simulator and a real device. It can also deploy the Release build on simulators. Archiving a build for publishing also worked fine. It uploaded on TestFlight and was successfully installed by a tester.
The issue is only with deploying a Release build to my test device. The Release build has been deployed successfully to this same device before, so I am very unclear as to what has happened.
The bundle signing identity and provisioning profile were set to automatic as recommended. To make sure the bundle was using the correct profile, I set them instead to the expected/correct distribution identity and profile, and the deployment still fails.
The app did use to have an iOS Distribution certificate, but that seems to have been replaced by Apple Distribution as far as I can tell. I see that iOS * certificates can still be created on Apple Developer, but they're not listed as options when creating certificates from Xcode or Visual Studio for Mac. I did try pointing the provisioning profile to an iOS Distribution certificate created online, and it still did not work.
I've also restarted Visual Studio, Xcode, the iPhone device, and my Mac workstation to no avail.
Is there something else I could be missing? I am new to app development and am very unclear as to what else "invalid provisioning profile" could mean.
Any additional help/tips/ideas would be appreciated!
Error message when deploying:
ApplicationVerificationFailed: Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.FSRtzC/extracted/{XAMARIN_IOS_PROJECT_NAME}.app : 0xe8008015 (A valid provisioning profile for this executable was not found.)
error MT1006: Could not install the application '{PATH TO XAMARIN_IOS_PROJECT}/bin/iPhone/Release/{XAMARIN_IOS_PROJECT_NAME}.app' on the device '{IPHONE DEVICE NAME} iPhone': AMDeviceSecureInstallApplicationBundle returned: 0xe8008015.
Application could not be uploaded to the device.
Provisioning Profile Info:
Status: Active
Type: App Store
Enabled Capabilities:
Associated Domains, Game Center, In-App Purchase, Push Notifications
Software Versions:
Visual Studio Community 2019 for Mac
Version 8.6.5 (build 23)
Apple Developer Tools
Xcode 11.5 (16139)
Build 11E608c
Xamarin.Mac
Version: 6.18.2.1 (Visual Studio Community)
Xamarin.iOS
Version: 13.18.2.1 (Visual Studio Community)
iPhone 7 Plus running iOS 13.5.1
I simply had to use a Distribution Profile of type Ad Hoc. The Distribution Profile the app was using was of type App Store as it was what was needed to create a build archive for Test Flight.
I do wish the error message had been more informative and less generic. Multiple types of issues seem to result in the same error message.
Useful References:
This provides useful info about using the Device Log and debugging Entitlements that helped me start getting somewhere. My custom Entitlements and enabled Capabilities for the Bundle Identifier matched, so I couldn't figure out what else to try initially. The Device Log gave me no info, but taking out the Entitlements file worked, and it went from there.
This reassured me that my one custom entitlement that's different between Debug and Release mode, APS Environment, is using the correct value of "production" even though it was causing the installation to fail with the (then App Store) Distribution Profile.
This provides detailed explanation on each Provisioning Profile Type.

debug version of react-native IOS app builds successfully. Release version fails.

I've been able to successfully build the Debug version of this IOS app. However, I'd like to create an IPA to make sure it works on various iphones. The first thing I did was go product->scheme->edit scheme. I then switched from Debug to Release. After cleaning, and attempting to build the release version of the app. I immediately get an error: "MYapp has conflicting provisioning settings. MYapp is automatically signed, but provisioning profile MYApp Distribution has been manually specified. Set the provisioning profile value to "automatic" in the build settings editor, or switch to manual signing in the project editor(in target MYapp).
The first thing I tried was switching Code Signing Style to manual in build settings. This resulted in a new error:
error: Provisioning profile "MYApp Distribution" doesn't include signing certificate "iPhone Developer: Name here (XXXXXXXX)". (in target 'MYApp')
I went back to the General tab in Targets and clicked on "automatically manage signing". I tried to rebuild and got the same error the first time I tried to build.
I'm not sure where the conflict is coming from. This post indicated that simply clicking the automatic signing would do the trick.
I'm quite new to using Xcode and understanding provisioning profiles.
You simply can not build a release edition. The process of giving a release version is quite different. It goes from Xcode(local) to App Store(testFlight for testing) and then into App Store(Official Release).
I found this link and can relate to this situation.
Your provisioning profile isn't valid. It doesn't have a valid distribution certificate. You have to go to apple developer and it to certificates and profiles. Create it there and install it via keychain on your macbook. Othervise you can't build an ipa. More info here

Resigned IPA is not verified correctly by codesign

I have an IPA file exported for development and I want to sign the IPA file using a valid enterprise certificate. Actually, I have gone through all the steps mentioned here amd here and used various available tools such as ota-tools and iResign to sign the file.
The app is actually a very small swift app and only uses app groups and key-chain sharing capabilities and is developed by members of my enterprise team using the App ID and team identifier that we have defined using Xcode in our enterprise account.
I have done the resigning process without any problem and the app is installed successfully on my iPhone. But it immediately crashes upon startup.
So, I doubted the resigning process and did some checks. I tried to check the resigned IPA file using 'codesign -v' command but it says "code object is not signed at all".
I also unzipped the IPA file did all the code-signing on the main app and Frameworks folder but still head no luck with codesign verification. it still says "code object is not signed at all".
I would appreciate if someone can help me with this problem.
I'm having the same problem where the app won't start after resigning and installing. Did you have any success resolving this problem?
About the codesign verification, if you've successfully installed the app on the phone that means that the resign is OK. Also you should run the 'codesign -v' command on the .app itself in the ipa file, because that's the file you're actually signing, the ipa is just a zip you create after the resigning.
I had the same problem (resigned app crashed on launch). I figured out that this happens only for IPAs with embedded bitcode.
Removing bitcode support from project settings (ENABLE_BITCODE = NO) fixes the problem.
I understand that this is limitation, for this reason I opened an issue on fastlane sigh (the main tool I use for resigning) on Github.

Approve at the IStore but could debug on device

I have successfully upload the app using the AppLoader and the app status is "waiting for review"
but when I am trying to debug with that certificate and provisioning profile I am getting this error. (from the flash builder)
Error occurred while installing the application:
Installation Error: ApplicationVerificationFailed.
when I try to install it using IFunbox I am getting this error
Installation failed
Error# e8008015. Sorry for the inconvenience. Please send us feedback
Also could not install in using the itunes.
IOS 7.0 the device is not jailbreak
You can't install an app built with an App Store distribution profile from any source other than the App Store without a jailbreak. If you want to test it, test it with an Ad Hoc provisioning profile and build type in the Export Release Build menu. The build is entirely identical, the only difference being what certs it is signed with.

Resources