这是我的第一个iOS应用程序,专为iPhone设计,而不是iPad,但显然苹果不会把它放在他们的商店,除非它也可以在iPad上运行。我完全失去了如何“修复”这个问题。我到处寻找建议,没有尝试过任何工作(包括StackOverflow)。我可以在iPad模拟器中运行该应用程序并获得与Apple相同的结果,但似乎无法找到修复程序。这非常令人沮丧,尤其是当人们认为这款应用无法在iPad上运行时,因为它需要访问蜂窝网络。
我正在使用最新的Xamarin for Visual Studios,而我正在使用Visual Studios 2013.在Info.plist或其他任何地方都没有提到iPad
有人有任何建议吗?
R / 普雷斯科特......
答案 0 :(得分:0)
You are receiving this from Apple because you might have indicated your app is an Universal App.
To indicate your application will only run on iPhones you need to set this in the info.Plist file if using Xamarin Studio. When using Visual Studio this is in the project properties. The option is called "Devices" make sure you select iPhone/iPod from the dropdown list.
Device selection in VS2017 I know you said you are using 2013 but this might give you an idea.
答案 1 :(得分:0)
所有
Apple要求应用程序在所有iOS平台上运行。因此,我不得不在我的故事板上添加约束来调整每个屏幕上子视图的位置。因为添加每个约束是单调乏味的,所以我使用了Cirrious Fluent Layout,它对我来说非常有效。下面是我在屏幕上使用的包含imageview的代码。这是“修复”最复杂的屏幕,因为(显然)图像以某种方式改变了所有屏幕尺寸,作为iOS开发人员的新手,我不知道为什么这样做,只是它确实如此。
首先我需要添加引用:
using Cirrious.FluentLayouts.Touch;
代码:
//This line is required to turn off all autosizing/positioning
View.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();
// Get the screen dimensions and the middle of the screen
// for button positioning
var barheight = this.NavigationController.NavigationBar.Bounds.Height;
// Height of the navigation bar
var height = UIScreen.MainScreen.Bounds.Height;
var width = UIScreen.MainScreen.Bounds.Width;
int middle = (int) UIScreen.MainScreen.Bounds.Width / 2;
// We cast to int to truncate float,
// int will convert implictly to float when used (Visual Studio).
var heightavailabletoimageviw = height -74 - 47 - 26 - 60;
// 74 is the height of the banner, 47 is the height of the buttons and
// 26 is the height of the title label plus a 5px gap The rest of the
// screen is available for use by the image view,
// set heightavailabletoimageviw to this value
// Had to subtract 60 because the image view still overlapped
// the buttons, no idea why. Anyone?
// Had to add a constraint to the imageview because if I didn't
// it automatically scaled to the size of the image, not good.
ThePhoto.AddConstraints(
ThePhoto.Width().EqualTo(UIScreen.MainScreen.Bounds.Width),
ThePhoto.Height().EqualTo(heightavailabletoimageviw)
);
// Had to fix the size of the imagebutton otherwise the button size
// scaled to the size of the image
btnPhoto.AddConstraints(
btnPhoto.Width().EqualTo(62f),
btnPhoto.Height().EqualTo(47f)
);
// Now we add the constraints to the viewcontroller to finish up.
View.AddConstraints(
// Can't cover the navigation bar (unless it isn't there, mine is),
// this value sets all other relative positions
Banner.AtTopOf(View, barheight),
Banner.AtRightOf(View, 0),
Banner.AtLeftOf(View, 0),
lblTitle.Below(Banner, 0),
lblTitle.WithSameWidth(Banner),
ThePhoto.Below(lblTitle, 5),
ThePhoto.WithSameWidth(lblTitle),
// I have no idea why, but I had to use negative
// values for the buttons to appear on the screen,
// otherwise they were off screen.
// If anyone could explain this, I would appreciate it.
btnUpload.AtBottomOf(View),
btnUpload.ToLeftOf(View,-60),
// Same here, had to use negative values for button to
// position correctly on the screen
btnPhoto.AtBottomOf(View),
btnPhoto.ToLeftOf(View,-(middle + 31)),
// Again, same thing.
btnMainMenu.AtBottomOf(View),
btnMainMenu.ToRightOf(View,-80)
);
这就是我解决问题的方法,我重新提交了该应用,现在它出现在应用商店:https://itunes.apple.com/us/app/oml-photo-manager/id1212622377?mt=8。
希望这有助于某人......
R / 普雷斯科特......