我刚刚在AppStore上获得了我的第一个应用程序,但意识到我应该在标题中添加一个单词以使其更加明显.
这可能吗?
如果没有,那么在现场推荐的是什么,以及当前的标题呢?
我已经发布了一个销售非常好的应用程序,从那时起我就开始了一个公司,我将在那里进行开发.我检查了Apple以更改我的帐户名称,但这似乎非常复杂和耗时.
我遇到的问题是,我想将此应用程序移至我的新公司,并在iTunes Connect上注册一个新帐户.
有谁知道最好的策略是什么,因为我不希望购买该应用程序的当前人失去它.
干杯
当我在'didSelectRowAtIndexPath'中选择一个玩家并在所选行上添加一个复选标记时,它会添加一个额外的复选标记.
如果我点击row = 0,它会在row = 0和row = 11上添加一个复选标记.这意味着两行标记为一次.如果我点击row = 1,它会为row = 10添加一个额外的复选标记,因此它会向前添加10行复选标记.看起来它只是添加了复选标记,因为玩家没有进入实际的玩家列表.
任何帮助将非常感谢.
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
NSLog(@"indexPath: %i", indexPath.row);
// To many players selected
if (nrOfSelectedPlayers == 6) { //This is max players allowed
UIAlertView *alertPlayer = [[UIAlertView alloc] initWithTitle:@"VARNING"
message:@"Du kan maximalt spela \n med sex spelare!"
delegate:self
cancelButtonTitle:@"Tillbaka"
otherButtonTitles:nil];
[alertPlayer show];
[alertPlayer release];
nrOfSelectedPlayers--;
checkDeletePlayer = YES;
}
else {
// Handle the number of selected players to be able …Run Code Online (Sandbox Code Playgroud) 我有一个应用程序,我发布为iPhone和iPad即使它开发为通用.原因是我发布了一个英文版本的Universal,只想更新iPhone和iPad瑞典版本,因为它已经为不同的设备提供了单独的应用程序.
当我在iPhone设备上运行时,我没有任何问题,但在使用iPad测试时,我收到以下消息,我不知道如何删除:
"无法启动"FamilyQuiz_3"
没有这样的文件或目录(/Users/peterk/Library/Developer/Xcode/DerivedData/MyApp_3-fosmfwberzyfryenqrjlfpacftjv/Build/Products/Debug-iphoneos/MyApp_3.app/MyApp_3)
我可以从iPad设备启动应用程序,但是从XCODE提交时它不会自动启动.
我正在尝试使用以下方法将sqlite DB添加到应用程序中:CoreData:在iOS应用程序中预加载数据
按照教程我遇到了一个问题:
[NSFileManager copyItemAtPath:toPath:error:]: source path is nil
Run Code Online (Sandbox Code Playgroud)
我使用以下代码:
- (NSPersistentStoreCoordinator *)persistentStoreCoordinator {
if (__persistentStoreCoordinator != nil) {
return __persistentStoreCoordinator;
}
NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"Peter_R0_1.sqlite"];
if(![[NSFileManager defaultManager] fileExistsAtPath:[storeURL path]]) {
NSString *sqlitePath = [[NSBundle mainBundle] pathForResource:@"Peter_R0_1" ofType:@"sqlite" inDirectory:nil];
NSError *anyError = nil;
BOOL success = [[NSFileManager defaultManager] copyItemAtPath:sqlitePath toPath:[storeURL path] error:&anyError];
}
NSError *error = nil;
__persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]];
if (![__persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error])
{
NSLog(@"Unresolved error %@, %@", error, [error …Run Code Online (Sandbox Code Playgroud) 我现在试着让它工作几个小时,但却无法做到正确.
我有以下代码:
NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:
[NSArray arrayWithObjects:@"currentGame1", @"currentGameType1", @"currentGameQuestion1", @"currentGameRightAnswers1", @"currentGameType1", @"numberOfType0Games1", @"type0Results1", @"numberOfType1Games1", @"type1Results1",@"numberOfType2Games1", @"type2Results1",nil], @"Player1",
[NSArray arrayWithObjects:@"currentGame2", @"currentGameType2", @"currentGameQuestion2", @"currentGameRightAnswers2", @"currentGameType2", @"numberOfType0Games2", @"type0Results2", @"numberOfType1Games2", @"type1Results2",@"numberOfType2Games2", @"type2Results2",nil], @"Player2",
[NSArray arrayWithObjects:@"currentGame3", @"currentGameType3", @"currentGameQuestion3", @"currentGameRightAnswers3", @"currentGameType3", @"numberOfType0Games3", @"type0Results3", @"numberOfType1Games3", @"type1Results3",@"numberOfType2Games3", @"type2Results3",nil], @"Player3",nil];
[dict writeToFile:@"/Users/MikaelB/Desktop/xxxxPlayer.plist" atomically: TRUE];
NSMutableDictionary *readDict = [[NSMutableDictionary alloc] initWithContentsOfFile:@"/Users/MikaelB/Desktop/xxxxPlayer.plist"];
NSLog(@"readDict: %@", readDict);
NSLog(@"= = = = = = = = = = = = = = = = = = =");
for (NSArray *key in [readDict …Run Code Online (Sandbox Code Playgroud) 我有以下代码,它有效:
// Load new game screen
-(IBAction)newGame_button:(id)sender {
myAlert = [[UIAlertView alloc]
initWithTitle:@"Varning"
message:@"Om du går vidare kommer pågående spel stoppas och nollställas!"
delegate:self
cancelButtonTitle:@"Tillbaka"
otherButtonTitles:@"Fortsätt", nil];
myAlert.tag=kTagNewGame;
[myAlert show];
[myAlert release];
}
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
switch(myAlert.tag ) {
case kTagContinueGame:
NSLog(@"kTagContinueGame");
NSMutableArray *continueGameArray = [[NSMutableArray alloc] initWithCapacity:0];
AccessCurrentGameData *getCurrentGameInfo = [AccessCurrentGameData new];
continueGameArray = [getCurrentGameInfo continueTheCurrentGame];
[getCurrentGameInfo release];
[continueGameArray retain];
[continueGameArray release];
QandA_ViewController * temp = [[QandA_ViewController alloc] init];
[self setQanda_ViewController:temp];
[temp release];
[[self navigationController] pushViewController:qanda_ViewController animated:YES]; …Run Code Online (Sandbox Code Playgroud) 突然,我在这一行得到了EXC_BAD_ACCESS:
int retVal = UIApplicationMain(argc, argv, nil, nil);
Run Code Online (Sandbox Code Playgroud)
这是代码:
int main(int argc, char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
return retVal;
}
Run Code Online (Sandbox Code Playgroud)
我甚至不知道从哪里开始看?
有人可以帮忙吗?
我得到"在初始化过程中存储到'myKeyArray'的值永远不会被读取"标记行的消息,我不太明白为什么会发生这种情况.
- (void)createAndMigrateStatisticalDataForPlayersToV3 {
NSString *playerStatsfilePath = [self dataFilePath5];
NSString *playerDatafilePath = [self dataFilePath6];
NSArray *myKeyArray = [[NSArray alloc]init]; <<<< "Value stored to 'myKeyArray' during its initialization is never read"
NSMutableArray *theObjects = [[NSMutableArray alloc]init]; <<<< "Value stored to 'myKeyArray' during its initialization is never read"
NSFileManager *fileMgr;
fileMgr = [NSFileManager defaultManager];
if ([fileMgr fileExistsAtPath: playerDatafilePath] == YES) {
NSMutableDictionary *gameFileDict = [NSMutableDictionary dictionaryWithContentsOfFile:playerDatafilePath];
NSMutableArray *dataArray = [[NSMutableArray alloc]init];
NSMutableArray *newDataArray = [[NSMutableArray alloc]init];
myKeyArray = [gameFileDict allKeys];
int nrOfKeys …Run Code Online (Sandbox Code Playgroud) 在设备上运行时出现此错误,而不是模拟器(现在)。
我在模拟器上也遇到了同样的错误,并从这个线程实现了解决方案: 在此处输入链接描述
使用此代码:
- (NSPersistentStoreCoordinator *)persistentStoreCoordinator
{
if (__persistentStoreCoordinator != nil) {
return __persistentStoreCoordinator;
}
// NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"engliah_FamQuiz.sqlite"];
//=== USE DATABASE FROM MAIN BUNDLE ===//
NSURL *storeURL = [[NSBundle mainBundle] URLForResource:kNewDB withExtension:@"sqlite"];
// Use this for source store - ensures you don't accidentally write to the entities
NSDictionary *options = [NSDictionary dictionaryWithObject:[NSNumber numberWithBool:1]
forKey:NSReadOnlyPersistentStoreOption];
// Make sure the WAL mode for Core Data is not enabled
options = @{ NSSQLitePragmasOption : @{@"journal_mode" : @"DELETE"} }; …Run Code Online (Sandbox Code Playgroud) objective-c ×6
iphone ×4
core-data ×2
ios ×2
app-store ×1
c ×1
memory-leaks ×1
nsdictionary ×1
uialertview ×1
uitableview ×1
xcode4.5 ×1
xcode5 ×1