canOpenUrl - Diese App darf nicht nach Schema instragram @ frage
Im Versuch, die Instagram-URL zu meiner App in iOS9 hinzuzufügen, wird jedoch die folgende Warnung angezeigt:
-canOpenURL: failed for URL: "instragram://media?id=MEDIA_ID" - error: "This app is not allowed to query for scheme instragram"
Ich habe jedoch das Folgende zum @ hinzugefüLSApplicationQueriesSchemes
in meineminfo.plist
;
<key>LSApplicationQueriesSchemes</key>
<array>
<string>instagram</string>
<string>instagram://media?id=MEDIA_ID</string>//this one seems to be the issue
</array>
Hilfe wird sehr geschätzt?
EDIT 1
Dies ist der Code, mit dem ich instagram öffne:
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");
}
based aus diesem Beispiel.