Xamarin Build fails with -25320 Unknown error from Visual studio 2015 - ios

I am experiencing an issue were as when trying to build any IOS app (even a blank app with a single button and no code behind at all) using Xamarin on Visual Studio 2015, i receive the below error message:-
1>------ Build started: Project: anotherTest, Configuration: Debug iPhone
1> Generated session id: 918b34de762e8cb2603d83fb22be8494
1> Generated build app name: anotherTest
1> Connecting to Mac server 192.168.0.36...
1> anotherTest -> D:\Local sites\XamarinFresh\anotherTest\anotherTest\bin\iPhone\Debug\anotherTest.exe
1> Detected signing identity:
1> Code Signing Key: "iPhone Developer: xxxx xxxxx (2YL57YJ875)" (62943356AF268E06164BD4D6432932995AF3A2CA)
1> Provisioning Profile: "iOS Team Provisioning Profile: net.xxxxx.*" (05eb6d91-b645-4b45-ae20-b1c23576702c)
1> Bundle Id: net.xxxxx.anothertest
1> App Id: QCQ62TK5N6.net.xxxxx.anothertest
1> SecKey API returned: -25320, (null)/Users/xxxxxxx/Library/Caches/Xamarin/mtbs/builds/anotherTest/918b34de762e8cb2603d83fb22be8494/bin/iPhone/Debug/anotherTest.app: unknown error -1=ffffffffffffffff
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(1541,3): error : Tool exited with code: 1. Output: SecKey API returned: -25320, (null)/Users/xxxxx/Library/Caches/Xamarin/mtbs/builds/anotherTest/918b34de762e8cb2603d83fb22be8494/bin/iPhone/Debug/anotherTest.app: unknown error -1=ffffffffffffffff
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(1541,3): error :
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I have reinstalled Visual Studio 2015 and done all the available Xamarin updates, the Mac is accessible with the latest versions of all software and and the key chain settings have been set to always allow.
Can anyone shed any light on what is happening or why it doesn't build?

On macOS when you type security error -25320 you get a further clue on what the issue is:
security error -25320
Error: 0xFFFF9D18 -25320 In dark wake, no UI possible
So, the code signing is triggering a UI challenge, of which it's not being allowed due to the way Xamarin runs builds. I came across this method of importing your keychain on macOS to avoid the issue:
security set-key-partition-list -S apple: -k <Password> -D <Identity> -t private <your.keychain>
Shout out to Bochun Bai for spending 3 weeks with Apple support to finding the solution to a somewhat similar sounding -25308 issue and posting it to https://sinofool.net/blog/archives/322

Related

ionic cordova run ios error - Error code 1 for command

I am a newbie of iOS app development. I installed macOs on VMware and use ionic3 framework to development an existed project. It works fine with Android system.
When I run
ionic cordova run ios
get below error:
[17:58:08] tslint: src/pages/welcome/welcome.ts, line: 28
Property 'events' is declared but its value is never read.
L27: private nav: Nav,
L28: private events: Events,
L29: private auth: AuthService,
[17:58:09] lint finished in 4.08 s
FIXME: Implement XCBuild support for macros in overriding parameters with condition sets:
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer
CordovaError: Promise rejected with non-error: 'Error code 1 for command: xcodebuild with args: -xcconfig,/Users/ang/Sense/mobile-app-full/platforms/ios/cordova/build-debug.xcconfig,-workspace,adar.xcworkspace,-scheme,adar,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone 12 Pro Max,build,CONFIGURATION_BUILD_DIR=/Users/ang/Sense/mobile-app-full/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/ang/Sense/mobile-app-full/platforms/ios/build/sharedpch'
at /usr/local/lib/node_modules/cordova/bin/cordova:30:15
at processTicksAndRejections (internal/process/task_queues.js:93:5)
[ERROR] An error occurred while running cordova run ios (exit code 1).
Could not find the description and solution of Error code 1 on website.
Thanks for checking my issue.

vsCode doesn't run flutter app on physical iPhone

I just installed the latest version of flutter and xcode and I'm getting an error when I try running the flutter app on an actual iPhone. Works on ios simulator. The weird thing is that it works when I run it from xcode, but when I run it from vsCode, I get the following error:
It appears that your application still contains the default signing identifier.
Try replacing 'com.example' with your signing id in Xcode:
open ios/Runner.xcworkspace
What I tried doing:
Change the bundle identifier to myEmailAddress#gmail.com.appTitle
Clean and build the ios app
clean then ran flutter build bundle
What am I doing wrong and how can I get vsCode to run the app on an iPhone?
Here's the full error:
Launching lib/main.dart on Jessica’s iPhone in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: ITYTO5RCWD
Xcode build done. 25.4s
Failed to build iOS app
Error output from Xcode build:
↳
2020-04-19 13:53:51.828 xcodebuild[2046:21215] [MT] iPhoneConnect: 📱<DVTiOSDevice ...> == Underlying device preparation errors ==
2020-04-19 13:53:51.828 xcodebuild[2046:21215] [MT] iPhoneConnect: Failed _shouldMakeReadyForDevelopment check even though device is not locked by passcode.
Domain: com.apple.platform.iphoneos
Code: 5
Failure Reason: allowsSecureServices: 1. isConnected: 0. Platform: <"...platform info...">. DTDKDeviceIdentifierIsIDID: 0
User Info: {
DVTDeviceDescription = "...device info..."
}
--
2020-04-19 13:53:51.829 xcodebuild[2046:21215] [MT] iPhoneConnect: 📱<"...platform info..."> == END: Underlying device preparation errors ==
** BUILD FAILED **
Xcode's output:
↳
/Users/Jessica/Development/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.15.1/darwin/Classes/AudioplayersPlugin.m:88:37: warning: incompatible pointer types sending 'FlutterEngine *' to parameter of type 'NSObject<FlutterBinaryMessenger> * _Nonnull' [-Wincompatible-pointer-types]
binaryMessenger:_headlessEngine];
^~~~~~~~~~~~~~~
In module 'Flutter' imported from /Users/Jessica/Development/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.15.1/darwin/Classes/AudioplayersPlugin.h:2:
/Users/Jessica/Desktop/flutter_game2/ios/Flutter/Flutter.framework/Headers/FlutterChannels.h:178:74: note: passing argument to parameter 'messenger' here
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger;
^
1 warning generated.
/Users/Jessica/Desktop/flutter_game2/build/ios/Debug-iphoneos/Runner.app: resource fork, Finder information, or similar detritus not allowed
Command CodeSign failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the precompiled application for the device.
It appears that your application still contains the default signing identifier.
Try replacing 'com.example' with your signing id in Xcode:
open ios/Runner.xcworkspace
Error launching application on Jessica’s iPhone.
Exited (sigterm)
Alright, so i solved this problem by pressing on the search icon on the top left of vscode, then searching for com.example
then i saw three search results that were in the ios folder click on it and replace all three com.example with the identifier you created in xcode.
you can change your signing identifier in Xcode
To do that, just open your workspace with app in Xcode, then go to signing and capabilities to change default com.example to anything else...
Better to use as follows to give app company / organization name
flutter create --org com.yourdomain your_app_name
Swift, Kotlin, and androidx dependencies are the default options
After just open the created project in Android Studio or in VSCode
Parameter
--org com.yourcompany
will form applicationId for Android:
com.yourcompany.yourappname
and iOS PRODUCT_BUNDLE_IDENTIFIER:
com.yourcompany.yourAppName
To explore all possible parameters type
flutter create --help

Error no mobile provisioning profile found

While using the build system instruction from https://webrtc.org/native-code/ios/ all went fine except following error
Error: no mobile provisioning profile found for
When i do xcrun security find-identity -v -p codesigning i do see my certificates, Is there anyway to fix it?
$ gn gen out/ios_64 --args='target_os="ios" target_cpu="arm64"'
Done. Made 719 targets from 110 files in 2444ms
$ ninja -C out/ios_64 AppRTCMobile
ninja: Entering directory `out/ios_64'
[2086/2100] CODE SIGNING //webrtc/sdk:r...(//build/toolchain/mac:ios_clang_arm64)
FAILED: WebRTC.framework/WebRTC WebRTC.framework/_CodeSignature/CodeResources WebRTC.framework/embedded.mobileprovision
python ../../build/config/ios/codesign.py code-sign-bundle -t=iphoneos -i=3F06B010E7BE32A3D212219D02DF440B0F20D6A3 -e=../../build/config/ios/entitlements.plist -b=obj/webrtc/sdk/WebRTC WebRTC.framework
Error: no mobile provisioning profile found for "org.webrtc.WebRTC".
ninja: build stopped: subcommand failed.
Let me tell the steps that works for me
Edit the file src/examples/objc/AppRTCMobile/ios/Info.plist and change the value com.google.AppRTCMobile with your own bundle identifier.
Edit the file src/sdk/objc/Framework/Info.plist and change the value org.webrtc.WebRTC with your own bundle identifier
I have created bundle identifiers on Xcode and after that build is successful

SecKey API returned: -25304 libswiftAVFoundation.dylib: unknown error -1=ffffffffffffffff error: Task failed with exit 1 signal 0

Since 10.12 Sierra major update, I can't compile one of my iOS projects on only on device. But very weird, it's work on simulator.
I tried to remove and resetup my dev account in Xcode, hard reboot, remove and resetup all certificates in keychain, etc.
XCode 8.0. I tried also on 8.1 beta too, same.
The error :
SecKey API returned: -25304, (null)/Users/****/Library/Developer/Xcode/DerivedData/****-epkppprfmidyatftsvnxgjqsawit/Build/Products/Debug-iphoneos/****.app/Frameworks/libswiftAVFoundation.dylib: unknown error -1=ffffffffffffffff
error: Task failed with exit 1 signal 0 {
/usr/bin/codesign '--force' '--sign' 'C47B52FDE2CABFC81D33BED8937984AF8BC6DC33' '--verbose' '/Users/****/Library/Developer/Xcode/DerivedData/****-epkppprfmidyatftsvnxgjqsawit/Build/Products/Debug-iphoneos/***.app/Frameworks/libswiftAVFoundation.dylib'
I had the same issue,
Unlock your keychain by adding this line to your projects configuration (Build>Execute shell)
#unlock the keychain
security unlock-keychain -p "myPrettyPassword" $HOME/Library/Keychains/MyPrettyKeychain.keychain

Xcode5: Failed to register "/System/Library/CoreServices/CoreTypes.bundle/Contents/Library/MobileDevices.bundle

My library has some type converters. I'm registering some OSX and iOS type converters, like so:
When I compile for iOS, I'm getting some errors related to not being able to find UIKit. Here's how I compile for iOS:
xcodebuild -destination OS=${module.sdk.version},name=iPhone -workspace ${workspace} -scheme '${library.ios.scheme}'
The ${} tokens are patched in by my build system.
When building I get:
__build.library.ios.simulator:
[exec] Details: Failed to register "/System/Library/CoreServices/CoreTypes.bundle/Contents/Library/MobileDevices.bundle" with Launch Services, error code: -10811.
[exec] Function: __RegisterUTIsIfNeeded_block_invoke
[exec] Thread: <NSThread: 0x7faca140e5c0>{name = (null), num = 1}
[exec] Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can
How can I fix this?
This appears to be an compiler bug, and there's not much that can be done about it.
Here is oficial answer on JetBrains Tracker:
Anton Makeev 17 Sep 2013, 19:36
build error doesn't affect compilation results - it's just a log message from xcodebuild.
Simulator should work correctly after you run it at least once in Xcode 5.
and:
We will handle this output in AppCode (show it as a warning, not a n error) but we recommend filing the error to Apple as the message suggests - unfortunately we can't fix it (only hide)
and:
Build error won't go away until we implement 'hide-it-fix' or until Apple fixes it. It is harmless, though and doesn't affect build result.

Resources