infobip / mobile-messaging-react-native-plugin

Mobile Messaging SDK plugin for React Native projects
24 stars 4 forks source link

[iOS] Example project: Build Failed #29

Closed irbisdev closed 2 years ago

irbisdev commented 2 years ago

Tried to build example project from repo on iOS.

Before build:

> yarn
> cd ios
> pod install

Result:

Screenshot 2021-07-28 at 22 56 29

Environment: Xcode 12.5.1 CocoaPods 1.10.1


One of solution:

ios/Podfile

......

use_frameworks!

target 'Example' do

  ......

  $static_framework = [
    'react-native-safe-area-context',
    'React-RCTText',
    'RNReanimated'
  ]

  pre_install do |installer|
    Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}

    installer.pod_targets.each do |pod|
      if $static_framework.include?(pod.name)
        def pod.build_type;
          Pod::BuildType.static_library
        end
      end
    end
  end
end
riskpp commented 2 years ago

@irbisdev Thank you! We will check and update Example.

BR, Olga

riskpp commented 2 years ago

Didn't reproduce this issue, however found different one, some time ago by mistake #import <React/RCTLinkingManager.h> was removed from AppDelegate.m

I've updated it.

About issue you mentioned, would be nice to try to make following steps:

  1. pod deintegrate, pod install with closed Xcode
  2. delete derived data and do Product->Clean Build Folder in Xcode
  3. try to build again

Also we have guide How to start Example app and we don't use yarn, but npm install, but it shouldn't be the cause of this issue, I've checked.

BR, Olga

riskpp commented 2 years ago

Closing it, issue not reproduced and no more questions appeared.