Localizing iPad applications - iphone

I am creating an iPad application, and I have a Localizable.strings file, which is in English and Dutch:
English.lproj/Localizable.strings
"failed to copy file" = "Failed to copy file";
"failed to copy defaultFeeds.plist" = "Failed to copy defaultFeeds.plist form the application's bundle to the device's documents directory for this app. Please make sure the device has space available on the flash memory. Please push the home button, connect your device to iTunes and check how much space there is available. Remove things you don't need and try again. If the problem presists, please contact us. You can find our support page in the App Store in iTunes.";
Dutch.lproj/Localizable.strings
"failed to copy file" = "Bestand kopieëren mislukt";
"failed to copy defaultFeeds.plist" = "Het kopieëren van defaultFeeds.plist van de applicatiebundel naar de documenten map van het apperaat is mislukt. Ga alstublieft na of het apparaat ruimte heeft op het flash geheugen. Druk op de Home-knop, verbind het apparaat met iTunes en controleer hoeveel ruimte er beschikbaar is. Verwijder dingen die je niet nodig hebt en probeer het opnieuw. Als de problemen voortzetten, kunt u contact met ons opnemen. U kunt onze support-page vinden in de App Store in iTunes.";
When I comment out error checking, so I get the error for sure, I get the English version, although the iPhone Simulator's language is set to Dutch:
// Copy defaultFeeds if run for the first time
//if(![[NSFileManager defaultManager] fileExistsAtPath:FEEDS_PLIST_IN_CURRENT_APP_DIRECTORY_PATH]) {
// if(!) is for handling errors
//if(![[NSFileManager defaultManager] copyItemAtPath:[[NSBundle mainBundle] pathForResource:#"defaultFeeds" ofType:#"plist"] toPath:FEEDS_PLIST_IN_CURRENT_APP_DIRECTORY_PATH error:nil]) {
UIAlertView *copyFailedAlertView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(#"failed to copy file", #"failed to copy file") message:NSLocalizedString(#"failed to copy defaultFeeds.plist", #"failed to copy defaultFeeds.plist") delegate:nil cancelButtonTitle:nil otherButtonTitles:nil];
[copyFailedAlertView show];
[copyFailedAlertView release];
//}
//}
Also, the debugger says:
There is no HW layout for this input mode, defaulting to US
Can anyone help me? Thanks.

Did you create the Localizable.strings file through the Xcode4 interface?
The 'old style' naming (English.lproj, Dutch.lproj) has been replaced by the standard format (en.lproj, nl.lproj). Select the 'Localizable.strings' file and on the right hand side helper UI:
See if that changes anything for you.

Related

Users get flooded with messages about connection problems

We have an installation with TYPO3 8.7.45
since half a year the editors get flash messages with the text:
Connection Problem
Sorry, but an error occurred while connecting to the server. Please
check your network connection.
That is independent from current activity, also it seems to be triggered more often when they are editing CEs.
with my admin-account I have no problems, if I change user and su to an editor account I also get the messages:
just open a CE and wait. about 1 minute later the users get flooded with about 40 Flash messages.
In the TYPO3 log there are no entries for the editor or my account for the moment the messages appear.
In the apache log no error occurs.
In the moment of the messages a JSon call comes back but with http-code 200.
it went to https://<mydomain.tld>/typo3/index.php?ajaxID=/ajax/usersettings/process&ajaxToken=5fbc9e1b13fae602644589e9ec63ffadb72b35d9
in the returned JSON nothing special about errors.
It looks like a user record from a system with a lot of pages, so there are lot of page-tree states and fileadmin-tree states:
(I needed to shorten it (marked [...]) because questions aren't allowed to have so much characters.)
{"interfaceSetup":"","moduleData":{"web_layout":{"function":"1","language":"0","tx_news_domain_model_news":"0","tt_content_showHidden":"1"},"file_list":{"displayThumbs":"0","clipBoard":"1","sort":"tstamp","reverse":"1","bigControlPanel":"1"},"xMOD_alt_doc.php":{"showPalettes":"1"},"browse_links.php":{"expandFolder":"1:\/Amt13\/pressebilder\/2203\/"},"TYPO3\\CMS\\Backend\\Utility\\BackendUtility::getUpdateSignal":[],"alt_doc.php":[{"660b4939a8bf42a082f905afb03f4516":["Kontakt: Anschrift und \u00d6ffnungszeiten",{"edit":{"tt_content":{"106675":"edit"}},"defVals":null,"overrideVals":null,"columnsOnly":null,"disHelp":null,"noView":null,"editRegularContentFromId":null,"workspace":null},"&edit[tt_content][106675]=edit&defVals=&overrideVals=&columnsOnly=&disHelp=&noView=&editRegularContentFromId=&workspace=",{"table":"tt_content","uid":"106675","pid":"25118746","cmd":"edit","deleteAccess":1}],"822cbb912270bea67ed3d23f6971d695":["kontakt",{"edit":{"pages":{"25118746":"edit"}},"defVals":null,"overrideVals":null,"columnsOnly":null,"disHelp":null,"noView":null,"editRegularContentFromId":null,"workspace":null},"&edit[pages][25118746]=edit&defVals=&overrideVals=&columnsOnly=&disHelp=&noView=&editRegularContentFromId=&workspace=",{"table":"pages","uid":"25118746","pid":"602608","cmd":"edit","deleteAccess":1}],"9c9482943997a2a98c5020403aa15134":["leitbild",{"edit":{"pages":{"700019831":"edit"}},"defVals":null,"overrideVals":null,"columnsOnly":null,"disHelp":null,"noView":null,"editRegularContentFromId":null,"workspace":null},"&edit[pages][700019831]=edit&defVals=&overrideVals=&columnsOnly=&disHelp=&noView=&editRegularContentFromId=&workspace=",{"table":"pages","uid":"700019831","pid":"612936","cmd":"edit","deleteAccess":1}],"f1ef5e93a1cf3b8797aa0a3d5344e0c3":["Bisher wurden folgende Angebote freigegeben",{"edit":{"tt_content":{"105443":"edit"}},"defVals":null,"overrideVals":null,"columnsOnly":null,"disHelp":null,"noView":null,"editRegularContentFromId":null,"workspace":null},"&edit[tt_content][105443]=edit&defVals=&overrideVals=&columnsOnly=&disHelp=&noView=&editRegularContentFromId=&workspace=",{"table":"tt_content","uid":"105443","pid":"700019562","cmd":"edit","deleteAccess":1}]},"f1ef5e93a1cf3b8797aa0a3d5344e0c3"],"opendocs::recent":{"9a4e39ea0ed9c3e36d610032f3759b04":["<em>[No title]<\/em>",{"edit":{"tt_content":{"158874":"edit"}},"defVals":null,"overrideVals":null,"columnsOnly":null,"noView":null,"workspace":null},"&edit[tt_content][158874]=edit&defVals=&overrideVals=&columnsOnly=&noView=&workspace=",{"table":"tt_content","uid":158874,"pid":700029703,"cmd":"edit","deleteAccess":true}],"20b2b58f966003a498f53fb6419dbd98":["Aktuelle Zahlen",{"edit":{"tt_content":{"158839":"edit"}},"defVals":null,"overrideVals":null,"columnsOnly":null,"noView":null,"workspace":null},"&edit[tt_content][158839]=edit&defVals=&overrideVals=&columnsOnly=&noView=&workspace=",{"table":"tt_content","uid":158839,"pid":1,"cmd":"edit","deleteAccess":true}],"eda3aceebdc3b0db5e88cc4420f7e307":["<em>[Kein Titel]<\/em>",{"edit":{"pages":{"700029699":"edit"}},"defVals":null,"overrideVals":null,"columnsOnly":null,"noView":null,"workspace":null},"&edit[pages][700029699]=edit&defVals=&overrideVals=&columnsOnly=&noView=&workspace=",{"table":"pages","uid":700029699,"pid":700022451,"cmd":"edit","deleteAccess":true}],"c6aa2d6ea12a6222496fa25bec9e6e51":["<em>[Kein Titel]<\/em>",{"edit":{"pages":{"700029700":"edit"}},"defVals":null,"overrideVals":null,"columnsOnly":null,"noView":null,"workspace":null},"&edit[pages][700029700]=edit&defVals=&overrideVals=&columnsOnly=&noView=&workspace=",{"table":"pages","uid":700029700,"pid":700022451,"cmd":"edit","deleteAccess":true}],"5228a4f43e5763f697b319eb4626bda6":["<em>[Kein Titel]<\/em>",{"edit":{"pages":{"700029701":"edit"}},"defVals":null,"overrideVals":null,"columnsOnly":null,"noView":null,"workspace":null},"&edit[pages][700029701]=edit&defVals=&overrideVals=&columnsOnly=&noView=&workspace=",{"table":"pages","uid":700029701,"pid":700022451,"cmd":"edit","deleteAccess":true}],"d950f407a31b31cf430a78f477be31ab":["<span title=\"LIVE-\u00dcbertragung der Ratssitzung (Einblendung mit Geb\u00e4rdensprache)\">LIVE-\u00dcbertragung der Ratssitzung (Einblendung mit ...<\/span>",{"edit":{"pages":{"700022156":"edit"}},"defVals":null,"overrideVals":null,"columnsOnly":null,"noView":null,"workspace":null},"&edit[pages][700022156]=edit&defVals=&overrideVals=&columnsOnly=&noView=&workspace=",{"table":"pages","uid":700022156,"pid":47566584,"cmd":"edit","deleteAccess":true}],"23f2700a5c1055c33622b8d5bd73c0ba":["<span title=\"Rat LIVE (ohne Geb\u00e4rden) --> DATUM\/UHRZEIT EDITIEREN!\">Rat LIVE (ohne Geb\u00e4rden) --> DATUM\/UHRZEIT EDITIER...<\/span>",{"edit":{"tt_content":{"117768":"edit"}},"defVals":null,"overrideVals":null,"columnsOnly":null,"noView":null,"workspace":null},"&edit[tt_content][117768]=edit&defVals=&overrideVals=&columnsOnly=&noView=&workspace=",{"table":"tt_content","uid":117768,"pid":47566584,"cmd":"edit","deleteAccess":true}],"ada52d1c5cee2005440c68ec4250ed39":["<span title=\"Bitte beachten Sie, dass im Vorfeld der Ratssitzung ab etwa 12 Uhr an dieser Stelle auch die Sondersitzung des APS \u00fcbertragen wird\">Bitte beachten Sie, dass im Vorfeld der Ratssitzun...<\/span>",{"edit":{"tt_content":{"150931":"edit"}},"defVals":null,"overrideVals":null,"columnsOnly":null,"noView":null,"workspace":null},"&edit[tt_content][150931]=edit&defVals=&overrideVals=&columnsOnly=&noView=&workspace=",{"table":"tt_content","uid":150931,"pid":47566584,"cmd":"edit","deleteAccess":true}]},"web_list":{"bigControlPanel":"1","clipBoard":"1"},"clipboard":{"tab_1":[],"tab_2":[],"tab_3":[],"current":"normal","normal":{"el":{"pages|700029114":"1"},"mode":"copy"}},"web_txrecyclerM1":{"function":""},"Workspaces":{"1":{"columns":{"uid":{"position":2,"hidden":1},"t3ver_oid":{"position":3,"hidden":1},"workspace_Title":{"position":4,"hidden":1},"path_Workspace":{"position":5,"hidden":1},"path_Live":{"position":6,"hidden":1},"label_Workspace":{"position":7,"hidden":0},"":{"position":13,"hidden":0},"label_Live":{"position":9,"hidden":0},"workspace_Tstamp":{"position":10,"hidden":1},"label_Stage":{"position":11,"hidden":0},"languageValue":{"position":14,"hidden":0}}},"States":{"WorkspacePreviewModeSelect":{"__PHP_Incomplete_Class_Name":"stdClass","viewMode":0}}},"web_func":{"function":"TYPO3\\CMS\\WizardCrpages\\Controller\\CreatePagesWizardModuleFunctionController","wiz":"TYPO3\\CMS\\WizardCrpages\\Controller\\CreatePagesWizardModuleFunctionController","cr_333":"0"},"FormEngine":[{"9a4e39ea0ed9c3e36d610032f3759b04":["<em>[Kein Titel]<\/em>",{"edit":{"tt_content":{"158874":"edit"}},"defVals":null,"overrideVals":null,"columnsOnly":null,"noView":null,"workspace":null},"&edit[tt_content][158874]=edit&defVals=&overrideVals=&columnsOnly=&noView=&workspace=",{"table":"tt_content","uid":158874,"pid":700029703,"cmd":"edit","deleteAccess":true}],"d93f233ed25df73034534ee3e0ab2698":["<em>[Kein Titel]<\/em>",{"edit":{"tt_content":{"158880":"edit"}},"defVals":null,"overrideVals":null,"columnsOnly":null,"noView":null,"workspace":null},"&edit[tt_content][158880]=edit&defVals=&overrideVals=&columnsOnly=&noView=&workspace=",{"table":"tt_content","uid":158880,"pid":700029703,"cmd":"edit","deleteAccess":true}],"6187130f59b81617a4b5d4e163fd5260":["<em>[Kein Titel]<\/em>",{"edit":{"tt_content":{"158878":"edit"}},"defVals":null,"overrideVals":null,"columnsOnly":null,"noView":null,"workspace":null},"&edit[tt_content][158878]=edit&defVals=&overrideVals=&columnsOnly=&noView=&workspace=",{"table":"tt_content","uid":158878,"pid":700029703,"cmd":"edit","deleteAccess":true}]},"6187130f59b81617a4b5d4e163fd5260"],"list":{"sys_category":"1"}},"thumbnailsByDefault":1,"emailMeAtLogin":0,"noMenuMode":0,"startModule":"help_AboutAboutmodules","hideSubmoduleIcons":0,"helpText":1,"titleLen":"50","edit_showFieldHelp":"icon","edit_RTE":1,"edit_docModuleUpload":1,"navFrameWidth":"","navFrameResizable":0,"resizeTextareas":1,"resizeTextareas_MaxHeight":"500","resizeTextareas_Flexible":1,"lang":"de","firstLoginTimeStamp":1447077676,"moduleSessionID":{"web_layout":"970e8320299dff8141a8ae5550248e95","file_list":"e8540991962ffea48972579b039fe76ff021a642","xMOD_alt_doc.php":"2348125aac375ac7fcb481b4e72dd1a8","browse_links.php":"de32bac4e63a360cd9d20bb2fa66269fa66ee1a1","TYPO3\\CMS\\Backend\\Utility\\BackendUtility::getUpdateSignal":"4bd1d5f1dfc072847f05eb4589559d0c7f253fd7","alt_doc.php":"3f597fbbc55cd7d85b374d2e42fbdf27","opendocs::recent":"f8a789d8ba37bfb4092ed3097ccfe657b60d1de0","web_list":"e4a4206a8c2ad2709558d7ff46c9292b","clipboard":"04dc9fc58ff24077fabce794c074cdaf1d3f249e","web_txrecyclerM1":"64095ed83622655296a1eb61fa11f6f1","web_func":"e4a4206a8c2ad2709558d7ff46c9292b","FormEngine":"4bd1d5f1dfc072847f05eb4589559d0c7f253fd7"},"BackendComponents":{"States":{"Pagetree":{"stateHash":{"0":"1","1":"1","8":"1","42989":"1","2398536":"1","3396226":"1","root":"1","lastSelectedNode":"p29b99b07-1","7d-1":"1","0-1":"1","109db":"1","5a":"1","5952a-1":"1","2176632-1":"1","596d3-1":"1","1bfe20d-1":"1","197a39e-1":"1","596a6-1":"1","5952a":"1","133-1":"1","10a37-1":"1","24dcf1-1":"1","10b4a-1":"1","10b3d-1":"1","10b31-1":"1","10b18-1":"1","10b0f-1":"1","10b00-1":"1","10af1-1":"1","10ae2-1":"1","10aca-1":"1","10abb-1":"1","10ab0-1":"1","10aa5-1":"1","10ad7-1":"1","10a9a-1":"1","10a8d-1":"1","10a82-1":"1","10a77-1":"1","10a6a-1":"1","5ca6e-1":"1","10a5f-1":"1","10a54-1":"1","f-1":"1","44-1":"1","18f8fc9-1":"1","578955-1":"1","f1a059-1":"1","e30836-1":"1","dea08d-1":"1","208311d-1":"1","16c1eb5-1":"1","e4f728-1":"1","199d5e0-1":"1","bb3299-1":"1","1355-1":"1","51-1":"1","1356-1":"1","5c-1":"1","59-1":"1","5d-1":"1","29b92777-1":"1","29b92778-1":"1","15ed719-1":"1","131d3f5-1":"1","131d4a6-1":"1","131d4b5-1":"1","131b2d3-1":"1","131d528-1":"1","1409373-1":"1","1359-1":"1","1358-1":"1","60-1":"1","d5a715-1":"1","d5af81-1":"1","d5e5c7-1":"1","d5e131-1":"1","d5a7b6-1":"1","d5ee4c-1":"1","d5a782-1":"1","d5ac3f-1":"1","d5ced2-1":"1","d5a741-1":"1","bc-1":"1","1353-1":"1","130-1":"1","1469-1":"1","1477-1":"1","1474-1":"1","1467-1":"1","146a-1":"1","145f-1":"1","145e-1":"1","1463-1":"1","a":"1","2bf6dfd-1":"1","14b81b6-1":"1","9cbda-1":"1","10956da-1":"1","211c77c-1":"1","252794e-1":"1","27b1d9c-1":"1","36ea080-1":"1","3ac89ca-1":"1","22e6e52-1":"1","43eec-1":"1","43e82-1":"1","194725-1":"1","22e675b-1":"1","6b7b65-1":"1","123ec90-1":"1","cc872b-1":"1","29b9277d-1":"1","2e52606-1":"1","2e52611-1":"1","2e67188-1":"1","15c23e4-1":"1","a4f195-1":"1","a4f39c-1":"1","ab8906-1":"1","9fa22b-1":"1","2e5261c-1":"1","2e52627-1":"1","2e67212-1":"1","501b2-1":"1","501a0-1":"1","5018e-1":"1","5017c-1":"1","51189-1":"1","5014f-1":"1","5013d-1":"1","5012b-1":"1","5011b-1":"1","5010b-1":"1",
[...]
"29b998c5-1":"1","29b99961-1":"1","29b99b07-1":"1","29b98781-1":"1"}},"typo3-debug-console":{"__PHP_Incomplete_Class_Name":"stdClass","collapsed":true},"typo3-navigationContainer":{"__PHP_Incomplete_Class_Name":"stdClass","width":296},"typo3-module-menu":{"collapsed":"false"}}},"inlineView":"a:4:{i:0;b:0;s:10:\"tt_content\";a:187:{s:26:\"NEW564485584a92e5.98221160\";a:1:{s:18:\"sys_file_reference\";a:1:{i:0;i:2781;}}s:26:\"NEW56448854b867f2.94486646\";a:1:{s:38:\"tx_addresscontact_domain_model_entries\";a:2:{i:0;i:16;i:1;i:17;}}i:3906;a:1:{s:38:\"tx_addresscontact_domain_model_entries\";a:1:{i:0;s:2:\"17\";}}i:3904;a:1:{s:18:\"sys_file_reference\";a:1:{i:0;i:2782;}}s:26:\"NEW564497679aaa89.38502072\";a:1:{s:18:\"sys_file_reference\";a:1:{i:0;i:2783;}}s:26:\"NEW5644990587f6c0.43562791\";a:1:{s:38:\"tx_addresscontact_domain_model_entries\";a:3:{i:0;i:18;i:1;i:19;i:2;i:20;}}i:3909;a:1:{s:38:\"tx_addresscontact_domain_model_entries\";a:1:{i:2;s:2:\"20\";}}s:26:\"NEW564499e943e1f1.95784363\";a:1:{s:35:\"tx_downloadlinks_domain_model_links\";a:1:{i:0;i:19;}}i:3910;a:2:{s:35:\"tx_downloadlinks_domain_model_links\";a:1:{i:0;s:2:\"19\";}s:18:\"sys_file_reference\";a:1:{i:0;i:2784;}}i:3914;a:1:{s:18:\"sys_file_reference\";a:1:{i:0;i:2785;}}s:26:\"NEW56459a04be3676.35373215\";a:1:{s:38:\"tx_addresscontact_domain_model_entries\";a:3:{i:0;i:21;i:1;i:22;i:2;i:23;}}i:3923;a:1:{s:38:\"tx_addresscontact_domain_model_entries\";a:2:{i:0;s:2:\"21\";i:1;i:24;}}s:26:\"NEW5666ad3622fa02.50202619\";a:1:{s:38:\"tx_lhdaccordion_domain_model_accordion\";a:2:{i:0;i:132;i:1;i:133;}}i:59980;a:2:{s:38:\"tx_lhdaccordion_domain_model_accordion\";a:3:{i:0;i:135;i:1;i:136;i:2;s:3:\"132\";}s:18:\"sys_file_reference\";a:1:{i:0;i:12903;}}s:26:\"NEW5666aeb9550a79.88897578\";a:1:{s:35:\"tx_downloadlinks_domain_model_links\";a:4:{i:0;i:162;i:1;i:163;i:2;i:164;i:3;i:165;}}i:59987;a:2:{s:35:\"tx_downloadlinks_domain_model_links\";a:1:{i:0;s:3:\"165\";}s:18:\"sys_file_reference\";a:1:{i:0;i:12899;}}s:26:\"NEW5666af96203395.43370281\";a:1:{s:38:\"tx_addresscontact_domain_model_entries\";a:2:{i:0;i:52;i:1;i:53;}}i:59988;a:1:{s:38:\"tx_addresscontact_domain_model_entries\";a:4:{i:0;s:2:\"52\";i:1;s:2:\"53\";i:2;i:54;i:3;i:55;}}
[...]
{i:37;a:2:{s:18:\"sys_file_reference\";a:31:{i:0;i:965980;i:1;s:5:\"78558\";i:2;s:6:\"873652\";i:3;s:6:\"873649\";i:4;s:6:\"873650\";i:5;s:5:\"78559\";i:6;i:966011;i:7;i:966012;i:8;i:966013;i:9;i:966014;i:10;i:966015;i:11;s:5:\"78566\";i:12;s:5:\"78567\";i:13;s:5:\"92667\";i:14;s:5:\"92668\";i:15;s:6:\"136503\";i:16;s:6:\"136504\";i:17;s:6:\"873653\";i:18;s:6:\"873654\";i:19;i:966020;i:20;i:966021;i:21;i:966022;i:22;i:966023;i:23;i:966024;i:24;i:966025;i:25;i:966026;i:26;i:966027;i:27;i:966032;i:28;i:966033;i:29;i:966034;i:30;i:966035;}s:34:\"tx_topdownloads_domain_model_files\";a:2:{i:0;i:54;i:1;i:55;}}}}","browseTrees":{"browsePages":"a:2:{i:0;a:10:{i:1;i:1;i:90;i:1;i:68059;i:1;i:365866;i:1;i:272777;i:1;i:48557936;i:1;i:10809630;i:1;i:8;i:1;i:646999;i:1;i:700020828;i:1;}i:1;a:3:{i:8;i:1;i:10;i:1;i:1;i:1;}}","folder":"a:32:[...]
i:12376;a:2:{i:30582462;i:1;i:149293772;i:1;}}"},"tx_recycler":{"tableSelection":"pages","depthSelection":999,"resultLimit":25},"tcaTrees":{"d2e1133f7858a3957716afd25af53d72":"19,16,9,8,10,20,23,14,13,15,12,11,17,7,6,5,4,3,1,2,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,0,94,540,77,554,82,83,84,85,86,87,88,89,90,91,92,93,95,96,97,98,652,650,651,99,620,103,104,105,106,107,108,110,112,113,114,115,116,117,118,119,120,121,123,126,128,646,644,642,638,636,539,659,657,653,583,564,626,555,567,124,648,614,579,575,573,571,569,612,599,601,611,610,592,613,598,609,596,608,594,589,591,593,597,602,605,552,600,604,607,127,668,665,663,661,670,679,681,677,675,673,727,725,723,689,687,699,697,691,720,715,713,711,709,707,704,683,749,741,733,731","56cc2cb74973d6f0ea9e9acbe15d6740":"94,540,57,77,554,82,83,84,85,86,87,88,89,90,91,92,93,95,96,97,98,99,103,105,106,107,108,110,112,113,114,115,116,117,118,119,120,121,123,128,23,539,28,30,31,32,33,34,35,36,583,37,38,39,41,43,44,45,46,48,52,53,54,55,56,564,58,59,60,61,62,63,64,65,66,67,68,555,69,74,567,124,579,575,573,571,569,27,599,601,598,596,592,594,591,593,597,7,607,9,12,589,24,603,602,605,600,604,16,552,127,0","a7d15c754468b5fc94c2c53b71143f5e":"94,540,57,77,554,82,83,84,85,86,87,88,89,90,91,92,93,95,96,97,98,99,103,105,106,107,108,110,112,113,114,115,116,117,118,119,120,121,123,128,23,539,28,30,31,32,33,34,35,36,583,37,38,39,41,43,44,45,46,48,52,53,54,55,56,564,58,59,60,61,62,63,64,65,66,67,68,555,69,74,567,124,579,575,573,571,569,27,599,601,598,596,592,594,591,593,597,607,9,12,589,24,603,602,16,605,552,600,604,127,0,612,611,610,613,609,608","443d80474938692cad9b4e38aa269105":",0,24,127,94,540,57,77,554,82,83,84,85,86,87,88,89,90,91,92,93,95,96,97,98,99,103,105,106,107,108,110,112,113,114,115,116,117,118,119,120,121,123,128,23,539,28,30,31,32,33,34,35,36,583,37,38,39,41,43,44,45,46,48,52,53,54,55,56,564,58,59,60,61,62,63,64,65,66,67,68,555,69,74,567,124,579,575,573,571,569,27,612,599,601,611,610,592,613,598,609,596,608,594,12,589,591,593,597,602,605,552,600,604,607"},"modulemenu":"{}","TSFE_adminConfig":{"DUMMY":"","display_top":"0","display_preview":"1","display_edit":"0","display_info":"1","preview_showHiddenPages":"1","preview_showHiddenRecords":"0","preview_showFluidDebug":"0","preview_simulateDate":"1649332800","display_cache":"0","display_tsdebug":"0"},"realName":"","email":"","password":"","password2":"","passwordCurrent":"","avatar":"","showHiddenFilesAndFolders":0,"copyLevels":"","recursiveDelete":0,"resetConfiguration":""}
How can I get more Information what connection has the problems?
maybe a serverside firewall is responsible for that. and blocks the suspischouls looking traffic

sqlite prepare statement error - no such table

I'm having some difficulty with my sqlite prepare statement. I get an error saying my table does not exist, although I've checked in multiple places for it, and it does exist, so I'm confuzzled.
The file is in the correct iPhone Simulator Application folder
The file is added to my project and viewable in the project navigator
It is also in my build phases- Copy Bundle Resources area.
I've cleaned and started running again.
The database exists and running my sql statement gets me just the
results I expected.
- (NSMutableArray *) getMyWorkout{
NSMutableArray *workoutArray = [[NSMutableArray alloc] init];
#try {
NSFileManager *fileMgr = [NSFileManager defaultManager];
NSString *dbPath = [[[NSBundle mainBundle] resourcePath ]stringByAppendingPathComponent:#"IOSDB.sqlite"];
NSLog(#"Db path is %#",dbPath);
BOOL success = [fileMgr fileExistsAtPath:dbPath];
if(!success) {
NSLog(#"Cannot locate database file '%#'.", dbPath);
}
if(!(sqlite3_open([dbPath UTF8String], &db) == SQLITE_OK)){
sqlite3_close(db);
NSLog(#"Failed to open database with message '%s'.", sqlite3_errmsg(db));
}
const char *sql = "SELECT Id, type, difficulty, duration, description FROM workoutTbl";
sqlite3_stmt *sqlStatement;
if(sqlite3_prepare(db, sql, -1, &sqlStatement, NULL) != SQLITE_OK){
NSLog(#"%s Prepare failure '%s' (%1d)", __FUNCTION__, sqlite3_errmsg(db), sqlite3_errcode(db));
} //...
When I run it, I get the file path and the following error
2013-02-01 18:07:08.060 TriShake[9251:c07] -[MyWorkoutList getMyWorkout] Prepare failure 'no such table: workoutTbl' (1)
I've checked out these other questions, but have been unable to find a solution
Sqlite Prepare Failed: no such table<tablename>
Sqlite3 gives "no such table" error on iPhone
I understand sqlite3_open() creates an empty database for you if the database path does not exist, but i know it exists, so frustration ensues. Any help or guidance you could give me would be much appreciated.
In terms of your immediate problem, it's going to be something simple.
You say you've "cleaned and built again", but have you actually removed the old app from your simulator? Either remove the app manually, or, easier, just reset the simulator entirely by choosing "reset content and settings" from the "iOS Simulator" menu. Sometimes Xcode is not good about knowing what files to copy over (particularly in a case like this where your running it on the device may be changing the timestamp of the file in the simulator's bundle!)
Run the app again.
If the app doesn't work as expected, open up the database in the simulator folder from the Mac and check out the database to make sure the table is there and precisely as you expected it to be. So navigate to the app, open the bundle (you may have to choose the "show package contents" option), confirm the existence of the database, but just as importantly, open it up this particular copy of the database in your favorite Mac sqlite3 tool of choice and confirm the existence of the table there.
Let us know what you find. Again, it's got to be something simple such as:
Perhaps the process of rebuilding the app was not reinstalling everything; I've occasionally had problems where Xcode elected to not re-copy something during the install on my simulator;
Perhaps your database in your project was accidentally put in a subdirectory, worse, you might have two copies sitting in different directories;
Perhaps the database in your Xcode project is missing (or has a typo or (esp in the case of the device) has incorrect filename capitalization) in the name of the table or file;
Etc.
For a lot of these errors, you won't notice the problem until you completely reset the simulator itself. There are a million little things it could be, but hopefully completely resetting the simulator and starting over will help you find the issue. It's always something simple when it comes to these sorts of issues.
Some other minor observations:
You probably should not be opening databases from the bundle. Programmatically copy it from the bundle to the Documents folder, and open the database from there. I know it seems unnecessary, but it's important for a myriad of reasons (if db changes during operation of the app, if db accidentally gets created on you, don't let Xcode get confused about things that changed (even if only file timestamps) in the bundle changing behind Xcode's back, etc.)
You should, if you need the database to be there, use sqlite3_open_v2, using either SQLITE_OPEN_READWRITE or SQLITE_OPEN_READONLY for flags (but do not include SQLITE_OPEN_CREATE). It causes headaches to ever give sqlite a chance to create a blank database for you, or otherwise modify it, so never give it an opportunity to so.
I have encounter the same problem as yours. If the IOS can not find the designated database file, defaultly it will create one for you instead of throwing an error. So you must open the database file IOS created for you which is blank so it off course contain the table you expected.
what I deal with it :
1 you have to bundle the resource file named *.sqlite3 into your project
2 Then You have to use [NSBundle mainBundle] pathFordirectory...... function to search your proper database file.
then you can open the database file you expected and can operate it properly
Best regards,
Not enough rep to comment on Jack's post, but that helped me.
In my case, I had mistyped my path for resource extension:
// Wrong
NSString *sqLiteDb = [[NSBundle mainBundle] pathForResource:#"productList"
ofType:#"sqlite3"];
// Should have been (added db ext)
NSString *sqLiteDb = [[NSBundle mainBundle] pathForResource:#"productList"
ofType:#"db"];
I would always get past the:
if (sqlite3_open([sqLiteDb UTF8String], &_database) == SQLITE_OK))
because it was automatically creating a db file for me.

How to localize specific phrasing on iPhone?

I have a few phrases on iPhone that translate in diverse logical blocks in some languages.
For example, in English it will be:
You have 5 camels in the Paris store
where in French it will be
Vous avez 5 chameaux dans le magasin de Paris
I don't quite get how to solve this, given the number of elements, the type of element (camel in this exemple) and the place are variable. I chose camels in this example on purpose, because you can't simply add a "S" at the end to mark multiplicity as in English or with some other words. If it was bottles we were talking about:
Vous avez 5 bouteilles dans le magasin de Paris
Does anyone have an idea? I don't really think I should implement a grammatical system to decide whether to add X, S or whatever else is the mark of multiplicity in the language used...
I should make clear that the NSLocalizedString currently are used inside a NSStringWithFormat of the form #"%# %d %# %# %#", with the second and the last %# built on the fly from an appropriate language database, and the first as well as third %# gotten from the localization strings file. Also, to elaborate on #rckoenes's answer, what he suggested is already implemented, but as I explained it's not the problem I have an issue with :D
What I would do is create to translations with string format in the Localizable.strings file.
The in code do something like:
NSString *camelStringFormat = nil;
if (numberOFCamels > 1) {
camelStringFormat = NSLocalizedString(#"OnCamel", #"Translation for one camel");
} else {
camelStringFormat = NSLocalizedString(#"MultipleCamels", #"Translation for multiple camels");
}
NSString *camelString = [NSString stringWithFormat:camelStringFormat, numberOFCamels, city];
Where Localizable.strings for englis would look like:
"OnCamel" = "You have %d camel in the %# store"
"MultipleCamels" = "You have %d camels in the %# store"
Where Localizable.strings for france would look like:
"OnCamel" = "Vous avez %d chameau dans le magasin de %#"
"MultipleCamels" = "Vous avez %d chameaux dans le magasin de %#"
Actually, after careful consideration, it is simpler to iconize this issue, by which I mean, use graphical elements instead of text. This way avoids the issue of multiple grammatical rules in languages. If anyone knows of an iPhone API that deals with grammatical localization though, I'm still intellectually interested. Among other things, because though I never would have expected so, the iPhone 4S advertisements showed that visually-impaired people use the iPhone and icons are not very well suited to them :D
It also allows me to transform a screen that was getting cluttered and streamline the experience.

Problems with escaped characters in JSON string

I have a JSON-string where I know where the problem is, I just can't figure out what to do. I have looked up the "forbidden characters" in a JSON-string but it just doesn't work.
When you run the show-method for FBStreamDialog for iPhone a view comes up with how it's going to look like when it's finally posted on the wall.
This happends when the "description"-property in my JSON-string is hard coded like #"Testing". But as soon as I add the text fetched from a data source which looks like this, it doesn't work:
"description":"
LIVE: Uk's No:1 Reggae Singer Bitty Mclean + Joey Fever, Sthlms No:1 Reggae Voice.
DJs
Deejay Flash & Micke Goulos + Mc Fabulous G.
The Vinyl Bar
Up...
"
Note: I only show the "description"-property of the JSON-string, because there is where the problem is.
So what I tried to do was, as I've explained before, to add the string "Testing" in the "description"-property. This worked. But I wanted to have the data source property of "description", of course. So I tried to replace all the characters that isn't a letter with this code:
shortString = [shortString stringByReplacingOccurrencesOfString:#"&" withString:#"och"];
shortString = [shortString stringByReplacingOccurrencesOfString:#"+" withString:#"plus"];
shortString = [shortString stringByReplacingOccurrencesOfString:#"," withString:#"komma"];
shortString = [shortString stringByReplacingOccurrencesOfString:#"'" withString:#"apostrof"];
shortString = [shortString stringByReplacingOccurrencesOfString:#":" withString:#"colon"];
The output of that is:
"description":"LIVEcolon Ukapostrofs Nocolon1 Reggae Singer Bitty Mclean plus Joey Feverkomma Sthlms Nocolon1 Reggae Voice.
DJs
Deejay Flash och Micke Goulos plus Mc Fabulous G.
The Vinyl Bar
Up...
Which looks like a approvable JSON string?
But apparently not, because the facebook view never shows how it's going to look if I use the data source "description"-property. It just shows the text box "What's on your mind".
This is driving me crazy.
Finally!
I understand why you didn't answer this question. How could you know that facebook connect doesn't allow \n in their StreamDialog's. Not for iPhone anyway.
So the solution was to replace \n with a whitespace or whatever you want.

NSFileManager creating folder (Cocoa error 513.)

I'm trying to create a folder inside the /sounds folder of my app.
-(void)productPurchased:(UAProduct*) product {
NSLog(#"[StoreFrontDelegate] Purchased: %# -- %#", product.productIdentifier, product.title);
NSFileManager *manager = [NSFileManager defaultManager];
NSString *bundleRoot = [[NSBundle mainBundle] bundlePath];
NSError *error;
NSString *dataPath = [NSString stringWithFormat:#"%#/sounds/%#", bundleRoot, product.title];
if (![manager fileExistsAtPath:dataPath isDirectory:YES]) {
[manager createDirectoryAtPath:dataPath withIntermediateDirectories:YES attributes:nil error:&error];
NSLog(#"Creating folder");
}
NSLog(#"%#", error);
}
But I get this error:
Error Domain=NSCocoaErrorDomain Code=513 "The operation couldn’t be completed. (Cocoa error 513.)" UserInfo=0x175120 {NSFilePath=/var/mobile/Applications/D83FDFF9-2600-4056-9047-05F82633A2E4/App.app/sounds/Test Tones, NSUnderlyingError=0x117520 "The operation couldn’t be completed. Operation not permitted"}
What am I doing wrong?
Thanks.
If you search Google on the error domain NSCocoaErrorDomain you find that the code 513 translates to the error NSFileWriteNoPermissionError.
This provides you with the critical clue for solving this problem:
This is the bundle directory containing the application itself. Because an application must be signed, you must not make changes to the contents of this directory at runtime. Doing so may prevent your application from launching later.
Specifically, you cannot modify the contents of a compiled app's bundle folder. This is because the bundle is the compiled application.
When you eventually distribute the app through the iTunes App Store, the application has a digital signature that validates the contents of the app. This signature is generated at compile time.
If you try to change the bundle after compilation, the app changes and the digital signature is no longer valid. This invalidates the application — who knows what code is in there, right? — and so Apple has set up iOS to throw an error if you try to modify the application.
Instead of writing to the bundle, your app can write to one of three accepted app-specific folders: <Application_Home>/Documents, <Application_Home>/tmp and <Application_Home>/Library/Caches.
Most likely, you will want to write to the <Application_Home>/Documents folder.
These folders are only accessible to your app. No other app can access the contents of these folders. (Likewise, your app cannot access another app's folders.)
You can set up your app to allow the end user to manage access to file data through iTunes, via desktop file sharing support.
This is because you should never modify the bundle of your application at runtime. Instead, you should have a folder elsewhere where you can add resources.
EDIT:
The error you are seeing is most likely because you cannot write to the bundle.
I encounter the same problem, when using a Log library. Finally, it's path format problem. Check the dataPath format. If it is Case 1, it is valid. In my case, it's Case 2, so I failed to create directory.
// Case 1
/var/mobile/Containers/Data/Application/5FB2CD2D-91DC-4FB2-8D6F-06369C70BB4A/Library/Caches/AppLogs
// Case 2, invalid format
file://var/mobile/Containers/Data/Application/5FB2CD2D-91DC-4FB2-8D6F-06369C70BB4A/Library/Caches/AppLogs
If the dataPath has a prefix, ex: file://, it is invalid.
As for an instance of NSURL, path will return the string like case 1, and absolutePath will return the string like case 2.
I'm still not totally clear on the meaning of the 513 error in my case, but I was getting it when just trying to read an opened file URL using [NSFileHandle fileHandleForReadingFromURL:theUrl error:&err ].
I realized from this answer that with iOS 13, I now need to use startAccessingSecurityScopedResource to access external files that are opened in the app. When I wrapped my file calls as follows, then the error 513 stopped occurring:
if( [myURL startAccessingSecurityScopedResource] )
{
NSFileHandle* myFile = [NSFileHandle fileHandleForReadingFromURL:myURL error:&err ];
// ...Do file reads here...
[theUrl stopAccessingSecurityScopedResource];
}