Post

Replies

Boosts

Views

Activity

App refused by Apple with error ITMS-90338: Non-public API usage
Hi, we were able to migrate our solution from Xamarin to MAUI (.net 8). After a 2 weeks fight, the app is finally working on my dev devices. Unfortunately, after sending the app to review, it gets rejected because of the following: ITMS-90338: Non-public API usage - The app references non-public symbols in [Our app name]: _SCDynamicStoreCreate, _SCDynamicStoreCreateRunLoopSource, _SCDynamicStoreKeyCreateNetworkServiceEntity, _SCDynamicStoreSetNotificationKeys. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. For further information, visit the Technical Support Information at http://developer.apple.com/support/technical/ From what I understand, this is because the 4 methods (_SCDynamicStoreCreate, _SCDynamicStoreCreateRunLoopSource, _SCDynamicStoreKeyCreateNetworkServiceEntity, _SCDynamicStoreSetNotificationKeys) exists in the generated Mach-O binary. Those methods are not used directly by our application but because of HttpClient we are using to request our business API The methods are implemented in the System.Net.NetworkInformation assembly which is referenced in the System.Net.Http assembly Given to the MAUI Team those methods are public and should not be rejected (https://github.com/dotnet/maui/issues/23210#issuecomment-2186038540) Kind regards
25
25
1.8k
Jun ’24
Why my application does not (always) start when opening a file using Xamarin forms?
I have a weird issue with my iOS part of Xamarin Forms application. I have set up my app to open VCard using this Info.Plist: <?xml version="1.0" encoding="UTF-8"?> <plist version="1.0"> <dict> <!-- Some application keys/values stripped for clarity --> <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeName</key> <string>VCard Files</string> <key>CFBundleTypeRole</key> <string>Viewer</string> <key>LSHandlerRank</key> <string>Alternate</string> <key>LSItemContentTypes</key> <array> <string>public.vcard</string> </array> </dict> </array> <key>LSSupportsOpeningDocumentsInPlace</key> <true/> <!--<key>UISupportsDocumentBrowser</key> <true/>--> </dict> </plist> And it works ... When a VCard is opened in Safari, it shows a preview of that VCard. Using the "Share" button, I can see my application in 2 locations: 1 with an Icon (number 1 on the screenshot), 1 with only text (number 2 on the screenshot). If I use the text button(2), my app opens normally (or goes to foreground if already running) and I'm able to deal with the VCard content, so far so good. But, and here comes the issue, if I use the Icon button(1), my app does not open and the Share panel becomes irresponsible. I have no log from my application (OpenUrl function is not called). The only info about this non-crash comes from the iDevice logs (caught using idevicesyslog) sharingd[67] <Notice>: SUIOpenInAppActivity: Performing open using application [my application package] with options { "__PayloadOptions" = { UIApplicationLaunchOptionsSourceApplicationKey = "com.apple.mobilesafari"; }; "__PromptUnlockDevice" = 1; "__UnlockDevice" = 1; } sharingd(CoreServices)[67] <Error>: LaunchServices: open operation <NSBlockOperation: 0x13fece820> failed with error: Error Domain=NSOSStatusErrorDomain Code=-50 "invalid input parameters" UserInfo={NSDebugDescription=invalid input parameters, _LSLine=172, _LSFunction=-[_LSDOpenClient performOpenOperationWithURL:bundleIdentifier:documentIdentifier:isContentManaged:sourceAuditToken:userInfo:options:delegate:completionHandler:]} sharingd[67] <Notice>: -[SUIOpenInAppActivity openResourceOperation:didFailWithError:] Error Domain=NSOSStatusErrorDomain Code=-50 "invalid input parameters" UserInfo={NSDebugDescription=invalid input parameters, _LSLine=172, _LSFunction=-[_LSDOpenClient performOpenOperationWithURL:bundleIdentifier:documentIdentifier:isContentManaged:sourceAuditToken:userInfo:options:delegate:completionHandler:]} Just in case, here is the relevant AppDelegate.cs part: public override bool OpenUrl(UIApplication app, NSUrl url, NSDictionary options) { var decodedOptions = new UIApplicationOpenUrlOptions(options); SLogger.LogDebug($"options == {SSilencer.Serialize(decodedOptions)}", true); var openInPlace = decodedOptions.OpenInPlace == true; var isScopedResource = url.StartAccessingSecurityScopedResource(); SLogger.LogDebug($"url == {url}; open in place == {openInPlace}; is scoped resource == {isScopedResource}", true); var urlAsString = url.ToString(); if(urlAsString.StartsWith("file://") && urlAsString.EndsWith(".vcf")) { var data = NSData.FromUrl(url, NSDataReadingOptions.Mapped, out var error); if(error == null) { /* This is where I'm using the data, stripped for clarity */ } else { SLogger.LogError("unable to read content of file; path == " + urlAsString + "; error == " + error.DebugDescription); } } if(isScopedResource) url.StopAccessingSecurityScopedResource(); return true; } From Info.Plist, I tried to change the "LSSupportsOpeningDocumentsInPlace" from true to false, also tried to use "UISupportsDocumentBrowser" true instead of "LSSupportsOpeningDocumentsInPlace", none of those made it. What could I've missed, I'm stuck on this issue for 2 days and I have no clue nor ideas anymore. Thanks for your assistance by advance.
0
0
1.5k
Aug ’22