切换到xcode 8 beta后,我的推送通知已停止工作.
我的发布代码签名标识设置为分发.我正在注册设备,接收令牌并成功上传到我的服务器没有任何问题.但推送消息的状态失败.
只是想知道我是否需要进行任何更改,或者它是否不适用于测试版的xcode.
是否存在针对值(对于组件:Calendar.Component)而言似乎已损坏的解决方法?还是动态调用属性版本的方法?
func dateComponentsValueShouldBeNil() {
let dateComponents = DateComponents(month: 3)
debugPrint("Month", dateComponents.month) // "Month" Optional(3)
debugPrint("Property", dateComponents.hour) // "Property" nil
debugPrint("Enumeration", dateComponents.value(for: .hour)) // "Enumeration" Optional(9223372036854775807)
}
Run Code Online (Sandbox Code Playgroud) 每次我在Xcode模拟器中运行我的应用程序时,我的控制台都会填写这些消息.有谁知道这意味着什么,或者我怎么能摆脱它?
这是完整的信息:
2016-09-14 19:28:51.042 SpaceGameDeluxe [3182:49139] SKUtil.m:MGGetBoolAnswer在模拟器中不可用.
我想实现TapGestureRecognizer与selector,下面是我添加tapGestureRecognizer到我的代码imageView
let tapFirstGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(assignImage(_:)))
firstImageView.isUserInteractionEnabled = true
firstImageView.tag = 1
firstImageView.addGestureRecognizer(tapFirstGestureRecognizer)
Run Code Online (Sandbox Code Playgroud)
这是动作方法
func assignImage(_ sender: UIImageView){
imagePicker.allowsEditing = false
imagePicker.sourceType = .photoLibrary
imageViewTag = sender.tag
present(imagePicker, animated: true, completion: nil)
}
Run Code Online (Sandbox Code Playgroud)
编译器一直在说
[UITapGestureRecognizer标签]:无法识别的选择器发送到实例0x6080001a7700'
ios unrecognized-selector uitapgesturerecognizer swift3 xcode8
我正在尝试在iPhone 7 Plus模拟器上运行应用程序(使用Xcode 8.0),但是通过提示警报而失败 “The request to open bundle-id failed. SpringBoard was unable to service the request.”
我经常得到这个(三个版本中两次).我找到的唯一解决办法是Quit Xcode and Simulator and rebuild app (not worthy).
任何其他修复?
我正在做一个项目Swift 3- xcode 8,我正在尝试使用核心数据来保存并在数据库表"用户"中显示一些图像.此图片是其个人资料中的用户照片.
现在我已经设法保存字符串并从核心数据中显示它们,但我在处理图像时遇到了问题.
这是我到目前为止:
将USERS添加到核心数据中
func addUser() {
let app = UIApplication.shared.delegate as! AppDelegate
let context = app.persistentContainer.viewContext
let request = NSFetchRequest<NSFetchRequestResult>(entityName: "Users")
request.returnsObjectsAsFaults = false
let newUser = NSEntityDescription.insertNewObject(forEntityName: "Users", into: context)
if (firstName.text == "" && lastName.text == "" && contact.text == "" && email.text == "") { //if we have a user profile delete it
deleteUser()
} else { // add a new user profile
newUser.setValue(firstName.text, forKey: "firstName")
newUser.setValue(lastName.text, forKey: "lastName")
newUser.setValue(contact.text, …Run Code Online (Sandbox Code Playgroud) 我看到6.0的类似问题
在Xcode5.1中构建一个项目,该项目在Xcode 6 GM中进行了修改,用于测试旧版本的iOS
解决方案是查看故事板源并查找约束设置到边距的位置而不是超视图并更改它.我查看了8.0a中的源代码并搜索了约束但没有找到任何约束.
还有其他东西可以抛出这个错误吗?
我遇到了Travis构建和测试我正在开发的新ios应用程序的问题.
language: objective-c
os: osx
osx_image: xcode8
before_install:
- pod repo update > /dev/null
- pod update
- gem install xcpretty
script:
- xcodebuild clean test -workspace project.xcworkspace -scheme project -destination "platform=iOS Simulator,name=iPhone 6" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO
Run Code Online (Sandbox Code Playgroud)
这是我的.travis.yml,每次我运行Travis都会给我这个错误:
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ platform:iOS Simulator, OS:latest, name:iPhone 6 }
Ineligible destinations for the "project" scheme:
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Generic iOS Simulator Device }
The command …Run Code Online (Sandbox Code Playgroud) 当我使用我的开发者帐户时,我在Xcode 8中收到此消息.
您的会话已过期.请登录.
使用另一个Apple ID可行.此外,当登录到developer.apple.com时,一切都还可以.我没有问题登录.我怎样才能解决这个问题?
我在使用Xcode 8.3.3(8E3004b)和Swift 3.1进行编译时收到此错误:
编译日志的结尾如下所示:
Copy Swift standard libraries into app
CopySwiftLibs /Users/.../Library/Developer/Xcode/DerivedData/.../Build/Intermediates/ArchiveIntermediates/.../InstallationBuildProductsLocation/Applications/...
cd /Users/.../Desktop/...
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
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"
export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk
builtin-swiftStdLibTool --copy --verbose --sign 5E5A51CAC2539864509F6653B0DC104FE3A518D1 --scan-executable /Users/.../Library/Developer/Xcode/DerivedData/.../Build/Intermediates/ArchiveIntermediates/.../InstallationBuildProductsLocation/Applications/.../... --scan-folder /Users/jpower/Library/Developer/Xcode/DerivedData/TAFIPS-cdqhmsienumzxcdzytsdwwwawavl/Build/Intermediates/ArchiveIntermediates/.../InstallationBuildProductsLocation/Applications/.../Frameworks --scan-folder /Users/.../Library/Developer/Xcode/DerivedData/.../Build/Intermediates/ArchiveIntermediates/.../InstallationBuildProductsLocation/Applications/.../PlugIns --scan-folder /Users/.../Desktop/.../Carthage/Build/iOS/Alamofire.framework --scan-folder /Users/.../Desktop/.../Carthage/Build/iOS/ObjectMapper.framework --platform iphoneos --toolchain /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain --destination /Users/.../Library/Developer/Xcode/DerivedData/.../Build/Intermediates/ArchiveIntermediates/.../InstallationBuildProductsLocation/Applications/.../Frameworks --unsigned-destination /Users/.../Library/Developer/Xcode/DerivedData/.../Build/Intermediates/ArchiveIntermediates/.../BuildProductsPath/SwiftSupport
Run Code Online (Sandbox Code Playgroud)
奇怪的是,当我使用Xcode 9.0 beta(9M136h)和Swift 3.2编译时,我没有这个错误,我也可以在今天之前建立成功.
希望有人能提供帮助.
xcode8 ×10
swift3 ×5
ios ×3
xcode ×3
ios10 ×2
swift ×2
apple-id ×1
code-signing ×1
springboard ×1
sprite-kit ×1
storyboard ×1
travis-ci ×1