Ive been developing my app under the assumption that Im using the 2.2 simulator because it says so in the drop-down-box in the top right of xcode. It says "Simulator - 2.2 Debug". under "Active sdk".
Under "Active Executable", however, there is another choice, and here I apparently have had the "MyAppsName - iPhone Simulator (2.0)" checked.
Now I tried selecting the "MyAppsName - iPhone Simulator (2.2)" instead, but that makes my app unresponsive in some of my views. (2.1 works fine though).
Since all my views are mainly uiwebviews that are loaded with local html-files, I can quickly assess that the pages that becomes unresponsive are the ones with embedded sound.
This is the js/html-code that I use to load sound:
This is the obc-code that I use to load the webview and enable it to load local content:
And this is what the debugger reports when the app becomes unresponsive:
Here I get a path as an Argument -> argv -> *argv with something highlighted in red (supposing this is the error)
/User/myName/Library/Application Support/iPhone Simulator/User/Applications/F0340A73-XXXX-XXXX-XXXX
There is both a folder and a .sb-file in that directory whichs names start with Applications/F0340A73-XXXX-XXXX-XXXX. However, they have an additional -XXXXXXXXXXXX (ie. 12 extra characters) added.
Is this a known issue between versions? Will my app not function on iphones with version 2.2? Do you know of a solution? Im thankful for any help.
Under "Active Executable", however, there is another choice, and here I apparently have had the "MyAppsName - iPhone Simulator (2.0)" checked.
Now I tried selecting the "MyAppsName - iPhone Simulator (2.2)" instead, but that makes my app unresponsive in some of my views. (2.1 works fine though).
Since all my views are mainly uiwebviews that are loaded with local html-files, I can quickly assess that the pages that becomes unresponsive are the ones with embedded sound.
This is the js/html-code that I use to load sound:
Code:
<script type="text/javascript">
function EvalSound(soundobj) {
var thissound= eval("document."+soundobj);
thissound.Play(true);
}
</script>
<img src="icon_sound.png" onClick="EvalSound('L1')">
<embed src="L1.mp3" name="L1" autostart="false" width="100" height="100" hidden="true" />
This is the obc-code that I use to load the webview and enable it to load local content:
Code:
// --------------------------
// SET: URL
// --------------------------
// Gets Url from outline.plist
NSString *tempUrlString = leafViewController.savedUrlString;// [item objectForKey:@"itemUrl"];
// Gets local file
NSString *htmlFile = [[NSBundle mainBundle] pathForResource:tempUrlString ofType:@"html"];
NSData *htmlData = [NSData dataWithContentsOfFile:htmlFile];
// --------------------------
// LOAD: WEB-CONTENT FROM LOCAL FOLDER
// --------------------------
// 1. Gets the path to the main bundle root folder
NSString *imagePath = [[NSBundle mainBundle] resourcePath];
// 2. Need to be double-slashes to work correctly with UIWebView, so change all "/" to "//"
imagePath = [imagePath stringByReplacingOccurrencesOfString:@"/" withString:@"//"];
// 3. Also need to replace all spaces with "%20"
imagePath = [imagePath stringByReplacingOccurrencesOfString:@" " withString:@"%20"];
// 4. Loads the local html-page
[leafViewController.webView loadData:htmlData MIMEType:@"text/html" textEncodingName:@"UTF-8" baseURL:[NSURL URLWithString:[NSString stringWithFormat:@"file:/%@//",imagePath]]];
And this is what the debugger reports when the app becomes unresponsive:
Code:
int main(int argc, char *argv[])
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
// THIS LINE HAS THE BREAKPOINT
int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
return retVal;
}
Here I get a path as an Argument -> argv -> *argv with something highlighted in red (supposing this is the error)
/User/myName/Library/Application Support/iPhone Simulator/User/Applications/F0340A73-XXXX-XXXX-XXXX
There is both a folder and a .sb-file in that directory whichs names start with Applications/F0340A73-XXXX-XXXX-XXXX. However, they have an additional -XXXXXXXXXXXX (ie. 12 extra characters) added.
Is this a known issue between versions? Will my app not function on iphones with version 2.2? Do you know of a solution? Im thankful for any help.