Failed to create provisioning profile.
The app ID "com.example.hello" cannot be registered to your development team.
Change your bundle identifier to a unique string to try again.
Run Code Online (Sandbox Code Playgroud)
这是我在“签名”>“团队(个人团队)”团队中选择自己的用户帐户时在Xcode中收到的消息。我正在尝试构建一个示例应用程序(Cordova)。如果更改捆绑软件ID,我可以摆脱此错误,但是我不接受该解决方法。我需要能够使用其自己的捆绑包ID构建示例项目...
我正在使用NSFetchedResultsController.以前我有类似的问题,当数据库没有tableview的条目,但后来创建一个,我发现必须至少有一个部分,所以我修复了.但是现在它崩溃了,例如我有两个部分,每个部分有一行,我删除了一行,所以部分应该消失 - >崩溃.它表示更新前的部分数(2)不等于删除的数量(0).
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
// Return 1 if the fetchedResultsController section count is zero
return [[fetchedResultsController sections] count] ? : 1;
}
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
// check if we really have any sections in the managed object:
if (!fetchedResultsController.sections.count) return @"Persoonlijk";
id <NSFetchedResultsSectionInfo> sectionInfo = [[fetchedResultsController sections] objectAtIndex:section];
return [sectionInfo name];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
// check if we really have any sections in the managed object:
if (!fetchedResultsController.sections.count) return 0;
id …Run Code Online (Sandbox Code Playgroud) 我的问题:重复NSFetchRequest使用Core Data进行多次不同的提取有什么不好吗?
示例代码:
NSFetchRequest *request = [[NSFetchRequest alloc] init];
NSEntityDescription *logEntity = [NSEntityDescription entityForName:@"LogEntry" inManagedObjectContext:context];
[request setEntity:logEntity];
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"dateTimeAction" ascending:NO]; // ascending NO = start with latest date
[request setSortDescriptors:[NSArray arrayWithObject:sortDescriptor]];
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"status == %@",@"op tijd"];
[request setPredicate:predicate];
[request setFetchLimit:50];
NSError *error = nil;
NSInteger onTimeCount = [context countForFetchRequest:request error:&error];
NSPredicate *predicate1 = [NSPredicate predicateWithFormat:@"status == %@",@"uitgesteld"];
[request setPredicate:predicate1];
[request setFetchLimit:50];
NSInteger postponedCount = [context countForFetchRequest:request error:&error];
NSPredicate *predicate2 = [NSPredicate …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用SMP SDK 3.O PL3创建一个适用于iOS的Fiori客户端.在某些时候,它试图获取一个不存在的插件:通过npm获取插件"kapsel-plugin-inappbrowser"
$ cordova platform add ios --searchpath /Users/Pieter/SAP/MobileSDK3/KapselSDK/plugins
Adding ios project...
iOS project created with cordova-ios@3.9.1
Installing "cordova-plugin-camera" for ios
Installing "cordova-plugin-contacts" for ios
Installing "cordova-plugin-device" for ios
Installing "cordova-plugin-file" for ios
Installing "cordova-plugin-geolocation" for ios
Installing "cordova-plugin-media" for ios
Installing "cordova-plugin-media-capture" for ios
Installing "cordova-plugin-network-information" for ios
Installing "cordova-plugin-splashscreen" for ios
Installing "cordova-plugin-statusbar" for ios
Installing "cordova-plugin-whitelist" for ios
Installing "de.appplant.cordova.plugin.printer" for ios
Installing "kapsel-plugin-corelibs" for ios
Installing "kapsel-plugin-apppreferences" for ios
Installing "kapsel-plugin-attachmentviewer" for ios …Run Code Online (Sandbox Code Playgroud) 为什么我要在AppDelegate中使用presentModalViewController? - 处理didReceiveLocalNotification,所以我可以在我的应用程序顶部启动一个单独的modalView来处理通知
我的视图架构是什么样的? - 使用故事板 - MainStoryBoard: - > TabBarController-> NavigationController
发生了什么? - 没什么,这就是问题:-D - 当我从UILocalNotification按下操作按钮时,应用程序会打开,但只显示tabbarcontroller中的最后一个打开视图.
正如您在下面看到的,我最后的努力是在当前视图的顶部呈现modalViewController,如下所示:
[self.window.rootViewController.tabBarController.selectedViewController.navigationController presentModalViewController:navigationController animated:YES];
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
UIApplicationState state = [application applicationState];
if (state == UIApplicationStateInactive) {
// Application was in the background when notification was delivered.
NSLog(@"Received notification while in the background");
}
else {
NSLog(@"Received notification while running.");
}
MedicationReminderViewController *controller = [[UIStoryboard storyboardWithName:@"ModalStoryBoard" bundle:nil] instantiateViewControllerWithIdentifier:@"MedicationReminderVC"];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:controller];
[self.window.rootViewController.tabBarController.selectedViewController.navigationController presentModalViewController:navigationController animated:YES];
Run Code Online (Sandbox Code Playgroud)
}
self.window.rootViewController.tabBarController.selectedViewController.navigationController[self.window.rootViewController.tabBarController.selectedViewController.navigationController …
修改模型中的数据的建议方法是什么,而不必在之后再次将新模型设置到视图中?
我有一个函数,我需要在客户端计算一些东西,并在我的模型中更改它:
var parsedJSON = $.parseJSON(this.getView().getModel().getJSON());
$.each(parsedJSON['UserData']['clockHistory'], function(idx, obj) {
// do some stuff to clockHistory
});
this.getView().getModel().setProperty("/UserData/clockHistory", clockHistory);
Run Code Online (Sandbox Code Playgroud)
getModel().getJSON()只返回一个JSON字符串,但不返回可以在javascript中使用的JSON对象.
this.getView().getModel().read("/QualificationProficiencySet", {
filters: [new sap.ui.model.Filter({
path: "Qobjid",
operator: sap.ui.model.FilterOperator.EQ,
value1: nQObjid
})],
success: function(data) {
that._profData = data.results;
that._oQuickView.setModel(new sap.ui.model.json.JSONModel(that._profData), "proficiencyModel");
// delay because addDependent will do a async rerendering and the actionSheet will immediately close without it.
jQuery.sap.delayedCall(200, that, function() {
that._oQuickView.openBy(oLink);
});
},
error: function(evt) {}
});
Run Code Online (Sandbox Code Playgroud)
nQObjid是字符串类型 - 总是.昨天在我们的开发系统上,我看到了错误
"Invalid parametertype used at function 'eq' (Position: 8)"
我注意到过滤器附加在URL中,没有围绕值的单引号nQObjid.很奇怪,因为此时它被添加为过滤器运算符的值,它显然是一个字符串.我找不到任何相关的问题,但我做了一个(脏的)解决方法value1: "'"+nQObjid+"'".
直到今天,这个工作一直没有改变代码,但突然引号是网关内部价值的一部分.所以我"'"再次删除并测试,工作.然后我将解决方案转移到生产中,以发现我现在"Invalid parametertype used at function 'eq'..在生产中遇到了同样的问题.生产中的另一个用户没有这个问题,所以我有点迷失了.
我需要将参数传递给后端.我想为此使用$ filter.我下面的代码是不工作的,没有通过返回过滤器io_tech_request_context->get_filter( )->get_filter_select_options( )在FiguresEntitySet的.
var aFilters = [ new sap.ui.model.Filter("TeamMembers/Figures/FILTERKEY", sap.ui.model.FilterOperator.EQ, sFilterValue) ];
this.getView().bindElement({
path: "/TeamDataSet('0')",
parameters: {
expand: 'TeamMembers/Figures'
},
filters: aFilters
});
Run Code Online (Sandbox Code Playgroud) sapui5 ×4
xcode ×4
cordova ×1
core-data ×1
ios ×1
ios5 ×1
json ×1
nspredicate ×1
objective-c ×1
sap ×1
sap-fiori ×1
sap-smp ×1
storyboard ×1
xcode8 ×1