我尝试将我的应用程序升级到iOS 8.应用程序在iOS 7和iOS 6(在我的iPhone和iPad中)运行完美.
但在iOS 8 NOT(iPhone 6模拟器).
而不是iPhone 5模拟器和任何iPhone模拟器(Xcode 6.0)
我只是尝试发送邮件.
MFMailComposeViewController *mailComp = [[MFMailComposeViewController alloc]init];
[mailComp setMailComposeDelegate:self];
if ([MFMailComposeViewController canSendMail]) {
[mailComp setSubject:@"Subject test"];
[mailComp setMessageBody:@"Message body test" isHTML:NO];
[self presentViewController:mailComp animated:YES completion:nil];
}
- (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error {
if (error) {
// Error handling
}
[self dismissViewControllerAnimated:NO completion:nil];
}
Run Code Online (Sandbox Code Playgroud)
错误消息:
不是有效的电子邮件地址.
ViewServiceDidTerminateWithError:Error Domain = _UIViewServiceInterfaceErrorDomain Code = 3"无法完成操作.
{Message =服务连接中断}
我观察到在iPhone 6模拟器中你无法创建一个GMail帐户,但我创建了一个iCloud邮件帐户(我认为是新功能)
我不知道这是不是问题.拜托,在这种情况下有人吗?
在Xcode 6中:NSUserDefaults
在设备模拟器(iPhone 5,iPhone 6等,模拟器)中不起作用.
如果您在真实设备上进行测试,它可以完美运行.有人知道如何将此信息发送给Apple?我曾尝试联系Apple,但我没有收到答复.
我无法在真正的iPhone6或iPhone6 Plus上进行测试,因为在我的国家还没有.
我的代码(是一个例子)在设备上运行良好:
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSString *appTheme = [defaults objectForKey:@"theme_preference"];
if ([appTheme isEqualToString:@"color0"]) {
} else {
}
Run Code Online (Sandbox Code Playgroud)
可能,我没有表达清楚.
用户在"iPhone o iPad设置"中必须更改应用程序的设置参数.
设置由"Settings.bundle"的"Root.plist"实现.
也就是说,我尝试测试用户更改应用程序的参数.但在源代码中我没有看到这些变化.我总是谈论设备模拟器(Xcode6)
我正在尝试将我的应用程序更新到 Xcode 10 (iOS 12),编辑器向我显示了很多这样的警告消息:
由于属性“imageView”为“弱”,实例将立即被释放
所有这些警告(我有很多,真的,真的很多)都出现在 UIImageView 出口中。
@IBOutlet weak var imageView : UIImageView!
let logo = UIImage(named: "Cartoon.png")
imageView = UIImageView(image:logo)
Run Code Online (Sandbox Code Playgroud)
警告出现在此类行中:
imageView = UIImageView(image:logo)
Run Code Online (Sandbox Code Playgroud)
一些想法?