Can't upload app to iTunes connect Xcode 9 - app-store-connect

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.

Related

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.

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.

no valid 'aps-environment' entitlement string found for application

I am trying to configure my app to support push notification, but keep getting this error:
Failed to get token, error: Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0x1f818fc0 {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}
I did enable my app to support push notifications (only for development at this point).
I did create the provisioning profile AFTER enabling the push notifications.
My bundle identifier is the same as appears in the profile.
In my profile file there is a string: aps-environment
I made sure that in both project and target under the "Code signing identity" section ALL the values are selected to be my provisioning profile.
Any more ideas? Thanks.
In my case, the stuff in my provisioning profile:
security cms -D -i ~/Downloads/spolskyDevelop.mobileprovision
...
<key>application-identifier</key>
<string>P5GM95Q9VV.com.dca.spolsky</string>
<key>aps-environment</key>
<string>development</string>
Was different than the stuff in the app that was actually built (you can find out where it is built by looking at Xcode's Logs tab)
codesign -d --entitlements - '/Users/drew/Library/Developer/Xcode/DerivedData/spolsky-bdbtdfjeeywhqzccpmmceqvnhgtm/Build/Products/Debug-iphoneos/spolsky-ios.app'
<dict>
<key>application-identifier</key>
<string>Y2X6Z7Z2GR.com.dca.spolsky-ios</string>
<key>get-task-allow</key>
<true/>
<key>keychain-access-groups</key>
<array>
<string>Y2X6Z7Z2GR.com.dca.spolsky-ios</string>
</array>
</dict>
This was true even though the "Currently Matches" hint text under Code Signing Identity was indicating the correct provisioning profile--weird, huh? To make a weird story weirder, the correct provisioning profile was being installed on the device when I ran, (Settings->General->Profiles) leading me to believe the provisioning profile was right--but it was falling back to a wildcard ID when the app was actually launched.
The clue was the difference in the output of these two commands:
Y2X6Z7Z2GR.com.dca.spolsky-ios vs P5GM95Q9VV.com.dca.spolsky
When I made the bolded part match, the italicized part changed to match automatically. In addition, the output of security and codesign were in agreement, and no more aps-entitlement error.
My guess here is that XCode was using a wildcard-style match on my non-wildcard ID. ("spolsky" is, after all, quite nearly "spolsky-ios"), and this explains the "Currently Matches" output. But something in the build chain is more strict about this, so it falls back to an actual wildcard ID during the build.
The problem is due to current Provisioning Profile does not contain APNS information, as the Provisioning Profile is created BEFORE creating the APNS certificate.
Therefore, to solve the problem, create a new Provisioning Profile & select the Provisioning Profile in Xcode will clear the error.
I had this same problem after push notifications were already working on my device. Seemed like Xcode cached something incorrectly so refreshing it fixed my problem:
Xcode -> Preferences -> Accounts
View Details for your Developer Account
Just click Refresh for the Provision Profiles a few times. I was seeing these change with each refresh. Keep refreshing until they stop changing.
i got this error and did not create a new provisioning profile; created a new one and then had to restart xCode but works now!
Be aware that the bundle identifier must match the provisioning profile in a case-sensitive manner. I had something like com.FirstLast.appname when it should have been com.firstlast.appname. Well, that kept me busy for quite a while.
I fixed this problem by enabling push notification capability.
Select Project > Target > Capabilities > Turn On Push notifications
If this problem happened suddenly after upgrading to Xcode 8 you might find a warning in the capabilities screen that'll allow you to fix this automatically:
Select Project > Target > Capabilities > Turn On Push notifications
Product->Clean did it for me. Hopefully it does it for someone else.
I ran into this in what's possibly a non-frequent use case. I'm working with Xcode 6 and iOS 8. I was creating a series of entirely new app projects, and attempting to re-use the same bundle ID, so as not to need to go through all of the portal-side setup again. This too was just for sandbox testing.
I would find that, while the setup and registration would work fine for the first app, if I deleted that app from the device, set the same bundle ID for the second app, and then attempted to register PNs with that app, I would get this error.
My solution was to:
Remove the associated provisioning profile from the device.
Remove the associated provisioning profile from Xcode.
Close Xcode
Double-click my downloaded .mobileprovision file to install it back into Xcode
Open the project and deploy it.
This approach seems to jar loose whatever previous state was there, and I'm able to register for PNs with the new app / same bundle ID.
For those who got this error in ios 10, you can try following steps:
1.clean your project.
2.and check Targets -> Capabilities -> Push Notification.If it is off,On it.
And problem will solve.The above steps help me to get rid off this problem. Hope it will helpful to someone.
New provisioning profile worked for me. Make sure to use a Developer profile if you are in development (don't use Ad Hoc). It was fine after that, no idea why the old one stopped working right.

Submitting app to Apple store "Unable to find info.plist"

When i try to submit my app to the Apple store i get this error!
"Unable to find info.plist"
But the nameapp_info.plist is in the project!!!
I already send this application to the app store in the past without this error!
I upgraded to xcode 4 and to get my project work fine with the new IDE I had to re-edit my scheme app in automatic.
What I missing??? thanks
It looks like it's expecting a file called "info.plist", whereas your plist file is actually named something different... click on your project file in the Project Navigator, then click your target. Under the Packaging section is a setting for "Info.plist File." Make sure that it is set to the filename that your plist file is actually set to.

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

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.