FWApplicationClassWrapper

@interface FWApplicationClassWrapper : FWClassWrapper

Undocumented

FWAdaptive

  • 是否是调试模式

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isDebug;

FWToolkit

  • 能否打开URL(NSString|NSURL),需配置对应URL SCHEME到Info.plist才能返回YES

    Declaration

    Objective-C

    - (BOOL)canOpenURL:(nonnull id)url;
  • 打开URL,支持NSString|NSURL,即使未配置URL SCHEME,实际也能打开成功,只要调用时已打开过对应App

    Declaration

    Objective-C

    - (void)openURL:(nonnull id)url;
  • 打开URL,支持NSString|NSURL,完成时回调,即使未配置URL SCHEME,实际也能打开成功,只要调用时已打开过对应App

    Declaration

    Objective-C

    - (void)openURL:(nonnull id)url
        completionHandler:(nullable void (^)(BOOL))completion;
  • 打开通用链接URL,支持NSString|NSURL,完成时回调。如果是iOS10+通用链接且安装了App,打开并回调YES,否则回调NO

    Declaration

    Objective-C

    - (void)openUniversalLinks:(nonnull id)url
             completionHandler:(nullable void (^)(BOOL))completion;
  • 判断URL是否是系统链接(如AppStore|电话|设置等),支持NSString|NSURL

    Declaration

    Objective-C

    - (BOOL)isSystemURL:(nonnull id)url;
  • 判断URL是否HTTP链接,支持NSString|NSURL

    Declaration

    Objective-C

    - (BOOL)isHttpURL:(nonnull id)url;
  • 判断URL是否是AppStore链接,支持NSString|NSURL

    Declaration

    Objective-C

    - (BOOL)isAppStoreURL:(nonnull id)url;
  • 打开AppStore下载页

    Declaration

    Objective-C

    - (void)openAppStore:(nonnull NSString *)appId;
  • 打开AppStore评价页

    Declaration

    Objective-C

    - (void)openAppStoreReview:(nonnull NSString *)appId;
  • 打开应用内评价,有次数限制

    Declaration

    Objective-C

    - (void)openAppReview;
  • 打开系统应用设置页

    Declaration

    Objective-C

    - (void)openAppSettings;
  • 打开系统邮件App

    Declaration

    Objective-C

    - (void)openMailApp:(nonnull NSString *)email;
  • 打开系统短信App

    Declaration

    Objective-C

    - (void)openMessageApp:(nonnull NSString *)phone;
  • 打开系统电话App

    Declaration

    Objective-C

    - (void)openPhoneApp:(nonnull NSString *)phone;
  • 打开系统分享

    Declaration

    Objective-C

    - (void)openActivityItems:(nonnull NSArray *)activityItems
                excludedTypes:(nullable NSArray<UIActivityType> *)excludedTypes;
  • 打开内部浏览器,支持NSString|NSURL

    Declaration

    Objective-C

    - (void)openSafariController:(nonnull id)url;
  • 打开内部浏览器,支持NSString|NSURL,点击完成时回调

    Declaration

    Objective-C

    - (void)openSafariController:(nonnull id)url
               completionHandler:(nullable void (^)(void))completion;
  • 打开短信控制器,完成时回调

    Declaration

    Objective-C

    - (void)openMessageController:
                (nonnull MFMessageComposeViewController *)controller
                completionHandler:(nullable void (^)(BOOL))completion;
  • 打开邮件控制器,完成时回调

    Declaration

    Objective-C

    - (void)openMailController:(nonnull MFMailComposeViewController *)controller
             completionHandler:(nullable void (^)(BOOL))completion;
  • 打开Store控制器,完成时回调

    Declaration

    Objective-C

    - (void)openStoreController:(nonnull NSDictionary<NSString *, id> *)parameters
              completionHandler:(nullable void (^)(BOOL))completion;
  • 打开视频播放器,支持AVPlayerItem|NSURL|NSString

    Declaration

    Objective-C

    - (nullable AVPlayerViewController *)openVideoPlayer:(nonnull id)url;
  • 打开音频播放器,支持NSURL|NSString

    Declaration

    Objective-C

    - (nullable AVAudioPlayer *)openAudioPlayer:(nonnull id)url;