libipodimport icon indicating copy to clipboard operation
libipodimport copied to clipboard

Respring, Error

Open iMokhles opened this issue 11 years ago • 2 comments

Hey, i used this library and i downloaded libipodimport from cydia and when i click on the button it respring the springboard

here is the code i used

define ajamyDestination [NSHomeDirectory() stringByAppendingPathComponent:@"/Documents/Alajmy"]

NSFileManager *fileManager = [[NSFileManager alloc] init]; NSString *path = [ajamyDestination stringByAppendingPathExtension:@"/001.mp3"]; BOOL exists = [fileManager fileExistsAtPath:path isDirectory:NO]; if (exists) { NSLog(@"This File Downloaded Already"); NSString *songPath = path; // may be M4A, AAC, etc. as well NSDictionary *metadata = [NSDictionary dictionaryWithObjectsAndKeys: @"Song Title", kIPIKeyTitle, @"Author or Singer", kIPIKeyArtist, @"Heavy metal", kIPIKeyGenre, [NSNumber numberWithInt:1000], kIPIKeyDuration, [NSNumber numberWithInt:0], kIPIKeyYear, nil ]; [[IPIPodImporter sharedInstance] importFileAtPath:songPath withMetadata:metadata];

iMokhles avatar Aug 15 '13 15:08 iMokhles

Hi. What OS are you using it on?

On Thu, Aug 15, 2013 at 5:19 PM, Mokhlas Hussein [email protected]:

Hey, i used this library and i downloaded libipodimport from cydia and when i click on the button it respring the springboard

here is the code i used

#define ajamyDestination [NSHomeDirectory() stringByAppendingPathComponent:@"/Documents/Alajmy"]

NSFileManager *fileManager = [[NSFileManager alloc] init]; NSString *path = [ajamyDestination stringByAppendingPathExtension:@ "/001.mp3"]; BOOL exists = [fileManager fileExistsAtPath:path isDirectory:NO]; if (exists) { NSLog(@"This File Downloaded Already"); NSString *songPath = path; // may be M4A, AAC, etc. as well NSDictionary *metadata = [NSDictionary dictionaryWithObjectsAndKeys: @"Song Title", kIPIKeyTitle, @"Author or Singer", kIPIKeyArtist, @"Heavy metal", kIPIKeyGenre, [NSNumber numberWithInt:1000], kIPIKeyDuration, [NSNumber numberWithInt:0], kIPIKeyYear, nil ]; [[IPIPodImporter sharedInstance] importFileAtPath:songPath withMetadata:metadata];

— Reply to this email directly or view it on GitHubhttps://github.com/H2CO3/libipodimport/issues/5 .

-----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/E/FA/IT/L/M/MU/S d- s: a--- C++$ UBLX+++>$ P--- L+++>$ !E---- W+++? !N !o K--? w--- !O M++$ V? PS-- PE Y+++ PGP+++ !t 5? !X !R tv+ b++ DI !D G e h-- !r y-- ------END GEEK CODE BLOCK------

H2CO3 avatar Aug 15 '13 15:08 H2CO3

i Solved this error

the solution

    NSString *path = [NSHomeDirectory() stringByAppendingPathComponent:@"/Documents/Alajmy/001.mp3"];
        NSString *songPath = path; 
        NSDictionary *metadata = [NSDictionary dictionaryWithObjectsAndKeys:
                                  @"AlFateha", kIPIKeyTitle,
                                  @"Ahmed Alajmy", kIPIKeyArtist,
                                  @"Quran", kIPIKeyGenre,
                                  [NSNumber numberWithInt:1000], kIPIKeyDuration,
                                  [NSNumber numberWithInt:0], kIPIKeyYear,
                                  nil
                                  ];
        [[IPIPodImporter sharedInstance] importFileAtPath:songPath withMetadata:metadata];

and to link libsubstrat.dylib to your project :) i was forgotten this one (STUPID) lol :+1:

iMokhles avatar Aug 15 '13 17:08 iMokhles