我们有一个新的应用程序正在尝试提交到应用程序商店(使用 TestFlight 进行预发布 beta 测试),但由于 UIWebView 的引用而收到无效的二进制消息:
TMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability.
我们遵循了 Xamarin 在此处提供的指南:https ://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/webview ? tabs = macos#uiwebview-deprecation-and-app-store -拒绝-itms-90809
我们有:
我还删除了我的包、bin 和对象文件夹,以确保我获得完整的构建,但在上传时继续收到此响应。
编辑:我在我的 MTOUCH 中添加了警告标志以查看它的使用位置,现在我确实看到了警告,所以它就在那里......某处。
添加警告代码:
--warn-on-type-ref=UIKit.UIWebView
我怎样才能找到哪个包正在使用 UIWebView 而不随意更新它们并希望能解决问题(没有其他意想不到的后果)?
编辑 #2:我按照下面的建议进行了 GREP 搜索 …
我正在基于我在XIB文件中创建的UITableViewCell原型构建一个表.单元格由几个标签和一个图像视图组成,需要拉伸以适应整个设备宽度.一旦拉伸宽度,我也想将高度拉伸到相同的比例,因此我的图像一致地缩放.
我的结果好坏参半.我已经能够使用以下代码适当地调整CELL的大小:
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
//pull the image from the array based on the indexPath
NSUInteger row = [indexPath row];
CITImage *image = [report.reportImages objectAtIndex:row];
UIImage *img = [UIImage imageWithData:image.imageData];
//see how we need to scale the image to make it fit within the full width of the screen
float scale = tableView.frame.size.width /img.size.width;
float imgHeight = img.size.height * scale;
//return the necessary cell height
return imgHeight;
}
Run Code Online (Sandbox Code Playgroud)
问题是单元格中的UIImageView没有正确调整大小.我正在使用以下代码设置单元格的属性,当它准备好绘制时:
-(UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
//pull …Run Code Online (Sandbox Code Playgroud) 我在Android应用中创建了一个自定义LabelRenderer,以在Xamarin Android应用中应用自定义字体(https://developer.xamarin.com/guides/xamarin-forms/user-interface/text/fonts/).
对于正常标签而言,一切都很有效,并且内容已添加到.Text属性中.但是,如果我使用.FormattedText属性创建标签,则不会应用自定义字体.
有人做过这样的成功吗?一个选项,因为我只是堆叠不同大小的文本行,是为每个文本使用单独的标签控件,但我更愿意使用格式化的字符串.
这是我的自定义渲染器的胆量:
[assembly: ExportRenderer (typeof (gbrLabel), typeof (gbrLabelRenderer))]
public class gbrLabelRenderer: LabelRenderer
{
protected override void OnElementChanged (ElementChangedEventArgs<Label> e)
{
base.OnElementChanged (e);
var label = (TextView)Control;
Typeface font = Typeface.CreateFromAsset (Forms.Context.Assets, "Lobster-Regular.ttf");
label.Typeface = font;
}
}
Run Code Online (Sandbox Code Playgroud)
这是我的简单标签控件......它所做的只是将字体应用到iOS,并将Android的字体应用到自定义渲染器.
public class gbrLabel: Label
{
public gbrLabel ()
{
Device.OnPlatform (
iOS: () => {
FontFamily = "Lobster-Regular";
FontSize = Device.GetNamedSize(NamedSize.Medium,this);
}
}
}
Run Code Online (Sandbox Code Playgroud)
仅适用于具有.Text属性的标签,但不适用于具有.FormattedText属性的标签.
我应该继续挖掘,还是仅仅堆叠我的标签,因为在这种情况下这是一个选项?
以下是我在格式化文本中尝试过的各种方法的示例,因为已请求:
var fs = new FormattedString ();
fs.Spans.Add (new Span { …Run Code Online (Sandbox Code Playgroud) xamarin ×2
xamarin.ios ×2
c# ×1
iphone ×1
resize ×1
uiimageview ×1
uitableview ×1
uiwebview ×1
xcode ×1