Coder Social home page Coder Social logo

Comments (10)

Issactoto avatar Issactoto commented on July 17, 2024 1

Yes, I think there were some errors on the Xcode native platform. I got it sorted now, thank you very much for your help!

from aepsdk-react-native.

cacheung avatar cacheung commented on July 17, 2024

You followed this
https://github.com/adobe/aepsdk-react-native
(https://github.com/adobe/aepsdk-react-native#ios-development)
and
https://github.com/adobe/aepsdk-react-native/tree/main/packages/core

Have you
import { MobileCore } from '@adobe/react-native-aepcore' ?
https://github.com/adobe/aepsdk-react-native/tree/main/packages/core#importing-the-mobile-core-package

from aepsdk-react-native.

Issactoto avatar Issactoto commented on July 17, 2024

Hi. Yes, I did follow the instructions in the links you sent - added the configurations in both AppDelegate.h and AppDelegate.mm and imported the package the way as you mentioned. I got the error on both M1 and M2 Mac laptops. Meanwhile, I am able to run the sample app without any error.

from aepsdk-react-native.

cacheung avatar cacheung commented on July 17, 2024

You need to add import { MobileCore } from '@adobe/react-native-aepcore' to your React Native side of the code, not on the Native platform code.
Similar to the sample app here - https://github.com/adobe/aepsdk-react-native/blob/main/apps/AEPSampleApp/extensions/CoreView.tsx#L15

Did you do that?

from aepsdk-react-native.

Issactoto avatar Issactoto commented on July 17, 2024

Yes, I imported the package in a tsx view file, just like the sample app.

from aepsdk-react-native.

cacheung avatar cacheung commented on July 17, 2024

Is it possible to share your sample project, we can take a look?

from aepsdk-react-native.

Issactoto avatar Issactoto commented on July 17, 2024

Sure, that would be really helpful. I created a new repo using react-native-cli (https://github.com/Issactoto/adobe-analytics-test/tree/main). I just changed all the files accordingly as mentioned above and the function is used in App.tsx. I am using Yarn and IOS 17.2 for your information. Thanks!

from aepsdk-react-native.

cacheung avatar cacheung commented on July 17, 2024

@Issactoto
When I tried to build the repo you provided in Xcode, I saw errors which can be resolved with these two known workaround:
#247 (comment)
#263 (comment)

 post_install do |installer|
    # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
    react_native_post_install(
      installer,
      config[:reactNativePath],
      :mac_catalyst_enabled => false
    )
    installer.pods_project.targets.each do |t|
      if t.name.start_with?("AEP")
        t.build_configurations.each do |bc|
            bc.build_settings['OTHER_SWIFT_FLAGS'] = '$(inherited) -no-verify-emitted-module-interface'
        end
      end
    end
  end
end

Please give them a try and see if you can build.
These are for iOS.
Did you have the issue on Android?

from aepsdk-react-native.

Issactoto avatar Issactoto commented on July 17, 2024

Thank you very much for the reply and solution. It works for the new repo I shared earlier. However, I am actually using a monorepo for the project I am developing and I am still facing the same error. Unfortunately, I am unable to share the code here. Do you happen to know if there are any specific changes that need to be made in this context? Additionally, I want to note that I don't experience any problems when running the code on Android.

from aepsdk-react-native.

cacheung avatar cacheung commented on July 17, 2024

For the original log, we thought it is possible due to the import statement in the react native side.
import { MobileCore } from '@adobe/react-native-aepcore'

This error is located at:
    in App
    in RCTView (created by View)
    in View (created by AppContainer)
    in RCTView (created by View)
    in View (created by AppContainer)
    in AppContainer

But it seems like you have that correctly in the sample app you shared.

If using the same react native code and Android platform is working, then the issue is on the iOS side.
Have you tried to run the iOS app from the Xcode and see if there is any other error shown on the Xcode native platform? Or you can monitor the logs in the Xcode debug windows.

from aepsdk-react-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.