Ich habe die Bereitstellung doppelt überprüft und es ist alles richtig (genau das gleiche wie das, was ich für Xamarin verwendet habe) < /li>
Ich habe überprüft, ob ich meine Berechtigungsgruppen, Share -Gruppen und Bündelnamen korrigieren kann. Zugriff < /li>
< /ul>
Da es in Debug funktioniert und in Xamarin in der Produktion funktioniert, gehe ich davon aus, dass es sich eher um ein Konfigurationsproblem als um ein Codeproblem handelt. Daher können die folgenden Dateien schuld sein (?):
Hier ist die Haupt -App CSproj:
Code: Select all
net9.0-ios
Exe
MyApp
true
true
enable
enable
MyApp
com.MyApp.MyApp
1.0
1
12.2
13.1
21.0
10.0.17763.0
10.0.17763.0
6.5
true
false
Apple Development: Created via API (XXXXXXXXXX)
VS: com.MyCompany.MyApp Development
...
...
...
...
...
Code: Select all
net9.0-ios
Library
com.MyCompany.MyApp.ShareExtension
enable
true
13.0
true
full
true
false
Apple Development: Created via API (XXXXXXXXXX)
VS: com.MyCompany.MyApp.ShareExtension Development
Code: Select all
UIDeviceFamily
1
2
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UISupportedInterfaceOrientations~ipad
UIInterfaceOrientationPortrait
UIInterfaceOrientationPortraitUpsideDown
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
MinimumOSVersion
12.2
CFBundleDisplayName
MyApp
CFBundleIdentifier
com.MyCompany.MyApp
CFBundleName
MyApp
XSAppIconAssets
Assets.xcassets/appicon.appiconset
UILaunchStoryboardName
LaunchScreen
UIViewControllerBasedStatusBarAppearance
NSExtensionPointIdentifier
com.apple.share-services
CFBundleURLTypes
CFBundleURLName
com.MyCompany.MyApp
CFBundleURLSchemes
shareto
CFBundleTypeRole
None
NSAppleMusicUsageDescription
Select audio file for sheet
NSMicrophoneUsageDescription
Record audio loop
UIBackgroundModes
audio
CFBundleShortVersionString
1.0.001
CFBundleVersion
1
ITSAppUsesNonExemptEncryption
UIFileSharingEnabled
Code: Select all
CFBundleDevelopmentRegion
en
CFBundleDisplayName
MyApp
CFBundleIdentifier
com.MyCompany.MyApp.ShareExtension
CFBundleInfoDictionaryVersion
6.0
CFBundleName
com.MyCompany.MyApp.ShareExtension
CFBundlePackageType
XPC!
CFBundleSignature
????
MinimumOSVersion
13.0
NSExtension
NSExtensionAttributes
NSExtensionActivationRule
NSExtensionActivationSupportsFileWithMaxCount
1
NSExtensionActivationSupportsImageWithMaxCount
1
NSExtensionActivationSupportsMovieWithMaxCount
0
NSExtensionActivationSupportsText
NSExtensionActivationSupportsWebURLWithMaxCount
1
NSExtensionPrincipalClass
CodeBasedViewController
NSExtensionPointIdentifier
com.apple.share-services
CFBundleURLTypes
CFBundleURLName
URL Type 1
CFBundleTypeRole
Editor
CFBundleShortVersionString
1.0.001
ITSAppUsesNonExemptEncryption
CFBundleVersion
001
< /code>
Was kann ich tun, um das zu debuggen? Es ist ein unglaublich schwieriges [url=viewtopic.php?t=26065]Problem[/url] zu lösen, insbesondere angesichts der 20-30-minütigen Kompilierungszeiten, was bedeutet, dass ich nur 2 oder 3 verschiedene Problemen pro Stunde ausprobieren kann, was es schwierig macht, sinnvolle Fortschritte zu erzielen. Code.using System.IO.Compression;
using System.Text;
using System.Web;
using CoreGraphics;
using Foundation;
using Microsoft.Maui.Platform;
using MobileCoreServices;
using UIKit;
namespace ShareExtension.iOS
{
[Register("CodeBasedViewController")]
internal class CodeBasedViewController : UIViewController
{
UILabel lbHeader;
UIView dialog;
public CodeBasedViewController()
{
}
const int Version = 2;
NSString VERSION = new NSString("version");
NSString FILEPATH = new NSString("filepath");
public static Color Grey700 = Color.FromHex("#ff616161");
public static Color Grey800 = Color.FromHex("#ff424242");
public static Color TitleTextColor = Grey700;
public static Color EditorTextColor = Grey800;
public override async void ViewDidLoad()
{
base.ViewDidLoad();
InitUI();
}
void InitUI()
{
//dialog
dialog = new UIView(new CGRect(50, 150, 300, 200));
dialog.BackgroundColor = Colors.GhostWhite.ToPlatform();
dialog.Layer.CornerRadius = 8;
dialog.Layer.MasksToBounds = true;
//header
lbHeader = new UILabel(new CGRect(60, 60, 150, 30));
lbHeader.TextAlignment = UITextAlignment.Left;
lbHeader.BackgroundColor = Colors.Transparent.ToPlatform();
lbHeader.LineBreakMode = UILineBreakMode.WordWrap;
lbHeader.Lines = 0;
lbHeader.Text = "This is a title";
lbHeader.TextColor = TitleTextColor.ToPlatform();
//view
View.AddSubview(dialog);
dialog.AddSubview(lbHeader);
}
}
}
Die Aktien -Ext stürzen die App nicht ab, sodass keine Crashprotokolle generiert werden. Hier ist jedoch ein Ausdruck des Protokolls für einen anderen Absturz, der passiert, wenn die App in den Hintergrund verschoben wird. Ich bin mir nicht sicher, ob dies verwandt ist: < /p>
Code: Select all
Incident Identifier: 2076FE25-A4BF-45A9-8428-1E74FC70BCA5
Hardware Model: iPhone10,6
Process: MyApp [34247]
Path: /private/var/containers/Bundle/Application/D3520EA3-64C3-43D2-AD4D-1F8F07AF4266/MyApp.app/MyApp
Identifier: com.MyCompany.MyApp
Version: 2.0.462 (462)
AppStoreTools: 16F7
AppVariant: 1:iPhone10,6:16
Beta: YES
Code Type: ARM-64 (Native)
Role: Background
Parent Process: launchd [1]
Coalition: com.MyCompany.MyApp [707]
Date/Time: 2025-08-15 16:23:45.8767 +0800
Launch Time: 2025-08-15 16:21:59.7450 +0800
OS Version: iPhone OS 16.7.11 (20H360)
Release Type: User
Baseband Version: 6.01.01
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x1bdfd940c __exceptionPreprocess + 160 (NSException.m:202)
1 libobjc.A.dylib 0x1b72b5c28 objc_exception_throw + 56 (objc-exception.mm:356)
2 Foundation 0x1b87bd944 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 168 (NSException.m:251)
3 UIKitCore 0x1c037a464 _UIApplicationDrainManagedAutoreleasePool + 260 (UIApplication+AutoreleasePool.m:171)
4 CoreFoundation 0x1be0598e8 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32 (CFRunLoop.c:1789)
5 CoreFoundation 0x1bdfe951c __CFRunLoopDoObservers + 552 (CFRunLoop.c:1902)
6 CoreFoundation 0x1be049d7c CFRunLoopRunSpecific + 676 (CFRunLoop.c:3421)
7 UIFoundation 0x1c7b1da70 -[NSHTMLReader _loadUsingWebKit] + 1432 (NSHTMLReader.m:2633)
8 UIFoundation 0x1c7b1e594 -[NSHTMLReader attributedString] + 20 (NSHTMLReader.m:3222)
9 UIFoundation 0x1c7ade150 _NSReadAttributedStringFromURLOrData + 6252 (NSAttributedStringAdditions.m:2750)
10 UIFoundation 0x1c7adc86c -[NSAttributedString(NSAttributedStringUIFoundationAdditions) initWithData:options:documentAttributes:error:] + 144 (NSAttributedStringAdditions.m:1442)
11 MyApp 0x10ece0618 0x1040fc000 + 180241944
12 MyApp 0x105e07a10 0x1040fc000 + 30456336
13 MyApp 0x10e053f4c 0x1040fc000 + 167083852
14 MyApp 0x10976f350 0x1040fc000 + 90649424
15 MyApp 0x1098a8a18 0x1040fc000 + 91933208
16 MyApp 0x10976f350 0x1040fc000 + 90649424
17 MyApp 0x10974bb9c 0x1040fc000 + 90504092
18 MyApp 0x10ef5fa30 0x1040fc000 + 182860336
19 UIKitCore 0x1c00a4afc -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 1360 (UITableView.m:16573)
20 UIKitCore 0x1c007ac08 -[UITableView _updateVisibleCellsForRanges:createIfNecessary:] + 568 (UITableView.m:3144)
21 UIKitCore 0x1bffbdcb0 -[UITableView _updateVisibleCellsNow:] + 1132 (UITableView.m:3286)
22 UIKitCore 0x1bffbd788 -[UITableView layoutSubviews] + 144 (UITableView.m:10618)
23 UIKitCore 0x1bff6f2e8 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1932 (UIView.m:18682)
24 QuartzCore 0x1bf47560c CA::Layer::layout_if_needed(CA::Transaction*) + 496 (CALayer.mm:10311)
.
.
.
.
Ich habe es geschafft, zwei Absturzprobleme nach einer Woche schmerzhafter Versuch und Fehler zu lösen. Nachdem ich zum Generieren meiner IPA auf VS -Code umgestellt war, wurde der Absturz beim Start gestoppt. Ich habe sie alle in CollectionViews konvertiert und bin seitdem nicht abgestürzt. /> Jetzt bin ich wieder zu 2 Problemen. /> Meine Stunden haben versucht, zu versuchen Geräte, warum VS -Code mein Projekt manchmal nicht reinigt, warum kann es bei der Arbeit mit Rider auf ein Gerät bereitgestellt werden, aber keine IPA erstellen, die nicht abstürzt, warum ListViews, die auf Android arbeiten, nicht auf iOS funktionieren. /> Dies ist wirklich nicht das, worum es bei der Entwicklung geht. Als Entwickler ist dies nicht das, wofür wir uns anmelden. Wir melden uns an, um Apps zu schreiben, keine Fixes für die Frameworks zu schreiben, auf denen die Apps aufgebaut sind. Es ist die Wahrheit. Maui -Entwicklung ist ein Albtraum.