How to use index.js instead of (index.ios.js, index.android.js) in React Native for cross-platform app?

后端 未结 3 1865
情书的邮戳
情书的邮戳 2020-12-30 03:48

Thanks for the answers from now,

I am a newbie in React Native, I want to make a cross-platform app so I created index.js:

import Re         


        
3条回答
  •  伪装坚强ぢ
    2020-12-30 04:11

    In iOS AppDelegate.m change this

    jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
    

    to

    jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
    

提交回复
热议问题