prscX / react-native-photo-editor

React Native: Native Photo Editor
Apache License 2.0
1.12k stars 244 forks source link

IOS Sticker gives error #109

Open arjundalal opened 4 years ago

arjundalal commented 4 years ago

Hello Team, i have followed this step to add stickers in IOS.

  1. Create a new folder callled Rewsources_Other
  2. add it to the root folder (Seen in Scree shot).
  3. and run the project it give me error. The error is Thread 1: signal SIGABRT but when we remove sticker array than it work fine. please help me to resolve this issue. because of this project i am not able to deliver project. Screenshot 2020-01-23 at 7 57 53 PM

please help me

prscX commented 4 years ago

@arjundala: Can I have your email id please, I see your are facing lot of issues, lets have a call to discuss and fix all the issues.

arjundalal commented 4 years ago

arjundalal38@gmail.com this is my mail id

On Sat, 25 Jan 2020, 9:33 am Pranav Raj Singh Chauhan, < notifications@github.com> wrote:

@arjundala: Can I have your email id please, I see your are facing lot of issues, lets have a call to discuss and fix the same.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/prscX/react-native-photo-editor/issues/109?email_source=notifications&email_token=AM57WLGZQSUTSF4TNUAYXQDQ7O2X5A5CNFSM4KKXLGN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ4UWJA#issuecomment-578374436, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM57WLCIT5H2DBDTEGJDXW3Q7O2X5ANCNFSM4KKXLGNQ .

arjundalal commented 4 years ago

@prscX please help me to resolve this issue

winhongyap commented 4 years ago

@prscX is there any resolution for this? I'm facing the same issue here

arjundalal commented 4 years ago

Hello team, Please help us to resolve this issue.

On Mon, 3 Feb 2020, 8:25 pm ywh, notifications@github.com wrote:

@prscX https://github.com/prscX is there any resolution for this? I'm facing the same issue here

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/prscX/react-native-photo-editor/issues/109?email_source=notifications&email_token=AM57WLGLRRSOF6USFDHS6UTRBAV4ZA5CNFSM4KKXLGN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKUEHKI#issuecomment-581452713, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM57WLAEINOTB2IEITGO5MLRBAV4ZANCNFSM4KKXLGNQ .

nwaughachukwuma commented 4 years ago

Hi @arjundalal, please follow the steps below:

  1. Add your stickers to the assets folder (preferably root_dir/assets/stickers)
  2. Add a path to the sticker folder same way you reference the path to your fonts or other assets assets: ["./assets/fonts/", "./assets/stickers"] either in react-native.config.js file or in package.json
  3. Open your project.xcworkspace on Xcode
  4. Go to the resources folder and right (option) click
  5. Go to the menu item that says add files to $project_name
  6. This should open a folder dialog. Go to the path where you saved your stickers and copy all the image files. Ensure that copy items if needed and create folder references are checked.
  7. Click Ok and rebuild your project.

Please see the images below for guidance and let me know if it works for you.

Screenshot 2020-02-05 at 23 13 24 Screenshot 2020-02-05 at 23 20 00

Doing this worked for me and I didn't have to do anything more.

Screenshot 2020-02-05 at 23 25 06
arjundalal commented 4 years ago

@nwaughachukwuma can you please share your package.josn because i awant to see the path to the sticker folder. and can you please tell me how you use sticker name in your code.

nwaughachukwuma commented 4 years ago

Hi @arjundalal all you need to do is one of the following:

RN version <60:

in your package.json file, add: 
"rnpm": {
    "assets": [
      "./assets/fonts/",
      "./assets/stickers/"
    ]
  }

RN version >=60:

Create a new file react-native.config.js in your project root_dir and add:
module.exports = {
    project: {
        ios: {},
        android: {},
    },
    assets: ["./assets/fonts/", "./assets/stickers/"]
};

I hope it's clear enough