AirDrop to receive files


I think it would be fantastic if JUCE support receiving files on iOS. I just tried and succeeded to receive file from other devices via AirDrop. Can you please consider to implement this?

  1. In, add following method.
  • (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey, id > *)options;

  • (BOOL)application:(UIApplication )app
    openURL:(NSURL )url
    options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> )options
    juceApp = JUCEApplicationBase::getInstance();
    absoluteString = [url absoluteString];
    const char
    cstr = [absoluteString UTF8String];
    URL juceUrl(cstr);
    BOOL result = juceApp->openUrl(juceUrl);
    return result;

  1. In juce_ApplicationBase.h, add following method.
    virtual bool openUrl(URL& url) { return false; }

Then I implemented the openUrl() method in my StandAloneApp.cpp then I could receive files via AirDrop.