dyld: Library not loaded... Reason: no suitable image found - swift

Recently I've been sent sources of the app I need to build and deploy to TestFlight. Unfortunatly whenever I try to run the app on my test device in debug mode or the one installed from TestFlight, it fails to start throwing the following error message:
dyld: Library not loaded: #rpath/Alamofire.framework/Alamofire
Referenced from: /var/containers/Bundle/Application/77FB1F81-25F5-4670-ACF1-F814543B9A0E/MyApp.app/MyApp
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/77FB1F81-25F5-4670-ACF1-F814543B9A0E/MyApp.app/Frameworks/Alamofire.framework/Alamofire: code signing blocked mmap() of '/private/var/containers/Bundle/Application/77FB1F81-25F5-4670-ACF1-F814543B9A0E/MyApp.app/Frameworks/Alamofire.framework/Alamofire'
/private/var/containers/Bundle/Application/77FB1F81-25F5-4670-ACF1-F814543B9A0E/MyApp.app/Frameworks/Alamofire.framework/Alamofire: code signing blocked mmap() of '/private/var/containers/Bundle/Application/77FB1F81-25F5-4670-ACF1-F814543B9A0E/MyApp.app/Frameworks/Alamofire.framework/Alamofire'
/private/var/containers/Bundle/Application/77FB1F81-25F5-4670-ACF1-F814543B9A0E/MyApp.app/Frameworks/Alamofire.framework/Alamofire: code signing blocked mmap() of '/private/var/containers/Bundle/Application/77FB1F81-25F5-4670-ACF1-F814543B9A0E/MyApp.app/Frameworks/Alamofire.framework/Alamofire'
The app uses COCOAPODS as a dependency manager. In the Podfile there's TRON pod which depends on Alamofire framework we have problem with.
The app built, signed and validated successfully during submission and debug builds. So it doesn't seem to be related to certificates or provision profiles. But I've anyway recreated certificates and provision profiles. (although I believe this is not the case as the app is submitted to app store successfully). Developer of the app builds and runs the app with no problem. We checked the versions of used tools and libraries and they seem to be indentical. (xcode version, cocoapods version, pods dependencies).
I even tried to build the sources with all dependencies installed (pod install), that he builds.
There're similar questions on SO, but they don't seem to deal with COCOAPODS when they face this problem. The solution is usually involves manually Embedding frameworks. But this is not the approriate solution for us, as all demendencies integrated through COCOAPOD scripts.
What else can cause the problem?

This is an issue with iOS 13.3.1. All dynamic frameworks being compiled to the newest release of iOS 13.3.1 are experiencing this issue when running on a personal provisioning profile/developer account.
You can:
Use a non-Personal Team provisioning profile (paid developer account).
Run on the 13.3.1 simulator.
Test on a real iOS device running 13.3 or lower.
This issue will be fixed in 13.4 Beta version though.

The problem was not related to specific app. Building any app even the most simple one produced the same error.
Solved by reinstalling Apple Worldwide Developer Relations Certification Authority, even though it wasn't expired.
Steps:
Open Keychain Access
Remove the certificate from Login and System Keychains
Download certificate from https://developer.apple.com/certificationauthority/AppleWWDRCA.cer and install it to both keychains. (double click it)
JIC: Remove provision profiles, clean project, restart xcode/Mac :-)

in my case, the problem was related to Apple Worldwide Developer Relations Certification Authority and i solve it by change trust from always to use system defaults.
open keychain access
right click on Apple Worldwide Developer Relations Certification Authority and select Get Info
Expand trust
change when using this certificate to use system defaults

Remove or comment # use_frameworks from pod file and clean build folder. Its worked on my end.

Related

AdHoc build install fails via both testflight & iTunes

I am getting this error - http://help.testflightapp.com/customer/portal/articles/829652
I tried this (but did not fix the problem) - http://help.testflightapp.com/customer/portal/articles/867631
I tried installing the adhoc build via iTunes (still no luck) - http://www.youtube.com/watch?v=OF7bstiw_9o
I am using the AdHoc provisioning profile(with my phone listed in it) and distribution certificate. I also went ahead and deleted/created a new adhoc distribution profile, just to see if that fixes the problem.
Also if it counts, I am building for iOS 7.0. I can see the adhoc provisioning profile installed on my iphone via the iPhone Configuration Utility.
Anyone know where I could be going wrong?
One of the potential causes listed in the link you posted is 'Architecture settings of the build and the device are incompatible ( can sometimes happen when "Build Active Architecture Only" is on when building).'
One possible reason for this is that you had the device connected to the computer when you did the build. The build may have been optimised for the architecture of the attached device and the device you are trying to install to may have a different architecture

iphone developer: no identity found

My development machine suddenly decided to stop installing to my device this morning, with the codesign process giving the error "no identify found".
I checked my keychain and my developer certificate is there, valid until 2012.
The only links I've found in google talk about developing on a jailbroken phone, which I don't have.
Does anyone know how to fix this issue?
In the build settings for the "target" try reselecting the code signing identity. This often happens when working with more than one developer or if you recently added devices to the provisioning profile.
If any of your Provisioning Profiles expired, update them. If this is not the case, go to your project settings, there you should be able to find the codesign and a bunch of other useful stuff. Change it to the correct one, not the "iphonedeveloper" - the one that has your name in it!

Problem with ad-hoc distribution in iPhone

I am having a problem with ad-hoc distribution in iPhone. I have developed an application in sdk 3.2. I have developer's license (which was expired Today). but my provisoning profile is valid. I made a build before my developer's licesee expired.
But when I try to install the app on my iPhone, i got an error
"Could not install application on device. Error: A signed resource has been added, modified, or deleted."
Please Help me ...
Did you check this thread? http://www.iphonedevsdk.com/forum/iphone-sdk-development/21988-xcode-issue-signed-resource-has-been-added-modified-deleted.html.
It has many solutions that could be yours.

Apple's Problematic Provisioning Portal

I have restarted this process about 4 times over the past 3 weeks. I have not succeeded in submitting my app to the store. Please help me! I just started over again tonight, I did it in this order:
Deleted everything referring to the IPhone in my Keychain,
Redownloaded the Distribution Certificate
Created a new app id called: com.myapp
Downloaded the Provision Profile and installed it into XCode.
Please note: I did not install an Entitlements.plist because I was told I didn't need one. Everything is looking good at this point.
Duplicated my "Release" Configuration and renamed "Distribution"
Under the Configuration of "Distribution", Code Signing Identity, I can see my Provision Profile it actually says: IPhone Distribution: My Name (for Application Identifiers: com.myapp)
So at this point at the bottom of the Project Info Window I see this:
The name (“common name”) of a valid code-signing certificate in a keychain within your keychain path. A missing or invalid certificate will cause a build error. [CODE_SIGN_IDENTITY]
So I realize I haven't altered my bundle name for my app, I change it to com.myapp, warning still doesn't go away. I tried adding in my prefix into the Bundle Identifier like this:
5JSF8843kJJ.com.myapp (for example)
But the error still doesn't go away!
After all this I try to Build and Run on my device anyway thinking it may go away. But I get this error:
The iPod “myIpod” doesn’t have the provisioning profile with which the application was signed.
Click “Install and Run” to install the provisioning profile “myprofile” on “myIpod” and continue running “myappname.app”.
Please Help! I need to get this to work!
Thank you for your time.
UPDATE: I have fully tested the app and I am ready to distribute, I am trying to get a successful Build so that I can zip up my .app file and submit it using Application Loader.
You can't run an app using the Distribution certificate or Distribution Build.
You shouldn't duplicate your Release Build until after you get it running and configured exactly as needed, except for the choice of code signing certificate.

MonoTouch deploy to iPhone

I have developed a number of apps using MonoTouch, and been using the emulator for the iPhone, now I need to deploy me application to my iPhone for further testing.
I have purchased the iPhone SDK from Apple, but I can't find how to deploy and activate the MonoTouch application to my iPhone.
Any pointers please?
As has been already stated you obviously need the paid version of MonoTouch and the iPhone SDK. Once you have those sorted you need to create a developer certificate in the iPhone developer portal, download it to your dev machine and add it into your keychain.
Once you have done that you must create a provisioning profile for your physical device, which again you do through the developer portal. Once you have the provisioning profile, download that to your machine, and add it to the iPhone via the Organiser app in XCode.
Then fire up MonoDevelop, and if it's all gone to plan then you should have the option of deploying the build to your iPhone. You can check that MonoDevelop has correctly detected your certs by opening up the Project Options window and under the Build section and under iPhone Bundle Signing, you should see your developer cert and provisioning profile.
Full details of the steps required on the Apple iPhone Dev Site
Here are the MonoTouch docs on building for distribution
http://monotouch.net/Documentation/Building_for_Distribution
It is my understanding that you have to have the Monotouch deployment license from Novell to deploy to a device.
According to your statement:
When I compile I get: "No Valid iPhone code signing keys found in
keychain.
This is actually a Xcode question more then a Monotouch one;
The message indicates that your keychain does not provide the signing keys used to generate the certificates and provisioning profiles.
If you follow apple's steps on generating certificate(request), followed by profiles they will also state you might want to export your private key (p13 file) and keep it somewhere safe.
If you move to another laptop for instance, you will need to import that key again to make the machine a valid one.
If something went wrong (ie: you accidentally removed your private key, ..) this message will be shown since there is no way for Xcode to verify that the profiles are being used on a valid machine.
Go to this instruction page (apple account credentials needed) to check if the steps have been followed and check in the Keychain access app on your mac if under My Certificates you see a developer certificate and - if you unfold it - you can see the private key as a child node.