2011-10-16 81 views
0

我有自定義網址架構的問題。我認爲我已經正確地配置了它,但是如果應用程序處於「後臺」(即,我可以看到它雙擊主頁按鈕),它不會打開該應用程序,當我點擊鏈接。自定義網址架構無法打開應用程序

<key>CFBundleURLTypes</key> 
<array> 
<dict> 
<key>CFBundleURLName</key> 
<string>com.test</string> 
<key>CFBundleURLSchemes</key> 
<array> 
<string>test</string> 
<string>test1</string> 
</array> 
</dict> 
</array> 

鏈路

<a href="test://this_is_a_test">TEST</a> 

其他應用程序的工作很好,但不是我的。

感謝, 利瑪竇

回答

0

return NO;- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation方法地方?

除了返回NO之外,我想不出任何會導致它不能打開的東西。

+0

' - (BOOL)申請:(UIApplication的*)應用程序的OpenURL:(NSURL *)網址sourceApplication:(的NSString *)sourceApplication註釋:(ID)註釋 { 的NSLog(@ 「%@%@」,網址, sourceApplication); 返回YES; }' 這是我使用的代碼。我已經下載了一個示例發件人和收件人的應用程序,工作正常 – matrog

相關問題