Is there any solution for this error 402620388 message? - swift

I have searched 100s of things but not even one worked for me i deintegrate pods and reinstall it, delete data from derived data, clean xcode project , legacy settings but not worked for me. Please can you help me out there ?
Details
Unable to install "WWCD"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620388
--
No code signature found.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620388
User Info: {
DVTRadarComponentKey = 261622;
MobileDeviceErrorCode = "(0xE800801C)";
"com.apple.dtdevicekit.stacktrace" = (
0 DTDeviceKitBase 0x00000001236ac81a DTDKCreateNSErrorFromAMDErrorCode + 233
1 DTDeviceKitBase 0x00000001236edf70 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
2 DVTFoundation 0x000000010a827385 DVTInvokeWithStrongOwnership + 73
3 DTDeviceKitBase 0x00000001236edca8 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1654
4 IDEiOSSupportCore 0x0000000123564e91 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352 + 4165
5 DVTFoundation 0x000000010a95aa10 __DVT_CALLING_CLIENT_BLOCK__ + 7
6 DVTFoundation 0x000000010a95c652 __DVTDispatchAsync_block_invoke + 1194
7 libdispatch.dylib 0x00007fff6a4906c4 _dispatch_call_block_and_release + 12
8 libdispatch.dylib 0x00007fff6a491658 _dispatch_client_callout + 8
9 libdispatch.dylib 0x00007fff6a496c44 _dispatch_lane_serial_drain + 597
10 libdispatch.dylib 0x00007fff6a4975d6 _dispatch_lane_invoke + 363
11 libdispatch.dylib 0x00007fff6a4a0c09 _dispatch_workloop_worker_thread + 596
12 libsystem_pthread.dylib 0x00007fff6a6eba3d _pthread_wqthread + 290
13 libsystem_pthread.dylib 0x00007fff6a6eab77 start_wqthread + 15
);
}
--
System Information
macOS Version 10.15.4 (Build 19E266)
Xcode 11.4 (16134)

WORK AROUND TO:
Unable to install "app"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620388
Apparently this is a known (SR-13343) in Xcode 12. It has to do with "SwiftPM binaryTarget dependency and code signing", where Xcode fails to sign the frameworks that are provided by SwiftPM.
See this link: https://forums.swift.org/t/swiftpm-binarytarget-dependency-and-code-signing/38953
If you read thru you will find a link to the work around, by adding a script to the build phase of the target:
Work Around: https://pspdfkit.com/guides/ios/current/knowledge-base/library-not-found-swiftpm/
I just added the script to my app, everything is now good!

For my case using Xcode 13
Remove all frameworks reference
Clear build folder
Clear DerivedData folder
Add back all the frameworks
Then it works.

This error happened to me when my flutter version (stable) did not yet work well with the latest XCode version (11.4). I deleted the /android and /ios folders, ran flutter create . from my app folder to recreate them. Then I used Git to restore my modifications to the folders.
My project was in an early stage so this was a very quick fix. This may vary if you have a project with more modifications inside ios / android folders.

Same happened to me on new Xcode 12. Finally I realised that I included wrong target of the third-party library trough Swift Package Manager.
So I suggest to check third-party libs included in your project, because there can be easily something wrong with signing.

Related

Flutter Integration with AdMob (iOS platform) failing - error related to GoogleServices

I'm trying to add admob plugin to my flutter app. Its not going very well.
What is the problem:
For the iOS version, I'm receiving an error when I compile the app:
path: satisfied (Path is satisfied), interface: en0
Configuring the default Firebase app...
6.11.0 - [Firebase/Core][I-COR000004] App with name __FIRAPP_DEFAULT does not exist.
6.11.0 - [Firebase/Core][I-COR000012] Could not locate configuration file: 'GoogleService-Info.plist'.
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23c4f02e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50b97b20 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23c4ee6c +[NSException raise:format:] + 188
3 Runner 0x000000010c0a6d1a +[FIRApp configure] + 138
4 Runner 0x000000010c106cb2 -[FLTFirebaseAdMobPlugin init] + 258
5 Runner 0x000000010c106a26 +[FLTFirebaseAdMobPlugin registerWithRegistrar:] + 70
6 Runner 0x000000010c0944d0 +[GeneratedPluginRegistrant registerWithRegistry:] + 112
7 Runner <…>
What is my configuration?
Well , I've placed my GoogleService-Info.plist file in the same directory as my info.plist file. I'm not even sure if I need this for admob. This is only for analytics, and I do not need analytics.. do I?
For Android integration of Admob - it seems quite simple.
What should I be doing?
I'm really lost. Not sure what else I can do.
3. Packages added:
In terms of my packages, here's what I'm using:
firebase_admob: ^0.9.0+9
cloud_firestore: ^0.12.10
firebase_analytics: ^5.0.6
**4. Other Issues **
In the Podfile, should I uncomment:
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
? Perhaps I need lower models to work also?
This is a common thing which I forget to add GoogleService-Info.plist in Runner.xcworkspace
open Runner.xcworkspace right click on runner and choose add file select GoogleService-Info.plist

Flutter Run - lost connection to device (Simulator iPhone 11 Pro Max)

everytime I intend run a project on the IOS simulator I have a message "Lost connection to device". It previously worked fine, i don't remember exactly to interfere in some way with Xcode or something. Everything OK on flutter doctor though...
The report I receive is:
Mariuss-MacBook-Pro:my_repository-15.10 mariuspruna$ flutter run -d D79DA193-4A54-4D3F-B029-E42F046EEFAF
Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Running Xcode build...
├─Assembling Flutter resources... 13.8s
└─Compiling, linking and signing... 15.6s
Xcode build done. 34.2s
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23b98bde __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff503b5b20 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23b98958 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff255eb6f5 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
4 UIKitCore 0x00007fff47163f36 -[UIApplication _createStatusBarWithRequestedStyle:orientation:hidden:] + 255
5 UIKitCore 0x00007fff471643d9 -[UIApplication statusBar] + 24
6 Foundation <…>
Lost connection to device.
Syncing files to device iPhone 11 Pro Max...
Mariuss-MacBook-Pro:my_repository-15.10 mariuspruna$
Thanks for any suggestions.
The problem for me was a permission error when the app was trying to access user geolocation but in order to first see that error (Android Studio was not helping), I needed to connect my physical iPhone to my laptop using a cable and try to deploy the app there directly from Xcode.
Then after seeing the error on Xcode. Inside the Info.plist file, I add these two lines lo fix it:
<key>NSLocationWhenInUseUsageDescription</key>
<string>This application requires location services to properly work</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>This application requires location services to properly work</string>
Then, the app was successfully deployed in the emulator and my real device.

Adding the admob dependency crashes my app

I'm trying to integrate admob in my flutter app and whenever I add the
firebase_admob: ^0.5.2 dependency my app crashes.
Launching lib/main.dart on iPhone Xʀ in debug mode...
Running Xcode build...
Xcode build done. 10,3s
Configuring the default Firebase app...
Configured the default Firebase app __FIRAPP_DEFAULT.
Syncing files to device iPhone Xʀ...
Lost connection to device.
*** First throw call stack:
(
0 CoreFoundation 0x00000001108526fb __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000010fdfeac5 objc_exception_throw + 48
2 CoreFoundation 0x0000000110852269 -[NSException raise] + 9
3 Runner 0x0000000106bb9dd2 GADVerifyApplicationID + 148
4 Runner 0x0000000106bba967 GADVerifyApplicationID + 3113
5 libdispatch.dylib <…>
I've tried to change the ADMOB_APP_ID in the AndroidManifest.xml and in the Info.plist, as well as change the version of the dependency to 0.9.0
Thank you in advance.

Error running iOS simulator after adding firestore dependency following the Firebase for Flutter tutorial

I've been following a couple of flutter tutorials and most recently tried following the Firebase for Flutter tutorial which can be found here: https://codelabs.developers.google.com/codelabs/flutter-firebase/
I created a new project like the tutorial says, test ran it on both android and iOS and it worked fine. Then I added cloud_firestore: ^0.8.0 to the pubspec.yaml file and ran "Packages get" just like the tutorial says.
Now whenever I try to run the project in an iOS simulator I get the following error:
*** First throw call stack:
(
0 CoreFoundation 0x00000001140b329b __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000011364f735 objc_exception_throw + 48
2 CoreFoundation 0x00000001140b30f5 +[NSException raise:format:] + 197
3 Runner 0x000000010f364441 +[FIRApp configure] + 481
4 Runner 0x000000010f6bd02c -[FLTCloudFirestorePlugin init] + 188
5 Runner 0x000000010f6bced9 +[FLTCloudFirestorePlugin registerWithRegistrar:] + 297
6 Runner 0x000000010f30c73b +[GeneratedPluginRegistrant registerWithRegistry:] + 123
7 Runner <…>
The tutorial describes a different problem that can happen with simulating on iOS. I've followed the solution for that issue (changing the build system to Legacy Build System) but that did not change anything regarding my problem.
I have tried finding solutions to this problem online but without any luck. Do you have any idea what might be causing this error?
The file GoogleService-Info.plist from firebase needed to be added to the folder /ios/Runner.
More info here:
https://github.com/flutter/flutter/issues/22536?_pjax=%23js-repo-pjax-container
In addition to #Dandido's answer:
In the tutorial you mentioned you first can run your project on ios devices after you completed part 7 "Platform-specific Firebase configuration". In that step, you will create a GoogleService-Info.plist and add it to your Xcode project.

iOS 10 runtime missing

I have the latest Xcode 8 beta 6 but I do not see any iOS 10 simulators. When I try to add one, I do not have the option to select iOS 10:
I tried removing and re-installing XCode 8 but it does not help.
The content of /Library/Developer/CoreSimulator/Profiles/Runtimes/ does indeed not show the iOS 10 runtime
ll /Library/Developer/CoreSimulator/Profiles/Runtimes/
drwxr-xr-x# 4 root wheel 136 May 5 08:53 iOS 7.1.simruntime
drwxrwxr-t 3 root admin 102 Aug 22 13:51 iOS 8.4.simruntime
drwxrwxr-t 3 root admin 102 Jul 12 08:30 iOS 9.3.simruntime
I was facing the same issue:
Basically iPhone 4S doesn't support iOS 10. Its architecture is unsupported.
So you can select any device from iPhone 5 onwards.
Please find screenshots below for reference:
iPhone 4S &
iPhone 6S
Cheers!