Xcode error when running on connected device: "he executable was signed with invalid entitlements" - react-native

Issue Description
I'm working on an app based on ReactNative 0.40, I am using Fastlane for beta deployments and I'm using Match to manage my signing profiles. Most things work as expected, however:
Issue:
When I try to run my app on a physical device directly from Xcode 8, it gives me this error:
This is what I've tried:
[x] Follow Apple's Entitlements Troubleshooting Guide
[x] made sure that the entitlements selected in XCode's "Capabilities" screen match the ones selected in the app id on the developer panel.
[x] Re-ran match. i.e. fastlane match development fastlane match adhoc fastlane match appstore
[x] Ran fastlane match decrypt and then security cms -D -i /path/to/***.mobileprovision. Although I'm not entirely sure what I'm looking for that is missing/extra/invalid.
Questions:
What should these settings be for both the project and the target?
Which signing identity should be used for running the app on a device from xcode during development?
What else can I try to troubleshoot this?

... and, finally fixed this. Just in case some other poor soul out there is spinning their wheels, here's what was broken in my case.
The App ID on the dev portal has 3 options for data protection:
However, Xcode doesn't:
The setting has to match anyway, so I hadn't noticed that the entitlements file was set to NSFileProtectionComplete as opposed to NSFileProtectionCompleteUntilFirstUserAuthentication
Making that change, along with switching to Automatic Signing (which in hindsight might have had no effect), fixed the issue. I may switch back to match-managed development profiles and see what happens.

I got this error due to trying to build with a wrong Scheme.
I used Release config by mistake instead of debug config
So double check whether correct Scheme / Build config is selected

Related

Fabric issue App not showing after following instruction

I have carefully followed the instruction from fabric (https://fabric.io/kits/ios/crashlytics/manual-install) to install crashlytics in my app. However I cannot select my app after the instruction since my app is not showing. I have tried most of the solution that has been given in this question here (Crashlytics in iOS won't proceed past "Build Your Project" in Fabric app)
But I still failed to get my app in fabric.
I am using react native to develop my app and using Xcode Version 10.2.1
Fabric/Firebaser here - If you've gone through all the necessary instructions, try cleaning your project first before building and running again to try to get your app up on your dashboard. And if you haven't seen it, here are some instructions specifically for setting up react native apps with Crashlytics: https://www.npmjs.com/package/react-native-fabric#crashlytics-usage). And make sure that if you haven't, set the Debug Information Format to DWARF with dSYM file for both debug and release as specified in that SO post you linked.
You can also see more debug information about Fabric if you set Fabric to debug mode in your initialization statement: https://docs.fabric.io/apple/fabric/advanced-settings/debugging.html. Check to see if the settings requests are being made to Fabric or if there is anything unusual.
If you're still having trouble, reach out to support(at)fabric(dot)io with your app's bundle ID and support will be able to help you out more.

Invalid Bundle Structure for WatchKit

I'm trying to submit a WatchKit app to the App Store but get this error.
Another cause for this is including a WatchKit or any other TargetApplication.app inside your application bundle.
Do not include any in your project settings > target > Build Phases > Copy Bundle Resources.
A bug in Xcode (6.2..) added it there when I tried to add it to Target > General > Embedded Binaries. Nothing changed in that section and no errors were shown so I ignored the bad feeling it gave me.
After hours dealing with other certificate issues (and hosing all of our TestFlight testers, due to revoking distribution certs, which was apparently/probably required), upgrading to Xcode 6.3.1 I finally remembered this bad feeling and found the app watchkit application lurking in the Copy Bundle Resources section and removed it.
In addition to the Invalid Bundle Structure error above the specific errors exhibited for me were:
ERROR ITMS-90378: "CFBundleIdentifier Collision. There is more than one bundle with the CFBundleIdentifier value 'com.company.App.watchkitapp' under the iOS application 'App.app'
ERROR ITMS-90451: "CFBundleIdentifier Collision. The Info.plist CFBundleIdentifier value 'com.company.App.watckitapp' of 'App.app/App Watchkit App.app' is in conflict with the Info.plist CFBundleIdentifier value of 'App.app/Plugins/App Watchkit Extension.appex/App WatchKit App.app'
All were gone and submission worked fine after removing.
Also, validation passed fine even with both instances of the watckit app.
You cannot submit WatchKit apps yet even though Xcode 6.2 and iOS 8.2 are officially out. See the following answer for more info.

Mac App distribution Invalid Binary issue

I am trying to upload my mac xcode project on mac app store, but each-time it shows invalid binary status. I have checked many answers in stack overflow as well. But issue is not resolved. That's why I am posting new question here
I tried some options -
1.. Removed all warnings
2.. Checked by quiting xcode, cleaned container folder
3.. provisioning profile is valid, and matching to the bundle id. I checked by deleting all certificates and provisioning and install required ones again.
4.. Created new provisioning profile and certificate 3 times. But same issue
5.. uploaded 3 times directly through xcode 5.1.1, and 2 times by Application Loader. But showing Invalid binary for all.
6.. App is properly sandboxed with proper permissions
Any idea. Thanks in advance.
Invalid Binary
When you get this error, apple will send you a mail with reason. In my case this was the email:
Dear developer,
We have discovered one or more issues with your recent delivery for
"App-Name". To process your delivery, the following issues must be
corrected:
App sandbox not enabled - The following executables must include the
"com.apple.security.app-sandbox" entitlement with a Boolean value of
true in the entitlements property list. Refer to the App Sandbox page
for more information on sandboxing your app.
App-name Mac.app/Contents/MacOS/app-name
Once these issues have been corrected, you can then redeliver the
corrected binary.
Regards,
The App Store team
Also, you shouldn't be using XCode 5.1.1 itunes connect has changed a lot now.
Please update to 6.0.1 or use the new beta version 6.1
Xcode 6.1 GM seed for OS X Yosemite
hope this helps

Test Flight and titanium , publishing development profile

To publish an IPA
I go to publish -> Distribute ad hoc/enterprise -> and then I publish the app
However, I can only publish an IPA with a distribution profile, this means I don't get any debugging on my phone.
How can I publish distributed profiles on test flight?
Solved it.
For ANYONE having this problem (i.e. being able to use a development certificate instead of production), follow the following steps.
---- Downgrade your ITunes VERSION to 11.1.5, otherwise it will complain when you try to do an iTunes sync that iTunes doesn't have enough memory!! (Titanium need to fix this!)
1) Download 11.1.5 from here http://mac.filehorse.com/download-itunes/4050/
2) Go to Applications, and Delete itunes... If you get an error message saying something like "This app is require by OSX" just go to Get Info > Sharing & Permissions > Everyone ... it has to say Read & Write.
3) Install the itunes you just downloaded
4) Open it (You might need to hold you "alt" key while opening so you can create a new library (11.2 changed something in your library that is not compatible with 11.1.5)
Then publish app USING ITUNES SYNC. (this is the ONLY way to get the development .IPA)
The app will now be in your app folder within iTunes.
You will now be able to upload your app onto test flight - a development version using a development APNS certificate. Also because it is in development mode, means that you will be able to see all error problems either through Xcode or Iphone configuration. If you publish an ad-hoc system based on production, it will not print out any Ti.App.Info etc commands in the device console.
Hope this helps! :)

Xcode 4.3 - error: no identities were available

Please, help me.
I would like to put an App in the IOS App Store but always receive this error message (Xcode4.3)
"No identities are available for signing"
Connect to IOS Center, Xcode can obtain identities from the IOS Dev Center...
What do I make wrong??
When you have your project open in Xcode there's a section called Code Signing. Click the first drop-down menu and you should see a list of identities, you should see at least one iPhone Developer and iPhone Distribution identity. If you don't an iPhone Distribution identity, or it is under the "identities without Provisioning profiles" subheading, you can resolve this in iOS Dev Center.
Go to iOS Dev Center > iOS Provisioning Portal > Provisioning > Distribution. You could have an expired profile, if so just modify and re-save it. If there is no profile then click New Profile. Then you should see the new iPhone Distribution identity in Xcode which you can now choose.
For me, it was the bundle identifiers that conflicted. Make sure the bundle identifier specified in Xcode > Targets > Info > Bundle Identifier matches the one you registers as App Id in IOS Dev Center > Provisioning Portal > App Ids. Hint can be found in Xcode > Targets > Build Settings > Code Signing, you just need to make the bundle identifiers match.
I was running into a problem where everything appeared to be fine (none of the certificates were expired), but Xcode was giving me that error message. However, once I downloaded and installed the .mobileprovision file it worked correctly. For some reason the Xcode automatic download wasn't working correctly.
i got the same error, when the scheme for archiving was set to "release" instead to "distribution".
Click "Manage Schemes" in XCode then "Edit..." to verify your settings.
I just renewed my iOS Developer membership. And this problem drove me crazy as I wanted to submit my app.
to Developer portal
iOS provisioning profiles
Select (your) Distribution Profile
Edit --> select the correct App ID
Generate and download it