├── .circleci └── config.yml ├── .editorconfig ├── .gitattributes ├── .gitignore ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── android ├── .project ├── build.gradle ├── gradle.properties ├── libs │ ├── android-gif-drawable-release@1.2.17.aar │ ├── miit_mdid_1.0.10.aar │ ├── uniMPSDK-release.aar │ └── uniapp-release.aar └── src │ └── main │ ├── AndroidManifest.xml │ ├── assets │ ├── data │ │ ├── dcloud_control.xml │ │ ├── dcloud_error.html │ │ └── dcloud_properties.xml │ └── uni-jsframework.js │ └── java │ └── com │ └── reactnativeuni │ ├── UniModule.kt │ ├── UniPackage.kt │ └── UniSplashView.kt ├── babel.config.js ├── example ├── android │ ├── .project │ ├── .settings │ │ └── org.eclipse.buildship.core.prefs │ ├── app │ │ ├── build.gradle │ │ ├── debug.keystore │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── debug │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── UniExample │ │ │ │ └── ReactNativeFlipper.java │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── assets │ │ │ └── apps │ │ │ │ ├── __UNI__7586C24 │ │ │ │ └── www │ │ │ │ │ ├── __uniappchooselocation.js │ │ │ │ │ ├── __uniappes6.js │ │ │ │ │ ├── __uniappopenlocation.js │ │ │ │ │ ├── __uniapppicker.js │ │ │ │ │ ├── __uniappquill.js │ │ │ │ │ ├── __uniappquillimageresize.js │ │ │ │ │ ├── __uniappscan.js │ │ │ │ │ ├── __uniappsuccess.png │ │ │ │ │ ├── __uniappview.html │ │ │ │ │ ├── app-config-service.js │ │ │ │ │ ├── app-config.js │ │ │ │ │ ├── app-service.js │ │ │ │ │ ├── app-view.js │ │ │ │ │ ├── manifest.json │ │ │ │ │ ├── pages │ │ │ │ │ └── nvue │ │ │ │ │ │ ├── badge │ │ │ │ │ │ └── badge.js │ │ │ │ │ │ ├── calendar │ │ │ │ │ │ └── calendar.js │ │ │ │ │ │ ├── card │ │ │ │ │ │ └── card.js │ │ │ │ │ │ ├── collapse │ │ │ │ │ │ └── collapse.js │ │ │ │ │ │ ├── combox │ │ │ │ │ │ └── combox.js │ │ │ │ │ │ ├── countdown │ │ │ │ │ │ └── countdown.js │ │ │ │ │ │ ├── drawer │ │ │ │ │ │ └── drawer.js │ │ │ │ │ │ ├── fab │ │ │ │ │ │ └── fab.js │ │ │ │ │ │ ├── fav │ │ │ │ │ │ └── fav.js │ │ │ │ │ │ ├── goods-nav │ │ │ │ │ │ └── goods-nav.js │ │ │ │ │ │ ├── grid │ │ │ │ │ │ └── grid.js │ │ │ │ │ │ ├── icons │ │ │ │ │ │ └── icons.js │ │ │ │ │ │ ├── index │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── indexed-list │ │ │ │ │ │ └── indexed-list.js │ │ │ │ │ │ ├── link │ │ │ │ │ │ └── link.js │ │ │ │ │ │ ├── list │ │ │ │ │ │ └── list.js │ │ │ │ │ │ ├── load-more │ │ │ │ │ │ └── load-more.js │ │ │ │ │ │ ├── nav-bar │ │ │ │ │ │ └── nav-bar.js │ │ │ │ │ │ ├── notice-bar │ │ │ │ │ │ └── notice-bar.js │ │ │ │ │ │ ├── number-box │ │ │ │ │ │ └── number-box.js │ │ │ │ │ │ ├── pagination │ │ │ │ │ │ └── pagination.js │ │ │ │ │ │ ├── popup │ │ │ │ │ │ └── popup.js │ │ │ │ │ │ ├── rate │ │ │ │ │ │ └── rate.js │ │ │ │ │ │ ├── search-bar │ │ │ │ │ │ └── search-bar.js │ │ │ │ │ │ ├── section │ │ │ │ │ │ └── section.js │ │ │ │ │ │ ├── segmented-control │ │ │ │ │ │ └── segmented-control.js │ │ │ │ │ │ ├── steps │ │ │ │ │ │ └── steps.js │ │ │ │ │ │ ├── swipe-action │ │ │ │ │ │ └── swipe-action.js │ │ │ │ │ │ ├── swiper-dot │ │ │ │ │ │ └── swiper-dot.js │ │ │ │ │ │ ├── tag │ │ │ │ │ │ └── tag.js │ │ │ │ │ │ ├── title │ │ │ │ │ │ └── title.js │ │ │ │ │ │ └── transition │ │ │ │ │ │ └── transition.js │ │ │ │ │ ├── static │ │ │ │ │ ├── api.png │ │ │ │ │ ├── apiHL.png │ │ │ │ │ ├── c1.png │ │ │ │ │ ├── c2.png │ │ │ │ │ ├── c3.png │ │ │ │ │ ├── c4.png │ │ │ │ │ ├── c5.png │ │ │ │ │ ├── c6.png │ │ │ │ │ ├── c7.png │ │ │ │ │ ├── c8.png │ │ │ │ │ ├── c9.png │ │ │ │ │ ├── component.png │ │ │ │ │ ├── componentHL.png │ │ │ │ │ ├── logo.png │ │ │ │ │ ├── template.png │ │ │ │ │ ├── templateHL.png │ │ │ │ │ ├── uni.png │ │ │ │ │ └── uni.ttf │ │ │ │ │ ├── view.css │ │ │ │ │ └── view.umd.min.js │ │ │ │ └── __UNI__82FC134 │ │ │ │ └── www │ │ │ │ ├── __uniappchooselocation.js │ │ │ │ ├── __uniappes6.js │ │ │ │ ├── __uniappopenlocation.js │ │ │ │ ├── __uniapppicker.js │ │ │ │ ├── __uniappquill.js │ │ │ │ ├── __uniappquillimageresize.js │ │ │ │ ├── __uniappscan.js │ │ │ │ ├── __uniappsuccess.png │ │ │ │ ├── __uniappview.html │ │ │ │ ├── app-config-service.js │ │ │ │ ├── app-config.js │ │ │ │ ├── app-service.js │ │ │ │ ├── app-view.js │ │ │ │ ├── manifest.json │ │ │ │ ├── static │ │ │ │ ├── arc.png │ │ │ │ ├── emptyCart.jpg │ │ │ │ ├── errorImage.jpg │ │ │ │ ├── missing-face.png │ │ │ │ ├── select.png │ │ │ │ ├── selected.png │ │ │ │ ├── tab-cart-current.png │ │ │ │ ├── tab-cart.png │ │ │ │ ├── tab-cate-current.png │ │ │ │ ├── tab-cate.png │ │ │ │ ├── tab-home-current.png │ │ │ │ ├── tab-home.png │ │ │ │ ├── tab-my-current.png │ │ │ │ ├── tab-my.png │ │ │ │ ├── temp │ │ │ │ │ ├── ad-splash.jpg │ │ │ │ │ ├── ad1.jpg │ │ │ │ │ ├── ad2.jpg │ │ │ │ │ ├── ad3.jpg │ │ │ │ │ ├── banner1.jpg │ │ │ │ │ ├── banner2.jpg │ │ │ │ │ ├── banner3.jpg │ │ │ │ │ ├── banner4.jpg │ │ │ │ │ ├── c1.png │ │ │ │ │ ├── c2.png │ │ │ │ │ ├── c3.png │ │ │ │ │ ├── c4.png │ │ │ │ │ ├── c5.png │ │ │ │ │ ├── c6.png │ │ │ │ │ ├── c7.png │ │ │ │ │ ├── c8.png │ │ │ │ │ ├── cate1.jpg │ │ │ │ │ ├── cate10.jpg │ │ │ │ │ ├── cate11.jpg │ │ │ │ │ ├── cate12.jpg │ │ │ │ │ ├── cate13.jpg │ │ │ │ │ ├── cate14.jpg │ │ │ │ │ ├── cate15.jpg │ │ │ │ │ ├── cate16.jpg │ │ │ │ │ ├── cate17.jpg │ │ │ │ │ ├── cate18.jpg │ │ │ │ │ ├── cate19.jpg │ │ │ │ │ ├── cate2.jpg │ │ │ │ │ ├── cate20.jpg │ │ │ │ │ ├── cate21.jpg │ │ │ │ │ ├── cate22.jpg │ │ │ │ │ ├── cate23.jpg │ │ │ │ │ ├── cate24.jpg │ │ │ │ │ ├── cate3.jpg │ │ │ │ │ ├── cate4.jpg │ │ │ │ │ ├── cate5.jpg │ │ │ │ │ ├── cate6.jpg │ │ │ │ │ ├── cate7.jpg │ │ │ │ │ ├── cate8.jpg │ │ │ │ │ ├── cate9.jpg │ │ │ │ │ ├── h1.png │ │ │ │ │ ├── secskill-img.jpg │ │ │ │ │ ├── share_moment.png │ │ │ │ │ ├── share_qq.png │ │ │ │ │ ├── share_qqzone.png │ │ │ │ │ └── share_wechat.png │ │ │ │ ├── user-bg.jpg │ │ │ │ ├── vip-card-bg.png │ │ │ │ └── yticon.ttf │ │ │ │ ├── view.css │ │ │ │ └── view.umd.min.js │ │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── reactnativeuni │ │ │ │ ├── MainActivity.java │ │ │ │ └── MainApplication.java │ │ │ └── res │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ └── values │ │ │ ├── strings.xml │ │ │ └── styles.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── app.json ├── babel.config.js ├── index.js ├── ios │ ├── File.swift │ ├── Podfile │ ├── Podfile.lock │ ├── UniExample-Bridging-Header.h │ ├── UniExample.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── UniExample.xcscheme │ ├── UniExample.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── UniExample │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Base.lproj │ │ └── LaunchScreen.xib │ │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ │ ├── Info.plist │ │ ├── main.m │ │ └── unimp │ │ ├── Apps │ │ ├── __UNI__7586C24.wgt │ │ └── __UNI__82FC134.wgt │ │ └── Libs │ │ └── liblibIO.a ├── metro.config.js ├── package.json └── src │ ├── App.tsx │ └── progress.json ├── images └── example.gif ├── ios ├── Headers │ ├── DCUniMP.h │ ├── DCUniMPMenuActionSheetStyle.h │ ├── DCUniMPSDKEngine.h │ └── weexHeader │ │ ├── JSContext+Weex.h │ │ ├── NSObject+WXSwizzle.h │ │ ├── UniPluginProtocol.h │ │ ├── WXAComponent.h │ │ ├── WXAnalyzerCenter.h │ │ ├── WXAnalyzerProtocol.h │ │ ├── WXApmForInstance.h │ │ ├── WXApmProtocol.h │ │ ├── WXAppConfiguration.h │ │ ├── WXAppMonitorProtocol.h │ │ ├── WXBaseViewController.h │ │ ├── WXBridgeManager.h │ │ ├── WXBridgeProtocol.h │ │ ├── WXComponent+Layout.h │ │ ├── WXComponent.h │ │ ├── WXComponentManager.h │ │ ├── WXConfigCenterProtocol.h │ │ ├── WXConvert.h │ │ ├── WXDebugTool.h │ │ ├── WXDefine.h │ │ ├── WXDisplayLinkManager.h │ │ ├── WXErrorView.h │ │ ├── WXEventModuleProtocol.h │ │ ├── WXExceptionUtils.h │ │ ├── WXExtendCallNativeProtocol.h │ │ ├── WXImgLoaderProtocol.h │ │ ├── WXIndicatorComponent.h │ │ ├── WXJSExceptionInfo.h │ │ ├── WXJSExceptionProtocol.h │ │ ├── WXJSFrameworkLoadProtocol.h │ │ ├── WXListComponent.h │ │ ├── WXLog.h │ │ ├── WXModalUIModule.h │ │ ├── WXModuleProtocol.h │ │ ├── WXMonitor.h │ │ ├── WXNavigationProtocol.h │ │ ├── WXNetworkProtocol.h │ │ ├── WXPageEventNotifyEvent.h │ │ ├── WXPrerenderManager.h │ │ ├── WXRecyclerComponent.h │ │ ├── WXResourceLoader.h │ │ ├── WXResourceRequest.h │ │ ├── WXResourceRequestHandler.h │ │ ├── WXResourceResponse.h │ │ ├── WXRichText.h │ │ ├── WXRootView.h │ │ ├── WXRootViewController.h │ │ ├── WXSDKEngine.h │ │ ├── WXSDKError.h │ │ ├── WXSDKInstance+Bridge.h │ │ ├── WXSDKInstance+DCExtend.h │ │ ├── WXSDKInstance.h │ │ ├── WXSDKManager.h │ │ ├── WXScrollerComponent.h │ │ ├── WXScrollerProtocol.h │ │ ├── WXTracingManager.h │ │ ├── WXTracingProtocol.h │ │ ├── WXType.h │ │ ├── WXURLRewriteProtocol.h │ │ ├── WXUtility.h │ │ ├── WXValidateProtocol.h │ │ ├── WXView.h │ │ ├── WXVoiceOverModule.h │ │ ├── WXWebSocketHandler.h │ │ ├── WeexProtocol.h │ │ ├── WeexSDK.h │ │ ├── flex_enum.h │ │ ├── layout.h │ │ └── style.h ├── Resources │ ├── PandoraApi.bundle │ │ ├── all.js │ │ ├── authapi.json │ │ ├── back@2x.png │ │ ├── back_barbutton.png │ │ ├── back_barbutton@2x.png │ │ ├── back_barbutton@3x.png │ │ ├── beep-beep.caf │ │ ├── bu_close@3x.png │ │ ├── close2_barbutton.png │ │ ├── close2_barbutton@2x.png │ │ ├── close2_barbutton@3x.png │ │ ├── close_barbutton.png │ │ ├── close_barbutton@2x.png │ │ ├── close_barbutton@3x.png │ │ ├── cpcwatchdog.json │ │ ├── dcloud3.dat │ │ ├── error.html │ │ ├── favorite_barbutton@2x.png │ │ ├── favorite_barbutton@3x.png │ │ ├── favorite_broswer@2x.png │ │ ├── favorite_broswer@3x.png │ │ ├── feature.plist │ │ ├── history_barbutton@2x.png │ │ ├── history_barbutton@3x.png │ │ ├── iconfont.ttf │ │ ├── image │ │ │ ├── loc2@2x.png │ │ │ └── loc2@3x.png │ │ ├── left-shadow-img@2x.png │ │ ├── line@2x.png │ │ ├── line@3x.png │ │ ├── listening_microphone@2x.png │ │ ├── listening_microphone@3x.png │ │ ├── more_barbutton.png │ │ ├── more_barbutton@2x.png │ │ ├── more_barbutton@3x.png │ │ ├── navLine@2x.png │ │ ├── plugin │ │ │ ├── back.png │ │ │ ├── back_disable.png │ │ │ ├── back_press.png │ │ │ ├── cancel.png │ │ │ ├── forward.png │ │ │ ├── forward_disable.png │ │ │ ├── forward_press.png │ │ │ ├── gallery │ │ │ │ └── video.png │ │ │ ├── refresh.png │ │ │ └── stop.png │ │ ├── pulltorefresh.js │ │ ├── renovate_barbutton.png │ │ ├── renovate_barbutton@2x.png │ │ ├── renovate_barbutton@3x.png │ │ ├── scan_barbutton@2x.png │ │ ├── scan_barbutton@3x.png │ │ ├── search_barbutton@2x.png │ │ ├── search_barbutton@3x.png │ │ ├── selected_barbutton.png │ │ ├── selected_barbutton@2x.png │ │ ├── selected_barbutton@3x.png │ │ ├── share_barbutton.png │ │ ├── share_barbutton@2x.png │ │ ├── share_barbutton@3x.png │ │ ├── shortcut_barbutton.png │ │ ├── shortcut_barbutton@2x.png │ │ ├── shortcut_barbutton@3x.png │ │ ├── sitemap │ │ │ ├── H52588A9C.json │ │ │ ├── H5A0B1958.json │ │ │ ├── __W2A__H56B3FED7.json │ │ │ ├── __W2A__H5AE54D45.json │ │ │ ├── __W2A__H5E349CB7.json │ │ │ ├── __W2A__H5F4563E8.json │ │ │ ├── __W2A__amazon.cn.json │ │ │ ├── __W2A__edaijia.cn.json │ │ │ ├── __W2A__m.dangdang.com.json │ │ │ ├── __W2A__m.daojia.com.json │ │ │ ├── __W2A__m.dianping.com.json │ │ │ ├── __W2A__m.elong.com.json │ │ │ ├── __W2A__m.iqiyi.com.json │ │ │ ├── __W2A__m.ireader.com.json │ │ │ ├── __W2A__m.lashou.com.json │ │ │ ├── __W2A__m.mafengwo.cn.json │ │ │ ├── __W2A__m.nuomi.com.json │ │ │ ├── __W2A__m.sjjd.com.json │ │ │ ├── __W2A__m.taobao.com.json │ │ │ ├── __W2A__m.tv.sohu.com.json │ │ │ ├── __W2A__m.v.6.cn.json │ │ │ ├── __W2A__m.yhd.com.json │ │ │ ├── __W2A__meituan.com.json │ │ │ ├── __W2A__www.tianya.cn.json │ │ │ ├── __W2A__www.youku.com.json │ │ │ └── __W2A__www.zhihu.com.json │ │ └── wap2app │ │ │ ├── __shortcut.js │ │ │ ├── __template.json │ │ │ ├── __wap2app.js │ │ │ ├── __wap2app.ttf │ │ │ ├── __wap2appbrowser.html │ │ │ ├── __wap2appcontext.html │ │ │ ├── __wap2apperror.html │ │ │ ├── __wap2appplayer.js │ │ │ ├── __wap2appquit.js │ │ │ ├── __wap2appswiper.html │ │ │ ├── __wap2apptabbar.css │ │ │ └── __wap2apptabbar.js │ ├── __uniappes6.js │ ├── uni-jsframework.js │ ├── unincomponents.ttf │ ├── weex-polyfill.js │ └── weexUniJs.js ├── Uni.h ├── Uni.m ├── Uni.xcodeproj │ └── project.pbxproj └── libs │ ├── libSDWebImage.a │ ├── libcoreSupport.a │ ├── liblibNativeObj.a │ ├── liblibNavigator.a │ ├── liblibPDRCore.a │ ├── liblibStorage.a │ ├── liblibUI.a │ ├── liblibWeex.a │ └── storage.framework │ ├── Headers │ ├── StorageManager.h │ └── storage.h │ ├── Info.plist │ ├── Modules │ └── module.modulemap │ └── storage ├── package.json ├── react-native-uni.podspec ├── src ├── __tests__ │ └── index.test.tsx └── index.tsx └── tsconfig.json /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2.1 2 | 3 | executors: 4 | default: 5 | docker: 6 | - image: circleci/node:10 7 | working_directory: ~/project 8 | 9 | commands: 10 | attach_project: 11 | steps: 12 | - attach_workspace: 13 | at: ~/project 14 | 15 | jobs: 16 | install-dependencies: 17 | executor: default 18 | steps: 19 | - checkout 20 | - attach_project 21 | - restore_cache: 22 | keys: 23 | - dependencies-{{ checksum "package.json" }} 24 | - dependencies- 25 | - restore_cache: 26 | keys: 27 | - dependencies-example-{{ checksum "example/package.json" }} 28 | - dependencies-example- 29 | - run: 30 | name: Install dependencies 31 | command: | 32 | yarn install --cwd example --frozen-lockfile 33 | yarn install --frozen-lockfile 34 | - save_cache: 35 | key: dependencies-{{ checksum "package.json" }} 36 | paths: node_modules 37 | - save_cache: 38 | key: dependencies-example-{{ checksum "example/package.json" }} 39 | paths: example/node_modules 40 | - persist_to_workspace: 41 | root: . 42 | paths: . 43 | 44 | lint: 45 | executor: default 46 | steps: 47 | - attach_project 48 | - run: 49 | name: Lint files 50 | command: | 51 | yarn lint 52 | 53 | typescript: 54 | executor: default 55 | steps: 56 | - attach_project 57 | - run: 58 | name: Typecheck files 59 | command: | 60 | yarn typescript 61 | 62 | unit-tests: 63 | executor: default 64 | steps: 65 | - attach_project 66 | - run: 67 | name: Run unit tests 68 | command: | 69 | yarn test --coverage 70 | - store_artifacts: 71 | path: coverage 72 | destination: coverage 73 | 74 | build-package: 75 | executor: default 76 | steps: 77 | - attach_project 78 | - run: 79 | name: Build package 80 | command: | 81 | yarn prepare 82 | 83 | workflows: 84 | build-and-test: 85 | jobs: 86 | - install-dependencies 87 | - lint: 88 | requires: 89 | - install-dependencies 90 | - typescript: 91 | requires: 92 | - install-dependencies 93 | - unit-tests: 94 | requires: 95 | - install-dependencies 96 | - build-package: 97 | requires: 98 | - install-dependencies 99 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | 9 | indent_style = space 10 | indent_size = 2 11 | 12 | end_of_line = lf 13 | charset = utf-8 14 | trim_trailing_whitespace = true 15 | insert_final_newline = true 16 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | # specific for windows script files 3 | *.bat text eol=crlf 4 | ios/libs/liblibWeex.a filter=lfs diff=lfs merge=lfs -text 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # XDE 6 | .expo/ 7 | 8 | # VSCode 9 | .vscode/ 10 | jsconfig.json 11 | 12 | # Xcode 13 | # 14 | build/ 15 | *.pbxuser 16 | !default.pbxuser 17 | *.mode1v3 18 | !default.mode1v3 19 | *.mode2v3 20 | !default.mode2v3 21 | *.perspectivev3 22 | !default.perspectivev3 23 | xcuserdata 24 | *.xccheckout 25 | *.moved-aside 26 | DerivedData 27 | *.hmap 28 | *.ipa 29 | *.xcuserstate 30 | project.xcworkspace 31 | 32 | # Android/IJ 33 | # 34 | .idea 35 | .gradle 36 | local.properties 37 | android.iml 38 | 39 | # Cocoapods 40 | # 41 | example/ios/Pods 42 | 43 | # node.js 44 | # 45 | node_modules/ 46 | npm-debug.log 47 | yarn-debug.log 48 | yarn-error.log 49 | 50 | # BUCK 51 | buck-out/ 52 | \.buckd/ 53 | android/app/libs 54 | android/keystores/debug.keystore 55 | 56 | # Expo 57 | .expo/* 58 | 59 | # generated by bob 60 | lib/ 61 | yarn.lock 62 | example/yarn.lock 63 | .env 64 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 puti94 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # react-native-uni 2 | 3 | react-native 桥接uni小程序sdk 4 | 5 | 6 | [uni小程序SDK](https://nativesupport.dcloud.net.cn/) 7 | > uni-app 是一个使用 Vue.js 开发所有前端应用的框架,开发者编写一套代码,可发布到iOS、Android、H5、以及各种小程序(微信/支付宝/百度/头条/QQ/钉钉/淘宝)、快应用等多个平台。 8 | 9 | 有nvue部分底层使用weex实现的,但是感觉体验还是没有rn好。rn在国内又不太接地气,没有uni各种完善的第三方框架,就可以集成uni小程序sdk,使我们的react-native应用具有跟微信小程序类似的功能。 10 | 11 | ![示例](./images/example.gif) 12 | 13 | ## Installation 14 | 15 | ### 16 | 17 | ```sh 18 | npm install react-native-uni --save 19 | //or 20 | yarn add react-native-uni 21 | ``` 22 | 23 | ## Usage 24 | 25 | ```js 26 | import * as Uni from "react-native-uni"; 27 | 28 | // ... 29 | Uni.initialize({...}) 30 | Uni.launch({appid: '__UNI__7586C24'}) 31 | ``` 32 | rn >= 0.60 自动链接 `cd ios && pod install` 33 | rn < 0.60 34 | 35 | ```bash 36 | react-native link react-native-webview 37 | ``` 38 | 39 | 安卓有些配置项请参考example项目 40 | 41 | ## 注意事项 42 | [uni小程序官网](https://nativesupport.dcloud.net.cn/) 43 | 此项目是在react-native中集成uni的小程序sdk,相关注意事项参考官方文档 44 | 由于依赖weex等的相关包比较大,只是集成基础包应用都会大个20M左右。 45 | 此桥接库只默认集成了基础包,如果提示缺少模块,只需要去官网下载sdk添加缺少的包 46 | 47 | 48 | ## Api 49 | 50 | ### initialize(params?: Config): Promise 51 | 52 | ```ts 53 | type Config = { 54 | // 胶囊按钮的标题和标识 55 | items?: { title: string; key: string }[]; 56 | //是否显示胶囊按钮 57 | capsule?: boolean; 58 | //安卓独有,胶囊按钮字体大小 59 | fontSize?: string; 60 | //安卓独有,胶囊按钮字体颜色 61 | fontColor?: string; 62 | //安卓独有,胶囊按钮字体宽度 63 | fontWeight?: string; 64 | }; 65 | ``` 66 | 初始化框架,越前面越好,只需要调用一次 67 | 68 | 69 | ### setSplashView(component: ComponentType<{ appid: string }>) 70 | 71 | 设置小程序开启的启动页面 72 | 73 | ### launch(arg: LaunchArgs): Promise 74 | 75 | ```ts 76 | type LaunchArgs = { 77 | //uni小程序id 78 | appid: string; 79 | //需要传给小程序的参数 80 | params?: Object; 81 | //打开小程序的路径 82 | path?: string; 83 | }; 84 | ``` 85 | 86 | 打开小程序。 87 | 88 | ### isExistsApp(appid: string): Promise 89 | 90 | 根据小程序id判断是否存在小程序 91 | 92 | ### getRuningAppid(): Promise 93 | 94 | 获取真正运行的小程序id 95 | 96 | ### getAppVersionInfo(appid: string): Promise<{ name: string; code: number } | null> 97 | 98 | 获取小程序版本信息 99 | 100 | ### getAppBasePath(appid: string): Promise 101 | 102 | 获取小程序运行路径 103 | 104 | ### getCurrentPageUrl(): Promise 105 | 106 | 获取当前小程序的直连url 107 | 108 | ### closeCurrentApp(): Promise 109 | 110 | 关闭当前小程序 111 | 112 | ### releaseWgtToRunPathFromPath(path: string): Promise 113 | 114 | 释放wgt文件 115 | 116 | ### onMenuClick(cb: (key: any) => void) 117 | 118 | 监听胶囊自定义按键启动 119 | 120 | ### onEventReceive(cb: (data: any) => void) 121 | 122 | 监听小程序向app发送的消息 123 | 124 | ### onAppClose(cb: () => void) 125 | 126 | 监听小程序关闭 127 | 128 | ## QA 129 | 130 | #### 打release包出现以下错误 131 | > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade 132 | More than one file was found with OS independent path 'AndroidManifest.xml' 133 | 134 | `android/build.gradle` 修改gradle版本 `classpath("com.android.tools.build:gradle:3.4.0")` 135 | 136 | ## Contributing 137 | 138 | See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow. 139 | 140 | 141 | ## License 142 | 143 | MIT 144 | -------------------------------------------------------------------------------- /android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | android_ 4 | Project android_ created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.buildship.core.gradleprojectnature 16 | 17 | 18 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | Uni_kotlinVersion=1.3.50 2 | Uni_compileSdkVersion=28 3 | Uni_buildToolsVersion=28.0.3 4 | Uni_targetSdkVersion=28 5 | -------------------------------------------------------------------------------- /android/libs/android-gif-drawable-release@1.2.17.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/android/libs/android-gif-drawable-release@1.2.17.aar -------------------------------------------------------------------------------- /android/libs/miit_mdid_1.0.10.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/android/libs/miit_mdid_1.0.10.aar -------------------------------------------------------------------------------- /android/libs/uniMPSDK-release.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/android/libs/uniMPSDK-release.aar -------------------------------------------------------------------------------- /android/libs/uniapp-release.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/android/libs/uniapp-release.aar -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/src/main/assets/data/dcloud_control.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /android/src/main/assets/data/dcloud_error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Error 9 | 44 | 76 | 77 | 78 |
79 | 80 | 81 | 82 | 83 | 84 | 85 |

We're sorry ...

86 |

87 | 88 |
Back
89 |
Close
90 |
Restart
91 | 92 | -------------------------------------------------------------------------------- /android/src/main/java/com/reactnativeuni/UniPackage.kt: -------------------------------------------------------------------------------- 1 | package com.reactnativeuni 2 | 3 | import java.util.Arrays 4 | 5 | import com.facebook.react.ReactPackage 6 | import com.facebook.react.bridge.NativeModule 7 | import com.facebook.react.bridge.ReactApplicationContext 8 | import com.facebook.react.uimanager.ViewManager 9 | 10 | class UniPackage : ReactPackage { 11 | override fun createNativeModules(reactContext: ReactApplicationContext): List { 12 | return Arrays.asList(UniModule(reactContext)) 13 | } 14 | 15 | override fun createViewManagers(reactContext: ReactApplicationContext): List> { 16 | return emptyList>() 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /android/src/main/java/com/reactnativeuni/UniSplashView.kt: -------------------------------------------------------------------------------- 1 | package com.reactnativeuni 2 | 3 | import android.content.Context 4 | import android.os.Bundle 5 | import android.view.View 6 | import android.view.ViewGroup 7 | import com.facebook.react.ReactApplication 8 | import com.facebook.react.ReactRootView 9 | import io.dcloud.feature.sdk.Interface.IDCUniMPAppSplashView 10 | 11 | class UniSplashView : IDCUniMPAppSplashView { 12 | var splashView: ReactRootView? = null 13 | override fun getSplashView(context: Context, appid: String): View { 14 | splashView = ReactRootView(context) 15 | val bundle = Bundle() 16 | bundle.putString("appid", appid) 17 | val instanceManager = (context.applicationContext as ReactApplication).reactNativeHost.reactInstanceManager 18 | splashView!!.startReactApplication(instanceManager, "UniModules.uniSplashView", bundle) 19 | return splashView as ReactRootView 20 | } 21 | 22 | override fun onCloseSplash(viewGroup: ViewGroup) { 23 | viewGroup.removeView(splashView) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /example/android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | android 4 | Project android created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.buildship.core.gradleprojectnature 16 | 17 | 18 | -------------------------------------------------------------------------------- /example/android/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir= 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /example/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/example/android/app/debug.keystore -------------------------------------------------------------------------------- /example/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/android/app/src/debug/java/com/UniExample/ReactNativeFlipper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | *

This source code is licensed under the MIT license found in the LICENSE file in the root 5 | * directory of this source tree. 6 | */ 7 | package com.example.reactnativeuni; 8 | 9 | import android.content.Context; 10 | import com.facebook.flipper.android.AndroidFlipperClient; 11 | import com.facebook.flipper.android.utils.FlipperUtils; 12 | import com.facebook.flipper.core.FlipperClient; 13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; 14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; 15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; 16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping; 17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; 18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; 19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; 20 | import com.facebook.flipper.plugins.react.ReactFlipperPlugin; 21 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; 22 | import com.facebook.react.ReactInstanceManager; 23 | import com.facebook.react.bridge.ReactContext; 24 | import com.facebook.react.modules.network.NetworkingModule; 25 | import okhttp3.OkHttpClient; 26 | 27 | public class ReactNativeFlipper { 28 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 29 | if (FlipperUtils.shouldEnableFlipper(context)) { 30 | final FlipperClient client = AndroidFlipperClient.getInstance(context); 31 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); 32 | client.addPlugin(new ReactFlipperPlugin()); 33 | client.addPlugin(new DatabasesFlipperPlugin(context)); 34 | client.addPlugin(new SharedPreferencesFlipperPlugin(context)); 35 | client.addPlugin(CrashReporterPlugin.getInstance()); 36 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); 37 | NetworkingModule.setCustomClientBuilder( 38 | new NetworkingModule.CustomClientBuilder() { 39 | @Override 40 | public void apply(OkHttpClient.Builder builder) { 41 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); 42 | } 43 | }); 44 | client.addPlugin(networkFlipperPlugin); 45 | client.start(); 46 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized 47 | // Hence we run if after all native modules have been initialized 48 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); 49 | if (reactContext == null) { 50 | reactInstanceManager.addReactInstanceEventListener( 51 | new ReactInstanceManager.ReactInstanceEventListener() { 52 | @Override 53 | public void onReactContextInitialized(ReactContext reactContext) { 54 | reactInstanceManager.removeReactInstanceEventListener(this); 55 | reactContext.runOnNativeModulesQueueThread( 56 | new Runnable() { 57 | @Override 58 | public void run() { 59 | client.addPlugin(new FrescoFlipperPlugin()); 60 | } 61 | }); 62 | } 63 | }); 64 | } else { 65 | client.addPlugin(new FrescoFlipperPlugin()); 66 | } 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 13 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 30 | 33 | 34 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /example/android/app/src/main/assets/apps/__UNI__7586C24/www/__uniappsuccess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/example/android/app/src/main/assets/apps/__UNI__7586C24/www/__uniappsuccess.png -------------------------------------------------------------------------------- /example/android/app/src/main/assets/apps/__UNI__7586C24/www/__uniappview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | View 18 | 19 | 20 | 21 | 22 |

23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /example/android/app/src/main/assets/apps/__UNI__7586C24/www/app-config.js: -------------------------------------------------------------------------------- 1 | (function(e){function r(r){for(var n,i,l=r[0],f=r[1],a=r[2],c=0,s=[];c 2 | 3 | 4 | 5 | 6 | 17 | View 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /example/android/app/src/main/assets/apps/__UNI__82FC134/www/app-config.js: -------------------------------------------------------------------------------- 1 | (function(e){function r(r){for(var n,i,l=r[0],f=r[1],a=r[2],c=0,s=[];c getPackages() { 28 | @SuppressWarnings("UnnecessaryLocalVariable") 29 | List packages = new PackageList(this).getPackages(); 30 | // Packages that cannot be autolinked yet can be added manually here, for UniExample: 31 | // packages.add(new MyReactNativePackage()); 32 | packages.add(new UniPackage()); 33 | 34 | return packages; 35 | } 36 | 37 | @Override 38 | protected String getJSMainModuleName() { 39 | return "index"; 40 | } 41 | }; 42 | 43 | @Override 44 | public ReactNativeHost getReactNativeHost() { 45 | return mReactNativeHost; 46 | } 47 | 48 | @Override 49 | public void onCreate() { 50 | super.onCreate(); 51 | SoLoader.init(this, /* native exopackage */ false); 52 | // initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); // Remove this line if you don't want Flipper enabled 53 | } 54 | 55 | /** 56 | * Loads Flipper in React Native templates. 57 | * 58 | * @param context 59 | */ 60 | private static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 61 | if (BuildConfig.DEBUG) { 62 | try { 63 | /* 64 | We use reflection here to pick up the class that initializes Flipper, 65 | since Flipper library is not available in release mode 66 | */ 67 | Class aClass = Class.forName("com.reactnativeuniExample.ReactNativeFlipper"); 68 | aClass 69 | .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) 70 | .invoke(null, context, reactInstanceManager); 71 | } catch (ClassNotFoundException e) { 72 | e.printStackTrace(); 73 | } catch (NoSuchMethodException e) { 74 | e.printStackTrace(); 75 | } catch (IllegalAccessException e) { 76 | e.printStackTrace(); 77 | } catch (InvocationTargetException e) { 78 | e.printStackTrace(); 79 | } 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Uni Example 3 | 4 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "28.0.3" 6 | minSdkVersion = 16 7 | compileSdkVersion = 28 8 | targetSdkVersion = 28 9 | } 10 | repositories { 11 | google() 12 | jcenter() 13 | } 14 | dependencies { 15 | classpath("com.android.tools.build:gradle:3.4.0") 16 | 17 | // NOTE: Do not place your application dependencies here; they belong 18 | // in the individual module build.gradle files 19 | } 20 | } 21 | 22 | allprojects { 23 | repositories { 24 | mavenLocal() 25 | maven { 26 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 27 | url("$rootDir/../node_modules/react-native/android") 28 | } 29 | maven { 30 | // Android JSC is installed from npm 31 | url("$rootDir/../node_modules/jsc-android/dist") 32 | } 33 | 34 | google() 35 | jcenter() 36 | maven { url 'https://www.jitpack.io' } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | android.useAndroidX=true 21 | android.enableJetifier=true 22 | FLIPPER_VERSION=0.33.1 23 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/example/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /example/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem http://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 33 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 34 | 35 | @rem Find java.exe 36 | if defined JAVA_HOME goto findJavaFromJavaHome 37 | 38 | set JAVA_EXE=java.exe 39 | %JAVA_EXE% -version >NUL 2>&1 40 | if "%ERRORLEVEL%" == "0" goto init 41 | 42 | echo. 43 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 44 | echo. 45 | echo Please set the JAVA_HOME variable in your environment to match the 46 | echo location of your Java installation. 47 | 48 | goto fail 49 | 50 | :findJavaFromJavaHome 51 | set JAVA_HOME=%JAVA_HOME:"=% 52 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 53 | 54 | if exist "%JAVA_EXE%" goto init 55 | 56 | echo. 57 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 58 | echo. 59 | echo Please set the JAVA_HOME variable in your environment to match the 60 | echo location of your Java installation. 61 | 62 | goto fail 63 | 64 | :init 65 | @rem Get command-line arguments, handling Windows variants 66 | 67 | if not "%OS%" == "Windows_NT" goto win9xME_args 68 | 69 | :win9xME_args 70 | @rem Slurp the command line arguments. 71 | set CMD_LINE_ARGS= 72 | set _SKIP=2 73 | 74 | :win9xME_args_slurp 75 | if "x%~1" == "x" goto execute 76 | 77 | set CMD_LINE_ARGS=%* 78 | 79 | :execute 80 | @rem Setup the command line 81 | 82 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 83 | 84 | @rem Execute Gradle 85 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 86 | 87 | :end 88 | @rem End local scope for the variables with windows NT shell 89 | if "%ERRORLEVEL%"=="0" goto mainEnd 90 | 91 | :fail 92 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 93 | rem the _cmd.exe /c_ return code! 94 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 95 | exit /b 1 96 | 97 | :mainEnd 98 | if "%OS%"=="Windows_NT" endlocal 99 | 100 | :omega 101 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'UniExample' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | 5 | include ':reactnativeuni' 6 | project(':reactnativeuni').projectDir = new File(rootProject.projectDir, '../../android') 7 | -------------------------------------------------------------------------------- /example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "UniExample", 3 | "displayName": "Uni Example" 4 | } 5 | -------------------------------------------------------------------------------- /example/babel.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const pak = require('../package.json'); 3 | 4 | module.exports = { 5 | presets: ['module:metro-react-native-babel-preset'], 6 | plugins: [ 7 | [ 8 | 'module-resolver', 9 | { 10 | alias: { 11 | [pak.name]: path.join(__dirname, '..', pak.source), 12 | }, 13 | }, 14 | ], 15 | ], 16 | }; 17 | -------------------------------------------------------------------------------- /example/index.js: -------------------------------------------------------------------------------- 1 | import { AppRegistry } from 'react-native'; 2 | import App from './src/App'; 3 | import { name as appName } from './app.json'; 4 | 5 | AppRegistry.registerComponent(appName, () => App); 6 | -------------------------------------------------------------------------------- /example/ios/File.swift: -------------------------------------------------------------------------------- 1 | // 2 | // File.swift 3 | // UniExample 4 | // 5 | 6 | import Foundation 7 | -------------------------------------------------------------------------------- /example/ios/UniExample-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | -------------------------------------------------------------------------------- /example/ios/UniExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/UniExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/UniExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (nonatomic, strong) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /example/ios/UniExample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /example/ios/UniExample/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/ios/UniExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | Uni Example 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSAllowsArbitraryLoads 30 | 31 | NSExceptionDomains 32 | 33 | localhost 34 | 35 | NSExceptionAllowsInsecureHTTPLoads 36 | 37 | 38 | 39 | 40 | NSLocationWhenInUseUsageDescription 41 | 42 | UILaunchStoryboardName 43 | LaunchScreen 44 | UIRequiredDeviceCapabilities 45 | 46 | armv7 47 | 48 | UISupportedInterfaceOrientations 49 | 50 | UIInterfaceOrientationPortrait 51 | 52 | UIViewControllerBasedStatusBarAppearance 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /example/ios/UniExample/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /example/ios/UniExample/unimp/Apps/__UNI__7586C24.wgt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/example/ios/UniExample/unimp/Apps/__UNI__7586C24.wgt -------------------------------------------------------------------------------- /example/ios/UniExample/unimp/Apps/__UNI__82FC134.wgt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/example/ios/UniExample/unimp/Apps/__UNI__82FC134.wgt -------------------------------------------------------------------------------- /example/ios/UniExample/unimp/Libs/liblibIO.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/example/ios/UniExample/unimp/Libs/liblibIO.a -------------------------------------------------------------------------------- /example/metro.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const blacklist = require('metro-config/src/defaults/blacklist'); 3 | const escape = require('escape-string-regexp'); 4 | const pak = require('../package.json'); 5 | 6 | const root = path.resolve(__dirname, '..'); 7 | 8 | const modules = Object.keys({ 9 | ...pak.peerDependencies, 10 | }); 11 | 12 | module.exports = { 13 | projectRoot: __dirname, 14 | watchFolders: [root], 15 | 16 | // We need to make sure that only one version is loaded for peerDependencies 17 | // So we blacklist them at the root, and alias them to the versions in example's node_modules 18 | resolver: { 19 | blacklistRE: blacklist( 20 | modules.map( 21 | (m) => 22 | new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`) 23 | ) 24 | ), 25 | 26 | extraNodeModules: modules.reduce((acc, name) => { 27 | acc[name] = path.join(__dirname, 'node_modules', name); 28 | return acc; 29 | }, {}), 30 | }, 31 | 32 | transformer: { 33 | getTransformOptions: async () => ({ 34 | transform: { 35 | experimentalImportSupport: false, 36 | inlineRequires: true, 37 | }, 38 | }), 39 | }, 40 | }; 41 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-uni-example", 3 | "description": "Example app for react-native-uni", 4 | "version": "0.0.1", 5 | "private": true, 6 | "scripts": { 7 | "android": "react-native run-android", 8 | "build-android": "cd android && ./gradlew assembleRelease", 9 | "ios": "react-native run-ios", 10 | "start": "react-native start" 11 | }, 12 | "dependencies": { 13 | "lottie-ios": "3.1.3", 14 | "lottie-react-native": "^3.4.0", 15 | "react": "16.11.0", 16 | "react-native": "0.62.0", 17 | "react-native-fs": "^2.16.6" 18 | }, 19 | "devDependencies": { 20 | "@babel/core": "^7.9.6", 21 | "@babel/runtime": "^7.9.6", 22 | "babel-plugin-module-resolver": "^4.0.0", 23 | "metro-react-native-babel-preset": "^0.59.0" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /images/example.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/images/example.gif -------------------------------------------------------------------------------- /ios/Headers/DCUniMP.h: -------------------------------------------------------------------------------- 1 | // 2 | // DCUniMP.h 3 | // DCUniMP 4 | // 5 | // Created by XHY on 2020/1/14. 6 | // Copyright © 2020 DCloud. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for DCUniMP. 12 | FOUNDATION_EXPORT double DCUniMPVersionNumber; 13 | 14 | //! Project version string for DCUniMP. 15 | FOUNDATION_EXPORT const unsigned char DCUniMPVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | #import "DCUniMPSDKEngine.h" 20 | #import "DCUniMPMenuActionSheetStyle.h" 21 | -------------------------------------------------------------------------------- /ios/Headers/DCUniMPMenuActionSheetStyle.h: -------------------------------------------------------------------------------- 1 | // 2 | // DCUniMPMenuActionSheetStyle.h 3 | // libPDRCore 4 | // 5 | // Created by XHY on 2020/2/5. 6 | // Copyright © 2020 DCloud. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface DCUniMPMenuActionSheetStyle : NSObject 15 | 16 | /// ActionSheet 按钮字体颜色 支持:"#RRGGBB" 和 "rgba(R,G,B,A)" 格式字符串。默认值黑色 17 | @property (nonatomic, copy) NSString *textColor; 18 | 19 | /// ActionSheet 按钮文字大小 。默认值 16 20 | @property (nonatomic, assign) CGFloat fontSize; 21 | 22 | /// ActionSheet 按钮文字的粗细 可取值:"normal" - 标准字体; "bold" - 加粗字体。 默认值为"normal"。 23 | @property (nonatomic, copy) NSString *fontWeight; 24 | 25 | @end 26 | 27 | @interface DCUniMPMenuActionSheetItem : NSObject 28 | 29 | /// 标题 30 | @property (nonatomic, copy) NSString *title; 31 | 32 | /// item 标识(当点击 ActionSheet 对应的 item 返回此标识) 33 | @property (nonatomic, copy) NSString *identifier; 34 | 35 | 36 | /// 实例化方法 37 | /// @param title 标题 38 | /// @param identifier 标识 39 | - (instancetype)initWithTitle:(NSString *)title identifier:(NSString *)identifier; 40 | 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/JSContext+Weex.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | 22 | @interface JSContext (Weex) 23 | 24 | @property (nonatomic, strong) NSString *instanceId; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/NSObject+WXSwizzle.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | 21 | #import 22 | 23 | @interface NSObject (WXSwizzle) 24 | 25 | + (BOOL)weex_swizzle:(Class)originalClass Method:(SEL)originalSelector withMethod:(SEL)swizzledSelector; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/UniPluginProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // UniPluginProtocol.h 3 | // libWeex 4 | // 5 | // Created by 4Ndf on 2018/11/30. 6 | // Copyright © 2018年 DCloud. All rights reserved. 7 | // 8 | #import 9 | @protocol UniPluginProtocol 10 | //@required // 必须实现的方法 11 | -(void)onCreateUniPlugin; 12 | 13 | - (BOOL)application:(UIApplication *_Nullable)application didFinishLaunchingWithOptions:(NSDictionary *_Nullable)launchOptions; 14 | - (void)application:(UIApplication *_Nullable)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *_Nullable)deviceToken; 15 | - (void)application:(UIApplication *_Nullable)application didFailToRegisterForRemoteNotificationsWithError:(NSError *_Nullable)err; 16 | - (void)application:(UIApplication *_Nullable)application didReceiveRemoteNotification:(NSDictionary *_Nullable)userInfo; 17 | - (void)application:(UIApplication *_Nullable)application didReceiveRemoteNotification:(NSDictionary *_Nullable)userInfo fetchCompletionHandler:(void (^_Nullable)(UIBackgroundFetchResult))completionHandler; 18 | - (void)application:(UIApplication *_Nullable)application didReceiveLocalNotification:(UILocalNotification *_Nullable)notification; 19 | - (BOOL)application:(UIApplication *_Nullable)application handleOpenURL:(NSURL *_Nullable)url; 20 | - (BOOL)application:(UIApplication *_Nullable)application openURL:(NSURL *_Nullable)url sourceApplication:(NSString *_Nullable)sourceApplication annotation:(id _Nonnull )annotation; 21 | - (BOOL)application:(UIApplication *_Nullable)app openURL:(NSURL *_Nonnull)url options:(NSDictionary *_Nullable)options NS_AVAILABLE_IOS(9_0); 22 | 23 | - (void)applicationWillResignActive:(UIApplication * _Nullable)application; 24 | - (void)applicationDidBecomeActive:(UIApplication *_Nullable)application; 25 | - (void)applicationDidEnterBackground:(UIApplication *_Nullable)application; 26 | - (void)applicationWillEnterForeground:(UIApplication *_Nullable)application; 27 | - (void)applicationWillTerminate:(UIApplication *_Nullable)application; 28 | - (void)applicationDidReceiveMemoryWarning:(UIApplication *_Nullable)application; 29 | - (void)application:(UIApplication *_Nullable)application performActionForShortcutItem:(UIApplicationShortcutItem *_Nullable)shortcutItem completionHandler:(void (^_Nullable)(BOOL))completionHandler API_AVAILABLE(ios(9.0)); 30 | - (void)application:(UIApplication *_Nullable)application handleEventsForBackgroundURLSession:(NSString *_Nonnull)identifier completionHandler:(void (^_Nullable)(void))completionHandler; 31 | - (BOOL)application:(UIApplication *_Nullable)application continueUserActivity:(NSUserActivity *_Nullable)userActivity restorationHandler:(void(^_Nullable)(NSArray * __nullable restorableObjects))restorationHandler API_AVAILABLE(ios(8.0)); 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXAComponent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import "WXComponent.h" 21 | 22 | @interface WXAComponent : WXComponent 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXAnalyzerCenter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | #import "WXAnalyzerProtocol.h" 22 | 23 | @interface WXAnalyzerCenter : NSObject 24 | 25 | +(NSMutableArray *) getAnalyzerList; 26 | 27 | +(void) addWxAnalyzer:(id)handler; 28 | 29 | +(void) rmWxAnalyzer:(id)handler; 30 | 31 | +(void) setOpen:(BOOL)isOpen; 32 | +(BOOL) isOpen; 33 | 34 | +(void) switchInteractionLog:(BOOL) isOpen; 35 | +(BOOL) isInteractionLogOpen; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXAnalyzerProtocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | #import "WXAppMonitorProtocol.h" 22 | 23 | #define GROUP_ANALYZER @"WXAnalyzer" 24 | #define MODULE_PERFORMANCE @"WXPerformance" 25 | #define MODULE_ERROR @"WXError" 26 | #define TYPE_MEASURE_REAL @"measure_real_time" 27 | #define TYPE_DIMEN_REAL @"dimen_real_time" 28 | #define TYPE_JS_ERROR @"js" 29 | 30 | @protocol WXAnalyzerProtocol 31 | 32 | 33 | @required 34 | /** 35 | @param value = @{ 36 | @"group":group, 37 | @"module":module, 38 | @"type":type, 39 | @"data":jsonData 40 | }; 41 | */ 42 | - (void)transfer:(NSDictionary *) value; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXApmProtocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | 22 | 23 | @protocol WXApmProtocol 24 | 25 | /** 26 | * start record 27 | * 28 | * @param instanceId instanceId 29 | */ 30 | @required 31 | - (void) onStart:(NSString*)instanceId topic:(NSString*)topic; 32 | 33 | /** 34 | * pause apm record (apm ext mem / fps) 35 | */ 36 | @required 37 | - (void) pauseApmRecord; 38 | 39 | /** 40 | * resume apm record (apm ext mem / fps) 41 | */ 42 | @required 43 | - (void) resumeApmRecord; 44 | 45 | /** 46 | * end record 47 | */ 48 | @required 49 | - (void) onEnd; 50 | 51 | /** 52 | * record event 53 | */ 54 | @required 55 | - (void) onEvent:(NSString *)name withValue:(id)value; 56 | 57 | /** 58 | * record stage 59 | */ 60 | @required 61 | - (void) onStage:(NSString *)name withValue:(long)timestamp; 62 | 63 | /** 64 | * record property 65 | */ 66 | @required 67 | - (void) addProperty:(NSString *)name withValue:(id)value; 68 | 69 | /** 70 | * record statistic 71 | */ 72 | @required 73 | - (void) addStatistic:(NSString *)name withValue:(double)value; 74 | 75 | @required 76 | - (void) onSubProcedureBegin:(NSString*)subProcedureName; 77 | 78 | @required 79 | - (void) onSubProcedureEndSucceed:(NSString*)subProcedureName; 80 | 81 | @required 82 | - (void) onSubProcedureEndFailed:(NSString*)subProcedureName; 83 | 84 | /** 85 | * record biz properties 86 | */ 87 | @required 88 | - (void) addBiz:(NSString *)bizID withValue:(NSDictionary *)properties; 89 | 90 | /** 91 | * record biz stage 92 | */ 93 | @required 94 | - (void) addBizStage:(NSString *)bizID withValue:(NSDictionary *)stage; 95 | 96 | @end 97 | 98 | @protocol WXApmGeneratorProtocol 99 | 100 | @required 101 | - (id)gengratorApmInstance:(NSString *) type; 102 | @end 103 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXAppConfiguration.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | 22 | @interface WXAppConfiguration : NSObject 23 | 24 | /** 25 | * @abstract Group or organization of your app, default value is nil. 26 | */ 27 | + (NSString *)appGroup; 28 | + (void)setAppGroup:(NSString *) appGroup; 29 | 30 | /** 31 | * @abstract Name of your app, default is value for CFBundleDisplayName in main bundle. 32 | */ 33 | + (NSString *)appName; 34 | + (void)setAppName:(NSString *)appName; 35 | 36 | /** 37 | * @abstract Version of your app, default is value for CFBundleShortVersionString in main bundle. 38 | */ 39 | + (NSString *)appVersion; 40 | + (void)setAppVersion:(NSString *)appVersion; 41 | 42 | /** 43 | * @abstract External user agent of your app, all requests sent by weex will set the user agent on header, default value is nil. 44 | */ 45 | + (NSString *)externalUserAgent; 46 | + (void)setExternalUserAgent:(NSString *)userAgent; 47 | 48 | /** 49 | * @abstract JSFrameworkVersion 50 | */ 51 | + (NSString *)JSFrameworkVersion; 52 | + (void)setJSFrameworkVersion:(NSString *)JSFrameworkVersion; 53 | 54 | /** 55 | + * @abstract JSFrameworkLibSize 56 | + */ 57 | + (NSUInteger)JSFrameworkLibSize; 58 | + (void)setJSFrameworkLibSize:(NSUInteger)JSFrameworkLibSize; 59 | 60 | /* 61 | * @abstract customizeProtocolClasses 62 | */ 63 | + (NSArray*)customizeProtocolClasses; 64 | + (void)setCustomizeProtocolClasses:(NSArray*)customizeProtocolClasses; 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXBaseViewController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | 22 | /** 23 | * The WXBaseViewController class provides the infrastructure for managing the weex view in your app. It is 24 | * responsible for creating a weex instance or rendering the weex view, for observing the lifecycle of the 25 | * view such as "appear" or "disappear"、"foreground" or "background" etc. You can initialize this controller by 26 | * special bundle URL. 27 | */ 28 | 29 | @interface WXBaseViewController : UIViewController 30 | 31 | /** 32 | * @abstract initializes the viewcontroller with bundle url. 33 | * 34 | * @param sourceURL The url of bundle rendered to a weex view. 35 | * 36 | * @return a object the class of WXBaseViewController. 37 | * 38 | */ 39 | - (instancetype)initWithSourceURL:(NSURL *)sourceURL; 40 | 41 | /** 42 | * @abstract refreshes the weex view in controller. 43 | */ 44 | - (void)refreshWeex; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXConfigCenterProtocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | @protocol WXConfigCenterProtocol 21 | 22 | /** 23 | get config from config center handler 24 | @param key the key for config 25 | @param defaultValue default value for key if the key does not exist. 26 | @param isDefault whether the value is default value 27 | @return the value for config key 28 | */ 29 | - (id)configForKey:(NSString*)key defaultValue:(id)defaultValue isDefault:(BOOL*)isDefault; 30 | 31 | @optional 32 | /** 33 | get group config from config center handler 34 | @param group the groupName for config 35 | */ 36 | 37 | - (id)configForGroup:(NSString*)group; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXDebugTool.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | #import "WXModuleProtocol.h" 22 | 23 | @interface WXDebugTool : NSObject 24 | 25 | + (instancetype)sharedInstance; 26 | 27 | //+ (void)showFPS; 28 | 29 | + (void)setDebug:(BOOL)isDebug; 30 | 31 | + (BOOL)isDebug; 32 | 33 | + (void)setDevToolDebug:(BOOL)isDevToolDebug; 34 | 35 | + (BOOL)isDevToolDebug; 36 | 37 | + (void)setReplacedBundleJS:(NSURL*)url; 38 | 39 | + (NSString*)getReplacedBundleJS; 40 | 41 | + (void)setReplacedJSFramework:(NSURL*)url; 42 | 43 | + (NSString*)getReplacedJSFramework; 44 | 45 | + (BOOL) cacheJsService: (NSString *)name withScript: (NSString *)script withOptions: (NSDictionary *) options; 46 | 47 | + (BOOL) removeCacheJsService: (NSString *)name; 48 | 49 | + (NSDictionary *) jsServiceCache; 50 | 51 | + (BOOL)isRemoteTracing; 52 | 53 | + (void)setRemoteTracing:(BOOL)isRemoteTracing; 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXDisplayLinkManager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | 22 | @protocol WXDisplayLinkClient 23 | /** 24 | * @abstract defalut is NO 25 | **/ 26 | @property (nonatomic) BOOL suspend; 27 | 28 | - (void)handleDisplayLink; 29 | 30 | @end 31 | 32 | @interface WXDisplayLinkManager : NSObject 33 | /** 34 | * @abstract create WXDisplayLinkManager instance 35 | **/ 36 | + (instancetype)sharedInstance; 37 | 38 | /** 39 | * @abstract add WXDisplayLinkClient to array 40 | **/ 41 | - (void)registerDisplayClient:(id)client; 42 | 43 | /** 44 | * @abstract remove WXDisplayLinkClient to array 45 | **/ 46 | - (void)unregisterDisplayClient:(id)client; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXErrorView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | 22 | @protocol WXErrorViewDelegate 23 | 24 | - (void)onclickErrorView; 25 | 26 | @end 27 | 28 | @interface WXErrorView : UIView 29 | 30 | @property (nonatomic, weak) id delegate; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXEventModuleProtocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import "WXModuleProtocol.h" 21 | 22 | @protocol WXEventModuleProtocol 23 | 24 | - (void)openURL:(NSString *)url; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXExceptionUtils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | #import "WXJSExceptionInfo.h" 22 | 23 | @interface WXExceptionUtils : NSObject 24 | 25 | + (void)commitCriticalExceptionRT:(NSString *)instanceId errCode:(NSString *)errCode function:(NSString *)function exception:(NSString *)exception extParams:(NSDictionary *)extParams; 26 | 27 | + (void)commitCriticalExceptionRT:(WXJSExceptionInfo*)jsExceptionInfo; 28 | @end 29 | 30 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXExtendCallNativeProtocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | 21 | #import 22 | 23 | @protocol WXExtendCallNativeProtocol 24 | 25 | @required 26 | 27 | /** 28 | * @abstract check parameters 29 | * 30 | * @param parameters the checked parameters. 31 | * 32 | * @return YES or NO. 33 | * 34 | */ 35 | + (BOOL)checkParameters:(NSDictionary *)parameters; 36 | 37 | /** 38 | * @abstract excuteCallNative 39 | * 40 | * @param parameters the checked parameters. 41 | * 42 | * @return A value. 43 | * 44 | */ 45 | + (id)excuteCallNative:(NSDictionary *)parameters; 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXIndicatorComponent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import "WXComponent.h" 21 | 22 | typedef enum 23 | { 24 | WXPointIndicatorAlignCenter, // point indicator align center 25 | WXPointIndicatorAlignLeft, // point indicator align left 26 | WXPointIndicatorAlignRight, // point indicator align right 27 | } WXPointIndicatorAlignStyle; 28 | 29 | @interface WXIndicatorView : UIView 30 | 31 | @property (nonatomic, assign) NSInteger pointCount; // total count point of point indicator 32 | @property (nonatomic, assign) NSInteger currentPoint; // current light index of point at point indicator 33 | @property (nonatomic, strong) UIColor *pointColor; // normal point color of point indicator 34 | @property (nonatomic, strong) UIColor *lightColor; // highlight point color of point indicator 35 | @property (nonatomic, assign) WXPointIndicatorAlignStyle alignStyle; //align style of point indicator 36 | @property (nonatomic, assign) CGFloat pointSize; // point size of point indicator 37 | @property (nonatomic, assign) CGFloat pointSpace; // point space of point indicator 38 | 39 | @end 40 | 41 | 42 | @protocol WXIndicatorComponentDelegate 43 | 44 | -(void)setIndicatorView:(WXIndicatorView *)indicatorView; 45 | 46 | @end 47 | 48 | @interface WXIndicatorComponent : WXComponent 49 | 50 | @property (nonatomic, weak) id delegate; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXJSExceptionInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | 22 | @interface WXJSExceptionInfo : NSObject 23 | /** 24 | * instance id 25 | */ 26 | @property(nonatomic,strong) NSString * instanceId; 27 | /** 28 | * the URL where the exception occurred 29 | */ 30 | @property(nonatomic,strong) NSString * bundleUrl; 31 | /** 32 | * error code 33 | */ 34 | @property(nonatomic,strong) NSString * errorCode; 35 | /** 36 | * the function name of exception 37 | */ 38 | @property(nonatomic,strong) NSString * functionName; 39 | /** 40 | * exception detail; 41 | */ 42 | @property(nonatomic,strong) NSString * exception; 43 | /** 44 | * extend filed 45 | */ 46 | @property(nonatomic,strong) NSMutableDictionary * userInfo; 47 | /** 48 | * weex sdk version 49 | */ 50 | @property(nonatomic,strong, readonly) NSString * sdkVersion; 51 | /** 52 | * js framework verison 53 | */ 54 | @property(nonatomic,strong, readonly) NSString * jsfmVersion; 55 | 56 | 57 | /** 58 | * @abstract Initializes a WXJSException instance 59 | * @param instanceId the id of instance 60 | * @param bundleUrl the page URL where the exception occurred 61 | * @param errorCode error Code 62 | * @param exception exception detail 63 | * @param userInfo extend field 64 | */ 65 | - (instancetype)initWithInstanceId:(NSString *)instanceId 66 | bundleUrl:(NSString *)bundleUrl 67 | errorCode:(NSString *)errorCode 68 | functionName:(NSString *)functionName 69 | exception:(NSString *)exception 70 | userInfo:(NSMutableDictionary *)userInfo; 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXJSExceptionProtocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import "WXJSExceptionInfo.h" 21 | 22 | typedef WXJSExceptionInfo WXRuntimeCheckException; 23 | 24 | @protocol WXJSExceptionProtocol 25 | 26 | /** 27 | * report js exception 28 | * 29 | * @param exception WXJSExceptionInfo 30 | */ 31 | 32 | - (void)onJSException:(WXJSExceptionInfo*) exception; 33 | 34 | 35 | @optional 36 | 37 | /** 38 | * report runtime check exception, this is optional for this protocol 39 | */ 40 | - (void)onRuntimeCheckException:(WXRuntimeCheckException*)exception; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXJSFrameworkLoadProtocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | 22 | typedef void (^WXJSFrameworkLoadBlock)(NSString *path, NSString *script); 23 | 24 | @protocol WXJSFrameworkLoadProtocol 25 | 26 | - (void)loadRaxFramework:(WXJSFrameworkLoadBlock)block; 27 | - (void)loadPolyfillFramework:(WXJSFrameworkLoadBlock)block; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXListComponent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import "WXScrollerComponent.h" 21 | 22 | @interface WXListComponent : WXScrollerComponent 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXModalUIModule.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | #import "WXModuleProtocol.h" 22 | 23 | @interface WXModalUIModule : NSObject 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXModuleProtocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | #import "WXDefine.h" 22 | #import "WXSDKInstance.h" 23 | 24 | #define MSG_SUCCESS @"WX_SUCCESS" 25 | #define MSG_NO_HANDLER @"WX_NO_HANDLER" 26 | #define MSG_NO_PERMIT @"WX_NO_PERMISSION" 27 | #define MSG_FAILED @"WX_FAILED" 28 | #define MSG_PARAM_ERR @"WX_PARAM_ERR" 29 | #define MSG_EXP @"WX_EXCEPTION" 30 | 31 | @protocol WXModuleProtocol 32 | 33 | /** 34 | * @abstract the module callback , result can be string or dictionary. 35 | * @discussion callback data to js, the id of callback function will be removed to save memory. 36 | */ 37 | typedef void (^WXModuleCallback)(id result); 38 | //DEPRECATED_MSG_ATTRIBUTE("use WXModuleKeepAliveCallback, you can specify keep the callback or not, if keeped, it can be called multi times, or it will be removed after called.") 39 | 40 | /** 41 | * @abstract the module callback , result can be string or dictionary. 42 | * @discussion callback data to js, you can specify the keepAlive parameter to keep callback function id keepalive or not. If the keepAlive is true, it won't be removed until instance destroyed, so you can call it repetitious. 43 | */ 44 | typedef void (^WXModuleKeepAliveCallback)(id result, BOOL keepAlive); 45 | 46 | #define WX_EXPORT_MODULE(module) 47 | 48 | @optional 49 | 50 | /** 51 | * @abstract returns the execute queue for the module 52 | * 53 | * @return dispatch queue that module's methods will be invoked on 54 | * 55 | * @discussion the implementation is optional. Implement it if you want to execute module actions in the special queue. 56 | * Default dispatch queue will be the main queue. 57 | * 58 | */ 59 | - (dispatch_queue_t)targetExecuteQueue; 60 | 61 | /** 62 | * @abstract returns the execute thread for the module 63 | * 64 | * @return thread that module's methods will be invoked on 65 | * 66 | * @discussion the implementation is optional. If you want to execute module actions in the special thread, you can create a new one. 67 | * If `targetExecuteQueue` is implemented, the queue returned will be respected first. 68 | * Default is the main thread. 69 | * 70 | */ 71 | - (NSThread *)targetExecuteThread; 72 | 73 | /** 74 | * @abstract the instance bind to this module. It helps you to get many useful properties related to the instance. 75 | */ 76 | @property (nonatomic, weak) WXSDKInstance *weexInstance; 77 | 78 | @end 79 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXNetworkProtocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | #import "WXModuleProtocol.h" 22 | 23 | __attribute__ ((deprecated("Use WXResourceRequestHandler instead"))) 24 | @protocol WXNetworkProtocol 25 | 26 | /** 27 | * @abstract send request 28 | * 29 | * @param request The URL Request 30 | * 31 | * @param sendDataCallback This block is called periodically to notify the progress. 32 | * 33 | * @param responseCallback This block is called when receiving a response and no further messages will be received until the completion block is called. 34 | * 35 | * @param receiveDataCallback This block is called when data is available. 36 | * 37 | * @param completionCallback This block is called when the last message related to a specific task is sent. 38 | */ 39 | - (id)sendRequest:(NSURLRequest *)request withSendingData:(void (^)(int64_t bytesSent, int64_t totalBytes))sendDataCallback 40 | withResponse:(void (^)(NSURLResponse *response))responseCallback 41 | withReceiveData:(void (^)(NSData *data))receiveDataCallback 42 | withCompeletion:(void (^)(NSData *totalData, NSError *error))completionCallback; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXPageEventNotifyEvent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import "WXJSExceptionInfo.h" 21 | 22 | @protocol WXPageEventNotifyEventProtocol 23 | 24 | - (void)hitTest:(CGPoint)point withEvent:(UIEvent *)event withView:(UIView*)view; 25 | 26 | - (void)notifyScrollEvent:(NSString*)instanceId from:(CGPoint)from to:(CGPoint)to; 27 | 28 | - (void)pageStart:(NSString*)instanceId; 29 | 30 | - (void)pageDestroy:(NSString*)instanceId; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXPrerenderManager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | #import "WXModuleProtocol.h" 22 | 23 | @class WXModuleMethod; 24 | 25 | @interface WXPrerenderManager : NSObject 26 | 27 | - (instancetype) init NS_UNAVAILABLE; 28 | 29 | /** 30 | * @abstract add prerender task 31 | * 32 | * @param url The prerender url string 33 | * 34 | * @param instanceId The instanceId that its instance add prerender task 35 | * 36 | * @param callback the module method callback 37 | * 38 | **/ 39 | + (void) addTask:(NSString *) url instanceId:(NSString *)instanceId callback:(WXModuleKeepAliveCallback)callback; 40 | 41 | /** 42 | * @abstract add prerender task 43 | * 44 | * @param url The prerender url string 45 | * 46 | * @param callback the module method callback 47 | * 48 | **/ 49 | + (void) addGlobalTask:(NSString *) url callback:(WXModuleKeepAliveCallback)callback; 50 | 51 | /** 52 | * @abstract Returns true if url is exist in task . 53 | * 54 | **/ 55 | + (BOOL) isTaskExist:(NSString *)url; 56 | 57 | /** 58 | * @abstract Returns true if task ready. 59 | * 60 | **/ 61 | + (BOOL)isTaskReady:(NSString *)url; 62 | /** 63 | * @abstract Returns key from url . 64 | * 65 | **/ 66 | + (NSString *)getTaskKeyFromUrl:(NSString *)url; 67 | 68 | /** 69 | * @abstract Returns error if url is prerender fail . 70 | * 71 | **/ 72 | + (NSError *)errorFromUrl:(NSString *)url; 73 | 74 | /** 75 | * @abstract excute render from prerender cache . 76 | * @discussion this method should be excuted after oncreat and onfail block created 77 | * 78 | **/ 79 | + (void) renderFromCache:(NSString *)url; 80 | 81 | /** 82 | * @abstract Returns prerender root view . 83 | * 84 | **/ 85 | + (UIView *)viewFromUrl:(NSString *)url; 86 | 87 | /** 88 | * @abstract Returns prerender instance . 89 | * 90 | **/ 91 | + (id)instanceFromUrl:(NSString *)url; 92 | 93 | /** 94 | * @abstract Remove prerender task by url . 95 | * 96 | **/ 97 | + (void)removePrerenderTaskforUrl:(NSString *)url; 98 | 99 | /** 100 | * @abstract store prerender module task by url . 101 | * 102 | **/ 103 | + (void)storePrerenderModuleTasks:(WXModuleMethod *)prerenderModuleTask forUrl:(NSString *)url; 104 | 105 | /** 106 | * @abstract destroy task , it will destroy instance also. 107 | * 108 | **/ 109 | + (void)destroyTask:(NSString *)parentInstanceId; 110 | @end 111 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXRecyclerComponent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import "WXScrollerComponent.h" 21 | 22 | @interface WXRecyclerComponent : WXScrollerComponent 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXResourceLoader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | #import "WXResourceRequest.h" 22 | #import "WXResourceResponse.h" 23 | 24 | 25 | @interface WXResourceLoader : NSObject 26 | 27 | @property (nonatomic, strong) WXResourceRequest *request; 28 | 29 | @property (nonatomic, copy) void (^onDataSent)(unsigned long long /* bytesSent */, unsigned long long /* totalBytesToBeSent */); 30 | @property (nonatomic, copy) void (^onResponseReceived)(const WXResourceResponse *); 31 | @property (nonatomic, copy) void (^onDataReceived)(NSData *); 32 | @property (nonatomic, copy) void (^onFinished)(const WXResourceResponse *, NSData *); 33 | @property (nonatomic, copy) void (^onFailed)(NSError *); 34 | 35 | - (instancetype)initWithRequest:(WXResourceRequest *)request; 36 | 37 | - (void)start; 38 | 39 | - (void)cancel:(NSError **)error; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXResourceRequest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | 22 | typedef enum : NSUInteger { 23 | WXResourceTypeMainBundle, 24 | WXResourceTypeServiceBundle, 25 | WXResourceTypeImage, 26 | WXResourceTypeFont, 27 | WXResourceTypeVideo, 28 | WXResourceTypeLink, 29 | WXResourceTypeOthers 30 | } WXResourceType; 31 | 32 | 33 | @interface WXResourceRequest : NSMutableURLRequest 34 | 35 | @property (nonatomic, strong) id taskIdentifier; 36 | @property (nonatomic, assign) WXResourceType type; 37 | 38 | @property (nonatomic, strong) NSString *referrer; 39 | @property (nonatomic, strong) NSString *userAgent; 40 | 41 | + (instancetype)requestWithURL:(NSURL *)url 42 | resourceType:(WXResourceType)type 43 | referrer:(NSString *)referrer 44 | cachePolicy:(NSURLRequestCachePolicy)cachePolicy; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXResourceRequestHandler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | 21 | #import 22 | #import "WXResourceRequest.h" 23 | #import "WXResourceResponse.h" 24 | 25 | @protocol WXResourceRequestDelegate 26 | 27 | // Periodically informs the delegate of the progress of sending content to the server. 28 | - (void)request:(WXResourceRequest *)request didSendData:(unsigned long long)bytesSent totalBytesToBeSent:(unsigned long long)totalBytesToBeSent; 29 | 30 | // Tells the delegate that the request received the initial reply (headers) from the server. 31 | - (void)request:(WXResourceRequest *)request didReceiveResponse:(WXResourceResponse *)response; 32 | 33 | // Tells the delegate that the request has received some of the expected data. 34 | - (void)request:(WXResourceRequest *)request didReceiveData:(NSData *)data; 35 | 36 | // Tells the delegate that the request finished transferring data. 37 | - (void)requestDidFinishLoading:(WXResourceRequest *)request; 38 | 39 | // Tells the delegate that the request failed to load successfully. 40 | - (void)request:(WXResourceRequest *)request didFailWithError:(NSError *)error; 41 | 42 | // Tells the delegate that when complete statistics information has been collected for the task. 43 | #ifdef __IPHONE_10_0 44 | - (void)request:(WXResourceRequest *)request didFinishCollectingMetrics:(NSURLSessionTaskMetrics *)metrics API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0)); 45 | #endif 46 | 47 | @end 48 | 49 | @protocol WXResourceRequestHandler 50 | 51 | // Send a resource request with a delegate 52 | - (void)sendRequest:(WXResourceRequest *)request withDelegate:(id)delegate; 53 | 54 | @optional 55 | 56 | // Cancel the ongoing request 57 | - (void)cancelRequest:(WXResourceRequest *)request; 58 | 59 | @end 60 | 61 | 62 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXResourceResponse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | 21 | #import 22 | 23 | @interface WXResourceResponse : NSHTTPURLResponse 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXRichText.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import "WXComponent.h" 21 | 22 | @interface WXRichText : WXComponent 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXRootView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | 22 | @class WXSDKInstance; 23 | @interface WXRootView : UIScrollView 24 | 25 | @property (nonatomic, weak) WXSDKInstance *instance; 26 | 27 | - (BOOL)isHasEvent; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXRootViewController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | 22 | /** 23 | * The WXRootViewController class inherited from UINavigationController class which implements a specialized 24 | * view controller that manages the navigation of hierarchical content. Developing an iOS application, you 25 | * need a series of customer pages which will be render by weex bundle. Sometimes, these pages are embedded in 26 | * viewcontroller. This navigation controller makes it possible to present your page efficiently and makes it 27 | * easier for the user to navigate that content. 28 | */ 29 | 30 | @interface WXRootViewController : UINavigationController 31 | 32 | /** 33 | * @abstract initialize the RootViewController with bundle url. 34 | * 35 | * @param sourceURL The bundle url which can be render to a weex view. 36 | * 37 | * @return a object the class of WXRootViewController. 38 | * 39 | * @discussion initialize this controller in function 'application:didFinishLaunchingWithOptions', and make it as rootViewController of window. In the 40 | * weex application, all page content can be managed by the navigation, such as push or pop. 41 | */ 42 | - (id)initWithSourceURL:(NSURL *)sourceURL; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXSDKInstance+Bridge.h: -------------------------------------------------------------------------------- 1 | // 2 | // WXSDKInstance+Bridge.h 3 | // libWeex 4 | // 5 | // Created by dcloud on 2019/3/4. 6 | // Copyright © 2019 DCloud. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "WXSDKInstance.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | 15 | typedef NS_ENUM(NSInteger, WXSDKInstanceBridgeEvent) { 16 | WXSDKInstanceBridgeEventExec, 17 | WXSDKInstanceBridgeEventExecSync, 18 | WXSDKInstanceBridgeEventUniappFrameworkReady, 19 | WXSDKInstanceBridgeEventPostMessage, 20 | WXSDKInstanceBridgeEventGeInfo 21 | }; 22 | 23 | @interface WXSDKInstance(DCPlusBridge) 24 | @property (nonatomic, copy) id __nullable (^onMessage)(WXSDKInstanceBridgeEvent evt, id __nullable param); 25 | - (void)postMessage:(NSDictionary*)message; 26 | - (void)exec:(NSString*)message; 27 | - (NSData*)execSync:(NSString*)message; 28 | - (void)onUniappFramworkReady:(NSString*)message; 29 | - (NSDictionary*)getConfigInfo; 30 | - (void)dc_executeJavascript:(NSString*)javaScriptString; 31 | - (void)clearOnMessage; 32 | @end 33 | 34 | NS_ASSUME_NONNULL_END 35 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXSDKInstance+DCExtend.h: -------------------------------------------------------------------------------- 1 | // 2 | // WXSDKInstance+DCExtend.h 3 | // libWeex 4 | // 5 | // Created by XHY on 2019/2/18. 6 | // Copyright © 2019 DCloud. All rights reserved. 7 | // 8 | 9 | #import "WXSDKInstance.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface WXSDKInstance (DCExtend) 14 | 15 | 16 | /** 17 | 交换原方法,在options中添加一些自定义参数 18 | */ 19 | - (void)_dc_renderWithURL:(NSURL *)url options:(NSDictionary *)options data:(id)data; 20 | - (void)_dc_renderView:(id)source options:(NSDictionary *)options data:(id)data; 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXSDKManager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | #import "WXSDKInstance.h" 22 | #import "WXBridgeManager.h" 23 | 24 | @class WXModuleManager; 25 | 26 | @interface WXSDKManager : NSObject 27 | 28 | /** 29 | *@abstract Returns sdk manager 30 | */ 31 | + (WXSDKManager *)sharedInstance; 32 | /** 33 | * @abstract Returns bridge manager 34 | **/ 35 | + (WXBridgeManager *)bridgeMgr; 36 | 37 | /** 38 | * @abstract Returns weex instance for specific identifier 39 | **/ 40 | + (WXSDKInstance *)instanceForID:(NSString *)identifier; 41 | 42 | /** 43 | * @abstract Returns weex instance for specific identifier 44 | **/ 45 | + (void)storeInstance:(WXSDKInstance *)instance forID:(NSString *)identifier; 46 | 47 | /** 48 | * @abstract Returns weex instance for specific identifier 49 | **/ 50 | + (void)removeInstanceforID:(NSString *)identifier; 51 | 52 | /** 53 | * @abstract unload 54 | **/ 55 | + (void)unload; 56 | 57 | /** 58 | * @abstract Returns module manager 59 | **/ 60 | + (WXModuleManager *)moduleMgr DEPRECATED_MSG_ATTRIBUTE(); 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXScrollerComponent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import "WXScrollerProtocol.h" 21 | #import "WXComponent.h" 22 | 23 | @interface WXScrollerComponent : WXComponent 24 | 25 | @property (nonatomic, copy) void (^onScroll)(UIScrollView *scrollView); 26 | 27 | @property (nonatomic, copy) void (^scrollEventListener)(WXScrollerComponent* sender, NSString* event, NSDictionary* params); 28 | 29 | @property (nonatomic, assign) NSUInteger loadmoreretry; 30 | 31 | @property (nonatomic, assign) CGSize contentSize; 32 | 33 | - (void)handleAppear; 34 | 35 | - (CGPoint)absolutePositionForComponent:(WXComponent *)component; 36 | 37 | @end 38 | 39 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXScrollerProtocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import "WXType.h" 21 | 22 | @class WXComponent; 23 | @protocol WXScrollerProtocol 24 | 25 | /** 26 | * @abstract add sticky component 27 | */ 28 | - (void)addStickyComponent:(WXComponent *)sticky; 29 | 30 | /** 31 | * @abstract remove sticky component 32 | */ 33 | - (void)removeStickyComponent:(WXComponent *)sticky; 34 | 35 | /** 36 | * @abstract adjust sticky components 37 | */ 38 | - (void)adjustSticky; 39 | 40 | /** 41 | * @abstract add scroll listener 42 | */ 43 | - (void)addScrollToListener:(WXComponent *)target; 44 | 45 | /** 46 | * @abstract remove scroll listener 47 | */ 48 | - (void)removeScrollToListener:(WXComponent *)target; 49 | 50 | - (void)scrollToComponent:(WXComponent *)component withOffset:(CGFloat)offset animated:(BOOL)animated; 51 | 52 | - (BOOL)isNeedLoadMore; 53 | 54 | - (void)loadMore; 55 | 56 | - (CGPoint)contentOffset; 57 | 58 | - (void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated; 59 | 60 | - (CGSize)contentSize; 61 | 62 | - (void)setContentSize:(CGSize)size; 63 | 64 | - (UIEdgeInsets)contentInset; 65 | 66 | - (void)setContentInset:(UIEdgeInsets)contentInset; 67 | 68 | - (void)resetLoadmore; 69 | 70 | - (void)addScrollDelegate:(id)delegate; 71 | - (void)removeScrollDelegate:(id)delegate; 72 | 73 | - (WXScrollDirection)scrollDirection; 74 | 75 | @optional 76 | 77 | - (NSString*)refreshType; 78 | - (BOOL)requestGestureShouldStopPropagation:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch; 79 | /** 80 | * @abstract adjust for RTL 81 | */ 82 | - (void)adjustForRTL; 83 | 84 | @end 85 | 86 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXTracingProtocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import "WXTracingProtocol.h" 21 | #import "WXTracingManager.h" 22 | 23 | @protocol WXTracingProtocol 24 | 25 | - (void)commitTracingInfo:(WXTracingTask *)task; 26 | 27 | - (void)commitTracingSummaryInfo:(NSDictionary *)info; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXType.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | #import 22 | 23 | typedef NS_ENUM(NSUInteger, WXLayoutDirection) { 24 | WXLayoutDirectionLTR, 25 | WXLayoutDirectionRTL, 26 | WXLayoutDirectionAuto, 27 | }; 28 | 29 | typedef NS_ENUM(NSUInteger, WXComponentType) { 30 | WXComponentTypeCommon = 0, 31 | WXComponentTypeVirtual 32 | }; 33 | 34 | typedef NS_ENUM(NSUInteger, WXScrollDirection) { 35 | WXScrollDirectionVertical, 36 | WXScrollDirectionHorizontal, 37 | WXScrollDirectionNone, 38 | }; 39 | 40 | typedef NS_ENUM(NSUInteger, WXTextStyle) { 41 | WXTextStyleNormal = 0, 42 | WXTextStyleItalic 43 | }; 44 | 45 | typedef NS_ENUM(NSInteger, WXTextDecoration) { 46 | WXTextDecorationNone = 0, 47 | WXTextDecorationUnderline, 48 | WXTextDecorationLineThrough 49 | }; 50 | 51 | typedef NS_ENUM(NSInteger, WXImageQuality) { 52 | WXImageQualityOriginal = -1, 53 | WXImageQualityLow = 0, 54 | WXImageQualityNormal, 55 | WXImageQualityHigh, 56 | WXImageQualityNone, 57 | }; 58 | 59 | typedef NS_ENUM(NSInteger, WXImageSharp) { 60 | WXImageSharpeningNone = 0, 61 | WXImageSharpening 62 | }; 63 | 64 | typedef NS_ENUM(NSInteger, WXVisibility) { 65 | WXVisibilityShow = 0, 66 | WXVisibilityHidden 67 | }; 68 | 69 | typedef NS_ENUM(NSInteger, WXBorderStyle) { 70 | WXBorderStyleNone = 0, 71 | WXBorderStyleDotted, 72 | WXBorderStyleDashed, 73 | WXBorderStyleSolid 74 | }; 75 | 76 | typedef NS_ENUM(NSInteger, WXPositionType) { 77 | WXPositionTypeRelative = 0, 78 | WXPositionTypeAbsolute, 79 | WXPositionTypeSticky, 80 | WXPositionTypeFixed 81 | }; 82 | 83 | typedef NS_ENUM(NSInteger, WXGradientType) { 84 | WXGradientTypeToTop = 0, 85 | WXGradientTypeToBottom, 86 | WXGradientTypeToLeft, 87 | WXGradientTypeToRight, 88 | WXGradientTypeToTopleft, 89 | WXGradientTypeToBottomright, 90 | }; 91 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXURLRewriteProtocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | #import "WXResourceRequest.h" 22 | 23 | @class WXSDKInstance; 24 | 25 | #define WX_REWRITE_URL(url, resourceType, instance)\ 26 | do {\ 27 | id rewriteHandler = [WXSDKEngine handlerForProtocol:@protocol(WXURLRewriteProtocol)];\ 28 | if ([rewriteHandler respondsToSelector:@selector(rewriteURL:withResourceType:withInstance:)]) {\ 29 | newURL = [[rewriteHandler rewriteURL:url withResourceType:resourceType withInstance:instance].absoluteString copy];\ 30 | }\ 31 | } while(0); 32 | 33 | 34 | @protocol WXURLRewriteProtocol 35 | 36 | /** 37 | * @abstract rewrite and complete URL 38 | * 39 | * @param url The original URL to be rewritten 40 | * 41 | * @param resourceType resource type which the url is sent for 42 | * 43 | * @param instance related instance 44 | * 45 | * @return a new url 46 | */ 47 | - (NSURL *)rewriteURL:(NSString *)url withResourceType:(WXResourceType)resourceType withInstance:(WXSDKInstance *)instance; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXValidateProtocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | #import "WXSDKInstance.h" 22 | 23 | 24 | @interface WXValidateResult : NSObject 25 | 26 | @property(nonatomic,assign)BOOL isSuccess; 27 | @property(nonatomic,strong)NSError* error; 28 | 29 | @end 30 | 31 | @interface WXModuleValidateResult : WXValidateResult 32 | 33 | @end 34 | 35 | @interface WXComponentValidateResult :WXValidateResult 36 | 37 | @property(nonatomic,copy)NSString* replacedComponent; 38 | 39 | @end 40 | 41 | 42 | @protocol WXValidateProtocol 43 | 44 | -(BOOL)needValidate:(NSURL*) bundleUrl; 45 | 46 | -(WXModuleValidateResult *)validateWithWXSDKInstance:(WXSDKInstance *)wxsdkInstance module:(NSString*) moduel method:(NSString *)method args:(NSArray *)args options:(NSDictionary *)options; 47 | 48 | -(WXComponentValidateResult *)validateWithWXSDKInstance:(WXSDKInstance *)wxsdkInstance component:(NSString *)componentName supercomponent:(WXComponent *)supercomponent; 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | 22 | @interface WXView : UIView 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXVoiceOverModule.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | #import "WXModuleProtocol.h" 22 | 23 | @interface WXVoiceOverModule : NSObject 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WXWebSocketHandler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | #import "WXModuleProtocol.h" 22 | 23 | @protocol WXWebSocketDelegate 24 | - (void)didOpen; 25 | - (void)didFailWithError:(NSError *)error; 26 | - (void)didReceiveMessage:(id)message; 27 | - (void)didCloseWithCode:(NSInteger)code reason:(NSString *)reason wasClean:(BOOL)wasClean; 28 | @end 29 | 30 | @protocol WXWebSocketHandler 31 | 32 | - (void)open:(NSString *)url protocol:(NSString *)protocol identifier:(NSString *)identifier withDelegate:(id)delegate; 33 | - (void)send:(NSString *)identifier data:(NSString *)data; 34 | - (void)close:(NSString *)identifier; 35 | - (void)close:(NSString *)identifier code:(NSInteger)code reason:(NSString *)reason; 36 | - (void)clear:(NSString *)identifier; 37 | @end 38 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WeexProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // WeexProtocol.h 3 | // libPDRCore 4 | // 5 | // Created by DCloud on 2018/6/7. 6 | // Copyright © 2018年 DCloud. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | extern NSString* kWeexImportClassName; 12 | #import "WXSDKInstance.h" 13 | #import "WXSDKManager.h" 14 | #import "WXDefine.h" 15 | 16 | @class WXRootView; 17 | 18 | extern NSString* const kWeexOptionsRenderKey; 19 | extern NSString* const kWeexOptionsFrameworkKey; 20 | 21 | @protocol WeexProtocol 22 | - (void)initWeexWithOptions:(NSDictionary*)options; 23 | - (NSDictionary *)getWeexOptions; 24 | - (void)destoryWeex; 25 | - (id)newWXSDKInstance; 26 | - (NSString*)getweexExposedModuleJs; 27 | - (WXRootView*)weexInstanceRootView:(CGRect)frame; 28 | - (WXBridgeManager*)bridgeMgr; 29 | - (void)restart; 30 | - (void)restartWithOptions:(NSDictionary*)options; 31 | - (void)refreshDefaultFlexDirection; 32 | - (BOOL)weexDebugMode; 33 | - (void)evaljs:(NSString*)js inSDKInstance:(NSString*)instance; 34 | - (void)postWeexMessageWithPayload:(NSDictionary*)payload inWeexInstance:(NSString*)instanceId; 35 | - (id)callNativeModulSyncWithPayload:(NSDictionary*)payload inWeexInstance:(NSString*)instanceId; 36 | @end 37 | -------------------------------------------------------------------------------- /ios/Headers/weexHeader/WeexSDK.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #ifdef __OBJC__ 21 | 22 | #import "style.h" 23 | #import "layout.h" 24 | #import "flex_enum.h" 25 | #import "WXWebSocketHandler.h" 26 | #import "WXVoiceOverModule.h" 27 | #import "WXView.h" 28 | #import "WXValidateProtocol.h" 29 | #import "WXUtility.h" 30 | #import "WXURLRewriteProtocol.h" 31 | #import "WXType.h" 32 | #import "WXTracingProtocol.h" 33 | #import "WXTracingManager.h" 34 | #import "WXScrollerProtocol.h" 35 | #import "WXScrollerComponent.h" 36 | #import "WXSDKManager.h" 37 | #import "WXSDKInstance.h" 38 | #import "WXSDKError.h" 39 | #import "WXSDKEngine.h" 40 | #import "WXRootViewController.h" 41 | #import "WXRichText.h" 42 | #import "WXResourceResponse.h" 43 | #import "WXResourceRequestHandler.h" 44 | #import "WXResourceRequest.h" 45 | #import "WXResourceLoader.h" 46 | #import "WXRecyclerComponent.h" 47 | #import "WXPrerenderManager.h" 48 | #import "WXPageEventNotifyEvent.h" 49 | #import "WXNetworkProtocol.h" 50 | #import "WXNavigationProtocol.h" 51 | #import "WXMonitor.h" 52 | #import "WXModuleProtocol.h" 53 | #import "WXModalUIModule.h" 54 | #import "WXLog.h" 55 | #import "WXListComponent.h" 56 | #import "WXJSFrameworkLoadProtocol.h" 57 | #import "WXJSExceptionProtocol.h" 58 | #import "WXJSExceptionInfo.h" 59 | #import "WXIndicatorComponent.h" 60 | #import "WXImgLoaderProtocol.h" 61 | #import "WXExtendCallNativeProtocol.h" 62 | #import "WXExceptionUtils.h" 63 | #import "WXEventModuleProtocol.h" 64 | #import "WXErrorView.h" 65 | #import "WXDisplayLinkManager.h" 66 | #import "WXDefine.h" 67 | #import "WXDebugTool.h" 68 | #import "WXConvert.h" 69 | #import "WXConfigCenterProtocol.h" 70 | #import "WXComponentManager.h" 71 | #import "WXComponent.h" 72 | #import "WXComponent+Layout.h" 73 | #import "WXBridgeProtocol.h" 74 | #import "WXBridgeManager.h" 75 | #import "WXBaseViewController.h" 76 | #import "WXAppMonitorProtocol.h" 77 | #import "WXAppConfiguration.h" 78 | #import "WXApmProtocol.h" 79 | #import "WXApmForInstance.h" 80 | #import "WXAnalyzerProtocol.h" 81 | #import "WXAnalyzerCenter.h" 82 | #import "WXAComponent.h" 83 | #import "NSObject+WXSwizzle.h" 84 | #import "JSContext+Weex.h" 85 | 86 | #endif /* __OBJC__ */ 87 | -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/authapi.json: -------------------------------------------------------------------------------- 1 | { 2 | "Gallery":[ 3 | {"action":"*","desc":"允许\"%@\"访问系统相册"} 4 | ], 5 | "Contacts":[ 6 | {"action":"*","desc":"允许\"%@\"访问通讯录"} 7 | ], 8 | "OAuth-qq":[ 9 | {"action":"*","desc":"允许\"%@\"使用\"QQ登录\""} 10 | ], 11 | "OAuth-weixin":[ 12 | {"action":"*","desc":"允许\"%@\"使用\"微信登录\""} 13 | ], 14 | "OAuth-sinaweibo":[ 15 | {"action":"*","desc":"允许\"%@\"使用\"新浪登录\""} 16 | ] 17 | } -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/back@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/back@2x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/back_barbutton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/back_barbutton.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/back_barbutton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/back_barbutton@2x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/back_barbutton@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/back_barbutton@3x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/beep-beep.caf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/beep-beep.caf -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/bu_close@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/bu_close@3x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/close2_barbutton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/close2_barbutton.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/close2_barbutton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/close2_barbutton@2x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/close2_barbutton@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/close2_barbutton@3x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/close_barbutton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/close_barbutton.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/close_barbutton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/close_barbutton@2x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/close_barbutton@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/close_barbutton@3x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/cpcwatchdog.json: -------------------------------------------------------------------------------- 1 | {"version":"0.1.1","data":{"lvehaisen.com":[{"match":[".*\\.lvehaisen\\.com\\/index\\/activity\\?appKey=.*&adslotId=.*"],"redirect":"https://engine.lvehaisen.com/index/activity?appKey=32AJ3CVeQaSY8Zzde4S58hQFCMS5&adslotId=7394"}]}} 2 | -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/dcloud3.dat: -------------------------------------------------------------------------------- 1 | // { "framework": "Vue"} 2 | var plus=weex.requireModule('plus'),globalEvent=weex.requireModule('globalEvent');function normalize(a,b){return'string'==typeof a&&0===a.indexOf('CALLBACK_')?function(d,f){plus.postMessage({type:'requireNativePluginCallback',data:{id:parseInt(a.replace('CALLBACK_','')),ret:d,keepAlive:!!f}},b)}:a}globalEvent.addEventListener('plusMessage',function(a){if(a.data&&'requireNativePlugin'===a.data.type){var b=a.originId,c=a.data.plugin,d=a.data.method,f=a.data.args;f=f.map(function(h){return normalize(h,b)});var g=weex.requireModule(c);g[d].apply(g,f)}}); -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Error 9 | 44 | 76 | 77 | 78 |
79 | 80 | 81 | 82 |

We're sorry ...

83 |

84 | 85 |
Back
86 |
Close
87 |
Restart
88 | 89 | -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/favorite_barbutton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/favorite_barbutton@2x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/favorite_barbutton@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/favorite_barbutton@3x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/favorite_broswer@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/favorite_broswer@2x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/favorite_broswer@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/favorite_broswer@3x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/history_barbutton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/history_barbutton@2x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/history_barbutton@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/history_barbutton@3x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/iconfont.ttf -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/image/loc2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/image/loc2@2x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/image/loc2@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/image/loc2@3x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/left-shadow-img@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/left-shadow-img@2x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/line@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/line@2x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/line@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/line@3x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/listening_microphone@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/listening_microphone@2x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/listening_microphone@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/listening_microphone@3x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/more_barbutton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/more_barbutton.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/more_barbutton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/more_barbutton@2x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/more_barbutton@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/more_barbutton@3x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/navLine@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/navLine@2x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/plugin/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/plugin/back.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/plugin/back_disable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/plugin/back_disable.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/plugin/back_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/plugin/back_press.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/plugin/cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/plugin/cancel.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/plugin/forward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/plugin/forward.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/plugin/forward_disable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/plugin/forward_disable.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/plugin/forward_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/plugin/forward_press.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/plugin/gallery/video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/plugin/gallery/video.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/plugin/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/plugin/refresh.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/plugin/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/plugin/stop.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/renovate_barbutton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/renovate_barbutton.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/renovate_barbutton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/renovate_barbutton@2x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/renovate_barbutton@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/renovate_barbutton@3x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/scan_barbutton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/scan_barbutton@2x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/scan_barbutton@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/scan_barbutton@3x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/search_barbutton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/search_barbutton@2x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/search_barbutton@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/search_barbutton@3x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/selected_barbutton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/selected_barbutton.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/selected_barbutton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/selected_barbutton@2x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/selected_barbutton@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/selected_barbutton@3x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/share_barbutton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/share_barbutton.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/share_barbutton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/share_barbutton@2x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/share_barbutton@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/share_barbutton@3x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/shortcut_barbutton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/shortcut_barbutton.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/shortcut_barbutton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/shortcut_barbutton@2x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/shortcut_barbutton@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/shortcut_barbutton@3x.png -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/sitemap/H5A0B1958.json: -------------------------------------------------------------------------------- 1 | {"launch_path":"http:\/\/m.maizuo.com\/v4\/?co=dcloud","statusbar":{"immersed":false},"match":[{"domain":"maizuo.com","rule":".*"}],"pages":[{"webviewid":"H5A0B1958","matchurls":[{"pathname":[".*"]}],"__html5plusWebviewParameter":{}}],"version":"ccdc2febb771cf02b5de074341241f73"} -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/sitemap/__W2A__H5AE54D45.json: -------------------------------------------------------------------------------- 1 | {"launch_path":"http:\/\/m.beequick.cn\/show\/tuiguang?tg=20531","statusbar":{"immersed":false},"match":[{"domain":"beequick.cn","rule":".*"}],"pages":[{"webviewid":"__W2A__H5AE54D45","matchurls":[{"pathname":[".*"]}],"__html5plusWebviewParameter":{}}],"version":"1afe71761c878fd108d8a3784a41e11b"} -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/sitemap/__W2A__edaijia.cn.json: -------------------------------------------------------------------------------- 1 | {"launch_path":"https:\/\/h5.edaijia.cn\/client\/ab-b.html?from=01051390","match":[{"domain":"edaijia.cn","rule":".*"}],"global":{"webviewParameter":{"appendCss":""}},"pages":[{"webviewId":"__W2A__edaijia.cn","matchUrls":[{"pathname":["^\\\/?$","^\\\/client\\\/ab-b\\.html$","^\\\/index\\.html$"]}],"webviewParameter":{"appendCss":""}},{"webviewId":"pages\/simple\/appindex","matchUrls":[{"pathname":["^\\\/app\\\/index\\.html$"]}]},{"webviewId":"driverbook","matchUrls":[{"pathname":["^\\\/driverbook\\\/protocol\\.html$"]}],"webviewParameter":{"titleNView":{"autoBackButton":"true","backgroundColor":"#ffffff","titleColor":"#222","titleSize":"18px"}}},{"webviewId":"common","matchUrls":[{"pathname":[".*"]}]}],"version":"02677ff1453d9c3507b60788f6dd4338"} -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/sitemap/__W2A__m.elong.com.json: -------------------------------------------------------------------------------- 1 | {"launch_path":"https:\/\/msecure.elong.com\/login\/appembedded\/shuzih5","match":[{"domain":"elong.com","rule":".*"}],"global":{"webviewParameter":{"appendCss":".tool,.search-app,.downloadBar{display:none !important}"}},"pages":[{"webviewId":"__W2A__m.elong.com","matchUrls":[{"pathname":["^\\\/?$","^\\\/hotel\\\/nsearch$"]}],"webviewParameter":{"appendCss":""}},{"webviewId":"pages\/simple\/list","matchUrls":[{"pathname":["^\\\/hotelfx\\\/beijing\\\/$","^\\\/hotelfx\\\/shanghai\\\/$","^\\\/hotelfx\\\/guangzhou\\\/$","^\\\/hotelfx\\\/shenzhen\\\/$","^\\\/hotelfx\\\/hongkong\\\/$","^\\\/hotelfx\\\/hangzhou\\\/$","^\\\/hotelfx\\\/soochow\\\/$","^\\\/hotelfx\\\/ningbo\\\/$","^\\\/hotelfx\\\/nanjing\\\/$","^\\\/hotelfx\\\/sanya\\\/$","^\\\/hotelfx\\\/[0-9]+\\\/nlist"]}],"webviewParameter":{"subNViews":"pages\/simple\/common.nview"}},{"webviewId":"favorites","matchUrls":[{"pathname":["^\\\/my\\\/hotel\\\/favorites\\\/$"]}],"webviewParameter":{"subNViews":"pages\/simple\/common.nview"}},{"webviewId":"map","matchUrls":[{"pathname":["^\\\/hotelfx\\\/[0-9]+\\\/map"]}]},{"webviewId":"pages\/simple\/detail","matchUrls":[{"pathname":["^\\\/hotelfx\\\/[0-9]+\\\/?$"]}],"webviewParameter":{"titleNView":{"type":"transparent","titleText":"\u9152\u5e97\u8be6\u60c5","autoBackButton":true,"buttons":[{"float":"right","fontSrc":"_www\/fonts\/iconfont.ttf","fontSize":"20px","text":"\ue604","onclick":"javascript:plus.webview.getWebviewById('pages\/simple\/detail').evalJS(\"var pullright = document.querySelector('.icon.pull-right');if(pullright){pullright.click();}\")"}],"titleColor":"#444","backgroundColor":"#fcfcfc"},"appendCss":".icon.pull-left,.icon.pull-right{display:none!important}"}},{"webviewId":"pages\/login\/login","matchUrls":[{"pathname":["^\\\/login\\\/?$","^\\\/Login$"]}]},{"webviewId":"pages\/simple\/account","matchUrls":[{"pathname":["^\\\/my\\\/account\\\/index\\\/?$"]}],"webviewParameter":{"subNViews":"pages\/simple\/account.nview"}},{"webviewId":"orderlist","matchUrls":[{"pathname":["^\\\/hotelfx\\\/orderlist\\\/?$"]}],"webviewParameter":{"subNViews":"pages\/simple\/common.nview"}},{"webviewId":"pages\/simple\/hotellist","matchUrls":[{"pathname":["^\\\/hotel\\\/orderlist$","^\\\/ihotel\\\/OrderList$","^\\\/ihotel\\\/orderList\\.html$","^\\\/train\\\/orderlist$","^\\\/bus\\\/orderlist$","^\\\/flight\\\/orderlist$","^\\\/minsu\\\/$"]}],"easyConfig":{"back":{"history":false}}},{"webviewId":"customerlist","matchUrls":[{"pathname":["^\\\/my\\\/account\\\/customerlist\\\/?$","^\\\/my\\\/account\\\/addresslist\\\/$"]}]},{"webviewId":"imall","matchUrls":[{"pathname":["^\\\/imall\\\/$","^\\\/my\\\/account\\\/customerlist$","^\\\/my\\\/account\\\/addresslist\\\/$"]}]},{"webviewId":"imalldetail","matchUrls":[{"pathname":["^\\\/imall\\\/goods\\\/detail$"]}]},{"webviewId":"pages\/simple\/orderdetail","matchUrls":[{"pathname":["^\\\/hotelfx\\\/orderdetail\\\/[0-9]+"]}]},{"webviewId":"hotelfxphoto","matchUrls":[{"pathname":["^\\\/hotelfx\\\/[0-9]+\\\/photo"]}]},{"webviewId":"hotelfxreview","matchUrls":[{"pathname":["^\\\/hotelfx\\\/[0-9]+\\\/review"]}],"webviewParameter":{"subNViews":"pages\/simple\/common.nview"}},{"webviewId":"pages\/simple\/createorder","matchUrls":[{"pathname":["^\\\/hotelfx\\\/createorder\\\/?$"]}],"webviewParameter":{"subNViews":"pages\/simple\/common.nview"}},{"webviewId":"pages\/pay\/payment","matchUrls":[{"pathname":["^\\\/payment\\\/initpaymode$"]}],"webviewParameter":{"subNViews":"pages\/simple\/pay.nview"}},{"webviewId":"common","matchUrls":[{"pathname":[".*"]}],"webviewParameter":{}}],"version":"485ffa6f977eee7e93d5e4eac650642b"} -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/sitemap/__W2A__m.v.6.cn.json: -------------------------------------------------------------------------------- 1 | {"version":"f4d9150fe18ab713bd9a509e8f239d31","launch_path":"http:\/\/m.v.6.cn\/?src=ummeda5155","match":[{"domain":"6.cn","rule":".*6\\.cn$"},{"domain":"6.cn","rule":".*6\\.cn\\\/$"}],"global":{"webviewParameter":{"titleNView":{"autoBackButton":true,"backgroundColor":"#fff","titleColor":"#000000","titleSize":"17px"},"statusbar":{"style":"dark"},"appendCss":"","appendJs":""},"easyConfig":{}},"pages":[{"webviewId":"__W2A__m.v.6.cn","matchUrls":[{"href":["^http\\:\\\/\\\/m\\.v\\.6\\.cn\\\/\\?src\\=ummeda5155$"]},{"href":["^http\\:\\\/\\\/m\\.v\\.6\\.cn\\\/\\?src\\=ummeda5155$"]},{"hostname":["^m\\.v\\.6\\.cn$","^v\\.6\\.cn$","^passport\\.6\\.cn$"],"pathname":["^\\\/$","^\\\/sso\\\/logout\\.php$","^\\\/pay\\\/callback$"]}],"webviewParameter":{"titleNView":false,"statusbar":{"background":"#fff"},"appendCss":".g-scrolling li[href='\/xianchang'],.pay-list>a:last-child,.sanji,input[value='\u786e\u8ba4']{display:none!important}.g-header.hidden header{pointer-events:auto!important;-webkit-transform:translateY(0)!important;transform:translateY(0)!important}.viewport-index .livecate.collapse ul{-webkit-transform:translateY(44px)!important;transform:translateY(44px)!important}.g-footer.hidden ul{-webkit-transform:translateY(0)!important;transform:translateY(0)!important}"},"easyConfig":{"back":{"history":true}}},{"webviewId":"pay","matchUrls":[{"hostname":["^wx\\.tenpay\\.com$"],"pathname":["^\\\/cgi-bin\\\/mmpayweb-bin\\\/checkmweb$"]},{"hostname":["^mclient\\.alipay\\.com$"],"pathname":["^\\\/service\\\/rest\\.htm$","^\\\/h5\\\/loginIdPwdToLogin\\.htm$"]},{"hostname":["^www\\.paypal\\.com$"],"pathname":["^\\\/cgi-bin\\\/webscr$"]},{"hostname":["^ydzf\\.vnetone\\.com$"],"pathname":["^\\\/mobilepayment\\\/orderPayment\\.aspx$"]}],"webviewParameter":{"appendCss":".am-ft-gray.am-ft-mb-20 .fn-right,.am-header,.mcontentbox .mheader{display:none!important;}"}},{"webviewId":"common","matchUrls":[{"pathname":[".*"]}],"webviewParameter":{"appendCss":"aside.logins{display:none!important;}"}}]} -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/wap2app/__shortcut.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/wap2app/__shortcut.js -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/wap2app/__template.json: -------------------------------------------------------------------------------- 1 | {"version":"3.9.5","files":["__wap2app.js","__MACOSX\/.___wap2app.js","__shortcut.js","__MACOSX\/.___shortcut.js","__template.json","__MACOSX\/.___template.json","__wap2app.ttf","__wap2appbrowser.html","__wap2appcontext.html","__wap2apperror.html","__wap2appplayer.js","__wap2appswiper.html","__wap2apptabbar.css","__wap2apptabbar.js"],"confusion":"BQ81KwAAgAIbgcpaNQNbQX7N7VNle+3\/lGsPpJNfOy1rFVuV3YMr6nJju2yY6gdN4kpGKi1K48RTQCNxuG5T7Mu2emQq1VxQcnoGA1fdDIUjkaOcAgkC+PGbBnzc9bsjxqAeQUhccu2olm0SElQwS1t1uM1LFvntBZV+wLU1FK78ZOClXHMeKxijeDuaEofJdOktz7YYixJzs267xK1boNTO3355lcZpcrF750SPK4gLDhaq1kHrOCKYPCCSjEi3qOSzIafufecUkl+Mil3VjpYRYkBOoJ+tFT1zSIXmkyhdOMjjXHyb6MbvoY7E2zt1UQviFxCoMseF8\/AhmXsmEVVLwpQljXb+LgZCZcYg3loWcdfDJy+0WSPhGHZOp6gpU1l5bRvSAltbM1tMM0hnov5IyB7Y2e+Q37EJ879G6tKZSlQUmOiErOXXI232PTDq62ARnWDpYJL1F3sjUgt6coAOW4IWxwFGiajtn\/3BLCdFa9kqo++8STy\/56J42lQHuCkXalW8TYGcWKNEaSQ3FPOQs0SJBIHMK1sPQFBOdUhcMxwuErBnKc4PtTzUE+sBhlwlonI1OV+iHwqopQRS7vRMZApBToAJOHCZI0drIT\/uEXxir6K3Gn3OHcQRwSNMU1kqBru2Lw\/XXw7UIjCqRGh27ee5BJCpRpg0LpPbIgkm\/UkfIZC6jEgjkWXsTO0+vU\/B+ZeTodYoGPFi38yEwVJf\/2cGKaTZ3q\/976CILs6qAnzq\/zkCthJg5Z88\/H\/ZcuCEhsh547mkeN3H7UWTkszRxvr8QdbUjzL6TfMRoFN07UXXNOeIwXE55IJZdChz0wjh\/oOgXcpRqEiR2vm0hwN2\/Zij+2+YM9QmlrGK4gfYSK2uNlnZ64i5YPIHa4mta9TSIl37pgow8mQq4NYxo7S0dpmmC0TfG7yGBIlb402gWy7utNCapbWXe\/FI5VVNw5DQI1skG5sxPcrJhspwQVZmGuSI1B2ALVLoB8LvptTXwP0ZlqB3DA=="} -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/wap2app/__wap2app.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/wap2app/__wap2app.js -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/wap2app/__wap2app.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/wap2app/__wap2app.ttf -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/wap2app/__wap2appbrowser.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/wap2app/__wap2appbrowser.html -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/wap2app/__wap2appcontext.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/wap2app/__wap2appcontext.html -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/wap2app/__wap2apperror.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/wap2app/__wap2apperror.html -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/wap2app/__wap2appplayer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/wap2app/__wap2appplayer.js -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/wap2app/__wap2appswiper.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/PandoraApi.bundle/wap2app/__wap2appswiper.html -------------------------------------------------------------------------------- /ios/Resources/PandoraApi.bundle/wap2app/__wap2apptabbar.css: -------------------------------------------------------------------------------- 1 | .tab { 2 | position: absolute; 3 | left: 0; 4 | right: 0; 5 | bottom: 0; 6 | height: 50px; 7 | } 8 | 9 | .tab-inner { 10 | display: table; 11 | table-layout: fixed; 12 | background-color: #f7f7f7; 13 | -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, .85); 14 | box-shadow: 0 0 1px rgba(0, 0, 0, .85); 15 | -webkit-backface-visibility: hidden; 16 | backface-visibility: hidden; 17 | } 18 | 19 | .tab-item { 20 | display: table-cell; 21 | width: 1%; 22 | height: 50px; 23 | overflow: hidden; 24 | color: #666; 25 | text-align: center; 26 | text-overflow: ellipsis; 27 | white-space: nowrap; 28 | vertical-align: middle; 29 | } 30 | 31 | .tab-item-icon img { 32 | width: 100%; 33 | height: 100%; 34 | } 35 | 36 | .tab-item .tab-item-icon img:nth-child(1) { 37 | display: block; 38 | } 39 | 40 | .tab-item .tab-item-icon img:nth-child(2) { 41 | display: none; 42 | } 43 | 44 | .tab-item.active .tab-item-icon img:nth-child(1) { 45 | display: none; 46 | } 47 | 48 | .tab-item.active .tab-item-icon img:nth-child(2) { 49 | display: block; 50 | } 51 | 52 | .tab-item-label { 53 | display: block; 54 | overflow: hidden; 55 | font-size: 12px; 56 | } 57 | 58 | .tab-item-icon { 59 | margin: 0 auto; 60 | width: 24px; 61 | height: 24px; 62 | } 63 | 64 | .tab-item-icon-bars{ 65 | 66 | } 67 | 68 | .tab.no-label .tab-item-icon { 69 | margin: 0 auto; 70 | width: 40px; 71 | height: 40px; 72 | } 73 | 74 | .tab.no-icon .tab-item-label { 75 | font-size: 16px; 76 | } 77 | 78 | .tab-item.active { 79 | color: #FF5777; 80 | } -------------------------------------------------------------------------------- /ios/Resources/unincomponents.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/Resources/unincomponents.ttf -------------------------------------------------------------------------------- /ios/Uni.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "DCUniMP.h" 3 | #import 4 | #import 5 | @interface Uni : RCTEventEmitter 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /ios/libs/libSDWebImage.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/libs/libSDWebImage.a -------------------------------------------------------------------------------- /ios/libs/libcoreSupport.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/libs/libcoreSupport.a -------------------------------------------------------------------------------- /ios/libs/liblibNativeObj.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/libs/liblibNativeObj.a -------------------------------------------------------------------------------- /ios/libs/liblibNavigator.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/libs/liblibNavigator.a -------------------------------------------------------------------------------- /ios/libs/liblibPDRCore.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/libs/liblibPDRCore.a -------------------------------------------------------------------------------- /ios/libs/liblibStorage.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/libs/liblibStorage.a -------------------------------------------------------------------------------- /ios/libs/liblibUI.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/libs/liblibUI.a -------------------------------------------------------------------------------- /ios/libs/liblibWeex.a: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:bb662cf0d41bd70882b4b6cb3f55c56a89100712ef8fa0009388f9feb79e116b 3 | size 120026088 4 | -------------------------------------------------------------------------------- /ios/libs/storage.framework/Headers/StorageManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // StorageManager.h 3 | // storage 4 | // 5 | // Created by DCloud on 2018/6/13. 6 | // Copyright © 2018年 DCloud. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef void (^StorageManagerCallback)(id result); 12 | 13 | @class Storage; 14 | @interface StorageManager : NSObject 15 | + (Storage*)currentStorage; 16 | + (Storage*)activeStorageWithDomain:(NSString*)domain; 17 | + (void)serializeStorageWithDomain:(NSString*)domain; 18 | + (Storage*)storageWithDomain:(NSString*)domain; 19 | @end 20 | 21 | @interface Storage : NSObject 22 | @property(nonatomic, strong)NSString* domain; 23 | @property(nonatomic, strong)NSString* rootPath; 24 | - (NSUInteger)length; 25 | 26 | - (NSArray*)getAllKeys; 27 | 28 | - (void)setItem:(NSString *)key value:(NSString *)value callback:(StorageManagerCallback)callback; 29 | 30 | - (void)setItemPersistent:(NSString *)key value:(NSString *)value callback:(StorageManagerCallback)callback; 31 | 32 | - (NSString*)getItem:(NSString *)key callback:(StorageManagerCallback)callback; 33 | 34 | - (void)removeItem:(NSString *)key callback:(StorageManagerCallback)callback; 35 | - (void)clear; 36 | @end 37 | 38 | -------------------------------------------------------------------------------- /ios/libs/storage.framework/Headers/storage.h: -------------------------------------------------------------------------------- 1 | // 2 | // storage.h 3 | // storage 4 | // 5 | // Created by DCloud on 2018/6/13. 6 | // Copyright © 2018年 DCloud. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for storage. 12 | FOUNDATION_EXPORT double storageVersionNumber; 13 | 14 | //! Project version string for storage. 15 | FOUNDATION_EXPORT const unsigned char storageVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | #import 20 | -------------------------------------------------------------------------------- /ios/libs/storage.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/libs/storage.framework/Info.plist -------------------------------------------------------------------------------- /ios/libs/storage.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module storage { 2 | umbrella header "storage.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /ios/libs/storage.framework/storage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/puti94/react-native-uni/f05bc6d074375e97c5938674d5782f62c2d4f443/ios/libs/storage.framework/storage -------------------------------------------------------------------------------- /react-native-uni.podspec: -------------------------------------------------------------------------------- 1 | require "json" 2 | 3 | package = JSON.parse(File.read(File.join(__dir__, "package.json"))) 4 | 5 | Pod::Spec.new do |s| 6 | s.name = "react-native-uni" 7 | s.version = package["version"] 8 | s.summary = package["description"] 9 | s.homepage = package["homepage"] 10 | s.license = package["license"] 11 | s.authors = package["author"] 12 | 13 | s.platforms = { :ios => "9.0" } 14 | s.source = { :git => "https://github.com/puti94/react-native-uni.git", :tag => "#{s.version}" } 15 | 16 | 17 | s.source_files = "ios/**/*.{h,m,mm,a}" 18 | 19 | 20 | s.dependency "React" 21 | s.vendored_frameworks = 'ios/libs/**/*.framework' 22 | s.resources = 'ios/Resources/**/*.{js,ttf,bundle}' 23 | s.vendored_libraries = "ios/libs/**/*.a" 24 | s.frameworks = "JavaScriptCore","CoreMedia","MediaPlayer","AVFoundation","AVKit","GLKit","OpenGLES","CoreText","QuartzCore","CoreGraphics","QuickLook","CoreTelephony","AssetsLibrary","CoreLocation","AddressBook" 25 | s.library = "c++" 26 | end 27 | -------------------------------------------------------------------------------- /src/__tests__/index.test.tsx: -------------------------------------------------------------------------------- 1 | it.todo('write a test'); 2 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "paths": { 5 | "react-native-uni": ["./src/index"] 6 | }, 7 | "allowUnreachableCode": false, 8 | "allowUnusedLabels": false, 9 | "esModuleInterop": true, 10 | "forceConsistentCasingInFileNames": true, 11 | "jsx": "react", 12 | "lib": ["esnext"], 13 | "module": "esnext", 14 | "moduleResolution": "node", 15 | "noFallthroughCasesInSwitch": true, 16 | "noImplicitReturns": true, 17 | "noImplicitUseStrict": false, 18 | "noStrictGenericChecks": false, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "resolveJsonModule": true, 22 | "skipLibCheck": true, 23 | "strict": true, 24 | "target": "esnext" 25 | } 26 | } 27 | --------------------------------------------------------------------------------