我在iOS 8中遇到了自动布局的主要问题.我正在使用自定义键盘,但我无法让视图以正确的高度显示.设备上呈现的视图太低,更像是单独的UIImageView的预期高度.我已经设置了约束,如图所示:

但是我一直在日志中得到这个错误,它没有告诉我任何事情(可能是因为我不明白在哪里看):
2014-12-06 19:56:45.095 [40268:12181198] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this:(1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x600000096940 V:[UIInputView:0x7fe780d3f600(246)]>",
"<NSLayoutConstraint:0x600000097390 'UIView-Encapsulated-Layout-Height' V:[UIInputView:0x7fe780d3f600(0)]>" …Run Code Online (Sandbox Code Playgroud) 我正在为我的应用制作今日小部件.我的小部件包含一个包含10个单元格的UITableView.(每个单元格的高度为50pt.)功能很简单.如果我触摸单元格上的按钮,则从sqlite重新加载DB并在单元格上显示它们.除了iPhone6 +之外,它在模拟器和iPhone 4s,5,5s,6上运行良好.我确实删除了小部件并再次添加了10次,但这对我没有帮助.我确实检查过记忆和僵尸.但是在约10M下稳定并且没有泄漏.我怎样才能解决我的问题?
我正在考虑将所有数据存储在应用程序组的容器区域中,以创建支持 AppExtensions 的应用程序。
在iOS8上将所有数据存储在App Groups的容器区域中是否有任何弱点?我应该在应用程序组的容器区域中存储有限的数据吗?
我正在处理我的应用程序,没有更改任何设置或窗格,我尝试在大约两周后归档构建,但它失败了.然后我尝试调试构建(正常的Cmd + R),但它失败并出现错误:
ld: library not found for -lPods-AFNetworking
我已经尝试过pod install很多次了.我已经尝试删除与pods相关的所有内容(而不是Podfile本身)并再次创建pod install/ pod update.徒劳无功.
这是我的Podfile:
platform :ios, '8.0'
link_with 'MY_APP_NAME_REDACTED'
pod 'Parse', '1.7.4'
pod 'ParseFacebookUtils', '1.7.4'
pod 'ParseCrashReporting', '1.7.4'
pod 'GPUImage'
pod 'AFNetworking'
pod 'IntentKit'
inhibit_all_warnings!
Run Code Online (Sandbox Code Playgroud)
我没碰过它,直到今天早上一直工作.现在,在我尝试过的所有内容之后,经过一次干净的重新安装,我得到了:
Lexical or preprocessor issue: 'Parse/Parse.h' file not found 在我的应用程序扩展中(我的应用程序本身似乎没有问题).
我不知道构建系统如何能够完全没有任何东西有效地"自毁"自己.我没有做任何pod更新,pod安装,我没有触及Podfile,我没有更改我的项目中的任何配置设置等.我只是编写代码,当我尝试存档我的项目发送给beta测试人员它打破了.
如果我更改我的podfile并将我的共享扩展名添加到link_with:
platform :ios, '8.0'
link_with 'MY_APP_NAME_REDACTED', 'Share Extension'
pod 'Parse', '1.7.4'
pod 'ParseFacebookUtils', '1.7.4'
pod 'ParseCrashReporting', '1.7.4'
pod 'GPUImage'
pod 'AFNetworking'
pod 'IntentKit'
inhibit_all_warnings!
Run Code Online (Sandbox Code Playgroud)
然后我收到一些警告和错误.
Pods …Run Code Online (Sandbox Code Playgroud) 到目前为止,我遇到过这样的情况,您可以使用 openURL: 方法从扩展程序启动嵌入应用程序,但是有没有办法实现相反的目标?
我很想知道是否可以在我的容器应用程序中做一些事情来创建一个 MSMessage 实例并启动我的 iMessage 应用程序扩展。这是可行的吗?
我正在开发一个带有被阻止号码数据库的应用程序。在我的beginRequest方法中,我正在异步连接到我的在线数据库并调用context.completeRequest()完成块。这个方法什么时候调用?Apple 文档对我来说不清楚 - 可以多次调用吗?主要原因是使设备中被阻止的号码列表与我的数据库保持同步。
所以问题:
CallKit 目录处理程序中是否提供异步请求?
beginRequest方法是否被多次调用?
如何在我的应用程序之外创建像弹出窗口这样的扩展程序,以便在不进入我的应用程序的情况下报告垃圾邮件?就像这里的第三个屏幕截图。
我正在开发一个使用 OneSignal 集成推送通知的 iOS 应用程序。我遵循了 iOS SDK 设置指南,一切顺利,但由于我进行了最新的 xcode 更新和 macos 更新,我无法构建要发布的应用程序或仅在物理设备上构建应用程序。
我收到有关对 OneSignal 扩展进行代码签名的以下错误:
仅供参考:主要目标的捆绑包标识符是com.example.ios.app
CodeSign /Users/myUser/Library/Developer/Xcode/DerivedData/myApp-detsaukwwypeutcadzxgviircfje/Build/Intermediates.noindex/ArchiveIntermediates/myApp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/OneSignalNotificationServiceExtension.appex
cd /Users/pathToProject
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
Signing Identity: "iPhone Developer: Me (##########)"
Provisioning Profile: "iOS Team Provisioning Profile: com.example.ios.app.OneSignalNotificationServiceExtension"
(######-####-####-####-######)
/usr/bin/codesign --force --sign E7160941E1D4E45D870F30CB31F3EC30BFB0ABBA --entitlements /Users/myUser/Library/Developer/Xcode/DerivedData/myApp-detsaukwwypeutcadzxgviircfje/Build/Intermediates.noindex/ArchiveIntermediates/myApp/IntermediateBuildFilesPath/myApp.build/Release-iphoneos/OneSignalNotificationServiceExtension.build/OneSignalNotificationServiceExtension.appex.xcent --timestamp=none /Users/myUser/Library/Developer/Xcode/DerivedData/myApp-detsaukwwypeutcadzxgviircfje/Build/Intermediates.noindex/ArchiveIntermediates/myApp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/OneSignalNotificationServiceExtension.appex
/Users/myUser/Library/Developer/Xcode/DerivedData/myApp-detsaukwwypeutcadzxgviircfje/Build/Intermediates.noindex/ArchiveIntermediates/myApp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/OneSignalNotificationServiceExtension.appex: unknown error -1=ffffffffffffffff
Command /usr/bin/codesign failed with exit code 1
Run Code Online (Sandbox Code Playgroud)
我做了一些研究,但没有发现任何有帮助的东西。
我的应用程序使用自定义类作为其数据模型:
class Drug: NSObject, NSCoding {
// Properties, methods etc...
}
Run Code Online (Sandbox Code Playgroud)
我刚刚创建了一个 Today 扩展,需要从中访问用户的数据,所以我使用 NSCoding 将我的数据保存在应用程序容器和共享容器中。这些是主应用程序中的保存和加载功能:
func saveDrugs() {
// Save to app container
let isSuccessfulSave = NSKeyedArchiver.archiveRootObject(drugs, toFile: Drug.ArchiveURL.path)
if isSuccessfulSave {
print("Drugs successfully saved locally")
} else {
print("Error saving drugs locally")
}
// Save to shared container for extension
let isSuccessfulSaveToSharedContainer = NSKeyedArchiver.archiveRootObject(drugs, toFile: Drug.SharedArchiveURL.path)
if isSuccessfulSaveToSharedContainer {
print("Drugs successfully saved to shared container")
} else {
print("Error saving drugs to shared container")
}
}
func loadDrugs() …Run Code Online (Sandbox Code Playgroud) nskeyedarchiver ios nskeyedunarchiver swift ios-app-extension
我正在用 Swift 制作一个图像分类 iOS 应用程序。
当我写
guard let model = try? VNCoreMLModel(for: SqueezeNet().model) else { return }
Run Code Online (Sandbox Code Playgroud)
我收到了这个警告。
'init()' is deprecated: Use init(configuration:) instead and handle errors appropriately.
Run Code Online (Sandbox Code Playgroud)
你知道如何摆脱它吗?
我正在开发一个比特币今日扩展,由于某种原因,该控件有一个偏移量.以下是目前的情况:http://i.imgur.com/KxeXePS.png
如您所见,按钮几乎不在屏幕上,标签不在左侧.
我的故事板如下:http://i.imgur.com/6vtfNGJ.png
我尝试过设置多种约束,但似乎都没有解决问题.我不确定我可以添加哪些其他信息,但如果您对该项目有任何疑问,我可以回答.