Code Signing Error with fastlane - code-signing

I am getting error while building my application through fastlane. It gives me error that
Code Signing Error: No profile for team '4TM2DK894Y' matching 'match
Development bundle-id' found: Xcode couldn't find any provisioning
profiles matching '4TM2DK894Y/match Development bundle-id'.
I was able to do that but I ran the command mistakenly fastlane match --readonly and it installed new profiles and certificates I guess. After that I am continuously getting this error.
While I am able to archive and export the build manually through Xcode.
Anyone has clue how to fix this issue?

Related

React Native App throwing domain=FBSOpenApplicationServiceErrorDomain, code=3 Error

I've updated quite a few NPM packages in my React Native app and now even though it seems to build fine, it starts and immediately crashes on the iOS simulator. The error that it throws is:
Failed to launch the app on simulator, An error was encountered
processing the command (domain=FBSOpenApplicationServiceErrorDomain,
code=3) The request to open "org.reactjs.native.example.myappname"
failed. THe process did launch, but has since exited or crashed.
Prior to these npm package updates, the app was running fine. I found a few suggestions such as running rm -rf ios/build, cleaning the project, etc. I tried all these but still getting the same error.
Any suggestions on how to fix this issue?
BTW, this is a react-native: "^0.65.1" app and the Xcode version is 12.4.
If there is no recent change in the iOS project files then try:
Reset Content and Settings of the simulator:
If reseting the simulator content and settings doesn't work, update Xcode to its latest version.
I encountered this while upgrading a React Native application and found the actual error a few lines above:
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22): Failed to install the requested application The application's Info.plist does not contain a valid CFBundleShortVersionString. Ensure your bundle contains a valid CFBundleShortVersionString.
Then a few lines later error Failed to launch the app on simulator, An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=4):
Fixing the above error by setting the version correctly in xcode fixed the error for me.
The error was thrown in my case because of the bundle id was copy pasted to xCode and it had space around:
" com.your.app "
instead of
"com.your.app"
In my case the problem was for xml formatter and when I formatted the file it was added " " before package name.
check the source after formatting the file.

Can't find React native project on iOS Simulator or Xcode project

I have deleted my project on Xcode may it be .xcworkspace or .xcodeproj.
Because of that, I had to delete IOS and android folders while downgrading, updating and re-upgrading my react version to re-install IOS and android folders.
Thanks to that the emulator is working but unfortunately the project isn't present in the emulator and is still absent with Xcode. One thing to point out is that the simulator only appears when ran in the integrated terminal and nor in general terminal after cd-ing in the project folder.
Can anyone please help re-integrating the project in the emulator and on Xcode, please.
Here is the error when the emulator is running in a general terminal:
Here is the error when the emulator is running in a general terminal:
error Command failed: xcrun instruments -s
xcrun: error: Failed to determine realpath of '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk' (errno=No such file or directory)
xcrun: error: unable to find utility "instruments", not a developer tool or in PATH
Here is the error for building the project within emulator when ran from VS code integrated terminal:
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening project.xcodeproj
The process you need to follow is so similar to renaming a react native app. Basically you just need to run react-native upgrade in your root project directory. For further info you can check another question here. The instructions below explains how to create another react native project based on a copied one with a new name.
First copy the directory which your to-be-name-changed application exists. And go to your newly cloned directory.
Change the name at index.ios/android.js file which is given as a parameter to AppRegistry.
Change the name and version accordingly on package.json
Delete /ios and /android folders which are remaining from your older app.
Run $react-native upgrade to generate /ios and /android folders again.
Run $react-native link for any native dependency.
Finally run $react-native run-ios or anything you want.
Courtesy of
https://stackoverflow.com/questions/42506068/how-can-i-regenerate-ios-folder-in-react-native-project

Flutter library not found for -ldevice_info, can't archive the ios app with xcode

when I try to archive the app or run in a real device, I always get below errors:
ld: library not found for -ldevice_info
clang: error: linker command failed with exit code 1 (use -v to see invocation)
but if I just run in a simulator, everything is ok, if I try to remove the device_info package, then it will also show another package not found:(
I am using the latest flutter dev sdk, and I have setup a valid iOS developer certificates.
Thanks!
It seems that the solution here in this SO post as mentioned in the comment works for this case:
In new projects, in the iOS part is necessary to adjust a few
parameters, such as signing, and that you can only do in Xcode.
So, try to open the iOS project with Xcode and try to build it from
there. You'll see better warning and error messages there, specially
regarding signing.
You can open Xcode and locate your project ios folder, or:
cd yourproject/ios
open -a Xcode .
Then select Product > Run in the menu.
Also, this GitHub post discussion could also be a possible reason for other cases. Try to check the following:
I was able to successfully archive with your pubspec.yaml.
Can you confirm you opened ios/Runner.xcworkspace and NOT ios/Runner.xcodeproj? See Better handle case where a developer
opens Runner.xcodeproj instead of Runner.xcworkspace
#10770.
Did you run flutter build ios before you Archived? See https://flutter.dev/docs/deployment/ios#create-a-build-archive.

Maximo Anywhere - Build ipa files failed "Automation signing is disabled"

I'm try to build ipa files from Maximo Anywhere Project from build command.
When I'm run below command
./build.sh all-dist
I got this error :
Automatic signing is disabled and unable to generate a profile. To
enable automatic signing, pass -allowProvisioningUpdate to xcodebuild.
How to solve this problem ?
What version of Xcode and Maximo Anywhere do you have? I believe you have a problem with your provisioning profiles on your Mac similar to this Automatic signing is unable to resolve an issue with the "projectName" target's entitlements file.
Did you follow all the steps here? https://www.ibm.com/support/knowledgecenter/en/SSPJLC_7.5.2/com.ibm.si.mpl.doc_7.5.2/install/t_install_ios_dev_tools.html

Code Signing error in XCode 8.2.1

I have an app that builds on my Mac (running El Capitan) but when I copy the app project folder onto another Mac (running Sierra if that may be the problem) and run the project I get the code signing error:
CodeSign /Users/.../Library/Developer/Xcode/DerivedData/appname-fgarszmikfuloefrynwpohxkvgav/Build/Products/Debug-iphonesimulator/appname.app
cd "/Users/... app path"
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
Signing Identity: "-"
/usr/bin/codesign --force --sign - --timestamp=none /Users/.../Library/Developer/Xcode/DerivedData/appname-fgarszmikfuloefrynwpohxkvgav/Build/Products/Debug-iphonesimulator/appname.app
/Users/.../Library/Developer/Xcode/DerivedData/appname-fgarszmikfuloefrynwpohxkvgav/Build/Products/Debug-iphonesimulator/appname.app: resource fork, Finder information, or similar detritus not allowed
Command /usr/bin/codesign failed with exit code 1
New certs and provisioning profiles etc but all that should be fine.
Followed every suggestion I can find on here (specifically Code Sign Error in macOS Sierra Xcode 8 : resource fork, Finder information, or similar detritus not allowed), cleaned, alt-cleaned. Auto manage signing doesn't fix it.
I have paid developer account.
Can anyone suggest what might be causing the problem?
It seems like this error is caused by extended attributes on files in your project.
You can find out which files are causing this failure by running the following command: xattr -lr <path_to_app_bundle>
You can remove the extended attributes using this command: xattr -cr <path_to_app_bundle>
More info here.
We noticed that a .bundle group which was created in XCode version 8.0.0 was later being used in 8.2.1 and once we removed the bundle and re-added it using XCode 8.2.1, the error was gone. Also it may have something to do with the folder name "Resources" in this bundle. I believe this is an XCode bug but don't quote me on it.

Resources