Error when uploading new iPad app version: "iPad: application executable contains unsupported architecture(s): i386" - objective-c

I'm trying to update my iPad app on the App Store. I filled out the "new version" form on iTunes Connect and then tried to upload the new version with Application Loader. It rejected the .zip file giving me three errors.
I had changed the "Bundle Version" line in the Info.plist file to 1.1, and added "Bundle versions string, short" (also 1.1). Then I build the .app file, and zipped it up with the .mobileprovision file.
The zip file: Chordpad.zip
Contains: ChordPad.app, ChordPad_Distribution.mobileprovision
These are the errors Application Loader is giving me:
1. iPad: application executable contains unsupported architecture(s): i386
2. Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate.
3. Unable to extract codesigning entitlements from your application. Please make sure ChordPad.app is a valid Mach executable that's properly codesigned.
As far as I know, all my certificates are valid. Could anyone please help me fix this?

If the i386 architecture is being used, you are probably building for the simulator. Switch to device to get the arm architectures.

Related

OSX app crashing: code signature invalid

I have an OSX app that I distribute outside the AppStore. Therefor I sign it with the according certificate (Developer ID Application Certificate).
The app itself is written in Freepascal (Lazarus) and has a dependency lib, written in C++, which I also sign. I also change the path of the lib to be relative to the app by using install_name_tool and prefixing the path with #loader_path. Works like a charm for me locally.
The app (as reported to me) works OK on OSX 10.11.6, but crashes on OSX 10.10.5, saying:
Library not loaded: #loader_path/libMyAPP.dylib
Referenced from: /Users/USER/Downloads/MyAPP.app/Contents/MacOS/MyAPP
Reason: no suitable image found. Did find:
/Users/Steve/Downloads/MyAPP.app/Contents/MacOS/libMyAPP.dylib: code signature invalid for '/Users/Steve/Downloads/MyAPP.app/Contents/MacOS/libMyAPP.dylib'
/Users/Steve/Downloads/MyAPP.app/Contents/MacOS/libMyAPP.dylib: code signature invalid for '/Users/Steve/Downloads/MyAPP.app/Contents/MacOS/libMyAPP.dylib'
Any pointers what might be going on? Is this really a code signing issue or something else? Thanks.
I have the same error with XCode 11/iPhone7 device and google firebase.
dyld: Library not loaded: #rpath/GTMSessionFetcher.framework/GTMSessionFetcher
Referenced from:
...
Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher: code signature invalid for
...
GTMSessionFetcher: stat() failed with errno=1
Solution
try to remove pod and remove use_framework!
pod deintegrate
then remove use_framework!
# use_frameworks!
then install again
pod install

Cannot add a new app to fabric

I am unable to add a new iOS app to fabric by following the instructions of the Fabric macOS plug in.
I have followed all of the instructions found at Crashlytics documentation
When running the app, I receive this error:
2018-03-12 14:22:24.090838-0400 [19139:8550117] [Crashlytics] Version 3.10.1 (129)
2018-03-12 14:22:24.636050-0400 [19139:8550293] [Fabric] unable to complete application configure: Error Domain=FABNetworkError Code=-5 "(null)" UserInfo={status_code=422, type=2, request_id=fbc432572e6f0e10f21d2ddc24c7f272, content_type=text/html; charset=utf-8}
I have tried searching StackOverflow and following answers, but no luck avoiding this error message.
Any ideas on this error message?
I had this problem and discovered that my 'visible' (in Xcode) info.plist was not a file in my root directory, and was an out of date version from earlier development activity. I am not sure why my correct/current info.plist did not display in Xcode. I found the current info.plist in Finder (it was in the root directory in Finder, just not appearing in Xcode). I dragged the file from Finder to Xcode and accepted all the defaults in the dialog that appeared. Then I simply built and ran the current scheme and all worked as it should.
Note: It appears that for some time I have been updating the 'invisible' info.plist directly from my apps Target / Info tab.
Make sure to include all dependency then throw a force crash or runtime error and do not forget to turn on your data or internet connection.

Can't upload app to iTunes connect Xcode 9

I had checked my provision profile and certificate. It was no problem to upload app in Xcode 7, but after update to Xcode 9, I receive error in Xcode
Apps must contain a provisioning profile in a file named embedded.mobileprovision
From application uploader I have error, too. Spent a lot of time to fix this problem, but has no idea for this time.
The IPA structure for any IPA is as follows. Make sure to rename the IPA to .zip and extract, then you will have to Ctrl+Click and say show package contents to see the inside App.
Structure :
Payload
MyApp.app
-- _CodeSignature
-- Plugins (optional if you have extension like Siri, widget)
-- Watch (optional if you have extensions for watch)
-- archived-content....xccent
**-- embedded-provisionign.profile**
-- Info.plist
Now check this profile if its double clicked and installed properly in your Xcode and found, if not the profile cert and p12, and profile file have issued from the generation time. Solve this and try to compile new IPA.
It should solve your purpose. Note If you are using a developer account, go to its dev portal member centre and see if the profile and AppId are valid as per one in the code. You can check the extracted above Plist for the CFBundleIdentifier value and check if its relevant dev account portal profile is Active and not Invalid due to any cause for that APP ID associated with the profile.

Xcode 7 Code Signing Resource Rules Path issue

I have the latest Xcode 7 and iOS 9 SDK installed on my El Caption. I just get an issue about the Code Signing Resource Rules Path:
If I specify the CODE_SIGN_RESOURCE_RULES_PATH=$(SDKROOT)/ResourceRules.plist then I can not upload the IPA to iTunesConnect because:
ERROR ITMS-90339: "This bundle is invalid. The Info.plist contains an invalid key 'CFBundleResourceSpecification' in bundle
However, if I removed this CODE_SIGN_RESOURCE_RULES_PATH the xcrun PackageApplication will fail as:
/var/folders/9v/_4lr188x5h5019b4bsq2_fyr0000gn/T/ir4fp619hu/Payload/MyApp.app/ResourceRules.plist: cannot read resources
Any walk around?
The issue is that xcrun uses the resource path internally in its script.
The work around to is go and directly edit the script ourselves. I had the same issue and the solution i posted here worked for me. Thought it'd help you as well.

Unity3D build error CommandInvokationFailure

When I try to build my project I get the following error
Error building Player: CommandInvokationFailure: Failed to recompile android resource files. See the Console for details.
C:\Program Files (x86)\Java\jdk1.7.0_55\bin\javac.exe -bootclasspath "C:/Users/Ryan/Documents/android sdk only/android-sdk-windows/platforms/android-20\android.jar" -d "C:\Users\Ryan\Documents\Game - Android\Temp\StagingArea\bin\classes" -source 1.6 -target 1.6 -encoding UTF-8 "-S\R.java" "com\RyanVitter\Game\R.java"
stderr[
-S\R.java:8: error: <identifier> expected
package -S;
Does anybody know why this error is being thrown?
My team had an error similar to this, while trying to integrate the facebook SDK.
It worked fine on the computer which was used to import the SDK, but once things were added to git and commited, all other computers could not build to android, and the above error was shown in the console.
This was because unity seems also change some files outside of the project folder once the SDK is imported( We imported it through the asset store).
The solution then was to also import the facebook SDK to all other PCs via the asset store, and then do a "git reset --hard", which seemed to set up the unity editor correctly.
After these steps the project could build again.