使用Xcode 8+并创建新的空白项目时,运行应用程序时会显示以下日志:
2016-06-13 16:33:34.406093 TestiOS10[8209:100611] bundleid: com.appc.TestiOS10, enable_level: 0, persist_level: 0, propagate_with_activity: 0
2016-06-13 16:33:34.406323 TestiOS10[8209:100607] Created DB, header sequence number = 248
2016-06-13 16:33:34.409564 TestiOS10[8209:100611] subsystem: com.apple.UIKit, category: HIDEvents, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0
2016-06-13 16:33:34.504117 TestiOS10[8209:100607] Created DB, header sequence number = 248
2016-06-13 16:33:34.548023 TestiOS10[8209:100607] subsystem: com.apple.BaseBoard, category: MachPort, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0
2016-06-13 …Run Code Online (Sandbox Code Playgroud) 使用Xcode 9时,有一些编译器警告说This function declaration is not a prototype.它建议添加void到方法体,它将解决它.我遇到的问题是,系统API也会抛出那些警告,就像UIApplication委托方法一样:
- (void)application:(UIApplication *)application
handleActionWithIdentifier:(NSString *)identifier
forRemoteNotification:(NSDictionary *)userInfo
withResponseInfo:(NSDictionary *)responseInfo
completionHandler:(void (^)())completionHandler
Run Code Online (Sandbox Code Playgroud)
这可以通过以下方式解决:
- (void)application:(UIApplication *)application
handleActionWithIdentifier:(NSString *)identifier
forRemoteNotification:(NSDictionary *)userInfo
withResponseInfo:(NSDictionary *)responseInfo
completionHandler:(void (^)(void))completionHandler
Run Code Online (Sandbox Code Playgroud)
现在我想知道委托方法是否仍然可以长期运行,或者Apple会void在以后的iOS 11 Beta版本中插入.我很好奇,因为如果我包含void身体,Xcode会抱怨不匹配的方法选择器(这是有道理的).到目前为止,有人遇到过同样的问题吗?
iOS 11 Beta 1几乎为所有系统应用程序使用增加的导航栏标题(它开始在iOS 10和音乐应用程序中执行此操作).我想知道Apple是否有iOS 11的公共API,或者它现在是否会保密.
行为是标题具有增加的字体大小,左对齐并且一旦用户向下滚动就会移动到导航栏.我在这里的消息应用程序中附加了一些显示此行为的屏幕.
虽然我无法找到任何的参考UINavigationController和UINavigationBar到目前为止,也许有人知道一些细节!
我想知道我们如何检查UIFeebackGenerator当前设备上是否有新的iOS 10 API .还有一些我们需要检查的事情:
前两个检查可以使用#available(iOS 10, *)语句和(hacky)设备检测来实现,但后者似乎不可检查.
有人知道这方面的解决方案吗?或许我们需要为此提交Apple Radar.谢谢!
我想知道LAContext来自LocalAuthentication框架的实例的生命周期在iOS 8中是怎样的.
在iOS 9及更高版本中,有invalidate一种手动使当前上下文无效的方法.如果我没有使用该方法,则LAContext实例仍将处于活动状态并存储评估状态.可以说我可以在使用后简单地将其释放/释放,但我需要跨功能的实例来执行其他操作,例如验证其可用性以及invalidate在VC的不同点启用该方法.这也发生在iOS 8上吗?我会问Apple,因为文档没有澄清这一点,但我想事先找出更多的想法.
感谢大家!
我正在测试iPhone X上的图像启动屏幕并遇到一种奇怪的行为.所以我想在打开雷达之前要求一些反馈意见:
我创建了一个具有尺寸1125 x 2436 Pixel(纵向)和2436 x 1125 Pixel(横向)的纵向和横向发射屏幕.然后我将它们添加到资产目录中并正确地拾取它们:

到现在为止还挺好.然后我在iPhone X模拟器上运行应用程序(我之前重置了应用程序以确保没有任何缓存)并显示(拉伸)横向图像.
我验证了png源具有有效的非alpha背景,但仍然无法显示正确的启动屏幕.我注意到肖像图像甚至没有复制到最终产品中:
所以这可能暗示了Xcode 9的问题.任何反馈都非常受欢迎,谢谢你们!
编辑:侧注:从资产目录中删除横向图像时,将复制并正确拾取纵向图像.
更新 09/29/2017:Apple确认它确实是Xcode中的一个问题,它将被提供给相关的工程团队.
我希望iOS11版本能解决无声推送问题,这是最新的测试版和通用版iOS版.
目前我很难理解,为什么我没有收到任何静音推送消息,这实际上应该唤醒我的应用程序以在后台执行一些所需的任务.
在iOS 10中,我只使用后台获取功能,并在我的AppDelegate中实现了"唤醒代码",如下面的代码所示.
在iOS 11中,注册代码仍然正常工作,我的后端也向Apples DEV服务器(沙箱)和PROD服务器(生产版本)提供推送通知.不幸的func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void)是,静音推送通知从不调用该函数.
我真的错过了iOS 11的东西吗?
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
// .. some variables here ...
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// register silent push notification in backend
application.registerForRemoteNotifications()
// ... some code here ...
// Set Background Fetch Intervall for background services / terminated app
UIApplication.shared.setMinimumBackgroundFetchInterval(UIApplicationBackgroundFetchIntervalMinimum)
// ... some code here ... …Run Code Online (Sandbox Code Playgroud) 如果未在客户端的io.connect()函数中指定端口,客户端将侦听哪个端口?
例如:
var socket = io.connect('http://example.com/'); // listening to port 80?
Run Code Online (Sandbox Code Playgroud)
我问的原因是因为我在heroku上部署了这个应用程序的服务器端.前端是IOS应用程序.我用于前端的目标C socketIO库(https://github.com/pkyeck/socket.IO-objc)要求我指定一个端口.但是我不确定我应该听哪个端口,因为这在服务器端不是静态的.
我用javascript编写客户端程序进行测试,当我没有指定端口时它可以工作.
任何帮助将非常感激.
我开始玩Appcelerator Hyperloop了.虽然从第0天开始从JS访问本机API似乎很棒,但它确实引发了一些关于平台架构和性能的问题.
目前(AFAIK)Titanium应用程序具有主UI线程(运行本机UI控制器)和JS线程(运行JS逻辑).从JS到Native的每次调用都通过"Bridge"(这是应用程序中的扩展操作)传递.
此外,Titanium API并未尽可能多地涵盖所有本机API和摘要.但是,如果引入新API,Appcelerator可能需要一段时间才能将这些API实施到平台中.
我最喜欢Titanium的一个方面就是能够扩展它(使用iOS的Objective-c和Android的java) - 允许使用Titanium未涵盖的原生API,并在需要时开发真正的本机性能控件为JS做任何太"沉重"的事情.并且,如上所述,它为每个平台开发了100%原生.
既然Appcelerator引入了Hyperloop我已经完成了一个简单的测试应用程序,并发现Hyperloop没有被翻译成本机代码而只是普通的JS代码:
var UILabel = require('hyperloop/uikit/uilabel');
var label = new UILabel();
label.text = "HELLO WORLD!";
$.index.add(label);
Run Code Online (Sandbox Code Playgroud)
另一件事是你必须在主线程上运行.
因此,就Hyperloop架构而言,我们基本上会想到一些事情:
没有太多关于Hyperloop的文档或文章解释了内部工作 - 所以如果有人有任何答案一直在尝试使用它可能会非常有帮助.
titanium appcelerator appcelerator-titanium appcelerator-hyperloop hyperloop
我试图在我的appcelerator项目中使用Google-Mobile-Ads-SDK,因为ti.admob(https://github.com/appcelerator-modules/ti.admob)似乎不支持奖励广告.所以我在顶部项目目录中创建了一个Podfile:
install! 'cocoapods',
:integrate_targets => false
platform :ios, '7.0'
target 'my app' do
use_frameworks!
pod 'Google-Mobile-Ads-SDK', '7.15'
end
Run Code Online (Sandbox Code Playgroud)
(我无法使用最新版本的pod,Xcode保留了一些类型声明问题 - 这个编译好了.)
然后我使用了这个库,如下所示:
var GADRequest = require('GoogleMobileAds/GADRequest');
var GADRewardBasedVideoAd = require('GoogleMobileAds/GADRewardBasedVideoAd');
var instance = GADRewardBasedVideoAd.sharedInstance();
if (!instance.isReady()) {
var request = new GADRequest();
instance.loadRequest(request, Alloy.CFG.rewardedadid);
}
Run Code Online (Sandbox Code Playgroud)
并且代码失败并出现错误:
TypeError: undefined is not a function
(evaluating 'instance.loadRequest(request, Alloy.CFG.rewardedadid)')
Run Code Online (Sandbox Code Playgroud)
查看相应的生成的.js文件./build/hyperloop/ios/js/googlemobileads/gadrewardbasedvideoad.js,我注意到GADRewardBasedVideoAd.h除了for之外的所有内容都会生成实例方法和属性的函数签名loadRequest().标题条目loadRequest()是:
- (void)loadRequest:(GADRequest *)request withAdUnitID:(NSString *)adUnitID;
Run Code Online (Sandbox Code Playgroud)
与此唯一明显的区别是它使用了一个命名参数.这种方法有什么特别之处吗?我做错了什么或者Hyperloop还没有支持这样的功能吗?
titanium appcelerator appcelerator-titanium appcelerator-hyperloop hyperloop
嗨,我已经尝试了appcelerator团队建议的解决方法(用于处理6.0.0版中对ti.include的弃用)
function include(file) {
return eval(Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, file).read().text);
}
Run Code Online (Sandbox Code Playgroud)
我得到一个错误,可能是系统无法读取文件。错误是:
[错误]:TiBlob:java.io.FileNotFoundException:资源/下划线-min.js
我已经设法通过.getDirectoryListing()列出了目录文件,但找不到该文件,实际上我在那里找不到任何.js文件。
有什么建议么?
ios ×6
ios11 ×4
appcelerator ×3
ios10 ×3
titanium ×3
xcode ×3
hyperloop ×2
xcode9-beta ×2
filesystems ×1
heroku ×1
include ×1
iphone ×1
iphone-x ×1
lacontext ×1
lifetime ×1
logging ×1
node.js ×1
objective-c ×1
silentpush ×1
socket.io ×1
swift ×1
touch-id ×1
xcode8 ×1