昨天我认识到有关parse.com库的大量警告:
紧急:所有bitcode都将被删除,因为'[path] /Parse.framework/Parse(PFAnalytics.o)'是在没有bitcode的情况下构建的.您必须在启用bitcode(Xcode设置ENABLE_BITCODE)的情况下重建它,从供应商处获取更新的库,或禁用此目标的bitcode.注意:将来这将是一个错误.
我知道我可以通过这个答案删除这些警告,但我现在想知道它是否会对AppStore提交和/或我的应用程序的实际性能产生任何负面影响.
Xcode告诉你有关bitcode的信息
激活此设置表示目标或项目应在编译期间为支持它的平台和体系结构生成bitcode.对于存档构建,将在链接二进制文件中生成bitcode以提交到应用商店.对于其他构建,编译器和链接器将检查代码是否符合bitcode生成的要求,但不会生成实际的bitcode.[ENABLE_BITCODE]
但是我没有从本文中获得任何真正有用的信息.
ENABLE_BITCODE真正做的,这将是未来的一个非强制性要求?我仍在努力应对承诺,但感谢社区在这里取得了一些进展.
我有一个简单的JS函数来查询Parse数据库.它应该返回结果数组,但显然由于查询的异步性质(因此是promises),函数在结果之前返回,留下一个未定义的数组.
我需要做些什么来使这个函数等待承诺的结果?
这是我的代码:
function resultsByName(name)
{
var Card = Parse.Object.extend("Card");
var query = new Parse.Query(Card);
query.equalTo("name", name.toString());
var resultsArray = [];
var promise = query.find({
success: function(results) {
// results is an array of Parse.Object.
console.log(results);
//resultsArray = results;
return results;
},
error: function(error) {
// error is an instance of Parse.Error.
console.log("Error");
}
});
}
Run Code Online (Sandbox Code Playgroud) 我有一个tableview,有时可能没有任何结果列出,所以如果没有结果(标签或一个表视图单元?),我想提出一些说"没有结果"的东西.
有最简单的方法吗?
我会尝试在label后面tableview根据结果隐藏其中一个,但是因为我正在使用a TableViewController而不是正常ViewController我不确定那是多么聪明或可行.
我也使用Parse和子类化为PFQueryTableViewController:
@interface TableViewController : PFQueryTableViewController
Run Code Online (Sandbox Code Playgroud)
我可以提供所需的任何其他详细信息,请告诉我!
TableViewController 故事板中的场景:

编辑: Per Midhun MP,这是我正在使用的代码
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
NSInteger numOfSections = 0;
if ([self.stringArray count] > 0)
{
self.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
numOfSections = 1;
//yourTableView.backgroundView = nil;
self.tableView.backgroundView = nil;
}
else
{
UILabel *noDataLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.tableView.bounds.size.width, self.tableView.bounds.size.height)];
noDataLabel.text = @"No data available";
noDataLabel.textColor = [UIColor blackColor];
noDataLabel.textAlignment = …Run Code Online (Sandbox Code Playgroud) 这只是一个更新,并没有改变任何与拒绝原因有关的事情.以下是决议中心的回复:
原因计划许可协议PLA 3.3.12
我们发现您的应用使用了iOS广告标识符,但未包含广告功能.这不符合App Store审查指南要求的iOS开发人员计划许可协议的条款.
具体而言,iOS开发人员计划许可协议的第3.3.12节规定:
"您和您的应用程序(以及您与之签约投放广告的任何第三方)可以使用广告标识符,以及通过使用广告标识符获得的任何信息,仅用于提供广告.如果用户重置广告标识符,您同意不会将之前的广告标识符和任何衍生信息与重置的广告标识符直接或间接地结合,关联,链接或以其他方式关联.
请检查您的代码 - 包括任何第三方库 - 以删除以下任何实例:
class:ASIdentifierManager
选择器:advertisingIdentifier
框架:AdSupport.framework如果您计划在将来的版本中加入广告,请从您的应用中删除广告标识符,直到您添加了广告功能.
要帮助找到广告标识符,请使用"nm"工具.有关"nm"工具的信息,请打开终端窗口并输入"man nm".
如果您无权访问库源,则可以使用"strings"或"otool"命令行工具搜索已编译的二进制文件."strings"工具列出了库调用的方法,"otool -ov"将列出Objective-C类结构及其定义的方法.这些技术可以帮助您缩小有问题的代码所在的位置.
我正在使用的第三方库是最新版本的parse.com sdk, latest version of flurry analytics, and version 2.2 of test flight.有谁知道哪个库是问题?谢谢
我一直在使用Parse SDK,我遵循了quickstep指南.当我尝试运行时,我得到了这8个错误.任何想法为什么?它看起来与Parse的Facebook部分有关,我没有使用它.
Undefined symbols for architecture armv7:
"_FBTokenInformationTokenKey", referenced from:
-[PFFacebookTokenCachingStrategy accessToken] in Parse(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setAccessToken:] in Parse(PFFacebookTokenCachingStrategy.o)
"_FBTokenInformationExpirationDateKey", referenced from:
-[PFFacebookTokenCachingStrategy cacheTokenInformation:] in Parse(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy expirationDate] in Parse(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setExpirationDate:] in Parse(PFFacebookTokenCachingStrategy.o)
"_OBJC_METACLASS_$_FBSessionTokenCachingStrategy", referenced from:
_OBJC_METACLASS_$_PFFacebookTokenCachingStrategy in Parse(PFFacebookTokenCachingStrategy.o)
"_OBJC_CLASS_$_FBSessionTokenCachingStrategy", referenced from:
_OBJC_CLASS_$_PFFacebookTokenCachingStrategy in Parse(PFFacebookTokenCachingStrategy.o)
"_FBTokenInformationUserFBIDKey", referenced from:
-[PFFacebookTokenCachingStrategy facebookId] in Parse(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setFacebookId:] in Parse(PFFacebookTokenCachingStrategy.o)
"_OBJC_CLASS_$_FBRequest", referenced from:
objc-class-ref in Parse(PFFacebookAuthenticationProvider.o)
"_OBJC_CLASS_$_FBSession", referenced from:
objc-class-ref in Parse(PFFacebookAuthenticationProvider.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed …Run Code Online (Sandbox Code Playgroud) 我正试图在手机上直接拍照后将图像文件上传到Parse.但它引发了一个例外:
由于未捕获的异常'NSInvalidArgumentException'终止应用程序,原因:'PFFile不能大于10485760字节'
这是我的代码:
在第一个视图控制器:
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if (segue.identifier == "getImage")
{
var svc = segue.destinationViewController as! ClothesDetail
svc.imagePassed = imageView.image
}
}
Run Code Online (Sandbox Code Playgroud)
在上传图像的视图控制器中:
let imageData = UIImagePNGRepresentation(imagePassed)
let imageFile = PFFile(name: "\(picName).png", data: imageData)
var userpic = PFObject(className:"UserPic")
userpic["picImage"] = imageFile`
Run Code Online (Sandbox Code Playgroud)
但我仍然需要将该照片上传到Parse.有没有办法减小图像的大小或分辨率?
从parse.com添加此代码后出现错误:
- (void)application:(UIApplication *)application
didReceiveRemoteNotification:(NSDictionary *)userInfo
fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
if (application.applicationState == UIApplicationStateInactive) {
[PFAnalytics trackAppOpenedWithRemoteNotificationPayload:userInfo];
}
}
Run Code Online (Sandbox Code Playgroud)
我真的不明白发生了什么,但我在日志中收到此警告:
您已实现 - [application:didReceiveRemoteNotification:fetchCompletionHandler:],但您仍需要将"remote-notification"添加到Info.plist中支持的UIBackgroundModes列表中.
我认为添加plist文件UIBackgroundModes - remote-notification可以解决问题,
但是,当我这样做时,它会改变以下内容:
Required Background Modes - > App downloads content in response to push notifications
我的应用程序没有这样做,所以我很困惑为什么我这样做首先.
我想从他/她的Facebook凭据创建一个用户,而不使用未记录的调用.基于两个已知原因,我认为基于Parse Javascript库的当前实现是不可能的:
1.库的当前实现不支持Appcelerator HTTP客户端,因此它立即失败.我通过扩展现有的Parse Javascript库的ajax方法来解决这个问题Appcelerator HTTP client.
http://www.clearlyinnovative.com/blog/post/34758524107/parse-appcelerator-titanium-the-easy-way
在我创建的幻灯片上有大约2K的视图,在博客文章中大致相同,所以我很清楚人们希望这个工作.
2.库的当前实现假设您正在与Facebook Javascript库集成,并且该库也不能与Appcelerator一起使用.事实上,Appcelerator已将Facebook直接集成到框架中,因此不需要javascript库.使用Appcelerator开发人员熟悉的API调用可以轻松获得将用户帐户链接到Facebook所需的所有信息.
原始问题已从Parse支持论坛中删除,因此我正在寻找更广泛社区的解决方案.
嗨,亚伦,
对于其他开发人员来说,在Parse库中使用未记录的API作为解决方法是没有帮助的,因此我决定将其取消列表.我知道它可能对您使用Titanium的特定情况有所帮助,并且您很清楚使用私有API的含义,但其他用户可能会忽略该警告.我希望你明白.
HéctorRamosSolutions Architect,Parse https://parse.com/help
这是太危险的代码,无法在论坛上显示:
// setting auth data retrieved from Ti.Facebook login
authData = {
"facebook" : {
"id" : Ti.Facebook.uid,
"access_token" : Ti.Facebook.accessToken,
"expiration_date" : expDate, // "format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
}
};
// Either way I resolved the problem, calling _handleSaveResult(true) on the returned user object,
// I just dont think it should have been as difficult as it was
// attempt …Run Code Online (Sandbox Code Playgroud) 当我点击登录Facebook按钮时,它正在打开safari浏览器并立即关闭.控制台上出现错误.
App委托方法:
func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool {
print("###### URL : ")
print(url)
print("###### App : ")
print(app)
print(options["UIApplicationOpenURLOptionsSourceApplicationKey"])
return FBSDKApplicationDelegate.sharedInstance().application(app, openURL: url, sourceApplication: options["UIApplicationOpenURLOptionsSourceApplicationKey"] as! String,
annotation: nil)
}
Run Code Online (Sandbox Code Playgroud)
2015-09-18 18:37:51.410 [21036:5050465] -canOpenURL: failed for URL: "fbauth2:///" - error: "(null)"
2015-09-18 18:37:51.417[21036:5050465] -canOpenURL: failed for URL: "fbauth2:///" - error: "(null)"
###### URL :
fb4554284912963222://authorize/?error_code=100&error_message=Invalid+Scope%3A+public&state=%7B%22challenge%22%3A%222ZmK6R5F05d%252F060TkCqj8SjPLjc%253D%22%2C%220_auth_logger_id%22%3A%223C79F2C8-61B9-470E-AE1B-E1C68435DB83%22%2C%22com.facebook.sdk_client_state%22%3Atrue%2C%223_method%22%3A%22sfvc_auth%22%7D&e2e=%7B%22init%22%3A145973.000512302%7D#_=_
###### App :
Optional(com.apple.SafariViewService)
nil
###### err:
Optional(Error Domain=com.facebook.sdk.core Code=8 "(null)" UserInfo={com.facebook.sdk:FBSDKGraphRequestErrorGraphErrorCode=100, com.facebook.sdk:FBSDKErrorDeveloperMessageKey=Invalid Scope: public, com.facebook.sdk:FBSDKGraphRequestErrorCategoryKey=0})
IDE:xcode 7 …
我正在使用parse.com进行开发,我将此问题升级到xCode 7.有些Parse框架没有完全正常工作.
我有这个警告:
紧急:所有bitcode都将被删除,因为'/Users/[MY_USER]/Downloads/parse-starter-project-1/ParseStarterProject/Parse.framework/Parse(PFMutableFileState.o)'是在没有bitcode的情况下构建的.您必须在启用bitcode(Xcode设置ENABLE_BITCODE)的情况下重建它,从供应商处获取更新的库,或禁用此目标的bitcode.注意:将来这将是一个错误.
让我提醒一下,Xcode 6的最新版本中一切正常
我想知道如何在XCODE 7中启用Bitcode?
parse-platform ×10
ios ×8
javascript ×2
objective-c ×2
swift ×2
xcode ×2
appcelerator ×1
bitcode ×1
facebook ×1
flurry ×1
frameworks ×1
promise ×1
testflight ×1
titanium ×1
uiimage ×1
uitableview ×1