0

I am starting to learn ReactNative with Salesforce based on the link . I am able to generate the base code using the "forcereact create" and also able to run the Android version through visual studio (had minor issues in the beginning like Path issue , etc). But when tried to run the app for iOS its failing to load have tried almost every solutions found online

  1. downgrade cocoapod
  2. add path for individual items in pod file
  3. change buildsettings to point to latest iOS version
  4. uninstall , reinstall pod

But still issue is not resolved, also it throws different errors in different tool. Please find the attachment for reference.

Please do let me know where am i going wrong.

System Details:

system details

Installed Software versions:

Installed Softwares

Once build is initiated in Xcode it is throwing too many depreciations, issues and 1 error right now which might then add more error upon resolving.

From another stackoverflow question tried its solution of adding path as below in pod file but still issue remained:

path adding in Pod file

Error details as as below.

In Xcode: It shows 309 warnings and 1 error

Warnings and error in Xcode

Detailed error in Xcode:

Undefined symbols for architecture x86_64:  "_OBJC_CLASS_$_RCTImageLoader", referenced from:
  objc-class-ref in RNSScreenStackHeaderConfig.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Showing Recent Errors Only Undefined symbol: _OBJC_CLASS_$_RCTImageLoader

Xcode error detail

Error in Terminal :

Terminal error 1

Terminal error 2

JalilIrfan
  • 158
  • 1
  • 14

1 Answers1

1

Found a workaround suggestion mentioned here but it didnt help me out much so adding it up here if it could help someone else

The solution that actually worked for me is from GithHub

All i had to do is add in the frame work name and modify the if loop as below

pre_install do |installer|
  installer.pod_targets.each do |pod|
    if pod.name.eql?('RNScreens') || pod.name.eql?('RNCMaskedView')
      def pod.build_type
       Pod::BuildType.static_library
      end
    end
  end
end

Once your pod file is updated

Go to terminal and point to ios folder in your project and execute "pod install"

on completing the Pod installation go to Xcode , clear your build by pressing Command (or Cmd) ⌘ + Shift ⇧ + K

then run your application , it will start running without issues.

Note :- In case any new framework error throws keep adding it in the if loop

JalilIrfan
  • 158
  • 1
  • 14
  • 1
    You are a saviour. I have wasted so much time on this issue and tried all possible solutions available. Thank you for the solution. – ADK Apr 12 '21 at 08:30