小编spa*_*sas的帖子

Xcode 12.3:为 iOS 模拟器构建,但链接和嵌入式框架是为 iOS + iOS 模拟器构建的

我有一个使用链接和嵌入式自定义框架的应用程序。该应用程序在 Xcode 12.2 之前为 iOS 设备和模拟器正确构建。但是,从 Xcode 12.3 开始,我收到以下错误:

Building for iOS Simulator, but the linked and embedded framework 'My.framework' was built for iOS + iOS Simulator.

该框架是为设备和模拟器构建的(正如错误所说的那样)并使用 合并lipo,因此它应该能够在任何地方运行而不会出现问题。

我在这里错过了什么吗?Xcode 12.3 是否有任何相关更改?

ios lipo xcode12

152
推荐指数
4
解决办法
7万
查看次数

'UIAlertView'在iOS 9.0中已弃用.使用UIAlertController而不是UIAlertControllerStyleAlert的preferredStyle

我看到了更多的答案,但没有任何帮助.这是我的旧警报和行动

override func viewWillAppear(animated: Bool) {
    if Reachability.isConnectedToNetwork() == true {
        print("internet connection ok")
    } else 
    {
        print("internet not ok")
        let alertView: UIAlertView = UIAlertView(title: "Alert ", message: "connect to internet", delegate: self, cancelButtonTitle: "settings", otherButtonTitles: "cancel")
        alertView.show()
        return       
    }       
}

func alertView(alertView: UIAlertView, clickedButtonAtIndex buttonIndex: Int)
{
    if buttonIndex == 0 {
        //This will open ios devices wifi settings
        UIApplication.sharedApplication().openURL(NSURL(string: "prefs:root")!)
    }
    else if buttonIndex == 1
    {
        //TODO for cancel
        exit(0) 
    }
}
Run Code Online (Sandbox Code Playgroud)

在那我得到警告:

'UIAlertView'在iOS 9.0中已弃用.使用UIAlertController而不是UIAlertControllerStyleAlert的preferredStyle

我试过了 : …

uialertview ios swift uialertcontroller

33
推荐指数
3
解决办法
5万
查看次数

实例化MPVolumeView时,新的OutputDeviceUID为nil msg

今天,可能是由于在测试电话上升级到iOS 12.3的结果,当我第一次实例化自己的时,我现在在调试控制台中收到以下通知MPVolumeView

019-05-21 11:00:22.874353-0600 sports-audio-dj [3831:982163] [MediaRemote] OutputDeviceUID为n扬声器:(空)

我收到了大约10多个。

这是启动它的代码:

let volumeView = MPVolumeView(frame: self.view.bounds)
Run Code Online (Sandbox Code Playgroud)

我的代码没有更改,我在今天之前还没看过,想知道是否有人知道这是什么原因,如果现在不满意,我是否需要做任何事情。尽管有这些新通知,我的应用程序似乎仍能正常运行。

ios mpvolumeview

16
推荐指数
1
解决办法
2208
查看次数

java.io.IOException:不完整的HDFS URI,没有主机

当我的hadoop启动时,我收到以下错误.

错误org.apache.hadoop.hdfs.server.namenode.NameNode:java.io.IOException:不完整的HDFS URI,没有主机:hdfs://XX.XX.XX.XX:X000

在我的core-site.xml中,以下是配置

<property>
<name>fs.default.name</name>
  <value>hdfs://master_Server:9000/</value>
</property>
Run Code Online (Sandbox Code Playgroud)

我的群集处于独立模式.

java hadoop

12
推荐指数
1
解决办法
2万
查看次数

如何在 iOS 中设置警报消息的可访问性标签?

我有UIAlertController一个消息。我希望警报消息可访问性标签与警报消息字符串不同。

我怎样才能做到这一点?

ios voiceover uiaccessibility uialertcontroller

6
推荐指数
1
解决办法
2273
查看次数

sessionReachabilityDidChange未在watch上调用

我想让我的手表应用程序响应被杀死的手机上的父应用程序.当手表应用程序正在运行并且手机应用程序被杀死时,我得不到任何一个sessionReachabilityDidChange或的回叫sessionWatchStateDidChange.基于苹果文档:

调用此方法是为了让当前进程知道其对等会话的可达性已更改.

所以,似乎我应该得到一个回调.我在手表上将WCSession委托设置为我的班级.手表上的会话接收应用程序上下文的回调.为什么我没有获得可达性回调?

代码如下..

+ (SomeClass *)sharedInstance {
    static dispatch_once_t pred;
    static SomeClass *shared = nil;
    dispatch_once(&pred, ^{
        shared = [[SomeClass alloc] init];
        [Model sharedInstance].delegate = shared;
    });
    return shared;
}

#pragma mark - setup

- (void)initializeSession {
    if ([WCSession isSupported]) {
        WCSession *session = [WCSession defaultSession];
        session.delegate = self;
        [session activateSession];
        [self sync];
    }
}

-(BOOL) hasValidWCSession {
    return ([WCSession isSupported] && [WCSession defaultSession].isReachable);
}


#pragma mark - WCSessionDelegate

- (void)session:(nonnull WCSession *)session didReceiveApplicationContext:(nonnull NSDictionary<NSString …
Run Code Online (Sandbox Code Playgroud)

objective-c ios apple-watch watchos-2 wcsession

5
推荐指数
1
解决办法
1078
查看次数

Apple Watch基本本地化显示错误的默认语言

我有一个本地化的应用程序,有三种语言(简体中文,法语和捷克语),英语作为开发语言.

在此输入图像描述

虽然本地化在iPhone上完美运行,但Apple Watch存在一个问题:如果用户使用除英语/法语/中文/捷克语之外的任何其他语言设置了Watch语言,则内容将以中文而非英语显示(这应该是默认的).

根据本技术说明:

如果您的应用不支持用户首选语言,则iOS会选择与您应用的开发区域匹配的语言(CFBundleDevelopmentRegion).

注意:请务必CFBundleDevelopmentRegion为您的应用设置.如果采用基本本地化,请确保该值 CFBundleDevelopmentRegionBase.lproj文件夹中内容使用的语言相匹配.

我已经确认上述要求都得到满足(CFBundleDevelopmentRegion="en"所有Base.lproj文件确实都是英文).有什么我想念的吗?同样,这仅适用于Watch应用程序,而不适用于iPhone应用程序.

localization apple-watch xcode8

5
推荐指数
1
解决办法
398
查看次数