iOS9에서 내 앱에 Instagram URL을 추가하려고하지만 다음과 같은 경고가 표시됩니다.
-canOpenURL: failed for URL: "instragram://media?id=MEDIA_ID" - error: "This app is not allowed to query for scheme instragram"
그러나, 나는 다음을 LSApplicationQueriesSchemes
내에 추가했습니다 info.plist
.
<key>LSApplicationQueriesSchemes</key>
<array>
<string>instagram</string>
<string>instagram://media?id=MEDIA_ID</string>//this one seems to be the issue
</array>
도움을 주시면 감사하겠습니다.
편집 1
이것은 Instagram을 여는 데 사용하는 코드입니다.
NSURL * instagramURL = [NSURL URLWithString:@"instragram://media?id=MEDIA_ID"];//edit: note, to anyone copy pasting this code, please notice the typo OP has in the url, that being "instragram" instead of "instagram". This typo was discovered after this StackOverflow question was posted.
if ([[UIApplication sharedApplication] canOpenURL:instagramURL]) {
//do stuff
}
else{
NSLog(@"NO instgram found");
}
이 예제를 기반으로합니다.