我正在开发Apple Watch的iPhone应用程序扩展(用Swift运行WatchOS2.2,Xcode 7.3编写,在物理设备上测试)
我遇到了一个问题,我希望Apple Watch在调用以下函数的tel模式时没有提示/确认:
WKExtension.sharedExtension().openSystemURL(NSURL(string:"tel:1231231234"))
我没有调用telprompt函数,因为我的理解是Apple不直接支持它,但它似乎表现得好像是telprompt。有趣的是,telprompt不起作用。
我希望这可以在没有Apple Watch提示的情况下直接拨打电话号码,但是它首先提示用户在左上角显示取消按钮,中间的数字是屏幕和底部的呼叫按钮。 这似乎也没有在系统上进行本地化(例如法语),因此它始终显示取消和英语呼叫。
Image of Cancel, Number, and Call being prompted when French in the system language
还有其他人遇到过这个问题吗?我还没有在网上找到很多关于它的话题。或者这是一个已知的问题?同样,我没有看到任何报告的错误。
答案 0 :(得分:0)
Interestingly enough I was able to get the localization working.
The fix for it was that my Target for my Watch and WatchExtension needed to be checked off for my Launch Images (or splash screen images, or commonly left as "default.png"). Previously my Launch Images were for the app Target only.
I have no idea why the localization seemed to be require my launch images be added to the Watch and WatchExtension targets.
This did not resolve the prompting as it still took place - however since it was at least presenting the correct language this was good for us.